-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-shell.8ca9f44e.js
2 lines (2 loc) · 125 KB
/
app-shell.8ca9f44e.js
1
2
this["app-shell"]=this["app-shell"]||{},this["app-shell"].js=function(e){const t="https://static.invisionapp-cdn.com/spa/cloud-ui/global-service-worker.2e0b5e6a.js";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,i(e,t,"get"))}function a(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,i(e,t,"set"),n),n}function i(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}var r=new WeakMap;class s{constructor(e={}){n(this,"events",{}),n(this,"on",(e,t,n=!1)=>{this.events[e]=n?[t,...this.events[e]||[]]:[...this.events[e]||[],t]}),n(this,"once",(e,t,n=!1)=>{const o=(...n)=>{t(...n),this.off(e,o)};this.on(e,o,n)}),n(this,"off",(...e)=>{const[t,n]=e;switch(e.length){case 1:return void delete this.events[t];case 2:return void this.events[t].splice(this.events[t].indexOf(n),1)}}),n(this,"emit",(e,t,n=!1)=>{const a=[...this.events[e]||[]];o(this,r).call(this,"emit event",e,"total handlers? "+a.length,"is cancellable? "+n);let i=!1;return a.forEach(e=>{try{if(i)return;e(t,{stopPropagation:()=>{n&&(i=!0)}})}catch(e){console.error(e)}}),i&&o(this,r).call(this,`The event ${e} has been cancelled - propagation stopped`),{propagationStopped:i}}),r.set(this,{writable:!0,value:(...e)=>{this.logger&&this.logger.log(` ${this.scopeName||""} Emitter:`,...e)}}),this.logger=e.logger||null,this.scopeName=e.scopeName||null}}const l=Object.seal({mountedApplication:"",mountHistory:[],docsVisitedHistory:new Set}),c=()=>l.mountedApplication,u=()=>l.mountHistory.length<=1,d=()=>l.mountHistory.length,p=e=>l.mountHistory.filter(t=>(t||"").toLowerCase()===(e||"").toLowerCase()).length;function f(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function m(e,t){var n;void 0===t&&(t=f);var o,a=[],i=!1;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return i&&n===this&&t(r,a)||(o=e.apply(this,r),i=!0,n=this,a=r),o}}const h="local",g="testing",v="multi-tenant",w="single-tenant",b=[h,g,"preview"],y={MOUNT:"mount",UNMOUNT:"unmount"},C={BEFORE:"before",AFTER:"after"},S={USER_VENDOR_CONTEXT_UPDATED:"user-vendor-context-updated",APP_NAVIGATION:"app-navigation"},N="empty",R="error",E="unknown",x=[g,"preview",v,w,"Testing","Production"],k=[g,"preview",v,w],A=[g,"preview",v,w],P={PENDING:"pending",RUNNING:"running",LOADED:"loaded",CONSUMED:"consumed",CANCELLED:"cancelled"},F="default",O="harmony",T="harmony",L="prototype",$="spec",M={"login.invisionapp.com":{redirectUrl:"login.invisionapp.com/auth/sign-in",featureConfigKey:"login"},"login.invisionbeta.com":{redirectUrl:"login.invisionbeta.com/auth/sign-in",featureConfigKey:"login"}};class D{constructor(e={}){const{storageSrc:t=E,loadState:n,loadInfo:o="",gspManifestLocation:a="",timeUpdated:i=Date.now(),manifest:r,version:s=""}=e;this.storageSrc=t,this.loadInfo=o,this.gspManifestLocation=a,this.timeUpdated=i,this.manifest=r,this.version=s,n?this.loadState=n:r&&r.criticalPathFiles?i-Date.now()>18e4?this.loadState="expired":this.loadState="ok":this.loadState=N}usable(){return![N,R].includes(this.loadState)}getSerializedStructureForStorage({storageSrc:e}){return Object.assign({},this,{storageSrc:e,loadInfo:""})}async updateManifestFromGSP(){if(this.gspManifestLocation)try{const e=await fetch(this.gspManifestLocation);if(e.ok){const t=await e.json();"local-manifest-version"!==this.version||D.isValidLocalManifest(t)?t&&t.criticalPathFiles&&(this.manifest=t,this.loadState="ok"):(this.loadState="invalid",console.error(`The local-manifest provided at ${this.gspManifestLocation} is not valid, so it won't be loaded.`))}}catch(e){console.error(e)}return this.manifest}static isValidLocalManifest(e){return["version","commit","criticalPathFiles","manifestVersionLocation"].every(t=>Object.keys(e).includes(t))}}class I{constructor(e={}){const{storageSrc:t=E,timeUpdated:n=Date.now(),manifestItems:o,storageKey:a}=e;this.storageSrc=t,this.storageKey=a||void 0,this.timeUpdated=n,this.timeUpdatedISO=n?new Date(n).toISOString():null,this.manifestItems={},this.expiredManifestItems={},o&&Object.keys(o).forEach(e=>{this.manifestItems[e]=new D(o[e])}),this.loadState="ok",n-Date.now()>6e5&&(this.loadState="expired"),o&&0!==!o.length||(this.loadState=N)}updateManifestItemEntry(e,t=new D){e&&(this.manifestItems[e]=t,this.loadState===N&&(this.loadState="ok"))}getMissingOrUnusableFeaturesNames({requiredFeatureNames:e=[],requiredManifestVersions:t={}}){return this.manifestItems&&0!==this.getAllFeatureNames().length?e.filter(e=>{const n=this.manifestItems[e],o=t[e];return!n||!n.usable()||o&&n.manifest.version!==o}):e}getAllFeatureNames(){return Object.keys(this.manifestItems)}getAllFeatures(){return Object.values(this.manifestItems)}getManifestItem(e){return this.manifestItems[e]}getFeatureManifest(e){const t=this.manifestItems[e];return t?t.manifest:null}getAssetReferencesForFeature(e=""){const t=this.manifestItems[e];return t&&t.usable()?t.manifest.criticalPathFiles:[]}getAssetReferencesForFeatures(e=[]){const t=e.map(e=>(e||"").trim().toLowerCase());return Object.keys(this.manifestItems).filter(e=>t.includes(e.toLowerCase())).reduce((e,t)=>{const n=this.getAssetReferencesForFeature(t);return n&&n.length&&(e[t]=n),e},{})}getSerializedStructureForStorage({storageSrc:e}){const t=Object.keys(this.manifestItems).reduce((t,n)=>(t[n]=this.manifestItems[n].getSerializedStructureForStorage({storageSrc:e}),t),{});return Object.assign({},this,{storageSrc:e,manifestItems:t})}}const B={createMark:(e,t)=>{},markTime:(e,t)=>{},markNetworkActivity:e=>{},markError:(e,t)=>{},markCustomEvent:(e,t)=>{},markMeasurement:(e,t,n)=>({markProps:{measurement:0}}),config:()=>{},__attachAllowedMonitors:()=>{},whenAllMarksMade:()=>{},getAllMarks:()=>[],__detachAllMonitors:()=>{}},U=window.rum||B,W=U.markTime,j=U.markMeasurement,V=U.config,G=U.__attachAllowedMonitors,q=U.whenAllMarksMade,H=U.getAllMarks,z=U.__detachAllMonitors,K=U.markCustomEvent,J=B;let Y,X;const Q={setItem:()=>{},getItem:()=>{},removeItem:()=>{},clear:()=>{}};try{window.sessionStorage.removeItem("__not-there__"),Y=window.sessionStorage}catch(jo){console.warn("sessionStorage not available"),Y=Q}try{window.localStorage.removeItem("__not-there__"),X=window.localStorage}catch(jo){console.warn("localStorage not available"),X=Q}const Z=Y,ee=X;let te="on"===ee.getItem("app-shell-debug");!te&&location.search.includes("app-shell-debug")&&(ee.setItem("app-shell-debug","on"),te=!0);const ne=(e,t)=>`\n color:${e};\n background-color:${t};\n padding: 1px 3px;\n border-radius: 4px;\n`,oe=(...e)=>console.info("%cAPP SHELL INFO",ne("#fff","#40e0d0"),...e),ae=(...e)=>console.log("%cAPP SHELL WARNING",ne("#fff","#fdd365"),...e),ie=(...e)=>te&&((...e)=>console.log("%cAPP SHELL LOG",ne("#fff","#777"),...e))(...e),re=(...e)=>te&&oe(...e),se=(...e)=>te&&console.info(...e),le=(...e)=>ae(...e),ce=(...e)=>((...e)=>console.error("%cAPP SHELL ERROR",ne("#fff","#f67280"),...e))(...e),ue=(...e)=>te&&((...e)=>console.groupCollapsed("%cAPP SHELL INFO",ne("#fff","#40e0d0"),...e))(...e),de=()=>te,pe={log:ie,info:re,warn:le,error:ce,isDebugging:de};function fe(e=(()=>{}),t=4e3){window.requestIdleCallback?window.requestIdleCallback(e,{timeout:t}):"complete"===document.readyState?setTimeout(e,t):document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&setTimeout(e,t)})}const me=e=>e&&e.includes("Safari")&&!e.includes("Chrome"),he={},ge=()=>Object.values(he).map(e=>e.contentWindow),ve=(e=window)=>!!we(e),we=(e=window)=>Object.values(he).find(t=>t.contentWindow===e),be=()=>{const e=document.createElement("iframe");return e.src="/ui-gateway/feature-frame-v5.html",e.setAttribute("seamless","seamless"),e.setAttribute("allowfullscreen",""),e},ye=(e,t={})=>{const n=t&&t.error||{},o={...t,name:t.name,message:t.message||t.reason||n.message,fileName:t.fileName,lineNumber:t.lineNumber||t.lineno,columnNumber:t.columnNumber||t.colno,stack:t.stack||n.stack};setTimeout(()=>{const{version:t}=window.inGlobalContext.appShell.getFeatureContext(e);window.rum.markError(o,{featureName:e,featureVersion:t})},200)},Ce=async({featureName:e,container:t,initialLocation:n,onSrcChange:o,frameScopedRootDOM:a})=>{const i=W("start-initialize-feature-frame-"+e),r=window,s=(e=>{const t=e.querySelector("[preload-iframe]");let n;return t?(n=t,t.removeAttribute("preload-iframe")):(n=be(),e.appendChild(n)),n})(t);s.id="feature-frame:"+e,s.style.display="block";const l=s.contentWindow;he[e]=s,await new Promise((e,t)=>{const n=()=>{var t;if(null!==(t=l.location.pathname)&&void 0!==t&&t.startsWith("/ui-gateway/feature-frame-v5.html")&&s.contentDocument&&s.contentDocument.body){if(l.inGlobalContext=l.inGlobalContext||{},l.inGlobalContext.frame={...l.inGlobalContext.frame||{},isInIframe:!0,isFeatureFrame:!0},s.contentDocument.body.style&&s.contentDocument.documentElement.style){const e={height:"100%",width:"100%"};Object.assign(s.contentDocument.documentElement.style,e),Object.assign(s.contentDocument.body.style,e)}return e(s)}const o=r.location.search.includes("frame-cb")?parseInt(new URL(r.location.href).searchParams.get("frame-cb"),10):0;if(l.location.href.startsWith("http")&&!l.location.pathname.startsWith("/ui-gateway/feature-frame-v5.html")&&!(o&&Date.now()-o<5e3)){le("iFrame loaded but is not loading feature-frame.html. App Shell considers this a cached frame state and is attempting to force the frame to the correct location",{currentFrameHref:l.location.href});const e=new URL(r.location.href);return e.searchParams.set("frame-cb",Date.now()),void r.location.replace(e.toString())}setTimeout(n,10)};n(),s.onerror=e=>t(e)}),l.history.replaceState(null,null,n);const c=s.contentDocument;l.postMessage=function(...e){return r.postMessage(...e)};const u=l.addEventListener;l.messageSourceRefs=[];const d=e=>({type:e.type,target:e.target,data:e.data,origin:e.origin,source:void 0,ports:e.ports});l.addEventListener("message",(function(e){try{const t=d(e),n=new MessageEvent("message",t);let o=l.messageSourceRefs.indexOf(e.source);-1===o&&(o=l.messageSourceRefs.length,l.messageSourceRefs.push(e.source)),n.messageSourceRefsEntryIndex=o,r.dispatchEvent(n)}catch(e){ce(e)}})),l.addEventListener=function(e,t,...n){return"message"===e?a(l).addEventListener(e,(function(e,...n){const o=d(e);return void 0!==e.messageSourceRefsEntryIndex&&l.messageSourceRefs&&(o.source=l.messageSourceRefs[e.messageSourceRefsEntryIndex]),t(o,...n)}),...n):u(e,t,...n)},l.inGlobalContext=r.inGlobalContext,l.rum=r.rum,l.measure=r.measure,l.analytics=r.analytics,l.DD_RUM=r.DD_RUM,l.__REACT_DEVTOOLS_GLOBAL_HOOK__=r.__REACT_DEVTOOLS_GLOBAL_HOOK__;const p=window.navigator.userAgent;if(me(p)&&c.addEventListener("visibilitychange",()=>{if(!c.hidden){ie("Attempting to trigger repaint on visibility change");const e=c.body,t=e.scrollTop,n=c.documentElement,o=n.scrollTop;e.style.visibility="hidden",e.offsetHeight,e.style.visibility="visible",e.scrollTop=t,n.scrollTop=o}}),l.addEventListener("hashchange",()=>{o(l.location.href)}),l.__errorHandler=ye.bind(l,e),l.addEventListener("error",l.__errorHandler),l.addEventListener("unhandledrejection",l.__errorHandler),window.MutationObserver){const e=c.querySelector("head > title");new window.MutationObserver((function(e){e.forEach((function(e){r.document.title=e.target.textContent}))})).observe(e,{subtree:!0,characterData:!0,childList:!0})}G(l);const f=W("end-initialize-feature-frame-"+e),m=j("time-to-initialize-feature-frame-"+e,i,f);return re(`Initializing frame for ${e} took ${m.markProps.measurement}ms`),fe(()=>{if(!t.querySelector("[preload-iframe]")){const e=be();e.setAttribute("preload-iframe","1"),t.appendChild(e)}}),{frame:s,document:c,window:l}},Se=e=>{const t=Ee(e);if(t){try{t.contentWindow.__errorHandler&&(t.contentWindow.removeEventListener("error",t.contentWindow.__errorHandler),t.contentWindow.removeEventListener("unhandledrejection",t.contentWindow.__errorHandler)),t.contentDocument&&(t.contentDocument.__destroyingFeatureFrame=!0),z(t.contentWindow),t.contentWindow.rum&&(t.contentWindow.rum={...t.contentWindow.rum,...J})}catch(e){ce("Failed to cleanly destroy feature frame",e)}t.remove()}ke(e)},Ne=e=>{const t=Re(e);t&&t.focus()},Re=e=>he[e]&&he[e].contentWindow||window,_e=e=>Re(e).document,Ee=e=>he[e],xe=()=>ve(window)?parent:window,ke=e=>{he[e]&&delete he[e]};var Ae=Object.freeze({__proto__:null,getCurrentFeatureFrameWindows:ge,isFeatureFrame:ve,getFeatureFrameByWindow:we,isWindowTheRootFrame:()=>!window.inGlobalContext||!(window.inGlobalContext.frame&&window.inGlobalContext.frame.isFeatureFrame||window.inGlobalContext.appShell&&window.inGlobalContext.appShell.frameManager.isFeatureFrame(window)),initializeFeatureFrame:Ce,destroyFeatureFrame:Se,focusFeatureFrame:Ne,getFeatureFrameWindow:Re,getFeatureFrameDocument:_e,getFeatureFrame:Ee,getAppShellRootWindow:xe,dropFrameReferences:ke});const Pe=["Googlebot\\/","Googlebot-Mobile","Googlebot-Image","Googlebot-News","Googlebot-Video","AdsBot-Google([^-]|$)","AdsBot-Google-Mobile","Feedfetcher-Google","Mediapartners-Google","Mediapartners \\(Googlebot\\)","APIs-Google","bingbot","Slurp","[wW]get","LinkedInBot","Python-urllib","python-requests","libwww-perl","httpunit","nutch","phpcrawl","msnbot","jyxobot","FAST-WebCrawler","FAST Enterprise Crawler","BIGLOTRON","Teoma","convera","seekbot","Gigabot","Gigablast","exabot","ia_archiver","GingerCrawler","webmon ","HTTrack","grub.org","UsineNouvelleCrawler","antibot","netresearchserver","speedy","fluffy","findlink","msrbot","panscient","yacybot","AISearchBot","ips-agent","tagoobot","MJ12bot","woriobot","yanga","buzzbot","mlbot","YandexBot","YandexImages","YandexAccessibilityBot","YandexMobileBot","purebot","Linguee Bot","CyberPatrol","voilabot","Baiduspider","citeseerxbot","spbot","twengabot","postrank","TurnitinBot","scribdbot","page2rss","sitebot","linkdex","Adidxbot","ezooms","dotbot","Mail.RU_Bot","discobot","heritrix","findthatfile","europarchive.org","NerdByNature.Bot","sistrix crawler","Ahrefs(Bot|SiteAudit)","fuelbot","CrunchBot","IndeedBot","mappydata","woobot","ZoominfoBot","PrivacyAwareBot","Multiviewbot","SWIMGBot","Grobbot","eright","Apercite","semanticbot","Aboundex","domaincrawler","wbsearchbot","summify","CCBot","edisterbot","seznambot","ec2linkfinder","gslfbot","aiHitBot","intelium_bot","facebookexternalhit","Yeti","RetrevoPageAnalyzer","lb-spider","Sogou","lssbot","careerbot","wotbox","wocbot","ichiro","DuckDuckBot","lssrocketcrawler","drupact","webcompanycrawler","acoonbot","openindexspider","gnam gnam spider","web-archive-net.com.bot","backlinkcrawler","coccoc","integromedb","content crawler spider","toplistbot","it2media-domain-crawler","ip-web-crawler.com","siteexplorer.info","elisabot","proximic","changedetection","arabot","WeSEE:Search","niki-bot","CrystalSemanticsBot","rogerbot","360Spider","psbot","InterfaxScanBot","CC Metadata Scaper","g00g1e.net","GrapeshotCrawler","urlappendbot","brainobot","fr-crawler","binlar","SimpleCrawler","Twitterbot","cXensebot","smtbot","bnf.fr_bot","A6-Indexer","ADmantX","Facebot","OrangeBot\\/","memorybot","AdvBot","MegaIndex","SemanticScholarBot","ltx71","nerdybot","xovibot","BUbiNG","Qwantify","archive.org_bot","Applebot","TweetmemeBot","crawler4j","findxbot","S[eE][mM]rushBot","yoozBot","lipperhey","Y!J","Domain Re-Animator Bot","AddThis","Screaming Frog SEO Spider","MetaURI","Scrapy","Livelap[bB]ot","OpenHoseBot","CapsuleChecker","collection@infegy.com","IstellaBot","DeuSu\\/","betaBot","Cliqzbot\\/","MojeekBot\\/","netEstate NE Crawler","SafeSearch microdata crawler","Gluten Free Crawler\\/","Sonic","Sysomos","Trove","deadlinkchecker","Slack-ImgProxy","Embedly","RankActiveLinkBot","iskanie","SafeDNSBot","SkypeUriPreview","Veoozbot","Slackbot","redditbot","datagnionbot","Google-Adwords-Instant","adbeat_bot","WhatsApp","contxbot","pinterest.com.bot","electricmonk","GarlikCrawler","BingPreview\\/","vebidoobot","FemtosearchBot","Yahoo Link Preview","MetaJobBot","DomainStatsBot","mindUpBot","Daum\\/","Jugendschutzprogramm-Crawler","Xenu Link Sleuth","Pcore-HTTP","moatbot","KosmioBot","pingdom","AppInsights","PhantomJS","Gowikibot","PiplBot","Discordbot","TelegramBot","Jetslide","newsharecounts","James BOT","Bark[rR]owler","TinEye","SocialRankIOBot","trendictionbot","Ocarinabot","epicbot","Primalbot","DuckDuckGo-Favicons-Bot","GnowitNewsbot","Leikibot","LinkArchiver","YaK\\/","PaperLiBot","Digg Deeper","dcrawl","Snacktory","AndersPinkBot","Fyrebot","EveryoneSocialBot","Mediatoolkitbot","Luminator-robots","ExtLinksBot","SurveyBot","NING\\/","okhttp","Nuzzel","omgili","PocketParser","YisouSpider","um-LN","ToutiaoSpider","MuckRack","Jamie's Spider","AHC\\/","NetcraftSurveyAgent","Laserlikebot","^Apache-HttpClient","AppEngine-Google","Jetty","Upflow","Thinklab","Traackr.com","Twurly","Mastodon","http_get","DnyzBot","botify","007ac9 Crawler","BehloolBot","BrandVerity","check_http","BDCbot","ZumBot","EZID","ICC-Crawler","ArchiveBot","^LCC ","filterdb.iss.net\\/crawler","BLP_bbot","BomboraBot","Buck\\/","Companybook-Crawler","Genieo","magpie-crawler","MeltwaterNews","Moreover","newspaper\\/","ScoutJet","(^| )sentry\\/","StorygizeBot","UptimeRobot","OutclicksBot","seoscanners","Hatena","Google Web Preview","MauiBot","AlphaBot","SBL-BOT","IAS crawler","adscanner","Netvibes","acapbot","Baidu-YunGuanCe","bitlybot","blogmuraBot","Bot.AraTurka.com","bot-pge.chlooe.com","BoxcarBot","BTWebClient","ContextAd Bot","Digincore bot","Disqus","Feedly","Fetch\\/","Fever","Flamingo_SearchEngine","FlipboardProxy","g2reader-bot","G2 Web Services","imrbot","K7MLWCBot","Kemvibot","Landau-Media-Spider","linkapediabot","vkShare","Siteimprove.com","BLEXBot\\/","DareBoost","ZuperlistBot\\/","Miniflux\\/","Feedspot","Diffbot\\/","SEOkicks","tracemyfile","Nimbostratus-Bot","zgrab","PR-CY.RU","AdsTxtCrawler","Datafeedwatch","Zabbix","TangibleeBot","google-xrawler","axios","Amazon CloudFront","Pulsepoint","CloudFlare-AlwaysOnline","Google-Structured-Data-Testing-Tool","WordupInfoSearch","WebDataStats","HttpUrlConnection","Seekport Crawler","ZoomBot","VelenPublicWebCrawler","MoodleBot","jpg-newsbot","outbrain","W3C_Validator","Validator\\.nu","W3C-checklink","W3C-mobileOK","W3C_I18n-Checker","FeedValidator","W3C_CSS_Validator","W3C_Unicorn","Google-PhysicalWeb","Blackboard","ICBot\\/","BazQux","Twingly","Rivva","Experibot","awesomecrawler","Dataprovider.com","GroupHigh\\/","theoldreader.com","AnyEvent","Uptimebot\\.org","Nmap Scripting Engine","2ip.ru","Clickagy","Caliperbot","MBCrawler","online-webceo-bot","B2B Bot","AddSearchBot","Google Favicon","HubSpot","Chrome-Lighthouse","HeadlessChrome","CheckMarkNetwork\\/","www\\.uptime\\.com","Streamline3Bot\\/","serpstatbot\\/","MixnodeCache\\/","^curl","SimpleScraper","RSSingBot","Jooblebot","fedoraplanet","Friendica","NextCloud","Tiny Tiny RSS","RegionStuttgartBot","Bytespider","Datanyze","Google-Site-Verification","Asana"].map(e=>new RegExp(e)),Fe=({url:e,featureConfigs:t,origin:n,userAgent:o})=>{if(!e||!t)return null;const a=new URL(e);let i,r=null;return n&&n!==a.origin||(r=Object.values(t).find(e=>(e.navigationRules||[]).filter(Boolean).find(e=>{const{commonMatcher:t,pathRegex:n,pathStartsWith:r}=e;let s=!1;return n?s=a.pathname.match(n):r&&(s=0===a.pathname.indexOf(r)),s&&"bot"===t&&(s=Pe.some(e=>e.test(o))),s&&(i=e),s}))),r?{feature:r,navigationRule:i}:null},Oe=(e={navigationRule:null})=>!!e&&!!e.navigationRule&&"controlled"===e.navigationRule.type,Te=({url:e,feature:t})=>{if(M[e]){var n;const{featureConfigKey:o}=M[e];return!!(null==t||null===(n=t.allowedDomains)||void 0===n||!n[o])}return!1},Le=({url:e,protocol:t})=>`${t}//${M[e].redirectUrl}?redirect-reason=reserved-domain`;let $e=window.location.href;const Me={onNavigate({url:e,featureConfigs:t,mountNextApplication:n,clickEvent:o,forceRemount:a,unmanagedFrameUnload:i,fromPopState:r}){const s=xe(),l=Fe({url:e,featureConfigs:t,origin:s.location.origin,userAgent:navigator.userAgent}),u=c(),p=e?new URL(e,location.origin):null,f=p&&p.href!==s.location.href;if(Oe(l)){const t=l.feature.featureName,h=t!==u,g=Re(u),v=window.inGlobalContext.appShell;if(p&&Te({url:p.hostname,feature:l.feature})){const e=Le({url:p.hostname,protocol:p.protocol});re(`navigation triggered redirect for reserved domain for app: ${t} to url: ${e}`),location.assign(e)}const w=a||i&&!o&&!h;if(ie("Navigation location is controlled",{navigatedToDifferentApp:h,shouldForceRemount:w,hasClickEvent:!!o,unmanagedFrameUnload:i,lastKnownUrl:$e,fromPopState:r}),d()>15)return re(`Max app transition depth exceeded (${d()}), this app transition will be a full page navigation.`),void s.location.assign(e);if(h||w){const a=h&&v.getFeatureContext(u).shouldRunAsStandaloneApp(),l=v.getFeatureContext(t).shouldForceFullLoadOnNavigation();if(a||l)return re("navigation triggering full load",{navigatingAwayFromStandaloneApp:a,featureDeterminedFullLoad:l}),void location.assign(e);if(h&&(o||r)){const{propagationStopped:e}=window.inGlobalContext.appShell.emit(`${C.BEFORE}:${S.APP_NAVIGATION}`,{currentFeatureName:c()},!0);if(e){if(o)return void(o&&o.preventDefault());var m;if(r)return s.history.replaceState(null,null,$e),void(null!=g&&null!==(m=g.history)&&void 0!==m&&m.__originalReplaceState&&g.history.__originalReplaceState(null,null,$e))}}return(i||o&&o.preventDefault)&&(o&&o.preventDefault(),f&&s.history.pushState(null,null,e)),$e=e,n(t,w)}if(g.location.href!==e&&g.history.__originalReplaceState&&g.history.__originalReplaceState(null,null,e),o&&o.preventDefault&&(o&&o.preventDefault(),f&&s.history.pushState(null,null,e),!h)){const e=new g.PopStateEvent("popstate",{state:g.history.state});g.dispatchEvent(e)}$e=e}else e&&(s.location.href=e)},handlePopstate:(e,t)=>()=>{ie("Nav Interception: popstate detected",{inFrame:window!==top,href:location.href}),Me.onNavigate({url:location.href,featureConfigs:e,mountNextApplication:t,fromPopState:!0})},handleAnchorClicked:(e,t,n)=>o=>{try{const{metaKey:a,defaultPrevented:i}=o,{href:r}=e;if(ie("Nav Interception: anchor click detected",{href:r,metaKey:a,defaultPrevented:i}),a||i)return;Me.onNavigate({url:r,featureConfigs:t,mountNextApplication:n,clickEvent:o})}catch(e){return void ce("Error handling anchor click",e)}},handleDocumentClick:(e,t,n)=>o=>{const{target:a}=o,i="A"===a.nodeName?a:a.closest("a");switch(!0){case!i:case i.matches('[target="_blank"]'):case!i.getAttribute("href"):case i.getAttribute("href").startsWith("#"):return}const r=Me.handleAnchorClicked(i,t,n),s=t=>{r(t),e.removeEventListener("click",s,!1)};e.addEventListener("click",s,!1)},handleFrameNavigation:(e,t,n)=>{const o=function(){setTimeout((function(){if(!e||!e.location||!e.document||!0===e.document.__destroyingFeatureFrame)return;const o=e.location.href===xe().location.href,a=o&&!(e.document&&e.document.body);!(e.location.href&&!e.location.href.startsWith("about"))||o&&!a||(ie("Frame unload detected, navigation starting",{matchingUrls:o,forceRemount:a,url:e.location.href}),Me.onNavigate({url:e.location.href,unmanagedFrameUnload:!0,featureConfigs:t,mountNextApplication:n,forceRemount:a}))}),0)};function a(){e.removeEventListener("unload",o),e.addEventListener("unload",o)}e.addEventListener("load",a),a()}};function De(e=window,t,n,o){if(ve(e)){Me.handleFrameNavigation(e,t,n),e.history.__originalPushState=e.history.pushState,e.history.__originalReplaceState=e.history.replaceState,e.history.__originalGo=e.history.go,e.history.__originalBack=e.history.back,e.history.go=function(...e){ie("Nav Interception: frame history.go() detected: "+e[0]),xe().history.go(...e)},e.history.back=function(...e){ie("Nav Interception: frame history.back() detected: "+e[0]),xe().history.back(...e)},e.history.pushState=function(...t){ie("Nav Interception: frame history.pushState() detected: "+t[2]),xe().history.pushState(...t),e.history.__originalReplaceState(...t)},e.history.replaceState=function(...t){ie("Nav Interception: frame history.replaceState() detected: "+t[2]),xe().history.replaceState(...t),e.history.__originalReplaceState(...t)};const a=e.addEventListener;e.addEventListener=function(t,...n){return"popstate"===t&&o(e).addEventListener(t,...n),a(t,...n)};const i=e.removeEventListener;e.removeEventListener=function(t,...n){return o(e).removeEventListener(t,...n),i(t,...n)}}else{e.addEventListener("popstate",Me.handlePopstate(t,n));const o=e.history.pushState;e.history.pushState=function(...t){const[,,n]=t;return $e=n,o.call(e.history,...t)};const a=e.history.replaceState;e.history.replaceState=function(...t){const[,,n]=t;return $e=n,a.call(e.history,...t)}}e.document.addEventListener("click",Me.handleDocumentClick(e.document,t,n),!0)}const{thirdPartyManager:Ie={}}=window.inGlobalContext||{},{thirdParties:Be={},resetLoadTracking:Ue=(()=>{}),load:We=(()=>{})}=Ie||{},je=[Be.NEW_RELIC];var Ve={legacy:{name:"legacy",browserslist:[">0.2%","not dead","ie 11","not ie < 11","not op_mini all"],regex:/((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(12[_.]2|12[_.]([3-9]|\d{2,})|12[_.]5|12[_.]([6-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})[_.]\d+|13[_.]4|13[_.]([5-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|((?:Chrome).*OPR\/(82\.0|82\.([1-9]|\d{2,})|(8[3-9]|9\d|\d{3,})\.\d+)\.\d+)|(SamsungBrowser\/(16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+))|(Edge\/(96(?:\.0)?|96(?:\.([1-9]|\d{2,}))?|(9[7-9]|\d{3,})(?:\.\d+)?))|((Chromium|Chrome)\/(93\.0|93\.([1-9]|\d{2,})|(9[4-9]|\d{3,})\.\d+)(?:\.\d+)?)|(Version\/(13\.1|13\.([2-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Trident\/7\.0)|(Firefox\/(95\.0|95\.([1-9]|\d{2,})|(9[6-9]|\d{3,})\.\d+)\.\d+)|(Firefox\/(95\.0|95\.([1-9]|\d{2,})|(9[6-9]|\d{3,})\.\d+)(pre|[ab]\d+[a-z]*)?)|(([MS]?IE) (11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+))/},modern:{name:"modern",browserslist:["last 2 Chrome versions","last 2 Safari versions","last 2 Firefox versions","last 2 Edge versions","last 2 iOS versions","last 2 ChromeAndroid versions"],regex:/((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|(Edge\/(97(?:\.0)?|97(?:\.([1-9]|\d{2,}))?|(9[8-9]|\d{3,})(?:\.\d+)?))|((Chromium|Chrome)\/(97\.0|97\.([1-9]|\d{2,})|(9[8-9]|\d{3,})\.\d+)(?:\.\d+)?)|(Version\/(15\.1|15\.([2-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(96\.0|96\.([1-9]|\d{2,})|(9[7-9]|\d{3,})\.\d+)\.\d+)|(Firefox\/(96\.0|96\.([1-9]|\d{2,})|(9[7-9]|\d{3,})\.\d+)(pre|[ab]\d+[a-z]*)?)/},serviceWorker:{name:"service-worker",browserslist:["Edge >= 17","Firefox >= 44","Chrome >= 45","ChromeAndroid >= 81","Safari >= 11","iOS >= 11"],regex:/((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(11[_.]0|11[_.]([1-9]|\d{2,})|11[_.]2|11[_.]([3-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})[_.]\d+|12[_.]0|12[_.]([1-9]|\d{2,})|12[_.]5|12[_.]([6-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})[_.]\d+|13[_.]0|13[_.]([1-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|(CFNetwork\/8.* Darwin\/17\.0\.\d+)|(CFNetwork\/8.* Darwin\/17\.2\.\d+)|(CFNetwork\/8.* Darwin\/17\.3\.\d+)|(CFNetwork\/8.* Darwin\/17\.\d+)|(Edge\/(17(?:\.0)?|17(?:\.([1-9]|\d{2,}))?|(1[8-9]|[2-9]\d|\d{3,})(?:\.\d+)?|79(?:\.0)?|79(?:\.([1-9]|\d{2,}))?|([8-9]\d|\d{3,})(?:\.\d+)?|83(?:\.0)?|83(?:\.([1-9]|\d{2,}))?|(8[4-9]|9\d|\d{3,})(?:\.\d+)?))|((Chromium|Chrome)\/(45\.0|45\.([1-9]|\d{2,})|(4[6-9]|[5-9]\d|\d{3,})\.\d+|83\.0|83\.([1-9]|\d{2,})|(8[4-9]|9\d|\d{3,})\.\d+)(?:\.\d+)?([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$)))|(Version\/(11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+|12\.0|12\.([1-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})\.\d+|13\.0|13\.([1-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(44\.0|44\.([1-9]|\d{2,})|(4[5-9]|[5-9]\d|\d{3,})\.\d+)\.\d+)|(Firefox\/(44\.0|44\.([1-9]|\d{2,})|(4[5-9]|[5-9]\d|\d{3,})\.\d+)(pre|[ab]\d+[a-z]*)?)/}};const Ge=({featureName:e,manifest:t={},userAgent:n,devSettings:o,forcedSettings:a})=>{var i,r,s;const{criticalPathFiles:l,criticalPathFilesForUpstreamDevelopment:c,legacyBrowserCriticalPathFiles:u}=t,d=!(null==o||null===(i=o.features)||void 0===i||!i.length),p=!(null!=a&&a.developmentVariantsDisabled||null==c||!c.length),f=(null==a||null===(r=a.forcedFeatureVersions)||void 0===r?void 0:r[e])||(null==a||null===(s=a.forcedRprVersions)||void 0===s?void 0:s[e]);return d&&p&&!f?c:u&&u.length?(e=>!(!e||!new RegExp(Ve.modern.regex).test(e)))(n)?l:u:l};function qe(e,t){return new URL(e,t).origin!==t}function He(e,t=window.location.origin){const n=new URL(e,t).origin;return n.endsWith(".invisionapp.com")||n.endsWith(".invisionbeta.com")||n.match(/invision\.works(:\d{0,5})?$/)||n.match(/^(http(s)?:\/\/)?[\w-]+(:\d{0,5})?$/)}const ze={featureName:"sidebar",gspName:"sidebar",devConfig:{port:8181,manifestRoute:"/local-manifest"},envContext:{default:{uiVariantContext:{msteams:{visibilityMode:"always-open",hideLogo:!0,hideDSM:!0,hidePeople:!0,hideIntegrations:!0}}}}};function Ke(e=window,{featureConfigs:t}){if(e.__debuggingUtils__)return;e.__debuggingUtils__={listeners:{listenersCount:0,listenerRefs:[],ignoredListenerRefs:[],breakOnTypesAdded:[],breakOnTypesRemoved:[]},globals:{}};const n=t=>{let n=!1;return e.__debuggingUtils__.listeners.listenerRefs=e.__debuggingUtils__.listeners.listenerRefs.filter(o=>!(!n&&o.args[0]===t[0]&&o.args[1]===t[1]&&(o.args[2]||!1)===(t[2]||!1))||(n=!0,e.__debuggingUtils__.listeners.listenersCount--,!1)),n},o=e.EventTarget.prototype.addEventListener,a=e.EventTarget.prototype.removeEventListener;e.EventTarget.prototype.addEventListener=function(...a){let i=null,r=null;try{throw new Error("IGNORE THIS ERROR, THROWN TO CAPTURE STACK")}catch(e){i=e.stack,r=function({stackTrace:e,featureConfigs:t,traceStartOffset:n=0}){const o={featureStack:[],weightedFeatureDistributions:[],initializedByFeature:null};if(!e)return o;const a={};for(let[e,n]of Object.entries(t))a[`https://static.invisionapp-cdn.com/spa/${n.gspName}/`]=e,n.devConfig&&n.devConfig.port&&(a["http://localhost:"+n.devConfig.port]=e,a["https://localhost:"+n.devConfig.port]=e);const i=e.match(/https?:\/\/[\w\d.\-\d:@]+\/[^\n\r:]*/gim).slice(n).map(e=>{let t="";for(let[n,o]of Object.entries(a))e.startsWith(n)&&(t=o);return t||(t="unknown"),t});let r=null,s=0;const l=["bugnsag","react","react-dom","styled-components"],c=i.reduce((e,t,n)=>{const o=e[t]||0;return l.includes(t)?e[t]=o+.01:e[t]=o+10+(2*i.length-n),e[t]>s&&(s=e[t],r=t),e},{});return o.featureStack=i,o.initializedByFeature=r,o.weightedFeatureDistributions=c,o}({stackTrace:i,featureConfigs:t,traceStartOffset:1})}if(null===(s=i.split("\n")[1])||void 0===s?void 0:s.includes("at XMLHttpRequest"))return e.__debuggingUtils__.listeners.ignoredListenerRefs.push({args:a,stack:i,eventType:a[0],featureStack:r}),o.call(this,...a);var s;e.__debuggingUtils__.listeners.listenersCount++,e.__debuggingUtils__.listeners.listenerRefs.push({args:a,stack:i,eventType:a[0],featureStack:r});const[l,c,u]=a;let d=c;if(u&&!0===u.once&&(d=function(...e){n(e),c.call(this,...e)}),e.__debuggingUtils__.listeners.breakOnTypesAdded.includes(l))debugger;return o.call(this,l,d,u)},e.EventTarget.prototype.removeEventListener=function(...t){n(t);if(e.__debuggingUtils__.listeners.breakOnTypesRemoved.includes(t[0]))debugger;return a.call(this,...t)},xe()===e&&(e.__debuggingUtils__.listeners.aggregateMonitors=()=>ge().map(e=>e.__debuggingUtils__.listeners).concat([xe().__debuggingUtils__.listeners]).reduce((e,t)=>(e.listenersCount+=t.listenersCount,e.listenerRefs.push(t.listenerRefs),e),{listenersCount:0,listenerRefs:[]}),e.__debuggingUtils__.listeners.getFeatureOwnedListeners=t=>e.__debuggingUtils__.listeners.aggregateMonitors().listenerRefs.reduce((e,n)=>(n.forEach(n=>{(n.featureStack.initializedByFeature||"").toLowerCase()===t.toLowerCase()&&(e.listenersCount++,e.listenerRefs.push(n))}),e),{listenersCount:0,listenerRefs:[]}),e.__debuggingUtils__.listeners.getFeatureOwnedListenersGroupedByType=t=>e.__debuggingUtils__.listeners.getFeatureOwnedListeners(t).listenerRefs.reduce((e,t)=>(e[t.eventType]||(e[t.eventType]=[]),e[t.eventType].push(t),e),{}),e.__debuggingUtils__.listeners.breakOnListenerAdded=t=>{e.__debuggingUtils__.listeners.breakOnTypesAdded.push(t)},e.__debuggingUtils__.listeners.breakOnListenerRemoved=t=>{e.__debuggingUtils__.listeners.breakOnTypesRemoved.push(t)},e.__debuggingUtils__.listeners.featureOwned={},setInterval(()=>{e.__debuggingUtils__.listeners.featureOwned=e.__debuggingUtils__.listeners.aggregateMonitors().listenerRefs.reduce((e,t)=>(t.forEach(t=>{const n=(t.featureStack.initializedByFeature||"").toLowerCase();e[n]=e[n]||{listenersCount:0,listenerRefs:[]},e[n].listenersCount++,e[n].listenerRefs.push(t)}),e),{})},1300),e.__debuggingUtils__.globals.getGlobalVariablesOfDocument=function(e=window){const t=["0","1","2","3","4","app-shell","messageSourceRefs","frameScopeKey","__APP_SHELL_PRELOADED_REQUESTS__","addEventListener","__REQUESTLY__","__REACT_DEVTOOLS_GLOBAL_HOOK__","__REDUX_DEVTOOLS_EXTENSION__","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","GetParams","devToolsExtension","__errorHandler","__rumMonitors","removeEventListener","__debuggingUtils__","setImmediate","clearImmediate","InVisionApp","__whmEventSourceWrapper","__webpack_hot_middleware_reporter__","_typeof","utilitiesChecksum","__InvTourAnchoredTours","inGlobalContext","rum","Prism","normalize","pendo","hj","_hjSettings","hjSiteSettings","hjBootstrap","hjBootstrapCalled","amplitude","measure","analytics","DD_RUM","__storageConsentAdded","StorageConsent","cloudGlobalAsync"],n=e.document.createElement("iframe");n.src="about:blank",e.document.body.appendChild(n);const o=Object.keys(n.contentWindow),a=Object.keys(e).filter(e=>!o.includes(e)&&!t.includes(e));return e.document.body.removeChild(n),a},e.__debuggingUtils__.globals.getGlobalVariablesOfCurrentFeature=function(){return e.__debuggingUtils__.globals.getGlobalVariablesOfDocument(e.inGlobalContext.appShell.currentApp.getFeatureContext().getFeatureFrameWindow())},e.__debuggingUtils__.listeners.checkLeakingListenersOfCurrentFeature=function({forceRun:t=!1}={}){if(!e.inGlobalContext.appShell.currentApp.isEntryApp()&&!t)return void console.log("%cSkipping the leaking listeners check: for optimal results, we recommend running this check on a freshly loaded feature (just refresh your current page and re-run this function).\n Alternatively, invoke this function with the { forceRun: true } parameter.","color: #e59400; font-weight: 600;");const n=e.inGlobalContext.appShell.currentApp.getFeatureContext().featureName;console.log(`Checking leaking listeners of "${n}"... This process requires a redirect to an empty feature.`);const o=()=>{const e=window.__debuggingUtils__.listeners.aggregateMonitors().listenerRefs.flat().filter(e=>(e.featureStack.initializedByFeature||"").toLowerCase()===n),t=e.filter(e=>/(at HTMLDocument|at HTMLHtmlElement|at HTMLBodyElement|at HTMLHeadElement)/.test(e.stack));console.log(`Leaked listeners of "${n}":`,e),console.log(`Leaked listeners of "${n}" attached to globally shared DOM elements:`,t),window.inGlobalContext.appShell.off("after:mount",o)};window.inGlobalContext.appShell.on("after:mount",o),window.inGlobalContext.appShell.navigate("/demo-react-app")})}async function Je({rootFeatureName:e,rootResourceVersion:t,getManifest:n,forcedSettings:o={},requiredOnly:a}){const i=[],r=async({featureName:e,requiredBy:t,resourceVersion:s})=>{var l,c,u,d,p,f,m;const h=await n(e),g=null===(l=h.releases)||void 0===l||null===(c=l[s])||void 0===c?void 0:c.proxyVersion;g&&(s=g);const v=Object.entries((null==h?void 0:h.releases)||{}).filter(([,e])=>e.proxyVersion===s).map(([e])=>e),w=null==o||null===(u=o.forcedRprVersions)||void 0===u?void 0:u[e];if(w)s=w;else if(null!=o&&null!==(d=o.forcedFeatureVersions)&&void 0!==d&&d[e]&&(null==o||!o.previewRprReleases)&&null!=h&&h.releases)for(const e in h.releases){var b;null!==(b=h.releases[e])&&void 0!==b&&b.manifest&&(h.releases[e].manifest={...h},delete h.releases[e].manifest.releases)}const y=s?null==h||null===(p=h.releases)||void 0===p||null===(f=p[s])||void 0===f||null===(m=f.manifest)||void 0===m?void 0:m.runtimeProvidedResourcesCollection:null==h?void 0:h.runtimeProvidedResourcesCollection;let C={};if(a?Object.entries(y||{}).forEach(([e,t])=>{t.loadStrategy&&"before_mount"!==t.loadStrategy||(C[e]=t)}):C=y,C&&Object.keys(C).length>0)for(const[t,n]of Object.entries(C))await r({featureName:t,requiredBy:s?`${e}@${s}`:e,resourceVersion:n.version});if(s){const n=i.find(t=>t.name===e&&t.version===s);n?n.requiredBy.includes(t)||n.requiredBy.push(t):i.push({name:e,version:s,manifest:h.releases[s].manifest,requiredBy:t?[t]:[],proxiedBy:v})}};return await r({featureName:e,resourceVersion:t}),i}let Ye;function Xe(){if(!Ye)try{const{dataset:t}=document.getElementById("runtimeContext");Ye=JSON.parse((e=t.uiRuntimeContext)&&e.replace(/'/g,"'"))}catch(e){throw ce("FATAL ERROR - could not parse runtime context"),ce(e),e}var e;return Ye}const Qe=Xe(),Ze="app-shell:sidebar-root";let et={};function tt(e,t){if(et[e]){let n;for(;n=et[e].shift();)n(t);delete et[e]}}async function nt(e=document,t,n){if(t.getAttribute("app-shell-injected-from")===n)return;const o=await fetch(n),a=await o.text();t.setAttribute("app-shell-injected-from",n),async function(e=document,t,n){const o=e.createRange().createContextualFragment(n);t.appendChild(o)}(e,t,a)}function ot(e=document,t,n){return new Promise((o,a)=>{const i=e.querySelector(`script[src="${n}"]`);if(i&&i.hasAttribute("injection-result"))return"success"===i.getAttribute("injection-result")?o():a(new Error("Inject script failure: injection-result failure "+n));if(et[n]=[].concat(et[n]||[],e=>e?o():a(new Error("Inject script failure: error loading "+n))),1===et[n].length){const o=e.createElement("script");o.dataset.namespace=t,o.type="text/javascript",o.src=n,qe(n,location.origin)&&(o.crossOrigin="anonymous"),o.async=!1,o.onload=()=>{o.setAttribute("injection-result","success"),tt(n,!0)},o.onerror=()=>{o.setAttribute("injection-result","failure"),tt(n,!1)},e.body.appendChild(o)}})}function at({shouldBeEnabled:e,doc:t=document,featureName:n,featureVersion:o,featureManifest:a}){if(!t)return void ce("Document not set, cannot mount critical path files");Ge({featureName:n,manifest:a,userAgent:navigator.userAgent,devSettings:Qe.devSettings,forcedSettings:Qe.forcedSettings}).forEach(n=>{if(".css"===n.substr(n.lastIndexOf("."))){const o=t.querySelector(`link[rel='stylesheet'][href='${n}']`);o&&(o.disabled=!e)}});const i=o?`${n}-${o.replace(/[^0-9a-z.]+/g,"").replace(/\./g,"_")}`:n;t.querySelectorAll(`style[data-${i}-css]`).forEach(t=>{t.disabled=!e}),e||ut(n).remove()}function it(e=document,t){st(e.getElementById("loading-in-container"),t),t||rt(e,0)}function rt(e=document,t){const n=e.getElementById("loading-in-container");var o,a,i;a="paddingLeft",i=t,(o=n)&&o.style&&(o.style[a]=(isNaN(i)?0:i)+"px")}function st(e,t){e&&e.style&&(e.style.display=t?"block":"none")}const lt=({files:e,doc:t,namespace:n,node:o})=>{const a=e.map(e=>{switch(e.substr(e.lastIndexOf("."))){case".html":return nt(t,o,e);case".js":return ot(t,n,e);case".css":return function(e=document,t,n){return new Promise((o,a)=>{const i=e.querySelector(`link[rel='stylesheet'][href='${n}']`);if(i&&i.hasAttribute("injection-result"))return i.disabled=!1,"success"===i.getAttribute("injection-result")?o():a(new Error("Inject style failure: injection-result failure "+n));if(et[n]=[].concat(et[n]||[],e=>e?o():a(new Error("Inject style failure: error loading "+n))),1===et[n].length){const o=e.createElement("link");o.dataset.namespace=t,o.rel="stylesheet",o.href=n,qe(n,location.origin)&&(o.crossOrigin="anonymous"),o.onload=()=>{o.setAttribute("injection-result","success"),tt(n,!0)},o.onerror=()=>{o.setAttribute("injection-result","failure"),tt(n,!1)},e.body.appendChild(o)}})}(t,n,e)}});return Promise.all(a)};async function ct(e,t,n,o={}){const{subfeatureRelease:a}=o,i=W("start-injectCritialPathFiles-"+t);if(!e)return void ce("Document not set, cannot mount critical path files");let r,s=xe();t===ze.featureName?r=dt():a||(r=ut(t),s=Re(t));const l=function(e){return"app-shell:"+e}(t),c=Ge({featureName:t,manifest:n,userAgent:navigator.userAgent,devSettings:Qe.devSettings,forcedSettings:Qe.forcedSettings}),u=[].concat([],c||[],[]),d=s.performance.now();try{await lt({files:u,doc:e,namespace:l,node:r})}finally{const e={};try{const t=s.performance.getEntriesByType("resource").filter(e=>e.startTime>d),n=[],o=[];u.forEach((a,i)=>{const r=t.find(e=>e.name.endsWith(a));if(r){e[`criticalPathFile${i}Duration`]=r.duration;let t=!1;t="transferSize"in r?0===r.transferSize:(r.duration||r.responseEnd-r.fetchStart)<=100,e[`criticalPathFile${i}Cached`]=t,t&&n.push(a),o.push(a)}}),e.criticalPathFilesTotalFiles=u.length,e.criticalPathFilesTotalFilesMeasured=o.length,e.criticalPathFilesCachePercentage=o.length?n.length/o.length:-1,e.concurrentlyLoadedNonCriticalPathFiles=t.filter(e=>!u.find(t=>e.name.endsWith(t))).map(e=>e.name).join(","),e.processedCriticalPathFiles=u.join(",")}catch(e){le(`Critical Path Files metadata collection for ${t} failed`,e)}const n=W("end-injectCritialPathFiles-"+t),o={extraProps:e};a&&(o.subfeatureName=t,o.subfeatureRelease=a);const r=j("time-to-injectCritialPathFiles-"+t,i,n,o);re(`Critical path files for ${t} loaded in ${r.markProps.measurement}ms`)}}function ut(e){if(!e)return null;const t=function(e){return"app-shell:feature-root:"+e}(e),n=_e(e);if(!n||!n.body)return null;let o=n.getElementById(t);if(!o){o=n.createElement("div"),o.id=t,Object.assign(o.style,{width:"100%",height:"100%"});const e=n.getElementById(Ze);e?e.insertAdjacentElement("afterend",o):n.body.insertBefore(o,n.body.firstElementChild)}return o}function dt(e){const t=e||xe().document;let n=t.getElementById(Ze);return n||(n=t.createElement("div"),n.id=Ze,t.body.insertBefore(n,t.body.firstElementChild)),n}function pt(e){if("string"==typeof e&&!me(window.navigator.userAgent)){document.querySelectorAll('[rel="icon"], [rel="apple-touch-icon"]').forEach(e=>e.parentNode.removeChild(e)),document.head.insertAdjacentHTML("afterbegin",e)}}function ft(e=window,{featureConfigs:t}){!0===de()&&(Ke(e,{featureConfigs:t}),function(e=window){const t=new URL(e.location.href);(t.searchParams.get("globalsToInspect")||"").split(",").filter(Boolean).forEach(n=>{const o=[];Object.defineProperty(e,n,{get:function(){return e["__app-shell-proxy-for-"+n]},set:function(a){if(!o.includes(n)){o.push(n);try{throw new Error("IGNORE THIS ERROR, THROWN TO CAPTURE STACK FOR GLOBALS")}catch(e){console.log(`Setting "${n}" global variable`,e.stack)}if(t.searchParams.has("pauseOnGlobal"))debugger}e["__app-shell-proxy-for--"+n]=a},configurable:!0})})}(e))}const mt={setupInitialStyles:function(){const e={width:"100%",height:"100%",margin:"0",padding:"0"};Object.assign(document.documentElement.style,e),Object.assign(document.body.style,e)},getFrameContainer:function(){let e=document.getElementById("invision-frame-container");return e||(e=document.createElement("div"),e.id="invision-frame-container",document.body.appendChild(e)),e},toggleErrorDisplay:function(e){it(document,!1),st(document.getElementById("error-in-container"),e)},toggleAppDisplay:function(e,t){t&>().toggleLoadingIndicatorDisplay(!1),ht().toggleLoadingIndicatorDisplay(!t);const n=Ee(e);n?n.style.opacity=t?1:0:ut(e).style.opacity=t?1:0},getManifestCollection:m(()=>{try{const{dataset:{manifestCollection:e}}=document.getElementById("manifestCollection");return new I(JSON.parse(e))}catch(e){return ce("Error reading ManifestCollection from document",e),new I}}),getSidebarRoot:dt,hasSidebarRoot:function(e){const t=(e||xe().document).getElementById(Ze);return t&&"mount-successful"===t.getAttribute("mount-status")},setDocumentStateForFeature:function(e){var t;document.title=e.initialPageTitle||"InVision",pt(`<link rel="apple-touch-icon" sizes="180x180" href="https://static.invisionapp-cdn.com/global/favicons/${t=e.faviconPath||F}/apple-touch-icon.png" />\n <link rel="icon" type="image/png" sizes="16x16" type="image/png" href="https://static.invisionapp-cdn.com/global/favicons/${t}/favicon-16x16.png" />\n <link rel="icon" type="image/png" sizes="32x32" href="https://static.invisionapp-cdn.com/global/favicons/${t}/favicon-32x32.png" />\n <link rel="icon" type="image/x-icon" href="https://static.invisionapp-cdn.com/global/favicons/${t}/favicon.ico" />`)},replaceFavicons:pt,updateRootStyles:function(e){const t=(null==e?void 0:e.initialBackgroundColor)||"#fff";document.body.style.backgroundColor=t},getWindow:()=>xe(),injectCriticalPathFiles:(...e)=>ct(xe().document,...e),toggleLoadingIndicatorDisplay:(...e)=>it(window.document,...e),offsetLoadingIndicator:(...e)=>rt(window.document,...e),injectScript:(...e)=>ot(window.document,...e),interceptNavigation:(...e)=>De(window,...e),preFeatureWork:()=>ft(window,{featureConfigs:xe().inGlobalContext.appShell._internal.getFeatureConfigs()})},ht=()=>mt,gt=m((e="")=>({getFeatureRoot:ut,preFeatureWork:(...t)=>ft(Re(e),...t),disableFeatureArtifacts:(...t)=>async function(e=document,t,n,o){const a=async(t,n)=>{var o,a;n||(n=await(null===(o=window.inGlobalContext.appShell.getFeatureContext(t))||void 0===o||null===(a=o.getManifest)||void 0===a?void 0:a.call(o)));const i=[];i.push({featureName:t,featureManifest:n});const r=await Je({rootFeatureName:t,getManifest:async e=>{var t,n;return null===(t=window.inGlobalContext.appShell.getFeatureContext(e))||void 0===t||null===(n=t.getManifest)||void 0===n?void 0:n.call(t)},forcedSettings:Qe.forcedSettings});return null!=r&&r.length&&r.reverse().forEach(t=>{i.push({doc:e,featureName:t.name,featureVersion:t.version,featureManifest:t.manifest})}),i},{nextFeatureName:i}=o||{};let r=[];const s=await a(t,n);if(r=r.concat(s),i){let e=[];const t=window.inGlobalContext.appShell.getFeatureContext(i),n=await a(i);if(e=e.concat(n),t.hasSidebarEnabled()){const t=await a("sidebar");e=e.concat(t)}r=r.filter(t=>!e.find(e=>e.featureName===t.featureName&&e.featureVersion===t.featureVersion))}r.forEach(e=>{at({shouldBeEnabled:!1,...e})}),re("Disabled the artifacts of the following resources:",r)}(_e(e),e,...t),enableFeatureArtifacts:(...t)=>async function(e=document,t,n){const o=await Je({rootFeatureName:t,getManifest:async e=>{var t,n;return null===(t=window.inGlobalContext.appShell.getFeatureContext(e))||void 0===t||null===(n=t.getManifest)||void 0===n?void 0:n.call(t)},forcedSettings:Qe.forcedSettings});null!=o&&o.length&&o.forEach(t=>{at({shouldBeEnabled:!0,doc:e,featureName:t.name,featureVersion:t.version,featureManifest:t.manifest})}),at({shouldBeEnabled:!0,featureName:t,featureManifest:n})}(_e(e),e,...t),getSidebarRoot:(...t)=>dt(_e(e)),getWindow:()=>Re(e),injectAsyncThirdParties:(...t)=>(e=>{We(Be.HOTJAR,{mountWindow:e,mountDocument:e.document})})(Re(e)),toggleLoadingIndicatorDisplay:(...t)=>it(_e(e),...t),injectCriticalPathFiles:(...t)=>ct(_e(e),e,...t),injectCriticalPathFilesInDocument:(t,...n)=>ct(t,e,...n),interceptNavigation:(...t)=>De(Re(e),...t)})),vt={},wt=e=>{let t=e;return e&&e.self&&(t=e&&e.frameScopeKey||1e7*Math.random(),e.frameScopeKey=t),{getScopedReferences:()=>t?vt[t]:vt,addEventListener:(e,n,o)=>(vt[t]=vt[t]||{},vt[t].listeners=vt[t].listeners||[],vt[t].listeners.push({type:e,listener:n,options:o}),xe().addEventListener(e,n,o)),removeEventListener:(e,n,o)=>(vt[t]&&Array.isArray(vt[t].listeners)&&(vt[t].listeners=(vt[t].listeners||[]).filter(t=>!(t.type===e&&t.listener===n&&("boolean"!=typeof o||t.options===o)))),xe().removeEventListener(e,n,o)),clearAllScopedListeners:function(){if(vt[t]&&Array.isArray(vt[t].listeners)&&vt[t].listeners.length){const e=vt[t].listeners.length;vt[t].listeners.forEach(({type:e,listener:t,options:n})=>{this.removeEventListener(e,t,n)}),e-vt[t].listeners.length<=0&&le(`Cleaned up frame scoped root event listeners did not clean up all references. ${vt[t].listeners.length} reference(s) failed to clean up`)}vt[t]&&delete vt[t]}}};let bt;var yt=new WeakMap;class Ct{constructor(e){n(this,"featureName",void 0),yt.set(this,{writable:!0,value:new Map}),this.featureName=e}hasItem(e){return o(this,yt).has(e)}getItem(e){return o(this,yt).get(e)}setItem(e,t){if("string"!=typeof t)throw new Error(`Tried setting a non-string storage item on "${this.featureName}". Key: ${e}, type: ${typeof t}`);o(this,yt).set(e,t)}removeItem(e){return o(this,yt).delete(e)}clear(){o(this,yt).clear()}}const{tier:St,buildContext:Nt}=Xe(),Rt=A.includes(St)||[].includes(window.location.hostname)||"development"===(null==Nt?void 0:Nt.envType);var _t=new WeakMap,Et=new WeakMap,xt=new WeakMap,kt=new WeakMap,At=new WeakMap;class Pt{constructor(e){n(this,"featureName",void 0),_t.set(this,{writable:!0,value:new Map}),Et.set(this,{writable:!0,value:0}),xt.set(this,{writable:!0,value:null}),kt.set(this,{writable:!0,value:()=>{o(this,_t).forEach(e=>{if(e.status===P.PENDING&&e.hasDependencies){const t=e.dependsOn.map(e=>o(this,_t).get(e)).filter(e=>!!e);if(t.length!==e.dependsOn.length)return le(`${this.logPrefix} One or more "dependsOn" IDs of the ${e.id} request are invalid:`,e.dependsOn),void e.cancel();if(t.length>0&&t.every(e=>{var t;return e.status===P.LOADED&&!(null===(t=e.response)||void 0===t||!t.clone)})){const n=Object.fromEntries(t.map(e=>[e.id,e.response.clone()]));e.onDependenciesReady(n)}}})}}),At.set(this,{writable:!0,value:()=>{clearTimeout(o(this,xt)),o(this,_t).forEach((e,t)=>{[P.CONSUMED,P.CANCELLED].includes(e.status)||le(`${this.logPrefix} The request with id "${t}" was preloaded using the feature-context data-loader but was not used within 30 seconds from start of the preloading. Please make sure it wasn't preloaded for nothing.`)}),this._clearRequestsPreloading()}}),n(this,"_getPreloadItem",e=>o(this,_t).get(e)),n(this,"getPreloadItem",e=>{const t=o(this,_t).get(e);if(t)return t;le(`${this.logPrefix} Tried to get the info of a preloaded item that does not exist: "${e}".`)}),n(this,"consumePreloadItem",e=>{if(!Rt||0===o(this,_t).size)return;const t=o(this,_t).get(e);if(t){if([P.LOADED,P.RUNNING].includes(t.status))return ie(`${this.logPrefix} The feature is consuming the "${e}" preloaded request.`),t.consume(),t;if(t.status===P.CONSUMED){if(t.multipleConsumers)return t;le(`${this.logPrefix} Tried to get a preloaded request that was already consumed: "${e}".`)}t.status===P.PENDING&&t.cancel()}else le(`${this.logPrefix} Tried to get a preloaded request that does not exist: "${e}".`)}),n(this,"fetchById",async(e,t,n)=>{const o=this.consumePreloadItem(e);return o&&o.url!==t?(le(`${this.logPrefix} The feature asked for "${e}". A preloaded request with URL "${o.url}" was found, but the URL provided to the fetchById function is "${t}". The preload request will not be used. Please make sure the preload URL in the feature-config is the same one you're providing to the fetchById function.`),o.cancel(),fetch(t,n)):o?(ie(`${this.logPrefix} The feature asked for "${e}". A preloaded request was found and will be used.`),o.request):(ie(`${this.logPrefix} The feature asked for "${e}". A preloaded request was not found, so "${t}" will be fetched instead.`),fetch(t,n))}),this.featureName=e,Rt||ie(this.logPrefix+" Running in an environment not enabled for data preloading.")}get logPrefix(){return`DataLoader [${this.featureName}] →`}_clearRequestsPreloading(){o(this,_t).clear(),a(this,Et,0),clearTimeout(o(this,xt)),a(this,xt,null)}_setupRequestsPreloading({preloadConfigs:e=[],requestsPreloadedByScript:t={}}){this._clearRequestsPreloading(),Rt&&(e.forEach(e=>{var n,a;const i=new Ft({config:e,initialRequest:null===(n=t[e.id])||void 0===n?void 0:n.request,initialRequestMeta:null===(a=t[e.id])||void 0===a?void 0:a.meta,onResponse:o(this,kt),featureName:this.featureName});o(this,_t).set(e.id,i)}),e.length>0&&a(this,xt,setTimeout(o(this,At),3e4)))}}class Ft{constructor({config:e,initialRequest:t,initialRequestMeta:o,onResponse:a=(()=>{}),featureName:i=""}){n(this,"featureName",void 0),n(this,"id",void 0),n(this,"config",void 0),n(this,"url",void 0),n(this,"requestHandler",async()=>{}),n(this,"fetchOptions",void 0),n(this,"dependsOn",[]),n(this,"hasInvokedRequestHandler",!1),n(this,"multipleConsumers",!1),n(this,"request",void 0),n(this,"response",void 0),n(this,"onResponse",()=>{}),n(this,"status",P.PENDING),n(this,"meta",{startTime:void 0,endTime:void 0,startedFrom:void 0}),this.id=e.id,this.config=e,this.onResponse=a,this.featureName=i,this.url=e.url,this.fetchOptions=e.fetchOptions,this.requestHandler=e.requestHandler,this.dependsOn=e.dependsOn||[],this.multipleConsumers=e.multipleConsumers,this.meta.startTime=null==o?void 0:o.startTime,this.meta.startedFrom=null==o?void 0:o.startedFrom,this.hasDependencies||this.startRequest(t||fetch(this.url,this.fetchOptions),this.meta.startedFrom)}get logPrefix(){return`DataLoader [${this.featureName}] →`}get hasDependencies(){var e;return(null===(e=this.dependsOn)||void 0===e?void 0:e.length)>0}startRequest(e,t="app-shell"){this.status===P.PENDING&&(this.request=e.then(e=>(this.response=e,this.status===P.RUNNING&&(this.status=P.LOADED,this.meta.endTime=performance.now(),ie(`${this.logPrefix} Preloading of "${this.id}" has been completed.`),this.onResponse()),this.multipleConsumers&&null!=e&&e.clone?e.clone():e)),this.status=P.RUNNING,"app-shell"===t?(this.meta.startTime=performance.now(),this.meta.startedFrom="app-shell",ie(`${this.logPrefix} Starting the preloading of "${this.id}"`)):ie(`${this.logPrefix} The preloading of "${this.id} was already started by the script.`))}async onDependenciesReady(e){if(this.status===P.PENDING&&this.requestHandler&&!this.hasInvokedRequestHandler){ie(`${this.logPrefix} The "${this.id}" dependencies are ready, running the requestHandler...`);try{this.hasInvokedRequestHandler=!0;const{url:t,fetchOptions:n}=await this.requestHandler({dependencyResponses:e});if(!t)throw new Error("The returned config does not have an URL");this.url=t,this.fetchOptions=n}catch(e){return le(`${this.logPrefix} An error was thrown while running the requestHandler for "${this.id}", so this preload request won't be used. The error was:`,e.message),void this.cancel()}if(this.status!==P.PENDING)return void ie(`${this.logPrefix} Cancelling "${this.id}" because it was started by the feature while running the request handler.`);const t=fetch(this.url,this.fetchOptions);this.startRequest(t)}}consume(){this.status=P.CONSUMED}cancel(){this.status=P.CANCELLED}}const{countryCode:Ot,tier:Tt,devSettings:Lt,forcedSettings:$t}=Xe(),{uiVariant:Mt}=function(){if(bt)return bt;const e=new URLSearchParams(window.location.search).get("uiVariant")||"";bt={uiVariant:e};try{if(e)Z.setItem("uiVariantContext",JSON.stringify(bt));else{const e=Z.getItem("uiVariantContext");e&&(bt=JSON.parse(e))}}catch(e){pe.error("Failed to get or update uiVariant data in sessionStorage",e)}return bt}();var Dt=new WeakMap,It=new WeakMap,Bt=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,jt=new WeakMap,Vt=new WeakMap,Gt=new WeakMap,qt=new WeakMap,Ht=new WeakMap,zt=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap,en=new WeakMap;class tn{constructor(e={},t={},i=new s,r){n(this,"version","not-set"),n(this,"envContext",{}),Dt.set(this,{writable:!0,value:new s}),It.set(this,{writable:!0,value:{}}),Bt.set(this,{writable:!0,value:new Map}),Ut.set(this,{writable:!0,value:new Map}),Wt.set(this,{writable:!0,value:{}}),jt.set(this,{writable:!0,value:void 0}),Vt.set(this,{writable:!0,value:{}}),Gt.set(this,{writable:!0,value:{}}),qt.set(this,{writable:!0,value:{}}),Ht.set(this,{writable:!0,value:e=>o(this,Bt).get(e)||[]}),zt.set(this,{writable:!0,value:e=>o(this,Ut).get(e)||[]}),Kt.set(this,{writable:!0,value:(e={})=>{var t;a(this,Wt,e),this.version=e.version||"not-set";const{featureConfig:n={}}=e,{envContext:i={}}=n,r=this.featureConfig.envContext||{};if(o(this,Jt).call(this,r,i),o(this,Wt)&&Lt&&(Lt.secure||"localhost"!==Lt.host)&&null!==(t=Lt.features)&&void 0!==t&&t.includes(this.featureName)){const e=e=>{if(!e||!e.replace)return null;const t=`${Lt.secure?"https":"http"}://${Lt.host}`;return e.replace(/^https?:\/\/localhost/,t)};a(this,Wt,Object.keys(o(this,Wt)).reduce((t,n)=>{const a=o(this,Wt)[n];try{n.toLowerCase().includes("files")?Array.isArray(a)?t[n]=a.map(e):t[n]=Object.keys(a).reduce((t,n)=>(t[n]=e(a[n]),t),{}):t[n]=a}catch(e){ce(e),t[n]=a}return t},{}))}}}),Jt.set(this,{writable:!0,value:(e={},t={})=>{var n,o,a,i,r,s,l,c,u,d,p,f,m,h,g,v,w,b;const y=Mt?{...null===(n=e.default)||void 0===n||null===(o=n.uiVariantContext)||void 0===o?void 0:o.default,...null===(a=t.default)||void 0===a||null===(i=a.uiVariantContext)||void 0===i?void 0:i.default,...null===(r=e.default)||void 0===r||null===(s=r.uiVariantContext)||void 0===s?void 0:s[Mt],...null===(l=t.default)||void 0===l||null===(c=l.uiVariantContext)||void 0===c?void 0:c[Mt],...null===(u=e[Tt])||void 0===u||null===(d=u.uiVariantContext)||void 0===d?void 0:d.default,...null===(p=t[Tt])||void 0===p||null===(f=p.uiVariantContext)||void 0===f?void 0:f.default,...null===(m=e[Tt])||void 0===m||null===(h=m.uiVariantContext)||void 0===h?void 0:h[Mt],...null===(g=t[Tt])||void 0===g||null===(v=g.uiVariantContext)||void 0===v?void 0:v[Mt],uiVariant:Mt}:{uiVariant:Mt};this.envContext={...e.default,...t.default,...e[Tt],...t[Tt],uiVariantContext:y,tier:Tt,countryCode:Ot,oauthMode:null===(w=window.inGlobalContext)||void 0===w||null===(b=w.appMetaData)||void 0===b?void 0:b.oauthMode}}}),n(this,"getManifest",async e=>{var t,n,a;if(!o(this,Wt)||!o(this,Wt).criticalPathFiles){const e=await ht().getManifestCollection().getManifestItem(this.featureName).updateManifestFromGSP();e&&o(this,Kt).call(this,e)}return e?null===(t=o(this,Wt))||void 0===t||null===(n=t.releases)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.manifest:o(this,Wt)}),Yt.set(this,{writable:!0,value:(e,t=(()=>{}))=>{const n=o(this,Ht).call(this,e);o(this,Bt).set(e,n.concat(e=>{return new Promise((n=e,async(e,o)=>{try{const o=t(n);o instanceof Promise&&await o,e()}catch(e){o(e)}}));var n}))}}),Xt.set(this,{writable:!0,value:(e,t=(()=>{}))=>{const n=o(this,Ht).call(this,e);o(this,Bt).set(e,n.concat(n=>new Promise((a,i)=>{try{t(n);const r=o(this,zt).call(this,e),s=e=>e?a():i(new Error("Register command handler resolver failed"));o(this,Ut).set(e,r.concat(s))}catch(e){i(e)}})))}}),n(this,"sendCommand",async(e,t)=>{const n=W(`start-command-send-${e}-${this.featureName}`),a={commandContext:t,featureName:this.featureName};o(this,It).emit(`${C.BEFORE}:${e}`,a),o(this,It).emit(`${C.BEFORE}:${e}:${this.featureName}`,a),o(this,Dt).emit(`${C.BEFORE}:${e}`,a),o(this,Dt).emit(`${C.BEFORE}:${e}:${this.featureName}`,a);const i=await Promise.all(o(this,Ht).call(this,e).map(e=>e(t))).then(()=>!0).catch(t=>(ce(`Feature "${this.featureName}" errored while executing command "${e}": `,t),!1)).finally(t=>{const o=W(`end-command-send-${e}-${this.featureName}`),a=j(`time-to-handle-command-${e}-${this.featureName}`,n,o);return re(`The "${e}" command handler for ${this.featureName} completed in ${a.markProps.measurement}ms`),t}),r={commandContext:t,commandResolved:i,featureName:this.featureName};o(this,Dt).emit(`${C.AFTER}:${e}:${this.featureName}`,r),o(this,Dt).emit(`${C.AFTER}:${e}`,r),o(this,It).emit(`${C.AFTER}:${e}:${this.featureName}`,r),o(this,It).emit(`${C.AFTER}:${e}`,r)}),n(this,"onCommand",(e,t)=>{o(this,Yt).call(this,e,t)}),n(this,"onCommandDeferred",(e,t)=>{o(this,Xt).call(this,e,t)}),n(this,"unregisterCommandHandlers",()=>{a(this,Bt,new Map)}),Qt.set(this,{writable:!0,value:(e,t=!0)=>{Promise.resolve().then(()=>{o(this,Ut).get(e)?(o(this,Ut).get(e).forEach(e=>e(t)),this.supportsComposition()||o(this,Ut).set(e,[])):le(`resolveCommand(${e}, ${t}) was called on the ${this.featureName} feature context but there are no command handlers queued for this feature/command`)})}}),n(this,"resolveCommand",e=>o(this,Qt).call(this,e,!0)),n(this,"rejectCommand",e=>o(this,Qt).call(this,e,!1)),n(this,"shouldRunAsStandaloneApp",()=>{const e=new URL(window.location.href,window.location.origin).searchParams.get("forceStandalone");if(""===e||"true"===e)return!0;if("false"===e)return!1;if(window!==top)return!0;const t=this.featureConfig.shouldRunAsStandaloneApp;return"boolean"==typeof t?t:"function"==typeof t&&t()}),n(this,"shouldForceFullLoadOnNavigation",()=>{if(this.shouldRunAsStandaloneApp())return!0;const e=this.featureConfig.shouldUseFullLoadNavigation;return"boolean"==typeof e?e:"function"==typeof e&&e()}),n(this,"getFeatureFrameWindow",()=>Re(this.featureName)||window),n(this,"getFeatureRootElement",()=>this.isFeatureAnApp()?gt(this.featureName).getFeatureRoot(this.featureName):null),n(this,"getSidebarRootElement",()=>this.isFeatureAnApp()?gt(this.featureName).getSidebarRoot(this.featureName):null),n(this,"isFeatureAnApp",()=>!!(this.featureConfig&&Array.isArray(this.featureConfig.navigationRules)&&this.featureConfig.navigationRules.length>0)),n(this,"hasSidebarEnabled",()=>{const{sidebar:e}=this.featureConfig&&this.featureConfig.globalFeatureSettings||{};return!(!e||!e.appearanceType)}),n(this,"enableFeatureArtifacts",async()=>{const e=await this.getManifest();return gt(this.featureName).enableFeatureArtifacts(e)}),n(this,"disableFeatureArtifacts",async()=>{const e=await this.getManifest();return gt(this.featureName).disableFeatureArtifacts(e)}),n(this,"supportsComposition",()=>(({featureConfig:e,url:t})=>{var n;if(t){const n=t.searchParams.get("forceComposition");if(n)try{var o;const t=null===(o=JSON.parse(n))||void 0===o?void 0:o[e.featureName];if(!0===t||!1===t)return t}catch(e){}}return(null==e||null===(n=e.supportsComposition)||void 0===n?void 0:n.call(e,{url:t.href}))||!1})({featureConfig:this.featureConfig,url:new URL(window.location.href,window.location.origin)})),n(this,"getRuntimeProvidedResourcesCollection",async e=>{const t=await this.getManifest(e);return null==t?void 0:t.runtimeProvidedResourcesCollection}),n(this,"getRuntimeProvidedResource",async(e,t={})=>{var n;!await this.isRuntimeProvidedResource()||null!=t&&t.hostVersion||le(`Invoking "getRuntimeProvidedResource" without passing the "hostVersion" parameter is deprecated. Since the caller (${this.featureName}) is an RPR, you must pass the "hostVersion" parameter in order to load the resource correctly.`);const o=await this.getRuntimeProvidedResourcesCollection(null==t?void 0:t.hostVersion),a=null==o||null===(n=o[e])||void 0===n?void 0:n.version;if(a)return window.inGlobalContext.appShell.getFeatureContext(e).getResourceInterface(a,t);le(`Tried to get a resource that is not part of the runtime provided resources collections of ${this.featureName}: ${e}`)}),Zt.set(this,{writable:!0,value:async e=>{var t,n,o,a;const i=await this.getManifest();return(null==i||null===(t=i.releases)||void 0===t||null===(n=t[e])||void 0===n||null===(o=n.manifest)||void 0===o||null===(a=o.resource)||void 0===a?void 0:a.peerDependencies)||[]}}),n(this,"isRuntimeProvidedResource",async()=>{const e=await this.getManifest();return Object.keys((null==e?void 0:e.releases)||{}).length>0}),n(this,"isResourceInterfaceLoaded",e=>!!o(this,Vt)[e]),n(this,"getResourceInterface",async(e,t={})=>{var n;const{shouldLoadResource:a=!0,peerDependencies:i={}}=t;if(!await this.isRuntimeProvidedResource())return void le(`Tried to get a resource interface of feature that is not a runtime-provided-resource: ${this.featureName}@${e}`);if(a){const t=await o(this,Zt).call(this,e);if(t.length>0){const e=t.find(e=>!i[e]);if(e)return void le(`Tried to load the "${this.featureName}" resource without passing the required "${e}" peer-dependency as a parameter.`);t.forEach(e=>{o(this,jt).setResourcePeerDependency({resourceName:this.featureName,peerDependencyName:e,peerDependencyData:i[e]})})}else Object.keys(i).length>0&&le(`The "${this.featureName}@${e}" resource received a set of peer-dependency as parameters in its loading flow even if it doesn't require them. Make sure you're depending on the right resource version and that it's configured correctly.`)}const r=o(this,Vt)[e];return r?r.getResourceInterface():null!==(n=o(this,Gt))&&void 0!==n&&n[e]?(await o(this,Gt)[e],o(this,Vt)[e].getResourceInterface()):a?(await this._loadRequiredResources({version:e}),o(this,Vt)[e].getResourceInterface()):void 0}),en.set(this,{writable:!0,value:async(e,t=[])=>{var n,i,r;if(!await this.isRuntimeProvidedResource())return;const s=null===(n=await this.getManifest())||void 0===n||null===(i=n.releases)||void 0===i||null===(r=i[e])||void 0===r?void 0:r.manifest,l=ht().injectCriticalPathFiles(this.featureName,s,{subfeatureRelease:e});a(this,Gt,o(this,Gt)||{}),o(this,Gt)[e]=l,t.forEach(e=>{o(this,Gt)[e]=l}),await l;const c=o(this,jt).getResource(this.featureName,e);return o(this,Vt)[e]=c,t.forEach(t=>{o(this,Vt)[t]=c,o(this,jt).setResourceProxy({resourceName:this.featureName,resourceVersion:e,proxiedByVersion:t})}),c}}),n(this,"_loadRequiredResources",async({version:e}={})=>{const t=window.inGlobalContext.appShell.getFeatureContext,n=async e=>await t(e).getManifest(),a={extraProps:{}},i={};e&&(a.subfeatureName=this.featureName,a.subfeatureRelease=e,i.subfeatureLoadRequest=!0,i.isSubfeatureFirstLoad=!o(this,Vt)[e],i.subfeatureName=this.featureName,i.subfeatureRelease=e);const r=W("start-loadRuntimeProvidedResources-"+this.featureName,i);let s=0,l=0;try{const i=await Je({rootFeatureName:this.featureName,rootResourceVersion:e,getManifest:n,forcedSettings:$t,requiredOnly:!0});if(null==i||!i.length)return a.extraProps.rprNumberOfResources=0,a.extraProps.rprNumberOfResourcesSkipped=s,void(a.extraProps.rprNumberOfResourcesLoaded=l);pe.log(`[RPR] → Loading ${i.map(e=>`${e.name}@${e.version}`).join(", ")} required by ${this.featureName}.`);const c=async({name:e,version:n,requiredBy:i,proxiedBy:r})=>{const c=performance.now();let u=o(this,jt).getResource(e,n);const d=await t(e);u?(s++,pe.log(`[RPR] → Loading skipped for ${e}@${n} (it was already loaded).`)):(await o(d,en).call(d,n,r),l++,pe.log(`[RPR] → Loading completed for ${e}@${n}.`)),a.extraProps["rprTimeToLoad-"+e]=performance.now()-c,a.extraProps["rprVersionOf-"+e]=n,a.extraProps["rprLoadingSkippedFor-"+e]=!!u,K("RuntimeProvidedResourceLoaded",{resourceLoadTime:performance.now()-c,resourceLoadingSkipped:!!u,resourceName:e,resourceRelease:n,resourceVersion:d.version,resourceRequiredBy:i,resourceProxiedBy:r,resourceLoaderName:this.featureName,resourceLoaderRelease:n})};await Promise.all(i.map(c)),a.extraProps.rprNumberOfResources=i.length,a.extraProps.rprNumberOfResourcesSkipped=s,a.extraProps.rprNumberOfResourcesLoaded=l}finally{const e=W("end-loadRuntimeProvidedResources-"+this.featureName);j("time-to-loadRuntimeProvidedResources-"+this.featureName,r,e,a)}}),n(this,"_renderReactComponent",(e={})=>{a(this,qt,e);const{reactDom:t,reactComponent:n}=e;this.supportsComposition()?t.render(n,this.getFeatureRootElement()):pe.error(`Cannot invoke "renderReactComponent" from ${this.featureName}. Please make sure that the feature composition support ("supportsComposition") is enabled in its feature-config.`)}),n(this,"_unmountReactComponent",()=>{try{o(this,qt).reactDom.unmountComponentAtNode(this.getFeatureRootElement()),a(this,qt,{})}catch(e){pe.error(`Cannot unmount ${this.featureName}'s React component:`,e)}}),n(this,"_isReactEntryPointControlledByAppShell",()=>{var e;return!(null===(e=o(this,qt))||void 0===e||!e.reactComponent)}),this.featureConfig=e,this.featureName=e.featureName,this.storage=new Ct(this.featureName),this.dataLoader=new Pt(this.featureName),a(this,jt,r),a(this,It,i),this.on=o(this,Dt).on,this.once=o(this,Dt).once,this.off=o(this,Dt).off,o(this,Kt).call(this,t)}}const nn={featureName:"cloud-ui",gspName:"cloud-ui",tiers:[]},on={featureName:"billing",gspName:"billing-ui-static",initialPageTitle:"Billing - InVision",supportsSingleTenant:!1,supportsComposition:()=>!0,initialBackgroundColor:"#f7f7f8",navigationRules:[{type:"pass-through",pathStartsWith:"/billing/api"},{type:"controlled",pathStartsWith:"/billing"}],globalFeatureSettings:{sidebar:{appearanceType:"docked",initialVisibilityState:()=>["/billing/upgrade","/billing/plans","/billing/trial","/billing/update-payment","/billing/enterprise-contact","/billing/enterprise-trial","/billing/change-plan","/billing/downgrade"].indexOf(location.pathname)>=0?"hidden":"visible"}},devConfig:{port:4001,manifestRoute:"/billing/static/local-manifest"}},an=()=>{const e={credentials:"include",cors:"cors",headers:{"Request-Source":"sidebar","Calling-Service":"sidebar"}};return[{id:"global-navigation-web-v1-account",multipleConsumers:!0,url:"/global-navigation-web/v1/account",fetchOptions:e},{id:"home-v1-config",multipleConsumers:!0,url:"/home/v1/config",fetchOptions:e},{id:"global-navigation-web-v1-permissions",url:"/global-navigation-web/v1/spaces/permissions",fetchOptions:e}]},rn=e=>()=>{const t=window.inGlobalContext.appShell.usagePatterns,n=t.navigation.getDocsVisitedForPageLoad()>=3,o=t.navigation.hasAppBeenVisitedForPageLoad(e);return n&&!o},sn={featureName:"boards",gspName:"boards-ui-static",initialPageTitle:"Boards - InVision",globalFeatureSettings:{sidebar:{appearanceType:"docked",projectOnly:!0,initialVisibilityState:()=>"visible"}},supportsSingleTenant:!1,supportsComposition:()=>!0,navigationRules:[{type:"pass-through",pathStartsWith:"/board/logged-in"},{type:"pass-through",pathStartsWith:"/boards"},{type:"pass-through",pathStartsWith:"/projects/boards"},{type:"controlled",pathRegex:/^\/(board|public\/board)\/[A-Za-z0-9-]+(\/\d+|\/|)+(\/\d+|\/|)$/i}],shouldUseFullLoadNavigation:rn("boards"),isDocumentApp:()=>!0,dataLoaderConfig:{preloadConfigsBuilder:({url:e})=>[{id:"boards-logged-in",url:"/board/logged-in"},{id:"boards-v1-board-data",dependsOn:["boards-logged-in"],requestHandler:async({dependencyResponses:t})=>{const n=t["boards-logged-in"];if(!n.ok)throw new Error("requestHandler: error, Login status check failing");return{url:`/boards-web-v7/v1/${(await n.json()).status?"board/hash":"public/board"}/${e.split("-").pop().split("/")[0]}`,fetchOptions:{credentials:"include"}}}}]},devConfig:{port:8098,manifestRoute:"/board/local-manifest"}},ln=/^\/(public\/(m\/)?)?share\//,cn={featureName:"console",gspName:"console-ui-v7-static",initialPageTitle:"Console - InVision",faviconPath:L,supportsSingleTenant:!1,supportsComposition:()=>!0,navigationRules:[{type:"permanent-redirect",commonMatcher:"bot",pathRegex:ln,serverRedirectHandler:({url:e})=>e.replace(/\/(public\/(m\/)?)?share\//,"/console/share/")},{type:"client-redirect",pathRegex:ln,clientRedirectHandler:e=>{const t=e.location.href.replace(/\/(public\/(m\/)?)?share\//,"/console/share/");e.location.replace(t)}},{type:"pass-through",commonMatcher:"bot",pathStartsWith:"/console/"},{type:"pass-through",pathRegex:/^\/console\/(\d+)\/(\d+)\/(\w+)/i},{type:"controlled",pathStartsWith:"/console/"}],isDocumentApp:()=>!0,shouldUseFullLoadNavigation:rn("console"),dataLoaderConfig:{preloadConfigsBuilder:({url:e})=>{const t=new URL(e),{shareKey:n,firstScreenID:o}=(()=>{const{pathname:e,hash:n}=t,o=e.match(/console\/share\/([^/]*)\/?(\d*)/i);if(!o)return{};let[,a,i]=o;const r=decodeURIComponent(n).match(/#screens\/(\d*)/i);let s;return r&&(i&&""!==i||(i=r[1])),i&&""!==i&&(s=parseInt(i)),{shareKey:a,firstScreenID:s}})(),a="/console/import"===t.pathname.toLowerCase();let i;if(!n&&!a&&(i=t.pathname.split("-").pop().split("/")[0],!i))throw new Error("requestHandler: empty prototypeHash");const r={credentials:"include",cors:"cors",headers:{"request-source":"console-ui-v7"}},s={id:"console-v1-config",url:"/console-web/v1/config",fetchOptions:r};if(a)return[s];return[s,{id:"console-v1-screen-or-share",dependsOn:["console-v1-config"],requestHandler:async({dependencyResponses:t})=>{const a=t["console-v1-config"];if(!a.ok||![200,201].includes(a.status))throw new Error("requestHandler: error, status: ",a.status);if(n){return{url:"/console-web/v1/share/query",fetchOptions:{...r,method:"POST",body:JSON.stringify({shareKey:n,screenID:o})}}}const i=new URL(e).pathname.split("-").pop().split("/")[0];if(!i)throw new Error("requestHandler: empty prototypeHash");const s=["play","build","comment","inspect","history"];let l="";const c=new URL(e).pathname.replace("/console/","").split("/");if(c.length>=3&&-1===s.indexOf(c[1])&&(l=c[1]),!l)throw new Error("requestHandler: empty screenHash");return{url:`/console-web/v1/prototype/${i}/screen/${l}`,fetchOptions:r}}},{id:"console-v1-screens-or-share-search",dependsOn:n?["console-v1-screen-or-share"]:["console-v1-config"],requestHandler:async({dependencyResponses:e})=>{if(n){const t=e["console-v1-screen-or-share"];if(!t.ok||![200,201].includes(t.status))throw new Error("requestHandler: error, status: ",t.status);const o=(await t.json()).share.selectedScreens;return{url:"/console-web/v1/share/screens/search?limit=100&page=1",fetchOptions:{...r,method:"POST",body:JSON.stringify({shareKey:n,screenIDs:o})}}}const t=e["console-v1-config"];if(!t.ok||![200,201].includes(t.status))throw new Error("requestHandler: error, status: ",t.status);const o={...r,method:"POST",body:JSON.stringify({screenIDs:[]})};return{url:`/console-web/v1/prototype/${i}/screens/search?limit=100&page=1`,fetchOptions:o}}}]}},devConfig:{port:8085,manifestRoute:"/console/local-manifest"}},un=(e,t)=>{let n={activityFilter:!0,limit:50,includeAssetURLs:!0};e.match(/\/created-by-me$/i)&&(n.createdByMe=!0);let o="userLastAccessedAt",a="desc";if(t&&t["inv-home-docs-sortby"]){const e=t["inv-home-docs-sortby"];-1!==["createdAt","updatedAt","title"].indexOf(e)&&(o=e,a="title"===e?"asc":"desc")}n.sortBy=o,n.sortOrder=a,n.isArchived=!!e.match(/\/archived$/i);const i=e.match(/\/spaces\/[\w\d-]*-(c[\w\d]+)/i);i&&i[1]&&(n.spaceID=i[1]);return"/global-navigation-web/v1/resources?"+Object.keys(n).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}=${encodeURIComponent(n[e])}`).join("&")},dn={featureName:"home",gspName:"home-ui-v7-static",supportsComposition:()=>!0,navigationRules:[{type:"client-redirect",pathRegex:/^\/d(?:\/main)?\/?$/i,clientRedirectHandler:function(e){let t=e.location.hash.substr(1);t&&0!==t.indexOf("/")&&(t="/"+t),e.location.replace(t||"/")}},{type:"permanent-redirect",pathRegex:/^(\/d\/main\/default|\/activity|\/dashboard|\/projects(\/favorites|\/prototypes|\/boards|\/freehands)?)\/?$/i,redirectLocation:"/docs"},{type:"controlled",pathRegex:/^\/(?:(projects\/((\w)*-)+(\w)+|projects\/((\w)*-)+(\w)+\/created-by-me|projects\/((\w)*-)+(\w)+\/archived|projects\/((\w)*-)+(\w)+\/new|search|spaces|space|spaces\/all|spaces\/my-spaces|spaces\/created-by-me|docs|docs\/all|docs\/created-by-me|docs\/archived|docs\/((\w)*-)*(\w)+\/created-by-me|docs\/((\w)*-)*(\w)+\/archived|docs\/my-documents|docs\/((\w)*-)*(\w)+|files|files\/created-by-me|files\/archived|recent|create)|spaces\/.+|space\/.+)?\/?$/i},{type:"controlled",pathRegex:/^\/homepage\/?$/}],globalFeatureSettings:{sidebar:{appearanceType:"docked"}},initialBackgroundColor:"#f7f7f8",dataLoaderConfig:{preloadConfigsBuilder:e=>{const t={credentials:"include",cors:"cors",headers:{"Request-Source":"home-ui-v7","Calling-Service":"home-ui-v7"}},n={id:"home-v1-account",url:"/home/v1/account",fetchOptions:t},o={id:"home-v1-team",url:"/home/v1/team",fetchOptions:t},a={id:"home-landing-resources",url:"/global-navigation-web/v1/resources?activityFilter=true&hasViewed=true&includeAssetURLs=true&isArchived=false&limit=50&sortBy=userLastAccessedAt&sortOrder=desc",fetchOptions:t},i={id:"home-landing-projects",url:"/global-navigation-web/v1/resources?hasViewed=true&isArchived=false&limit=6&sortBy=userLastAccessedAt&sortOrder=desc&types=project",fetchOptions:t},r={id:"home-v1-projects-list",url:un(e.url,e.cookie),fetchOptions:t};let s=[n,o,a,i];e.url.indexOf("/docs")>=0&&s.push(r);const l=an();return s.push(...l),s}},devConfig:{port:8099,manifestRoute:"/home/local-manifest"}},pn={featureName:"cloud-document-viewer",gspName:"document-viewer-static",initialPageTitle:"Studio Cloud Web Viewer - InVision",faviconPath:O,supportsSingleTenant:!1,supportsComposition:()=>!0,isDocumentApp:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/design/"},{type:"controlled",pathStartsWith:"/public/design/"},{type:"controlled",pathStartsWith:"/proto/"},{type:"controlled",pathStartsWith:"/public/proto/"}],devConfig:{port:8080,manifestRoute:"/design/static/local-manifest"},rum:{buildsPresentation:!0},dataLoaderConfig:{preloadConfigsBuilder:()=>[{id:"cloud-document-viewer-current-user",url:"/studio-bff/v1/userprofile",fetchOptions:{credentials:"include"}}]}},fn={featureName:"dsm",gspName:"design-systems-web-static",initialPageTitle:"DSM - InVision",supportsSingleTenant:!0,supportsComposition:()=>!0,navigationRules:[{type:"pass-through",pathStartsWith:"/dsm-api"},{type:"pass-through",pathStartsWith:"/dsm-export"},{type:"controlled",pathStartsWith:"/dsm"}],dataLoaderConfig:{preloadConfigsBuilder:({manifest:e})=>{const t=e.packageVersions&&e.packageVersions._self||"missing",n={credentials:"include",cors:"cors",headers:{"Request-Source":"dsm_web"}};return[{id:"dsm-user-invision-organization",url:"/dsm-api/user/invision-organization?client=dsm_web&clientVersion="+t,fetchOptions:n},{id:"dsm-organization",url:"/dsm-api/organization/?client=dsm_web&clientVersion="+t,fetchOptions:n}]}},devConfig:{port:8090,manifestRoute:"/dsm/assets/local-manifest"}},mn={featureName:"inbox",gspName:"inbox",devConfig:{port:8002,manifestRoute:"/local-manifest"}},hn={featureName:"integrations-ui",gspName:"integrations-ui-gsp",devConfig:{port:3030,manifestRoute:"/local-manifest"},supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathRegex:/^\/integrations$/},{type:"controlled",pathRegex:/^\/integrations\/oauth\/(success|failed)$/},{type:"controlled",pathRegex:/^\/integrations\/embed\/[0-9a-z_-]+\/c[0-9a-z]{24}$/},{type:"controlled",pathRegex:/^\/integrations\/slack\/(success|failed)$/},{type:"controlled",pathRegex:/^\/integrations\/slack$/},{type:"controlled",pathRegex:/^\/integrations\/admin$/},{type:"controlled",pathRegex:/^\/integrations\/settings\/[0-9a-z_-]+$/}],globalFeatureSettings:{sidebar:{appearanceType:"docked",initialVisibilityState:()=>{switch(location.pathname){case"/integrations/oauth/success":case"/integrations/oauth/failed":case"/integrations/slack/failed":case"/integrations/slack/success":case"/integrations/slack":return"hidden";default:return"visible"}}}}},gn={featureName:"jira-server-admin-ui",gspName:"jira-server-admin-ui-static",devConfig:{port:3330,manifestRoute:"/local-manifest"},tiers:[h,g,"preview",v],navigationRules:[{type:"controlled",pathRegex:/jira-server\/config/i}],globalFeatureSettings:{sidebar:{appearanceType:"docked"}},supportsComposition:()=>!0},vn={featureName:"lodash",gspName:"rpr-lodash-static",devConfig:{port:8829,manifestRoute:"/lodash/local-manifest"}},wn={featureName:"loom-sdk",gspName:"rpr-loom-sdk-static",devConfig:{port:8823,manifestRoute:"/loom-sdk/local-manifest"}},bn={featureName:"external-js-sdk",gspName:"external-js-sdk-static",devConfig:{port:9999,manifestRoute:"/local-manifest"},tiers:[h,g],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/external"}]},yn={featureName:"slack-ui",gspName:"slack-static",initialPageTitle:"Slack",supportsComposition:()=>!0,navigationRules:[{type:"pass-through",pathStartsWith:"/slack/api/v1"},{type:"pass-through",pathStartsWith:"/slack/auth"},{type:"pass-through",pathStartsWith:"/slack-gateway"},{type:"controlled",pathStartsWith:"/slack"}],globalFeatureSettings:{sidebar:{appearanceType:"docked"}},devConfig:{port:8093,manifestRoute:"/local-manifest"}},Cn=/^\/projects\/prototypes\/(\d+)/i,Sn={featureName:"prototype-overview",gspName:"prototypes-ui-v7-static",initialPageTitle:"Prototypes - InVision",faviconPath:L,supportsSingleTenant:!1,supportsComposition:()=>!0,globalFeatureSettings:{sidebar:{appearanceType:"docked",projectOnly:!0,initialVisibilityState:()=>"visible"}},navigationRules:[{type:"pass-through",pathRegex:Cn,commonMatcher:"bot"},{type:"pass-through",pathStartsWith:"/overview/",commonMatcher:"bot"},{type:"controlled",pathRegex:Cn},{type:"controlled",pathStartsWith:"/overview/"}],shouldRunAsStandaloneApp:()=>{let e=!1;try{e=/\/overview\/[\w\W]*\/exports\/(download|initiate)\//gi.test(location.href)}catch(e){console.error(e)}return e},dataLoaderConfig:{preloadConfigsBuilder:({url:e})=>{if(-1===e.indexOf("/overview/"))return;let t=e.slice(e.indexOf("overview/")+9).split("/")[0];if(t.indexOf("-")>-1&&(t=t.split("-").pop()),!t)return[];const n={credentials:"include",cors:"cors",headers:{"Request-Source":"prototypes-ui-v7","Calling-Service":"prototypes-ui-v7"}};return[{id:"prototype-overview-v1-config",url:"/prototypes-web/v1/config/"+t,fetchOptions:n},{id:"prototype-overview-v1-screens",dependsOn:["prototype-overview-v1-config"],url:`/prototypes-web/v1/prototypes/${t}/screens/search?page=1&limit=500`,fetchOptions:{...n,method:"POST",body:JSON.stringify({screenIDs:[]})}},{id:"prototype-overview-v1-screen-groups",url:`/prototypes-web/v1/prototypes/${t}/screen-groups`,fetchOptions:n}]}},devConfig:{port:3001,manifestRoute:"/overview/local-manifest"}},Nn={featureName:"onboarding",gspName:"onboarding-web-static",pinnedVersion:"",supportsSingleTenant:!1,supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathRegex:/^\/onboarding/}],devConfig:{port:8081,manifestRoute:"/onboarding/local-manifest"},allowedDomains:{login:!0}},Rn={featureName:"rave",tiers:[h,g],gspName:"rave-static",devConfig:{port:8899,manifestRoute:"/local-manifest"}},_n={featureName:"specs-ui",gspName:"specs-ui",initialPageTitle:"Specs - InVision",faviconPath:$,globalFeatureSettings:{sidebar:{appearanceType:"docked",projectOnly:!0,initialVisibilityState:()=>"visible"}},supportsSingleTenant:!1,shouldUseFullLoadNavigation:rn("specs-ui"),isDocumentApp:()=>!0,supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/spec/"}],devConfig:{port:3e3,manifestRoute:"/local-manifest"},rum:{buildsPresentation:!0}},En={featureName:"connect-app",gspName:"connect-app-static",initialPageTitle:"Connect App - InVision",supportsSingleTenant:!1,supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/connect-app"}],devConfig:{port:3002,manifestRoute:"/local-manifest"}},xn={featureName:"team-management-web",gspName:"team-management-web-static",pinnedVersion:"",supportsSingleTenant:!1,initialBackgroundColor:"#f7f7f8",navigationRules:[{type:"controlled",pathStartsWith:"/teams/"}],globalFeatureSettings:{sidebar:{appearanceType:"docked"}},supportsComposition:()=>!0,devConfig:{port:4e3,manifestRoute:"/teams/static/local-manifest"}},kn={featureName:"freehand-web-v7",gspName:"freehand-web-v7-static",initialPageTitle:"Freehand - InVision",supportsSingleTenant:!1,shouldUseFullLoadNavigation:rn("freehand-web-v7"),isDocumentApp:()=>!0,supportsComposition:()=>!0,globalFeatureSettings:{sidebar:{appearanceType:"docked",projectOnly:!0,initialVisibilityState:()=>"visible"}},navigationRules:[{type:"pass-through",pathRegex:/^\/freehand\/(healthcheck)$/i},{type:"pass-through",pathStartsWith:"/freehand/",commonMatcher:"bot"},{type:"pass-through",pathStartsWith:"/projects/freehand/",commonMatcher:"bot"},{type:"pass-through",pathStartsWith:"/freehand/teams/tab-config.html"},{type:"temporary-redirect",pathStartsWith:"/freehand/document/",serverRedirectHandler:({url:e})=>e.replace(/\/freehand\/document\//,"/freehand/")},{type:"controlled",pathStartsWith:"/freehand/"},{type:"controlled",pathStartsWith:"/projects/freehand/"}],devConfig:{port:8545,manifestRoute:"/freehand/assets/local-manifest"},envContext:{default:{FREEHAND_BUGSNAG_API_KEY:"822c1ad2da34aaacc31c3080d590558b"},testing:{PROJECTS_ENVIRONMENT:"QA"},preview:{PROJECTS_ENVIRONMENT:"PREVIEW"},multiTenant:{PROJECTS_ENVIRONMENT:"LIVE"}},rum:{buildsPresentation:!0},dataLoaderConfig:{preloadConfigsBuilder:({url:e})=>{const t=new URL(e),n=t.pathname.substring(t.pathname.lastIndexOf("/")+1);if(!n)return[];return[{id:"freehand-config",url:"/freehand/api/context?nameSlug="+n,fetchOptions:{credentials:"include",headers:{"Request-Source":"freehand_web"}}}]}},overrideConfig:{navigationRules:[{type:"pass-through",pathRegex:/^\/freehand\/(healthcheck)$/i},{type:"pass-through",pathStartsWith:"/freehand/",commonMatcher:"bot"},{type:"pass-through",pathStartsWith:"/projects/freehand/",commonMatcher:"bot"},{type:"pass-through",pathStartsWith:"/freehand/teams/tab-config.html"},{type:"temporary-redirect",pathStartsWith:"/freehand/document/",serverRedirectHandler:({url:e})=>e.replace(/\/freehand\/document\//,"/freehand/")},{type:"controlled",pathStartsWith:"/freehand/"},{type:"controlled",pathStartsWith:"/projects/freehand/"}]}},An={featureName:"freehand-content-libraries",gspName:"freehand-content-libraries-static",supportsSingleTenant:!1,devConfig:{port:8015,manifestRoute:"/freehand-content-libraries/local-manifest"}},Pn={featureName:"freehand-extension-adobe-xd-sync",gspName:"freehand-extension-adobe-xd-sync-static",supportsComposition:()=>!0,devConfig:{port:8010,manifestRoute:"/freehand-extension-adobe-xd-sync/local-manifest"}},Fn={featureName:"freehand-extension-figma-sync",gspName:"freehand-extension-figma-sync-static",supportsComposition:()=>!0,devConfig:{port:8008,manifestRoute:"/freehand-extension-figma-sync/local-manifest"}},On={featureName:"freehand-extension-jira-cloud-sync",gspName:"freehand-extension-jira-cloud-sync-static",supportsComposition:()=>!0,devConfig:{port:8016,manifestRoute:"/freehand-extension-jira-cloud-sync/local-manifest"}},Tn={featureName:"freehand-extension-trello-sync",gspName:"freehand-extension-trello-sync-static",supportsComposition:()=>!0,devConfig:{port:8025,manifestRoute:"/freehand-extension-trello-sync/local-manifest"}},Ln="freehand-extension-prototypes",$n={featureName:Ln,gspName:Ln+"-static",supportsComposition:()=>!0,devConfig:{port:8012,manifestRoute:`/${Ln}/local-manifest`}},Mn={featureName:"freehand-extension-swatch",gspName:"freehand-extension-swatch-static",supportsComposition:()=>!0,devConfig:{port:8028,manifestRoute:"/freehand-extension-swatch/local-manifest"}},Dn={featureName:"freehand-inspect",gspName:"freehand-inspect-static",supportsSingleTenant:!1,devConfig:{port:8021,manifestRoute:"/freehand-inspect/local-manifest"}},In={featureName:"freehand-integrations-addons",gspName:"freehand-integrations-addons-static",supportsComposition:()=>!0,devConfig:{port:8026,manifestRoute:"/freehand-integrations-addons/local-manifest"}},Bn={featureName:"share",gspName:"share-dialog-ui",supportsSingleTenant:!0,devConfig:{port:8001,manifestRoute:"/share/local-manifest"}},Un={featureName:"move-document-ui-static",gspName:"move-document-ui-static",supportsSingleTenant:!1,devConfig:{port:8097,manifestRoute:"/move-document-ui-static/local-manifest"}},Wn={featureName:"studio-web",gspName:"studio-web-static",initialPageTitle:"InVision Studio",faviconPath:T,supportsSingleTenant:!1,isDocumentApp:()=>!0,shouldUseFullLoadNavigation:rn("studio-web"),navigationRules:[{type:"controlled",pathStartsWith:"/studio/"}],rum:{buildsPresentation:!0},devConfig:{port:8888,manifestRoute:"/local-manifest"}},jn={featureName:"auth-ui",gspName:"auth-ui-static",supportsComposition:()=>!0,supportsSingleTenant:!1,navigationRules:[{type:"controlled",pathStartsWith:"/auth"},{type:"client-redirect",pathRegex:/^\/d\/company-invitation\/accept\/company\/.*/i,clientRedirectHandler:function(e){let t=e.location.pathname.replace(/\/$/,"").split("/").pop();e.location.replace("/auth/join-team/invite?inviteToken="+t)}}],shouldRunAsStandaloneApp:()=>{let e=!0;try{const t=/^login\./.test(window.location.hostname),n=/(client|embedded|webview)/i.test(window.location.search),o=window.webkit&&window.webkit.messageHandlers;t||n||o||(e=!1)}catch(e){console.error(e)}return e},dataLoaderConfig:{preloadConfigsBuilder:({url:e})=>{const t={credentials:"include",cors:"cors",method:"GET",headers:{"Request-Source":"auth-ui-browser","Calling-Service":"auth-ui-browser"}};return[{id:"auth-meta-env",url:"/auth-meta/env",fetchOptions:t},.../^http(s)?:\/\/login\./.test(e)?[]:[{id:"auth-api-teams",url:"/auth-api/teams",fetchOptions:t}]]}},devConfig:{port:8982,manifestRoute:"/auth/static/local-manifest"},allowedDomains:{login:!0}},Vn={featureName:"request-access",gspName:"request-access-static",initialPageTitle:"Request Access - InVision",supportsComposition:()=>!0,supportsSingleTenant:!1,navigationRules:[{type:"controlled",pathRegex:/^\/request-access/}],devConfig:{port:8492,manifestRoute:"/request-access/local-manifest"}},Gn={featureName:"comment-kit-ui",gspName:"comment-kit-ui-static",isDocumentApp:()=>!1,devConfig:{port:4200,manifestRoute:"/local-manifest"}},qn={featureName:"conversations-ui",gspName:"conversations-ui",isDocumentApp:()=>!1,devConfig:{port:9e3,manifestRoute:"/local-manifest"}},Hn={featureName:"presentation-artifact-ui",gspName:"presentation-artifact-ui-static",initialPageTitle:"Presentation - InVision",tiers:[h,g,"preview",v],supportsSingleTenant:!1,shouldUseFullLoadNavigation:rn("presentation-artifact-ui"),isDocumentApp:()=>!0,navigationRules:[{type:"pass-through",pathStartsWith:"/presentation/",commonMatcher:"bot"},{type:"controlled",pathStartsWith:"/presentation/"}],shouldRunAsStandaloneApp:!1,devConfig:{port:4400,manifestRoute:"/local-manifest"}},zn={featureName:"global-search-ui",gspName:"global-search-ui-static",isDocumentApp:()=>!1,devConfig:{port:8094,manifestRoute:"/local-manifest"}},Kn={featureName:"global-banner",gspName:"global-banners-static",isDocumentApp:()=>!1,devConfig:{port:8005,manifestRoute:"/local-manifest"}},Jn={featureName:"paywall-library-static",gspName:"paywall-library-static",isDocumentApp:()=>!1,devConfig:{port:8022,manifestRoute:"/local-manifest"}},Yn={featureName:"notifications",gspName:"notifications-ui-static",devConfig:{port:7777,manifestRoute:"/local-manifest"}},Xn={featureName:"demo-react-app",gspName:"demo-react-app-static",tiers:[h,g,"preview"],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/demo-react-app"}],devConfig:{port:8003,manifestRoute:"/demo-react-app/local-manifest"}},Qn={featureName:"demo-subfeature-rpr",gspName:"demo-subfeature-rpr-static",supportsComposition:()=>!0,devConfig:{port:8007,manifestRoute:"/demo-subfeature-rpr/local-manifest"}},Zn={featureName:"console-inspect-static",gspName:"console-inspect-static",supportsSingleTenant:!1,devConfig:{port:8004,manifestRoute:"/console-inspect-static/local-manifest"}},eo={featureName:"console-prototype-import-ui",gspName:"console-prototype-import-ui-static",supportsComposition:()=>!0,devConfig:{port:8014,manifestRoute:"/console-prototype-import-ui/local-manifest"}},to="prototype-console-ui",no={featureName:to,gspName:to+"-static",initialPageTitle:"Prototype - InVision",faviconPath:L,supportsSingleTenant:!1,supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/prototype-console/"}],tiers:b,isDocumentApp:()=>!0,shouldUseFullLoadNavigation:rn(to),dataLoaderConfig:{preloadConfigsBuilder:()=>[{id:"console-v1-config",url:"/console-web/v1/config",fetchOptions:{credentials:"include",cors:"cors",headers:{"request-source":to}}}]},devConfig:{port:8027,manifestRoute:`/${to}/local-manifest`}},oo={featureName:"template-gallery",gspName:"template-gallery-static",supportsSingleTenant:!1,devConfig:{port:8006,manifestRoute:"/template-gallery/local-manifest"}},ao={featureName:"template-admin-ui",gspName:"template-admin-ui-static",initialPageTitle:"Template Admin - InVision",supportsSingleTenant:!1,devConfig:{port:8024,manifestRoute:"/template-admin-ui/local-manifest"},allowedHostnames:["invtemplates.invisionapp.com","invtemplates.invisionbeta.com","performance.invisionbeta.com"],globalFeatureSettings:{sidebar:{appearanceType:"docked",initialVisibilityState:()=>"visible"}},supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathRegex:/^\/templates\/admin$/}]},io={featureName:"doc-icon-picker",gspName:"doc-icon-picker-static",supportsSingleTenant:!1,devConfig:{port:8009,manifestRoute:"/doc-icon-picker/local-manifest"}},ro={featureName:"doc-chat",gspName:"doc-chat-static",supportsSingleTenant:!1,devConfig:{port:8013,manifestRoute:"/doc-chat/local-manifest"}},so={featureName:"near-real-time-client",gspName:"near-real-time-client-static",devConfig:{port:8011,manifestRoute:"/near-real-time-client/local-manifest"}},lo={featureName:"in-app-search",gspName:"in-app-search-static",supportsSingleTenant:!0,devConfig:{port:1273,manifestRoute:"/in-app-search/local-manifest"}},co={featureName:"external-docs-rpr",gspName:"external-docs-rpr-static",devConfig:{port:9030,manifestRoute:"/local-manifest"}},uo={featureName:"integrations-settings-rpr",gspName:"integrations-settings-rpr-static",devConfig:{port:9031,manifestRoute:"/local-manifest"}},po={featureName:"zoom-app",gspName:"zoom-app-static",navigationRules:[{type:"pass-through",pathStartsWith:"/zoom-app/api"},{type:"controlled",pathStartsWith:"/zoom-app"},{type:"controlled",pathStartsWith:"/webex"}],supportsComposition:()=>!0,devConfig:{port:8019,manifestRoute:"/local-manifest"}},fo={featureName:"document-management-ui",gspName:"document-management-ui-static",supportsSingleTenant:!1,devConfig:{port:8020,manifestRoute:"/document-management-ui/local-manifest"}};var mo=function(e,t=[]){if(e.match(/[^a-z0-9-]/))throw new Error(`"${e}" is not a valid feature name: only lower-case letters, numbers, and dashes are valid characters.`);if(t.find(t=>t.featureName===e))throw new Error(`A feature named "${e}" already exist in cloud-ui/feature-configs. You should manually set your local development server to use the path and port specified in the existing feature configuration.`);let n=1024+[...e].map((e,t)=>[..."abcdefghijklmnopqrstuvwxyz0123456789-"].indexOf(e)+t).reduce((e,t)=>e+t)%48127;for(;t.find(e=>e.devConfig&&e.devConfig.port===n);)n+=123;return{port:n,manifestRoute:`/${e}/local-manifest`}};const ho={featureName:"bugsnag",gspName:"rpr-bugsnag-static",devConfig:{port:8822,manifestRoute:"/bugsnag/local-manifest"}},go={featureName:"react",gspName:"rpr-react-static",devConfig:{port:8820,manifestRoute:"/react/local-manifest"}},vo={featureName:"react-dom",gspName:"rpr-react-dom-static",devConfig:{port:8821,manifestRoute:"/react-dom/local-manifest"}},wo={featureName:"helios-plus",gspName:"rpr-helios-plus-static",tiers:[h,g,"preview"],devConfig:{port:8824,manifestRoute:"/helios-plus/local-manifest"}},bo={featureName:"helios-one-web",gspName:"rpr-helios-one-web-static",devConfig:{port:8826,manifestRoute:"/helios-one-web/local-manifest"}},yo={featureName:"raas-component",gspName:"rpr-raas-component-static",devConfig:{port:8827,manifestRoute:"/raas-component/local-manifest"}},Co=/^\/projects\/([\w-]*)-([\w]+)\/overview\/?$/i,So={featureName:"pages-ui-v2",gspName:"pages-ui-v2-static",devConfig:{port:8828,manifestRoute:"/pages-ui-v2/local-manifest"},supportsComposition:()=>!0,globalFeatureSettings:{sidebar:{appearanceType:"docked",projectOnly:!0,initialVisibilityState:()=>"visible"}},navigationRules:[{type:"pass-through",pathRegex:Co,commonMatcher:"bot"},{type:"controlled",pathRegex:Co},{type:"permanent-redirect",pathStartsWith:"/pages/",serverRedirectHandler:({url:e})=>{const t=new URL(e);return`/projects/-${t.searchParams.get("projectId")||t.searchParams.get("projectID")}/overview`}}],dataLoaderConfig:{preloadConfigsBuilder:()=>an()}},No={featureName:"styled-components",gspName:"rpr-styled-components-static",devConfig:{port:8825,manifestRoute:"/styled-components/local-manifest"}},Ro={featureName:"addon-youtube",gspName:"addon-youtube-static",supportsSingleTenant:!1,devConfig:{port:8023,manifestRoute:"/addon-youtube/local-manifest"}},_o={featureName:"addon-giphy",gspName:"addon-giphy-static",supportsSingleTenant:!1,devConfig:{port:8018,manifestRoute:"/addon-giphy/local-manifest"}},Eo={featureName:"addon-unsplash",gspName:"addon-unsplash-static",supportsSingleTenant:!1,devConfig:{port:8029,manifestRoute:"/addon-unsplash/local-manifest"}},xo={featureName:"addon-hackathon",gspName:"addon-hackathon-static",tiers:[h,g,"preview"],devConfig:{port:8017,manifestRoute:"/addon-hackathon/local-manifest"}},ko={featureName:"demo-1",gspName:"demo-1",pinnedGSPManifestLocation:"http://localhost:8888/manifests/demo-1.manifest.json",tiers:[h],navigationRules:[{type:"controlled",pathRegex:/^\/demo1\/?$/i}],overrideConfig:{initialPageTitle:"test"},envContext:{default:{uiVariantContext:{default:{embedOpt:"default"},msteams:{embedOpt:"msteams"}}}}},Ao={featureName:"demo-2",gspName:"demo-2",pinnedGSPManifestLocation:"http://localhost:8888/manifests/demo-2.manifest.json",initialBackgroundColor:"#f7f7f8",tiers:[h],navigationRules:[{type:"controlled",pathRegex:/^\/demo2\/?$/i}]},Po={featureName:"demo-3",gspName:"demo-3",faviconPath:"spec",pinnedGSPManifestLocation:"http://localhost:8888/manifests/demo-3.manifest.json",tiers:[h],navigationRules:[{type:"controlled",pathRegex:/^\/demo3\/?$/i}],dataLoaderConfig:{preloadConfigsBuilder:()=>[{id:"demo3-photo",url:"https://jsonplaceholder.typicode.com/photos/2",fetchOptions:{}},{id:"demo3-post",url:"https://jsonplaceholder.typicode.com/posts/3",fetchOptions:{}},{id:"demo3-comments",dependsOn:["demo3-post"],requestHandler:async({dependencyResponses:e})=>{const t=e["demo3-post"];if(!t.ok)throw new Error("Response not ok");return{url:`https://jsonplaceholder.typicode.com/posts/${(await t.json()).id}/comments`,fetchOptions:{}}}}]}},Fo={featureName:"demo-rpr-1",gspName:"demo-rpr-1",pinnedGSPManifestLocation:"http://localhost:8888/manifests/demo-rpr-1.manifest.json",tiers:[h],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathRegex:/^\/demorpr1\/?$/i}]},Oo={featureName:"demo-rpr-2",gspName:"demo-rpr-2",pinnedGSPManifestLocation:"http://localhost:8888/manifests/demo-rpr-2.manifest.json",tiers:[h],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathRegex:/^\/demorpr2\/?$/i}]},To={[Ro.featureName]:Ro,[_o.featureName]:_o,[Eo.featureName]:Eo,[xo.featureName]:xo,[nn.featureName]:nn,[on.featureName]:on,[sn.featureName]:sn,[ho.featureName]:ho,[cn.featureName]:cn,[eo.featureName]:eo,[fn.featureName]:fn,[wo.featureName]:wo,[bo.featureName]:bo,[yo.featureName]:yo,[So.featureName]:So,[dn.featureName]:dn,[pn.featureName]:pn,[mn.featureName]:mn,[_n.featureName]:_n,[Sn.featureName]:Sn,[no.featureName]:no,[xn.featureName]:xn,[Bn.featureName]:Bn,[Un.featureName]:Un,[ko.featureName]:ko,[Ao.featureName]:Ao,[Po.featureName]:Po,[Fo.featureName]:Fo,[Oo.featureName]:Oo,[Xn.featureName]:Xn,[Qn.featureName]:Qn,[hn.featureName]:hn,[Nn.featureName]:Nn,[Vn.featureName]:Vn,[yn.featureName]:yn,[An.featureName]:An,[Pn.featureName]:Pn,[Fn.featureName]:Fn,[On.featureName]:On,[Tn.featureName]:Tn,[$n.featureName]:$n,[Mn.featureName]:Mn,[Dn.featureName]:Dn,[In.featureName]:In,[kn.featureName]:kn,[ze.featureName]:ze,[jn.featureName]:jn,[Wn.featureName]:Wn,[Rn.featureName]:Rn,[go.featureName]:go,[vo.featureName]:vo,[Gn.featureName]:Gn,[qn.featureName]:qn,[Hn.featureName]:Hn,[gn.featureName]:gn,[vn.featureName]:vn,[wn.featureName]:wn,[No.featureName]:No,[En.featureName]:En,[Yn.featureName]:Yn,[zn.featureName]:zn,[Kn.featureName]:Kn,[Jn.featureName]:Jn,[Zn.featureName]:Zn,[oo.featureName]:oo,[ao.featureName]:ao,[io.featureName]:io,[ro.featureName]:ro,[so.featureName]:so,[lo.featureName]:lo,[bn.featureName]:bn,[co.featureName]:co,[uo.featureName]:uo,[po.featureName]:po,[fo.featureName]:fo};function Lo({runtimeContext:e={}},t=To,n){const{originalUrl:o,tier:a,devSettings:i,forcedSettings:r}=e,s=new URL(o),l=s.searchParams.has("forceOverrideConfigs");let c=t;if([h,g].includes(a)){c={...{...$o({devSettings:i,configs:To,logger:n}),...Mo({forcedSettings:r,configs:To,logger:n})},...t}}return Object.entries(c).reduce((e,[t,n])=>{let o=!0;a===w&&!0!==n.supportsSingleTenant&&(o=!1),n.tiers&&!n.tiers.includes(a)&&(o=!1);const{allowedHostnames:r=null}=n;null!==r&&(r.includes(s.hostname)||(o=!1));const c=s.searchParams.get("forceFeatureForTier");if(c){c.split(",").includes(t)&&(o=!0)}const u=i&&i.features||[];!o&&u.includes(t)&&(o=!0);const d=s.searchParams.get("forceFeatureOffForTier");if(o&&d){d.split(",").includes(t)&&(o=!1)}if(o){let o=n;l&&b.includes(a)&&n.overrideConfig&&(o={...n,...n.overrideConfig}),e[t]=o}return e},{})}function $o({devSettings:e,configs:t,logger:n}){const o={};try{((null==e?void 0:e.features)||[]).filter(e=>!Object.keys(t).includes(e)).forEach(e=>{o[e]={__inferred:!0,featureName:e,gspName:e+"-static",tiers:[h,g],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/development/"+e}],devConfig:mo(e,Object.values(t))}})}catch(e){return null==n||n.warn("Unable to infer devConfigs: "+(null==e?void 0:e.message)),{}}return o}function Mo({forcedSettings:e,configs:t,logger:n}){const o={};try{Object.entries((null==e?void 0:e.forcedFeatureVersions)||{}).forEach(([e,n])=>{const a=t[e],i=n.includes("local-preview-"),r=!e.match(/[^a-z0-9-]/);!a&&i&&r&&(o[e]={__inferred:!0,featureName:e,gspName:e+"-static",tiers:[h,g],supportsComposition:()=>!0,navigationRules:[{type:"controlled",pathStartsWith:"/local-preview/"+e}]})})}catch(e){return null==n||n.warn("Unable to infer configs from forced versions: "+(null==e?void 0:e.message)),{}}return o}let Do=!1;function Io(e){return void 0!==e&&(Do=!!e),Do}function Bo(){!async function(){if(window&&(!window.measure||!window.measure.collect)&&window.inGlobalContext&&window.inGlobalContext.appMetaData){window.measure=window.measure||{},window.measure._utilitiesBuffer=[];const e=(e,...t)=>window.measure._utilitiesBuffer.push({args:t,method:e});["collect","identifyUser","initializeSegment","page","identify","append"].forEach(t=>window.measure[t]=e.bind(null,t)),window.measure.segmentUserId="unset-utilities-not-loaded",!1!==window.inGlobalContext.appMetaData.allowExternalScripts&&fe(async()=>{await ht().injectScript("analytics-ui","/measure/utilities.js");try{window.measure.initializeSegment(),window.measure._utilitiesBuffer.forEach(({args:e,method:t})=>{try{window.measure[t](...e)}catch(n){ce(`Failed calling measure.${t} with args: ${JSON.stringify(e)}`),ce(n)}})}catch(e){ce("Failed to load utilities.js"),ce(e)}})}}(),ht().preFeatureWork()}try{self["workbox:window:5.1.3"]&&_()}catch(e){}try{self["workbox:core:5.1.3"]&&_()}catch(e){}var Uo=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function Wo(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var jo=function(e,t){this.type=e,Object.assign(this,t)};function Vo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Go(){}var qo=function(e){var t,n;function o(t,n){var o,a;return void 0===n&&(n={}),(o=e.call(this)||this).t={},o.i=0,o.o=new Uo,o.u=new Uo,o.s=new Uo,o.v=0,o.h=new Set,o.l=function(){var e=o.g,t=e.installing;o.i>0||!Wo(t.scriptURL,o.m)||performance.now()>o.v+6e4?(o.P=t,e.removeEventListener("updatefound",o.l)):(o.p=t,o.h.add(t),o.o.resolve(t)),++o.i,t.addEventListener("statechange",o.k)},o.k=function(e){var t=o.g,n=e.target,a=n.state,i=n===o.P,r=i?"external":"",s={sw:n,originalEvent:e};!i&&o.j&&(s.isUpdate=!0),o.dispatchEvent(new jo(r+a,s)),"installed"===a?o.O=self.setTimeout((function(){"installed"===a&&t.waiting===n&&o.dispatchEvent(new jo(r+"waiting",s))}),200):"activating"===a&&(clearTimeout(o.O),i||o.u.resolve(n))},o.R=function(e){var t=o.p;t===navigator.serviceWorker.controller&&(o.dispatchEvent(new jo("controlling",{sw:t,originalEvent:e,isUpdate:o.j})),o.s.resolve(t))},o.S=(a=function(e){var t=e.data,n=e.source;return Vo(o.getSW(),(function(){o.h.has(n)&&o.dispatchEvent(new jo("message",{data:t,sw:n,originalEvent:e}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(a.apply(this,e))}catch(e){return Promise.reject(e)}}),o.m=t,o.t=n,navigator.serviceWorker.addEventListener("message",o.S),o}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a,i=o.prototype;return i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var o=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return Ho(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return o.j=Boolean(navigator.serviceWorker.controller),o.U=o.B(),Vo(o.L(),(function(e){o.g=e,o.U&&(o.p=o.U,o.u.resolve(o.U),o.s.resolve(o.U),o.U.addEventListener("statechange",o.k,{once:!0}));var t=o.g.waiting;return t&&Wo(t.scriptURL,o.m)&&(o.p=t,Promise.resolve().then((function(){o.dispatchEvent(new jo("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),o.p&&(o.o.resolve(o.p),o.h.add(o.p)),o.g.addEventListener("updatefound",o.l),navigator.serviceWorker.addEventListener("controllerchange",o.R,{once:!0}),o.g}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.g?Ho(this.g.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){try{return void 0!==this.p?this.p:this.o.promise}catch(e){return Promise.reject(e)}},i.messageSW=function(e){try{return Vo(this.getSW(),(function(t){return function(e,t){return new Promise((function(n){var o=new MessageChannel;o.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[o.port2])}))}(t,e)}))}catch(e){return Promise.reject(e)}},i.B=function(){var e=navigator.serviceWorker.controller;return e&&Wo(e.scriptURL,this.m)?e:void 0},i.L=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return Vo(navigator.serviceWorker.register(e.m,e.t),(function(t){return e.v=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{key:"active",get:function(){return this.u.promise}},{key:"controlling",get:function(){return this.s.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(o.prototype,a),o}(function(){function e(){this.M=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this._(e).add(t)},t.removeEventListener=function(e,t){this._(e).delete(t)},t.dispatchEvent=function(e){e.target=this;var t=this._(e.type),n=Array.isArray(t),o=0;for(t=n?t:t[Symbol.iterator]();;){var a;if(n){if(o>=t.length)break;a=t[o++]}else{if((o=t.next()).done)break;a=o.value}a(e)}},t._=function(e){return this.M.has(e)||this.M.set(e,new Set),this.M.get(e)},e}());function Ho(e,t){if(!t)return e&&e.then?e.then(Go):Promise.resolve()}const zo=(e={})=>{var n,o;const{isDev:a,globalServiceWorkerPath:i=t,logger:r=console,rum:s=window.rum,forceUnregister:l=!1,fromAppShell:c=!1,getFeatureNameFromUrl:u=(()=>"unknown")}=e,d=null===(n=window.inGlobalContext)||void 0===n||null===(o=n.appMetaData)||void 0===o?void 0:o.tier;if(!("serviceWorker"in navigator))return;if(l||location.search.includes("disableGlobalServiceWorker")||"off"===ee.getItem("global-service-worker-state"))return navigator.serviceWorker.getRegistrations().then(e=>{for(let t of e)t.unregister()}),void(location.search.includes("disableGlobalServiceWorker")&&ee.setItem("global-service-worker-state","off"));if(!(x.includes(d)||a))return;const p={isLoaded:!1,workbox:void 0,cacheUrls:()=>{}},f=a?i:(e=>"/gsp"+e.split("https://static.invisionapp-cdn.com").pop().replace(/\//g,"~~"))(i),m=new qo(f,{scope:"/"});m.addEventListener("message",e=>{switch(e.data.type){case"QUOTA_ERROR":null==s||s.markCustomEvent("GlobalServiceWorkerQuotaError"),null==r||r.warn("The Global Service Worker cache has exceeded its quota.");break;case"SEND_OFFLINE_VISITS":var t;(null===(t=e.data.payload)||void 0===t?void 0:t.length)>0&&(e.data.payload.forEach(({url:e,timestamp:t})=>{const n=u(e);null==s||s.markCustomEvent("GlobalServiceWorkerOfflineVisit",{offlineVisitUrl:e,offlineVisitTimestamp:t,offlineVisitFeatureName:n})}),null==r||r.info(`The Global Service Worker has detected and reported ${e.data.payload.length} offline visits.`))}}),m.register(),c&&m.messageSW({type:"APP_SHELL_READY"});return p.isLoaded=!0,p.workbox=m,p.cacheUrls=(e=[])=>{(k.includes(d)||a)&&e.length>0?m.messageSW({type:"CACHE_URLS",payload:{urlsToCache:e}}):null==r||r.info("Pre-caching won't run: it's not enabled in this environment or the pre-cache resources list is empty.")},p};const Ko=e=>[...new Set(e)],Jo=(e="")=>{if("string"!=typeof e)throw new TypeError("First argument to parseCookieHeader must be a string");const t={},n=e.split(/; */);for(let e=0;e<n.length;e++){const o=n[e];let a=o.indexOf("=");if(a<0)continue;const i=o.substr(0,a).trim();let r=o.substr(++a,o.length).trim();if('"'==r[0]&&(r=r.slice(1,-1)),null==t[i])try{t[i]=decodeURIComponent(r)}catch(e){t[i]=r}}return t};var Yo=new WeakMap;let Xo,Qo=!1;let Zo=[],ea=[];function ta(e={}){var t;const{timeoutLimit:n}=e;if("hosted"!==(null===(t=window.inGlobalContext.appMetaData)||void 0===t?void 0:t.oauthMode))return void console.warn("Tried to request an OAuth access token in an environment that does not support OAuth");const o={name:"inv:oauth:accessToken:requested",version:"1"};return parent.postMessage(o,"*"),new Promise((e,t)=>{if(Zo.push(e),n&&n>0){const e=setTimeout(t,n,new Error(`Response timeout limit exceeded: ${n}ms`));ea.push(e)}})}var na;const oa=Xe(),aa=Lo({runtimeContext:oa}),ia=ht().getManifestCollection();let ra={featureContexts:new Map,emitter:new s({logger:pe,scopeName:"AppShellGlobalScope"}),frameManager:Ae,runtimeProvidedResourcesManager:new class{constructor(e={}){Yo.set(this,{writable:!0,value:{}}),n(this,"resources",[]),n(this,"mappings",{}),n(this,"peerDependencies",{}),a(this,Yo,e.featureConfigs);const t=e.window||window;this.resources=t.inGlobalContext&&t.inGlobalContext.runtimeProvidedResources||[],t.inGlobalContext=t.inGlobalContext||{},t.inGlobalContext.runtimeProvidedResources=this}push(e,...t){null!=e&&e.name&&null!=e&&e.version&&null!=e&&e.getResourceInterface?this.getResource(e.name,e.version)?pe.log(`[RPR] → Skipping the ${e.name}@${e.version} push because it has already been pushed before.`):(o(this,Yo)[e.name]||pe.error(`[RPR] → A runtime-provided-resource with a name not associated to any feature was pushed: "${e.name}". Make sure you didn't misspell it and that a feature-config for it exists in Cloud-UI.`),this.resources.push(e,...t),pe.log(`[RPR] → ${e.name}@${e.version} pushed.`),this.mappings=this.mappings||{},this.mappings[e.name]=this.mappings[e.name]||{},this.mappings[e.name][e.version]=e.getResourceInterface()):pe.error("[RPR] → An invalid runtime-provided-resource was pushed: "+JSON.stringify(e))}getResource(e,t){return this.resources.find(n=>n.name===e&&n.version===t)}setResourcePeerDependency({resourceName:e,peerDependencyName:t,peerDependencyData:n}={}){null!=n&&n.version&&null!=n&&n.dependency?(this.peerDependencies[e]||(this.peerDependencies[e]={}),this.peerDependencies[e][t]?this.peerDependencies[e][t].version===n.version?pe.info(`[RPR] → The ${t}@${n.version} peer-dependency required by ${e} has already been loaded by another feature, so there's no need to load it again.`):pe.warn(`[RPR] → The current feature tried to load "${e}" using the ${t}@${n.version} peer-dependency, but another feature in the current session already loaded "${e}" with a different peer-dependency version (${this.peerDependencies[e][t].version}), so the new peer-dependency won't be loaded. Please notice that every feature that loads "${e}" should use the same exact peer-dependencies in order for the resource to work correctly.`):(this.peerDependencies[e][t]={},pe.log(`[RPR] → The ${t}@${n.version} peer-dependency required by ${e} has been loaded.`),this.peerDependencies[e][t]=n)):pe.error('[RPR] → Peer-dependencies should follow the { "version", "dependency" } object shape; tried to load an invalid peer-dependency:',n)}setResourceProxy({resourceName:e,resourceVersion:t,proxiedByVersion:n}){const o=this.getResource(e,t);o?(this.mappings[o.name][n]=o.getResourceInterface(),pe.log(`[RPR] → Proxying ${o.name}@${n} with ${o.name}@${o.version}.`)):pe.error(`[RPR] → Tried to proxy a runtime-provided-resource that isn't loaded: ${o}@${t}`)}}({featureConfigs:aa}),onEntryBeforeMount:m(e=>()=>{ht().toggleAppDisplay(e,!1)}),onAfterMount:m(e=>({commandResolved:t})=>{t&&ht().toggleAppDisplay(e,!0)}),onAfterUnmount:m(e=>()=>{ht().toggleAppDisplay(e,!1)}),subscribeToFeatureContextEvents(e){e.supportsComposition()&&e.on(`${C.BEFORE}:${y.MOUNT}:${e.featureName}`,ra.onEntryBeforeMount(e.featureName)),e.on(`${C.AFTER}:${y.MOUNT}:${e.featureName}`,ra.onAfterMount(e.featureName)),e.on(`${C.AFTER}:${y.UNMOUNT}:${e.featureName}`,ra.onAfterUnmount(e.featureName))},unsubscribeFromFeatureContextEvents(e){e.supportsComposition()&&e.off(`${C.BEFORE}:${y.MOUNT}:${e.featureName}`,ra.onEntryBeforeMount(e.featureName)),e.off(`${C.AFTER}:${y.MOUNT}:${e.featureName}`,ra.onAfterMount(e.featureName)),e.off(`${C.AFTER}:${y.UNMOUNT}:${e.featureName}`,ra.onAfterUnmount(e.featureName))},createFeatureContext(e){const t=aa[e];if(t){const n=new tn(t,ia.getFeatureManifest(e),ra.emitter,ra.runtimeProvidedResourcesManager);return ra.featureContexts.set(e,n),n}},async mountApplicationForCurrentRoute(e={}){const{previousApp:t}=e,{feature:{featureName:n}}=Fe({url:location.href,featureConfigs:aa,userAgent:navigator.userAgent})||{feature:{}},o=ra.getFeatureContext(n),a=o.featureConfig,i=o.shouldRunAsStandaloneApp(),r=!i&&!o.supportsComposition();V({featureName:n,appName:n,featureVersion:o.version,featureIsStandalone:i,noRequiredData:!(!a.rum||!a.rum.noRequiredData),buildsPresentation:!(!a.rum||!a.rum.buildsPresentation)});const s=W("start-mounting-app-"+n,{mountingApp:n,mountStart:!0,previousApp:t});let c=-1;i?document.body.classList.add("standalone"):document.body.classList.remove("standalone"),r?document.body.classList.add("feature-is-framed"):document.body.classList.remove("feature-is-framed");const{MOUNT:f}=y;ht().setDocumentStateForFeature(a),ht().updateRootStyles(a);const m=await o.getManifest();if(!m)throw new Error("Missing manifest for "+n);return new Promise((async function(e,t){try{if((e=>{var t;(l.mountedApplication=e.featureName,l.mountHistory.slice(-1)[0]!==e.featureName)&&(l.mountHistory.push(e.featureName),null!=e&&null!==(t=e.featureConfig)&&void 0!==t&&t.isDocumentApp&&e.featureConfig.isDocumentApp()&&l.docsVisitedHistory.add(e.featureName))})(o),ra.subscribeToFeatureContextEvents(o),r&&(await Ce({container:ht().getFrameContainer(),frameScopedRootDOM:wt,featureName:n,initialLocation:location.href,onSrcChange:e=>{ra.navigate(e)}}),gt(n).interceptNavigation(aa,ra.mountNextApplication,wt)),ra.preloadRequests({featureContext:o}),r)try{ht().getWindow().measure=gt(n).getWindow().measure}catch(e){ce(e)}gt(n).preFeatureWork({featureConfigs:aa});const t=()=>new Promise((e,t)=>{if(o.hasSidebarEnabled()){const n=performance.now();ra.mountSidebar().then(()=>{c=performance.now()-n,e()},e=>{c=performance.now()-n,t(new Error("Sidebar mount failure: "+e))})}else u()?e():ra.disableSidebar().finally(()=>{e()})});o.supportsComposition()?await o._loadRequiredResources():j("time-to-loadRuntimeProvidedResources-"+n,0,0,{extraProps:{}});const a=r?t():await t(),s=gt(n).injectCriticalPathFiles(m);await gt(n).enableFeatureArtifacts(m),await Promise.all([s,a]),o.once(`${C.AFTER}:${f}`,()=>{e(),Ne(n)}),o.sendCommand(f,{envContext:o.envContext,mountElement:gt(n).getFeatureRoot(n),renderReactComponent:o._renderReactComponent}),gt(n).injectAsyncThirdParties({isStandalone:i})}catch(e){return t(e)}})).finally(()=>{const e=W("end-mounting-app-"+n,{sidebarMountTime:c,appTransitionDepth:d(),appVisitsForPageLoad:p(n)}),t=j("time-to-mount-app-"+n,s,e);re(`Mounting the app ${n} took ${t.markProps.measurement}ms`)})},preloadRequests(e={}){try{var t,n,o;const{featureContext:a}=e,i=null==a?void 0:a.featureConfig,r={cookie:document.cookie?Jo(document.cookie):{},url:window.location.href,manifest:null===(t=ia.getManifestItem(i.featureName))||void 0===t?void 0:t.manifest},s=(null===(n=i.dataLoaderConfig)||void 0===n||null===(o=n.preloadConfigsBuilder)||void 0===o?void 0:o.call(n,r))||[];(null==s?void 0:s.length)>0&&a.dataLoader._setupRequestsPreloading({preloadConfigs:s,requestsPreloadedByScript:window.__APP_SHELL_PRELOADED_REQUESTS__})}catch(e){ce("Requests preloading failure",e)}window.__APP_SHELL_PRELOADED_REQUESTS__={}},precacheCriticalPathFiles(e,t){var n,o,a,i,r;const{featureContext:s}=t,l=null==s?void 0:s.featureConfig,d=(null==l?void 0:l.featureName)===c(),p=null==s?void 0:s.shouldRunAsStandaloneApp(),f=null==l||null===(n=l.isDocumentApp)||void 0===n?void 0:n.call(l,{url:window.location.href}),m=null==l||null===(o=l.globalServiceWorkerConfig)||void 0===o||null===(a=o.skipLinksOnPagePrecaching)||void 0===a?void 0:a.call(o,{url:window.location.href}),h=null==l||null===(i=l.globalServiceWorkerConfig)||void 0===i||null===(r=i.skipRedirectToPrecaching)||void 0===r?void 0:r.call(i,{url:window.location.href});if(!s||!d||!e.isLoaded||p||f&&u()||m&&h)return;let g=[];if(m||(g=Array.from(s.getFeatureFrameWindow().document.querySelectorAll("a")).map(e=>new URL(e.href,window.location.origin).href)),!h){const e=new URLSearchParams(window.location.search).get("redirectTo");e&&g.push(new URL(e,window.location.origin).href)}const v=xe(),w=g.map(e=>Fe({url:e,featureConfigs:aa,origin:v.location.origin,userAgent:navigator.userAgent})).filter(e=>Oe(e)).map(e=>e.feature),b=Ko(w.map(e=>Ge({featureName:null==l?void 0:l.featureName,manifest:ia.getManifestItem(e.featureName).manifest,devSettings:oa.devSettings,forcedSettings:oa.forcedSettings})).flat().filter(e=>null==e?void 0:e.startsWith("https://static.invisionapp-cdn.com")).map(e=>e.replace("https://static.invisionapp-cdn.com","https://static-p2.invisionapp-cdn.com"))),y=Ko(w.map(e=>e.featureName));return ue(`Pre-caching ${b.length} critical path files from "${l.featureName}"`),se("Links on page",g),se("Features linked on page",y),se("Critical path files that will be precached",b),((...e)=>{te&&console.groupEnd(...e)})(),b.length&&e.cacheUrls(b),b},async teardownCurrentApplication(e={}){const{nextApp:t}=e,n=c(),o=W("start-teardown-app-"+n);if(!n)return;const a=ra.getFeatureContext(n),i=await a.getManifest();ra.unsubscribeFromFeatureContextEvents(a);const{UNMOUNT:r}=y;a.supportsComposition()&&a._isReactEntryPointControlledByAppShell()&&a._unmountReactComponent();try{await new Promise(e=>{a.once(`${C.AFTER}:${r}`,e),a.sendCommand(r,{nextAppFeatureName:t||"",mountElement:gt(n).getFeatureRoot(n),envContext:a.envContext})})}catch(e){ce("Unable handle the UNMOUNT command in app teardown",null==e?void 0:e.message)}if(a.dataLoader._clearRequestsPreloading(),a.supportsComposition())try{await gt(n).disableFeatureArtifacts(i,{nextFeatureName:t||""})}catch(e){ce("Unable to disable feature artifacts in app teardown",null==e?void 0:e.message)}else a.unregisterCommandHandlers(),wt(Re(n)).clearAllScopedListeners(),Se(n),Ue({excludeKeys:je});const s=W("end-teardown-app-"+n),l=j("time-to-teardown-app-"+n,o,s);re(`Teardown of the app ${n} took ${l.markProps.measurement}ms`)},async mountNextApplication(e,t){const n=c();if(e===n&&!t)return;const{manifestItems:o}=ia;o[e]?(ht().toggleAppDisplay(n,!1),await ra.teardownCurrentApplication({nextApp:e}),await ra.mountApplicationForCurrentRoute({previousApp:n})):le("Attempted to navigate to unknown feature: "+e)},async mountSidebar(){const{MOUNT:e}=y,t=ra.getFeatureContext("sidebar"),n=await t.getManifest();if(!ht().hasSidebarRoot())return await t._loadRequiredResources(),await gt("sidebar").injectCriticalPathFilesInDocument(xe().document,n),new Promise(n=>{t.once(`${C.AFTER}:${e}`,({commandResolved:e})=>{const t=ht().getSidebarRoot();t&&t.setAttribute("mount-status",e?"mount-successful":"mount-failed"),n()}),t.sendCommand(e,{envContext:t.envContext,mountElement:ht().getSidebarRoot()})});await gt("sidebar").enableFeatureArtifacts(n)},async disableSidebar(){const e=ra.getFeatureContext("sidebar"),t=await e.getManifest();await gt("sidebar").disableFeatureArtifacts(t)},async initializeAppShell(){const e=oa.devSettings&&oa.devSettings.features||[];if(e.length>0){oe("App Shell is loading the following features from the your local development environment: "+e.join(", "));const t=`${location.protocol}//${location.host}${location.pathname}?clearFeatureDev`;oe("Use the following link if you want to load the default features instead: "+t),e.forEach(e=>{const t=null==aa?void 0:aa[e];if(null!=t&&t.__inferred){const t=`${location.protocol}//${location.host}/development/${e}`;ae(`App Shell couldn't find a feature-config for "${e}" in Cloud-UI — its development settings will be automatically inferred and it will be available for development/testing at ${t}`)}})}const t=null==oa?void 0:oa.forcedSettings;Object.entries((null==t?void 0:t.forcedFeatureVersions)||{}).forEach(([e,t])=>{null!=aa&&aa[e]?oe(`App Shell is forcing "${e}" to be at version "${t}"`):ae(`Tried to force a version (using "?forceFeatureVersions") of a feature that does not exist: "${e}"`)});try{const{buildContext:e={},appShellBundleVersion:t}=oa,n="modern"===t?e.appShell:e.appShellLegacy;let o;V({appShellVersion:(n||"").split("/").pop(),tier:oa.tier}),ht().interceptNavigation(aa,ra.mountNextApplication),ht().setupInitialStyles(),Bo();try{o=zo({isDev:"development"===e.envType,logger:pe,forceUnregister:"legacy"===t,fromAppShell:!0,getFeatureNameFromUrl:e=>{var t,n;return null===(t=Fe({url:e,featureConfigs:aa,userAgent:navigator.userAgent}))||void 0===t||null===(n=t.feature)||void 0===n?void 0:n.featureName}})}catch(e){ce("Error initializing Global Service Worker",e)}o&&ra.on(`${C.BEFORE}:${y.MOUNT}`,({featureName:e})=>{const t=ra.getFeatureContext(e);q(["rum-send-data-apptransitiontiming"],()=>{setTimeout(()=>fe(()=>{ra.precacheCriticalPathFiles(o,{featureContext:t})}),1200)},H().length-1)}),await ra.mountApplicationForCurrentRoute()}catch(e){ce("Error initializing AppShell",e),ht().toggleErrorDisplay(!0)}},getFeatureContext:e=>ra.featureContexts.get(e)||ra.createFeatureContext(e),on:(e,t,n)=>ra.emitter.on(e,t,n),once:(e,t,n)=>ra.emitter.once(e,t,n),off:(e,t)=>{if(!e||!t)throw new Error("appShell.off() requires two parameters, the event type and the handler that needs to be removed from subscription");return ra.emitter.off(e,t)},navigate(e="",t={}){const{shouldReplace:n,forceRemount:o}=t;try{e=new URL(e,location.origin)}catch(t){return void ce("Called appShell.navigate() with invalid URL: ",e,t)}const a=e.origin!==location.origin;re(`Called appShell.navigate() with url: ${e}, isCrossOriginNavigate: ${a}`);const i=Fe({url:e,featureConfigs:aa,userAgent:navigator.userAgent});if(!Oe(i))return le("Called appShell.navigate() with uncontrolled route: ",e.toString()),void(n?location.replace(e):location.assign(e));if(Te({url:e.hostname,feature:i.feature})){const t=Le({url:e.hostname,protocol:e.protocol});return re(`navigation triggered redirect for reserved domain for app: ${i.feature.featureName} to url: ${t}`),void location.assign(t)}if(d()>15)return re(`Max app transition depth exceeded (${d()}), this app transition will be a full page navigation.`),void location.assign(e);const{feature:{featureName:r}}=i,s=c()||Fe({url:location.href,featureConfigs:aa}).feature.featureName,l=s!==r,u=l&&ra.getFeatureContext(s).shouldRunAsStandaloneApp(),p=ra.getFeatureContext(r).shouldForceFullLoadOnNavigation();if(a||u||p)return re("navigation triggering full load",{isCrossOriginNavigate:a,navigatingAwayFromStandaloneApp:u,featureDeterminedFullLoad:p}),void location.assign(e);if(l||o){const{propagationStopped:t}=window.inGlobalContext.appShell.emit(`${C.BEFORE}:${S.APP_NAVIGATION}`,{currentFeatureName:s},!0);t||(re(`appShell.navigate() triggered navigation to another app: ${r}, shouldReplace: ${n}, forceRemount: ${o}`),n?history.replaceState({},"",e):history.pushState({},"",e),ra.mountNextApplication(r,o))}else{re("appShell.navigate() url owned by current app: "+s);const t=Re(s);n?t.history.replaceState({},"",e):t.history.pushState({},"",e);const o=new t.PopStateEvent("popstate",{state:{}});t.dispatchEvent(o)}}};const{getVendorContext:sa,updateVendorContext:la,onVendorContextReady:ca,onVendorContextUpdated:ua}=new class{constructor({emitter:e=new s}){n(this,"emitter",null),n(this,"handlers",new Map),n(this,"vendorContext",{createdAt:null,createdAtDateFormatIso8601:null,email:null,firstName:null,lastName:null,lastKnownIPAddress:null,teamName:null,teamSubdomain:null,teamID:null,vendorID:null,userID:null,segmentID:null}),n(this,"_contextUpdatedFromDefault",!1),n(this,"updateVendorContext",(e={})=>{let t=!1;for(let[n,o]of Object.entries(e))void 0!==this.vendorContext[n]&&this.vendorContext[n]!==o&&(this.vendorContext[n]=o,this._contextUpdatedFromDefault=!0,t=!0);t&&this.emitter.emit(S.USER_VENDOR_CONTEXT_UPDATED,this.vendorContext)}),n(this,"getVendorContext",()=>({...this.vendorContext})),n(this,"onVendorContextReady",(e=(()=>{}))=>{this._contextUpdatedFromDefault?e(this.vendorContext):this.emitter.once(S.USER_VENDOR_CONTEXT_UPDATED,e)}),n(this,"onVendorContextUpdated",(e=(()=>{}))=>{this.emitter.on(S.USER_VENDOR_CONTEXT_UPDATED,e),this._contextUpdatedFromDefault&&e(this.vendorContext)}),this.emitter=e}}({emitter:ra.emitter});ua(e=>{e.vendorID&&Io(!0)});const da=window.inGlobalContext||{};return window.inGlobalContext={...da,appShell:{currentApp:{isEntryApp:u,getAppTransitionDepth:d,getFeatureContext:()=>{const e=c()||Fe({url:location.href,featureConfigs:aa}).feature.featureName;return ra.getFeatureContext(e)}},getFeatureContext:ra.getFeatureContext,on:ra.on,off:ra.off,once:ra.once,emit:ra.emitter.emit,navigate:ra.navigate,user:{hasAuthedSessionHint:Io,getVendorContext:sa,updateVendorContext:la,onVendorContextReady:ca,onVendorContextUpdated:ua,requestNewOAuthAccessToken:ta},events:{COMMAND_TYPES:y,EVENT_PREFIXES:C,GENERIC_EVENTS:S},frameManager:Ae,_internal:{getRuntimeContext:Xe,getFeatureConfigs:e=>Lo({runtimeContext:e||oa}),getManifestCollection:()=>ht().getManifestCollection()},loadingIndicator:{toggleDisplay:ht().toggleLoadingIndicatorDisplay,offsetLocation:ht().offsetLoadingIndicator},domControls:{replaceFavicons:ht().replaceFavicons},usagePatterns:{navigation:{getAppVisitsForPageLoad:p,hasAppBeenVisitedForPageLoad:e=>p(e)>=1,getDocsVisitedForPageLoad:()=>l.docsVisitedHistory.size}}}},"hosted"===(null===(na=window.inGlobalContext.appMetaData)||void 0===na?void 0:na.oauthMode)&&window!==top?(function(e){let t=!1;window.addEventListener("message",n=>{var o,a;const i=n.data||{};var r;if("inv:oauth:accessToken:granted"!==!i.name&&"1"!==!i.version&&null!==(o=i.data)&&void 0!==o&&o.accessToken&&(r={Authorization:"Bearer "+(null===(a=i.data)||void 0===a?void 0:a.accessToken)},Xo=r,t||(t=!0,Qo||(Qo=!0,function(){const e=window.XMLHttpRequest.prototype,t=e.open,n=e.send;e.open=function(e,n){return this.__url=n,t.apply(this,arguments)},e.send=function(e){if(this.__url&&Xo&&Object.keys(Xo).length>0){let e=!1;try{e=He(this.__url)}catch(e){}e&&Object.entries(Xo).forEach(([e,t])=>{this.setRequestHeader(e,t)})}return n.apply(this,arguments)}}(),function(){if(!window.fetch)return;const e=window.fetch;window.fetch=function(t,n){if(!Xo||0===Object.keys(Xo).length)return e.apply(this,arguments);let o;"string"==typeof t?o=t:null!=t&&t.url&&(o=t.url);let a=!1;try{a=!!o&&He(o)}catch(e){}if(a){let e;"string"!=typeof t&&null!=t&&t.headers?e=t.headers:((n=n||{}).headers=n.headers||{},e=n.headers),Object.entries(Xo).forEach(([t,n])=>{window.Headers&&e instanceof Headers?e.set(t,n):"object"==typeof e&&(e[t]=n)})}return e.apply(this,[t,n])}}()),e()),Zo.length>0)){for(const e of Zo)e();Zo=[];for(const e of ea)clearTimeout(e);ea=[]}})}(()=>ra.initializeAppShell()),ta()):ra.initializeAppShell(),e.appShell=ra,e}({});
//# sourceMappingURL=app-shell.8ca9f44e.js.map