text: sap.ui.define(["sap/apf/abap/LrepConnector","sap/ui/thirdparty/datajs"],function(L){'use strict';var s={semanticObject:"FioriApplication",action:"executeAPFConfiguration"};var a={semanticObject:"FioriApplication",action:"editAPFConfiguration"};var b={semanticObject:"FioriApplication",action:"executeAPFConfigurationS4HANA"};var c={semanticObject:"FioriApplication",action:"editAPFConfigurationS4HANA"};var h="/sap/hba/r/apf/core/odata/modeler/AnalyticalConfiguration.xsodata/AnalyticalConfigurationQueryResults";var d={};d._hanaConfigurations=undefined;d._lrepConfigurations=undefined;d.getConfigurations=function(l,m){var n=jQuery.Deferred();var o=[];jQuery.when(e(),r()).then(function(p,q){o=q.concat(p);var t=k(l,m);if(t&&!j(t,s)&&!j(t,b)){o.forEach(function(u){u.runtimeIntent=t;});}n.resolve(o);});return n.promise();};d.getConfigurationNameById=function(l){var m=jQuery.Deferred();if(!l){return m.resolve("");}if(l.indexOf(".")>-1){e().done(n);}else{r().done(n);}return m.promise();function n(o){o.forEach(function(p){if(p.id===l){m.resolve(p.title);}});if(m.state!=="resolved"){m.resolve("");}}};function r(){var l=jQuery.Deferred();if(!d._hanaConfigurations){var m={requestUri:h+"?$select=AnalyticalConfiguration,AnalyticalConfigurationName,Application",async:true,method:"GET"};OData.request(m,n,o);}else{l.resolve(jQuery.extend(true,[],d._hanaConfigurations));}return l.promise();function n(p){var q=[];p.results.forEach(function(t){q.push({title:t.AnalyticalConfigurationName,id:t.AnalyticalConfiguration,runtimeIntent:s,modelerIntent:a,configurationId:t.AnalyticalConfiguration,applicationId:t.Application});});d._hanaConfigurations=jQuery.extend(true,[],q);l.resolve(q);}function o(){d._hanaConfigurations=[];l.resolve([]);}}function e(){var l=jQuery.Deferred();if(!d._lrepConfigurations){f().then(function(m){var n=[];m.response.forEach(function(o){var p;var q;if(o.fileType&&o.fileType==="apfconfiguration"){p=g(o);q=o.name;n.push({title:i(o,'apfdt-configname'),id:p+"."+q,runtimeIntent:b,modelerIntent:c,configurationId:q,applicationId:p});}});d._lrepConfigurations=jQuery.extend(true,[],n);l.resolve(n);},function(){l.resolve([]);d._lrepConfigurations=[];});}else{l.resolve(jQuery.extend(true,[],d._lrepConfigurations));}return l.promise();}function f(){var l=L.createConnector();var o={async:true,contentType:'application/json'};var p=[];p.push({name:"deep-read",value:true});p.push({name:"metadata",value:true});p.push({name:"layer",value:"CUSTOMER"});var R="/sap/bc/lrep/content/sap/apf/dt/";R+=l._buildParams(p);return l.send(R,'GET',{},o);}function g(l){var n=l.ns.split('/');return n[n.length-2];}function i(l,m){var v;l.metadata.forEach(function(n){if(n.name===m){v=n.value;}});return v;}function j(l,m){if(l.semanticObject===m.semanticObject&&l.action===m.action){return true;}return false;}function k(l,m){if(l&&m){return{semanticObject:l,action:m};}}return d;},true);
  