text: /*!
   * OpenUI5
   * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/ui/thirdparty/jquery","sap/ui/documentation/library","sap/base/Log"],function(e,r,n){"use strict";var s;var t={loadData:function(){if(!s){s=new Promise(function(e,n){r._loadAllLibInfo("","_getDocuIndex",function(r,n){var s=t._getIndices(r,n,function(){e(s)})})})}return s},_getIndices:function(s,t,i){var a=["Action","Application","Container","Display","Chart","Mini Chart","Layout","List","Floorplans & Patterns","Popup","Tile","User Input","Testing","Theming","Tutorial","Routing","Data Binding","Data Visualization","Map","Utility"];var o=["namespace","since","category"];var l={namespace:{},since:{},category:{},formFactors:{Independent:true,Condensed:true,Compact:true,Cozy:true}};var p={"-":"Independent",S:"Condensed",SM:"Condensed, Compact",SL:"Condensed, Cozy",SML:"Condensed, Compact, Cozy",M:"Compact",ML:"Compact, Cozy",L:"Cozy"};var f={};f={};f.entityCount=0;f.entities=[];f.filter={};f.samples={};e.each(t,function(r,s){if(!s.explored){return}else if(!s.explored.samplesRef){n.error("explored: cannot register lib '"+s.library+"'. missing 'explored.samplesRef'");return}else if(Array.isArray(s.explored.samplesRef)&&s.explored.samplesRef.length!==s.explored.samplesRef.filter(function(e){return e.namespace&&e.ref}).length){n.error("explored: cannot register lib '"+s.library+"'. missing 'explored.samplesRef.namespace' or 'explored.samplesRef.ref' in one or more of the configured namespaces");return}else if(!Array.isArray(s.explored.samplesRef)&&!s.explored.samplesRef.namespace){n.error("explored: cannot register lib '"+s.library+"'. missing 'explored.samplesRef.namespace'");return}else if(!Array.isArray(s.explored.samplesRef)&&!s.explored.samplesRef.ref){n.error("explored: cannot register lib '"+s.library+"'. missing 'explored.samplesRef.ref'");return}else if(!s.explored.entities){n.error("explored: cannot register lib '"+s.library+"'. missing 'explored.entities'");return}else{n.info("explored: now reading lib '"+s.library+"'")}if(Array.isArray(s.explored.samplesRef)){s.explored.samplesRef.forEach(function(e){(function(){var r={};r[e.namespace.replace(/\./g,"/")]=""+e.ref||".";sap.ui.loader.config({paths:r})})()})}else{(function(){var e={};e[s.explored.samplesRef.namespace.replace(/\./g,"/")]=""+s.explored.samplesRef.ref||".";sap.ui.loader.config({paths:e})})()}e.each(s.explored.samples,function(e,r){if(!r.id){n.error("explored: cannot register sample '?'. missing 'id'")}else if(!r.name){n.error("explored: cannot register sample '"+r.id+"'. missing 'name'")}else{f.samples[r.id]=r}});e.each(s.explored.entities,function(r,t){if(!t.id){n.error("explored: cannot register entity '?'. missing 'id'");return}if(s.explored.entitiesDefaults){e.each(s.explored.entitiesDefaults,function(e,r){if(!t.hasOwnProperty(e)){t[e]=r}})}var i=t.id.lastIndexOf(".");var c=i!==-1?t.id.substring(0,i):t.id;t.namespace=c;if(!t.name){n.error("explored: cannot register entity '"+t.id+"'. missing 'name'");return}if(a.indexOf(t.category)===-1){n.error("explored: cannot register entity '"+t.id+"'. category '"+t.category+"' is not allowed");return}if(!t.formFactors){n.error("explored: cannot register entity '"+t.id+"'. missing 'formFactors'");return}if(!p[t.formFactors]){n.error("explored: cannot register entity '"+t.id+"'. formFactors '"+t.formFactors+"' is not allowed");return}t.formFactors=p[t.formFactors];var d=false;e.each(o,function(e,r){if(!t[r]){n.error("explored: cannot register entity '"+t.id+"'. missing '"+r+"'");d=true;return false}});if(d){return}e.each(o,function(e,r){l[r][t[r]]=true});t.library=s.library;f.entities.push(t)})});e.each(f.entities,function(r,s){var t=0,i,a;s.searchTags=s.name+" "+s.name.replace(/\s/g,"")+" "+s.category;if(s.samples){s.samples.forEach(function(e){var r=f.samples[e];if(r){s.searchTags+=" "+r.name;s.searchTags+=" "+r.description}})}if(s.samples&&!(s.samples instanceof Array)){s.samples=[];n.error("explored: cannot register samples for entity '"+s.id+"'. 'samples' is not an array");return}if(!s.samples){s.samples=[]}if(s.samplesAsSteps){if(!(s.samplesAsSteps instanceof Array)){n.error("explored: cannot register samples for entity '"+s.id+"'. 'samplesAsSteps' is not an array");return}a=function(e){if(e.toString().length===1){return"0"+e}return e};for(;t<s.samplesAsSteps.length;t++){i={id:s.id+"."+a(t+1),name:s.name+" - Step "+(t+1)+" - "+s.samplesAsSteps[t]};if(t>0){i.previousSampleId=s.id+"."+a(t)}if(t<s.samplesAsSteps.length-1){i.nextSampleId=s.id+"."+a(t+2)}i.entityId=s.id;s.samples.push(i);f.samples[i.id]=i;s.searchTags+=" "+i.name}}else{var o=[],l;e.each(s.samples,function(e,r){var t=f.samples[r];if(!t){n.warning("explored: cannot register sample '"+r+"' for '"+s.id+"'. not found in the available docu indizes")}else{t.entityId=s.id;if(!t.contexts){t.contexts={}}if(!t.contexts[t.entityId]){t.contexts[t.entityId]={}}t.contexts[t.entityId].previousSampleId=l?l.id:undefined;if(l){l.contexts[t.entityId].nextSampleId=t.id}l=t;o.push(t);s.searchTags+=" "+t.name}});s.samples=o}s.sampleCount=s.samples.length});f.entityCount=f.entities.length;e.each(l,function(r,n){f.filter[r]=[];e.each(n,function(e,n){f.filter[r].push({id:e})})});var c=r._getLibraryInfoSingleton();var d={};var m=[];for(var u=0;u<s.length;u++){m.push(new Promise(function(e){var r=function(r){d[r.library]=r.componentInfo;e()};c._getLibraryInfo(s[u],r)}))}Promise.all(m).then(function(){i&&i()});f.libComponentInfos=d;f.groups=this.getGroups(f.entities);return f},findGroup:function(e,r){var n;for(var s=0;s<e.length;s++){n=e[s];if(n.name==r){return n}}},getGroups:function(e){var r=[],n,s,t,i,a,o;for(a=0;a<e.length;a++){n=e[a];n.key="#/entity/"+n.id;t=n.samples;for(o=0;o<t.length;o++){i=t[o];i.key="#/sample/"+i.id+"/preview"}s=this.findGroup(r,n.category);if(!s){s={name:n.category,key:"#/group/"+n.category,controls:[n]};r.push(s)}else{s.controls.push(n)}}return r}};return t},true);