@ebi-wp/ebinocle-ng-rsclient
Advanced tools
Comparing version 1.3.1-1.alpha.4 to 1.3.1-1.alpha.5
@@ -16,3 +16,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("rxjs/operators"),require("rxjs")):"function"==typeof define&&define.amd?define("@ebi-wp/ebinocle-ng-rsclient",["exports","@angular/common/http","@angular/core","rxjs/operators","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["ebi-wp"]=e["ebi-wp"]||{},e["ebi-wp"]["ebinocle-ng-rsclient"]={}),e.ng.common.http,e.ng.core,e.rxjs.operators,e.rxjs)}(this,(function(e,t,i,n,r){"use strict";var s=function(){this.DEBUG=!1,this.MINIMUM_PAGE_SIZE=3,this.DEFAULT_PAGE_SIZE=15,this.DEFAULT_REST_FIELDS="name",this.DEFAULT_REST_HLFIELDS="description",this.DEFAULT_REST_ENABLE_HLFIELDS=!1,this.DEFAULT_SUGGEST_DOMAINS=["efo","ensembl_gene","europepmc","pdbe","uniprot"],this.SEARCH_QUERY_MIN_LENGTH=1,this.SEARCH_QUERY_MAX_LENGTH=255,this.SEARCH_MAX_NUM_RESULTS=25e4,this.TOOLS_URL_PREFIX="https://www.ebi.ac.uk/Tools",this.XREF_SEARCH_EXCLUDED_DOMAINS=["ebiweb_corporate"],this.REST_FIELDS={arrayexpress_repository:"name,description,publication_date",biosamples:"name,description,insdc_center_name,isolation,strain,cultivar,title",biosamples_covid19:"name,description,insdc_center_name,isolation,strain,cultivar,title",biotools:"name,description,homepage,version",chebi:"name",chembl_assay:"assay_type",chembl_document:"title",chembl_molecule:"molecular_weight,alogp,canonical_smiles,hydrogen_bond_acceptor_count,hydrogen_bond_donor_count, standard_inchi_key,polar_surface_area",chembl_target:"target_synonym,organism",chembl_target_component:"component_synonym,accession",dgva:"study_title,study_name,study_accession,variant_placement,variant_type,variation_level,variant_count,species",ebiweb_corporate:"name,mime_type",ebiweb_people:"surname,forename,image,email,tel,fax,room,position",ebiweb_resources:"name,short_name,logo,description",emdb:"name,author,method,resolution,specimenstate",empiar:"name,dataset_size,dataset_size_unit,author",enzymeportal_proteins:"name,primary_accession",europepmc:"name,author,display_author,publication_date,journal,volume,issue,pagination,ORCID",epo:"description",gnps:"name,description,publication_date,full_dataset_link",gpcrdb:"name,gpcr-family",go:"name,namespace",gwas_catalog:"first_author,reported_trait,description,PUBMED",hgnc:"gd_app_sym,gd_app_name,gd_status,gd_aliases,gd_locus_type,gd_pub_chrom_map",lrg:"name,status,organism",massive:"name,description,full_dataset_link",metabolights:"name,description,publication_date",metagenomics_analyses:"id,name,project_name,sample_name,pipeline_version",metagenomics_samples:"id,name,project_name",omim:"title",opentargets:"disease_name,gene,target_id,disease_id,association_score_overall",opentargets_genetics:"efo_label,gene,association_score,disease_reported_trait,study_id,variant_otg_id,target_id",orcid_data_claims:"description,name,ORCID",pdbe:"name",pdbekb:"name,description,best_pdb,best_entity,no_annotations,no_interaction_partners,no_ligands,no_pdbs,no_references",pfam_entries:"creation_date,description,name",pride:"name,description,publication_date",project:"description,name",reactome:"name,inferred_summation,stid,type,species",rfam:"created_date,description,entry_type,name",rhea:"name,chebiIdEquation",sc_genes:"name,SC_ATLAS",taxonomy:"name,genbank_common_name,common_name",uniprot:"descRecName,descSubName,organism_scientific_name,acc,status"},this.REST_HLFIELDS={arrayexpress_repository:"description",ebiweb_corporate:"content",omim:"description",rfam:"description"},this.VISIBLE_FACETS={arrayexpress_repository:"omics_type,disease,tissue,publication_date,repository, modification,instrument_platform,domain_source,technology_type,TAXONOMY",atlas_experiments:"omics_type,disease,tissue,publication_date,repository,modification, instrument_platform,domain_source,technology_type,TAXONOMY",biomodels:"curationstatus,disease,hosting_repository,instrument_platform,modelformat, modification,omics_type,publication_date,repository,tenchnology_type,tissue",ega:"omics_type,disease,tissue,publication_date,repository,modification,instrument_platform, domain_source,technology_type,TAXONOMY",emblnew_con:"collection_date,creation_date,last_modification_date,country,TAXONOMY,gene",emblnew_standard:"collection_date,creation_date,last_modification_date,country,TAXONOMY,gene",emblrelease_con:"collection_date,creation_date,last_modification_date,country,TAXONOMY,gene",emblrelease_standard:"collection_date,creation_date,last_modification_date,country,TAXONOMY,gene",empiar:"release_date",gnps:"omics_type,disease,tissue,publication_date,repository,modification,instrument_platform, domain_source,technology_type,TAXONOMY",gpmdb:"omics_type,disease,tissue,publication_date,repository,modification,instrument_platform, domain_source,technology_type,TAXONOMY",massive:"omics_type,disease,tissue,publication_date,repository,modification,instrument_platform, domain_source,technology_type,TAXONOMY",metabolights_dataset:"omics_type,disease,tissue,publication_date,repository,modification, instrument_platform,domain_source,technology_type,TAXONOMY",metabolome_express:"omics_type,disease,tissue,publication_date,repository,modification, instrument_platform,domain_source,technology_type,TAXONOMY",metabolomics_workbench:"omics_type,disease,tissue,publication_date,repository, modification,instrument_platform,domain_source,technology_type,TAXONOMY",orcid_data_claims:"dataset_type",peptide_atlas:"omics_type,disease,tissue,publication_date,repository,modification, instrument_platform,domain_source,technology_type,TAXONOMY",pride:"omics_type,disease,tissue,publication_date,repository,modification,instrument_platform, domain_source,TAXONOMY,technology_type",rnacentral:"expert_db,has_genomic_coordinates,TAXONOMY,rna_type",rfam:"entry_type,TAXONOMY,rna_type,popular_species,has_3d_structure"},this.REST_RESP_HEADERS={X_EBI_SEARCH_VERSION:"X-EBI-Search-Version",X_EBI_SEARCH_RETRIEVABLEHITS:"X-EBI-Search-RetrievableHits",X_EBI_SEARCH_RETRIEVABLEFACETS:"X-EBI-Search-RetrievableFacets",X_EBI_SEARCH_QUERYSTRING:"X-EBI-Search-Querystring",X_EBI_SEARCH_QUERY_PARAMETERS:"X-EBI-Search-Query-Parameters",X_EBI_SEARCH_TOTAL_RESULTS:"X-EBI-Search-Total-Results",X_EBI_SEARCH_MAX_SUGGESTED_TERMS:"X-EBI-Search-Max-suggested-terms"},this.SEARCH_DOMAIN_SORTING={literature:[{default:!0,label:"Relevance",rest_value:"_relevance:descending,publication_date:descending",browser_value:"relevance"},{default:!1,label:"Publication Date",rest_value:"publication_date:descending,_relevance:descending",browser_value:"publication_date"}],empiar:[{default:!0,label:"Relevance",rest_value:"_relevance:descending,release_date:descending",browser_value:"relevance"},{default:!1,label:"Release Date",rest_value:"release_date:descending,_relevance:descending",browser_value:"release_date"}],europepmc:[{default:!0,label:"Relevance",rest_value:"_relevance:descending,publication_date:descending",browser_value:"relevance"},{default:!1,label:"Publication Date",rest_value:"publication_date:descending,_relevance:descending",browser_value:"publication_date"}],rfam:[{default:!1,label:"Relevance",rest_value:"_relevance:descending,num_full:descending",browser_value:"relevance"},{default:!0,label:"Number of sequence regions annotated",rest_value:"num_full:descending,_relevance:descending",browser_value:"num_full"}]},this.ID_HIDDEN_DOMAINS=["ebiweb_people","ebiweb_corporate","opentargets_genetics"]};s.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],s.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new s},token:s,providedIn:"root"});var o=function(){this.name="wwwdev",this.restClientName="ebinocle-rsclient",this.url="https://wwwdev.ebi.ac.uk/ebisearch/ws/rest"};o.decorators=[{type:i.Injectable}],o.ctorParameters=function(){return[]}; | ||
***************************************************************************** */ | ||
var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function c(e,t){function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var p=function(e){function t(i,n){var r=e.call(this,i)||this;return r.blocking=!0,Object.setPrototypeOf(r,t.prototype),r.message=i,void 0!==n&&(r.blocking=n),r}return c(t,e),t.prototype.toString=function(){return"EBException: "+this.message},t}(Error);var h=function(e){function t(i){var n=e.call(this,i)||this;return Object.setPrototypeOf(n,t.prototype),n}return c(t,e),t}(p),l=function(e){function t(i,n,r,s){var o=e.call(this,i,s)||this;return Object.setPrototypeOf(o,t.prototype),o.status=n,o.url=r,o}return c(t,e),t}(p);var f=function(){function e(e,t,i){var s=this;this._http=e,this.endpointTarget=t,this.cfg=i,this.timezone_map={BST:"GMT+0100"},this.root=new r.Observable((function(e){return s._rootObserver=e})).pipe(n.share()),this.categories=new r.Observable((function(e){return s._categoryObserver=e})).pipe(n.share()),this.leaves=new r.Observable((function(e){return s._leafObserver=e})).pipe(n.share()),this.domains=new r.Observable((function(e){return s._domainsObserver=e})).pipe(n.share())}return e.prototype.load=function(){var e=this,t=this,i=this.endpointTarget.url;this.root.subscribe(),this.categories.subscribe(),this.leaves.subscribe(),this.domains.subscribe(),this.get(i).subscribe((function(i){var n=i;t._root={id:n.id,name:n.name},e._rootObserver.next(t._root);var r=[],s=[];n.subdomains.forEach((function(e){r.push({id:e.id,name:e.name}),t._findLeaves(e.id,e.name,e,s)}));var o=r.concat(s);o.push(t._root),t._categories=r,t._leaves=s,t._domains=o,t._categoryObserver.next(t._categories),t._leafObserver.next(t._leaves),t._domainsObserver.next(t._domains)}),(function(e){throw console.log("Could not get domain information."+e),new l("ConfigService - Web Service Error",500)}))},e.prototype.getDomain=function(e){var t=this;return new r.Observable((function(i){t._domains?(i.next(t._domains.find((function(t){return t.id===e}))),i.complete()):t.domains.subscribe((function(t){i.next(t.find((function(t){return t.id===e}))),i.complete()}))}))},e.prototype.getLeaves=function(){var e=this;return new r.Observable((function(t){e._leaves?(t.next(e._leaves),t.complete()):e.leaves.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype.getCategories=function(){var e=this;return new r.Observable((function(t){e._categories?(t.next(e._categories),t.complete()):e.categories.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype.getRoot=function(){var e=this;return new r.Observable((function(t){e._root?(t.next(e._root),t.complete()):e.root.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype._findLeaves=function(e,t,i,n){var r=i.subdomains;if(void 0===r){var s=this.getIndexInfo(i),o=this.getFieldInfos(i),a={id:i.id,name:i.name,description:i.description,indexInfo:s,fields:o,parentId:e,parentName:t};n.push(a)}for(var c in r)null!==r[c]&&"object"==typeof r[c]&&this._findLeaves(e,t,r[c],n)},e.prototype.getFieldInfos=function(e){var t,i=[];return e.fieldInfos.forEach((function(e){t={id:e.id,name:e.name,description:e.description},e.options.forEach((function(e){switch(e.name){case"alias":t.alias=e.value;break;case"searchable":t.searchable="true"===e.value.toLowerCase();break;case"retrievable":t.retrievable="true"===e.value.toLowerCase();break;case"sortable":t.sortable="true"===e.value.toLowerCase();break;case"facet":t.facet="true"===e.value.toLowerCase();break;case"type":t.type=e.value;break;case"topterms":t.toperms="true"===e.value.toLowerCase();break;case"referenced domain":t.referencedDomain=e.value;break;case"referenced field":t.referencedField=e.value}})),i.push(t)})),i},e.prototype.getIndexInfo=function(e){var t,i,n,r,s,o,a,c,u=this,p=e.indexInfos,h=!1,l=!1;return p.forEach((function(e){switch(e.name){case"Number of entries":t=parseInt(e.value,10);break;case"Last modification date":i=u.createDate(e.value);break;case"Update date":n=u.createDate(e.value);break;case"Release date":r=u.createDate(e.value);break;case"URL":s=e.value;break;case"Index size":o=e.value;break;case"Index size (B)":a=e.value;break;case"Hidden domain":h="true"===e.value;break;case"Dictionary Availability":l="true"===e.value;break;case"Release version":c=e.value}})),{noOfEntries:t,indexedOn:i,updatedOn:n,releasedOn:r,url:s,indexSize:o,indexSizeInBytes:a,hidden:h,dictionary:l,releaseVersion:c}},e.prototype.re_order=function(e){var t=this;return e.replace(/^(\w+) (\w+) (\d\d) (\d\d:\d\d:\d\d) (\w+) (\d\d\d\d)$/,(function(e,i,n,r,s,o,a){return i+" "+n+" "+r+" "+a+" "+s+" "+(t.timezone_map[o]||o)}))},e.prototype.createDate=function(e){return new Date(this.re_order(e))},e.prototype.update=function(){this._rootObserver.next(this._root),this._categoryObserver.next(this._categories),this._leafObserver.next(this._leaves),this._domainsObserver.next(this._domains)},e.prototype.get=function(e){var i=this,r={headers:new t.HttpHeaders({Accept:"application/json","X-EBI-StickySession":"true","X-EBISearch-client":"ebinocle-webjs"}),observe:"response",responseType:"json"};return this._http.request("GET",e,r).pipe(n.map((function(e){return!i.backend_version&&e.headers&&(i.backend_version=e.headers.get(i.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_VERSION)),e.body.domains[0]})))},e}();f.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:t.HttpClient},{type:o},{type:s}]},f.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new f(i.ɵɵinject(t.HttpClient),i.ɵɵinject(o),i.ɵɵinject(s))},token:f,providedIn:"root"});var d=function(){function e(){this.errorMessageEmitter=new r.ReplaySubject,this.errorMessages=this.errorMessageEmitter.asObservable()}return e.prototype.addError=function(e){var t=new g(new Date);t.err=e,t.stackTrace=e,this.errorMessageEmitter.next(t)},e.prototype.putMessageEvent=function(e){e&&this.errorMessageEmitter.next(e)},e.prototype.registerShownErrorEvent=function(e){e?this.lastShownEvtDate=e.errDate:console.log("ERROR - NotificationMessageService.registerShownErrorEvent - passed ErrorEvent is not valorized")},e.prototype.isAlreadyShownErrorEvent=function(e){return e&&this.lastShownEvtDate&&e.errDate<=this.lastShownEvtDate},e}();d.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],d.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new d},token:d,providedIn:"root"});var m=function(){function e(e){this.date=e}return e.prototype.setAknowledged=function(e){this.aknowledged=e},e.prototype.isAknowledged=function(){return this.aknowledged},e.prototype.getDate=function(){return this.date},e}();var y=function(e){function t(t,i,n){var r=e.call(this,t)||this;return r.title=i,r.message=n,r}return c(t,e),t.prototype.getTitle=function(){return this.title},t.prototype.getMessage=function(){return this.message},t}(m);var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),Object.defineProperty(t.prototype,"errDate",{get:function(){return this.getDate()},enumerable:!1,configurable:!0}),t.prototype.getTitle=function(){return"Something has gone wrong with our web server"},t.prototype.getMessage=function(){return this.err.message},t}(m);var _=function(){function e(e,t,i){var n,r;if(this.query=e,this.url=i,this._queryParams=t,this.params=new Map,this._queryParams)try{for(var s=u(this._queryParams.split(";")),o=s.next();!o.done;o=s.next()){var a=o.value;this.params.set(a.substring(0,a.indexOf(":")).trim(),a.substring(a.indexOf(":")+1).trim())}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}return e.prototype.getDomainId=function(){return this.params.get("domain")},e}();var v=function(){function e(){}return e.extractEntityName=function(e){if(e)return e.replace("#/definitions/","")},e.isArray=function(e){return e&&"array"===e},e.isObject=function(e){return"object"===e},e.hasRef=function(e){return!!e.$ref},e.isTypeArray=function(e){return e&&this.isArray(e.type)||e.schema&&e.schema.type&&this.isArray(e.schema.type)},e.getSelectMap=function(e){return e.map((function(e){return{value:e,label:e}}))},e.isType=function(e,t){return e&&e.selected&&e.selected===t},e.isEmpty=function(e){return null==e},e}(),b=function(e){this.contact=new E,this.license=new S,e&&(Object.assign(this,e),e.contact&&(this.contact=new E(e.contact)),e.license&&(this.license=new S(e.license)))};var E=function(e){e&&Object.assign(this,e)};var S=function(e){e&&Object.assign(this,e)};var O=function(){function e(e,t){this.name=e,this.schema=new N,t&&(this.schema=new N(t))}return e.prototype.isRequired=function(e){return-1!==this.schema.required.indexOf(e)},e}();var w=function(e,t){this.code=e,t&&(this.response=new D(t[e]))};var T=function(){},D=function(e){e&&(Object.assign(this,e),e.schema&&(this.schema=new N(e.schema)),e.examples&&(this.examples=new R(e.examples)),e.headers&&(this.headers=new I(e.headers)),e.items&&(this.items=new C(e.items)))};var I=function(e){e&&Object.assign(this,e)},R=function(e){e&&Object.assign(this,e)},x=function(){},A=function(){};var j=function(){},L=function(){},F=function(e){e&&(Object.assign(this,e),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)))};var P=function e(t){this.enum=[],t&&(Object.assign(this,t),t.items&&(this.items=new e(t.items)))};var C=function(e){e&&(Object.assign(this,e),this.$ref&&(this.entity=v.extractEntityName(this.$ref)),this.items&&this.items.$ref&&(this.items.entity=v.extractEntityName(this.items.$ref)))};var M=function(e){e&&Object.assign(this,e)};var N=function(){function e(e){this.required=[],this.properties={},e&&(Object.assign(this,e),e.xml&&(this.xml=new k(e.xml)),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)),e.items&&(this.items=new C(e.items)),e.$ref&&(this.entity=v.extractEntityName(this.$ref)))}return e.prototype.isPropertyTypeArray=function(e){return v.isArray(e.type)},e.prototype.getPropertyByName=function(e){if(this.properties[e])return this.properties[e].description},e}();var k=function(e){e&&Object.assign(this,e)};var H=function(){},B=function(){function e(e){this.items=new P,e&&(Object.assign(this,e),e.schema&&(this.schema=new C(e.schema)),e.items&&(this.items=new P(e.items)))}return e.prototype.isPathParam=function(){return"path"===this.in},e.prototype.isQueryParam=function(){return"query"===this.in},e.prototype.isBodyParam=function(){return"body"===this.in},e.prototype.isFormParam=function(){return"formData"===this.in},e.prototype.isTypeEnum=function(){return this.enum&&this.enum.length>0},e.prototype.isTypeFile=function(){return"file"===this.type},e.prototype.isTypeDate=function(){return"date"===this.type},e.prototype.getParameterType=function(){return this.isBodyParam()?v.isTypeArray(this)?this.schema.items.entity:this.schema.entity:v.isTypeArray(this)?this.isTypeEnum()&&this.items.enum.length>0?"Enum ["+this.items.enum.join(",")+"]":"["+this.items.type+"]":this.type},e.prototype.getEnumMap=function(){var e=this;return this.items.enum.map((function(t){return{value:t,label:t,selected:e.items&&e.items.default===t}}))},e.prototype.clone=function(){var t=new e;return t.description=this.description,t.name=this.name,t.in=this.in,t.required=this.required,t.value=this.value,t.schema=this.schema,t.enum=this.enum,t.items=this.items,t.type=this.type,t},e}();var q="application/json",U="application/xml",X=function(){function e(e,t,i){var n=this;this.responses=[],this.parameters=[],this.produces=[],this.consumes=[],this.path=e,this.produce=q,this.consume=q,t&&(this.name=t.toUpperCase()),i&&(Object.assign(this,i),this.slug=btoa(this.name+this.path+this.operationId),i.externalDocs&&(this.externalDocs=new M(i.externalDocs)),i.responses&&(this.responses=[],Object.keys(i.responses).forEach((function(e){n.responses.push(new w(e,i.responses))}))),i.parameters&&(this.parameters=[],i.parameters.forEach((function(e){n.parameters.push(new B(e))}))),i.produces&&!v.isEmpty(this.produces)&&(this.produce=this.produces[0]),i.consumes&&!v.isEmpty(this.consumes)&&(this.consume=this.consumes[0]))}return e.prototype.getResponseByCode=function(e){var t=this.responses.find((function(t){return t.code===e}));if(t)return t.response},e.prototype.getRequestUrl=function(e){void 0===e&&(e=!1);var t=e?"":this.path;return this.parameters.length>0&&this.parameters.forEach((function(e){e.value&&(e.isPathParam()?t=t.replace(new RegExp("{"+e.name+"}"),e.value.trim()):e.isQueryParam()&&(t+=-1===t.indexOf("?")?"?"+e.name+"="+e.value.trim():"&"+e.name+"="+e.value.trim()))})),t},e.prototype.isPatchMethod=function(){return"PATCH"===this.name},e.prototype.isPostMethod=function(){return"POST"===this.name},e.prototype.isPutMethod=function(){return"PUT"===this.name},e.prototype.isWriteMethod=function(){return this.isPatchMethod()||this.isPostMethod()||this.isPutMethod()},e.prototype.isGetMethod=function(){return"GET"===this.name},e.prototype.isDeleteMethod=function(){return"DELETE"===this.name},e.prototype.isProduceJson=function(){return this.produce.startsWith(q)},e.prototype.isProduceXml=function(){return this.produce.startsWith(U)},e.prototype.isConsumeJson=function(){return this.consume===q},e.prototype.isConsumeXml=function(){return this.consume===U},e.prototype.isConsumeFormUrlEncoded=function(){return"app/x-www-form-urlencoded"===this.consume},e.prototype.isConsumeMultipartFormData=function(){return"multipart/form-data"===this.consume},e.prototype.getMapProduces=function(){return v.getSelectMap(this.produces)},e.prototype.getMapConsumes=function(){return v.getSelectMap(this.consumes)},e.prototype.clone=function(){var t=new e;return t.consume=this.consume,t.consumes=this.consumes,t.description=this.description,t.externalDocs=this.externalDocs,t.name=this.name,t.operationId=this.operationId,this.parameters.forEach((function(e){return t.parameters.push(e.clone())})),t.path=this.path,t.produce=this.produce,t.produces=this.produces,t.responses=this.responses,t.schemes=this.schemes,t.tags=this.tags,t},e}();var V=function(e,t){var i=this;this.path=e,this.operations=[],t&&Object.keys(t).forEach((function(n){i.operations.push(new X(e,n,t[n]))}))};var G=function(e,t){this.name=e,this.path=new V,t&&(this.path=new V(e,t))};var z=function(){function e(e){var t=this;this.info=new b,this.paths=[],this.produces=[],this.consumes=[],this.schemes=[],this.definitions=[],this.parameters=new H,this.responses=new T,this.securityDefinitions=new x,this.externalDocs=new M,this.security=[],this.tags=[],e&&(Object.assign(this,e),this.baseUrl="http://"+this.host,this.basePath&&(this.baseUrl+=this.basePath),e.info&&(this.info=new b(e.info)),e.paths&&(this.paths=[],Object.keys(e.paths).forEach((function(i){t.paths.push(new G(i,e.paths[i]))}))),e.definitions&&(this.definitions=[],Object.keys(e.definitions).forEach((function(i){t.definitions.push(new O(i,e.definitions[i]))}))),e.tags&&(this.tags=[],e.tags.forEach((function(e){t.tags.push(new F(e))}))),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)))}return e.prototype.getDefinitionByEntity=function(e){return this.definitions.find((function(t){return t.name===e}))},e.prototype.hasDefinition=function(e,t){if(void 0===t&&(t=!1),t&&(e=this.getEntityName(e)),!e)return!1;var i=this.getDefinitionByEntity(e);return i&&v.isObject(i.schema.type)},e.prototype.getEntityName=function(e){return v.extractEntityName(e)},e.prototype.isDtoType=function(e){return this.isTypeArray(e)?e&&e.schema&&e.schema.items&&v.hasRef(e.schema.items)&&this.hasDefinition(e.schema.items.entity):e&&e.schema&&v.hasRef(e.schema)&&this.hasDefinition(e.schema.entity)},e.prototype.getDtoType=function(e){if(e&&e.schema){if(e.schema.entity)return e.schema.entity;if(e.schema.items&&e.schema.items.entity)return e.schema.items.entity}if(e&&e.items)return e.items.type},e.prototype.isTypeArray=function(e){return v.isTypeArray(e)},e.prototype.getBodyDescription=function(e,t){var i=this,n=this.getDefinitionByEntity(e);console.log(n,e);var r={};if(n&&(Object.keys(n.schema.properties).forEach((function(e){var s,o=n.schema.properties[e];v.isArray(o.type)||v.isObject(o.type)?v.isArray(o.type)&&("string"===o.items.type?s=["string"]:o.items.$ref&&(s=[i.getBodyDescription(i.getEntityName(o.items.$ref),t)],t&&o.xml.wrapped&&(e=o.xml.name))):"integer"===o.type?s=0:o.enum&&!v.isEmpty(o.enum)?s=o.enum[0]:"string"===o.type?s="date-time"===o.format?(new Date).toISOString():o.example?o.example:"string":"boolean"===o.type?s=!o.default||o.default:o.$ref&&(s=i.getBodyDescription(i.getEntityName(o.$ref),t),t&&(s=s[e=Object.keys(s)[0]])),r[e]=s})),t&&n.schema.xml)){var s={};return s[n.schema.xml.name]=r,s}return r},e.prototype.getOperationsByProperty=function(e,t){var i=[];return e&&this.paths.forEach((function(n){var r=n.path.operations.filter((function(i){return-1!==e.indexOf(i[t])}));v.isEmpty(r)||(i=i.concat(r))})),i},e}();var J=function(){function e(e){this.date=new Date,this.operation=e||new X}return e.prototype.getRequestTime=function(){if(this.date&&this.endDate)return this.endDate.getTime()-this.date.getTime()},e.prototype.isResponseXML=function(){return this.headers.get("Content-Type").startsWith("application/xml")},e.prototype.isResponseJSON=function(){return this.headers.get("Content-Type").startsWith("application/json")},e}();var Y=function(e){this.contact=new $,this.license=new Q,e&&(Object.assign(this,e),e.contact&&(this.contact=new $(e.contact)),e.license&&(this.license=new Q(e.license)))};var $=function(e){e&&Object.assign(this,e)};var Q=function(e){e&&Object.assign(this,e)};var W=function(e){e&&Object.assign(this,e)};var Z=function(e){e&&Object.assign(this,e)};var K=function(e){e&&Object.assign(this,e)},ee=function(e){e&&(Object.assign(this,e),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)))};var te=function(e){e&&Object.assign(this,e)};var ie=function(e,t){this.code=e,t&&(this.response=new ne(t[e]))};var ne=function(e){e&&(Object.assign(this,e),e.schema&&(this.schema=new ce(e.schema)),e.examples&&(this.examples=new ae(e.examples)),e.headers&&(this.headers=new se(e.headers)),e.items&&(this.items=new re(e.items)))};var re=function(e){e&&(Object.assign(this,e),this.$ref&&(this.entity=this.$ref.replace("#/definitions/","")),this.items&&this.items.$ref&&(this.items.entity=this.items.$ref.replace("#/definitions/","")))};var se=function(e){e&&Object.assign(this,e)},oe=function e(t){this.enum=[],t&&(Object.assign(this,t),t.items&&(this.items=new e(t.items)))};var ae=function(e){e&&Object.assign(this,e)},ce=function(e){this.required=[],this.properties={},e&&(Object.assign(this,e),e.xml&&(this.xml=new ue(e.xml)),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)),e.items&&(this.items=new re(e.items)),e.$ref&&(this.entity=this.$ref.replace("#/definitions/","")))};var ue=function(e){e&&Object.assign(this,e)};var pe=function(){function e(e){this.items=new oe,e&&(Object.assign(this,e),e.schema&&(this.schema=new re(e.schema)),e.items&&(this.items=new oe(e.items)))}return e.prototype.isPathParam=function(){return"path"===this.in},e.prototype.isQueryParam=function(){return"query"===this.in},e.prototype.isTypeEnum=function(){return this.enum&&this.enum.length>0},e.prototype.clone=function(){var t=new e;return t.description=this.description,t.name=this.name,t.in=this.in,t.required=this.required,t.value=this.value,t.schema=this.schema,t.enum=this.enum,t.items=this.items,t.type=this.type,t},e}();var he="application/json",le="application/xml",fe=function(){function e(e,t,i){var n=this;this.responses=[],this.parameters=[],this.produces=[],this.consumes=[],this.path=e,t&&(this.name=t.toUpperCase()),i&&(Object.assign(this,i),this.slug=btoa(this.name+this.path+this.operationId),i.externalDocs&&(this.externalDocs=new te(i.externalDocs)),i.responses&&(this.responses=[],Object.keys(i.responses).forEach((function(e){n.responses.push(new ie(e,i.responses))}))),i.parameters&&(this.parameters=[],i.parameters.forEach((function(e){n.parameters.push(new pe(e))}))))}return e.prototype.getRequestUrl=function(e){void 0===e&&(e=!1);var t=e?"":this.path;return this.parameters.length>0&&this.parameters.forEach((function(e){e.value&&(e.isPathParam()?t=t.replace(new RegExp("{"+e.name+"}"),e.value.trim()):e.isQueryParam()&&(t+=-1===t.indexOf("?")?"?"+e.name+"="+e.value.trim():"&"+e.name+"="+e.value.trim()))})),t},e.prototype.isPatchMethod=function(){return"PATCH"===this.name},e.prototype.isPostMethod=function(){return"POST"===this.name},e.prototype.isPutMethod=function(){return"PUT"===this.name},e.prototype.isWriteMethod=function(){return this.isPatchMethod()||this.isPostMethod()||this.isPutMethod()},e.prototype.isGetMethod=function(){return"GET"===this.name},e.prototype.isDeleteMethod=function(){return"DELETE"===this.name},e.prototype.isProduceJson=function(){return this.produce.startsWith(he)},e.prototype.isProduceXml=function(){return this.produce.startsWith(le)},e.prototype.isConsumeJson=function(){return this.consume===he},e.prototype.isConsumeXml=function(){return this.consume===le},e.prototype.isConsumeFormUrlEncoded=function(){return"app/x-www-form-urlencoded"===this.consume},e.prototype.isConsumeMultipartFormData=function(){return"multipart/form-data"===this.consume},e.prototype.clone=function(){var t=new e;return t.consume=this.consume,t.consumes=this.consumes,t.description=this.description,t.externalDocs=this.externalDocs,t.name=this.name,t.operationId=this.operationId,this.parameters.forEach((function(e){return t.parameters.push(e.clone())})),t.path=this.path,t.produce=this.produce,t.produces=this.produces,t.responses=this.responses,t.schemes=this.schemes,t.tags=this.tags,t},e}();var de=function(e,t){var i=this;this.path=e,this.operations=[],t&&Object.keys(t).forEach((function(n){i.operations.push(new fe(e,n,t[n]))}))};var me=function(e,t){this.name=e,this.path=new de,t&&(this.path=new de(e,t))};var ye=function(e){var t=this;this.info=new Y,this.servers=[],this.paths=[],this.components=new Z,this.security=[],this.tags=[],this.externalDocs=new te,e&&(Object.assign(this,e),e.info&&(this.info=new Y(e.info)),e.servers&&(this.servers=[],e.servers.forEach((function(e){t.servers.push(new W(e))})),this.servers.length>0&&(this.baseUrl=this.servers[0].url)),e.paths&&(this.paths=[],Object.keys(e.paths).forEach((function(i){t.paths.push(new me(i,e.paths[i]))}))),e.components&&(this.components=new Z(e.components)),e.security&&(this.security=[],e.security.forEach((function(e){return t.security.push(new K(e))}))),e.tags&&(this.tags=[],e.tags.forEach((function(e){t.tags.push(new ee(e))}))),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)))};var ge=function(){function e(e){this.date=new Date,this.operation=e||new fe}return e.prototype.getRequestTime=function(){if(this.date&&this.endDate)return this.endDate.getTime()-this.date.getTime()},e.prototype.isResponseXML=function(){return this.headers.get("Content-Type").startsWith("application/xml")},e.prototype.isResponseJSON=function(){return this.headers.get("Content-Type").startsWith("application/json")},e}();var _e=function(){function e(e,t,i,r){var s=this;this.http=e,this._configService=t,this.rsendpoint_target=i,this.cfg=r,this.GLOBAL_TRACK_ID="global_tid",this.callTrackers=new Map,this.subscriptions=[];var o=this._configService.getCategories();this.subscriptions.push(o.pipe(n.first()).subscribe((function(e){s.categories=e,s.subscriptions.push(s._configService.getLeaves().pipe(n.first()).subscribe((function(e){s.leaves=e})))})))}return e.prototype.getGlobalCallsProgressPercentage=function(){var e=this.getCallsTracker(this.GLOBAL_TRACK_ID);return 0===e.remaining?100:100*(e.overall-e.remaining)/e.overall},e.prototype.getNoMap=function(e,i,r,s){var o=this.rsendpoint_target.restClientName;i&&(o+="; requestFrom="+i),r&&(o+="; autocomplete="+r);var a={headers:(new t.HttpHeaders).set("Accept","application/json").set("X-EBI-StickySession","true").set("X-EBISearch-client",o).set("Content-type","application/json"),timeout:6e4,observe:"response",responseType:"json"};return this.http.request("GET",e,a).pipe(n.catchError(this._handleError))},e.prototype.getCallsTracker=function(e){var t=e||this.GLOBAL_TRACK_ID,i=this.callTrackers.get(t);return i||(i=new ve(t),this.callTrackers.set(t,i)),i},e.prototype.get=function(e,t,i){return this.getNoMap(e,t,i).pipe(n.map((function(e){return e.body})))},e.prototype._handleError=function(e){throw new l(e.error.diagnostics&&e.error.diagnostics.message||"SearchService - Web service error",e.status,e.url)},e.prototype.setDomainSpecificFields=function(e){var t,i,n=this;if(e.getDB()&&"allebi"!==e.getDB()&&this.cfg.REST_FIELDS[e.getDBJSONFormat()])e.fields=this.cfg.REST_FIELDS[e.getDBJSONFormat()],this.cfg.DEFAULT_REST_ENABLE_HLFIELDS&&(this.cfg.REST_HLFIELDS[e.getDBJSONFormat()]?e.hlfields=this.cfg.REST_HLFIELDS[e.getDBJSONFormat()]:e.hlfields=e.fields);else if(this.leaves){var r=[],s=[];this.cfg.DEFAULT_REST_FIELDS.split(",").forEach((function(e){return s.push(e)}));var o=[];this.cfg.DEFAULT_REST_ENABLE_HLFIELDS&&this.cfg.DEFAULT_REST_HLFIELDS.split(",").forEach((function(e){return o.push(e)})),this.leaves.forEach((function(t){t.parentId===e.getDB()&&r.push(t.id)})),r&&r.forEach((function(t){n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)]&&n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return s.push(e)})),n.cfg.REST_HLFIELDS[e.domainIdToJSONFormat(t)]?n.cfg.REST_HLFIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return o.push(e)})):n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)]&&n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return o.push(e)}))})),o&&(e.hlfields=this.uniqueStringArray(o).join(",")),s&&(e.fields=this.uniqueStringArray(s).join(","))}if(!e.sort){var a=this.cfg.SEARCH_DOMAIN_SORTING[e.getDB()];if(a)try{for(var c=u(a),p=c.next();!p.done;p=c.next()){var h=p.value;h.default&&(e.sort=h.browser_value)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}}},e.prototype.uniqueStringArray=function(e){return e.sort().filter((function(e,t,i){return!t||e!==i[t-1]}))},e.prototype.getSearchResults=function(e){var t=this;if(e.fieldurl=!0,e.viewurl=!0,e.fields=this.cfg.DEFAULT_REST_FIELDS,e.hlfields=this.cfg.DEFAULT_REST_ENABLE_HLFIELDS?this.cfg.DEFAULT_REST_HLFIELDS:"",e.query=e.getUserQuery(),e.t=void 0,e.addEntryAttr("score"),e.validateFields(),this.setDomainSpecificFields(e),!e.facetfields||0===e.facetfields.length){var i=this.cfg.VISIBLE_FACETS[e.getDB().replace("-","_")];i&&(e.facetfields=i)}var r=e.toQueryString();return this.getCallsTracker().increase(),this.getNoMap(this.rsendpoint_target.url+r,e.requestFrom,e.autocomplete).pipe(n.map((function(e){return t.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getSearchResultsAndResponseInfo=function(e){var t=e.body;return t.responseInfo=new _(e.headers.get(this.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_QUERYSTRING),e.headers.get(this.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_QUERY_PARAMETERS),e.url),t},e.prototype.getStandardSearchFacets=function(e){return e.facetcount=11,this.getSearchFacets(e)},e.prototype.getMoreSearchFacets=function(e){return e.facetcount=1e3,this.getSearchFacets(e)},e.prototype.getMoreReferenceFacets=function(e,t,i,n){var r=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?size=0&facetcount=1000&facetfields="+n;return this.get(r)},e.prototype.getSearchFacets=function(e){var t=this;if(delete e.fields,e.query||(e.query=e.t),!e.facetfields||0===e.facetfields.length){var i=this.cfg.VISIBLE_FACETS[e.getDB().replace("-","_")];i&&(e.facetfields=i)}var r=e.toQueryString();return this.getCallsTracker().increase(),this.getNoMap(this.rsendpoint_target.url+r).pipe(n.map((function(e){return t.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getReferencedEntries=function(e,t,i,r,s){var o=this,a=this._getStart(r),c=this._getRESTfields(i),u=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?fieldurl=true&viewurl=true&fields="+c+"&size=15&start="+a;return s&&s.length>0&&(u+="&facets="+s),this.getCallsTracker().increase(),this.getNoMap(u).pipe(n.map((function(e){return o.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){o.getCallsTracker().decrease()})))},e.prototype.getReferenceFacet=function(e,t,i,r){var s=this,o=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?facetcount=11";r&&r.length>0&&(o+="&facets="+r);var a=this.cfg.VISIBLE_FACETS[i.replace("-","_")];return a&&(o+="&facetfields="+a),this.getCallsTracker().increase(),this.get(o).pipe(n.finalize((function(){s.getCallsTracker().decrease()})))},e.prototype._getRESTfields=function(e){var t=this.cfg.REST_FIELDS[e];return void 0===t?this.cfg.DEFAULT_REST_FIELDS:t},e.prototype._getStart=function(e){return e&&e>0?15*(e-1):0},e.prototype.getReferencedDomains=function(e,t,i){return this.get(this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref",i)},e.prototype.getFieldLink=function(e,t){return this.get(this.rsendpoint_target.url+"/"+e+"/entry/"+t+"?fieldurl=true")},e.prototype.getDomainsTree=function(e){var t=this,i=this.rsendpoint_target.url+"/allebi?query="+encodeURIComponent(e.getUserQuery())+"&format=JSON&requestFrom="+e.requestFrom;return this.getCallsTracker().increase(),this.get(i).pipe(n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getSuggestions=function(e,t){var i=this,r="/"+e+"/autocomplete?term="+encodeURIComponent(t)+"&formatted=true";return this.getCallsTracker("suggestions_tid").increase(),this.get(this.rsendpoint_target.url+r).pipe(n.finalize((function(){i.getCallsTracker("suggestions_tid").decrease()})))},e}();_e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],_e.ctorParameters=function(){return[{type:t.HttpClient},{type:f},{type:o},{type:s}]},_e.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new _e(i.ɵɵinject(t.HttpClient),i.ɵɵinject(f),i.ɵɵinject(o),i.ɵɵinject(s))},token:_e,providedIn:"root"});var ve=function(){function e(e){this.id=e,this.overall=0,this.remaining=0}return e.prototype.increase=function(){this.overall++,this.remaining++},e.prototype.decrease=function(){this.remaining--,0===this.remaining&&(this.overall=0)},e}();var be=function(){};be.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[t.HttpClientModule],providers:[s,f,d,o,_e],exports:[]}]}];var Ee=function(){function e(e){this.cfg=e,this._routeHiddenParams=["domainDefaultConfiguredFields","facetcount","facetfields","fields","fieldurl","format","hlfields","paramsSubscription","routeParams","size","start","viewurl","cfg"],this._queryStringHiddenParams=["dbJSONFormat","domainDefaultConfiguredFields","paramsSubscription","routeParams","cfg"],this.domainDefaultConfiguredFields=["sort","fields","hlfields"]}return e.prototype.clone=function(){return Object.assign(new e(this.cfg),this)},e.prototype.fromRouteParams=function(e){this.clearDomainDefaultFields(),this._db=e.db,e.query&&(this.query=e.query),this.t=e.t,this.start=0,this.size=this.cfg.DEFAULT_PAGE_SIZE;var t=e.facets;this.facets=void 0!==t?t:"";var i=parseInt(e.page,10);isNaN(i)||this.setPage(i),this.sort=e.sort,this.requestFrom=e.requestFrom,this.autocomplete=e.autocomplete,e.format||(this.format="JSON")},e.prototype.validateFields=function(){if(!this._db)throw new h('URL parameter "db" need to be set');if(!this.query||this.query.length<this.cfg.SEARCH_QUERY_MIN_LENGTH)throw new h("URL parameter 'query' need to be set and having a length greater than "+this.cfg.SEARCH_QUERY_MIN_LENGTH)},e.prototype.clearDomainDefaultFields=function(){var e,t;try{for(var i=u(this.domainDefaultConfiguredFields),n=i.next();!n.done;n=i.next()){delete this[n.value]}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.checkStringHasValue=function(e,t){if(null==t||void 0===t||0===t.length)throw new h('Parameter: "+name+" not valorized')},e.prototype.checkMultiParamHasValue=function(e,t,i){var n=new RegExp(this.keyValueToString(t,i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))+"(,|$)","g");return e&&null!=e.match(n)},e.prototype.keyValueToString=function(e,t){return e+":"+t},e.prototype.addPairInList=function(e,t,i){return this.checkStringHasValue("EntryId",t),this.checkStringHasValue("EntryValue",i),this.addEntryInList(e,this.keyValueToString(t,i))},e.prototype.addEntryInList=function(e,t){return e||(e=""),-1===e.indexOf(t)?e+=0===e.length?t:","+t:-1===e.split(",").indexOf(t)&&(e+=","+t),e},e.prototype.removePairInList=function(e,t,i){return this.checkStringHasValue("EntryId",t),this.checkStringHasValue("EntryValue",i),this.removeEntryInList(e,this.keyValueToString(t,i))},e.prototype.removeEntryInList=function(e,t){try{this.checkStringHasValue("ListField",e),e=(e=(e=(e=e.replace(t,"")).replace(/^,/,"")).replace(",,",",")).replace(/,$/,"")}catch(t){console.warn("Asked to remove 'pair' from empty list field: SearchRequest."+e)}return e},e.prototype.clearPairsInList=function(e,t){try{this.checkStringHasValue("ListField",e),this.checkStringHasValue("EntryId",t);var i=new RegExp(t+":.*?,|"+t+":.*$","g");e=(e=(e=(e=e.replace(i,"")).replace(/^,/g,"")).replace(",,",",")).replace(/,$/,"")}catch(t){console.warn("Asked to remove all values from empty list field: SearchRequest."+e)}return e},e.prototype.getValuesInListByKey=function(e,t){try{this.checkStringHasValue("ListField",e),this.checkStringHasValue("EntryId",t);for(var i=new RegExp(t+":([\\w\\.\\-\\d]*)","g"),n=[],r=i.exec(e);r;)n.push(r[1]),r=i.exec(e);return n}catch(t){console.warn("Asked values from empty list field: SearchRequest."+e)}return[]},e.prototype.getFacetsSelectedIds=function(){var e,t;if(!this.facets)return[];var i=[],n=this.facets.split(",");try{for(var r=u(n),s=r.next();!s.done;s=r.next()){var o=s.value,a=o.substring(0,o.indexOf(":"));-1===i.indexOf(a)&&i.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i},e.prototype.getFacetSelectedValues=function(e){return this.getValuesInListByKey(this.facets,e)},e.prototype.addFacet=function(e,t){this.facets=this.addPairInList(this.facets,e,t),this.setPage(1)},e.prototype.removeFacet=function(e,t){this.facets=this.removePairInList(this.facets,e,t),this.setPage(1)},e.prototype.clearFacetFields=function(){this.facetfields=""},e.prototype.addFacetField=function(e){this.facetfields=this.addEntryInList(this.facetfields,e)},e.prototype.addEntryAttr=function(e){this.entryattrs=this.addEntryInList(this.entryattrs,e)},e.prototype.removeEntryAttr=function(e){this.entryattrs=this.removeEntryInList(this.entryattrs,e)},e.prototype.setDB=function(e){this._db=e,this.setPage(1)},e.prototype.getDB=function(){return this._db},e.prototype.getDBJSONFormat=function(){return this.dbJSONFormat||(this.dbJSONFormat=this._db.replace("/-/g","_")),this.dbJSONFormat},e.prototype.domainIdToJSONFormat=function(e){return e.replace("-","_")},e.prototype.clearFacetValues=function(e){this.facets=this.clearPairsInList(this.facets,e)},e.prototype.hasFacetValue=function(e,t){return this.checkMultiParamHasValue(this.facets,e,t)},e.prototype.hasFacet=function(e){return this.facets&&-1!==this.facets.indexOf(e)},e.prototype.toNavigationParams=function(){var e="{";for(var t in e+=' "db": "'+this.getDB()+'"',this)if(this.hasOwnProperty(t)&&!t.startsWith("_")&&-1===this._routeHiddenParams.indexOf(t)){var i=this[t];(i||"number"==typeof i)&&(e.length>1&&(e+=","),e+='"'+t+'": '+JSON.stringify(""+this[t]))}return this.start&&this.size&&(e+=', "page": '+this.getPage()),e+="}",JSON.parse(e)},e.prototype.toQueryString=function(){"allebi"===this._db&&(this.facets=void 0);var e="/"+this.getDB()+"/",t="?";for(var i in this)if(this.hasOwnProperty(i)&&"db"!==i&&!i.startsWith("_")&&-1===this._queryStringHiddenParams.indexOf(i)){var n=this[i];if(null!=n&&void 0!==n&&n){var r=this.browserToRESTFieldConversion(this._db,i,n);e+=t+i+"="+encodeURIComponent(r),t="&"}}return e},e.prototype.browserToRESTFieldConversion=function(e,t,i){var n,r;switch(t){case"sort":var s=this.cfg.SEARCH_DOMAIN_SORTING[e],o="";if(s)try{for(var a=u(s),c=a.next();!c.done;c=a.next()){var p=c.value;if(p.browser_value===this.sort){o=p.rest_value;break}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}else console.warn("Using sort with no predefined domain configuration: domain ["+e+"], sort field ["+t+"], sort value ["+i+"]");return o}return i},e.prototype.getUserQuery=function(){return void 0!==this.query&&null!=this.query?this.query:this.t},e.prototype.setPage=function(e){if(!e)throw new h("Page need to be a positive integer");this.size||(this.size=this.cfg.DEFAULT_PAGE_SIZE),this.start=this.size*(e-1)},e.prototype.getPage=function(){return(this.start+this.size)/this.size},e.prototype.equals=function(e){return e&&this.toQueryString()===e.toQueryString()},e}();var Se=function(){function e(){}return e.prototype.sort=function(e){return e},e}();Se.decorators=[{type:i.Injectable}];var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.sort=function(e){return e.sort((function(e,t){var i=0,n=0;return e.entries&&e.entries.length>0&&(i=e.entries[0].score),t.entries&&t.entries.length>0&&(n=t.entries[0].score),n-i})),e},t}(Se);Oe.decorators=[{type:i.Injectable}];var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.sort=function(e){return e.sort((function(e,t){return e.responseInfo.getDomainId().localeCompare(t.responseInfo.getDomainId())})),e},t}(Se);we.decorators=[{type:i.Injectable}];var Te=function(e){function t(t,i){var n=e.call(this)||this;return n.errMsgService=t,n.ngZone=i,n}return c(t,e),t.prototype.handleError=function(t){var i=this,n=t;t.originalException&&(n=t.originalException),n instanceof p?this.ngZone.run((function(){i.errMsgService.addError(n)})):e.prototype.handleError.call(this,t)},t}(i.ErrorHandler);Te.decorators=[{type:i.Injectable}],Te.ctorParameters=function(){return[{type:d},{type:i.NgZone}]},e.AlphaCatResultsSorter=we,e.ApiDefinition=z,e.ApiModelUtils=v,e.ApiResult=J,e.ConfigService=f,e.Configuration=s,e.ContactObject=E,e.DefinitionsObject=O,e.EBException=p,e.EBExceptionHandler=Te,e.EbinocleNgRSClientModule=be,e.ErrorEvent=g,e.ExampleObject=R,e.ExternalDocumentationObject=M,e.HeadersObject=I,e.HttpException=l,e.InfoObject=b,e.ItemsObject=P,e.LicenseObject=S,e.NotificationMessage=y,e.NotificationMessageService=d,e.OpenApiDefinition=ye,e.OpenApiOperationObject=fe,e.OpenApiParameterObject=pe,e.OpenApiPathsObject=me,e.OpenApiResult=ge,e.OperationObject=X,e.ParameterObject=B,e.ParametersDefinitionsObject=H,e.PathItemObject=V,e.PathsObject=G,e.RSEndpointTarget=o,e.ReferenceObject=C,e.ResponseInfo=_,e.ResponseObject=D,e.ResponsesDefinitionsObject=T,e.ResponsesObject=w,e.SchemaObject=N,e.ScopesObject=j,e.ScoreCatResultsSorter=Oe,e.SearchRequest=Ee,e.SearchResultsSorter=Se,e.SearchService=_e,e.SecurityDefinitionsObject=x,e.SecurityRequirementObject=L,e.SecuritySchemeObject=A,e.TagObject=F,e.ValidationException=h,e.XMLObject=k,e.ɵa=s,e.ɵb=f,e.ɵc=d,e.ɵd=_e,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function c(e,t){function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var p=function(e){function t(i,n){var r=e.call(this,i)||this;return r.blocking=!0,Object.setPrototypeOf(r,t.prototype),r.message=i,void 0!==n&&(r.blocking=n),r}return c(t,e),t.prototype.toString=function(){return"EBException: "+this.message},t}(Error);var h=function(e){function t(i){var n=e.call(this,i)||this;return Object.setPrototypeOf(n,t.prototype),n}return c(t,e),t}(p),l=function(e){function t(i,n,r,s){var o=e.call(this,i,s)||this;return Object.setPrototypeOf(o,t.prototype),o.status=n,o.url=r,o}return c(t,e),t}(p);var f=function(){function e(e,t,i){var s=this;this._http=e,this.endpointTarget=t,this.cfg=i,this.timezone_map={BST:"GMT+0100"},this.root=new r.Observable((function(e){return s._rootObserver=e})).pipe(n.share()),this.categories=new r.Observable((function(e){return s._categoryObserver=e})).pipe(n.share()),this.leaves=new r.Observable((function(e){return s._leafObserver=e})).pipe(n.share()),this.domains=new r.Observable((function(e){return s._domainsObserver=e})).pipe(n.share())}return e.prototype.load=function(){var e=this,t=this,i=this.endpointTarget.url;this.root.subscribe(),this.categories.subscribe(),this.leaves.subscribe(),this.domains.subscribe(),this.get(i).subscribe((function(i){var n=i;t._root={id:n.id,name:n.name},e._rootObserver.next(t._root);var r=[],s=[];n.subdomains.forEach((function(e){r.push({id:e.id,name:e.name}),t._findLeaves(e.id,e.name,e,s)}));var o=r.concat(s);o.push(t._root),t._categories=r,t._leaves=s,t._domains=o,t._categoryObserver.next(t._categories),t._leafObserver.next(t._leaves),t._domainsObserver.next(t._domains)}),(function(e){throw console.log("Could not get domain information."+e),new l("ConfigService - Web Service Error",500)}))},e.prototype.getDomain=function(e){var t=this;return new r.Observable((function(i){t._domains?(i.next(t._domains.find((function(t){return t.id===e}))),i.complete()):t.domains.subscribe((function(t){i.next(t.find((function(t){return t.id===e}))),i.complete()}))}))},e.prototype.getLeaves=function(){var e=this;return new r.Observable((function(t){e._leaves?(t.next(e._leaves),t.complete()):e.leaves.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype.getCategories=function(){var e=this;return new r.Observable((function(t){e._categories?(t.next(e._categories),t.complete()):e.categories.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype.getRoot=function(){var e=this;return new r.Observable((function(t){e._root?(t.next(e._root),t.complete()):e.root.subscribe((function(e){t.next(e),t.complete()}))}))},e.prototype._findLeaves=function(e,t,i,n){var r=i.subdomains;if(void 0===r){var s=this.getIndexInfo(i),o=this.getFieldInfos(i),a={id:i.id,name:i.name,description:i.description,indexInfo:s,fields:o,parentId:e,parentName:t};n.push(a)}for(var c in r)null!==r[c]&&"object"==typeof r[c]&&this._findLeaves(e,t,r[c],n)},e.prototype.getFieldInfos=function(e){var t,i=[];return e.fieldInfos.forEach((function(e){t={id:e.id,name:e.name,description:e.description},e.options.forEach((function(e){switch(e.name){case"alias":t.alias=e.value;break;case"searchable":t.searchable="true"===e.value.toLowerCase();break;case"retrievable":t.retrievable="true"===e.value.toLowerCase();break;case"sortable":t.sortable="true"===e.value.toLowerCase();break;case"facet":t.facet="true"===e.value.toLowerCase();break;case"type":t.type=e.value;break;case"topterms":t.toperms="true"===e.value.toLowerCase();break;case"referenced domain":t.referencedDomain=e.value;break;case"referenced field":t.referencedField=e.value}})),i.push(t)})),i},e.prototype.getIndexInfo=function(e){var t,i,n,r,s,o,a,c,u=this,p=e.indexInfos,h=!1,l=!1;return p.forEach((function(e){switch(e.name){case"Number of entries":t=parseInt(e.value,10);break;case"Last modification date":i=u.createDate(e.value);break;case"Update date":n=u.createDate(e.value);break;case"Release date":r=u.createDate(e.value);break;case"URL":s=e.value;break;case"Index size":o=e.value;break;case"Index size (B)":a=e.value;break;case"Hidden domain":h="true"===e.value;break;case"Dictionary Availability":l="true"===e.value;break;case"Release version":c=e.value}})),{noOfEntries:t,indexedOn:i,updatedOn:n,releasedOn:r,url:s,indexSize:o,indexSizeInBytes:a,hidden:h,dictionary:l,releaseVersion:c}},e.prototype.re_order=function(e){var t=this;return e.replace(/^(\w+) (\w+) (\d\d) (\d\d:\d\d:\d\d) (\w+) (\d\d\d\d)$/,(function(e,i,n,r,s,o,a){return i+" "+n+" "+r+" "+a+" "+s+" "+(t.timezone_map[o]||o)}))},e.prototype.createDate=function(e){return new Date(this.re_order(e))},e.prototype.update=function(){this._rootObserver.next(this._root),this._categoryObserver.next(this._categories),this._leafObserver.next(this._leaves),this._domainsObserver.next(this._domains)},e.prototype.get=function(e){var i=this,r={headers:new t.HttpHeaders({Accept:"application/json","X-EBI-StickySession":"true","X-EBISearch-client":"ebinocle-webjs"}),observe:"response",responseType:"json"};return this._http.request("GET",e,r).pipe(n.map((function(e){return!i.backend_version&&e.headers&&(i.backend_version=e.headers.get(i.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_VERSION)),e.body.domains[0]})))},e}();f.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:t.HttpClient},{type:o},{type:s}]},f.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new f(i.ɵɵinject(t.HttpClient),i.ɵɵinject(o),i.ɵɵinject(s))},token:f,providedIn:"root"});var d=function(){function e(){this.errorMessageEmitter=new r.ReplaySubject,this.errorMessages=this.errorMessageEmitter.asObservable()}return e.prototype.addError=function(e){var t=new g(new Date);t.err=e,t.stackTrace=e,this.errorMessageEmitter.next(t)},e.prototype.putMessageEvent=function(e){e&&this.errorMessageEmitter.next(e)},e.prototype.registerShownErrorEvent=function(e){e?this.lastShownEvtDate=e.errDate:console.log("ERROR - NotificationMessageService.registerShownErrorEvent - passed ErrorEvent is not valorized")},e.prototype.isAlreadyShownErrorEvent=function(e){return e&&this.lastShownEvtDate&&e.errDate<=this.lastShownEvtDate},e}();d.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],d.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new d},token:d,providedIn:"root"});var m=function(){function e(e){this.date=e}return e.prototype.setAknowledged=function(e){this.aknowledged=e},e.prototype.isAknowledged=function(){return this.aknowledged},e.prototype.getDate=function(){return this.date},e}();var y=function(e){function t(t,i,n){var r=e.call(this,t)||this;return r.title=i,r.message=n,r}return c(t,e),t.prototype.getTitle=function(){return this.title},t.prototype.getMessage=function(){return this.message},t}(m);var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),Object.defineProperty(t.prototype,"errDate",{get:function(){return this.getDate()},enumerable:!1,configurable:!0}),t.prototype.getTitle=function(){return"Something has gone wrong with our web server"},t.prototype.getMessage=function(){return this.err.message},t}(m);var _=function(){function e(e,t,i){var n,r;if(this.query=e,this.url=i,this._queryParams=t,this.params=new Map,this._queryParams)try{for(var s=u(this._queryParams.split(";")),o=s.next();!o.done;o=s.next()){var a=o.value;this.params.set(a.substring(0,a.indexOf(":")).trim(),a.substring(a.indexOf(":")+1).trim())}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}return e.prototype.getDomainId=function(){return this.params.get("domain")},e}();var v=function(){function e(){}return e.extractEntityName=function(e){if(e)return e.replace("#/definitions/","")},e.isArray=function(e){return e&&"array"===e},e.isObject=function(e){return"object"===e},e.hasRef=function(e){return!!e.$ref},e.isTypeArray=function(e){return e&&this.isArray(e.type)||e.schema&&e.schema.type&&this.isArray(e.schema.type)},e.getSelectMap=function(e){return e.map((function(e){return{value:e,label:e}}))},e.isType=function(e,t){return e&&e.selected&&e.selected===t},e.isEmpty=function(e){return null==e},e}(),b=function(e){this.contact=new E,this.license=new S,e&&(Object.assign(this,e),e.contact&&(this.contact=new E(e.contact)),e.license&&(this.license=new S(e.license)))};var E=function(e){e&&Object.assign(this,e)};var S=function(e){e&&Object.assign(this,e)};var O=function(){function e(e,t){this.name=e,this.schema=new N,t&&(this.schema=new N(t))}return e.prototype.isRequired=function(e){return-1!==this.schema.required.indexOf(e)},e}();var w=function(e,t){this.code=e,t&&(this.response=new D(t[e]))};var T=function(){},D=function(e){e&&(Object.assign(this,e),e.schema&&(this.schema=new N(e.schema)),e.examples&&(this.examples=new R(e.examples)),e.headers&&(this.headers=new I(e.headers)),e.items&&(this.items=new C(e.items)))};var I=function(e){e&&Object.assign(this,e)},R=function(e){e&&Object.assign(this,e)},x=function(){},A=function(){};var j=function(){},L=function(){},F=function(e){e&&(Object.assign(this,e),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)))};var P=function e(t){this.enum=[],t&&(Object.assign(this,t),t.items&&(this.items=new e(t.items)))};var C=function(e){e&&(Object.assign(this,e),this.$ref&&(this.entity=v.extractEntityName(this.$ref)),this.items&&this.items.$ref&&(this.items.entity=v.extractEntityName(this.items.$ref)))};var M=function(e){e&&Object.assign(this,e)};var N=function(){function e(e){this.required=[],this.properties={},e&&(Object.assign(this,e),e.xml&&(this.xml=new k(e.xml)),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)),e.items&&(this.items=new C(e.items)),e.$ref&&(this.entity=v.extractEntityName(this.$ref)))}return e.prototype.isPropertyTypeArray=function(e){return v.isArray(e.type)},e.prototype.getPropertyByName=function(e){if(this.properties[e])return this.properties[e].description},e}();var k=function(e){e&&Object.assign(this,e)};var H=function(){},B=function(){function e(e){this.items=new P,e&&(Object.assign(this,e),e.schema&&(this.schema=new C(e.schema)),e.items&&(this.items=new P(e.items)))}return e.prototype.isPathParam=function(){return"path"===this.in},e.prototype.isQueryParam=function(){return"query"===this.in},e.prototype.isBodyParam=function(){return"body"===this.in},e.prototype.isFormParam=function(){return"formData"===this.in},e.prototype.isTypeEnum=function(){return this.enum&&this.enum.length>0},e.prototype.isTypeFile=function(){return"file"===this.type},e.prototype.isTypeDate=function(){return"date"===this.type},e.prototype.getParameterType=function(){return this.isBodyParam()?v.isTypeArray(this)?this.schema.items.entity:this.schema.entity:v.isTypeArray(this)?this.isTypeEnum()&&this.items.enum.length>0?"Enum ["+this.items.enum.join(",")+"]":"["+this.items.type+"]":this.type},e.prototype.getEnumMap=function(){var e=this;return this.items.enum.map((function(t){return{value:t,label:t,selected:e.items&&e.items.default===t}}))},e.prototype.clone=function(){var t=new e;return t.description=this.description,t.name=this.name,t.in=this.in,t.required=this.required,t.value=this.value,t.schema=this.schema,t.enum=this.enum,t.items=this.items,t.type=this.type,t},e}();var q="application/json",U="application/xml",X=function(){function e(e,t,i){var n=this;this.responses=[],this.parameters=[],this.produces=[],this.consumes=[],this.path=e,this.produce=q,this.consume=q,t&&(this.name=t.toUpperCase()),i&&(Object.assign(this,i),this.slug=btoa(this.name+this.path+this.operationId),i.externalDocs&&(this.externalDocs=new M(i.externalDocs)),i.responses&&(this.responses=[],Object.keys(i.responses).forEach((function(e){n.responses.push(new w(e,i.responses))}))),i.parameters&&(this.parameters=[],i.parameters.forEach((function(e){n.parameters.push(new B(e))}))),i.produces&&!v.isEmpty(this.produces)&&(this.produce=this.produces[0]),i.consumes&&!v.isEmpty(this.consumes)&&(this.consume=this.consumes[0]))}return e.prototype.getResponseByCode=function(e){var t=this.responses.find((function(t){return t.code===e}));if(t)return t.response},e.prototype.getRequestUrl=function(e){void 0===e&&(e=!1);var t=e?"":this.path;return this.parameters.length>0&&this.parameters.forEach((function(e){e.value&&(e.isPathParam()?t=t.replace(new RegExp("{"+e.name+"}"),e.value.trim()):e.isQueryParam()&&(t+=-1===t.indexOf("?")?"?"+e.name+"="+e.value.trim():"&"+e.name+"="+e.value.trim()))})),t},e.prototype.isPatchMethod=function(){return"PATCH"===this.name},e.prototype.isPostMethod=function(){return"POST"===this.name},e.prototype.isPutMethod=function(){return"PUT"===this.name},e.prototype.isWriteMethod=function(){return this.isPatchMethod()||this.isPostMethod()||this.isPutMethod()},e.prototype.isGetMethod=function(){return"GET"===this.name},e.prototype.isDeleteMethod=function(){return"DELETE"===this.name},e.prototype.isProduceJson=function(){return this.produce.startsWith(q)},e.prototype.isProduceXml=function(){return this.produce.startsWith(U)},e.prototype.isConsumeJson=function(){return this.consume===q},e.prototype.isConsumeXml=function(){return this.consume===U},e.prototype.isConsumeFormUrlEncoded=function(){return"app/x-www-form-urlencoded"===this.consume},e.prototype.isConsumeMultipartFormData=function(){return"multipart/form-data"===this.consume},e.prototype.getMapProduces=function(){return v.getSelectMap(this.produces)},e.prototype.getMapConsumes=function(){return v.getSelectMap(this.consumes)},e.prototype.clone=function(){var t=new e;return t.consume=this.consume,t.consumes=this.consumes,t.description=this.description,t.externalDocs=this.externalDocs,t.name=this.name,t.operationId=this.operationId,this.parameters.forEach((function(e){return t.parameters.push(e.clone())})),t.path=this.path,t.produce=this.produce,t.produces=this.produces,t.responses=this.responses,t.schemes=this.schemes,t.tags=this.tags,t},e}();var V=function(e,t){var i=this;this.path=e,this.operations=[],t&&Object.keys(t).forEach((function(n){i.operations.push(new X(e,n,t[n]))}))};var G=function(e,t){this.name=e,this.path=new V,t&&(this.path=new V(e,t))};var z=function(){function e(e){var t=this;this.info=new b,this.paths=[],this.produces=[],this.consumes=[],this.schemes=[],this.definitions=[],this.parameters=new H,this.responses=new T,this.securityDefinitions=new x,this.externalDocs=new M,this.security=[],this.tags=[],e&&(Object.assign(this,e),this.baseUrl="http://"+this.host,this.basePath&&(this.baseUrl+=this.basePath),e.info&&(this.info=new b(e.info)),e.paths&&(this.paths=[],Object.keys(e.paths).forEach((function(i){t.paths.push(new G(i,e.paths[i]))}))),e.definitions&&(this.definitions=[],Object.keys(e.definitions).forEach((function(i){t.definitions.push(new O(i,e.definitions[i]))}))),e.tags&&(this.tags=[],e.tags.forEach((function(e){t.tags.push(new F(e))}))),e.externalDocs&&(this.externalDocs=new M(e.externalDocs)))}return e.prototype.getDefinitionByEntity=function(e){return this.definitions.find((function(t){return t.name===e}))},e.prototype.hasDefinition=function(e,t){if(void 0===t&&(t=!1),t&&(e=this.getEntityName(e)),!e)return!1;var i=this.getDefinitionByEntity(e);return i&&v.isObject(i.schema.type)},e.prototype.getEntityName=function(e){return v.extractEntityName(e)},e.prototype.isDtoType=function(e){return this.isTypeArray(e)?e&&e.schema&&e.schema.items&&v.hasRef(e.schema.items)&&this.hasDefinition(e.schema.items.entity):e&&e.schema&&v.hasRef(e.schema)&&this.hasDefinition(e.schema.entity)},e.prototype.getDtoType=function(e){if(e&&e.schema){if(e.schema.entity)return e.schema.entity;if(e.schema.items&&e.schema.items.entity)return e.schema.items.entity}if(e&&e.items)return e.items.type},e.prototype.isTypeArray=function(e){return v.isTypeArray(e)},e.prototype.getBodyDescription=function(e,t){var i=this,n=this.getDefinitionByEntity(e);console.log(n,e);var r={};if(n&&(Object.keys(n.schema.properties).forEach((function(e){var s,o=n.schema.properties[e];v.isArray(o.type)||v.isObject(o.type)?v.isArray(o.type)&&("string"===o.items.type?s=["string"]:o.items.$ref&&(s=[i.getBodyDescription(i.getEntityName(o.items.$ref),t)],t&&o.xml.wrapped&&(e=o.xml.name))):"integer"===o.type?s=0:o.enum&&!v.isEmpty(o.enum)?s=o.enum[0]:"string"===o.type?s="date-time"===o.format?(new Date).toISOString():o.example?o.example:"string":"boolean"===o.type?s=!o.default||o.default:o.$ref&&(s=i.getBodyDescription(i.getEntityName(o.$ref),t),t&&(s=s[e=Object.keys(s)[0]])),r[e]=s})),t&&n.schema.xml)){var s={};return s[n.schema.xml.name]=r,s}return r},e.prototype.getOperationsByProperty=function(e,t){var i=[];return e&&this.paths.forEach((function(n){var r=n.path.operations.filter((function(i){return-1!==e.indexOf(i[t])}));v.isEmpty(r)||(i=i.concat(r))})),i},e}();var J=function(){function e(e){this.date=new Date,this.operation=e||new X}return e.prototype.getRequestTime=function(){if(this.date&&this.endDate)return this.endDate.getTime()-this.date.getTime()},e.prototype.isResponseXML=function(){return this.headers.get("Content-Type").startsWith("application/xml")},e.prototype.isResponseJSON=function(){return this.headers.get("Content-Type").startsWith("application/json")},e}();var Y=function(e){this.contact=new $,this.license=new Q,e&&(Object.assign(this,e),e.contact&&(this.contact=new $(e.contact)),e.license&&(this.license=new Q(e.license)))};var $=function(e){e&&Object.assign(this,e)};var Q=function(e){e&&Object.assign(this,e)};var W=function(e){e&&Object.assign(this,e)};var Z=function(e){e&&Object.assign(this,e)};var K=function(e){e&&Object.assign(this,e)},ee=function(e){e&&(Object.assign(this,e),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)))};var te=function(e){e&&Object.assign(this,e)};var ie=function(e,t){this.code=e,t&&(this.response=new ne(t[e]))};var ne=function(e){e&&(Object.assign(this,e),e.schema&&(this.schema=new ce(e.schema)),e.examples&&(this.examples=new ae(e.examples)),e.headers&&(this.headers=new se(e.headers)),e.items&&(this.items=new re(e.items)))};var re=function(e){e&&(Object.assign(this,e),this.$ref&&(this.entity=this.$ref.replace("#/definitions/","")),this.items&&this.items.$ref&&(this.items.entity=this.items.$ref.replace("#/definitions/","")))};var se=function(e){e&&Object.assign(this,e)},oe=function e(t){this.enum=[],t&&(Object.assign(this,t),t.items&&(this.items=new e(t.items)))};var ae=function(e){e&&Object.assign(this,e)},ce=function(e){this.required=[],this.properties={},e&&(Object.assign(this,e),e.xml&&(this.xml=new ue(e.xml)),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)),e.items&&(this.items=new re(e.items)),e.$ref&&(this.entity=this.$ref.replace("#/definitions/","")))};var ue=function(e){e&&Object.assign(this,e)};var pe=function(){function e(e){this.items=new oe,e&&(Object.assign(this,e),e.schema&&(this.schema=new re(e.schema)),e.items&&(this.items=new oe(e.items)))}return e.prototype.isPathParam=function(){return"path"===this.in},e.prototype.isQueryParam=function(){return"query"===this.in},e.prototype.isTypeEnum=function(){return this.enum&&this.enum.length>0},e.prototype.clone=function(){var t=new e;return t.description=this.description,t.name=this.name,t.in=this.in,t.required=this.required,t.value=this.value,t.schema=this.schema,t.enum=this.enum,t.items=this.items,t.type=this.type,t},e}();var he="application/json",le="application/xml",fe=function(){function e(e,t,i){var n=this;this.responses=[],this.parameters=[],this.produces=[],this.consumes=[],this.path=e,t&&(this.name=t.toUpperCase()),i&&(Object.assign(this,i),this.slug=btoa(this.name+this.path+this.operationId),i.externalDocs&&(this.externalDocs=new te(i.externalDocs)),i.responses&&(this.responses=[],Object.keys(i.responses).forEach((function(e){n.responses.push(new ie(e,i.responses))}))),i.parameters&&(this.parameters=[],i.parameters.forEach((function(e){n.parameters.push(new pe(e))}))))}return e.prototype.getRequestUrl=function(e){void 0===e&&(e=!1);var t=e?"":this.path;return this.parameters.length>0&&this.parameters.forEach((function(e){e.value&&(e.isPathParam()?t=t.replace(new RegExp("{"+e.name+"}"),e.value.trim()):e.isQueryParam()&&(t+=-1===t.indexOf("?")?"?"+e.name+"="+e.value.trim():"&"+e.name+"="+e.value.trim()))})),t},e.prototype.isPatchMethod=function(){return"PATCH"===this.name},e.prototype.isPostMethod=function(){return"POST"===this.name},e.prototype.isPutMethod=function(){return"PUT"===this.name},e.prototype.isWriteMethod=function(){return this.isPatchMethod()||this.isPostMethod()||this.isPutMethod()},e.prototype.isGetMethod=function(){return"GET"===this.name},e.prototype.isDeleteMethod=function(){return"DELETE"===this.name},e.prototype.isProduceJson=function(){return this.produce.startsWith(he)},e.prototype.isProduceXml=function(){return this.produce.startsWith(le)},e.prototype.isConsumeJson=function(){return this.consume===he},e.prototype.isConsumeXml=function(){return this.consume===le},e.prototype.isConsumeFormUrlEncoded=function(){return"app/x-www-form-urlencoded"===this.consume},e.prototype.isConsumeMultipartFormData=function(){return"multipart/form-data"===this.consume},e.prototype.clone=function(){var t=new e;return t.consume=this.consume,t.consumes=this.consumes,t.description=this.description,t.externalDocs=this.externalDocs,t.name=this.name,t.operationId=this.operationId,this.parameters.forEach((function(e){return t.parameters.push(e.clone())})),t.path=this.path,t.produce=this.produce,t.produces=this.produces,t.responses=this.responses,t.schemes=this.schemes,t.tags=this.tags,t},e}();var de=function(e,t){var i=this;this.path=e,this.operations=[],t&&Object.keys(t).forEach((function(n){i.operations.push(new fe(e,n,t[n]))}))};var me=function(e,t){this.name=e,this.path=new de,t&&(this.path=new de(e,t))};var ye=function(e){var t=this;this.info=new Y,this.servers=[],this.paths=[],this.components=new Z,this.security=[],this.tags=[],this.externalDocs=new te,e&&(Object.assign(this,e),e.info&&(this.info=new Y(e.info)),e.servers&&(this.servers=[],e.servers.forEach((function(e){t.servers.push(new W(e))})),this.servers.length>0&&(this.baseUrl=this.servers[0].url)),e.paths&&(this.paths=[],Object.keys(e.paths).forEach((function(i){t.paths.push(new me(i,e.paths[i]))}))),e.components&&(this.components=new Z(e.components)),e.security&&(this.security=[],e.security.forEach((function(e){return t.security.push(new K(e))}))),e.tags&&(this.tags=[],e.tags.forEach((function(e){t.tags.push(new ee(e))}))),e.externalDocs&&(this.externalDocs=new te(e.externalDocs)))};var ge=function(){function e(e){this.date=new Date,this.operation=e||new fe}return e.prototype.getRequestTime=function(){if(this.date&&this.endDate)return this.endDate.getTime()-this.date.getTime()},e.prototype.isResponseXML=function(){return this.headers.get("Content-Type").startsWith("application/xml")},e.prototype.isResponseJSON=function(){return this.headers.get("Content-Type").startsWith("application/json")},e}();var _e=function(){function e(e,t,i,r){var s=this;this.http=e,this._configService=t,this.rsendpoint_target=i,this.cfg=r,this.GLOBAL_TRACK_ID="global_tid",this.callTrackers=new Map,this.subscriptions=[];var o=this._configService.getCategories();this.subscriptions.push(o.pipe(n.first()).subscribe((function(e){s.categories=e,s.subscriptions.push(s._configService.getLeaves().pipe(n.first()).subscribe((function(e){s.leaves=e})))})))}return e.prototype.getGlobalCallsProgressPercentage=function(){var e=this.getCallsTracker(this.GLOBAL_TRACK_ID);return 0===e.remaining?100:100*(e.overall-e.remaining)/e.overall},e.prototype.getNoMap=function(e,i,r,s){var o=this.rsendpoint_target.restClientName;i&&(o+="; requestFrom="+i),r&&(o+="; autocomplete="+r);var a={headers:(new t.HttpHeaders).set("Accept","application/json").set("X-EBI-StickySession","true").set("X-EBISearch-client",o).set("Content-type","application/json"),timeout:6e4,observe:"response",responseType:"json"};return this.http.request("GET",e,a).pipe(n.catchError(this._handleError))},e.prototype.getCallsTracker=function(e){var t=e||this.GLOBAL_TRACK_ID,i=this.callTrackers.get(t);return i||(i=new ve(t),this.callTrackers.set(t,i)),i},e.prototype.get=function(e,t,i){return this.getNoMap(e,t,i).pipe(n.map((function(e){return e.body})))},e.prototype._handleError=function(e){throw new l(e.error.diagnostics&&e.error.diagnostics.message||"SearchService - Web service error",e.status,e.url)},e.prototype.setDomainSpecificFields=function(e){var t,i,n=this;if(e.getDB()&&"allebi"!==e.getDB()&&this.cfg.REST_FIELDS[e.getDBJSONFormat()])e.fields=this.cfg.REST_FIELDS[e.getDBJSONFormat()],this.cfg.DEFAULT_REST_ENABLE_HLFIELDS&&(this.cfg.REST_HLFIELDS[e.getDBJSONFormat()]?e.hlfields=this.cfg.REST_HLFIELDS[e.getDBJSONFormat()]:e.hlfields=e.fields);else if(this.leaves){var r=[],s=[];this.cfg.DEFAULT_REST_FIELDS.split(",").forEach((function(e){return s.push(e)}));var o=[];this.cfg.DEFAULT_REST_ENABLE_HLFIELDS&&this.cfg.DEFAULT_REST_HLFIELDS.split(",").forEach((function(e){return o.push(e)})),this.leaves.forEach((function(t){t.parentId===e.getDB()&&r.push(t.id)})),r&&r.forEach((function(t){n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)]&&n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return s.push(e)})),n.cfg.REST_HLFIELDS[e.domainIdToJSONFormat(t)]?n.cfg.REST_HLFIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return o.push(e)})):n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)]&&n.cfg.REST_FIELDS[e.domainIdToJSONFormat(t)].split(",").forEach((function(e){return o.push(e)}))})),o&&(e.hlfields=this.uniqueStringArray(o).join(",")),s&&(e.fields=this.uniqueStringArray(s).join(","))}if(!e.sort){var a=this.cfg.SEARCH_DOMAIN_SORTING[e.getDB()];if(a)try{for(var c=u(a),p=c.next();!p.done;p=c.next()){var h=p.value;h.default&&(e.sort=h.browser_value)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}}},e.prototype.uniqueStringArray=function(e){return e.sort().filter((function(e,t,i){return!t||e!==i[t-1]}))},e.prototype.getSearchResults=function(e){var t=this;if(e.fieldurl=!0,e.viewurl=!0,e.fields=this.cfg.DEFAULT_REST_FIELDS,e.hlfields=this.cfg.DEFAULT_REST_ENABLE_HLFIELDS?this.cfg.DEFAULT_REST_HLFIELDS:"",e.query=e.getUserQuery(),e.t=void 0,e.addEntryAttr("score"),e.validateFields(),this.setDomainSpecificFields(e),!e.facetfields||0===e.facetfields.length){var i=this.cfg.VISIBLE_FACETS[e.getDB().replace("-","_")];i&&(e.facetfields=i)}var r=e.toQueryString();return this.getCallsTracker().increase(),this.getNoMap(this.rsendpoint_target.url+r,e.requestFrom,e.autocomplete).pipe(n.map((function(e){return t.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getSearchResultsAndResponseInfo=function(e){var t=e.body;return t.responseInfo=new _(e.headers.get(this.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_QUERYSTRING),e.headers.get(this.cfg.REST_RESP_HEADERS.X_EBI_SEARCH_QUERY_PARAMETERS),e.url),t},e.prototype.getStandardSearchFacets=function(e){return e.facetcount=11,this.getSearchFacets(e)},e.prototype.getMoreSearchFacets=function(e){return e.facetcount=1e3,this.getSearchFacets(e)},e.prototype.getMoreReferenceFacets=function(e,t,i,n){var r=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?size=0&facetcount=1000&facetfields="+n;return this.get(r)},e.prototype.getSearchFacets=function(e){var t=this;if(delete e.fields,e.query||(e.query=e.t),!e.facetfields||0===e.facetfields.length){var i=this.cfg.VISIBLE_FACETS[e.getDB().replace("-","_")];i&&(e.facetfields=i)}var r=e.toQueryString();return this.getCallsTracker().increase(),this.getNoMap(this.rsendpoint_target.url+r).pipe(n.map((function(e){return t.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getReferencedEntries=function(e,t,i,r,s){var o=this,a=this._getStart(r),c=this._getRESTfields(i),u=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?fieldurl=true&viewurl=true&fields="+c+"&size=15&start="+a;return s&&s.length>0&&(u+="&facets="+s),this.getCallsTracker().increase(),this.getNoMap(u).pipe(n.map((function(e){return o.getSearchResultsAndResponseInfo(e)})),n.finalize((function(){o.getCallsTracker().decrease()})))},e.prototype.getReferenceFacet=function(e,t,i,r){var s=this,o=this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref/"+i+"?facetcount=11";r&&r.length>0&&(o+="&facets="+r);var a=this.cfg.VISIBLE_FACETS[i.replace("-","_")];return a&&(o+="&facetfields="+a),this.getCallsTracker().increase(),this.get(o).pipe(n.finalize((function(){s.getCallsTracker().decrease()})))},e.prototype._getRESTfields=function(e){var t=this.cfg.REST_FIELDS[e];return void 0===t?this.cfg.DEFAULT_REST_FIELDS:t},e.prototype._getStart=function(e){return e&&e>0?15*(e-1):0},e.prototype.getReferencedDomains=function(e,t,i){return this.get(this.rsendpoint_target.url+"/"+e+"/entry/"+t+"/xref",i)},e.prototype.getFieldLink=function(e,t){return this.get(this.rsendpoint_target.url+"/"+e+"/entry/"+t+"?fieldurl=true")},e.prototype.getDomainsTree=function(e){var t=this,i=this.rsendpoint_target.url+"/allebi?query="+encodeURIComponent(e.getUserQuery())+"&format=JSON&requestFrom="+e.requestFrom;return this.getCallsTracker().increase(),this.get(i).pipe(n.finalize((function(){t.getCallsTracker().decrease()})))},e.prototype.getSuggestions=function(e,t){var i=this,r="/"+e+"/autocomplete?term="+encodeURIComponent(t)+"&formatted=true";return this.getCallsTracker("suggestions_tid").increase(),this.get(this.rsendpoint_target.url+r).pipe(n.finalize((function(){i.getCallsTracker("suggestions_tid").decrease()})))},e}();_e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],_e.ctorParameters=function(){return[{type:t.HttpClient},{type:f},{type:o},{type:s}]},_e.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new _e(i.ɵɵinject(t.HttpClient),i.ɵɵinject(f),i.ɵɵinject(o),i.ɵɵinject(s))},token:_e,providedIn:"root"});var ve=function(){function e(e){this.id=e,this.overall=0,this.remaining=0}return e.prototype.increase=function(){this.overall++,this.remaining++},e.prototype.decrease=function(){this.remaining--,0===this.remaining&&(this.overall=0)},e}();var be=function(){};be.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[t.HttpClientModule],providers:[s,f,d,o,_e],exports:[]}]}];var Ee=function(){function e(e){this.cfg=e,this._routeHiddenParams=["domainDefaultConfiguredFields","facetcount","facetfields","fields","fieldurl","format","hlfields","paramsSubscription","routeParams","size","start","viewurl","cfg"],this._queryStringHiddenParams=["dbJSONFormat","domainDefaultConfiguredFields","paramsSubscription","routeParams","cfg"],this.domainDefaultConfiguredFields=["sort","fields","hlfields"]}return e.prototype.clone=function(){return Object.assign(new e(this.cfg),this)},e.prototype.fromRouteParams=function(e){this.clearDomainDefaultFields(),this._db=e.db,e.query&&(this.query=e.query),this.t=e.t,this.start=0,this.size=this.cfg.DEFAULT_PAGE_SIZE;var t=e.facets;this.facets=void 0!==t?t:"";var i=parseInt(e.page,10);isNaN(i)||this.setPage(i),this.sort=e.sort,this.requestFrom=e.requestFrom,this.autocomplete=e.autocomplete,e.format||(this.format="JSON")},e.prototype.validateFields=function(){if(!this._db)throw new h('URL parameter "db" need to be set');if(!this.query||this.query.length<this.cfg.SEARCH_QUERY_MIN_LENGTH)throw new h("URL parameter 'query' need to be set and having a length greater than "+this.cfg.SEARCH_QUERY_MIN_LENGTH)},e.prototype.clearDomainDefaultFields=function(){var e,t;try{for(var i=u(this.domainDefaultConfiguredFields),n=i.next();!n.done;n=i.next()){delete this[n.value]}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.checkStringHasValue=function(e,t){if(null==t||void 0===t||0===t.length)throw new h('Parameter: "+name+" not valorized')},e.prototype.checkMultiParamHasValue=function(e,t,i){var n=new RegExp(this.keyValueToString(t,i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))+"(,|$)","g");return e&&null!=e.match(n)},e.prototype.keyValueToString=function(e,t){return e+":"+t},e.prototype.addPairInList=function(e,t,i){return this.checkStringHasValue("EntryId",t),this.checkStringHasValue("EntryValue",i),this.addEntryInList(e,this.keyValueToString(t,i))},e.prototype.addEntryInList=function(e,t){return e||(e=""),-1===e.indexOf(t)?e+=0===e.length?t:","+t:-1===e.split(",").indexOf(t)&&(e+=","+t),e},e.prototype.removePairInList=function(e,t,i){return this.checkStringHasValue("EntryId",t),this.checkStringHasValue("EntryValue",i),this.removeEntryInList(e,this.keyValueToString(t,i))},e.prototype.removeEntryInList=function(e,t){try{this.checkStringHasValue("ListField",e),e=(e=(e=(e=e.replace(t,"")).replace(/^,/,"")).replace(",,",",")).replace(/,$/,"")}catch(t){console.warn("Asked to remove 'pair' from empty list field: SearchRequest."+e)}return e},e.prototype.clearPairsInList=function(e,t){try{this.checkStringHasValue("ListField",e),this.checkStringHasValue("EntryId",t);var i=new RegExp(t+":.*?,|"+t+":.*$","g");e=(e=(e=(e=e.replace(i,"")).replace(/^,/g,"")).replace(",,",",")).replace(/,$/,"")}catch(t){console.warn("Asked to remove all values from empty list field: SearchRequest."+e)}return e},e.prototype.getValuesInListByKey=function(e,t){try{this.checkStringHasValue("ListField",e),this.checkStringHasValue("EntryId",t);for(var i=new RegExp(t+":([\\w\\.\\-\\d]*)","g"),n=[],r=i.exec(e);r;)n.push(r[1]),r=i.exec(e);return n}catch(t){console.warn("Asked values from empty list field: SearchRequest."+e)}return[]},e.prototype.getFacetsSelectedIds=function(){var e,t;if(!this.facets)return[];var i=[],n=this.facets.split(",");try{for(var r=u(n),s=r.next();!s.done;s=r.next()){var o=s.value,a=o.substring(0,o.indexOf(":"));-1===i.indexOf(a)&&i.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i},e.prototype.getFacetSelectedValues=function(e){return this.getValuesInListByKey(this.facets,e)},e.prototype.addFacet=function(e,t){this.facets=this.addPairInList(this.facets,e,t),this.setPage(1)},e.prototype.removeFacet=function(e,t){this.facets=this.removePairInList(this.facets,e,t),this.setPage(1)},e.prototype.clearFacetFields=function(){this.facetfields=""},e.prototype.addFacetField=function(e){this.facetfields=this.addEntryInList(this.facetfields,e)},e.prototype.addEntryAttr=function(e){this.entryattrs=this.addEntryInList(this.entryattrs,e)},e.prototype.removeEntryAttr=function(e){this.entryattrs=this.removeEntryInList(this.entryattrs,e)},e.prototype.setDB=function(e){this._db=e,this.setPage(1)},e.prototype.getDB=function(){return this._db},e.prototype.getDBJSONFormat=function(){return this.dbJSONFormat||(this.dbJSONFormat=this._db.replace(/\-/g,"_")),this.dbJSONFormat},e.prototype.domainIdToJSONFormat=function(e){return e.replace("-","_")},e.prototype.clearFacetValues=function(e){this.facets=this.clearPairsInList(this.facets,e)},e.prototype.hasFacetValue=function(e,t){return this.checkMultiParamHasValue(this.facets,e,t)},e.prototype.hasFacet=function(e){return this.facets&&-1!==this.facets.indexOf(e)},e.prototype.toNavigationParams=function(){var e="{";for(var t in e+=' "db": "'+this.getDB()+'"',this)if(this.hasOwnProperty(t)&&!t.startsWith("_")&&-1===this._routeHiddenParams.indexOf(t)){var i=this[t];(i||"number"==typeof i)&&(e.length>1&&(e+=","),e+='"'+t+'": '+JSON.stringify(""+this[t]))}return this.start&&this.size&&(e+=', "page": '+this.getPage()),e+="}",JSON.parse(e)},e.prototype.toQueryString=function(){"allebi"===this._db&&(this.facets=void 0);var e="/"+this.getDB()+"/",t="?";for(var i in this)if(this.hasOwnProperty(i)&&"db"!==i&&!i.startsWith("_")&&-1===this._queryStringHiddenParams.indexOf(i)){var n=this[i];if(null!=n&&void 0!==n&&n){var r=this.browserToRESTFieldConversion(this._db,i,n);e+=t+i+"="+encodeURIComponent(r),t="&"}}return e},e.prototype.browserToRESTFieldConversion=function(e,t,i){var n,r;switch(t){case"sort":var s=this.cfg.SEARCH_DOMAIN_SORTING[e],o="";if(s)try{for(var a=u(s),c=a.next();!c.done;c=a.next()){var p=c.value;if(p.browser_value===this.sort){o=p.rest_value;break}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}else console.warn("Using sort with no predefined domain configuration: domain ["+e+"], sort field ["+t+"], sort value ["+i+"]");return o}return i},e.prototype.getUserQuery=function(){return void 0!==this.query&&null!=this.query?this.query:this.t},e.prototype.setPage=function(e){if(!e)throw new h("Page need to be a positive integer");this.size||(this.size=this.cfg.DEFAULT_PAGE_SIZE),this.start=this.size*(e-1)},e.prototype.getPage=function(){return(this.start+this.size)/this.size},e.prototype.equals=function(e){return e&&this.toQueryString()===e.toQueryString()},e}();var Se=function(){function e(){}return e.prototype.sort=function(e){return e},e}();Se.decorators=[{type:i.Injectable}];var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.sort=function(e){return e.sort((function(e,t){var i=0,n=0;return e.entries&&e.entries.length>0&&(i=e.entries[0].score),t.entries&&t.entries.length>0&&(n=t.entries[0].score),n-i})),e},t}(Se);Oe.decorators=[{type:i.Injectable}];var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.sort=function(e){return e.sort((function(e,t){return e.responseInfo.getDomainId().localeCompare(t.responseInfo.getDomainId())})),e},t}(Se);we.decorators=[{type:i.Injectable}];var Te=function(e){function t(t,i){var n=e.call(this)||this;return n.errMsgService=t,n.ngZone=i,n}return c(t,e),t.prototype.handleError=function(t){var i=this,n=t;t.originalException&&(n=t.originalException),n instanceof p?this.ngZone.run((function(){i.errMsgService.addError(n)})):e.prototype.handleError.call(this,t)},t}(i.ErrorHandler);Te.decorators=[{type:i.Injectable}],Te.ctorParameters=function(){return[{type:d},{type:i.NgZone}]},e.AlphaCatResultsSorter=we,e.ApiDefinition=z,e.ApiModelUtils=v,e.ApiResult=J,e.ConfigService=f,e.Configuration=s,e.ContactObject=E,e.DefinitionsObject=O,e.EBException=p,e.EBExceptionHandler=Te,e.EbinocleNgRSClientModule=be,e.ErrorEvent=g,e.ExampleObject=R,e.ExternalDocumentationObject=M,e.HeadersObject=I,e.HttpException=l,e.InfoObject=b,e.ItemsObject=P,e.LicenseObject=S,e.NotificationMessage=y,e.NotificationMessageService=d,e.OpenApiDefinition=ye,e.OpenApiOperationObject=fe,e.OpenApiParameterObject=pe,e.OpenApiPathsObject=me,e.OpenApiResult=ge,e.OperationObject=X,e.ParameterObject=B,e.ParametersDefinitionsObject=H,e.PathItemObject=V,e.PathsObject=G,e.RSEndpointTarget=o,e.ReferenceObject=C,e.ResponseInfo=_,e.ResponseObject=D,e.ResponsesDefinitionsObject=T,e.ResponsesObject=w,e.SchemaObject=N,e.ScopesObject=j,e.ScoreCatResultsSorter=Oe,e.SearchRequest=Ee,e.SearchResultsSorter=Se,e.SearchService=_e,e.SecurityDefinitionsObject=x,e.SecurityRequirementObject=L,e.SecuritySchemeObject=A,e.TagObject=F,e.ValidationException=h,e.XMLObject=k,e.ɵa=s,e.ɵb=f,e.ɵc=d,e.ɵd=_e,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ebi-wp-ebinocle-ng-rsclient.umd.min.js.map |
@@ -426,3 +426,3 @@ /** | ||
if (!this.dbJSONFormat) { | ||
this.dbJSONFormat = this._db.replace('/\-/g', '_'); | ||
this.dbJSONFormat = this._db.replace(/\-/g, '_'); | ||
} | ||
@@ -661,2 +661,2 @@ return this.dbJSONFormat; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLXJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lYmlub2NsZS1uZy1yc2NsaWVudC9zcmMvbGliL3NlYXJjaC9zZWFyY2gtcmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQW1CQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBeUI3RCxNQUFNLE9BQU8sYUFBYTs7OztJQTBFeEIsWUFBb0IsR0FBa0I7UUFBbEIsUUFBRyxHQUFILEdBQUcsQ0FBZTs7Ozs7UUFyQzlCLHVCQUFrQixHQUFHO1lBQzNCLCtCQUErQjtZQUMvQixZQUFZO1lBQ1osYUFBYTtZQUNiLFFBQVE7WUFDUixVQUFVO1lBQ1YsUUFBUTtZQUNSLFVBQVU7WUFDVixvQkFBb0I7WUFDcEIsYUFBYTtZQUNiLE1BQU07WUFD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ldFBhZ2UocGFnZTogbnVtYmVyKSB7XG4gICAgaWYgKCFwYWdlKSB7IHRocm93IG5ldyBWYWxpZGF0aW9uRXhjZXB0aW9uKCdQYWdlIG5lZWQgdG8gYmUgYSBwb3NpdGl2ZSBpbnRlZ2VyJyk7IH1cbiAgICBpZiAoIXRoaXMuc2l6ZSkgeyB0aGlzLnNpemUgPSB0aGlzLmNmZy5ERUZBVUxUX1BBR0VfU0laRTsgfVxuICAgIHRoaXMuc3RhcnQgPSB0aGlzLnNpemUgKiAocGFnZSAtIDEpO1xuICB9XG5cbiAgcHVibGljIGdldFBhZ2UoKSB7XG4gICAgcmV0dXJuICh0aGlzLnN0YXJ0ICsgdGhpcy5zaXplKSAvIHRoaXMuc2l6ZTtcbiAgfVxuXG4gIHB1YmxpYyBlcXVhbHMob3RoZXI6IFNlYXJjaFJlcXVlc3QpOiBib29sZWFuIHtcbiAgICAvLyBzaW1wbGUgc29sdXRpb25cbiAgICByZXR1cm4gb3RoZXIgJiYgdGhpcy50b1F1ZXJ5U3RyaW5nKCkgPT09IG90aGVyLnRvUXVlcnlTdHJpbmcoKTtcbiAgfVxufVxuIl19 |
{ | ||
"name": "@ebi-wp/ebinocle-ng-rsclient", | ||
"version": "1.3.11.alpha.4", | ||
"version": "1.3.11.alpha.5", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^10.1.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1569507