import{Map as n}from"immutable";import t from"query-string";import{DEV_CENTER_CLI_APP_ID as o}from"../constants/devcenter.js";import"../constants/goals.js";import{SEGMENTS as i,DRILLOUT_SEGMENT as r}from"../constants/segment.js";import"../constants/alerts.js";import"../constants/apps.js";import"../constants/drillstring.js";import"../constants/completion.js";import"../constants/appPackages.js";import"../constants/notifications.js";import"../constants/feed.js";import"../constants/bha.js";import"../constants/corvaCompanyId.js";import"lodash";import"../components/GradientManager/configuration/constants.js";var a=function(n){var t=n.appKey,o=n.version,i=n.isLocalDebugMode;if(!t)return"";var r=t.replace(/\./g,"_");return i?r:"".concat(r,"-").concat(o)},l=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return t===+(null==n?void 0:n.maximizeDC)};function s(n){var o,i;return{push:function(o){if("string"==typeof o)n.push(o);else{var i=o.query?t.stringify(o.query):"",r=i?"?".concat(i):void 0;n.push({pathname:o.pathname,search:r})}},location:{pathname:null==n||null===(o=n.location)||void 0===o?void 0:o.pathname,query:t.parse(null==n||null===(i=n.location)||void 0===i?void 0:i.search)}}}var e=function(n){return n?+(n.split("#")[2]||"").replace("}",""):void 0},u=function(n){var t,o,i,r,a;return null!==(t=null!==(o=null==n?void 0:n.name)&&void 0!==o?o:null==n||null===(i=n.package)||void 0===i||null===(r=i.manifest)||void 0===r||null===(a=r.application)||void 0===a?void 0:a.name)&&void 0!==t?t:""},c=function(n){var t;return"dev_center"===((null==n?void 0:n.platform)||(null==n||null===(t=n.app)||void 0===t?void 0:t.platform))},p=function(t){var o,a;if(!t)return i.DRILLING;var l,s=t.settings instanceof n?t.settings.get("segment"):null===(o=t.settings)||void 0===o?void 0:o.segment,e=null!=s?s:null===(a=t.segment)||void 0===a?void 0:a[0];return e?e===i.COMPLETION&&"core"===(null===(l=t.app)||void 0===l?void 0:l.platform)&&t.category===r?r:e:null!=e?e:i.DRILLING},v=function(n){var t,o;return"corva"===(null==n||null===(t=n.app_key)||void 0===t||null===(o=t.split("."))||void 0===o?void 0:o[0])},m=function(n){var t,o,i;return null===(t=null==n||null===(o=n.manifest)||void 0===o||null===(i=o.settings)||void 0===i?void 0:i.enable_isolation)||void 0===t||t};export{s as createDevCenterRouter,a as getAppIdentifier,u as getAppName,p as getAppSegment,e as getTimestampFromQuery,l as isAppMaximized,v as isCorvaApp,c as isDevCenterApp,m as isIsolationEnabledInPackageManifest};
//# sourceMappingURL=devcenter.js.map
