text: /*
   * ! OpenUI5
   * (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/ui/fl/apply/_internal/flexState/FlexState","sap/ui/fl/DefaultVariant","sap/ui/fl/StandardVariant","sap/ui/fl/ChangePersistenceFactory","sap/ui/fl/registry/Settings","sap/ui/fl/Utils","sap/ui/fl/LayerUtils","sap/base/Log"],function(F,D,S,C,a,U,L,b){"use strict";var c={_PERSISTENCY_KEY:"persistencyKey",loadChanges:function(p){var o=p.control;var A=U.getAppDescriptor(o);var s=U.getSiteId(o);var d=this._getStableId(o);var P={appDescriptor:A,siteId:s,includeVariants:true};var e=C.getChangePersistenceForControl(o);return F.initialize({componentId:U.getAppComponentForControl(o).getId()}).then(function(){return e.getChangesForVariant(this._PERSISTENCY_KEY,d,P);}.bind(this));},getChangeById:function(p){var o=p.control;var i=p.id;if(!i||!o){b.error("sId or oControl is not defined");return undefined;}var d=this._getChangeMap(o);return d[i];},isVariantSharingEnabled:function(){return a.getInstance().then(function(i){return i.isVariantSharingEnabled();});},isApplicationVariant:function(p){var o=p.control;if(U.isApplicationVariant(o)){return true;}var d=U.getComponentForControl(o);if(d&&d.getAppComponent){d=d.getAppComponent();if(d){return true;}}return false;},isVendorLayer:function(){return L.isVendorLayer();},isVariantDownport:function(){return c.isVendorLayer()&&U.isHotfixMode();},getDefaultVariantId:function(p){var o=this._getChangeMap(p.control);return D.getDefaultVariantId(o);},getExecuteOnSelect:function(p){var o=this._getChangeMap(p.control);return S.getExecuteOnSelect(o);},_getStableId:function(o){if(!o){return undefined;}var s;try{s=o.getPersistencyKey();}catch(e){s="";}return s;},_getChangeMap:function(o){var d=C.getChangePersistenceForControl(o);var s=c._getStableId(o);return d.getSmartVariantManagementChangeMap()[s]||{};}};return c;},true);
  