{"version":3,"sources":["webpack:///./app/scripts/components/brandBar.ts"],"names":["localizedResources","require","BrandBar","react2angular","props","React","ReactBrandBar","onSignInRequested","$log","error","onRegisterRequested","onForgotPasswordRequested","onSignOutRequested","$window","location","href","appSettings","signOutUri","onLogoClicked","isAuthenticated","isAssetListState","$state","current","name","go","reload","inherit","usesAuthentication","isAuthProcessing","useAuthPortal","authPortalSignInUrl","userService","getOauthSignInUrl","faithlifeUrl"],"mappings":"6tCASA,IAAMA,mBAAqBC,oBAAQ,QA8CtBC,SAAWC,kEA5CE,SAACC,OAAD,OAWzBC,iDAAoBC,2D,yfAApB,EACCC,kBAAmB,WAClBH,MAAMI,KAAKC,MAAM,iEAElBC,oBAAqB,WACpBN,MAAMI,KAAKC,MAAM,mEAElBE,0BAA2B,WAC1BP,MAAMI,KAAKC,MAAM,yEAElBG,mBAAoB,WACnBR,MAAMS,QAAQC,SAASC,KAAOX,MAAMY,YAAYC,YAEjDC,cAAed,MAAMe,gBAClB,WACA,IACMC,iBADiB,WACEhB,MAAMiB,OAAOC,QAAQC,KAC9CnB,MAAMiB,OAAOG,GACZ,SACA,CAAEC,OAAQL,kBACV,CAAEM,SAAS,EAAOZ,UAAWM,oBAG9B,KACHpB,sCACA2B,oBAAoB,EACpBC,kBAAkB,EAClBC,eAAe,EACfC,oBAAqB1B,MAAM2B,YAAYC,mBAAkB,GACzDC,aAAc7B,MAAMY,YAAYiB,cAC7B7B,UAKJ,CAAC,YAAa,kBAAmB,YACjC,CAAC,YAAa,OAAQ,SAAU,UAAW,cAAe","file":"4.ce5c7138.chunk.js","sourcesContent":["import * as angular from 'angular';\nimport * as uirouter from '@uirouter/angularjs';\nimport { BrandBar as ReactBrandBar } from '@faithlife/brand-bar';\nimport { IAppSettings, IUserService } from '../services';\nimport { react2angular } from 'react2angular';\nimport * as React from 'react';\n\nimport '@faithlife/brand-bar/dist/brand-bar.css';\n\nconst localizedResources = require('@faithlife/brand-bar/dist/locales/en-US/resources.json');\n\nconst ReactBrandBarShim = (props: {\n\t$location: angular.ILocationService;\n\t$log: angular.ILogService;\n\t$state: uirouter.StateService;\n\t$window: angular.IWindowService;\n\tappSettings: IAppSettings;\n\tavatarUrl: string;\n\tisAuthenticated: boolean;\n\tuserName: string;\n\tuserService: IUserService;\n}) =>\n\tReact.createElement(ReactBrandBar, {\n\t\tonSignInRequested: () => {\n\t\t\tprops.$log.error('Auth Portal bypassed; cannot handle event: onSignInRequested');\n\t\t},\n\t\tonRegisterRequested: () => {\n\t\t\tprops.$log.error('Auth Portal bypassed; cannot handle event: onRegisterRequested');\n\t\t},\n\t\tonForgotPasswordRequested: () => {\n\t\t\tprops.$log.error('Auth Portal bypassed; cannot handle event: onForgotPasswordRequested');\n\t\t},\n\t\tonSignOutRequested: () => {\n\t\t\tprops.$window.location.href = props.appSettings.signOutUri;\n\t\t},\n\t\tonLogoClicked: props.isAuthenticated\n\t\t\t? () => {\n\t\t\t\t\tconst assetListState = 'assets';\n\t\t\t\t\tconst isAssetListState = props.$state.current.name === assetListState;\n\t\t\t\t\tprops.$state.go(\n\t\t\t\t\t\t'assets',\n\t\t\t\t\t\t{ reload: isAssetListState },\n\t\t\t\t\t\t{ inherit: false, location: !isAssetListState }\n\t\t\t\t\t);\n\t\t\t }\n\t\t\t: null,\n\t\tlocalizedResources,\n\t\tusesAuthentication: true,\n\t\tisAuthProcessing: false,\n\t\tuseAuthPortal: true,\n\t\tauthPortalSignInUrl: props.userService.getOauthSignInUrl(false),\n\t\tfaithlifeUrl: props.appSettings.faithlifeUrl,\n\t\t...props,\n\t});\n\nexport const BrandBar = react2angular(\n\tReactBrandBarShim,\n\t['avatarUrl', 'isAuthenticated', 'userName'],\n\t['$location', '$log', '$state', '$window', 'appSettings', 'userService']\n);\n"],"sourceRoot":""}