{"version":3,"sources":["components/common/loading/index.js","auth/callBackHandlers.js","components/form-components/FormFieldSelect/styles.js","components/form-components/FormFieldSelect/index.js","utils/acl-permissions/core.js","auth0/helper/warn.js","redux/store-manager.js","auth0/helper/request-builder.js","utils/index.js","styles/Breakpoint.js","redux/reducers/dsf-reducer.js","features/assets/asset-status/asset-status.helper.js","styles/styled-components/helpers.js","routes/private-route.js","auth0/version.js","auth0/helper/storage.js","auth0/web-auth/transaction-manager.js","auth0/web-auth/cross-origin-authentication.js","auth/index.js","styles/styled-components/mixins.js","styles/styled-components/common.js","styles/styled-components/animations.js","components/common/modal/styles.js","components/common/modal/index.js","components/common/button/styles.js","components/common/button/index.js","components/common/inpage-loading/styles.js","components/common/inpage-loading/index.js","utils/dateUtils.js","components/common/loading/styles.js","components/common/loading/bubbleLoading.js","components/common/loading/loading.js","components/common/help/help-tooltip.js","components/Icon/styles.js","components/Icon/index.js","redux/reducers/canonhub.js","redux/reducers/auth.js","redux/reducers/account.js","redux/reducers/search.js","redux/reducers/acl-permissions.js","redux/reducers/acl.js","redux/reducers/metadata.js","redux/reducers/index.js","redux/store.js","auth0/authentication/index.js","components/common/terms-conditions/terms-conditions-api.js","components/common/terms-conditions/terms-conditions-content.js","components/common/terms-conditions/terms-conditions.js","auth0/helper/ssodata.js","auth0/helper/error.js","auth0/web-auth/index.js","auth0/helper/times.js","auth0/web-auth/web-message-handler.js","auth0/helper/iframe-handler.js","components/Icon/assets/calendar.svg","app-config/acl.js","app-config/AppConfigApi.js","app-config/meta-configuration/index.js","app-config/index.js","components/Icon/assets/close.svg","components/Icon/assets/email.svg","components/Icon/assets/help.svg","utils/errorCodes.js","auth0/index.js","redux/actions/auth.js","redux/actions/canonhub/index.js","redux/actions/account.js","redux/actions/dsf-actions.js","redux/actions/search.js","redux/actions/index.js","components/error-pages/styles.js","components/error-pages/generic-error.js","components/error-pages/error-boundary.js","components/error-pages/index.js","components/common/animate-load/index.js","auth0/helper/object.js","history/history.js","utils/acl-permissions/auth-hoc.js","utils/acl-permissions/component.js","utils/acl-permissions/actions.js","utils/acl-permissions/index.js","utils/constants.js","auth0/helper/base64_url.js","auth0/helper/object-assign.js","auth0/helper/storage/handler.js","auth0/helper/storage/dummy.js","auth0/helper/storage/cookie.js","auth0/helper/parameters-whitelist.js","auth0/authentication/passwordless-authentication.js","auth0/authentication/db-connection.js","auth0/helper/plugins.js","auth0/helper/window.js","auth0/helper/random.js","auth0/web-auth/redirect.js","auth0/web-auth/popup.js","auth0/helper/url.js","auth0/helper/popup-handler.js","auth0/web-auth/silent-authentication-handler.js","auth0/web-auth/hosted-pages.js","auth0/web-auth/username-password.js","auth0/management/index.js","redux/actions/actionTypes.js","auth/tokenHandlers.js","auth/aclHandlers.js","auth/preAuth.js","mock-service/mockAPIWorker.js","mock-service/index.js","auth/postAuth.js","hotjar/index.js","auth/AuthService.js","components/common/buttons/link-button-icon.jsx","components/common/header_v2/AccountSelect/styles.js","components/common/header_v2/AccountSelect/index.js","features/landing/tile.json.js","components/common/header_v2/HamburgerMenu/hamburger-menu.js","components/common/header_v2/HamburgerMenu/index.js","components/common/local-storage/helper.js","components/common/header_v2/header.js","components/common/header_v2/index.js","components/common/footer/footer.js","features/assets/routes.js","features/assets/index.js","features/billing/routes.js","features/billing/billing.js","features/landing/components/tile.js","features/landing/landing.js","features/orders/assets/routes.js","features/orders/assets/index.js","features/orders/routes.js","features/orders/index.js","loader.js","features/auth/sso/singlesignon.jsx","lazy-load/index.js","features/home/home.js","routes/routes.js","features/chatbot/dialogFlow.js","components/common/wingman/wingman.js","features/chatbot/chatbot.js","components/back-to-top/styles.js","components/back-to-top/index.js","App.js","registerServiceWorker.js","interceptors/index.js","components/common/scroll-to-top/index.js","index.js","styles/styled-components/theme.js","auth/constants.js","auth0/helper/assert.js","auth0/helper/response-handler.js","utils/acl-permissions/constants.js"],"names":["AnimateLoad","Loading","canCallBack","pathname","cbURL","localStorage","getItem","CALLBACK","deleteCallBack","setItem","window","location","removeItem","willCallBack","fixZero","v","innerHeight","theme","height","forms","borderTopWidth","borderBottomWidth","StyledSelect","styled","Select","props","fontSize","borderRadius","borderRightWidth","borderLeftWidth","color","borderColor","searchable","paddingHorizontal","placeholderColor","placeholderOpacity","StyledCreatableSelect","withComponent","Creatable","FormFieldSelect","handleChange","value","onChange","Array","isArray","map","this","clearable","creatable","disabled","id","multi","name","onBlur","options","placeholder","required","SelectComponent","Component","defaultProps","type","checkVisibility","userPermissions","routeOrComponentPermissions","length","some","val","includes","Warn","disableWarnings","prototype","warning","message","console","warn","module","exports","persistConfig","key","storage","whitelist","StoreManager","store","reducerMap","registerReducers","newReducerMap","Object","entries","constructor","replaceReducer","combineReducers","createStore","reduxPersistReducer","persistReducer","args","request","require","base64Url","version","RequestWrapper","req","method","url","body","_data","headers","_header","RequestObj","RequestBuilder","_sendTelemetry","_telemetryInfo","_timesToRetryFailedRequests","abort","getMethod","getBody","getUrl","getHeaders","set","send","withCredentials","end","cb","setCommonConfiguration","ongoingRequest","retry","noHeaders","keys","a","getTelemetryData","clientInfo","raw","jsonClientInfo","JSON","stringify","encode","get","post","patch","getFormattedAddress","address","overide","newAddress","isDEMO","Address","i","push","toLowerCase","Suburb","State","toUpperCase","Postcode","join","activeServiceOrder","d","active","Status","isExpiredTechConnect","lastStatusChanged","mLastStatusChangedDate","moment","hour","isAfter","techConnectNz","serviceOrders","enabled","serviceOrder","LastStatusChangedDate","getObjectValueByString","obj","split","reduce","res","withFooterData","lifecycle","componentDidMount","fixedFooter","footer","document","querySelector","style","display","componentWillUnmount","debounce","fn","delay","timer","context","clearTimeout","setTimeout","apply","getFontAwesomeIconName","extension","materialIcon","MATERIAL_ICONS","find","icon","breakpoints","desktop","mobileTablet","mobile","tablet","tabletDesktop","screen","averageMobile","extraSmallMobile","media","css","Breakpoint","children","breakpoint","query","initialState","token","devices","lastFetch","tenantId","loading","error","dsf","state","action","actionTypes","dsfDevices","data","response","device","deviceSerialNo","Serial","deviceName","AddressLine1","AddressLine2","AddressLine3","AddressLine4","replace","tempState","Date","now","DEVICE_DETAILS_ARRAY","commonDSFProps","locale","timezone","language","DEVICE_LIST_ID","SUMMARY_STATUS_ID","BACKGROUND_COLOR","tabs","title","extraSettings","isSecuritySettingsCheck","isSecuritySoftwareIntegrityVerification","isSecurityUserAuthenticationLockout","isSecurityUserLoginDuringMonitoringTime","securityUserLoginDuringMonitoringTimeStart","securityUserLoginDuringMonitoringTimeEnd","variant","colorFromProp","prop","ifNotTransparent","input","darkenFromProp","amount","darkenColor","componentWithoutProps","ignoreProps","filteredProps","forEach","withReloginData","idp","variable","vars","search","substring","pair","getQueryVariable","login","ReLogin","compose","enhance","className","center","size","thickness","paddingAround","PrivateRoute","component","rest","routeOrSectionPermissions","permissions","fallbackElement","errorObj","ErrorCodes","ACCESS_DENIED","render","isLoggedIn","StorageHandler","getStorage","parse","_","json","random","times","TransactionManager","namespace","keyLength","process","responseType","Error","lastUsedConnection","realm","connection","responseTypeIncludesIdToken","indexOf","transaction","generateTransaction","appState","nonce","generateNonce","randomString","MINUTES_30","getStoredTransaction","transactionData","urljoin","windowHelper","objectHelper","WebMessageHandler","responseHandler","CrossOriginAuthentication","webAuth","baseOptions","webMessageHandler","createKey","origin","coId","encodeURIComponent","_this","rootUrl","username","email","authenticateBody","client_id","clientID","password","otp","credentialType","credential_type","err","errorObject","error_description","forceLegacyError","popupMode","popup","blacklist","authorizeOptions","merge","with","loginTicket","login_ticket","co_id","co_verifier","expires","MINUTES_15","run","authorize","callback","targetOrigin","decodeURIComponent","parts","getWindow","hash","pop","shift","getFragment","theWindow","addEventListener","evt","verifier","e","tryGetVerifier","source","postMessage","parent","xs","sm","md","lg","xl","getMediaBreakpoints","ModalFooterSection","div","white","primary","ModalFooterSectionBlack","ModalContentSection","FormFileStyle","fieldStyles","backgroundColor","lineHeight","paddingVertical","borderColorFocus","inputPlaceholder","buttonIncognito","FormContentCard","section","padding","boxShadow","FieldBlockBox","FieldFlexBox","fadeIn","keyframes","fadeOut","Shadow","modal","zIndex","backdropColor","isOpen","ModalContent","width","easing","EmailContent","Content","showActionButtons","ModalHeader","border","ActionContainer","ModalFooter","Modal","button","attrs","handleKeyDown","which","closeHandler","onClose","confirmHandler","onConfirm","cancelHandler","onCancel","handleOutsideClick","closeOnClickOutside","target","currentTarget","preventDefault","closeOnEscapeClick","removeEventListener","renderProps","renderFooter","renderHeader","showClose","hideHeader","renderActions","aria-hidden","onClick","onKeyPress","role","tabIndex","NormalButton","fontWeight","letterSpacing","textTransform","hoverProps","round","paddingVerticalSm","paddingHorizontalSm","fontSizeSm","paddingVerticalLg","paddingHorizontalLg","fontSizeLg","AnchorButton","LinkButton","Link","ButtonContent","span","hide","Button","background","href","iconProps","to","ButtonComponent","IconComponent","Icon","buttonIconProps","marginRight","linearRotate","InPageLoading","DateUtils","previousDate","units","format","add","isValid","checkDate","isValidBeforeToday","dateFrom","dateTo","today","isBefore","isSameOrBefore","isAustraliaHoliday","isHoliday","localeData","_holidays","_holidayFormat","holiday","isBusinessDay","day","businessDaysIntoMonth","NaN","businessDay","prevBusinessDay","monthBusinessDays","index","businessDiff","param","d1","clone","d2","start","daysBetween","businessAdd","number","period","signal","remaining","Math","abs","businessSubtract","nextBusinessDay","loop","subtract","partialEndDate","me","startOf","endOf","daysArr","done","diff","monthNaturalDays","fromToday","monthBusinessWeeks","weeksArr","monthNaturalWeeks","rotate","StyledLoader","position","containerHeight","hasMessage","BubbleLoading","tl","gsap","timeline","repeat","tl2","autoAlpha","scale","x","transformOrigin","viewBox","xmlns","cx","cy","r","fill","marginBottom","marginTop","smallText","flexDirection","alignItems","HelpTooltipApi","getMCBHelpData","node","axios","then","catch","findMCBHelpData","tree","branch","tip","helpTip","IconWrapper","marginLeft","verticalAlign","colorMode","svg","svgs","allIcons","displayName","customSVG","account","accountList","accountDetails","accountAccess","memberInfo","selectedAccount","tech","canonHub","Data","tempAccountInfo","sessionStorage","ACCOUNT_INFO","storedAccountNumber","lastError","deviceServiceOrders","tempMemberInfo","MEMBER_INFO","auth","isAuthenticating","flag","selectedDevice","selectedServiceOrder","header","links","sel","searchOptions","pagingSettings","PERMISSONS","acls","metadata","canonhub","RRP_ADD_PERMISSION","roles","RRP_REMOVE_PERMISSION","filter","RRP_CLEAR","acl","composeEnhancers","reducers","applyMiddleware","thunk","persistor","persistStore","qs","assert","ssodata","parametersWhitelist","PasswordlessAuthentication","DBConnection","Authentication","auth0","arguments","check","domain","optional","responseMode","redirectUri","scope","audience","_disableDeprecationWarnings","passwordless","dbConnection","buildAuthorizeUrl","params","qString","condition","o","auth0Client","connection_scope","toSnakeCase","oauthAuthorizeParams","buildLogoutUrl","undefined","federated","loginWithDefaultDirectory","grantType","oauthToken","oauthTokenParams","loginWithResourceOwner","grant_type","getSSOData","withActiveDirectories","WebAuth","host","_universalLogin","clientId","ssodataInformation","checkSession","timeout","result","sso","lastUsedSub","idTokenPayload","sub","lastUsedUserID","lastUsedUsername","lastUsedClientID","sessionClients","userInfo","accessToken","ignoreCasing","delegation","getUserCountry","TermsAndConditionsApi","fetchAcceptTermsAndConditions","memberId","baseUrl","config","api","DEBUG","log","time","timeEnd","putAcceptTermsAndConditions","put","TermsName","TermsConditionsContent","Fragment","rel","TermsAndConditions","WrappedComponent","acceptTermsAndConditions","setState","loadingTAndCFlag","acceptTAndCFlag","acceptTAndCFlagStoreValue","Payload","Terms","history","btnClass","btnTo","btnText","buildResponse","description","errorDescription","invalidToken","IdTokenVerifier","PluginHandler","Redirect","Popup","SilentAuthenticationHandler","HostedPages","popupOrigin","leeway","plugins","overrides","__tenant","__token_issuer","__jwks_uri","parseInt","tenant","token_issuer","jwksURI","transactionManager","client","redirect","crossOriginAuthentication","parseHash","parsedQs","_window","hashStr","hasOwnProperty","responseTypes","validateAuthenticationResponse","parsedHash","__enableIdPInitiatedLogin","__enableImpersonation","transactionState","transactionStateMatchesState","transactionNonce","payload","qsParams","access_token","idToken","id_token","refreshToken","refresh_token","expiresIn","expires_in","tokenType","token_type","buildParseHashResponse","validateToken","validationError","at_hash","validateAccessToken","decode","alg","errUserInfo","profile","issuer","__disableExpirationCheck","verify","renewAuth","usePostMessage","postMessageDataType","postMessageOrigin","prompt","create","authenticationUrl","changePassword","passwordlessStart","authParams","signup","signupAndAuthorize","passwordlessLogin","passwordlessVerify","crossOriginOptions","extend","phoneNumber","verificationCode","crossOriginAuthenticationCallback","crossOriginVerification","logout","buildVerifyUrl","IframeHandler","currentOrigin","getOrigin","redirectUriOrigin","getOriginFromUrl","authorizeUrl","eventListenerType","eventData","eventValidator","event","timeoutCallback","init","runWebMessageFlow","pick","hostname","iframe","timeoutHandle","_destroyTimeout","transientMessageEventListener","proxyEventListener","createElement","eventListener","eventSourceObject","appendChild","src","timeoutHandler","sourceObject","destroy","removeChild","getPermissions","idRef","ACLS","getState","allowPermissions","routes","sections","denyPermissions","permission","filters","allow","deny","AppConfigApi","getMCBMetadata","payLoad","getMCBAcldata","postMCBAcldata","GENERIC","Type","Name","Code","Header","NOT_AUTHORIZED","ACCESS_DENIED_STS","NOT_FOUND","ORDER_COMPLETE","Management","setAuth","dispatch","saveAuth","getDataPath","Account","ServiceOrder","Member","getCanonHub","timeSinceLastFetch","axPost","tempUrl","accountsApi","accountNumber","isPROD","isDataStale","force","TIME_LIMT_FOR_FETCH","RELOGIN_FLAG","STORED_ACCOUNT","pageNo","hubError","errorResponse","getAccountDetails","Number","Access","setSelectedAccount","setSelected","tyle","getDSFDevices","tokenOnly","DSF_URL","UPDATE_DSF_REQUEST","Token","UPDATE_DSF_SUCCESS","Devices","UPDATE_DSF_ERROR","setSearchOptions","setPagingSetting","Container","ErrorSection","withFooterConfig","SELECTED_ACCOUNT","RenderErrorContact","Localization","ISNZ","ContactAU","ContactNZ","GenericError","AccountNumber","connect","AU","ErrorBoundary","hasError","listen","info","React","withRouter","didMount","prevProps","prevState","snapshot","objectAssign","object","prev","objectValues","values","unshift","getLocationFromUrl","match","protocol","port","exceptions","p","str","code","newKey","wasPrevNumber","wasPrevUppercase","charCodeAt","camelToSnake","toCamelCase","c","charAt","slice","snakeToCamel","blacklistedKeys","base","object2","keys2","getKeysNotIn","allowedKeys","notAllowed","parsed","createBrowserHistory","AuthHOC","hocProps","FallbackElement","WithAuthorization","setVisibility","componentPermissions","userpermissions","visible","newVisibility","processVisibility","forwardedRef","ref","WithConnectedAuthorization","Permissions","forwardRef","Authorization","accessLoading","detailsLoading","ownProps","addRoles","NZ","FIELD_TYPES","CHECKBOX","DATE","RADIO","RANGE","SELECT","TEXTAREA","TOGGLE","TEXT","EMAIL","PHONE","TEL","FILE","FILEINPUT","STATES","label","PHONE_COUNTRIES","CONTRACT_STATUSES","restrictOptionsAu","restrictOptions","contactOptions","base64","fromByteArray","arr","stringToByteArray","mod","array","String","fromCharCode","byteArrayToString","toByteArray","objectAssignPolyfill","TypeError","nextSource","keysArray","nextIndex","len","nextKey","desc","getOwnPropertyDescriptor","enumerable","assign","windowHandler","DummyStorage","CookieStorage","failover","Cookie","remove","tokenParams","authorizeParams","value_message","redirect_uri","response_type","cleanOption","user_metadata","userMetadata","pluginName","setWebAuth","extensibilityPoint","supports","global","getDocument","bytes","Uint8Array","charset","cryptoObj","crypto","msCrypto","getRandomValues","loginWithCredentials","signupAndLogin","WinChan","urlHelper","PopupHandler","buildPopupHandler","pluginHandler","getPopupHandler","preload","popupHandler","originUrl","opener","onOpen","doPost","msg","relayUrl","popOpts","owp","extractOrigin","popupOptions","processParams","load","_current_popup","kill","test","m","exec","calculatePosition","screenX","screenLeft","screenY","screenTop","left","outerWidth","clientWidth","top","outerHeight","clientHeight","popupPosition","windowFeatures","delimiter","closed","open","close","winchanOptions","relay_url","window_features","focus","handler","getCallbackHandler","getEventValidator","contentWindow","callbackValue","UsernamePassword","usernamePassword","ldaps","formHtml","_document","innerHTML","submit","getUser","userId","patchUserMetadata","linkUser","secondaryUserToken","link_with","UPDATE_ACCOUNTS","UPDATE_ACCOUNTS_DETAILS","UPDATE_ACCOUNTS_ACCESS","UPDATE_SELECTED_ACCOUNT","CLEAR_ACCOUNTS","STORE_SELECTED_ACCOUNT","UPDATE_SELECTED_DEVICE","UPDATE_SEARCH_OPTIONS","UPDATE_PAGING_SETTINGS","UPDATE_HEADER_ACCOUNT_LIST_REQUEST","UPDATE_HEADER_ACCOUNT_LIST_SUCCESS","UPDATE_HEADER_ACCOUNT_LIST_FAILURE","UPDATE_SELECTED_SERVICEORDER","UPDATE_MEMBER_INFO","UPDATE_AUTH","IS_AUTHENTICATING","ABORT_FETCH_HUB","UPDATE_METADATA","UPDATE_ACL","clearIdToken","ID_TOKEN_KEY","clearSelectedAndFavAccounts","ACCOUNT_FAVS","clearAccessToken","exemptCallback","ISDEMO","ACCESS_TOKEN_KEY","EXPIRES_AT","SUBJECT","cookie","toUTCString","clear","isTokenExpired","encodedToken","exp","auth_time","iat","nbf","getTokenExpirationTime","ceil","getTime","getIdToken","clearPermissions","PreAuth","isReLogin","purge","actionCreators","getUrlVars","questionMarkIndex","hashes","transformParmstoAsciiCheckSum","seralizedParamsString","serialize","sort","k","convertedObj","fetchAscii","replaceAll","replacement","RegExp","changeRequestConfigToMockURL","mockServerUrl","MockService","EXEMPT_MOCK_URLS","uglyUrl","urlVars","asciiParamsSum","transformURl","urlvars","searchTerm","rtnString","urlVarsFix3","MOCK_USER_ROLE","MODES","MOCK","DOWNLOAD","LIVE","configure","mode","interceptors","use","stringifiedResponse","blob","Blob","fileName","FileSaver","saveAs","downloadAPIResponseJSON","Promise","reject","baseurl","ApiConfig","demoApi","PostAuth","authResult","user","expiresAt","idtoken","MEMBER_ID","setSession","CLIENT_ID","CLIENT_DOMAIN","ISPROD","CORE_URL","OPENID_CONNECT_MULTIVALUES_RESPONSE_TYPE","REDIRECT","SCOPE","acr_values","ACR_SFDC","handleAuthentication","clearLSAuth","AUTOSIGN_COOKIE","encodeURI","reLoginSSO","isTokenExp","BtnIcon","newWindow","hasChevron","btnIcon","hideOnDisabled","isExternal","iconClass","linkClass","isHidden","showChevron","coreRender","AccountSelect","tiles","users","contacts","billing","serviceOrderRequest","relocationRequestForm","safetyformlist","networkformlist","consumablesRequest","consumables","assetorders","assets","documentsInsurance","professionalIndemnityLiabilityNZ","publicAndProductsLiabilityNZ","submitMeterReadings","submitMeterReadingsNZ","assetStatus","businessInsightsAU","businessInsightsNZ","trainingAU","trainingNZ","subscribeNZ","text","productTrainingNZ","generatereports","reportsDocuments","SubMenuWithAuth","linksSubmenus","toggleLinksSubmenu","linkKey","accountNum","Links","key2","HamburgerMenu","handleLinksHamburgerMenuClick","showLinksSubmenu","Set","link","getAccountFavs","myFavs","haveAccountList","fetchAccountList","exemptedURLs","handleClick","contains","keyCode","showSubmenu","updateSelectedAccount","selectedAccountNumber","refreshSoState","onAccountClickHandler","updateDropdownList","accounts","updateAccountList","isFav","item","newAccount","newUrl","urlSwitch","pathSetting","parentUrl","onSearchInputChange","targetTerm","searchAccounts","menu","toggle","handleAccountMenuClick","searchInput","accountListMax","accountListLarge","memberAccount","showMenu","hideMenu","loginOverride","showSubmenu1","showSubmenu2","showSubmenu3","accessTokenStatus","showAccessDenied","bind","prevSelectedAccount","setAccount","member","max","totalResults","authAccessToken","nextProps","nextState","storedAccount","totalPages","company","toastManager","toasts","toastId","accountName","myList","setAccountFavs","appearance","autoDismiss","autoDismissTimeout","tempList","listAccounts","alt","isMemberInfoLoading","isAccountDetailsLoading","select","onBlurResetsInput","onSelectResetsInput","autoFocus","simpleValue","pattern","accountRole","FirstName","LastName","VarCustomer","AccountManager","Phone","Mobile","Email","Website","csm","borderTop","withToastManager","TotalResults","TotalPages","accountInfo","Role","updateCanonHub","year","getFullYear","FooterAU","FooterNZ","Assets","Loadable","loader","Asset","AssetStatus","AssetDetails","Routes","Route","exact","path","route","assetIdStatus","asset","Billing","Payment","payment","Tile","isNZ","root","toolTip","isAccountAccessLoading","useDispatch","slideImages","caption","buttonCaption","buttonAction","cards","useEffect","handleSetOptionsData","stagger","y","ease","onComplete","play","backgroundImage","restart","flexWrap","pointerEvents","Tiles","createRef","AssetOrders","AssetOrder","assetorder","Consumables","Consumable","Request","consumable","orderId","Users","Contacts","Contact","ContactUs","Safety","Network","SafetyForm","NetworkForm","NetworkBulk","MeterReading","SafetyBulk","SafetyTemplates","SafetyFormTemplate","NetworkTemplates","NetworkFormTemplate","Service","ServiceDirect","ReportsDocuments","GenerateReports","DashboardLoading","SSO","canRedirect","callBackURL","dfault","accountFavs","getLocalAccount","LazyLoad","configureLazyLoadImages","win","doc","addEventHandler","ev","h","attachEvent","isInViewport","rebounce","f","scheduled","cancelAnimationFrame","requestAnimationFrame","toad","this_el","elements","querySelectorAll","j","getAttribute","getBoundingClientRect","tagName","removeAttribute","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","cancelTimeout","startListening","Home","paused","cycle","yoyo","repeatDelay","registerLink","videoLink","setInterval","handleHeroAnimation","classList","isActive","pause","clearInterval","img","frameBorder","allowFullScreen","AssetsWrapper","MeterReadingWrapper","LandingWrapper","Landing","UsersWrapper","ContactsWrapper","GenerateReportsWrapper","ReportsDocumentsWrapper","BillingWrapper","OrdersWrapper","Orders","ContactWrapper","ContactUsWrapper","ServiceWrapper","ServiceDirectWrapper","SafetyWrapper","SafetyFormWrapper","SafetyBulkWrapper","SafetyTemplatesWrapper","SafetyFormTemplateWrapper","NetworkTemplatesWrapper","NetworkFormTemplateWrapper","NetworkWrapper","NetworkFormWrapper","NetworkBulkWrapper","Switch","orders","contact","contactus","service","serviceDirect","safetyformbulk","safetyformtemplates","networkformtemplates","editbulksafetyform","networkformbulk","editbulknetworkform","safetyform","safetyformtemplate","networkformtemplate","networkform","accesserror","accesserrorsts","ordercomplete","landing","ChatBot","getResponse","heads","Source","WingmanApi","nodeClick","noderoot","listItems","view","decodeViewType","uniqueId","fetchHelpNode","helpModel","model","truthy","helpModelArray","matchRuleShort","except","nodeType","ul","ol","h2","dangerouslySetInnerHTML","__html","_timeoutID","someElement","observer","speechSynthUtterance","SpeechSynthesisUtterance","SpeechRecognition","webkitSpeechRecognition","recognition","Proxy","construct","isConstructor","Chatbot","expand","chatMessages","wingmanResponse","postVal","chatMsgs","testWing","SessionId","AccessToken","isReady","isThinking","isMic","isSpeak","fatman","firstTime","isManagingFocus","textInput","fetchWingman","handleNodeChange","handleQuickSelect","chatbotRequest","handleMicClick","handleSpeakClick","handleRecognition","fatmanRef","chatbotRef","lang","continuous","interimResults","onstart","onerror","onend","onresult","myTween","bottom","opacity","handleInitRecognition","stop","results","transcript","addNewChatMessage","scrollTop","scrollHeight","disconnect","MutationObserver","scrollToBottom","observe","childList","current","q","DialogflowQueryResponse","chatResponse","htmlParse","QueryResult","FulfillmentText","speechSynthesis","speak","jsx","el","html","DOMParser","parseFromString","documentElement","textContent","status","content","decodeWingman","cloneDeep","concat","plainText","textArray","innerText","BPayReference","PaymentTerms","textResponse","speaking","cancel","clickHandler","onFocus","_onFocus","onKeyUp","handleInputEnter","Id","Company","BackToTopSection","ContainerClassName","StopPosition","ShowAtPostion","EasingType","AnimationDuration","TransitionClassName","ToggledStyle","BackToTop","ToggleScrollUp","Animation","StartPosition","CurrentAnimationTime","StartTime","AnimationFrame","HandleScroll","StopScrollingFrame","ScrollingFrame","HandleClick","pageYOffset","timestamp","floor","YPos","TweenFunctions","scrollTo","detectPassiveEvents","hasSupport","passive","styles","MainStyle","WebkitTransition","transition","transitionProperty","cursor","right","SvgStyle","strokeWidth","stroke","paddingLeft","childrenWithProps","Children","child","cloneElement","xmlSpace","CircleArrow","createHistory","App","Boolean","forbiddenStatusCodes","ScrollToTop","Accept","app","Router","black","base1","base2","base3","grey1","grey2","grey3","grey4","success","blue","navy","shadow","secondary","drawer","column","spacing","errorFontSize","errorFontWeight","labelFontSize","labelFontWeight","heading","h1","h3","h4","h5","h6","browserCompatibility","cubic","ReactDOM","getElementById","navigator","swUrl","wb","Workbox","isUpdate","confirm","reload","register","registerServiceWorker","helpContent","SFDC","toString","attribute","attr","attributes","supportsIsArray","call","errObj","original","statusCode","statusText","error_code","details","policy"],"mappings":"oHAAA,qBAGeA,gBAAYC,M,iCCH3B,iHASaC,EAAc,SAAAC,GACvB,IAAMC,EAAQC,aAAaC,QAAQC,MAAa,KAChD,GAAIH,GAAmB,YAAVA,EAET,OADAI,IACO,KAEXH,aAAaI,QAAQF,IAAUG,OAAOC,SAASR,WAMtCK,EAAiB,WAC1BH,aAAaO,WAAWL,MAMfM,EAAe,WACxB,IAAMT,EAAQC,aAAaC,QAAQC,MAAa,KAChD,MAAc,YAAVH,GACAI,IACO,OAEXH,aAAaI,QAAQF,IAAU,WACxBH,K,8HC7BLU,EAAU,SAAAC,GAAC,MAAW,MAANA,EAAY,MAAQA,GAGpCC,EAAc,SAAC,GAAD,IAAGC,EAAH,EAAGA,MAAOC,EAAV,EAAUA,OAAV,qBACVA,EADU,cACEJ,EAAQG,EAAME,MAAMC,gBADtB,cAC2CN,EAC3DG,EAAME,MAAME,mBAFI,MAKPC,EAAeC,YAAOC,IAAPD,CAAH,yxCACV,SAAAE,GAAK,OAAIA,EAAMR,MAAME,MAAMO,YAGrB,SAAAD,GAAK,OAAIA,EAAMR,MAAME,MAAMQ,gBACxB,SAAAF,GAAK,OAAIA,EAAMR,MAAME,MAAMC,kBACzB,SAAAK,GAAK,OAAIA,EAAMR,MAAME,MAAMS,oBAC1B,SAAAH,GAAK,OAAIA,EAAMR,MAAME,MAAME,qBAC7B,SAAAI,GAAK,OAAIA,EAAMR,MAAME,MAAMU,mBAChC,SAAAJ,GAAK,OAAIK,YAAML,EAAMR,MAAME,MAAMY,YAAxBD,CAAqCL,MACpD,SAAAA,GAAK,OAAIA,EAAMP,SASrB,GAOkBY,YAAM,YAMlBd,EACKA,GACC,SAAAS,GAAK,OACrBA,EAAMO,WAAaP,EAAMR,MAAME,MAAMc,kBAAoB,KACxC,SAAAR,GAAK,OACtBA,EAAMO,WAAaP,EAAMR,MAAME,MAAMc,kBAAoB,IAIxCjB,EAQEA,GACC,SAAAS,GA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F,EAAIuX,aACJvX,EAAIhI,OACJgI,EAAIu4C,SACJv4C,EAAIA,KACJ,KACAnS,EAAQsS,mBACR+3C,EAAOlgD,MAAQkgD,EAAOvzB,KACtBuzB,EAAOh4C,kBAAoBg4C,EAAO3gC,aAGlCvX,EAAIrS,OACJuqD,EAAOvqD,KAAOqS,EAAIrS,MAGlBqS,EAAIw4C,SACJN,EAAOM,OAASx4C,EAAIw4C,QAGjBxmD,EAAGkmD,KAIV5/C,EAAKnK,MACU,cAAdmK,EAAKnK,MAAsC,eAAdmK,EAAKnK,KAKnCN,EAAQynB,aACDtjB,EAAG,KAAMsG,EAAKxH,MAAQwH,GAG1BtG,EAAG,KAAM0M,EAAaumB,YAAY3sB,EAAKxH,MAAQwH,IAP3CtG,EAAG,KAAMsG,EAAK2gC,OAjEdjnC,EACHgG,EAAMsf,cAAc,gBAAiB,4B,gCCZrD,sGAAO,IAAMrG,EAAqB,qBACrBE,EAAwB,wBACxBE,EAAY,c","file":"static/js/main.45625efd.chunk.js","sourcesContent":["import Loading from './loading'\nimport AnimateLoad from 'components/common/animate-load'\n\nexport default AnimateLoad(Loading)\n","import { CALLBACK } from './constants'\n\n// ---------------------------------------------\n// Callback handlers\n// ---------------------------------------------\n/**\n * @name canCallBack\n * @desc Store the window location to return to from a bookmarked location\n */\nexport const canCallBack = pathname => {\n const cbURL = localStorage.getItem(CALLBACK) || null\n if (cbURL && cbURL === 'pending') {\n deleteCallBack()\n return null // do nothing if there is a pending redirect\n }\n localStorage.setItem(CALLBACK, window.location.pathname)\n}\n/**\n * @name deleteCallBack\n * @desc Remove the callback localStorage\n */\nexport const deleteCallBack = () => {\n localStorage.removeItem(CALLBACK)\n}\n/**\n * @name willCallBack\n * @desc Check to see if there is a pending callback\n */\nexport const willCallBack = () => {\n const cbURL = localStorage.getItem(CALLBACK) || null\n if (cbURL === 'pending') {\n deleteCallBack()\n return null // do nothing if there is a pending redirect\n }\n localStorage.setItem(CALLBACK, 'pending')\n return cbURL\n}\n","import styled from 'styled-components'\nimport { color } from '../../../styles/styled-components/helpers'\n\nimport Select from 'react-select'\n\n// css calc needs units\nconst fixZero = v => (v === '0' ? '0px' : v)\n\n// Determine the inner height by removing the border width\nconst innerHeight = ({ theme, height }) =>\n `calc(${height} - ${fixZero(theme.forms.borderTopWidth)} - ${fixZero(\n theme.forms.borderBottomWidth\n )})`\n\nexport const StyledSelect = styled(Select)`\n font-size: ${props => props.theme.forms.fontSize};\n\n .Select-control {\n border-radius: ${props => props.theme.forms.borderRadius};\n border-top-width: ${props => props.theme.forms.borderTopWidth};\n border-right-width: ${props => props.theme.forms.borderRightWidth};\n border-bottom-width: ${props => props.theme.forms.borderBottomWidth};\n border-left-width: ${props => props.theme.forms.borderLeftWidth};\n border-color: ${props => color(props.theme.forms.borderColor)(props)};\n height: ${props => props.height};\n\n &:hover {\n box-shadow: none;\n }\n }\n\n &.Select.is-focused:not(.is-open) {\n > .Select-control {\n ${'' /* box-shadow: none; */}\n border-color: blue;\n }\n }\n\n &.Select.is-disabled:not(.is-open) {\n > .Select-control {\n background-color: ${color('disabled')};\n cursor: not-allowed;\n }\n }\n\n .Select-input {\n height: ${innerHeight};\n line-height: ${innerHeight};\n padding-left: ${props =>\n props.searchable ? props.theme.forms.paddingHorizontal : 0};\n padding-right: ${props =>\n props.searchable ? props.theme.forms.paddingHorizontal : 0};\n\n > input {\n color:\n line-height: ${innerHeight};\n padding: 0;\n }\n }\n\n &.Select--single {\n .Select-control {\n .Select-value {\n line-height: ${innerHeight};\n padding-left: ${props => props.theme.forms.paddingHorizontal};\n padding-right: ${props => props.theme.forms.paddingHorizontal};\n }\n }\n }\n\n &.Select--multi {\n .Select-value-icon {\n padding: 1px 5px;\n }\n\n .Select-input {\n margin-left: ${props => props.theme.forms.paddingHorizontal};\n }\n }\n\n .Select-placeholder {\n line-height: ${innerHeight};\n padding-left: ${props => props.theme.forms.paddingHorizontal};\n padding-right: ${props => props.theme.forms.paddingHorizontal};\n color: ${props => color(props.theme.forms.placeholderColor)(props)};\n opacity: ${props => color(props.theme.forms.placeholderOpacity)(props)};\n }\n .Select-menu-outer {\n z-index: 999 !important;\n font-weight:400;\n \n}\n \n`\n\nexport const StyledCreatableSelect = StyledSelect.withComponent(\n Select.Creatable\n)\n","// @flow\n\nimport React, { Component } from 'react'\nimport 'react-select/dist/react-select.css'\n\nimport { StyledSelect, StyledCreatableSelect } from './styles'\n// import CustomRenderOption from './customOptionRender'\n\ntype SelectProps = {\n clearable: boolean,\n creatable: boolean,\n disabled: boolean,\n searchable: boolean,\n id: string,\n multi: boolean,\n name: string,\n onBlur: (SyntheticInputEvent) => void,\n onChange: (string | string[]) => void,\n options: string | Object[],\n placeholder: string,\n required: boolean,\n value: string,\n height: string\n}\n\nclass FormFieldSelect extends Component {\n static defaultProps = {\n options: [],\n type: 'text',\n height: '40px',\n searchable: true\n }\n\n handleChange = (value: Object | Object[]) => {\n const {onChange} = this.props\n if (Array.isArray(value)) {\n const values = value.map(v => v.value)\n onChange(values)\n return\n }\n onChange(value ? value.value : '')\n }\n\n render() {\n const {\n clearable,\n creatable,\n disabled,\n id,\n multi,\n name,\n onBlur,\n onChange,\n options,\n placeholder,\n required,\n value,\n height,\n searchable\n } = this.props\n\n const SelectComponent = creatable ? StyledCreatableSelect : StyledSelect\n\n return (\n \n )\n }\n}\n\nexport default FormFieldSelect\n","//Check if atleast one of the route level or component level permission matches to what is present as part of permissions for the user\nexport const checkVisibility = (\n userPermissions,\n routeOrComponentPermissions\n) => {\n if (\n !routeOrComponentPermissions ||\n routeOrComponentPermissions.length === 0\n )\n return true\n else if (!userPermissions || userPermissions.length === 0) return false\n return routeOrComponentPermissions.some(val =>\n userPermissions.includes(val)\n )\n}\n\nexport default {\n checkVisibility\n}\n","/* eslint-disable no-console */\n\nfunction Warn(options) {\n this.disableWarnings = options.disableWarnings\n}\n\nWarn.prototype.warning = function(message) {\n if (this.disableWarnings) {\n return\n }\n\n console.warn(message)\n}\n\nmodule.exports = Warn\n","import { createStore, combineReducers } from 'redux'\nimport { persistReducer } from 'redux-persist'\n\n//import storage from 'redux-persist/lib/storage' //defaults to localstorage fro web and AsyncStorage for the native\n/* [SP] redux persist storage persists the data into the local storage syncronously whenever there are changes to the redux state . The problem with localstorge is that the \n 1. storage space is very limited\n 2. Any operation here is syncronous.So the js thread has to wait till all the root data is persisted into the localstorage. \n 3. The data is not indexed. So fetch of the data is v performant\n */\n\n// Hence use the indexedDB storage using the localforage\n\nimport storage from 'localforage'\n\n//Define the redux persist config\nconst persistConfig = {\n key: 'root',\n storage,\n //for now just persist only the canonhub content, persisting auth information leads to auth problems - not suggested - Sriram\n whitelist: ['canonhub', 'permissions', 'acl', 'account', 'assets', 'auth']\n}\n\nexport const StoreManager = {\n store: null,\n reducerMap: {},\n registerReducers(newReducerMap) {\n if (\n Object.entries(this.reducerMap).length === 0 &&\n this.reducerMap.constructor === Object\n ) {\n this.reducerMap = newReducerMap\n } else {\n this.reducerMap = { ...this.reducerMap, ...newReducerMap }\n //console.log(this.store.getState())\n this.store.replaceReducer(combineReducers(this.reducerMap))\n //console.log(this.store.getState())\n }\n },\n\n createStore(...args) {\n // console.log(this.reducerMap)\n const reduxPersistReducer = persistReducer(\n persistConfig,\n combineReducers(this.reducerMap)\n )\n this.store = createStore(reduxPersistReducer, ...args)\n\n return this.store\n }\n}\n\nexport default StoreManager\n","/* eslint-disable no-param-reassign */\nvar request = require('superagent')\nvar base64Url = require('./base64_url')\nvar version = require('../version')\n\n// ------------------------------------------------ RequestWrapper\n\nfunction RequestWrapper(req) {\n this.request = req\n this.method = req.method\n this.url = req.url\n this.body = req._data\n this.headers = req._header\n}\n\nRequestWrapper.prototype.abort = function() {\n this.request.abort()\n}\n\nRequestWrapper.prototype.getMethod = function() {\n return this.method\n}\n\nRequestWrapper.prototype.getBody = function() {\n return this.body\n}\n\nRequestWrapper.prototype.getUrl = function() {\n return this.url\n}\n\nRequestWrapper.prototype.getHeaders = function() {\n return this.headers\n}\n\n// ------------------------------------------------ RequestObj\n\nfunction RequestObj(req) {\n this.request = req\n}\n\nRequestObj.prototype.set = function(key, value) {\n this.request = this.request.set(key, value)\n return this\n}\n\nRequestObj.prototype.send = function(body) {\n this.request = this.request.send(body)\n return this\n}\n\nRequestObj.prototype.withCredentials = function() {\n this.request = this.request.withCredentials()\n return this\n}\n\nRequestObj.prototype.end = function(cb) {\n this.request = this.request.end(cb)\n return new RequestWrapper(this.request)\n}\n\n// ------------------------------------------------ RequestBuilder\n\nfunction RequestBuilder(options) {\n this._sendTelemetry =\n options._sendTelemetry === false ? options._sendTelemetry : true\n this._telemetryInfo = options._telemetryInfo || null\n this._timesToRetryFailedRequests = options._timesToRetryFailedRequests\n this.headers = options.headers || {}\n}\n\nRequestBuilder.prototype.setCommonConfiguration = function(\n ongoingRequest,\n options\n) {\n options = options || {}\n\n if (this._timesToRetryFailedRequests > 0) {\n ongoingRequest = ongoingRequest.retry(this._timesToRetryFailedRequests)\n }\n\n if (options.noHeaders) {\n return ongoingRequest\n }\n\n var headers = this.headers\n ongoingRequest = ongoingRequest.set('Content-Type', 'application/json')\n\n var keys = Object.keys(this.headers)\n\n for (var a = 0; a < keys.length; a++) {\n ongoingRequest = ongoingRequest.set(keys[a], headers[keys[a]])\n }\n\n if (this._sendTelemetry) {\n ongoingRequest = ongoingRequest.set(\n 'Auth0-Client',\n this.getTelemetryData()\n )\n }\n\n return ongoingRequest\n}\n\nRequestBuilder.prototype.getTelemetryData = function() {\n var clientInfo = this._telemetryInfo || {\n name: 'auth0.js',\n version: version.raw\n }\n var jsonClientInfo = JSON.stringify(clientInfo)\n return base64Url.encode(jsonClientInfo)\n}\n\nRequestBuilder.prototype.get = function(url, options) {\n return new RequestObj(\n this.setCommonConfiguration(request.get(url), options)\n )\n}\n\nRequestBuilder.prototype.post = function(url, options) {\n return new RequestObj(\n this.setCommonConfiguration(request.post(url), options)\n )\n}\n\nRequestBuilder.prototype.patch = function(url, options) {\n return new RequestObj(\n this.setCommonConfiguration(request.patch(url), options)\n )\n}\n\nmodule.exports = RequestBuilder\n","// Help resolve nested values for a given object prop, e.g. fields.nested.name\n// Will handle simple values too, e.g. name\n// Doesn't support brackets though\nimport { lifecycle } from 'recompose'\nimport DateUtils from './dateUtils'\nimport moment from 'moment'\nimport { MATERIAL_ICONS } from './constants'\n\nexport const getFormattedAddress = (address, overide) => {\n let newAddress = []\n\n if (address) {\n // SP Work around till we update the demo store the address object\n if (window.isDEMO && !overide) return address.Address\n for (var i = 1; i < 5; i++) {\n if (address[`AddressLine${i}`])\n newAddress.push(address[`AddressLine${i}`].toLowerCase())\n }\n\n if (address.Suburb) newAddress.push(`${address.Suburb.toLowerCase()},`)\n if (address.State) newAddress.push(address.State.toUpperCase())\n if (address.Postcode) newAddress.push(address.Postcode.toLowerCase())\n return newAddress.join(' ')\n }\n return ''\n}\n\nexport const activeServiceOrder = d => {\n if (!d) return false\n if (!d.length) return false\n let active = false\n for (let i = 0; i < d.length; i++) {\n if (d[i].Status !== 'CANCELLED' && d[i].Status !== 'COMPLETED') {\n active = true\n break\n }\n }\n return active\n}\n\nexport const isExpiredTechConnect = (lastStatusChanged) =>{\n const timeFormatInput = 'YYYY-MM-DDThh:mm:ss'\n const mLastStatusChangedDate = moment(lastStatusChanged, timeFormatInput).hour(17);\n const now = moment()\n return now.isAfter(mLastStatusChangedDate)\n}\n\nexport const techConnectNz = serviceOrders => {\n if (!serviceOrders?.length) return false\n let enabled = true\n\n for (const serviceOrder of serviceOrders){\n if(serviceOrder.Status === 'WORKING' || serviceOrder.Status === 'COMPLETED'){\n if(isExpiredTechConnect(serviceOrder?.LastStatusChangedDate)) {\n enabled = false\n break\n }\n }\n }\n return enabled\n}\n\n//import AclPermissions from './acl-permissions'\nexport const getObjectValueByString = (name, obj) => {\n return name.split('.').reduce((res, key) => {\n if (res && typeof res === 'object') {\n return res[key]\n }\n\n return null\n }, obj)\n}\n\nexport const withFooterData = lifecycle({\n componentDidMount() {\n if (this.props.fixedFooter) {\n const footer = document.querySelector('[name=\"mcbfooter\"]')\n if (footer) {\n footer.style.display = 'none'\n // footer.style.position = 'fixed'\n // footer.style.bottom = '0'\n // footer.style.left = '0'\n // footer.style.width = '100%'\n }\n }\n },\n\n componentWillUnmount() {\n const footer = document.querySelector('[name=\"mcbfooter\"]')\n if (footer) {\n footer.style.display = 'block'\n // footer.style.position = 'relative'\n }\n }\n})\n\nconst debounce = (fn, delay) => {\n let timer = null\n return function(...args) {\n const context = this\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn.apply(context, args)\n }, delay)\n }\n}\n\nexport { DateUtils, debounce }\n\n// helper function get Font Awesome icon class name\nexport const getFontAwesomeIconName = extension => {\n const materialIcon = MATERIAL_ICONS.find(\n materialIcon => materialIcon.extension === extension\n )\n\n let iconsName\n if (materialIcon) {\n iconsName = materialIcon.icon\n } else {\n iconsName = 'file'\n }\n return iconsName\n}\n","import React from 'react'\nimport MediaQuery from 'react-responsive'\nimport { css } from 'styled-components'\n\nexport const breakpoints = {\n desktop: '(min-width: 800px)',\n mobileTablet: '(max-width: 799px)',\n mobile: '(max-width: 680px)',\n tablet: '(min-width: 681px) and (max-width: 800px)',\n tabletDesktop: '(min-width: 681px)',\n screen: '(min-width: 1400px)',\n averageMobile: '(max-width: 480px)',\n extraSmallMobile: '(max-width: 320px)'\n}\n\nconst Breakpoint = ({ children, name }) => {\n const breakpoint = name || 'desktop'\n return {children}\n}\n\nexport const media = {\n mobileTablet: (...args) => css`\n @media (max-width: 1024px) {\n ${css(...args)};\n }\n `,\n desktop: (...args) => css`\n @media (min-width: 1025px) {\n ${css(...args)};\n }\n `,\n mobile: (...args) => css`\n @media (max-width: 680px) {\n ${css(...args)};\n }\n `,\n screen: (...args) => css`\n @media (min-width: 1400px) {\n ${css(...args)};\n }\n `,\n tablet: (...args) => css`\n @media (min-width: 681px) and (max-width: 1024px) {\n ${css(...args)};\n }\n `,\n extraSmallMobile: (...args) => css`\n @media (max-width: 320px) {\n ${css(...args)};\n }\n `\n}\n\nexport default Breakpoint\n\n// USAGE\n// desktop\n// Mobile\n","import * as actionTypes from '../actions/actionTypes.js'\nimport {demoDsfDevices} from \"../../features/assets/asset-status/asset-status.helper\";\n\nconst initialState = {\n token: null,\n devices: [],\n lastFetch: 0,\n tenantId: null,\n loading: false,\n error: null,\n}\n\n\nconst dsf = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_DSF_SUCCESS:\n\n const dsfDevices = action.data?.response?.devices?.length ? action.data?.response?.devices.map((device) => ({\n deviceSerialNo: device.Serial,\n deviceName: `${device.Serial} ${device?.Address?.Suburb}-${device?.Address?.State}`,\n location: `${device?.Address?.AddressLine1 ?? ''} ${device?.Address?.AddressLine2 ?? ''} ${device?.Address?.AddressLine3 ?? ''} ${device?.Address?.AddressLine4 ?? ''} ${device?.Address?.Suburb ?? ''} ${device?.Address?.Postcode ?? ''} ${device?.Address?.State ?? ''}`.replace(/ +(?= )/g, '')\n })) : []\n\n\n const tempState = {\n ...state,\n token: action.data?.response?.token?.length ? action.data?.response?.token : state.token,\n devices: dsfDevices,\n loading: false,\n error: null,\n lastFetch: Date.now(),\n }\n\n return tempState\n\n case actionTypes.UPDATE_DSF_REQUEST:\n\n return {\n ...state,\n loading: true,\n }\n\n case actionTypes.UPDATE_DSF_ERROR:\n return {\n ...state,\n loading: false,\n error: action.data?.response,\n }\n default: {\n return state\n }\n }\n}\n\nexport default dsf\n","export const language = \"en-AU\" //todo en-AU doesnt work\nexport const locale = \"en-AU\"\nexport const timezone = \"Australia/Sydney\" //local by default set to undefined\n\nexport const DEVICE_DETAILS_ARRAY = 'dsf_devices'\nexport const commonDSFProps = {\n locale: locale,\n timezone: timezone,\n language: language,\n}\n\nexport const DEVICE_DETAILS = 'deviceDetails'\n\n\nexport const demoDsfDevices = [\n {\n deviceSerialNo: \"2GS00200\",\n deviceName: \"IR-ADV C3530i\",\n location: \"MQP, NSW\"\n },\n {\n deviceSerialNo: \"2GS01822\",\n deviceName: \"IR-ADV C3530i\",\n location: \"Clayton,VIC\"\n }\n];\n\nexport const DEVICE_LIST_ID = '#device-list'\nexport const SUMMARY_STATUS_ID = '#status-summary'\nexport const BACKGROUND_COLOR = '#f6f6f6'\n\nexport const tabs = [\n {\n title: 'Device Summary Status',\n id: SUMMARY_STATUS_ID\n },\n {\n title: 'Device Status List',\n id: DEVICE_LIST_ID,\n }\n]\n\n//todo check if we can move these out if they do not change\nexport const securityDiagnosisSettings = {\n isSecuritySettingsCheck: true,\n isSecuritySoftwareIntegrityVerification: true,\n isSecurityUserAuthenticationLockout: true,\n isSecurityUserLoginDuringMonitoringTime: true,\n securityUserLoginDuringMonitoringTimeStart: \"13:00\",\n securityUserLoginDuringMonitoringTimeEnd: \"21:00\"\n}\n\nexport const extraSettings = {\n 'inspection-history-display-flag': false,\n // 'customer-support-display-flag': 'true',\n // 'customer-support-histories': '[]',\n 'security-diagnosis-settings': JSON.stringify(securityDiagnosisSettings),\n}\n\n","import React from 'react'\nimport { lighten as lightenColor, darken as darkenColor } from 'polished'\n\n// Pass in a know color variant from the theme provider\nexport const color = variant => props => props.theme.color[variant] || variant\n\n// Pass in a prop to select a color variant from the theme provider\nexport const colorFromProp = prop => props =>\n props.theme.color[props[prop]] || props[prop]\n\n// Helper functions to use theme colors with polished methods\n\n// NOTE: Hopefully polished will eventually handle transparent values so we don't have to check\nconst ifNotTransparent = (input, cb) =>\n input !== 'transparent' ? cb(input) : 'transparent'\n\nexport const lighten = (amount, variant) => props =>\n lightenColor(amount, props.theme.color[variant])\n\nexport const lightenFromProp = (amount, prop) => props =>\n ifNotTransparent(props[prop], v =>\n lightenColor(amount, props.theme.color[v] || v)\n )\n\nexport const darken = (amount, variant) => props =>\n darkenColor(amount, props.theme.color[variant])\n\nexport const darkenFromProp = (amount, prop) => props =>\n ifNotTransparent(props[prop], v =>\n darkenColor(amount, props.theme.color[v] || v)\n )\n\n// Prevent PropType warning by removing unwanted props from a component\nexport const componentWithoutProps = (Component, ignoreProps = []) => props => {\n const filteredProps = { ...props }\n ignoreProps.forEach(prop => {\n if (prop in filteredProps) {\n delete filteredProps[prop]\n }\n })\n\n return \n}\n","import React from 'react'\nimport { Route } from 'react-router-dom'\n\nimport { isLoggedIn, canCallBack, login } from 'auth'\nimport Loading from 'components/common/loading'\nimport { compose, lifecycle } from 'recompose'\nimport { Permissions } from 'utils/acl-permissions'\n//import { getPermissions, PERMISSIONS_ROUTES_ONLY } from 'app-config'\nimport { GenericError } from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\n\nconst getQueryVariable = variable => {\n var query = window.location.search.substring(1)\n // console.log(query) //\"app=article&act=news_content&aid=160990\"\n var vars = query.split('&')\n // console.log(vars) //[ 'app=article', 'act=news_content', 'aid=160990' ]\n for (var i = 0; i < vars.length; i++) {\n var pair = vars[i].split('=')\n // console.log(pair) //[ 'app', 'article' ][ 'act', 'news_content' ][ 'aid', '160990' ]\n if (pair[0] == variable) {\n return pair[1]\n }\n }\n return ''\n}\n\nconst withReloginData = lifecycle({\n componentDidMount() {\n //If we are hitting the relogin component, persist the path of the route in the localstorage using the canCallBack and attempt a relogin.\n\n //persist the route to the local storage so that the SSO component can pick it up and redirect after sucessul authentication\n canCallBack()\n\n const idp = getQueryVariable('idp')\n //relogin since the token has expired or not logged in\n login(idp)\n }\n})\n\nconst enhance = compose(withReloginData)\n\nconst ReLogin = enhance(props => (\n
\n \n
\n))\n\n//A Decorator/ wrapper Route component that adds the additional functionality to check and\n// reauthenticate the corresponding route children if not already authenticated\nconst PrivateRoute = ({ component: Component, ...rest }) => {\n\n return (\n \n }\n >\n \n isLoggedIn() ? (\n \n ) : (\n \n )\n }\n />\n \n )\n}\n\nexport default PrivateRoute\n","module.exports = { raw: '9.5.1' }\n","var StorageHandler = require('./storage/handler')\nvar storage\nvar getStorage = function() {\n if (!storage) {\n storage = new StorageHandler()\n }\n return storage\n}\n\nmodule.exports = {\n getItem: function(key) {\n var value = getStorage().getItem(key)\n try {\n return JSON.parse(value)\n } catch (_) {\n return value\n }\n },\n removeItem: function(key) {\n return getStorage().removeItem(key)\n },\n setItem: function(key, value, options) {\n var json = JSON.stringify(value)\n return getStorage().setItem(key, json, options)\n }\n}\n","var random = require('../helper/random')\nvar storage = require('../helper/storage')\nvar times = require('../helper/times')\n\nvar DEFAULT_NAMESPACE = 'com.auth0.auth.'\n\nfunction TransactionManager(options) {\n options = options || {}\n this.namespace = options.namespace || DEFAULT_NAMESPACE\n this.keyLength = options.keyLength || 32\n}\n\nTransactionManager.prototype.process = function(options) {\n if (!options.responseType) {\n throw new Error('responseType is required')\n }\n var lastUsedConnection = options.realm || options.connection\n var responseTypeIncludesIdToken =\n options.responseType.indexOf('id_token') !== -1\n\n var transaction = this.generateTransaction(\n options.appState,\n options.state,\n options.nonce,\n lastUsedConnection,\n responseTypeIncludesIdToken\n )\n if (!options.state) {\n options.state = transaction.state\n }\n\n if (responseTypeIncludesIdToken && !options.nonce) {\n options.nonce = transaction.nonce\n }\n\n return options\n}\n\nTransactionManager.prototype.generateTransaction = function(\n appState,\n state,\n nonce,\n lastUsedConnection,\n generateNonce\n) {\n state = state || random.randomString(this.keyLength)\n nonce =\n nonce || (generateNonce ? random.randomString(this.keyLength) : null)\n\n storage.setItem(\n this.namespace + state,\n {\n nonce: nonce,\n appState: appState,\n state: state,\n lastUsedConnection: lastUsedConnection\n },\n times.MINUTES_30\n )\n return {\n state: state,\n nonce: nonce\n }\n}\n\nTransactionManager.prototype.getStoredTransaction = function(state) {\n var transactionData\n\n transactionData = storage.getItem(this.namespace + state)\n storage.removeItem(this.namespace + state)\n return transactionData\n}\n\nmodule.exports = TransactionManager\n","var urljoin = require('url-join')\n\nvar windowHelper = require('../helper/window')\nvar objectHelper = require('../helper/object')\nvar RequestBuilder = require('../helper/request-builder')\nvar WebMessageHandler = require('./web-message-handler')\nvar responseHandler = require('../helper/response-handler')\nvar storage = require('../helper/storage')\nvar times = require('../helper/times')\n\nfunction CrossOriginAuthentication(webAuth, options) {\n this.webAuth = webAuth\n this.baseOptions = options\n this.request = new RequestBuilder(options)\n this.webMessageHandler = new WebMessageHandler(webAuth)\n}\n\nfunction getFragment(name) {\n var theWindow = windowHelper.getWindow()\n var value = '&' + theWindow.location.hash.substring(1)\n var parts = value.split('&' + name + '=')\n if (parts.length === 2) {\n return parts\n .pop()\n .split('&')\n .shift()\n }\n}\n\nfunction createKey(origin, coId) {\n return [\n 'co/verifier',\n encodeURIComponent(origin),\n encodeURIComponent(coId)\n ].join('/')\n}\n\n/**\n * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`.\n * Some browsers might not be able to successfully authenticate if 3rd party cookies are disabled in your browser. [See here for more information.]{@link https://auth0.com/docs/cross-origin-authentication}.\n * After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.\n *\n * @method login\n * @param {Object} options options used in the {@link authorize} call after the login_ticket is acquired\n * @param {String} [options.username] Username (mutually exclusive with email)\n * @param {String} [options.email] Email (mutually exclusive with username)\n * @param {String} options.password Password\n * @param {String} [options.realm] Realm used to authenticate the user, it can be a realm name or a database connection name\n * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`.\n */\nCrossOriginAuthentication.prototype.login = function(options, cb) {\n var _this = this\n var url = urljoin(this.baseOptions.rootUrl, '/co/authenticate')\n options.username = options.username || options.email\n delete options.email\n\n var authenticateBody = {\n client_id: options.clientID || this.baseOptions.clientID,\n username: options.username\n }\n if (options.password) {\n authenticateBody.password = options.password\n }\n if (options.otp) {\n authenticateBody.otp = options.otp\n }\n var realm = options.realm || this.baseOptions.realm\n\n if (realm) {\n var credentialType =\n options.credentialType ||\n this.baseOptions.credentialType ||\n 'http://auth0.com/oauth/grant-type/password-realm'\n authenticateBody.realm = realm\n authenticateBody.credential_type = credentialType\n } else {\n authenticateBody.credential_type = 'password'\n }\n this.request\n .post(url)\n .withCredentials()\n .send(authenticateBody)\n .end(function(err, data) {\n if (err) {\n var errorObject = (err.response && err.response.body) || {\n error: 'request_error',\n error_description: JSON.stringify(err)\n }\n return responseHandler(cb, { forceLegacyError: true })(\n errorObject\n )\n }\n var popupMode = options.popup === true\n options = objectHelper.blacklist(options, [\n 'password',\n 'credentialType',\n 'otp',\n 'popup'\n ])\n var authorizeOptions = objectHelper\n .merge(options)\n .with({ loginTicket: data.body.login_ticket })\n var key = createKey(_this.baseOptions.rootUrl, data.body.co_id)\n storage.setItem(key, data.body.co_verifier, {\n expires: times.MINUTES_15\n })\n if (popupMode) {\n _this.webMessageHandler.run(\n authorizeOptions,\n responseHandler(cb, { forceLegacyError: true })\n )\n } else {\n _this.webAuth.authorize(authorizeOptions)\n }\n })\n}\n\nfunction tryGetVerifier(theWindow, key) {\n try {\n var verifier = storage.getItem(key)\n storage.removeItem(key)\n return verifier || ''\n } catch (e) {\n return ''\n }\n}\n\n/**\n * Runs the callback code for the cross origin authentication call. This method is meant to be called by the cross origin authentication callback url.\n *\n * @method callback\n */\nCrossOriginAuthentication.prototype.callback = function() {\n var targetOrigin = decodeURIComponent(getFragment('origin'))\n var theWindow = windowHelper.getWindow()\n\n theWindow.addEventListener('message', function(evt) {\n if (evt.data.type !== 'co_verifier_request') {\n return\n }\n var key = createKey(evt.origin, evt.data.request.id)\n var verifier = tryGetVerifier(theWindow, key)\n\n evt.source.postMessage(\n {\n type: 'co_verifier_response',\n response: {\n verifier: verifier\n }\n },\n evt.origin\n )\n })\n\n theWindow.parent.postMessage({ type: 'ready' }, targetOrigin)\n}\n\nmodule.exports = CrossOriginAuthentication\n","import {\n login,\n handleAuthentication,\n logout,\n changePassword,\n requireAuth,\n isLoggedIn,\n autoSignInOnLand,\n reLoginSSO\n} from './AuthService'\nimport { canCallBack, deleteCallBack, willCallBack } from './callBackHandlers'\nexport {\n canCallBack,\n deleteCallBack,\n willCallBack,\n login,\n handleAuthentication,\n logout,\n changePassword,\n requireAuth,\n isLoggedIn,\n autoSignInOnLand,\n reLoginSSO\n}\n","import { css } from 'styled-components'\n\nexport const aspectRatio = (x, y) => css`\n position: relative;\n\n &::after {\n display: block;\n width: 100%;\n height: 100%;\n padding-top: ${100 * (y / x)}%;\n content: '';\n z-index: -1;\n }\n`\n\nexport const inputPlaceholder = (...args) => css`\n &::-webkit-input-placeholder {\n ${css(...args)};\n }\n\n &:-moz-placeholder {\n ${css(...args)};\n }\n\n &::-moz-placeholder {\n ${css(...args)};\n }\n\n &:-ms-input-placeholder {\n ${css(...args)};\n }\n`\n\n// TODO: Make this configurable\nexport const breakpoints = {\n xs: '(min-width: 0px)',\n sm: '(min-width: 480px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 980px)',\n xl: '(min-width: 1200px)'\n}\n\nconst getMediaBreakpoints = () => {\n const media = {}\n\n Object.keys(breakpoints).forEach(breakpoint => {\n media[breakpoint] = (...args) => css`\n @media ${breakpoints[breakpoint]} {\n ${css(...args)};\n }\n `\n })\n\n return media\n}\n\nexport const media = getMediaBreakpoints()\n","import styled, { css } from 'styled-components'\nimport { inputPlaceholder } from './mixins'\nimport { color } from './helpers'\nimport { media } from 'styles/Breakpoint'\n\nexport const ModalFooterSection = styled.div`\n position: absolute;\n height: 3em;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${props => props.theme.color.white};\n background-color: ${props => props.theme.color.primary};\n font-weight: 500;\n cursor: pointer;\n`\n\nexport const ModalFooterSectionBlack = styled.div`\n position: absolute;\n height: 3em;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${props => props.theme.color.white};\n background-color: #333;\n font-weight: 500;\n cursor: pointer;\n`\n\nexport const ModalContentSection = styled.div`\n display: flex;\n padding: 0.2em 0.7em;\n text-align: center;\n justify-content: center;\n align-items: center;\n line-height: 1.5;\n`\n\n//form input styles\nexport const FormFileStyle = css`\n cursor: pointer;\n display: flex;\n filter: alpha(opacity=0);\n opacity: 0;\n right: 0;\n text-align: right;\n min-height: 100%;\n position: relative;\n top: 0;\n width: 179px;\n left: -179px;\n`\n\nexport const fieldStyles = css`\n appearance: none;\n background-color: ${props =>\n color(props.theme.forms.backgroundColor)(props)};\n border-radius: ${props => props.theme.forms.borderRadius};\n border-top-width: ${props => props.theme.forms.borderTopWidth};\n border-right-width: ${props => props.theme.forms.borderRightWidth};\n border-bottom-width: ${props => props.theme.forms.borderBottomWidth};\n border-left-width: ${props => props.theme.forms.borderLeftWidth};\n box-shadow: none;\n color: solid ${props => color(props.theme.forms.color)(props)};\n font-size: ${props => props.theme.forms.fontSize};\n height: ${props => props.theme.forms.height};\n line-height: ${props => props.theme.forms.lineHeight};\n padding: ${props =>\n `${props.theme.forms.paddingVertical} ${props.theme.forms.paddingHorizontal\n }`};\n transition-duration: 0.23s;\n transition-property: border-color, color;\n transition-timing-function: ease-out;\n width: 100%;\n -webkit-text-fill-color: currentColor;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n &:focus {\n border-color: ${props =>\n color(props.theme.forms.borderColorFocus)(props)};\n }\n\n ${props => inputPlaceholder`\n color: ${color(props.theme.forms.placeholderColor)(props)};\n opacity: ${color(props.theme.forms.placeholderOpacity)(props)};\n `} ${props =>\n props.disabled &&\n css`\n background-color: ${color('disabled')};\n cursor: not-allowed;\n `};\n`\n\nexport const buttonIncognito = css`\n background: none;\n border: 0;\n border-radius: 0;\n cursor: pointer;\n font: inherit;\n margin: 0;\n padding: 0;\n text-transform: none;\n transition: color 0.3s;\n`\n\n// Forms releated styles\nexport const FormContentCard = styled.section`\n .header {\n border-bottom: 1px rgba(76, 76, 75, 0.1) solid;\n margin-bottom: 0.7em;\n padding-bottom: 0.3em;\n font-size: 1.1rem;\n font-weight: bolder;\n }\n .Select {\n font-size: 14px;\n \n }\n .Select--multi .Select-value{\n font-weight:500;\n \n }\n .content {\n ol{\n line-height:2;\n }\n .notes {\n width: 85%;\n margin: 0 auto;\n padding: 10px 0;\n font-size: 14px;\n }\n background-color: white;\n padding: ${props => (props.padding ? props.padding : '30px')};\n // box-shadow: ${props => props.theme.boxShadow[3]};\n form {\n width: 85%;\n margin: 0 auto;\n }\n textarea {\n height: 64px;\n }\n .captcha {\n width: 100%;\n }\n \n .date {\n width: 100%;\n .react-datepicker__day--selected {\n font-weight: 500;\n background-color: ${props => props.theme.color.primary};\n }\n .react-datepicker-wrapper {\n input {\n height: 32px;\n padding: 8px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: #fff;\n border-radius: 3px;\n border: solid #e0e0e0;\n border-top-width: 1px;\n border-right-width: 1px;\n border-bottom-width: 1px;\n border-left-width: 1px;\n box-shadow: none;\n color: solid currentColor;\n font-size: 0.8rem;\n height: 40px;\n line-height: normal;\n padding: 0.25rem 0.5rem;\n -webkit-transition-duration: 0.23s;\n transition-duration: 0.23s;\n -webkit-transition-property: border-color, color;\n transition-property: border-color, color;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n width: 100%;\n -webkit-text-fill-color: currentColor;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n }\n }\n }\n ${media.mobileTablet`\n .content{\n padding:18px;\n }\n \n `};\n`\n\nexport const FieldBlockBox = styled.div`\n display: block;\n justify-content: ${props => (props.center ? 'center' : 'space-between')};\n width: 100%;\n margin: 0 auto;\n .lite-label{\n display: flex;\n width: 40%;\n align-items: center;\n margin-bottom: 0.7rem;\n }\n .label {\n padding-top: 12px;\n display: flex;\n width: 40%;\n align-items: center;\n }\n .consumableQty{\n width:20%;\n }\n .consumableLabel {\n flex-direction: column;\n align-items: flex-start;\n width:50%;\n .note {\n padding: 3px 0;\n font-size: 12px;\n opacity: 0.8;\n font-weight: 400;\n }\n }\n .price {\n padding-top: 12px;\n font-size: 14px;\n font-weight: 400;\n // color: ${props => props.theme.color.primary};\n display: flex;\n width: 20%\n align-items: flex-start;\n }\n .field {\n width: 60%;\n }\n `\n\nexport const FieldFlexBox = styled.div`\n display: flex;\n justify-content: ${props => (props.center ? 'center' : 'space-between')};\n width: 100%;\n margin: 0 auto;\n .lite-label{\n display: flex;\n width: 40%;\n align-items: center;\n margin-bottom: 0.7rem;\n }\n .label {\n padding-top: 12px;\n display: flex;\n width: 430px;\n align-items: center;\n }\n .consumableQty{\n width:20%;\n }\n .consumableLabel {\n flex-direction: column;\n align-items: flex-start;\n width:50%;\n .note {\n padding: 3px 0;\n font-size: 12px;\n opacity: 0.8;\n font-weight: 400;\n }\n }\n .price {\n padding-top: 12px;\n font-size: 14px;\n font-weight: 400;\n // color: ${props => props.theme.color.primary};\n display: flex;\n width: 20%\n align-items: flex-start;\n }\n .field {\n width: 60%;\n }\n`\n","// eslint-disable-next-line\nimport styled, { keyframes } from 'styled-components'\n\nexport const fadeIn = keyframes`\n from {\n transform: scale(0.85)\n opacity: 0\n }\n\n to {\n transform: scale(1)\n opacity: 1\n }\n`\n\nexport const fadeOut = keyframes`\n from {\n transform: scale(1)\n opacity: 1\n }\n\n to {\n transform: scale(0.85)\n opacity: 0\n }\n`\n","import styled, { css } from 'styled-components'\nimport { color } from '../../../styles/styled-components/helpers'\nimport { buttonIncognito } from '../../../styles/styled-components/common'\nimport { fadeIn, fadeOut } from '../../../styles/styled-components/animations'\n\nexport const Shadow = styled.div`\n position: fixed;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n opacity: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0;\n z-index: ${props => props.theme.modal.zIndex - 1};\n transition: opacity 0.4s, height 0s 0.4s, width 0s 0.4s;\n transition-timing-function: ease-out;\n background-color: ${props => props.theme.modal.backdropColor};\n pointer-events: none;\n visibility: ${props => (props.isOpen ? 'visible' : 'hidden')};\n\n ${props =>\n props.isOpen &&\n css`\n width: 100%;\n height: 100%;\n opacity: 1;\n transition: opacity 0.4s ease-out;\n pointer-events: all;\n `};\n`\n\nexport const ModalContent = styled.div`\n width: ${props => props.width};\n max-width: 80%;\n\n min-height: 200px;\n max-height: 80%;\n margin: 0 auto;\n position: relative;\n min-width: 350px;\n overflow: hidden;\n visibility: ${props => (props.isOpen ? 'visible' : 'hidden')};\n animation: ${props => (props.isOpen ? fadeIn : fadeOut)} 0.3s\n ${props => props.theme.easing['cubic-out']};\n transition: visibility 0.3s ${props => props.theme.easing['cubic-out']};\n background-color: ${props => props.theme.color.white};\n border-radius: 4px;\n .fa-times {\n position: absolute;\n top: 5px;\n right: 12px;\n font-size: 1.2rem !important;\n color: #4c4c4b;\n opacity: 0.7;\n }\n .fa-times:hover {\n opacity: 1;\n cursor: pointer;\n }\n`\n\nexport const EmailContent = styled.div`\n padding: 1rem;\n overflow-y: auto;\n padding-bottom: '41px'};\n`\n\nexport const Content = styled.div`\n padding: 1rem;\n overflow-y: auto;\n padding-bottom: ${props => (props.showActionButtons ? '60px' : '40px')};\n`\n\nexport const ModalHeader = styled.div`\n border-bottom: 1px solid ${props => props.theme.color.border};\n padding: 1rem 1rem 0px;\n`\n\nexport const ActionContainer = styled.div`\n display: flex;\n flex-direction: row;\n padding: 1rem 1rem;\n justify-content: flex-end;\n\n button {\n margin: 0 10px;\n min-width: 100px;\n }\n \n .fullButton {\n height: 100%;\n width: 100%;\n }\n`\n\nexport const ModalFooter = styled.div`\n position: absolute;\n bottom: 0px;\n width: 100%;\n background-color: ${props => props.theme.color.white};\n`\n\nexport const CloseButton = styled.button.attrs({\n type: 'button'\n})`\n ${buttonIncognito} position: absolute;\n right: 20px;\n top: 20px;\n color: ${color('white')};\n`\n","// @flow\n\nimport React, { Component } from 'react'\nimport {\n ActionContainer,\n Content,\n EmailContent,\n ModalContent,\n ModalFooter,\n ModalHeader,\n Shadow\n} from './styles'\n\ntype Props = {\n children: Node,\n closeOnClickOutside: boolean,\n closeOnEscapeClick: boolean,\n isOpen: boolean,\n onCancel: () => {},\n onClose: () => {},\n onConfirm: () => {},\n renderFooter?: Object => Node,\n renderHeader?: Object => Node,\n showClose?: boolean,\n type: string,\n width: string,\n hideHeader: boolean\n}\n\ntype State = {\n isOpenLocal: boolean\n}\n\nconst ESCAPE_KEY = 27\n\nclass Modal extends Component {\n static defaultProps = {\n closeOnClickOutside: true,\n closeOnEscapeClick: true,\n showClose: true,\n width: 'auto'\n }\n\n componentDidMount() {\n if (this.props.closeOnEscapeClick) {\n window.addEventListener('keydown', this.handleKeyDown)\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('keydown', this.handleKeyDown)\n }\n\n handleKeyDown = (e: any) => {\n if (!this.props.isOpen) {\n return\n }\n\n // escape\n if (e.which === ESCAPE_KEY) {\n this.closeHandler(e)\n }\n }\n\n closeHandler = (e: SyntheticInputEvent) => {\n this.props.onClose()\n }\n\n confirmHandler = (e: SyntheticInputEvent) => {\n this.props.onConfirm()\n }\n\n cancelHandler = (e: SyntheticInputEvent) => {\n this.props.onCancel()\n }\n\n handleOutsideClick = (e: SyntheticInputEvent) => {\n if (!this.props.closeOnClickOutside || e.target !== e.currentTarget) {\n return\n }\n\n e.preventDefault()\n this.closeHandler(e)\n }\n\n renderFooter(renderProps: Object) {\n if (typeof this.props.renderFooter === 'function') {\n return this.props.renderFooter(renderProps)\n }\n\n return null\n }\n\n renderHeader(renderProps: Object) {\n if (typeof this.props.renderHeader === 'function') {\n return this.props.renderHeader(renderProps)\n }\n\n return null\n }\n\n render() {\n // eslint-disable-next-line\n const { type, isOpen, showClose, width, hideHeader } = this.props\n\n const showActionButtons = type === 'transactional'\n const renderActions = {\n cancelHandler: this.cancelHandler,\n confirmHandler: this.confirmHandler\n }\n //\n return (\n \n \n {!hideHeader && (\n \n {this.renderHeader(renderActions)}\n \n )}{showActionButtons ?\n {this.props.children}\n :\n {this.props.children}}\n {showActionButtons && (\n \n \n {this.renderFooter(renderActions)}\n \n \n )}\n {showClose && (\n \n )}\n \n \n )\n }\n}\n\nexport default Modal\n","import styled, { css } from 'styled-components'\nimport { Link } from 'react-router-dom'\n\nimport {\n colorFromProp,\n darkenFromProp,\n componentWithoutProps\n} from '../../../styles/styled-components/helpers'\n\nexport const NormalButton = styled.button`\n background: ${colorFromProp('background')};\n border: 1px solid ${colorFromProp('border')};\n border-radius: ${props =>\n props.borderRadius || props.theme.button.borderRadius};\n color: ${colorFromProp('color')};\n cursor: pointer;\n display: inline-block;\n flex-grow: 0;\n flex-shrink: 0;\n font: inherit;\n font-size: ${props => props.theme.button.fontSize};\n font-weight: ${props => props.theme.button.fontWeight};\n letter-spacing: ${props => props.theme.button.letterSpacing};\n line-height: ${props => props.theme.button.lineHeight};\n margin: 0;\n opacity: 1;\n padding: ${props => props.theme.button.paddingVertical} ${props =>\n props.theme.button.paddingHorizontal};\n position: relative;\n text-align: center;\n text-decoration: none;\n text-transform: ${props => props.theme.button.textTransform};\n transition-duration: 0.23s;\n transition-property: background-color, border-color, color, opacity;\n transition-timing-function: ease-out;\n width: ${props => props.width};\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n\n &:hover,\n &:focus,\n &:active {\n !props.disabled && {\n background-color: ${darkenFromProp(0.1, 'background')};\n border-color: ${darkenFromProp(0.1, 'border')};\n }\n\n\n ${props =>\n props.hoverProps &&\n css`\n background: ${colorFromProp('background')({\n theme: props.theme,\n ...props.hoverProps\n })};\n border-color ${colorFromProp('border')({\n theme: props.theme,\n ...props.hoverProps\n })};\n color: ${colorFromProp('color')({\n theme: props.theme,\n ...props.hoverProps\n })};\n `}\n }\n\n ${props =>\n props.round &&\n css`\n padding: 0;\n border-radius: 50%;\n\n &::before {\n display: block;\n content: '';\n width: 100%;\n padding-top: 100%;\n }\n `}\n\n ${props =>\n props.disabled &&\n css`\n background: #999;\n border: 1px solid #444;\n opacity: 0.4;\n `}\n\n ${props =>\n props.size === 'sm' &&\n css`\n padding: ${props.theme.button.paddingVerticalSm}\n ${props.theme.button.paddingHorizontalSm};\n font-size: ${props.theme.button.fontSizeSm};\n `};\n\n ${props =>\n props.size === 'lg' &&\n css`\n padding: ${props.theme.button.paddingVerticalLg}\n ${props.theme.button.paddingHorizontalLg};\n font-size: ${props.theme.button.fontSizeLg};\n `};\n\n ${props =>\n props.padding &&\n css`\n padding: ${props.padding};\n `}\n`\n\nexport const AnchorButton = NormalButton.withComponent('a')\n\nexport const LinkButton = NormalButton.withComponent(\n componentWithoutProps(Link, ['background', 'fullWidth'])\n)\n\nexport const ButtonContent = styled.span`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n opacity: ${props => (props.hide ? 0 : 1)};\n transition: opacity 0.23s;\n\n ${props =>\n props.round &&\n css`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n `};\n`\n","// @flow\n\nimport React from 'react'\n\nimport Icon from '../../Icon'\nimport Loading from '../../common/loading'\n\nimport { AnchorButton, ButtonContent, LinkButton, NormalButton } from './styles'\n\ntype Props = {\n background: string,\n border?: string,\n borderRadius?: string,\n children: Node | string,\n className?: string,\n color: string,\n disabled?: boolean,\n hoverProps?: {\n background?: string,\n border?: string,\n color?: string\n },\n href?: string,\n icon?: string,\n iconProps?: Object,\n loading?: boolean,\n onClick?: () => void,\n padding?: string,\n round?: boolean,\n size: 'sm' | 'md' | 'lg',\n target?: string,\n to?: string,\n type: 'button' | 'submit' | 'reset',\n width?: string\n}\n\nconst Button = ({\n background,\n border,\n borderRadius,\n children,\n className,\n color,\n disabled,\n hoverProps,\n href,\n icon,\n iconProps,\n loading,\n onClick,\n padding,\n round,\n size,\n target,\n to,\n type,\n width\n}: Props) => {\n let ButtonComponent = NormalButton\n\n if (href) {\n ButtonComponent = AnchorButton\n }\n\n if (to) {\n ButtonComponent = LinkButton\n }\n\n const IconComponent = icon ? Icon[icon] : null\n\n const buttonIconProps = {\n size: '14px',\n marginRight: '7px',\n ...iconProps\n }\n\n return (\n \n {/*loading &&\n \n \n */}\n \n {IconComponent && }\n {children}\n \n \n )\n}\n\nButton.defaultProps = {\n background: 'primary',\n color: 'white',\n iconProps: {},\n size: 'md',\n type: 'button',\n width: 'auto'\n}\n\nexport default Button\n","import styled, { keyframes } from 'styled-components'\n\nconst linearRotate = keyframes`\n from {\n -webkit-transform: rotate(0deg);\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n to {\n -webkit-transform: rotate(360deg);\n -moz-transform: rotate(360deg);\n -o-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n`\n\nexport const Loading = styled.div`\n color: red;\n &:after {\n /* with no content, nothing is rendered */\n content: '';\n position: fixed;\n /* element stretched to cover during rotation an aspect ratio up to 1/10 */\n top: -500%;\n left: -500%;\n right: -500%;\n bottom: -500%;\n z-index: 9999;\n pointer-events: all; /* to block content use: all ; reverse use :none */\n /* background */\n background-color: rgba(0, 0, 0, 0.6);\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFztJREFUeNrsXfmzHNV1Pv1mhCQEaEUIISGBkIgkFhWbzWqzRDYOIXb2xU6cxSknqVSSH/JL/oX8kMpeWZzFWZ29nDiV2BiXcVhisAWOwWCMkJBAaHsSetql9zr3aE4z/fp19927Z/m+qlPT090z783c8813zl3OTdI0JRckSUJAJbrKrlZ2ldgqsRXKlitbpmyxsnXKXle2Q9n/KPuCsr34+uLD1O8TEMQbm5Rdr2yj2AZl1ypbk31Vxa+u4pjxjLK/VPYpbkN8tSDIsGGJspvFblJ2g7KtohimJDC59ptik3DldgnSxVdV/zug7A5ltyu7Tdmtog5F505LnN0Hvy6PvwEladkBoCBzcJmyu8XeK+ajDHX36e79pLI/hZsixGobC5W9T+weZdsiksLm2tPKfgyJOwjSFjhsekDsroCkCEUQfv4JZX8Gl0YO0mQI9QFl28WWlH1/OWd1yS9C5iT3giDtYZwIcp2yh5V9SNmdEZw6dKKeYRvcFASJCe6OfUTZo9Qbrxg2XAs3BUFigH95PyzEWO8ZJpkct600AAhihC3Kvl/ZR5RdY+CYvg4fGzvhpiBICPCcpx8U22JBikHH83BTEM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W7L4ki0UcW3DrFgJ+kkhxp42YtBRIUiGjdTrBt5K7nW1mshLYh6HJkVo9bB5PCDEONxWkjZI60FC4FVJhHkm7ntyCafuF0v7PXmcaxpV6yNs7rE9l3h+9uL7nMv1BA5FD+CwKEgerCK8ruT6FkOt0OFXzOO2EvIy1dhLAzJDYdQUJI8XRZ6ZJLeSe10sn1/G1OJ6G+qTBPi7oVTktBBjDw3PuNFQK0geXM2E53Fto2YGEmMpRxOva0M13hRyHB40xx9lBcmD50rx/u07hSTXWCpA6ngthio1pSR1imCyjtwEk0KMNwfwOxkrBcmDB8h4d1xe0muyfiGkivj+0sfOL5pSjSkhBs8wODXIjj9q3bw24FmpN4otcXSIYSFLyKTchzAnRS3epICLmkCQuFgtPV48XWUpxVlsNYgEajLnOCFqwXaUhgggSB+8ZHSzsu+i2bNY2wq9YhCkadXgMp/7hBhDWXMMBJkLntvFNWN5/GStp5M0fS7W/6J7z+L5/Azmoa4KA4JUgyf98dSV68TmRyDGIBLEVS3OCiEyG4nVlSCIGbicDXcN8yYvayI4WhMECa0a+eqFPOrNU3wmacQAgtiBx4PWU68cEdtKR4cMGfaEVAZTohwRUmQ2TSMKEMQvBFsrllUSbLJ7OGboVLVY6ZAoxkEak/pgIEg4rKZ+ATUuibO4oV/2WOHUFPVXPR4WcowdQJA4WCDhV1YVJF8AoW2ClN2Tlew8Ko+T8jj25VZBkObAg5DLqF8kIVsbfkmEkKzu2glRBzYemziWewRAkIECrym/VEiSrRvnNeQLJcdh43Xm86SDoCOvyb7UabHz1F+zfkbstBjPdTopxuQ4TkM+MXAQCfL/AgwA5RiTZrxUXwcAAAAASUVORK5CYII=);\n background-repeat: no-repeat;\n background-position: center center;\n background-size: 60px 60px;\n\n /* animation */\n -webkit-animation-name: ${linearRotate};\n -webkit-animation-duration: 1s;\n -webkit-animation-iteration-count: infinite;\n -webkit-animation-timing-function: linear;\n\n -moz-animation-name: ${linearRotate};\n -moz-animation-duration: 1s;\n -moz-animation-iteration-count: infinite;\n -moz-animation-timing-function: linear;\n\n -o-animation-name: ${linearRotate};\n -o-animation-duration: 1s;\n -o-animation-iteration-count: infinite;\n -o-animation-timing-function: linear;\n\n animation-name: ${linearRotate};\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n`\n","import React from 'react'\nimport { Loading } from './styles'\n\nconst InPageLoading = props => \n\nexport default InPageLoading\n","import moment from 'moment'\n\nclass DateUtils {\n static previousDate = (value, units, format) => {\n return moment()\n .add(value, units || 'days')\n .format(format || 'YYYY-MM-DD')\n }\n\n static isValid = checkDate => {\n return moment(checkDate).isValid()\n }\n\n static isValidBeforeToday = (dateFrom, dateTo) => {\n if (!DateUtils.isValid(dateFrom)) return false\n if (!DateUtils.isValid(dateTo)) return false\n const today = moment()\n if (!moment(dateFrom).isBefore(today)) return false\n // if (!moment(dateTo).isBefore(today)) return false\n if (!moment(dateFrom).isSameOrBefore(moment(dateTo))) return false\n return true\n }\n\n static isAustraliaHoliday = input => {\n\n\n }\n\n static isHoliday = input => {\n const locale = input.localeData()\n\n //these are undefined?\n // console.log(locale._holidays)\n // console.log(locale.holiday)\n\n\n if (locale._holidays) {\n // console.log(locale._holidays)\n if (\n locale._holidays.indexOf(input.format(locale._holidayFormat)) >=\n 0\n )\n return true\n }\n\n if (locale.holiday) {\n if (locale.holiday(input)) {\n return true\n }\n return false\n }\n\n return false\n }\n\n static isBusinessDay = input => {\n const locale = input.localeData()\n\n const defaultWorkingWeekdays = [1, 2, 3, 4, 5]\n //is always undefined?\n // console.log(locale._workingWeekdays)\n // const workingWeekdays = locale._workingWeekdays || defaultWorkingWeekdays\n //const workingWeekdays = defaultWorkingWeekdays\n\n\n if (DateUtils.isHoliday(input)) return false\n //return workingWeekdays.indexOf(input.day()) >= 0\n return defaultWorkingWeekdays.indexOf(input.day()) >= 0\n\n }\n\n static businessDaysIntoMonth = input => {\n if (!input.isValid()) {\n return NaN\n }\n var businessDay = DateUtils.isBusinessDay(input)\n ? input\n : DateUtils.prevBusinessDay(input)\n var monthBusinessDays = DateUtils.monthBusinessDays(businessDay)\n var businessDaysIntoMonth\n // eslint-disable-next-line\n monthBusinessDays.map(function (day, index) {\n if (day.format('M/DD/YY') === businessDay.format('M/DD/YY')) {\n businessDaysIntoMonth = index + 1\n }\n })\n return businessDaysIntoMonth\n }\n\n static businessDiff = (input, param) => {\n var d1 = input.clone()\n var d2 = param.clone()\n var start = d1 < d2 ? d1 : d2\n var end = d2 > d1 ? d2 : d1\n\n var daysBetween = 0\n\n if (start.format('DD/MM/YYYY') === end.format('DD/MM/YYYY')) {\n return daysBetween\n }\n\n while (start < end) {\n if (DateUtils.isBusinessDay(start)) {\n daysBetween++\n }\n start.add(1, 'd')\n }\n\n return daysBetween\n }\n\n static businessAdd = (input, number, period) => {\n var day = input.clone()\n if (!day.isValid()) {\n return day\n }\n var signal = number < 0 ? -1 : 1\n var remaining = Math.abs(number)\n period = typeof period !== 'undefined' ? period : 'days'\n\n while (remaining) {\n day.add(signal, period)\n\n if (DateUtils.isBusinessDay(day)) {\n remaining--\n }\n }\n\n return day\n }\n\n static businessSubtract = (input, number, period) => {\n return DateUtils.businessAdd(input, -number, period)\n }\n\n static nextBusinessDay = input => {\n var loop = 1\n var limit = 7\n while (loop < limit) {\n if (DateUtils.isBusinessDay(input.add(1, 'd'))) {\n break\n }\n loop++\n }\n return input\n }\n\n static prevBusinessDay = function (input) {\n var loop = 1\n var limit = 7\n while (loop < limit) {\n if (DateUtils.isBusinessDay(input.subtract(1, 'd'))) {\n break\n }\n loop++\n }\n return input\n }\n\n static monthBusinessDays = (input, partialEndDate) => {\n if (!input.isValid()) {\n return []\n }\n var me = input.clone()\n var day = me.clone().startOf('month')\n var end = partialEndDate ? partialEndDate : me.clone().endOf('month')\n var daysArr = []\n var done = false\n while (!done) {\n if (DateUtils.isBusinessDay(day)) {\n daysArr.push(day.clone())\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n done = true\n }\n }\n return daysArr\n }\n\n static monthNaturalDays = (input, fromToday) => {\n if (!input.isValid()) {\n return []\n }\n var me = input.clone()\n var day = fromToday ? me.clone() : me.clone().startOf('month')\n var end = me.clone().endOf('month')\n var daysArr = []\n var done = false\n while (!done) {\n daysArr.push(day.clone())\n if (end.diff(day.add(1, 'd')) < 0) {\n done = true\n }\n }\n return daysArr\n }\n\n static monthBusinessWeeks = (input, fromToday) => {\n if (!input.isValid()) {\n return []\n }\n var me = input.clone()\n var day = fromToday ? me.clone() : me.clone().startOf('month')\n var end = me.clone().endOf('month')\n var weeksArr = []\n var daysArr = []\n var done = false\n\n while (!done) {\n if (day.day() >= 1 && day.day() < 6) {\n daysArr.push(day.clone())\n }\n if (day.day() === 5) {\n weeksArr.push(daysArr)\n daysArr = []\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n if (daysArr.length < 5) {\n weeksArr.push(daysArr)\n }\n done = true\n }\n }\n return weeksArr\n }\n\n static monthNaturalWeeks = (input, fromToday) => {\n if (!input.isValid()) {\n return []\n }\n var me = input.clone()\n var day = fromToday ? me.clone() : me.clone().startOf('month')\n var end = me.clone().endOf('month')\n var weeksArr = []\n var daysArr = []\n var done = false\n\n while (!done) {\n daysArr.push(day.clone())\n if (day.day() === 6) {\n weeksArr.push(daysArr)\n daysArr = []\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n if (daysArr.length < 7) {\n weeksArr.push(daysArr)\n }\n done = true\n }\n }\n return weeksArr\n }\n}\n\nexport default DateUtils\n","import styled, {keyframes} from 'styled-components'\n\nconst rotate = keyframes`\n 0% {\n transform: rotateZ(0);\n }\n\n 100% {\n transform: rotateZ(360deg);\n }\n`\n\nexport const StyledLoader = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.3em;\n opacity: 0.7;\n flex-direction: column;\n margin: 0 auto;\n background-color: ${(props) => props.backgroundColor || 'inherit'};\n ${props =>\n props.center &&\n `position: ${props.position};\n width: 100%;\n height: ${props.containerHeight || '400px'}\n top: 0;\n left: 0;\n \n \n `};\n\n .saving {\n }\n\n .saving span {\n font-size: 1.2em;\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n\n .smallText {\n font-size: 12px;\n }\n\n .saving span:nth-child(2) {\n animation-delay: 0.2s;\n }\n\n .saving span:nth-child(3) {\n animation-delay: 0.4s;\n }\n\n .saving span:nth-child(4) {\n animation-delay: 0.6s;\n }\n\n @keyframes blink {\n 0% {\n opacity: 0.2;\n }\n 20% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n }\n`\n\nexport const StyledSpinner = styled.div`\n display: inline-block;\n width: ${props => props.size};\n height: ${props => props.size};\n transform-origin: center;\n margin-right: ${props => (props.hasMessage ? '1em' : null)};\n animation: ${rotate} 0.5s infinite linear;\n border: ${props => props.thickness} solid ${props => props.color};\n border-radius: 50%;\n border-right-color: ${props => props.backgroundColor};\n border-top-color: ${props => props.backgroundColor};\n`\n","import React, { Component } from 'react'\n// import { TimelineMax } from 'gsap/umd/TweenMax'\n//import TimelineMax from 'gsap/umd/TimelineMax'\nimport { gsap } from \"gsap/dist/gsap\"\n\nclass BubbleLoading extends Component {\n constructor(props) {\n super(props)\n this.state = {}\n this.tl = gsap.timeline({ repeat: -1 })\n this.tl2 = gsap.timeline({ repeat: -1 })\n }\n\n componentDidMount() {\n this.tl\n .set('#c1', { autoAlpha: 0.7 })\n .to('#c1', 0.5, {\n scale: 0.2,\n x: '+=5',\n transformOrigin: '50% 50%'\n })\n .to('#c1', 0.5, { scale: 1, x: '-=5', transformOrigin: '50% 50%' })\n\n this.tl2\n .set('#c2', { autoAlpha: 0.7 })\n .to('#c2', 0.5, {\n scale: 0.2,\n x: '-=5',\n transformOrigin: '50% 50%'\n })\n .to('#c2', 0.5, { scale: 1, x: '+=5', transformOrigin: '50% 50%' })\n\n //split loading text\n }\n\n render() {\n return (\n
\n \n \n \n \n
\n )\n }\n}\n\nexport default BubbleLoading\n","// @flow\nimport React from 'react'\nimport {StyledLoader /*StyledSpinner*/} from './styles'\n// import { compose, lifecycle, defaultProps } from 'recompose'\nimport {compose, defaultProps} from 'recompose'\nimport {withFooterData} from '../../../utils'\n\nimport BubbleLoading from './bubbleLoading'\n//import { Wave } from 'react-animated-text'\n\n// const foo = (str?: number): Object => {\n// if (str) {\n// return { str }\n// }\n// return { str: \"default string\" }\n// }\n\nconst enhance = compose(\n defaultProps({\n backgroundColor: 'transparent',\n color: '#4c4c4b',\n size: '30px',\n thickness: '3px',\n position: 'absolute',\n paddingAround: '0px',\n fixedFooter: true\n }),\n withFooterData\n)\n\ntype Props = {\n backgroundColor?: string,\n center?: boolean,\n color?: string,\n marginBottom?: string,\n marginTop?: string,\n message?: string,\n size?: string,\n thickness?: string,\n position?: string,\n paddingAround?: string,\n fixedFooter?: boolean,\n containerHeight?: string\n}\n\nconst Loading = enhance(\n ({\n backgroundColor,\n center,\n color,\n marginBottom,\n marginTop,\n message,\n size,\n thickness,\n position,\n paddingAround,\n fixedFooter,\n containerHeight,\n smallText,\n }: Props) => {\n return (\n \n \n \n {message}\n
\n .\n .\n .\n .\n
\n \n {smallText && (\n
\n {smallText}\n
\n )}\n \n )\n }\n)\n\n// Loading.defaultProps = {\n// backgroundColor: \"transparent\",\n// color: \"#4c4c4b\",\n// size: \"30px\",\n// thickness: \"3px\",\n// position: \"absolute\",\n// paddingAround: \"0px\"\n// }\n\nexport default Loading\n","import axios from 'axios'\nimport { find } from 'lodash'\n\nclass HelpTooltipApi {\n static getMCBHelpData = node => {\n return axios\n .get(`https://mcb-demo-portal.firebaseio.com/seedData/help/.json`)\n .then(response => {\n return response.data\n })\n .then(data => {\n return data\n })\n .catch(error => {\n throw error\n })\n }\n // now redundant\n static findMCBHelpData = (tree, branch, fallback = '') => {\n if (!Object.keys(tree).length) return ''\n const tip = find(tree, branch)\n return !tip ? '' : tip[branch] || ''\n }\n}\n\nexport default HelpTooltipApi\n\n// new function to return from localStorage (rather than on the fly)\n// TODO: could probable go into the store i suppose\nexport const helpTip = (branch, fallback = '') => {\n const tree = JSON.parse(localStorage.getItem('help'))\n if (!tree || !Object.keys(tree).length) return ''\n const tip = find(tree, branch)\n return !tip ? '' : tip[branch] || ''\n}\n","import styled, { css } from 'styled-components'\nimport { colorFromProp } from '../../styles/styled-components/helpers'\n\nexport const IconWrapper = styled.span`\n display: inline-block;\n position: relative;\n width: ${props => props.size};\n height: ${props => props.size};\n margin-right: ${props => props.marginRight};\n margin-left: ${props => props.marginLeft};\n vertical-align: ${props => props.verticalAlign};\n color: inherit;\n\n svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n ${props =>\n props.color &&\n css`\n * {\n ${props.colorMode\n ? css`\n ${props.colorMode}: ${colorFromProp('color')(\n props\n )};\n `\n : css`\n fill: ${colorFromProp('color')(props)};\n stroke: ${colorFromProp('color')(props)};\n `} &[fill='none'] {\n fill: none;\n }\n\n &[stroke='none'] {\n stroke: none;\n }\n }\n `};\n }\n`\n","// @flow\n\nimport React from 'react'\nimport SVGInline from 'react-svg-inline'\n\nimport { IconWrapper } from './styles'\n\nimport * as svgs from './assets'\n\ntype Props = {\n color?: string,\n colorMode?: string,\n marginLeft?: string | number,\n marginRight?: string | number,\n size?: string,\n svg: string,\n verticalAlign?: string\n}\n\nconst Icon = ({ svg, ...props }: Props) => (\n \n \n \n)\n\nIcon.defaultProps = {\n marginLeft: 0,\n marginRight: 0,\n verticalAlign: 'top'\n}\n\n// Export all icons in a single object and then use an icon like so: \nconst allIcons = {}\n\nObject.keys(svgs).forEach(svg => {\n allIcons[svg] = props => \n allIcons[svg].displayName = `Icon.${svg}`\n})\n\nallIcons.customSVG = (props: Props) => (\n \n \n \n)\n\nallIcons.customSVG.displayName = `Icon.customSVG`\n\nexport default allIcons\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @desc Reducers for the CanonHub API\n *\n */\nimport * as actionTypes from '../actions/actionTypes.js'\nimport {ACCOUNT_INFO, MEMBER_INFO} from '../../auth/constants'\n\nconst initialState = {\n account: {\n lastFetch: 0,\n loading: false\n },\n accountList: {\n lastFetch: 0,\n loading: false\n },\n accountDetails: {\n lastFetch: 0,\n loading: false\n },\n accountAccess: {\n lastFetch: 0,\n loading: false\n },\n\n memberInfo: {\n lastFetch: 0,\n loading: false\n },\n selectedAccount: '',\n\n tech: {\n lastFetch: 0,\n loading: false\n }\n}\n\nconst canonHub = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_ACCOUNTS:\n\n if (action.data?.data?.Data) {\n const tempAccountInfo = JSON.stringify(action.data.data.Data)\n sessionStorage.setItem(ACCOUNT_INFO, tempAccountInfo)\n }\n return {\n ...state,\n account: action.data\n }\n\n case actionTypes.CLEAR_ACCOUNTS:\n return {\n ...state,\n account: {lastFetch: 0}\n }\n\n case actionTypes.STORE_SELECTED_ACCOUNT:\n return {\n ...state,\n storedAccountNumber: action.data\n }\n\n case actionTypes.UPDATE_HEADER_ACCOUNT_LIST_REQUEST:\n return {\n ...state,\n accountList: action.data\n }\n case actionTypes.UPDATE_HEADER_ACCOUNT_LIST_SUCCESS:\n return {\n ...state,\n accountList: action.data\n }\n case actionTypes.UPDATE_HEADER_ACCOUNT_LIST_FAILURE:\n return {\n ...state,\n loading: false,\n error: action.error,\n lastError: Date.now()\n }\n case actionTypes.UPDATE_ACCOUNTS_DETAILS:\n return {\n ...state,\n accountDetails: action.data,\n }\n case actionTypes.UPDATE_ACCOUNTS_ACCESS:\n return {\n ...state,\n accountAccess: action.data,\n }\n\n case actionTypes.UPDATE_SELECTED_SERVICEORDER:\n return {\n ...state,\n deviceServiceOrders: action.data\n }\n\n case actionTypes.UPDATE_MEMBER_INFO:\n const tempMemberInfo = JSON.stringify(action.data)\n //todo removesession storage\n sessionStorage.setItem(MEMBER_INFO, tempMemberInfo)\n return {\n ...state,\n memberInfo: action.data\n }\n\n case actionTypes.ABORT_FETCH_HUB:\n return state\n default: {\n return state\n }\n }\n}\n\nexport default canonHub\n","import * as actionTypes from '../actions/actionTypes.js'\n// import { updateObj } from '../utility.js';\n\nconst initialState = {\n auth: '',\n isAuthenticating: false\n}\n\nconst auth = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.IS_AUTHENTICATING:\n return {\n ...state,\n isAuthenticating: action.flag\n }\n case actionTypes.UPDATE_AUTH:\n // console.log('[redux/reducers/auth.js] UPDATE_AUTH', action)\n // console.trace()\n return {\n ...state,\n auth: action.auth\n }\n default: {\n // console.log('[redux/reducers/auth.js]', state)\n return state\n }\n }\n}\n\nexport default auth\n","import * as actionTypes from '../actions/actionTypes.js'\n\nconst initialState = {\n selectedAccount: '',\n selectedDevice: '',\n selectedServiceOrder: '',\n header: {\n links: '',\n permissions: []\n }\n}\n\nconst sel = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_SELECTED_ACCOUNT:\n // console.log('[redux/reducers/account.js]', action)\n return {\n ...state,\n selectedAccount: action.selectedAccount\n }\n case actionTypes.UPDATE_SELECTED_DEVICE:\n // console.log('[redux/reducers/account.js]', action)\n return {\n ...state,\n selectedDevice: action.selectedDevice\n }\n case actionTypes.UPDATE_SELECTED_SERVICEORDER:\n // console.log('[redux/reducers/account.js]', action)\n return {\n ...state,\n selectedServiceOrder: action.selectedServiceOrder\n }\n\n default: {\n // console.log('[redux/reducers/auth.js]', state)\n return state\n }\n }\n}\n\nexport default sel\n","import * as actionTypes from '../actions/actionTypes.js'\n\nconst initialState = {\n searchOptions: {},\n pagingSettings: {}\n}\n\nconst sel = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_SEARCH_OPTIONS:\n return {\n ...state,\n searchOptions: action.searchOptions\n }\n case actionTypes.UPDATE_PAGING_SETTINGS:\n return {\n ...state,\n pagingSettings: action.pagingSettings\n }\n default: {\n return state\n }\n }\n}\n\nexport default sel\n","import {\n RRP_ADD_PERMISSION,\n RRP_REMOVE_PERMISSION,\n RRP_CLEAR\n} from 'utils/acl-permissions/constants'\n\nimport { PERMISSONS } from 'auth/constants'\n\nconst initialState = JSON.parse(localStorage.getItem(PERMISSONS)) || []\n\nconst aclPermissions = (state = initialState, action = {}) => {\n switch (action.type) {\n case RRP_ADD_PERMISSION:\n return [...state, ...action.roles]\n case RRP_REMOVE_PERMISSION:\n return state.filter(role => role !== action.role)\n case RRP_CLEAR:\n return []\n default:\n return state\n }\n}\n\nexport default aclPermissions\n","import * as actionTypes from '../actions/actionTypes.js'\n\nconst initialState = {\n acls: []\n}\n\nconst metadata = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_ACL:\n return [...action.data]\n default: {\n return state\n }\n }\n}\n\nexport default metadata\n","import * as actionTypes from '../actions/actionTypes.js'\n\nconst initialState = {\n metadata: {}\n}\n\nconst metadata = (state = initialState, action) => {\n switch (action.type) {\n case actionTypes.UPDATE_METADATA:\n return {\n ...action.data\n }\n default: {\n return state\n }\n }\n}\n\nexport default metadata\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @desc Combine reducers\n * @repo ssh://git@10.150.20.213:7999/pp/columbus-front-end.git\n *\n */\n\n// import { combineReducers } from 'redux'\nimport canonhub from './canonhub.js'\nimport auth from './auth.js'\nimport account from './account.js'\nimport search from './search.js'\nimport permissions from './acl-permissions'\nimport acl from './acl'\nimport metadata from './metadata'\nimport dsf from './dsf-reducer'\n\nexport default {\n account,\n auth,\n canonhub,\n search,\n permissions,\n acl,\n metadata,\n dsf\n}\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @repo\n * @desc Default setup of the store (redux)\n *\n */\n\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\nimport { applyMiddleware, compose } from 'redux'\nimport thunk from 'redux-thunk'\nimport reducers from './reducers/index.js'\nimport { persistStore } from 'redux-persist'\nimport StoreManager from './store-manager'\n\n// -------------------------------------\n// Local constants: yes not really necesssary\n// -------------------------------------\nconst composeEnhancers =\n process.env.NODE_ENV !== 'production' &&\n window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\n ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({\n // SP - should not be fired more than once after hot reloading - Was resetting the whole app state to its initial state\n // Prevent recomputing reducers for `replaceReducer`\n shouldHotReload: false\n })\n : compose\n\nStoreManager.registerReducers(reducers)\nconst store = StoreManager.createStore(composeEnhancers(applyMiddleware(thunk)))\nconst persistor = persistStore(store)\n\nexport { store, persistor }\n","var urljoin = require('url-join')\nvar qs = require('qs')\n\nvar RequestBuilder = require('../helper/request-builder')\nvar objectHelper = require('../helper/object')\nvar assert = require('../helper/assert')\nvar ssodata = require('../helper/ssodata')\nvar windowHelper = require('../helper/window')\nvar responseHandler = require('../helper/response-handler')\nvar parametersWhitelist = require('../helper/parameters-whitelist')\nvar Warn = require('../helper/warn')\n\nvar PasswordlessAuthentication = require('./passwordless-authentication')\nvar DBConnection = require('./db-connection')\n\n/**\n * Creates a new Auth0 Authentication API client\n * @constructor\n * @param {Object} options\n * @param {String} options.domain your Auth0 domain\n * @param {String} options.clientID the Client ID found on your Application settings page\n * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @see {@link https://auth0.com/docs/api/authentication}\n */\nfunction Authentication(auth0, options) {\n // If we have two arguments, the first one is a WebAuth instance, so we assign that\n // if not, it's an options object and then we should use that as options instead\n // this is here because we don't want to break people coming from v8\n if (arguments.length === 2) {\n this.auth0 = auth0\n } else {\n options = auth0\n }\n\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n domain: { type: 'string', message: 'domain option is required' },\n clientID: {\n type: 'string',\n message: 'clientID option is required'\n },\n responseType: {\n optional: true,\n type: 'string',\n message: 'responseType is not valid'\n },\n responseMode: {\n optional: true,\n type: 'string',\n message: 'responseMode is not valid'\n },\n redirectUri: {\n optional: true,\n type: 'string',\n message: 'redirectUri is not valid'\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope is not valid'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience is not valid'\n },\n _disableDeprecationWarnings: {\n optional: true,\n type: 'boolean',\n message: '_disableDeprecationWarnings option is not valid'\n },\n _sendTelemetry: {\n optional: true,\n type: 'boolean',\n message: '_sendTelemetry option is not valid'\n },\n _telemetryInfo: {\n optional: true,\n type: 'object',\n message: '_telemetryInfo option is not valid'\n }\n }\n )\n /* eslint-enable */\n\n this.baseOptions = options\n this.baseOptions._sendTelemetry =\n this.baseOptions._sendTelemetry === false\n ? this.baseOptions._sendTelemetry\n : true\n\n this.baseOptions.rootUrl = 'https://' + this.baseOptions.domain\n\n this.request = new RequestBuilder(this.baseOptions)\n\n this.passwordless = new PasswordlessAuthentication(\n this.request,\n this.baseOptions\n )\n this.dbConnection = new DBConnection(this.request, this.baseOptions)\n\n this.warn = new Warn({\n disableWarnings: !!options._disableDeprecationWarnings\n })\n}\n\n/**\n * Builds and returns the `/authorize` url in order to initialize a new authN/authZ transaction\n *\n * @method buildAuthorizeUrl\n * @param {Object} options\n * @param {String} [options.domain] your Auth0 domain\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} options.redirectUri url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} options.responseType type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state}\n * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @see {@link https://auth0.com/docs/api/authentication#authorize-client}\n * @see {@link https://auth0.com/docs/api/authentication#social}\n */\nAuthentication.prototype.buildAuthorizeUrl = function(options) {\n var params\n var qString\n\n assert.check(options, {\n type: 'object',\n message: 'options parameter is not valid'\n })\n\n params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'responseMode',\n 'redirectUri',\n 'scope',\n 'audience'\n ])\n .with(options)\n\n /* eslint-disable */\n assert.check(\n params,\n { type: 'object', message: 'options parameter is not valid' },\n {\n clientID: {\n type: 'string',\n message: 'clientID option is required'\n },\n redirectUri: {\n optional: true,\n type: 'string',\n message: 'redirectUri option is required'\n },\n responseType: {\n type: 'string',\n message: 'responseType option is required'\n },\n nonce: {\n type: 'string',\n message: 'nonce option is required',\n condition: function(o) {\n return (\n o.responseType.indexOf('code') === -1 &&\n o.responseType.indexOf('id_token') !== -1\n )\n }\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope option is required'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience option is required'\n }\n }\n )\n /* eslint-enable */\n\n // eslint-disable-next-line\n if (this.baseOptions._sendTelemetry) {\n params.auth0Client = this.request.getTelemetryData()\n }\n\n if (params.connection_scope && assert.isArray(params.connection_scope)) {\n params.connection_scope = params.connection_scope.join(',')\n }\n\n params = objectHelper.blacklist(params, [\n 'username',\n 'popupOptions',\n 'domain',\n 'tenant',\n 'timeout'\n ])\n params = objectHelper.toSnakeCase(params, ['auth0Client'])\n params = parametersWhitelist.oauthAuthorizeParams(this.warn, params)\n\n qString = qs.stringify(params)\n\n return urljoin(this.baseOptions.rootUrl, 'authorize', '?' + qString)\n}\n\n/**\n * Builds and returns the Logout url in order to initialize a new authN/authZ transaction\n *\n * If you want to navigate the user to a specific URL after the logout, set that URL at the returnTo parameter. The URL should be included in any the appropriate Allowed Logout URLs list:\n *\n * - If the client_id parameter is included, the returnTo URL must be listed in the Allowed Logout URLs set at the Auth0 Application level (see Setting Allowed Logout URLs at the App Level).\n * - If the client_id parameter is NOT included, the returnTo URL must be listed in the Allowed Logout URLs set at the account level (see Setting Allowed Logout URLs at the Account Level).\n * @method buildLogoutUrl\n * @param {Object} options\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} [options.returnTo] URL to be redirected after the logout\n * @param {Boolean} [options.federated] tells Auth0 if it should logout the user also from the IdP.\n * @see {@link https://auth0.com/docs/api/authentication#logout}\n */\nAuthentication.prototype.buildLogoutUrl = function(options) {\n var params\n var qString\n\n assert.check(options, {\n optional: true,\n type: 'object',\n message: 'options parameter is not valid'\n })\n\n params = objectHelper\n .merge(this.baseOptions, ['clientID'])\n .with(options || {})\n\n // eslint-disable-next-line\n if (this.baseOptions._sendTelemetry) {\n params.auth0Client = this.request.getTelemetryData()\n }\n\n params = objectHelper.toSnakeCase(params, ['auth0Client', 'returnTo'])\n\n qString = qs.stringify(objectHelper.blacklist(params, ['federated']))\n if (\n options &&\n options.federated !== undefined &&\n options.federated !== false &&\n options.federated !== 'false'\n ) {\n qString += '&federated'\n }\n\n return urljoin(this.baseOptions.rootUrl, 'v2', 'logout', '?' + qString)\n}\n\n/**\n * @callback authorizeCallback\n * @param {Error} [err] error returned by Auth0 with the reason of the Auth failure\n * @param {Object} [result] result of the Auth request\n * @param {String} [result.accessToken] token that allows access to the specified resource server (identified by the audience parameter or by default Auth0's /userinfo endpoint)\n * @param {Number} [result.expiresIn] number of seconds until the access token expires\n * @param {String} [result.idToken] token that identifies the user\n * @param {String} [result.refreshToken] token that can be used to get new access tokens from Auth0. Note that not all Auth0 Applications can request them or the resource server might not allow them.\n */\n\n/**\n * @callback tokenCallback\n * @param {Error} [err] error returned by Auth0 with the reason of the Auth failure\n * @param {Object} [result] result of the Auth request\n * @param {String} result.accessToken token that allows access to the specified resource server (identified by the audience parameter or by default Auth0's /userinfo endpoint)\n * @param {Number} result.expiresIn number of seconds until the access token expires\n * @param {String} [result.idToken] token that identifies the user\n * @param {String} [result.refreshToken] token that can be used to get new access tokens from Auth0. Note that not all Auth0 Applications can request them or the resource server might not allow them.\n */\n\n/**\n * Makes a call to the `oauth/token` endpoint with `password` grant type to login to the default directory.\n *\n * @method loginWithDefaultDirectory\n * @param {Object} options\n * @param {String} options.username email or username of the user that will perform Auth\n * @param {String} options.password the password of the user that will perform Auth\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {tokenCallback} cb function called with the result of the request\n * @see Requires [`password` grant]{@link https://auth0.com/docs/api-auth/grant/password}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.\n */\nAuthentication.prototype.loginWithDefaultDirectory = function(options, cb) {\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n username: {\n type: 'string',\n message: 'username option is required'\n },\n password: {\n type: 'string',\n message: 'password option is required'\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope option is required'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience option is required'\n }\n }\n )\n\n options.grantType = 'password'\n\n return this.oauthToken(options, cb)\n}\n\n/**\n * Makes a call to the `oauth/token` endpoint with `password-realm` grant type\n *\n * @method login\n * @param {Object} options\n * @param {String} options.username email or username of the user that will perform Auth\n * @param {String} options.password the password of the user that will perform Auth\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {Object} options.realm the HRD domain or the connection name where the user belongs to. e.g. `Username-Password-Authentication`\n * @param {tokenCallback} cb function called with the result of the request\n * @see Requires [`http://auth0.com/oauth/grant-type/password-realm` grant]{@link https://auth0.com/docs/api-auth/grant/password#realm-support}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.\n */\nAuthentication.prototype.login = function(options, cb) {\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n username: {\n type: 'string',\n message: 'username option is required'\n },\n password: {\n type: 'string',\n message: 'password option is required'\n },\n realm: { type: 'string', message: 'realm option is required' },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope option is required'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience option is required'\n }\n }\n )\n\n options.grantType = 'http://auth0.com/oauth/grant-type/password-realm'\n\n return this.oauthToken(options, cb)\n}\n\n/**\n * Makes a call to the `oauth/token` endpoint\n *\n * @method oauthToken\n * @private\n */\nAuthentication.prototype.oauthToken = function(options, cb) {\n var url\n var body\n\n assert.check(options, {\n type: 'object',\n message: 'options parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'oauth', 'token')\n\n body = objectHelper\n .merge(this.baseOptions, ['clientID', 'scope', 'audience'])\n .with(options)\n\n assert.check(\n body,\n { type: 'object', message: 'options parameter is not valid' },\n {\n clientID: {\n type: 'string',\n message: 'clientID option is required'\n },\n grantType: {\n type: 'string',\n message: 'grantType option is required'\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope option is required'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience option is required'\n }\n }\n )\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n body = parametersWhitelist.oauthTokenParams(this.warn, body)\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\n/**\n * Performs authentication calling `/oauth/ro` endpoint with username\n * and password for a given connection name.\n *\n * This method is not compatible with API Auth so if you need to fetch API tokens with audience\n * you should use {@link login} or {@link loginWithDefaultDirectory}.\n *\n * @method loginWithResourceOwner\n * @param {Object} options\n * @param {String} options.username email or username of the user that will perform Auth\n * @param {String} options.password the password of the user that will perform Auth\n * @param {Object} options.connection the connection name where the user belongs to. e.g. `Username-Password-Authentication`\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.device] name of the device/browser where the Auth was requested\n * @param {tokenCallback} cb function called with the result of the request\n */\nAuthentication.prototype.loginWithResourceOwner = function(options, cb) {\n var url\n var body\n\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n username: {\n type: 'string',\n message: 'username option is required'\n },\n password: {\n type: 'string',\n message: 'password option is required'\n },\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope option is required'\n }\n }\n )\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'oauth', 'ro')\n\n body = objectHelper\n .merge(this.baseOptions, ['clientID', 'scope'])\n .with(options, [\n 'username',\n 'password',\n 'scope',\n 'connection',\n 'device'\n ])\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n\n body.grant_type = body.grant_type || 'password'\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\n/**\n * Uses {@link checkSession} and localStorage to return data from the last successful authentication request.\n *\n * @method getSSOData\n * @param {Boolean} withActiveDirectories this parameter is not used anymore. It's here to be backward compatible\n * @param {Function} cb\n */\nAuthentication.prototype.getSSOData = function(withActiveDirectories, cb) {\n /* istanbul ignore if */\n if (!this.auth0) {\n // we can't import this in the constructor because it'd be a ciclic dependency\n var WebAuth = require('../web-auth/index') // eslint-disable-line\n this.auth0 = new WebAuth(this.baseOptions)\n }\n var isHostedLoginPage =\n windowHelper.getWindow().location.host === this.baseOptions.domain\n if (isHostedLoginPage) {\n return this.auth0._universalLogin.getSSOData(withActiveDirectories, cb)\n }\n if (typeof withActiveDirectories === 'function') {\n cb = withActiveDirectories\n }\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n var clientId = this.baseOptions.clientID\n var ssodataInformation = ssodata.get() || {}\n\n this.auth0.checkSession(\n {\n responseType: 'token id_token',\n scope: 'openid profile email',\n connection: ssodataInformation.lastUsedConnection,\n timeout: 5000\n },\n function(err, result) {\n if (err) {\n if (err.error === 'login_required') {\n return cb(null, { sso: false })\n }\n if (err.error === 'consent_required') {\n err.error_description =\n 'Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`.'\n }\n return cb(err, { sso: false })\n }\n if (\n ssodataInformation.lastUsedSub &&\n ssodataInformation.lastUsedSub !== result.idTokenPayload.sub\n ) {\n return cb(err, { sso: false })\n }\n return cb(null, {\n lastUsedConnection: {\n name: ssodataInformation.lastUsedConnection\n },\n lastUsedUserID: result.idTokenPayload.sub,\n lastUsedUsername:\n result.idTokenPayload.email || result.idTokenPayload.name,\n lastUsedClientID: clientId,\n sessionClients: [clientId],\n sso: true\n })\n }\n )\n}\n\n/**\n * @callback userInfoCallback\n * @param {Error} [err] error returned by Auth0\n * @param {Object} [userInfo] user information\n */\n\n/**\n * Makes a call to the `/userinfo` endpoint and returns the user profile\n *\n * @method userInfo\n * @param {String} accessToken token issued to a user after Auth\n * @param {userInfoCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#get-user-info}\n */\nAuthentication.prototype.userInfo = function(accessToken, cb) {\n var url\n\n assert.check(accessToken, {\n type: 'string',\n message: 'accessToken parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'userinfo')\n\n return this.request\n .get(url)\n .set('Authorization', 'Bearer ' + accessToken)\n .end(responseHandler(cb, { ignoreCasing: true }))\n}\n\n/**\n * @callback delegationCallback\n * @param {Error} [err] error returned by Auth0 with the reason why the delegation failed\n * @param {Object} [result] result of the delegation request. The payload depends on what ai type was used\n */\n\n/**\n * Makes a call to the `/delegation` endpoint with either an `id_token` or `refresh_token`\n *\n * @method delegation\n * @param {Object} options\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} options.grantType grant type used for delegation. The only valid value is `urn:ietf:params:oauth:grant-type:jwt-bearer`\n * @param {String} [options.idToken] valid token of the user issued after Auth. If no `refresh_token` is provided this parameter is required\n * @param {String} [options.refreshToken] valid refresh token of the user issued after Auth. If no `id_token` is provided this parameter is required\n * @param {String} [options.target] the target ClientID of the delegation\n * @param {String} [options.scope] either `openid` or `openid profile email`\n * @param {String} [options.apiType] the api to be called\n * @param {delegationCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#delegation}\n * @see Requires [http://auth0.com/oauth/grant-type/password-realm]{@link https://auth0.com/docs/api-auth/grant/password#realm-support}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.\n */\nAuthentication.prototype.delegation = function(options, cb) {\n var url\n var body\n\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n grant_type: {\n type: 'string',\n message: 'grant_type option is required'\n }\n }\n )\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'delegation')\n\n body = objectHelper.merge(this.baseOptions, ['clientID']).with(options)\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\n/**\n * Fetches the user country based on the ip.\n *\n * @method getUserCountry\n * @private\n * @param {Function} cb\n */\nAuthentication.prototype.getUserCountry = function(cb) {\n var url\n\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'user', 'geoloc', 'country')\n\n return this.request.get(url).end(responseHandler(cb))\n}\n\nmodule.exports = Authentication\n","import axios from 'axios'\nimport config from 'config.json'\n\nclass TermsAndConditionsApi {\n static fetchAcceptTermsAndConditions = memberId => {\n let baseUrl = `${config.api}members/${memberId}/terms?terms=MCB`\n if (window.DEBUG) console.log(baseUrl)\n if (window.DEBUG) console.time(baseUrl)\n return axios\n .get(baseUrl)\n .then(response => response.data)\n .then(data => {\n if (window.DEBUG) console.timeEnd(baseUrl)\n return data\n })\n .catch(error => {\n if (window.DEBUG) console.timeEnd(baseUrl)\n throw error\n })\n }\n static putAcceptTermsAndConditions = memberId => {\n let baseUrl = `${config.api}members/${memberId}/terms`\n if (window.DEBUG) console.log(baseUrl)\n if (window.DEBUG) console.time(baseUrl)\n return axios\n .put(baseUrl, { TermsName: 'MCB' })\n .then(response => response.data)\n .then(data => {\n if (window.DEBUG) console.timeEnd(baseUrl)\n return data\n })\n .catch(error => {\n if (window.DEBUG) console.timeEnd(baseUrl)\n throw error\n })\n }\n}\n\nexport default TermsAndConditionsApi\n","import React from 'react'\n\nconst TermsConditionsContent = () => (\n \n
\n {/*
Terms of Use
*/}\n
\n The use of MyCanon Business is governed by the terms of use\n available{' '}\n \n here\n . Please accept to continue\n
\n
\n
\n)\n\nexport default TermsConditionsContent\n","import React, { Component } from 'react'\nimport TermsAndConditionsApi from './terms-conditions-api'\nimport Loading from 'components/common/loading'\nimport Modal from 'components/common/modal'\nimport Button from 'components/common/buttons/link-button-icon.jsx'\nimport TermsConditionsContent from './terms-conditions-content'\nimport history from 'history/history.js'\nimport './terms-conditions.css'\n\nconst TermsAndConditions = WrappedComponent => {\n return class extends Component {\n constructor() {\n super()\n this.state = {\n acceptTAndCFlag: true,\n loadingTAndCFlag: false\n }\n }\n\n componentDidMount() {\n const memberId = localStorage.getItem('member_id')\n const acceptTAndCFlagStoreValue = localStorage.getItem(\n `${memberId}-T&C`\n )\n const acceptTAndCFlag = acceptTAndCFlagStoreValue\n ? acceptTAndCFlagStoreValue === 'true'\n : false\n if (!acceptTAndCFlag) {\n this.setState({\n loadingTAndCFlag: true\n })\n TermsAndConditionsApi.fetchAcceptTermsAndConditions(memberId)\n .then(data => {\n if (\n data.Status === 'OK' &&\n data.Payload &&\n data.Payload.Terms &&\n data.Payload.Terms.length > 0\n ) {\n localStorage.setItem(`${memberId}-T&C`, 'true')\n this.setState({\n loadingTAndCFlag: false,\n acceptTAndCFlag: true\n })\n } else {\n localStorage.setItem(`${memberId}-T&C`, 'false')\n this.setState({\n loadingTAndCFlag: false,\n acceptTAndCFlag: false\n })\n }\n })\n .catch(error =>\n this.setState({\n loadingTAndCFlag: false,\n acceptTAndCFlag: false\n })\n )\n } else {\n this.setState({\n loadingTAndCFlag: false,\n acceptTAndCFlag: true\n })\n }\n }\n\n acceptTermsAndConditions = () => {\n const memberId = localStorage.getItem('member_id')\n localStorage.setItem(`${memberId}-T&C`, 'true')\n this.setState({\n loadingTAndCFlag: false,\n acceptTAndCFlag: true\n })\n TermsAndConditionsApi.putAcceptTermsAndConditions(memberId)\n }\n\n render() {\n const { acceptTAndCFlag, loadingTAndCFlag } = this.state\n\n if (loadingTAndCFlag)\n return (\n
\n \n
\n )\n else if (!acceptTAndCFlag)\n return (\n
\n {\n this.setState({\n acceptTAndCFlag: false\n })\n history.push('/')\n }}\n width=\"35rem\"\n hideHeader={false}\n type=\"transactional\"\n renderHeader={() => (\n
Terms of Use
\n )}\n renderFooter={() => (\n
\n \n {\n this.acceptTermsAndConditions()\n }}\n btnText=\"Accept\"\n />\n
\n )}\n >\n
\n \n
\n \n
\n \n
\n
\n )\n\n return \n }\n }\n}\n\nexport default TermsAndConditions\n","var storage = require('./storage')\n\nmodule.exports = {\n set: function(connection, sub) {\n var ssodata = {\n lastUsedConnection: connection,\n lastUsedSub: sub\n }\n storage.setItem('auth0.ssodata', JSON.stringify(ssodata))\n },\n get: function() {\n var ssodata = storage.getItem('auth0.ssodata')\n if (!ssodata) {\n return\n }\n return JSON.parse(ssodata)\n }\n}\n","function buildResponse(error, description) {\n return {\n error: error,\n errorDescription: description\n }\n}\n\nfunction invalidToken(description) {\n return buildResponse('invalid_token', description)\n}\n\nmodule.exports = {\n buildResponse: buildResponse,\n invalidToken: invalidToken\n}\n","var IdTokenVerifier = require('idtoken-verifier')\n\nvar assert = require('../helper/assert')\nvar error = require('../helper/error')\nvar qs = require('qs')\nvar PluginHandler = require('../helper/plugins')\nvar windowHelper = require('../helper/window')\nvar objectHelper = require('../helper/object')\nvar ssodata = require('../helper/ssodata')\nvar TransactionManager = require('./transaction-manager')\nvar Authentication = require('../authentication')\nvar Redirect = require('./redirect')\nvar Popup = require('./popup')\nvar SilentAuthenticationHandler = require('./silent-authentication-handler')\nvar CrossOriginAuthentication = require('./cross-origin-authentication')\nvar WebMessageHandler = require('./web-message-handler')\nvar HostedPages = require('./hosted-pages')\n\n/**\n * Handles all the browser's AuthN/AuthZ flows\n * @constructor\n * @param {Object} options\n * @param {String} options.domain your Auth0 domain\n * @param {String} options.clientID the Client ID found on your Application settings page\n * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {Array} [options.plugins]\n * @param {Number} [options._timesToRetryFailedRequests] Number of times to retry a failed request, according to {@link https://github.com/visionmedia/superagent/blob/master/lib/should-retry.js}\n * @see {@link https://auth0.com/docs/api/authentication}\n */\nfunction WebAuth(options) {\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n domain: { type: 'string', message: 'domain option is required' },\n clientID: {\n type: 'string',\n message: 'clientID option is required'\n },\n responseType: {\n optional: true,\n type: 'string',\n message: 'responseType is not valid'\n },\n responseMode: {\n optional: true,\n type: 'string',\n message: 'responseMode is not valid'\n },\n redirectUri: {\n optional: true,\n type: 'string',\n message: 'redirectUri is not valid'\n },\n scope: {\n optional: true,\n type: 'string',\n message: 'scope is not valid'\n },\n audience: {\n optional: true,\n type: 'string',\n message: 'audience is not valid'\n },\n popupOrigin: {\n optional: true,\n type: 'string',\n message: 'popupOrigin is not valid'\n },\n leeway: {\n optional: true,\n type: 'number',\n message: 'leeway is not valid'\n },\n plugins: {\n optional: true,\n type: 'array',\n message: 'plugins is not valid'\n },\n _disableDeprecationWarnings: {\n optional: true,\n type: 'boolean',\n message: '_disableDeprecationWarnings option is not valid'\n },\n _sendTelemetry: {\n optional: true,\n type: 'boolean',\n message: '_sendTelemetry option is not valid'\n },\n _telemetryInfo: {\n optional: true,\n type: 'object',\n message: '_telemetryInfo option is not valid'\n },\n _timesToRetryFailedRequests: {\n optional: true,\n type: 'number',\n message: '_timesToRetryFailedRequests option is not valid'\n }\n }\n )\n\n if (options.overrides) {\n assert.check(\n options.overrides,\n { type: 'object', message: 'overrides option is not valid' },\n {\n __tenant: {\n optional: true,\n type: 'string',\n message: '__tenant option is required'\n },\n __token_issuer: {\n optional: true,\n type: 'string',\n message: '__token_issuer option is required'\n },\n __jwks_uri: {\n optional: true,\n type: 'string',\n message: '__jwks_uri is required'\n }\n }\n )\n }\n /* eslint-enable */\n\n this.baseOptions = options\n this.baseOptions.plugins = new PluginHandler(\n this,\n this.baseOptions.plugins || []\n )\n\n this.baseOptions._sendTelemetry =\n this.baseOptions._sendTelemetry === false\n ? this.baseOptions._sendTelemetry\n : true\n\n this.baseOptions._timesToRetryFailedRequests = options._timesToRetryFailedRequests\n ? parseInt(options._timesToRetryFailedRequests, 0)\n : 0\n\n this.baseOptions.tenant =\n (this.baseOptions.overrides && this.baseOptions.overrides.__tenant) ||\n this.baseOptions.domain.split('.')[0]\n\n this.baseOptions.token_issuer =\n (this.baseOptions.overrides &&\n this.baseOptions.overrides.__token_issuer) ||\n 'https://' + this.baseOptions.domain + '/'\n\n this.baseOptions.jwksURI =\n this.baseOptions.overrides && this.baseOptions.overrides.__jwks_uri\n\n this.transactionManager = new TransactionManager(\n this.baseOptions.transaction\n )\n\n this.client = new Authentication(this.baseOptions)\n this.redirect = new Redirect(this, this.baseOptions)\n this.popup = new Popup(this, this.baseOptions)\n this.crossOriginAuthentication = new CrossOriginAuthentication(\n this,\n this.baseOptions\n )\n this.webMessageHandler = new WebMessageHandler(this)\n this._universalLogin = new HostedPages(this, this.baseOptions)\n}\n\n/**\n * Parse the url hash and extract the Auth response from a Auth flow started with {@link authorize}\n *\n * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed\n * by the `/.well-known/jwks.json` endpoint of your account.\n * Tokens signed with the HS256 algorithm cannot be properly validated.\n * Instead, a call to {@link userInfo} will be made with the parsed `access_token`.\n * If the {@link userInfo} call fails, the {@link userInfo} error will be passed to the callback.\n * Tokens signed with other algorithms will not be accepted.\n *\n * @method parseHash\n * @param {Object} options\n * @param {String} options.hash the url hash. If not provided it will extract from window.location.hash\n * @param {String} [options.state] value originally sent in `state` parameter to {@link authorize} to mitigate XSRF\n * @param {String} [options.nonce] value originally sent in `nonce` parameter to {@link authorize} to prevent replay attacks\n * @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `token`, `id_token`. For this specific method, we'll only use this value to check if the hash contains the tokens requested in the responseType.\n * @param {authorizeCallback} cb\n */\nWebAuth.prototype.parseHash = function(options, cb) {\n var parsedQs\n var err\n\n if (!cb && typeof options === 'function') {\n cb = options\n options = {}\n } else {\n options = options || {}\n }\n\n var _window = windowHelper.getWindow()\n\n var hashStr =\n options.hash === undefined ? _window.location.hash : options.hash\n hashStr = hashStr.replace(/^#?\\/?/, '')\n\n parsedQs = qs.parse(hashStr)\n\n if (parsedQs.hasOwnProperty('error')) {\n err = error.buildResponse(parsedQs.error, parsedQs.error_description)\n\n if (parsedQs.state) {\n err.state = parsedQs.state\n }\n\n return cb(err)\n }\n\n if (\n !parsedQs.hasOwnProperty('access_token') &&\n !parsedQs.hasOwnProperty('id_token') &&\n !parsedQs.hasOwnProperty('refresh_token')\n ) {\n return cb(null, null)\n }\n var responseTypes = (\n this.baseOptions.responseType ||\n options.responseType ||\n ''\n ).split(' ')\n if (\n responseTypes.length > 0 &&\n responseTypes.indexOf('token') !== -1 &&\n !parsedQs.hasOwnProperty('access_token')\n ) {\n return cb(\n error.buildResponse(\n 'invalid_hash',\n 'response_type contains `token`, but the parsed hash does not contain an `access_token` property'\n )\n )\n }\n if (\n responseTypes.length > 0 &&\n responseTypes.indexOf('id_token') !== -1 &&\n !parsedQs.hasOwnProperty('id_token')\n ) {\n return cb(\n error.buildResponse(\n 'invalid_hash',\n 'response_type contains `id_token`, but the parsed hash does not contain an `id_token` property'\n )\n )\n }\n return this.validateAuthenticationResponse(options, parsedQs, cb)\n}\n\n/**\n * Validates an Auth response from a Auth flow started with {@link authorize}\n *\n * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed\n * by the `/.well-known/jwks.json` endpoint of your account.\n * Tokens signed with the HS256 algorithm cannot be properly validated.\n * Instead, a call to {@link userInfo} will be made with the parsed `access_token`.\n * If the {@link userInfo} call fails, the {@link userInfo} error will be passed to the callback.\n * Tokens signed with other algorithms will not be accepted.\n *\n * @method validateAuthenticationResponse\n * @param {Object} options\n * @param {String} options.hash the url hash. If not provided it will extract from window.location.hash\n * @param {String} [options.state] value originally sent in `state` parameter to {@link authorize} to mitigate XSRF\n * @param {String} [options.nonce] value originally sent in `nonce` parameter to {@link authorize} to prevent replay attacks\n * @param {authorizeCallback} cb\n */\nWebAuth.prototype.validateAuthenticationResponse = function(\n options,\n parsedHash,\n cb\n) {\n var _this = this\n options.__enableIdPInitiatedLogin =\n options.__enableIdPInitiatedLogin || options.__enableImpersonation\n var state = parsedHash.state\n var transaction = this.transactionManager.getStoredTransaction(state)\n var transactionState =\n options.state || (transaction && transaction.state) || null\n\n var transactionStateMatchesState = transactionState === state\n var shouldBypassStateChecking =\n !state && !transactionState && options.__enableIdPInitiatedLogin\n\n if (!shouldBypassStateChecking && !transactionStateMatchesState) {\n return cb({\n error: 'invalid_token',\n errorDescription: '`state` does not match.'\n })\n }\n var transactionNonce =\n options.nonce || (transaction && transaction.nonce) || null\n\n var appState =\n options.state || (transaction && transaction.appState) || null\n\n var callback = function(err, payload) {\n if (err) {\n return cb(err)\n }\n if (transaction && transaction.lastUsedConnection) {\n var sub\n if (payload) {\n sub = payload.sub\n }\n ssodata.set(transaction.lastUsedConnection, sub)\n }\n return cb(null, buildParseHashResponse(parsedHash, appState, payload))\n }\n\n if (!parsedHash.id_token) {\n return callback(null, null)\n }\n return this.validateToken(parsedHash.id_token, transactionNonce, function(\n validationError,\n payload\n ) {\n if (!validationError) {\n if (!parsedHash.access_token) {\n return callback(null, payload)\n }\n // id_token's generated by non-oidc applications don't have at_hash\n if (!payload.at_hash) {\n return callback(null, payload)\n }\n // here we're absolutely sure that the id_token's alg is RS256\n // and that the id_token is valid, so we can check the access_token\n return new IdTokenVerifier().validateAccessToken(\n parsedHash.access_token,\n 'RS256',\n payload.at_hash,\n function(err) {\n if (err) {\n return callback(error.invalidToken(err.message))\n }\n return callback(null, payload)\n }\n )\n }\n if (validationError.error !== 'invalid_token') {\n return callback(validationError)\n }\n // if it's an invalid_token error, decode the token\n var decodedToken = new IdTokenVerifier().decode(parsedHash.id_token)\n // if the alg is not HS256, return the raw error\n // console.log(decodedToken.header)\n if (decodedToken.header.alg !== 'RS256') {\n return callback(validationError)\n }\n if (!parsedHash.access_token) {\n var noAccessTokenError = {\n error: 'invalid_token',\n description:\n 'The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token'\n }\n return callback(noAccessTokenError)\n }\n // if the alg is HS256, use the /userinfo endpoint to build the payload\n return _this.client.userInfo(parsedHash.access_token, function(\n errUserInfo,\n profile\n ) {\n // if the /userinfo request fails, use the validationError instead\n if (errUserInfo) {\n return callback(errUserInfo)\n }\n return callback(null, profile)\n })\n })\n}\n\nfunction buildParseHashResponse(qsParams, appState, token) {\n return {\n accessToken: qsParams.access_token || null,\n idToken: qsParams.id_token || null,\n idTokenPayload: token || null,\n appState: appState || null,\n refreshToken: qsParams.refresh_token || null,\n state: qsParams.state || null,\n expiresIn: qsParams.expires_in\n ? parseInt(qsParams.expires_in, 10)\n : null,\n tokenType: qsParams.token_type || null,\n scope: qsParams.scope || null\n }\n}\n\n/**\n * @callback validateTokenCallback\n * @param {Error} [err] error returned by while validating the token\n * @param {Object} [payload] claims stored in the token\n */\n\n/**\n * Decodes the a JWT and verifies its nonce value\n *\n * @method validateToken\n * @private\n * @param {String} token\n * @param {String} nonce\n * @param {validateTokenCallback} cb\n */\nWebAuth.prototype.validateToken = function(token, nonce, cb) {\n var verifier = new IdTokenVerifier({\n issuer: this.baseOptions.token_issuer,\n jwksURI: this.baseOptions.jwksURI,\n audience: this.baseOptions.clientID,\n leeway: this.baseOptions.leeway || 0,\n __disableExpirationCheck: this.baseOptions.__disableExpirationCheck\n })\n\n verifier.verify(token, nonce, function(err, payload) {\n if (err) {\n return cb(error.invalidToken(err.message))\n }\n\n cb(null, payload)\n })\n}\n\n/**\n * Executes a silent authentication transaction under the hood in order to fetch a new tokens for the current session.\n * This method requires that all Auth is performed with {@link authorize}\n * Watch out! If you're not using the hosted login page to do social logins, you have to use your own [social connection keys](https://manage.auth0.com/#/connections/social). If you use Auth0's dev keys, you'll always get `login_required` as an error when calling this method.\n *\n * @method renewAuth\n * @param {Object} options\n * @param {String} [options.domain] your Auth0 domain\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state}\n * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {String} [options.postMessageDataType] identifier data type to look for in postMessage event data, where events are initiated from silent callback urls, before accepting a message event is the event expected. A value of false means any postMessage event will trigger a callback.\n * @param {String} [options.postMessageOrigin] origin of redirectUri to expect postMessage response from. Defaults to the origin of the receiving window. Only used if usePostMessage is truthy.\n * @param {String} [options.timeout] value in milliseconds used to timeout when the `/authorize` call is failing as part of the silent authentication with postmessage enabled due to a configuration.\n * @param {Boolean} [options.usePostMessage] use postMessage to comunicate between the silent callback and the SPA. When false the SDK will attempt to parse the url hash should ignore the url hash and no extra behaviour is needed\n * @param {authorizeCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#authorize-client}\n */\nWebAuth.prototype.renewAuth = function(options, cb) {\n var handler\n var usePostMessage = !!options.usePostMessage\n var postMessageDataType = options.postMessageDataType || false\n var postMessageOrigin =\n options.postMessageOrigin || windowHelper.getWindow().origin\n var timeout = options.timeout\n var _this = this\n\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'redirectUri',\n 'responseType',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n\n params.responseType = params.responseType || 'token'\n params.responseMode = params.responseMode || 'fragment'\n params = this.transactionManager.process(params)\n\n assert.check(params, {\n type: 'object',\n message: 'options parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n params.prompt = 'none'\n\n params = objectHelper.blacklist(params, [\n 'usePostMessage',\n 'tenant',\n 'postMessageDataType',\n 'postMessageOrigin'\n ])\n\n handler = SilentAuthenticationHandler.create({\n authenticationUrl: this.client.buildAuthorizeUrl(params),\n postMessageDataType: postMessageDataType,\n postMessageOrigin: postMessageOrigin,\n timeout: timeout\n })\n\n handler.login(usePostMessage, function(err, hash) {\n if (typeof hash === 'object') {\n // hash was already parsed, so we just return it.\n // it's here to be backwards compatible and should be removed in the next major version.\n return cb(err, hash)\n }\n _this.parseHash({ hash: hash }, cb)\n })\n}\n\n/**\n * Renews an existing session on Auth0's servers using `response_mode=web_message`\n *\n * @method checkSession\n * @param {Object} options\n * @param {String} [options.domain] your Auth0 domain\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state}\n * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {String} [options.timeout] value in milliseconds used to timeout when the `/authorize` call is failing as part of the silent authentication with postmessage enabled due to a configuration.\n */\nWebAuth.prototype.checkSession = function(options, cb) {\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n\n if (params.responseType === 'code') {\n return cb({\n error: 'error',\n error_description: \"responseType can't be `code`\"\n })\n }\n\n if (!options.nonce) {\n params = this.transactionManager.process(params)\n }\n\n assert.check(params, {\n type: 'object',\n message: 'options parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n params = objectHelper.blacklist(params, [\n 'usePostMessage',\n 'tenant',\n 'postMessageDataType'\n ])\n this.webMessageHandler.run(params, cb)\n}\n\n/**\n * Request an email with instruction to change a user's password\n *\n * @method changePassword\n * @param {Object} options\n * @param {String} options.email address where the user will receive the change password email. It should match the user's email in Auth0\n * @param {String} options.connection name of the connection where the user was created\n * @param {changePasswordCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#change-password}\n */\nWebAuth.prototype.changePassword = function(options, cb) {\n return this.client.dbConnection.changePassword(options, cb)\n}\n\n/**\n * Starts a passwordless authentication transaction.\n *\n * @method passwordlessStart\n * @param {Object} options\n * @param {String} options.send what will be sent via email which could be `link` or `code`. For SMS `code` is the only one valud\n * @param {String} [options.phoneNumber] phone number where to send the `code`. This parameter is mutually exclusive with `email`\n * @param {String} [options.email] email where to send the `code` or `link`. This parameter is mutually exclusive with `phoneNumber`\n * @param {String} options.connection name of the passwordless connection\n * @param {Object} [options.authParams] additional Auth parameters when using `link`\n * @param {Function} cb\n * @see {@link https://auth0.com/docs/api/authentication#passwordless}\n */\nWebAuth.prototype.passwordlessStart = function(options, cb) {\n var authParams = objectHelper\n .merge(this.baseOptions, [\n 'responseType',\n 'responseMode',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options.authParams)\n\n options.authParams = this.transactionManager.process(authParams)\n return this.client.passwordless.start(options, cb)\n}\n\n/**\n * Creates a new user in a Auth0 Database connection\n *\n * @method signup\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {signUpCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#signup}\n */\nWebAuth.prototype.signup = function(options, cb) {\n return this.client.dbConnection.signup(options, cb)\n}\n\n/**\n * Redirects to the hosted login page (`/authorize`) in order to start a new authN/authZ transaction.\n * After that, you'll have to use the {@link parseHash} function at the specified `redirectUri`.\n *\n * @method authorize\n * @param {Object} options\n * @param {String} [options.domain] your Auth0 domain\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} options.redirectUri url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} options.responseType type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state}\n * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @see {@link https://auth0.com/docs/api/authentication#authorize-client}\n */\nWebAuth.prototype.authorize = function(options) {\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'responseMode',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n\n assert.check(\n params,\n { type: 'object', message: 'options parameter is not valid' },\n {\n responseType: {\n type: 'string',\n message: 'responseType option is required'\n }\n }\n )\n\n params = this.transactionManager.process(params)\n params.scope = params.scope || 'openid profile email'\n\n windowHelper.redirect(this.client.buildAuthorizeUrl(params))\n}\n\n/**\n * Signs up a new user, automatically logs the user in after the signup and returns the user token.\n * The login will be done using /oauth/token with password-realm grant type.\n *\n * @method signupAndAuthorize\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {tokenCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#signup}\n * @see {@link https://auth0.com/docs/api-auth/grant/password}\n */\nWebAuth.prototype.signupAndAuthorize = function(options, cb) {\n var _this = this\n\n return this.client.dbConnection.signup(\n objectHelper.blacklist(options, ['popupHandler']),\n function(err) {\n if (err) {\n return cb(err)\n }\n options.realm = options.connection\n if (!options.username) {\n options.username = options.email\n }\n _this.client.login(options, cb)\n }\n )\n}\n\n/**\n * @callback crossOriginLoginCallback\n * @param {Error} [err] Authentication error returned by Auth0 with the reason why the request failed\n */\n\n/**\n * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`.\n * Some browsers might not be able to successfully authenticate if 3rd party cookies are disabled in your browser. [See here for more information.]{@link https://auth0.com/docs/cross-origin-authentication}.\n * After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.\n *\n * @method login\n * @see Requires [`Implicit` grant]{@link https://auth0.com/docs/api-auth/grant/implicit}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.\n * @param {Object} options options used in the {@link authorize} call after the login_ticket is acquired\n * @param {String} [options.username] Username (mutually exclusive with email)\n * @param {String} [options.email] Email (mutually exclusive with username)\n * @param {String} options.password Password\n * @param {String} [options.realm] Realm used to authenticate the user, it can be a realm name or a database connection name\n * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`.\n */\nWebAuth.prototype.login = function(options, cb) {\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n params = this.transactionManager.process(params)\n\n var isHostedLoginPage =\n windowHelper.getWindow().location.host === this.baseOptions.domain\n if (isHostedLoginPage) {\n params.connection = params.realm\n delete params.realm\n this._universalLogin.login(params, cb)\n } else {\n this.crossOriginAuthentication.login(params, cb)\n }\n}\n\n/**\n * Logs in the user by verifying the verification code (OTP) using the cross origin authentication (/co/authenticate) flow. You can use either `phoneNumber` or `email` to identify the user.\n * This only works when 3rd party cookies are enabled in the browser. After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.\n *\n * @method login\n * @param {Object} options options used in the {@link authorize} call after the login_ticket is acquired\n * @param {String} [options.phoneNumber] Phone Number (mutually exclusive with email)\n * @param {String} [options.email] Email (mutually exclusive with username)\n * @param {String} options.verificationCode Verification Code (OTP)\n * @param {String} options.connection Passwordless connection to use. It can either be 'sms' or 'email'.\n * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`.\n */\nWebAuth.prototype.passwordlessLogin = function(options, cb) {\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n params = this.transactionManager.process(params)\n\n var isHostedLoginPage =\n windowHelper.getWindow().location.host === this.baseOptions.domain\n if (isHostedLoginPage) {\n this.passwordlessVerify(params, cb)\n } else {\n var crossOriginOptions = objectHelper.extend(\n {\n credentialType:\n 'http://auth0.com/oauth/grant-type/passwordless/otp',\n realm: params.connection,\n username: params.email || params.phoneNumber,\n otp: params.verificationCode\n },\n objectHelper.blacklist(params, [\n 'connection',\n 'email',\n 'phoneNumber',\n 'verificationCode'\n ])\n )\n this.crossOriginAuthentication.login(crossOriginOptions, cb)\n }\n}\n\n/**\n * Runs the callback code for the cross origin authentication call. This method is meant to be called by the cross origin authentication callback url.\n *\n * @method crossOriginAuthenticationCallback\n * @deprecated Use {@link crossOriginVerification} instead.\n */\nWebAuth.prototype.crossOriginAuthenticationCallback = function() {\n this.crossOriginVerification()\n}\n\n/**\n * Runs the callback code for the cross origin authentication call. This method is meant to be called by the cross origin authentication callback url.\n *\n * @method crossOriginVerification\n */\nWebAuth.prototype.crossOriginVerification = function() {\n this.crossOriginAuthentication.callback()\n}\n\n/**\n * Redirects to the auth0 logout endpoint\n *\n * If you want to navigate the user to a specific URL after the logout, set that URL at the returnTo parameter. The URL should be included in any the appropriate Allowed Logout URLs list:\n *\n * - If the client_id parameter is included, the returnTo URL must be listed in the Allowed Logout URLs set at the Auth0 Application level (see Setting Allowed Logout URLs at the App Level).\n * - If the client_id parameter is NOT included, the returnTo URL must be listed in the Allowed Logout URLs set at the account level (see Setting Allowed Logout URLs at the Account Level).\n *\n * @method logout\n * @param {Object} options\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} [options.returnTo] URL to be redirected after the logout\n * @param {Boolean} [options.federated] tells Auth0 if it should logout the user also from the IdP.\n * @see {@link https://auth0.com/docs/api/authentication#logout}\n */\nWebAuth.prototype.logout = function(options) {\n windowHelper.redirect(this.client.buildLogoutUrl(options))\n}\n\n/**\n * Verifies the passwordless TOTP and redirects to finish the passwordless transaction\n *\n * @method passwordlessVerify\n * @param {Object} options\n * @param {String} options.type `sms` or `email`\n * @param {String} options.phoneNumber only if type = sms\n * @param {String} options.email only if type = email\n * @param {String} options.connection the connection name\n * @param {String} options.verificationCode the TOTP code\n * @param {Function} cb\n */\nWebAuth.prototype.passwordlessVerify = function(options, cb) {\n var _this = this\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'responseMode',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n\n assert.check(\n params,\n { type: 'object', message: 'options parameter is not valid' },\n {\n responseType: {\n type: 'string',\n message: 'responseType option is required'\n }\n }\n )\n\n params = this.transactionManager.process(params)\n return this.client.passwordless.verify(params, function(err) {\n if (err) {\n return cb(err)\n }\n return windowHelper.redirect(\n _this.client.passwordless.buildVerifyUrl(params)\n )\n })\n}\n\nmodule.exports = WebAuth\n","module.exports.MINUTES_15 = 1 / 96\nmodule.exports.MINUTES_30 = 1 / 48\n","var IframeHandler = require('../helper/iframe-handler')\nvar objectHelper = require('../helper/object')\nvar windowHelper = require('../helper/window')\nvar Warn = require('../helper/warn')\n\nfunction runWebMessageFlow(authorizeUrl, options, callback) {\n var handler = new IframeHandler({\n url: authorizeUrl,\n eventListenerType: 'message',\n callback: function(eventData) {\n callback(null, eventData)\n },\n timeout: options.timeout,\n eventValidator: {\n isValid: function(eventData) {\n return (\n eventData.event.data.type === 'authorization_response' &&\n options.state === eventData.event.data.response.state\n )\n }\n },\n timeoutCallback: function() {\n callback({\n error: 'timeout',\n error_description:\n 'Timeout during executing web_message communication'\n })\n }\n })\n handler.init()\n}\n\nfunction WebMessageHandler(webAuth) {\n this.webAuth = webAuth\n this.warn = new Warn(webAuth.baseOptions)\n}\n\nWebMessageHandler.prototype.run = function(options, cb) {\n var _this = this\n options.responseMode = 'web_message'\n options.prompt = 'none'\n\n var currentOrigin = windowHelper.getOrigin()\n var redirectUriOrigin = objectHelper.getOriginFromUrl(options.redirectUri)\n if (redirectUriOrigin && currentOrigin !== redirectUriOrigin) {\n return cb({\n error: 'origin_mismatch',\n error_description:\n \"The redirectUri's origin (\" +\n redirectUriOrigin +\n \") should match the window's origin (\" +\n currentOrigin +\n ').'\n })\n }\n\n runWebMessageFlow(\n this.webAuth.client.buildAuthorizeUrl(options),\n options,\n function(err, eventData) {\n var error = err\n if (!err && eventData.event.data.response.error) {\n error = objectHelper.pick(eventData.event.data.response, [\n 'error',\n 'error_description'\n ])\n }\n if (\n error &&\n error.error === 'consent_required' &&\n windowHelper.getWindow().location.hostname === 'localhost'\n ) {\n _this.warn.warning(\n \"Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients\"\n )\n }\n if (error) {\n return cb(error)\n }\n var parsedHash = eventData.event.data.response\n _this.webAuth.validateAuthenticationResponse(\n options,\n parsedHash,\n cb\n )\n }\n )\n}\n\nmodule.exports = WebMessageHandler\n","var windowHelper = require('./window')\n\nfunction IframeHandler(options) {\n this.url = options.url\n this.callback = options.callback\n this.timeout = options.timeout || 60 * 1000\n this.timeoutCallback = options.timeoutCallback || null\n this.eventListenerType = options.eventListenerType || 'message'\n this.iframe = null\n this.timeoutHandle = null\n this._destroyTimeout = null\n this.transientMessageEventListener = null\n this.proxyEventListener = null\n // If no event identifier specified, set default\n this.eventValidator = options.eventValidator || {\n isValid: function() {\n return true\n }\n }\n\n if (typeof this.callback !== 'function') {\n throw new Error('options.callback must be a function')\n }\n}\n\nIframeHandler.prototype.init = function() {\n var _this = this\n var _window = windowHelper.getWindow()\n\n this.iframe = _window.document.createElement('iframe')\n this.iframe.style.display = 'none'\n\n // Workaround to avoid using bind that does not work in IE8\n this.proxyEventListener = function(e) {\n _this.eventListener(e)\n }\n\n switch (this.eventListenerType) {\n case 'message':\n this.eventSourceObject = _window\n break\n case 'load':\n this.eventSourceObject = this.iframe\n break\n default:\n throw new Error(\n 'Unsupported event listener type: ' + this.eventListenerType\n )\n }\n\n this.eventSourceObject.addEventListener(\n this.eventListenerType,\n this.proxyEventListener,\n false\n )\n\n _window.document.body.appendChild(this.iframe)\n\n this.iframe.src = this.url\n\n this.timeoutHandle = setTimeout(function() {\n _this.timeoutHandler()\n }, this.timeout)\n}\n\nIframeHandler.prototype.eventListener = function(event) {\n var eventData = { event: event, sourceObject: this.eventSourceObject }\n\n if (!this.eventValidator.isValid(eventData)) {\n return\n }\n\n this.destroy()\n this.callback(eventData)\n}\n\nIframeHandler.prototype.timeoutHandler = function() {\n this.destroy()\n if (this.timeoutCallback) {\n this.timeoutCallback()\n }\n}\n\nIframeHandler.prototype.destroy = function() {\n var _this = this\n var _window = windowHelper.getWindow()\n\n clearTimeout(this.timeoutHandle)\n\n this._destroyTimeout = setTimeout(function() {\n _this.eventSourceObject.removeEventListener(\n _this.eventListenerType,\n _this.proxyEventListener,\n false\n )\n _window.document.body.removeChild(_this.iframe)\n }, 0)\n}\n\nmodule.exports = IframeHandler\n","module.exports = __webpack_public_path__ + \"static/media/calendar.5900f69f.svg\";","import { store } from 'redux/store.js'\n\nexport const PERMISSIONS_ROUTES_ONLY = 'Routes'\nexport const PERMISSIONS_SECTIONS_ONLY = 'Sections'\n\n//[SP] Costly operation if the config is too large - need to rethink if moved to BE API endpoint TODO\nexport const getPermissions = (idRef, flag) => {\n const ACLS = store.getState().acl\n let allowPermissions = {\n routes: [],\n sections: []\n }\n let denyPermissions = {\n routes: [],\n sections: []\n }\n if (ACLS && ACLS.length > 0) {\n for (const acl of ACLS) {\n const { permission } = acl\n if (!flag || flag === PERMISSIONS_ROUTES_ONLY) {\n if (acl.filters && acl.filters.routes) {\n if (\n acl.filters.routes.allow &&\n acl.filters.routes.allow.find(e => e === idRef)\n ) {\n allowPermissions.routes.push(permission)\n } else if (\n acl.filters.routes.deny &&\n acl.filters.routes.deny.find(e => e === idRef)\n ) {\n denyPermissions.routes.push(permission)\n }\n }\n }\n if (!flag || flag === PERMISSIONS_SECTIONS_ONLY) {\n if (acl.filters && acl.filters.sections) {\n if (\n acl.filters.sections.allow &&\n acl.filters.sections.allow.find(e => e === idRef)\n ) {\n allowPermissions.sections.push(permission)\n } else if (\n acl.filters.sections.deny &&\n acl.filters.sections.deny.find(e => e === idRef)\n ) {\n denyPermissions.sections.push(permission)\n }\n }\n }\n }\n }\n\n return {\n allowPermissions,\n denyPermissions\n }\n}\n","import axios from 'axios'\n// import config from 'config.json'\n\nclass AppConfigApi {\n static getMCBMetadata = payLoad => {\n return axios\n .get(`https://mcb-metadata.firebaseio.com/metadata.json`, payLoad)\n .then(response => {\n return response.data\n })\n .then(data => {\n return data\n })\n .catch(error => {\n throw error\n })\n }\n\n static getMCBAcldata = payLoad => {\n return axios\n .get(`https://mcb-metadata.firebaseio.com/acls.json`, payLoad)\n .then(response => {\n return response.data\n })\n .then(data => {\n return data\n })\n .catch(error => {\n throw error\n })\n }\n\n static postMCBAcldata = acls => {\n return axios\n .put(`https://mcb-metadata.firebaseio.com/acls.json`, acls)\n .then(response => {\n return response.data\n })\n .then(data => {\n return data\n })\n .catch(error => {\n throw error\n })\n }\n}\n\nexport default AppConfigApi\n","import React, { Component } from 'react'\n\nimport AppConfigApi from '../AppConfigApi'\nimport Breakpoint from 'styles/Breakpoint'\n\nimport FormFieldSelect from 'components/form-components/FormFieldSelect'\nimport Button from 'components/common/button'\n\nimport InPageLoading from 'components/common/inpage-loading'\n\nimport './index.css'\n\n//TODO need to refactor this lot of repitition code - [SP]\n\nclass MetaConfiguration extends Component {\n constructor(props) {\n super(props)\n this.state = {\n loadingMetadata: false,\n loadingAcldata: false,\n submittingAcldata: false,\n selectedPermission: null,\n allowedRoutes: [],\n deniedRoutes: [],\n allowedSections: [],\n deniedSections: [],\n routes: [],\n sections: [],\n acls: [],\n config: {}\n }\n }\n\n componentDidMount() {\n this.setState({\n loadingMetadata: true,\n loadingAcldata: true\n })\n AppConfigApi.getMCBAcldata({})\n .then(acls => {\n this.setState({\n acls,\n loadingAcldata: false\n })\n })\n .catch(error => {\n console.error(error)\n this.setState({\n acls: []\n })\n })\n\n AppConfigApi.getMCBMetadata({})\n .then(config => {\n let routes = []\n let sections = []\n\n for (const entry of Object.values(config)) {\n routes.push({\n label: entry.id,\n value: entry.route\n })\n const entrySections = entry['sections']\n if (entrySections) {\n for (const entrySection of Object.values(\n entrySections\n )) {\n sections.push({\n label: entrySection.id,\n value: entrySection.id\n })\n }\n }\n }\n\n this.setState({\n config,\n routes,\n sections,\n loadingMetadata: false\n })\n })\n .catch(error => {\n console.error(error)\n this.setState({\n config: {}\n })\n })\n }\n\n //TODO need to refactor this lot of repitition code - [SP]\n handleChange = selectedPermission => {\n let { acls, routes, sections } = this.state\n const acl = acls.find(e => e.permission === selectedPermission)\n\n let allowedRoutes = [],\n deniedRoutes = [],\n allowedSections = [],\n deniedSections = []\n if (acl && acl.filters) {\n if (acl.filters.routes) {\n if (\n acl.filters.routes.allow &&\n acl.filters.routes.allow.length > 0\n ) {\n for (const filterAllowedRoute of acl.filters.routes.allow) {\n const routeval = routes.find(\n e => filterAllowedRoute === e.value\n )\n if (routeval) allowedRoutes.push(routeval)\n }\n }\n if (\n acl.filters.routes.deny &&\n acl.filters.routes.deny.length > 0\n ) {\n for (const filterDeniedRoute of acl.filters.routes.deny) {\n const routeval = routes.find(\n e => filterDeniedRoute === e.value\n )\n if (routeval) deniedRoutes.push(routeval)\n }\n }\n }\n\n if (acl.filters.sections) {\n if (\n acl.filters.sections.allow &&\n acl.filters.sections.allow.length > 0\n ) {\n for (const allowSection of acl.filters.sections.allow) {\n const sectionval = sections.find(\n e => e.value === allowSection\n )\n if (sectionval) allowedSections.push(sectionval)\n }\n }\n if (\n acl.filters.sections.deny &&\n acl.filters.sections.deny.length > 0\n ) {\n for (const denySection of acl.filters.sections.deny) {\n const sectionval = sections.find(\n e => e.value === denySection\n )\n if (sectionval) deniedSections.push(sectionval)\n }\n }\n }\n } else if (!acl) {\n acls.push({\n permission: selectedPermission,\n filters: {\n routes: {\n allow: [],\n deny: []\n },\n sections: {\n allow: [],\n deny: []\n }\n }\n })\n this.setState({\n acls\n })\n }\n\n this.setState({\n selectedPermission,\n allowedRoutes,\n deniedRoutes,\n allowedSections,\n deniedSections\n })\n // console.log(`Option selected:`, selectedPermission)\n }\n\n handleAllowedRoutes = allowedRoutes => {\n let { acls, selectedPermission } = this.state\n acls = acls.map(acl => {\n if (acl.permission === selectedPermission) {\n if (!acl.filters) {\n acl.filters = {\n routes: {\n allow: [],\n deny: []\n }\n }\n }\n if (!acl.filters.routes)\n acl.filters.routes = {\n allow: [],\n deny: []\n }\n if (!acl.filters.routes.allow) acl.filters.routes.allow = []\n\n let allowedRoutesSet = new Set([...allowedRoutes])\n acl.filters.routes.allow = [...allowedRoutesSet]\n }\n return acl\n })\n\n this.setState({ acls, allowedRoutes })\n }\n\n handleDeniedRoutes = deniedRoutes => {\n let { acls, selectedPermission } = this.state\n acls = acls.map(acl => {\n if (acl.permission === selectedPermission) {\n if (!acl.filters) {\n acl.filters = {\n routes: {\n allow: [],\n deny: []\n }\n }\n }\n if (!acl.filters.routes)\n acl.filters.routes = {\n allow: [],\n deny: []\n }\n if (!acl.filters.routes.deny) acl.filters.routes.deny = []\n\n let deniedRoutesSet = new Set([...deniedRoutes])\n acl.filters.routes.deny = [...deniedRoutesSet]\n }\n return acl\n })\n this.setState({ acls, deniedRoutes })\n }\n\n handleAllowedSections = allowedSections => {\n let { acls, selectedPermission } = this.state\n acls = acls.map(acl => {\n if (acl.permission === selectedPermission) {\n if (!acl.filters) {\n acl.filters = {\n sections: {\n allow: [],\n deny: []\n }\n }\n }\n if (!acl.filters.sections)\n acl.filters.sections = {\n allow: [],\n deny: []\n }\n if (!acl.filters.sections.allow) acl.filters.sections.allow = []\n\n let allowedSectionsSet = new Set([...allowedSections])\n acl.filters.sections.allow = [...allowedSectionsSet]\n }\n return acl\n })\n\n this.setState({ acls, allowedSections })\n }\n\n handleDeniedSections = deniedSections => {\n let { acls, selectedPermission } = this.state\n acls = acls.map(acl => {\n if (acl.permission === selectedPermission) {\n if (!acl.filters) {\n acl.filters = {\n sections: {\n allow: [],\n deny: []\n }\n }\n }\n if (!acl.filters.sections)\n acl.filters.sections = {\n allow: [],\n deny: []\n }\n if (!acl.filters.sections.deny) acl.filters.sections.deny = []\n\n let deniedSectionsSet = new Set([...deniedSections])\n acl.filters.sections.deny = [...deniedSectionsSet]\n }\n return acl\n })\n\n this.setState({ acls, deniedSections })\n }\n\n render() {\n const {\n acls,\n routes,\n sections,\n // selectedPermission,\n loadingMetadata,\n loadingAcldata,\n submittingAcldata\n } = this.state\n\n const options = acls.map(e => {\n let newAcl = e\n newAcl.label = e.permission\n newAcl.value = e.permission\n return newAcl\n })\n\n return (\n
\n
\n
\n \n Access Control Permissions\n \n
\n
\n
\n
\n
\n \n
\n\n
\n
\n
\n \n \n\n \n \n
\n
\n
\n \n \n \n \n
\n
\n
\n \n {\n this.setState({\n submittingAcldata: true\n })\n AppConfigApi.postMCBAcldata(this.state.acls)\n .then(data =>\n this.setState({\n submittingAcldata: false\n })\n )\n .catch(error => console.error(error))\n }}\n >\n Save changes\n \n
\n
\n
\n
\n {loadingMetadata ||\n loadingAcldata ||\n (submittingAcldata && )}\n
\n )\n }\n}\n\nexport default MetaConfiguration\n","import config from './data.json'\nimport {\n getPermissions,\n PERMISSIONS_ROUTES_ONLY,\n PERMISSIONS_SECTIONS_ONLY\n} from './acl'\nimport MetaConfiguration from './meta-configuration'\nimport AppConfigApi from './AppConfigApi'\n\nconst metadata = config.metadata\nexport {\n PERMISSIONS_ROUTES_ONLY,\n PERMISSIONS_SECTIONS_ONLY,\n metadata,\n getPermissions,\n MetaConfiguration,\n AppConfigApi\n}\n","module.exports = __webpack_public_path__ + \"static/media/close.fc4d4651.svg\";","module.exports = __webpack_public_path__ + \"static/media/email.cc5498d1.svg\";","module.exports = __webpack_public_path__ + \"static/media/help.0142c357.svg\";","import React, {Fragment} from 'react'\n\nexport default {\n GENERIC: {\n Type: 'UI',\n Name: 'Generic error',\n Code: '9999',\n Header: 'Oops! Something went wrong',\n Icon: 'fal fa-exclamation-circle',\n message: () => (\n \n You can return to the Home page and retry the\n same action{' '}\n \n )\n },\n ACCESS_DENIED: {\n Type: 'UI',\n Name: 'Access Denied',\n Code: '0001',\n Header: 'Access Denied',\n Icon: 'fal fa-ban',\n message: () => (\n \n Your user profile has not been given permissions to access this\n page. Please contact the MyCanon Business Portal Administrator\n in your company to arrange access for you\n \n )\n },\n NOT_AUTHORIZED: {\n Type: 'UI',\n Name: 'Not Authorized',\n Code: '0002',\n Header: 'Not Authorised',\n Icon: 'fal fa-ban',\n message: () => (\n \n Your user profile is currently not linked to any company\n account. Please contact the MyCanon Business Portal\n Administrator in your company to arrange access for you{' '}\n \n )\n },\n ACCESS_DENIED_STS: {\n Type: 'UI',\n Name: 'User Access Denied',\n Code: '0003',\n Header: 'Access Denied',\n Icon: 'fal fa-ban',\n message: () => (\n \n Your user profile has not been given access to MyCanon Business.\n Please contact the MyCanon Business Portal Admin\n in your company to arrange access for you.\n \n )\n },\n NOT_FOUND: {\n Type: 'UI',\n Name: 'Not found',\n Code: '9998',\n Header: 'Not Found',\n Icon: 'fal fa-ban',\n message: () => (\n \n There is no resource found with the requested URL. You can\n return to the Home page {' '}\n \n )\n },\n ORDER_COMPLETE: {\n Type: 'UI',\n Name: 'Order Complete',\n Code: '9997',\n Header: 'Order Complete',\n Icon: 'fal fa-clipboard-check',\n message: () => (\n \n This installation is complete{' '}\n \n )\n }\n}\n","var Authentication = require('./authentication')\nvar Management = require('./management')\nvar WebAuth = require('./web-auth')\nvar version = require('./version')\n\nmodule.exports = {\n Authentication: Authentication,\n Management: Management,\n WebAuth: WebAuth,\n version: version.raw\n}\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @description Core actions to save the token payload\n *\n */\n\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\nimport * as actionTypes from './actionTypes'\n\n/**\n * @name setAuth\n * @desc Set the stores auth details\n */\nexport const setAuth = payload => {\n // console.log('[redux/actions/auth.js] setAuth: actionCreator', payload)\n return (dispatch, getState) => {\n if (getState().auth.auth) return null\n dispatch(saveAuth(payload))\n }\n}\n/**\n * @name saveAuth\n * @desc Dispatch the payload to the store\n */\nexport const saveAuth = payload => {\n // console.log('[redux/actions/auth.js] saveAuth: action', payload)\n return {\n type: actionTypes.UPDATE_AUTH,\n auth: payload\n }\n}\n\n/**\n * @name isAuthenticating\n * @desc Method to set the isAuthenticating state of \"auth\" redux state used by AuthService\n */\nexport const isAuthenticating = flag => {\n return (dispatch, getState) => {\n dispatch(() => ({\n type: actionTypes.IS_AUTHENTICATING,\n flag\n }))\n }\n}\n","import * as actionTypes from '../actionTypes.js'\nimport axios from 'axios'\nimport config from 'config.json'\nimport {TIME_LIMT_FOR_FETCH} from 'utils/constants'\nimport {RELOGIN_FLAG, STORED_ACCOUNT} from '../../../auth/constants.js'\nimport {DEVICE_DETAILS_ARRAY} from \"../../../features/assets/asset-status/asset-status.helper\";\n\nconst getUrl = payload => {\n switch (payload.type) {\n\n\n case actionTypes.UPDATE_ACCOUNTS:\n return config.accountsApi\n\n case actionTypes.UPDATE_SELECTED_SERVICEORDER:\n return `${config.accountsApi}${payload.accountNumber}/serviceOrders/${payload.serviceOrder}/?createdFrom=2018-01-01`\n\n case actionTypes.UPDATE_MEMBER_INFO: {\n return `${config.api}members/${payload.memberId}?businessUser=true`\n }\n\n default:\n return null\n }\n}\n\nconst lastFetch = (payload, state) => {\n switch (payload.type) {\n\n case actionTypes.UPDATE_ACCOUNTS:\n return state.account.lastFetch\n\n case actionTypes.UPDATE_SELECTED_SERVICEORDER:\n return state.deviceServiceOrders.lastFetch\n case actionTypes.UPDATE_MEMBER_INFO:\n return state.memberInfo.lastFetch\n\n default:\n return 0\n }\n}\n\nconst getDataPath = (payload, data) => {\n switch (payload.type) {\n case actionTypes.UPDATE_ACCOUNTS:\n return data.Payload.Account\n\n case actionTypes.UPDATE_SELECTED_SERVICEORDER:\n return data.Payload.ServiceOrder\n\n case actionTypes.UPDATE_MEMBER_INFO:\n return data.Payload.Member\n\n default:\n return data\n }\n}\n\nexport const getCanonHub = payload => {\n\n return (dispatch, getState) => {\n const timeSinceLastFetch = lastFetch(payload, getState().canonhub)\n const axPost = !!payload.params\n const tempUrl = getUrl(payload)\n const url = window.isPROD ? tempUrl.replace('uat', '') : tempUrl\n const isDataStale = payload.force ? true : Date.now() - timeSinceLastFetch > TIME_LIMT_FOR_FETCH // 5minutes in ms\n\n if (window.DEBUG) {\n console.log('chub:', payload)\n console.log(axPost ? 'post:' : 'get:', url, 'stale:', isDataStale)\n }\n\n if (isDataStale) {\n\n dispatch({\n type: payload.type,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n })\n\n if (axPost) {\n if (window.DEBUG) console.time(url)\n return axios\n .post(url, payload.params)\n .then((response) => {\n console.timeEnd(url)\n //CALL THE API\n dispatch(\n {\n type: payload.type,\n data: {\n data: getDataPath(payload, response.data),\n lastFetch: Date.now(),\n loading: false\n }\n }\n )\n })\n .catch((error) => {\n if (window.DEBUG) console.timeEnd(url)\n dispatch(\n {\n type: payload.type,\n data: {\n error: error.data,\n lastError: Date.now(),\n loading: false\n }\n\n }\n )\n })\n }\n //NOT AX POST\n else {\n if (window.DEBUG) console.time(url)\n return axios\n .get(url)\n .then((response) => {\n if (window.DEBUG) console.timeEnd(url)\n if (response?.data?.Error?.Code !== 10106) {\n localStorage.removeItem(RELOGIN_FLAG);\n localStorage.removeItem(STORED_ACCOUNT)\n }\n\n dispatch(\n {\n type: payload.type,\n data: {\n data: response?.data?.Error?.Code ? null : getDataPath(payload, response.data),\n lastFetch: Date.now(),\n loading: false,\n pageNo: payload.pageNo,\n hubError: response?.data?.Error?.Code\n }\n\n }\n )\n })\n .catch((errorResponse) => {\n if (window.DEBUG) console.timeEnd(url)\n // need to do something here when get 403 error. this means the api end point is forbidden (not auth)\n dispatch(\n {\n type: payload.type,\n data: {\n error: errorResponse?.data,\n lastError: Date.now(),\n loading: false\n }\n }\n )\n })\n }\n } else {\n // DISPATCH LOADING STATUS\n dispatch(\n {\n type: actionTypes.ABORT_FETCH_HUB,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n }\n )\n }\n }\n}\n\n//MH - Own action for getting account details - above getCanonHub used for everything is too confusing as now we have a different object\nexport const getAccountDetails = props => {\n\n return (dispatch, getState) => {\n const timeSinceLastFetch = getState().canonhub.accountDetails.lastFetch\n\n const tempUrl = `${config.accountsApi}${props.accountNumber}`\n const url = window.isPROD ? tempUrl.replace('uat', '') : tempUrl\n const isDataStale = props.force ? true : Date.now() - timeSinceLastFetch > TIME_LIMT_FOR_FETCH // 5minutes in ms\n\n if (window.DEBUG) {\n console.log('chub:', props)\n }\n\n\n if (isDataStale) {\n dispatch({\n type: actionTypes.UPDATE_ACCOUNTS_DETAILS,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n })\n dispatch({\n type: actionTypes.UPDATE_ACCOUNTS_ACCESS,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n })\n\n if (window.DEBUG) console.time(url)\n return axios\n .get(url)\n .then((response) => {\n if (window.DEBUG) console.timeEnd(url)\n\n //remove dsf session store devices if local does not match payload otherwise persist\n if (localStorage.getItem(STORED_ACCOUNT) !== response.data.Payload.Account.Number) sessionStorage.removeItem(DEVICE_DETAILS_ARRAY)\n\n dispatch(\n {\n type: actionTypes.UPDATE_ACCOUNTS_DETAILS,\n data: {\n data: response.data.Payload.Account,\n lastFetch: Date.now(),\n loading: false,\n pageNo: props.pageNo\n }\n }\n )\n dispatch(\n {\n type: actionTypes.UPDATE_ACCOUNTS_ACCESS,\n data: {\n data: response.data.Payload.Access,\n lastFetch: Date.now(),\n loading: false,\n pageNo: props.pageNo\n }\n }\n )\n })\n .catch((error) => {\n if (window.DEBUG) console.timeEnd(url)\n // need to do something here when get 403 error. this means the api end point is forbidden (not auth)\n\n dispatch(\n {\n type: actionTypes.UPDATE_ACCOUNTS_DETAILS,\n data: {\n error: error.data,\n lastError: Date.now(),\n loading: false\n }\n }\n )\n dispatch(\n {\n type: actionTypes.UPDATE_ACCOUNTS_ACCESS,\n data: {\n error: error.data,\n lastError: Date.now(),\n loading: false\n }\n }\n )\n })\n\n } else {\n // DISPATCH LOADING STATUS\n dispatch(\n {\n type: actionTypes.ABORT_FETCH_HUB,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n }\n )\n }\n }\n}\n\n//MH - Own action for getting account details - above getCanonHub used for everything is too confusing as now we have a different object\nexport const updateAccountList = props => {\n\n return (dispatch, getState) => {\n const timeSinceLastFetch = getState().canonhub.accountList.lastFetch\n\n // const tempUrl = `${config.accountsApi}${props.accountNumber}`\n // const url = window.isPROD ? tempUrl.replace('uat', '') : tempUrl\n\n const pageNo = props.pageNo ? 'pageNo=' + props.pageNo : 'pageNo=1'\n const pageSize = '&pageSize=10'\n const search = props.search ? '&search=' + props.search : ''\n const tempUrl = `${config.accountsApi}?${pageNo}${pageSize}${search}`\n const url = window.isPROD ? tempUrl.replace('uat', '') : tempUrl\n\n const isDataStale = props.force ? true : Date.now() - timeSinceLastFetch > TIME_LIMT_FOR_FETCH // 5minutes in ms\n\n if (window.DEBUG) {\n console.log('chub:', props)\n }\n\n if (isDataStale) {\n dispatch({\n type: actionTypes.UPDATE_HEADER_ACCOUNT_LIST_REQUEST,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n })\n\n if (window.DEBUG) console.time(url)\n return axios\n .get(url)\n .then((response) => {\n console.log(response)\n if (window.DEBUG) console.timeEnd(url)\n\n dispatch(\n {\n type: actionTypes.UPDATE_HEADER_ACCOUNT_LIST_SUCCESS,\n data: {\n data: response.data.Payload.Account,\n lastFetch: Date.now(),\n loading: false,\n pageNo: props.pageNo\n }\n }\n )\n })\n .catch((error) => {\n if (window.DEBUG) console.timeEnd(url)\n // need to do something here when get 403 error. this means the api end point is forbidden (not auth)\n dispatch(\n {\n type: actionTypes.UPDATE_HEADER_ACCOUNT_LIST_FAILURE,\n data: {\n error: error.data,\n lastError: Date.now(),\n loading: false\n }\n }\n )\n })\n\n } else {\n // DISPATCH LOADING STATUS\n dispatch(\n {\n type: actionTypes.ABORT_FETCH_HUB,\n data: {\n lastFetch: Date.now(),\n loading: true\n }\n }\n )\n }\n }\n}\n","import * as actionTypes from './actionTypes'\n\n// these top 3 are now probable redundant\nexport const setSelectedAccount = payload => {\n // console.log('[redux/actions/account.js] setSelectedAccount: action', payload)\n if (payload) {\n localStorage.setItem('selectedAccount', payload)\n return {\n type: actionTypes.UPDATE_SELECTED_ACCOUNT,\n selectedAccount: payload\n }\n }\n}\n\nexport const setSelectedDevice = payload => {\n // console.log('[redux/actions/account.js] setSelectedDevice: action', payload)\n return {\n type: actionTypes.UPDATE_SELECTED_DEVICE,\n selectedDevice: payload\n }\n}\n\nexport const setSelectedServiceOrder = payload => {\n // console.log('[redux/actions/account.js] setSelectedAccount: action', payload)\n return {\n type: actionTypes.UPDATE_SELECTED_SERVICEORDER,\n selectedServiceOrder: payload\n }\n}\n\nexport const setSelected = obj => {\n if (obj.tyle === actionTypes.UPDATE_SELECTED_ACCOUNT) {\n localStorage.setItem('selectedAccount', obj.selectedAccount)\n }\n return obj\n}\n","import axios from \"axios\";\nimport {UPDATE_DSF_SUCCESS, UPDATE_DSF_REQUEST, UPDATE_DSF_ERROR} from \"./actionTypes\";\nimport config from 'config.json'\nimport {TIME_LIMT_FOR_FETCH} from \"../../utils/constants\";\n\n\nexport const getDSFDevices = ({accountNumber, tokenOnly}) => {\n\n\n return (dispatch, getState) => {\n\n const timeSinceLastFetch = getState().dsf.lastFetch\n\n const DSF_URL = `${config.accountsApi}${accountNumber}/devices/dsf${tokenOnly ? '?tokenOnly=true' : ''}`\n\n dispatch({type: UPDATE_DSF_REQUEST})\n let isDataStale = Date.now() - timeSinceLastFetch > TIME_LIMT_FOR_FETCH // 5minutes in ms\n\n if (isDataStale) {\n return axios\n .get(DSF_URL)\n .then(response => {\n\n if (response?.data?.Payload?.Token) {\n dispatch({\n type: UPDATE_DSF_SUCCESS,\n data: {\n response: {\n devices: response?.data?.Payload?.Devices,\n token: response?.data?.Payload?.Token,\n },\n lastFetch: Date.now()\n },\n })\n } else {\n dispatch({type: UPDATE_DSF_ERROR, action: {data: {response: 'Empty token'}}})\n }\n\n })\n .catch((error) => {\n console.error(error)\n dispatch({type: UPDATE_DSF_ERROR, error})\n })\n }\n }\n}\n","import * as actionTypes from './actionTypes'\n\n// these top 3 are now probable redundant\nexport const setSearchOptions = payload => {\n return {\n type: actionTypes.UPDATE_SEARCH_OPTIONS,\n searchOptions: payload\n }\n}\n\nexport const setPagingSetting = payload => {\n return {\n type: actionTypes.UPDATE_PAGING_SETTINGS,\n pagingSettings: payload\n }\n}\n","export {setAuth, saveAuth, isAuthenticating} from './auth.js'\n\nexport {\n getCanonHub,\n getAccountDetails,\n updateAccountList\n} from './canonhub/index.js'\n\nexport {\n setSelectedAccount,\n setSelectedDevice,\n setSelectedServiceOrder,\n setSelected\n} from './account.js'\n\nexport {fetchAcldata} from './acl.js'\nexport {fetchMetadata} from './metadata.js'\nexport {getDSFDevices} from './dsf-actions'\n\nexport {setSearchOptions, setPagingSetting} from './search.js'\n","import styled from 'styled-components'\n\nexport const Container = styled.div`\n position: fixed;\n top: 50%;\n left: 50%;\n width: 90%;\n /* bring your own prefixes */\n transform: translate(-50%, -50%);\n`\n\nexport const ErrorSection = styled.section`\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n i {\n font-size: 5rem;\n }\n p {\n font-size: 2rem;\n a{\n font-size:1.2rem;\n color: #1601b3;\n text-decoration: underline;\n cursor: pointer;\n }\n }\n`\n\nexport const Content = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-size: 1.2rem;\n width: 70%;\n line-height: 1;\n li {\n padding: 0.5rem;\n }\n`\nexport const ErrorLink = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-size: 1.2rem;\n width: 70%;\n line-height: 1;\n li {\n padding: 0.5rem;\n }\n`\n","import React, {Fragment} from 'react'\nimport {connect} from 'react-redux'\nimport {Container, ErrorSection, Content} from './styles'\nimport {store} from 'redux/store.js'\nimport {SELECTED_ACCOUNT} from 'auth/constants'\nimport history from 'history/history.js'\nimport {isLoggedIn} from 'auth/AuthService'\nimport {ISNZ} from '../../auth/constants'\nimport {AU} from 'utils/constants'\nimport {compose, lifecycle} from 'recompose'\n\n\nconst withFooterConfig = lifecycle({\n componentDidMount() {\n //If we are hitting the error component, then dont display the footer\n const footer = document.querySelector('[name=\"mcbfooter\"]')\n if (footer) {\n footer.style.display = 'none'\n }\n // remove all the Header links except dashboard in case of error\n if (store.getState().account.selectedAccount) {\n }\n //clear off the selected account in case of any error\n localStorage.removeItem(SELECTED_ACCOUNT)\n }\n})\n\nconst enhance = compose(withFooterConfig)\n\nconst RenderErrorContact = props => {\n\n const {Localization} = props\n\n return (\n \n {(!ISNZ) && (\n \n )}\n {(ISNZ) && (\n \n )}\n \n )\n}\n\nconst ContactAU = () => (\n \n or contact our Support Team on 13 13 83 (select option 2)\n \n)\nconst ContactNZ = () => (\n \n or contact our Support Team email: mybusiness@canon.co.nz, ph: 0800\n 222 666 (select option 1 then option 3)\n \n)\n\nconst GenericError = enhance(props => {\n\n const {errorObj, AccountNumber, Localization} = props\n\n return (\n \n \n \n

{errorObj.Header}

\n \n
\n {errorObj.message()}\n {errorObj.Header !== 'Order Complete' && errorObj.Name !== 'User Access Denied' && (\n \n )}\n
\n
\n {\n (\n AccountNumber &&\n isLoggedIn() &&\n errorObj.Code === '0001'\n\n ) && (\n

\n {\n setTimeout(() => {\n history.replace(`/${AccountNumber}`)\n }, 100)\n }}>\n Click here to return to your default account\n \n

\n )}\n
\n
\n )\n})\n\nconst mapStateToProps = state => {\n if (!state.canonhub) return\n let AccountNumber = ''\n if (\n state.canonhub.account &&\n state.canonhub.account.data &&\n state.canonhub.account.data.Data &&\n state.canonhub.account.data.Data.length > 1\n ) AccountNumber = state.canonhub.account.data.Data[0].Number\n const {Localization} = state.canonhub.accountDetails.data || AU\n return {\n AccountNumber,\n Localization\n }\n}\n\nexport default connect(mapStateToProps)(GenericError)\n","import React from 'react'\nimport GenericError from './generic-error'\nimport ErrorCodes from 'utils/errorCodes'\nimport { withRouter } from 'react-router-dom'\n//[sp] Important Notes : Once the state in the ErrorBoundary has been set it will always render the error message until the state changes (hasError to false).\n// hence The child components (the Router component in this case) will not be rendered, even when the history changes.\n//To resolve this, make use of the react-router withRouter higher order component, by wrapping the export of the ErrorBoundary to give it access to the history via the props\n\nclass ErrorBoundary extends React.Component {\n constructor(props) {\n super(props)\n this.state = { hasError: false, errorObj: ErrorCodes.GENERIC }\n //In the ErrorBoundary constructor retrieve the history from the props and setup a handler to listen for changes to the current location using history.listen.\n //When the location changes (back button clicked etc.) if the component is in an error state, it is cleared enabling the children to be rendered again\n const { history } = props\n history.listen((location, action) => {\n if (this.state.hasError) {\n this.setState({\n hasError: false\n })\n }\n })\n }\n\n componentDidCatch(error, info) {\n let errorObj = error.Type === 'UI' ? error : ErrorCodes.GENERIC\n\n // Display fallback UI\n this.setState({ hasError: true, errorObj })\n }\n // You can also log the error to an error reporting service\n //console.error(error, info)\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return \n } else {\n return this.props.children\n }\n }\n}\n\nexport default withRouter(ErrorBoundary)\n","import ErrorBoundary from './error-boundary'\nimport GenericError from './generic-error'\n\nexport { ErrorBoundary, GenericError }\n","import React from 'react'\nimport './index.css'\n//import { TimelineLite } from 'gsap/all'\nconst AnimateLoad = WrappedComponent => {\n return class extends React.Component {\n constructor(props) {\n super(props)\n //this.componentTimeLine = new TimelineLite({ paused: true })\n this.state = { didMount: false }\n }\n\n componentDidMount() {\n setTimeout(() => {\n this.setState({ didMount: true })\n }, 0)\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {}\n\n render() {\n const { didMount } = this.state\n // cards, elements tha will be used in the tween\n //this.animateCards = []\n return (\n (this.animateCards[0] = div)}\n >\n \n
\n )\n }\n }\n}\n\nexport default AnimateLoad\n","/* eslint-disable no-param-reassign */\n/* eslint-disable no-restricted-syntax */\n/* eslint-disable guard-for-in */\n\nvar assert = require('./assert')\nvar objectAssign = require('./object-assign')\n\nfunction pick(object, keys) {\n return keys.reduce(function(prev, key) {\n if (object[key]) {\n prev[key] = object[key]\n }\n return prev\n }, {})\n}\n\nfunction getKeysNotIn(obj, allowedKeys) {\n var notAllowed = []\n for (var key in obj) {\n if (allowedKeys.indexOf(key) === -1) {\n notAllowed.push(key)\n }\n }\n return notAllowed\n}\n\nfunction objectValues(obj) {\n var values = []\n for (var key in obj) {\n values.push(obj[key])\n }\n return values\n}\n\nfunction extend() {\n var params = objectValues(arguments)\n params.unshift({})\n return objectAssign.get().apply(undefined, params)\n}\n\nfunction merge(object, keys) {\n return {\n base: keys ? pick(object, keys) : object,\n with: function(object2, keys2) {\n object2 = keys2 ? pick(object2, keys2) : object2\n return extend(this.base, object2)\n }\n }\n}\n\nfunction blacklist(object, blacklistedKeys) {\n return Object.keys(object).reduce(function(p, key) {\n if (blacklistedKeys.indexOf(key) === -1) {\n p[key] = object[key]\n }\n return p\n }, {})\n}\n\nfunction camelToSnake(str) {\n var newKey = ''\n var index = 0\n var code\n var wasPrevNumber = true\n var wasPrevUppercase = true\n\n while (index < str.length) {\n code = str.charCodeAt(index)\n if (\n (!wasPrevUppercase && code >= 65 && code <= 90) ||\n (!wasPrevNumber && code >= 48 && code <= 57)\n ) {\n newKey += '_'\n newKey += str[index].toLowerCase()\n } else {\n newKey += str[index].toLowerCase()\n }\n wasPrevNumber = code >= 48 && code <= 57\n wasPrevUppercase = code >= 65 && code <= 90\n index++\n }\n\n return newKey\n}\n\nfunction snakeToCamel(str) {\n var parts = str.split('_')\n return parts.reduce(function(p, c) {\n return p + c.charAt(0).toUpperCase() + c.slice(1)\n }, parts.shift())\n}\n\nfunction toSnakeCase(object, exceptions) {\n if (\n typeof object !== 'object' ||\n assert.isArray(object) ||\n object === null\n ) {\n return object\n }\n exceptions = exceptions || []\n\n return Object.keys(object).reduce(function(p, key) {\n var newKey = exceptions.indexOf(key) === -1 ? camelToSnake(key) : key\n p[newKey] = toSnakeCase(object[key])\n return p\n }, {})\n}\n\nfunction toCamelCase(object, exceptions) {\n if (\n typeof object !== 'object' ||\n assert.isArray(object) ||\n object === null\n ) {\n return object\n }\n\n exceptions = exceptions || []\n\n return Object.keys(object).reduce(function(p, key) {\n var newKey = exceptions.indexOf(key) === -1 ? snakeToCamel(key) : key\n p[newKey] = toCamelCase(object[key])\n return p\n }, {})\n}\n\nfunction getLocationFromUrl(href) {\n var match = href.match(\n /^(https?:)\\/\\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\\?[^#]*|)(#.*|)$/\n )\n return (\n match && {\n href: href,\n protocol: match[1],\n host: match[2],\n hostname: match[3],\n port: match[4],\n pathname: match[5],\n search: match[6],\n hash: match[7]\n }\n )\n}\n\nfunction getOriginFromUrl(url) {\n if (!url) {\n return undefined\n }\n var parsed = getLocationFromUrl(url)\n var origin = parsed.protocol + '//' + parsed.hostname\n if (parsed.port) {\n origin += ':' + parsed.port\n }\n return origin\n}\n\nmodule.exports = {\n toSnakeCase: toSnakeCase,\n toCamelCase: toCamelCase,\n blacklist: blacklist,\n merge: merge,\n pick: pick,\n getKeysNotIn: getKeysNotIn,\n extend: extend,\n getOriginFromUrl: getOriginFromUrl,\n getLocationFromUrl: getLocationFromUrl\n}\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @desc Generic browser history class to allow redirects programmatically\n * @repo\n * @link https://auth0.com/blog/react-router-4-practical-tutorial/\n * @time 21 May 2018 @ 08:20\n *\n */\n//\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\n//\nimport { createBrowserHistory } from 'history'\nexport default createBrowserHistory()\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport { checkVisibility } from './core'\n\nconst AuthHOC = hocProps => (WrappedComponent, FallbackElement) => {\n class WithAuthorization extends Component {\n static propTypes = {\n userpermissions: PropTypes.array.isRequired\n }\n constructor(props) {\n super(props)\n\n this.state = {\n visible: false\n }\n }\n\n setVisibility = (componentPermissions, metadata) => {\n const { userpermissions } = this.props\n const { visible } = this.state\n const newVisibility = checkVisibility(\n userpermissions,\n componentPermissions\n )\n if (visible !== newVisibility) {\n this.setState({\n visible: newVisibility\n })\n }\n }\n\n processVisibility = () => {\n const { metadata } = this.props\n let componentPermissions = []\n if (metadata) {\n componentPermissions = metadata.permissions\n } else {\n console.error(\n 'No id prop present for filtering of Auth Component'\n )\n }\n if (!componentPermissions || componentPermissions.length === 0) {\n this.setState({\n visible: true\n })\n } else {\n this.setVisibility(componentPermissions, metadata)\n }\n }\n\n componentDidMount() {\n this.processVisibility()\n }\n\n componentDidUpdate(prevProps) {\n if (\n prevProps.userpermissions &&\n this.props.userpermissions &&\n prevProps.userpermissions.length === 0 &&\n this.props.userpermissions.length > 0\n ) {\n this.processVisibility()\n }\n }\n\n render() {\n const { visible } = this.state\n const { forwardedRef, ...rest } = this.props\n if (visible) {\n return \n }\n return typeof FallbackElement === 'function' ? (\n \n ) : (\n FallbackElement\n )\n }\n }\n\n const WithConnectedAuthorization = connect(\n state => {\n return {\n userpermissions: state.canonhub.accountAccess.data\n ? state.canonhub.accountAccess.data.Permissions\n : []\n }\n },\n null\n )(\n React.forwardRef((props, ref) => {\n return \n })\n )\n\n const WithAuthorizationRefs = React.forwardRef((props, ref) => {\n return \n })\n\n return WithAuthorizationRefs\n}\n\nexport default AuthHOC\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport Loading from 'components/common/loading'\n\nimport { checkVisibility } from './core'\n\nclass Authorization extends Component {\n static propTypes = {\n routeOrSectionPermissions: PropTypes.array,\n userPermissions: PropTypes.array,\n children: PropTypes.node.isRequired,\n fallbackElement: PropTypes.node\n }\n static defaultProps = {\n routeOrSectionPermissions: [],\n fallbackElement: null\n }\n constructor(props) {\n super(props)\n\n this.state = {\n visible: false\n }\n }\n\n UNSAFE_componentWillMount() {\n this.setVisibility()\n }\n\n componentDidUpdate() {\n this.setVisibility()\n }\n\n setVisibility() {\n const { userPermissions, routeOrSectionPermissions } = this.props\n const { visible } = this.state\n\n const newVisibility =\n routeOrSectionPermissions.length === 0\n ? true\n : checkVisibility(userPermissions, routeOrSectionPermissions)\n if (visible !== newVisibility) {\n this.setState({\n visible: newVisibility\n })\n }\n }\n\n render() {\n\n const { children, fallbackElement, accessLoading, detailsLoading } = this.props\n const { visible } = this.state\n\n if(accessLoading || detailsLoading){\n return(\n \n )\n }\n\n if (visible) {\n return children\n }\n return fallbackElement\n }\n}\n\nconst mapStateToProps = (state, ownProps) => {\n\n const {accountAccess,accountDetails } = state.canonhub\n\n const accessLoading = accountAccess ? accountAccess.loading : true\n const detailsLoading = accountDetails ? accountDetails.loading : true\n\n return {\n userPermissions: (accountAccess?.data)\n ? accountAccess.data.Permissions\n : [],\n accessLoading,\n detailsLoading\n }\n}\n\nexport default connect(\n mapStateToProps,\n null\n)(Authorization)\n","import {\n RRP_ADD_PERMISSION,\n RRP_REMOVE_PERMISSION,\n RRP_CLEAR\n} from './constants'\n\nexport function addRoles(roles = '[]') {\n return {\n type: RRP_ADD_PERMISSION,\n roles: Array.isArray(roles) ? roles : [roles]\n }\n}\n\nexport function removeRoles(role) {\n return {\n type: RRP_REMOVE_PERMISSION,\n role\n }\n}\n\nexport function clearRoles() {\n return {\n type: RRP_CLEAR\n }\n}\n","import AuthHOC from './auth-hoc'\n\nimport Permissions from './component'\nimport { checkVisibility } from './core'\n\nimport { addRoles, clearRoles, removeRoles } from './actions'\n\nexport {\n AuthHOC,\n Permissions,\n addRoles,\n clearRoles,\n removeRoles,\n checkVisibility\n}\n","// @flow\n\nexport const IS_SERVER = typeof window === 'undefined'\n\nexport const AU = 'en_AU'\nexport const NZ = 'en_NZ'\n\nexport const FIELD_TYPES = {\n CHECKBOX: 'checkbox',\n DATE: 'date',\n RADIO: 'radio',\n RANGE: 'range',\n SELECT: 'select',\n TEXTAREA: 'textarea',\n TOGGLE: 'toggle',\n TEXT: 'text',\n EMAIL: 'email',\n PHONE: 'phone',\n TEL: 'tel',\n FILE: 'file',\n FILEINPUT: 'fileInput'\n}\n\nexport const MATERIAL_ICONS = [\n {icon: 'image', extension: 'jpg'},\n {icon: 'image', extension: 'png'},\n {icon: 'image', extension: 'gif'},\n {icon: 'image', extension: 'jpeg'},\n {icon: 'file-pdf', extension: 'pdf'},\n {icon: 'link', extension: 'link'},\n {icon: 'globe', extension: 'url'},\n {icon: 'youtube', extension: 'video'}\n]\n\nexport const FORMULATE_FIELD_TYPES = {\n TEXT: 'TextField',\n SELECT: 'DropDownField',\n TEXTAREA: 'TextAreaField'\n}\n\nexport const FORMULATE_VALIDATION_TYPES = {\n REGEX: 'ValidationRegex',\n REQUIRED: 'ValidationMandatory'\n}\n\nexport const TIME_LIMT_FOR_FETCH = 3000000\n\nexport const STATES = [\n {\n label: 'New South Wales',\n value: 'NSW'\n },\n {\n label: 'Victoria',\n value: 'VIC'\n },\n {\n label: 'Queensland',\n value: 'QLD'\n },\n {\n label: 'Tasmania',\n value: 'TAS'\n },\n {\n label: 'South Australia',\n value: 'SA'\n },\n {\n label: 'Western Australia',\n value: 'WA'\n },\n {\n label: 'Northern Territory',\n value: 'NT'\n },\n {\n label: 'Australian Capital Territory',\n value: 'ACT'\n }\n]\n\nexport const PHONE_COUNTRIES = ['AU', 'FJ', 'JP', 'NZ', 'NF', 'PG', 'PH', 'SG', 'US']\n\n// contact categories\nexport const CONTACT_CATEGORIES = [\n {\n label: 'eConsumable',\n value: 'EFC'\n },\n {\n label: 'eMonitoring',\n value: 'EFS'\n },\n {\n label: 'eMeter Reading',\n value: 'EMR'\n },\n {\n label: 'Consumable Order',\n value: 'FC'\n },\n {\n label: 'Field Quotation',\n value: 'FQ'\n },\n {\n label: 'Field Service Order',\n value: 'FS'\n },\n {\n label: 'Indoor Quotation',\n value: 'IQ'\n },\n {\n label: 'Indoor Service Order',\n value: 'IS'\n },\n {\n label: 'IT Administrator',\n value: 'IT'\n },\n {\n label: 'Meter Reading',\n value: 'MR'\n },\n {\n label: 'Primary Contact',\n value: 'PC'\n },\n {\n label: 'Re-new Contract',\n value: 'RC'\n },\n {\n label: 'Contract Billing',\n value: 'TG'\n },\n]\n\n\nexport const CONTRACT_STATUSES = [\n {label: 'Active', value: 'Active'},\n {label: 'Expired', value: 'Expired'},\n {label: 'Draft', value: 'Draft'},\n {label: 'Confirmed', value: 'Confirmed'}\n]\n\nexport const restrictOptionsAu = [\n {\n label: 'Restrict by Serial, Site, State or Postcode',\n value: ''\n },\n {\n label: ' Restricted by Serial Number',\n value: 'SerialNumber'\n },\n {\n label: 'Restricted by Postcode',\n value: 'PostCode'\n },\n {\n label: 'Restricted by State',\n value: 'State'\n },\n {\n label: 'Restricted by Site',\n value: 'Site'\n }\n]\n\nexport const restrictOptions = [\n {\n label: 'Restrict by Serial or Postcode',\n value: ''\n },\n {\n label: ' Restricted by Serial Number',\n value: 'SerialNumber'\n },\n {\n label: 'Restricted by Postcode',\n value: 'PostCode'\n }\n]\n\nexport const contactOptions = [\n {\n label: 'Update information',\n value: 'Update information'\n },\n {\n label: 'Suggestions and feedback',\n value: 'Suggestions and feedback'\n },\n {\n label: 'Request copy of a contract',\n value: 'Request copy of a contract'\n },\n {\n label: 'Network forms help',\n value: 'Network forms help'\n },\n {\n label: 'Safety forms help',\n value: 'Safety forms help'\n },\n {\n label: 'Other',\n value: 'Other'\n }\n]\n","var base64 = require('base64-js')\n\nfunction padding(str) {\n var mod = str.length % 4\n var pad = 4 - mod\n\n if (mod === 0) {\n return str\n }\n\n return str + new Array(1 + pad).join('=')\n}\n\nfunction stringToByteArray(str) {\n var arr = new Array(str.length)\n for (var a = 0; a < str.length; a++) {\n arr[a] = str.charCodeAt(a)\n }\n return arr\n}\n\nfunction byteArrayToString(array) {\n var result = ''\n for (var i = 0; i < array.length; i++) {\n result += String.fromCharCode(array[i])\n }\n return result\n}\n\nfunction encode(str) {\n return base64\n .fromByteArray(stringToByteArray(str))\n .replace(/\\+/g, '-') // Convert '+' to '-'\n .replace(/\\//g, '_') // Convert '/' to '_'\n}\n\nfunction decode(str) {\n str = padding(str)\n .replace(/-/g, '+') // Convert '-' to '+'\n .replace(/_/g, '/') // Convert '_' to '/'\n\n return byteArrayToString(base64.toByteArray(str))\n}\n\nmodule.exports = {\n encode: encode,\n decode: decode\n}\n","/* eslint-disable no-continue */\n\nfunction get() {\n if (!Object.assign) {\n return objectAssignPolyfill\n }\n\n return Object.assign\n}\n\nfunction objectAssignPolyfill(target) {\n // eslint-disable-next-line\n 'use strict'\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object')\n }\n\n var to = Object(target)\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i]\n if (nextSource === undefined || nextSource === null) {\n continue\n }\n\n var keysArray = Object.keys(Object(nextSource))\n for (\n var nextIndex = 0, len = keysArray.length;\n nextIndex < len;\n nextIndex++\n ) {\n var nextKey = keysArray[nextIndex]\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey)\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey]\n }\n }\n }\n return to\n}\n\nmodule.exports = {\n get: get,\n objectAssignPolyfill: objectAssignPolyfill\n}\n","var windowHandler = require('../window')\nvar DummyStorage = require('./dummy')\nvar CookieStorage = require('./cookie')\nvar Warn = require('../warn')\n\nfunction StorageHandler() {\n this.warn = new Warn({})\n this.storage = new CookieStorage()\n try {\n // some browsers throw an error when trying to access localStorage\n // when localStorage is disabled.\n var localStorage = windowHandler.getWindow().localStorage\n if (localStorage) {\n this.storage = localStorage\n }\n } catch (e) {\n this.warn.warning(e)\n this.warn.warning(\n \"Can't use localStorage. Using CookieStorage instead.\"\n )\n }\n}\n\nStorageHandler.prototype.failover = function() {\n if (this.storage instanceof DummyStorage) {\n this.warn.warning('DummyStorage: ignore failover')\n return\n } else if (this.storage instanceof CookieStorage) {\n this.warn.warning('CookieStorage: failing over DummyStorage')\n this.storage = new DummyStorage()\n } else {\n this.warn.warning('LocalStorage: failing over CookieStorage')\n this.storage = new CookieStorage()\n }\n}\n\nStorageHandler.prototype.getItem = function(key) {\n try {\n return this.storage.getItem(key)\n } catch (e) {\n this.warn.warning(e)\n this.failover()\n return this.getItem(key)\n }\n}\n\nStorageHandler.prototype.removeItem = function(key) {\n try {\n return this.storage.removeItem(key)\n } catch (e) {\n this.warn.warning(e)\n this.failover()\n return this.removeItem(key)\n }\n}\n\nStorageHandler.prototype.setItem = function(key, value, options) {\n try {\n return this.storage.setItem(key, value, options)\n } catch (e) {\n this.warn.warning(e)\n this.failover()\n return this.setItem(key, value, options)\n }\n}\n\nmodule.exports = StorageHandler\n","function DummyStorage() {}\n\nDummyStorage.prototype.getItem = function() {\n return null\n}\n\nDummyStorage.prototype.removeItem = function() {}\n\nDummyStorage.prototype.setItem = function() {}\n\nmodule.exports = DummyStorage\n","var Cookie = require('js-cookie')\nvar objectHelper = require('../object')\nfunction CookieStorage() {}\n\nCookieStorage.prototype.getItem = function(key) {\n return Cookie.get(key)\n}\n\nCookieStorage.prototype.removeItem = function(key) {\n Cookie.remove(key)\n}\n\nCookieStorage.prototype.setItem = function(key, value, options) {\n var params = objectHelper.extend(\n {\n expires: 1 // 1 day\n },\n options\n )\n Cookie.set(key, value, params)\n}\n\nmodule.exports = CookieStorage\n","// For future reference:,\n// The only parameters that should be whitelisted are parameters\n// defined by the specification, or existing parameters that we\n// need for compatibility\n\nvar objectHelper = require('./object')\n\nvar tokenParams = [\n // auth0\n 'realm',\n 'audience',\n // oauth2\n 'client_id',\n 'client_secret',\n 'redirect_uri',\n 'scope',\n 'code',\n 'grant_type',\n 'username',\n 'password',\n 'refresh_token',\n 'assertion',\n 'client_assertion',\n 'client_assertion_type',\n 'code_verifier'\n]\n\nvar authorizeParams = [\n // auth0\n 'connection',\n 'connection_scope',\n 'auth0Client',\n 'owp',\n 'device',\n 'realm',\n\n 'protocol',\n '_csrf',\n '_intstate',\n 'login_ticket',\n\n // oauth2\n 'client_id',\n 'response_type',\n 'response_mode',\n 'redirect_uri',\n 'audience',\n 'scope',\n 'state',\n 'nonce',\n 'display',\n 'prompt',\n 'max_age',\n 'ui_locales',\n 'claims_locales',\n 'id_token_hint',\n 'login_hint',\n 'acr_values',\n 'claims',\n 'registration',\n 'request',\n 'request_uri',\n 'code_challenge',\n 'code_challenge_method'\n]\n\nfunction oauthAuthorizeParams(warn, params) {\n var notAllowed = objectHelper.getKeysNotIn(params, authorizeParams)\n\n if (notAllowed.length > 0) {\n warn.warning(\n 'Following parameters are not allowed on the `/authorize` endpoint: [' +\n notAllowed.join(',') +\n ']'\n )\n }\n\n return params\n}\n\nfunction oauthTokenParams(warn, params) {\n return objectHelper.pick(params, tokenParams)\n}\n\nmodule.exports = {\n oauthTokenParams: oauthTokenParams,\n oauthAuthorizeParams: oauthAuthorizeParams\n}\n","var urljoin = require('url-join')\n\nvar objectHelper = require('../helper/object')\nvar assert = require('../helper/assert')\nvar qs = require('qs')\nvar responseHandler = require('../helper/response-handler')\n\nfunction PasswordlessAuthentication(request, options) {\n this.baseOptions = options\n this.request = request\n}\n\nPasswordlessAuthentication.prototype.buildVerifyUrl = function(options) {\n var params\n var qString\n\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n verificationCode: {\n type: 'string',\n message: 'verificationCode option is required'\n },\n phoneNumber: {\n optional: false,\n type: 'string',\n message: 'phoneNumber option is required',\n condition: function(o) {\n return !o.email\n }\n },\n email: {\n optional: false,\n type: 'string',\n message: 'email option is required',\n condition: function(o) {\n return !o.phoneNumber\n }\n }\n }\n )\n /* eslint-enable */\n\n params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'responseMode',\n 'redirectUri',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'protocol',\n 'nonce'\n ])\n .with(options)\n\n // eslint-disable-next-line\n if (this.baseOptions._sendTelemetry) {\n params.auth0Client = this.request.getTelemetryData()\n }\n\n params = objectHelper.toSnakeCase(params, ['auth0Client'])\n\n qString = qs.stringify(params)\n\n return urljoin(\n this.baseOptions.rootUrl,\n 'passwordless',\n 'verify_redirect',\n '?' + qString\n )\n}\n\nPasswordlessAuthentication.prototype.start = function(options, cb) {\n var url\n var body\n\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n send: {\n type: 'string',\n message: 'send option is required',\n values: ['link', 'code'],\n value_message: 'send is not valid ([link, code])'\n },\n phoneNumber: {\n optional: true,\n type: 'string',\n message: 'phoneNumber option is required',\n condition: function(o) {\n return o.send === 'code' || !o.email\n }\n },\n email: {\n optional: true,\n type: 'string',\n message: 'email option is required',\n condition: function(o) {\n return o.send === 'link' || !o.phoneNumber\n }\n },\n authParams: {\n optional: true,\n type: 'object',\n message: 'authParams option is required'\n }\n }\n )\n /* eslint-enable */\n\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'passwordless', 'start')\n\n body = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'responseType',\n 'redirectUri',\n 'scope'\n ])\n .with(options)\n\n if (body.scope) {\n body.authParams = body.authParams || {}\n body.authParams.scope = body.scope\n }\n\n if (body.redirectUri) {\n body.authParams = body.authParams || {}\n body.authParams.redirect_uri = body.redirectUri\n }\n\n if (body.responseType) {\n body.authParams = body.authParams || {}\n body.authParams.response_type = body.responseType\n }\n\n delete body.redirectUri\n delete body.responseType\n delete body.scope\n\n body = objectHelper.toSnakeCase(body, ['auth0Client', 'authParams'])\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\nPasswordlessAuthentication.prototype.verify = function(options, cb) {\n var url\n var cleanOption\n\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n verificationCode: {\n type: 'string',\n message: 'verificationCode option is required'\n },\n phoneNumber: {\n optional: false,\n type: 'string',\n message: 'phoneNumber option is required',\n condition: function(o) {\n return !o.email\n }\n },\n email: {\n optional: false,\n type: 'string',\n message: 'email option is required',\n condition: function(o) {\n return !o.phoneNumber\n }\n }\n }\n )\n /* eslint-enable */\n\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n cleanOption = objectHelper.pick(options, [\n 'connection',\n 'verificationCode',\n 'phoneNumber',\n 'email',\n 'auth0Client'\n ])\n cleanOption = objectHelper.toSnakeCase(cleanOption, ['auth0Client'])\n\n url = urljoin(this.baseOptions.rootUrl, 'passwordless', 'verify')\n\n return this.request\n .post(url)\n .send(cleanOption)\n .end(responseHandler(cb))\n}\n\nmodule.exports = PasswordlessAuthentication\n","var urljoin = require('url-join')\n\nvar objectHelper = require('../helper/object')\nvar assert = require('../helper/assert')\nvar responseHandler = require('../helper/response-handler')\n\nfunction DBConnection(request, options) {\n this.baseOptions = options\n this.request = request\n}\n\n/**\n * @callback signUpCallback\n * @param {Error} [err] error returned by Auth0 with the reason why the signup failed\n * @param {Object} [result] result of the signup request\n * @param {Object} result.email user's email\n * @param {Object} result.emailVerified if the user's email was verified\n */\n\n/**\n * Creates a new user in a Auth0 Database connection\n *\n * @method signup\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {Object} [options.userMetadata] additional signup attributes used for creating the user. Will be stored in `user_metadata`\n * @param {signUpCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#signup}\n */\nDBConnection.prototype.signup = function(options, cb) {\n var url\n var body\n var metadata\n\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n email: { type: 'string', message: 'email option is required' },\n password: { type: 'string', message: 'password option is required' }\n }\n )\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'dbconnections', 'signup')\n\n body = objectHelper.merge(this.baseOptions, ['clientID']).with(options)\n\n metadata = body.user_metadata || body.userMetadata\n\n body = objectHelper.blacklist(body, [\n 'scope',\n 'userMetadata',\n 'user_metadata'\n ])\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n\n if (metadata) {\n body.user_metadata = metadata\n }\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\n/**\n * @callback changePasswordCallback\n * @param {Error} [err] error returned by Auth0 with the reason why the request failed\n */\n\n/**\n * Request an email with instruction to change a user's password\n *\n * @method changePassword\n * @param {Object} options\n * @param {String} options.email address where the user will receive the change password email. It should match the user's email in Auth0\n * @param {String} options.connection name of the connection where the user was created\n * @param {changePasswordCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#change-password}\n */\nDBConnection.prototype.changePassword = function(options, cb) {\n var url\n var body\n\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n connection: {\n type: 'string',\n message: 'connection option is required'\n },\n email: { type: 'string', message: 'email option is required' }\n }\n )\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'dbconnections', 'change_password')\n\n body = objectHelper\n .merge(this.baseOptions, ['clientID'])\n .with(options, ['email', 'connection'])\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\nmodule.exports = DBConnection\n","var version = require('../version')\n\nfunction PluginHandler(webAuth, plugins) {\n this.plugins = plugins\n\n for (var a = 0; a < this.plugins.length; a++) {\n if (this.plugins[a].version !== version.raw) {\n var pluginName = ''\n\n if (\n this.plugins[a].constructor &&\n this.plugins[a].constructor.name\n ) {\n pluginName = this.plugins[a].constructor.name\n }\n\n throw new Error(\n 'Plugin ' +\n pluginName +\n ' version (' +\n this.plugins[a].version +\n ') ' +\n 'is not compatible with the SDK version (' +\n version.raw +\n ')'\n )\n }\n\n this.plugins[a].setWebAuth(webAuth)\n }\n}\n\nPluginHandler.prototype.get = function(extensibilityPoint) {\n for (var a = 0; a < this.plugins.length; a++) {\n if (this.plugins[a].supports(extensibilityPoint)) {\n return this.plugins[a].init()\n }\n }\n\n return null\n}\n\nmodule.exports = PluginHandler\n","var objectHelper = require('./object')\n\nfunction redirect(url) {\n global.window.location = url\n}\n\nfunction getDocument() {\n return global.window.document\n}\n\nfunction getWindow() {\n return global.window\n}\n\nfunction getOrigin() {\n var location = global.window.location\n var origin = location.origin\n if (!origin) {\n origin = objectHelper.getOriginFromUrl(location.href)\n }\n return origin\n}\n\nmodule.exports = {\n redirect: redirect,\n getDocument: getDocument,\n getWindow: getWindow,\n getOrigin: getOrigin\n}\n","var windowHelper = require('./window')\n\nfunction randomString(length) {\n // eslint-disable-next-line\n var bytes = new Uint8Array(length)\n var result = []\n var charset =\n '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~'\n\n var cryptoObj =\n windowHelper.getWindow().crypto || windowHelper.getWindow().msCrypto\n if (!cryptoObj) {\n return null\n }\n\n var random = cryptoObj.getRandomValues(bytes)\n\n for (var a = 0; a < random.length; a++) {\n result.push(charset[random[a] % charset.length])\n }\n\n return result.join('')\n}\n\nmodule.exports = {\n randomString: randomString\n}\n","var CrossOriginAuthentication = require('./cross-origin-authentication')\nvar Warn = require('../helper/warn')\n\nfunction Redirect(auth0, options) {\n this.webAuth = auth0\n this.baseOptions = options\n this.crossOriginAuthentication = new CrossOriginAuthentication(\n auth0,\n this.baseOptions\n )\n\n this.warn = new Warn({\n disableWarnings: !!options._disableDeprecationWarnings\n })\n}\n\n/**\n * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow. You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`.\n * Some browsers might not be able to successfully authenticate if 3rd party cookies are disabled in your browser. [See here for more information.]{@link https://auth0.com/docs/cross-origin-authentication}.\n * After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.\n *\n * @method loginWithCredentials\n * @deprecated This method will be released in the next major version. Use `webAuth.login` instead.\n * @param {Object} options options used in the {@link authorize} call after the login_ticket is acquired\n * @param {String} [options.username] Username (mutually exclusive with email)\n * @param {String} [options.email] Email (mutually exclusive with username)\n * @param {String} options.password Password\n * @param {String} [options.connection] Connection used to authenticate the user, it can be a realm name or a database connection name\n * @param {crossOriginLoginCallback} cb Callback function called only when an authentication error, like invalid username or password, occurs. For other types of errors, there will be a redirect to the `redirectUri`.\n */\nRedirect.prototype.loginWithCredentials = function(options, cb) {\n options.realm = options.realm || options.connection\n delete options.connection\n this.crossOriginAuthentication.login(options, cb)\n}\n\n/**\n * Signs up a new user and automatically logs the user in after the signup.\n *\n * @method signupAndLogin\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {crossOriginLoginCallback} cb\n */\nRedirect.prototype.signupAndLogin = function(options, cb) {\n var _this = this\n return this.webAuth.client.dbConnection.signup(options, function(err) {\n if (err) {\n return cb(err)\n }\n options.realm = options.realm || options.connection\n delete options.connection\n return _this.webAuth.login(options, cb)\n })\n}\n\nmodule.exports = Redirect\n","var urljoin = require('url-join')\nvar WinChan = require('winchan')\n\nvar urlHelper = require('../helper/url')\nvar assert = require('../helper/assert')\nvar responseHandler = require('../helper/response-handler')\nvar PopupHandler = require('../helper/popup-handler')\nvar objectHelper = require('../helper/object')\nvar windowHelper = require('../helper/window')\nvar Warn = require('../helper/warn')\nvar TransactionManager = require('./transaction-manager')\nvar CrossOriginAuthentication = require('./cross-origin-authentication')\n\nfunction Popup(webAuth, options) {\n this.baseOptions = options\n this.baseOptions.popupOrigin = options.popupOrigin\n this.client = webAuth.client\n this.webAuth = webAuth\n\n this.transactionManager = new TransactionManager(\n this.baseOptions.transaction\n )\n this.crossOriginAuthentication = new CrossOriginAuthentication(\n webAuth,\n this.baseOptions\n )\n this.warn = new Warn({\n disableWarnings: !!options._disableDeprecationWarnings\n })\n}\n\n/**\n * Returns a new instance of the popup handler\n *\n * @method buildPopupHandler\n * @private\n */\nPopup.prototype.buildPopupHandler = function() {\n var pluginHandler = this.baseOptions.plugins.get('popup.getPopupHandler')\n\n if (pluginHandler) {\n return pluginHandler.getPopupHandler()\n }\n\n return new PopupHandler()\n}\n\n/**\n * Initializes the popup window and returns the instance to be used later in order to avoid being blocked by the browser.\n *\n * @method preload\n * @param {Object} options receives the window height and width and any other window feature to be sent to window.open\n */\nPopup.prototype.preload = function(options) {\n options = options || {}\n\n var popup = this.buildPopupHandler()\n\n popup.preload(options)\n return popup\n}\n\n/**\n * Internal use.\n *\n * @method getPopupHandler\n * @private\n */\nPopup.prototype.getPopupHandler = function(options, preload) {\n if (options.popupHandler) {\n return options.popupHandler\n }\n\n if (preload) {\n return this.preload(options)\n }\n\n return this.buildPopupHandler()\n}\n\n/**\n * Handles the popup logic for the callback page.\n *\n * @method callback\n * @param {Object} options\n * @param {String} options.hash the url hash. If not provided it will extract from window.location.hash\n * @param {String} [options.state] value originally sent in `state` parameter to {@link authorize} to mitigate XSRF\n * @param {String} [options.nonce] value originally sent in `nonce` parameter to {@link authorize} to prevent replay attacks\n * @see {@link parseHash}\n */\nPopup.prototype.callback = function(options) {\n var _this = this\n var theWindow = windowHelper.getWindow()\n options = options || {}\n var originUrl =\n options.popupOrigin ||\n this.baseOptions.popupOrigin ||\n windowHelper.getOrigin()\n\n /*\n in IE 11, there's a bug that makes window.opener return undefined.\n The callback page will still call `popup.callback()` which will run this method\n in the relay page. WinChan expects the relay page to have a global `doPost` function,\n which will be called with the response.\n\n IE11 Bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/110920/\n */\n if (!theWindow.opener) {\n theWindow.doPost = function(msg) {\n if (theWindow.parent) {\n theWindow.parent.postMessage(msg, originUrl)\n }\n }\n return\n }\n\n WinChan.onOpen(function(popupOrigin, r, cb) {\n if (popupOrigin !== originUrl) {\n return cb({\n error: 'origin_mismatch',\n error_description:\n \"The popup's origin (\" +\n popupOrigin +\n ') should match the `popupOrigin` parameter (' +\n originUrl +\n ').'\n })\n }\n _this.webAuth.parseHash(options || {}, function(err, data) {\n return cb(err || data)\n })\n })\n}\n\n/**\n * Shows inside a new window the hosted login page (`/authorize`) in order to start a new authN/authZ transaction and post its result using `postMessage`.\n *\n * @method authorize\n * @param {Object} options\n * @param {String} [options.domain] your Auth0 domain\n * @param {String} [options.clientID] the Client ID found on your Application settings page\n * @param {String} options.redirectUri url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} options.responseType type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `code`, `token`, `id_token`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0}\n * @param {String} [options.responseMode] how the Auth response is encoded and redirected back to the client. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`. {@link https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes}\n * @param {String} [options.state] value used to mitigate XSRF attacks. {@link https://auth0.com/docs/protocols/oauth2/oauth-state}\n * @param {String} [options.nonce] value used to mitigate replay attacks when using Implicit Grant. {@link https://auth0.com/docs/api-auth/tutorials/nonce}\n * @param {String} [options.scope] scopes to be requested during Auth. e.g. `openid email`\n * @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth\n * @param {Boolean} [options.owp] determines if Auth0 should render the relay page or not and the caller is responsible of handling the response.\n * @param {authorizeCallback} cb\n * @see {@link https://auth0.com/docs/api/authentication#authorize-client}\n */\nPopup.prototype.authorize = function(options, cb) {\n var popup\n var url\n var relayUrl\n var popOpts = {}\n\n var pluginHandler = this.baseOptions.plugins.get('popup.authorize')\n\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'scope',\n 'domain',\n 'audience',\n 'tenant',\n 'responseType',\n 'redirectUri',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(objectHelper.blacklist(options, ['popupHandler']))\n\n assert.check(\n params,\n { type: 'object', message: 'options parameter is not valid' },\n {\n responseType: {\n type: 'string',\n message: 'responseType option is required'\n }\n }\n )\n\n // the relay page should not be necessary as long it happens in the same domain\n // (a redirectUri shoul be provided). It is necessary when using OWP\n relayUrl = urljoin(this.baseOptions.rootUrl, 'relay.html')\n\n // if a owp is enabled, it should use the owp flag\n if (options.owp) {\n // used by server to render the relay page instead of sending the chunk in the\n // url to the callback\n params.owp = true\n } else {\n popOpts.origin = urlHelper.extractOrigin(params.redirectUri)\n relayUrl = params.redirectUri\n }\n\n if (options.popupOptions) {\n popOpts.popupOptions = objectHelper.pick(options.popupOptions, [\n 'width',\n 'height'\n ])\n }\n\n if (pluginHandler) {\n params = pluginHandler.processParams(params)\n }\n\n params = this.transactionManager.process(params)\n params.scope = params.scope || 'openid profile email'\n delete params.domain\n\n url = this.client.buildAuthorizeUrl(params)\n\n popup = this.getPopupHandler(options)\n\n return popup.load(url, relayUrl, popOpts, responseHandler(cb))\n}\n\n/**\n * Performs authentication with username/email and password with a database connection inside a new window\n *\n * This method is not compatible with API Auth so if you need to fetch API tokens with audience\n * you should use {@link authorize} or {@link login}.\n *\n * @method loginWithCredentials\n * @param {Object} options\n * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} [options.responseType] type of the response used. It can be any of the values `code` and `token`\n * @param {String} [options.responseMode] how the AuthN response is encoded and redirected back to the client. Supported values are `query` and `fragment`. The `query` value is only supported when `responseType` is `code`.\n * @param {String} [options.scope] scopes to be requested during AuthN. e.g. `openid email`\n * @param {credentialsCallback} cb\n */\nPopup.prototype.loginWithCredentials = function(options, cb) {\n options.realm = options.realm || options.connection\n options.popup = true\n options = objectHelper\n .merge(this.baseOptions, [\n 'redirectUri',\n 'responseType',\n 'state',\n 'nonce'\n ])\n .with(objectHelper.blacklist(options, ['popupHandler', 'connection']))\n options = this.transactionManager.process(options)\n this.crossOriginAuthentication.login(options, cb)\n}\n\n/**\n * Verifies the passwordless TOTP and redirects to finish the passwordless transaction\n *\n * @method passwordlessVerify\n * @param {Object} options\n * @param {String} options.type `sms` or `email`\n * @param {String} options.phoneNumber only if type = sms\n * @param {String} options.email only if type = email\n * @param {String} options.connection the connection name\n * @param {String} options.verificationCode the TOTP code\n * @param {Function} cb\n */\nPopup.prototype.passwordlessVerify = function(options, cb) {\n var _this = this\n return this.client.passwordless.verify(\n objectHelper.blacklist(options, ['popupHandler']),\n function(err) {\n if (err) {\n return cb(err)\n }\n\n options.username = options.phoneNumber || options.email\n options.password = options.verificationCode\n\n delete options.email\n delete options.phoneNumber\n delete options.verificationCode\n delete options.type\n\n _this.client.loginWithResourceOwner(options, cb)\n }\n )\n}\n\n/**\n * Signs up a new user and automatically logs the user in after the signup.\n *\n * This method is not compatible with API Auth so if you need to fetch API tokens with audience\n * you should use {@link authorize} or {@link signupAndAuthorize}.\n *\n * @method signupAndLogin\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {credentialsCallback} cb\n */\nPopup.prototype.signupAndLogin = function(options, cb) {\n var _this = this\n\n // Preload popup to avoid the browser to block it since the login happens later\n var popupHandler = this.getPopupHandler(options, true)\n options.popupHandler = popupHandler\n\n return this.client.dbConnection.signup(\n objectHelper.blacklist(options, ['popupHandler']),\n function(err) {\n if (err) {\n if (popupHandler._current_popup) {\n popupHandler._current_popup.kill()\n }\n return cb(err)\n }\n _this.loginWithCredentials(options, cb)\n }\n )\n}\n\nmodule.exports = Popup\n","// given a URL, extract the origin. Taken from: https://github.com/firebase/firebase-simple-login/blob/d2cb95b9f812d8488bdbfba51c3a7c153ba1a074/js/src/simple-login/transports/WinChan.js#L25-L30\nfunction extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url)\n if (m) return m[1]\n return url\n}\n\nmodule.exports = {\n extractOrigin: extractOrigin\n}\n","/* eslint-disable no-restricted-syntax */\n/* eslint-disable guard-for-in */\nvar WinChan = require('winchan')\n\nvar windowHandler = require('./window')\nvar objectHelper = require('./object')\nvar qs = require('qs')\n\nfunction PopupHandler() {\n this._current_popup = null\n}\n\nPopupHandler.prototype.calculatePosition = function(options) {\n var width = options.width || 500\n var height = options.height || 600\n var _window = windowHandler.getWindow()\n\n var screenX =\n typeof _window.screenX !== 'undefined'\n ? _window.screenX\n : _window.screenLeft\n var screenY =\n typeof _window.screenY !== 'undefined'\n ? _window.screenY\n : _window.screenTop\n\n var outerWidth =\n typeof _window.outerWidth !== 'undefined'\n ? _window.outerWidth\n : _window.document.body.clientWidth\n\n var outerHeight =\n typeof _window.outerHeight !== 'undefined'\n ? _window.outerHeight\n : _window.document.body.clientHeight\n\n var left = (outerWidth - width) / 2\n var top = (outerHeight - height) / 2\n\n return {\n width: width,\n height: height,\n left: screenX + left,\n top: screenY + top\n }\n}\n\nPopupHandler.prototype.preload = function(options) {\n var _this = this\n var _window = windowHandler.getWindow()\n var popupPosition = this.calculatePosition(options.popupOptions || {})\n var popupOptions = objectHelper\n .merge(popupPosition)\n .with(options.popupOptions)\n var url = options.url || 'about:blank'\n var windowFeatures = qs.stringify(popupOptions, {\n encode: false,\n delimiter: ','\n })\n\n if (this._current_popup && !this._current_popup.closed) {\n return this._current_popup\n }\n\n this._current_popup = _window.open(\n url,\n 'auth0_signup_popup',\n windowFeatures\n )\n\n this._current_popup.kill = function() {\n this.close()\n _this._current_popup = null\n }\n\n return this._current_popup\n}\n\nPopupHandler.prototype.load = function(url, relayUrl, options, cb) {\n var _this = this\n var popupPosition = this.calculatePosition(options.popupOptions || {})\n var popupOptions = objectHelper\n .merge(popupPosition)\n .with(options.popupOptions)\n\n var winchanOptions = objectHelper\n .merge({\n url: url,\n relay_url: relayUrl,\n window_features: qs.stringify(popupOptions, {\n delimiter: ',',\n encode: false\n }),\n popup: this._current_popup\n })\n .with(options)\n\n var popup = WinChan.open(winchanOptions, function(err, data) {\n _this._current_popup = null\n return cb(err, data)\n })\n\n popup.focus()\n\n return popup\n}\n\nmodule.exports = PopupHandler\n","var IframeHandler = require('../helper/iframe-handler')\nvar windowHelper = require('../helper/window')\n\nfunction SilentAuthenticationHandler(options) {\n this.authenticationUrl = options.authenticationUrl\n this.timeout = options.timeout || 60 * 1000\n this.handler = null\n this.postMessageDataType = options.postMessageDataType || false\n\n // prefer origin from options, fallback to origin from browser, and some browsers (for example MS Edge) don't support origin; fallback to construct origin manually\n this.postMessageOrigin =\n options.postMessageOrigin ||\n windowHelper.getWindow().location.origin ||\n windowHelper.getWindow().location.protocol +\n '//' +\n windowHelper.getWindow().location.hostname +\n (windowHelper.getWindow().location.port\n ? ':' + windowHelper.getWindow().location.port\n : '')\n}\n\nSilentAuthenticationHandler.create = function(options) {\n return new SilentAuthenticationHandler(options)\n}\n\nSilentAuthenticationHandler.prototype.login = function(\n usePostMessage,\n callback\n) {\n this.handler = new IframeHandler({\n auth0: this.auth0,\n url: this.authenticationUrl,\n eventListenerType: usePostMessage ? 'message' : 'load',\n callback: this.getCallbackHandler(callback, usePostMessage),\n timeout: this.timeout,\n eventValidator: this.getEventValidator(),\n timeoutCallback: function() {\n callback(\n null,\n '#error=timeout&error_description=Timeout+during+authentication+renew.'\n )\n },\n usePostMessage: usePostMessage || false\n })\n\n this.handler.init()\n}\n\nSilentAuthenticationHandler.prototype.getEventValidator = function() {\n var _this = this\n return {\n isValid: function(eventData) {\n switch (eventData.event.type) {\n case 'message':\n // Message must come from the expected origin and iframe window.\n if (\n eventData.event.origin !== _this.postMessageOrigin ||\n eventData.event.source !==\n _this.handler.iframe.contentWindow\n ) {\n return false\n }\n\n // Default behaviour, return all message events from the iframe.\n if (_this.postMessageDataType === false) {\n return true\n }\n\n return (\n eventData.event.data.type &&\n eventData.event.data.type === _this.postMessageDataType\n )\n\n case 'load':\n if (\n eventData.sourceObject.contentWindow.location\n .protocol === 'about:'\n ) {\n // Chrome is automatically loading the about:blank page, we ignore this.\n return false\n }\n // Fall through to default\n default:\n return true\n }\n }\n }\n}\n\nSilentAuthenticationHandler.prototype.getCallbackHandler = function(\n callback,\n usePostMessage\n) {\n return function(eventData) {\n var callbackValue\n if (!usePostMessage) {\n callbackValue = eventData.sourceObject.contentWindow.location.hash\n } else if (\n typeof eventData.event.data === 'object' &&\n eventData.event.data.hash\n ) {\n callbackValue = eventData.event.data.hash\n } else {\n callbackValue = eventData.event.data\n }\n callback(null, callbackValue)\n }\n}\n\nmodule.exports = SilentAuthenticationHandler\n","var urljoin = require('url-join')\nvar qs = require('qs')\n\nvar UsernamePassword = require('./username-password')\nvar RequestBuilder = require('../helper/request-builder')\nvar responseHandler = require('../helper/response-handler')\nvar objectHelper = require('../helper/object')\nvar windowHelper = require('../helper/window')\nvar Warn = require('../helper/warn')\nvar assert = require('../helper/assert')\n\nfunction HostedPages(client, options) {\n this.baseOptions = options\n this.client = client\n this.request = new RequestBuilder(this.baseOptions)\n\n this.warn = new Warn({\n disableWarnings: !!options._disableDeprecationWarnings\n })\n}\n\n/**\n * @callback credentialsCallback\n * @param {Error} [err] error returned by Auth0 with the reason of the Auth failure\n * @param {Object} [result] result of the AuthN request\n * @param {String} result.accessToken token that can be used with {@link userinfo}\n * @param {String} [result.idToken] token that identifies the user\n * @param {String} [result.refreshToken] token that can be used to get new access tokens from Auth0. Note that not all Auth0 Applications can request them or the resource server might not allow them.\n */\n\n/**\n * Performs authentication with username/email and password with a database connection\n *\n * This method is not compatible with API Auth so if you need to fetch API tokens with audience\n * you should use {@link authorize} or {@link login}.\n *\n * @method loginWithCredentials\n * @param {Object} options\n * @param {String} [options.redirectUri] url that the Auth0 will redirect after Auth with the Authorization Response\n * @param {String} [options.responseType] type of the response used. It can be any of the values `code` and `token`\n * @param {String} [options.responseMode] how the AuthN response is encoded and redirected back to the client. Supported values are `query` and `fragment`\n * @param {String} [options.scope] scopes to be requested during AuthN. e.g. `openid email`\n * @param {credentialsCallback} cb\n */\nHostedPages.prototype.login = function(options, cb) {\n if (windowHelper.getWindow().location.host !== this.baseOptions.domain) {\n throw new Error(\n 'This method is meant to be used only inside the Universal Login Page.'\n )\n }\n var usernamePassword\n\n var params = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'redirectUri',\n 'tenant',\n 'responseType',\n 'responseMode',\n 'scope',\n 'audience',\n '_csrf',\n 'state',\n '_intstate',\n 'nonce'\n ])\n .with(options)\n\n assert.check(\n params,\n { type: 'object', message: 'options parameter is not valid' },\n {\n responseType: {\n type: 'string',\n message: 'responseType option is required'\n }\n }\n )\n\n usernamePassword = new UsernamePassword(this.baseOptions)\n return usernamePassword.login(params, function(err, data) {\n if (err) {\n return cb(err)\n }\n return usernamePassword.callback(data)\n })\n}\n\n/**\n * Signs up a new user and automatically logs the user in after the signup.\n *\n * @method signupAndLogin\n * @param {Object} options\n * @param {String} options.email user email address\n * @param {String} options.password user password\n * @param {String} options.connection name of the connection where the user will be created\n * @param {credentialsCallback} cb\n */\nHostedPages.prototype.signupAndLogin = function(options, cb) {\n var _this = this\n return _this.client.client.dbConnection.signup(options, function(err) {\n if (err) {\n return cb(err)\n }\n return _this.login(options, cb)\n })\n}\n\nHostedPages.prototype.getSSOData = function(withActiveDirectories, cb) {\n var url\n var params = ''\n\n if (typeof withActiveDirectories === 'function') {\n cb = withActiveDirectories\n withActiveDirectories = false\n }\n\n assert.check(withActiveDirectories, {\n type: 'boolean',\n message: 'withActiveDirectories parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n if (withActiveDirectories) {\n params =\n '?' +\n qs.stringify({\n ldaps: 1,\n client_id: this.baseOptions.clientID\n })\n }\n\n url = urljoin(this.baseOptions.rootUrl, 'user', 'ssodata', params)\n\n return this.request\n .get(url, { noHeaders: true })\n .withCredentials()\n .end(responseHandler(cb))\n}\n\nmodule.exports = HostedPages\n","var urljoin = require('url-join')\n\nvar objectHelper = require('../helper/object')\nvar RequestBuilder = require('../helper/request-builder')\nvar responseHandler = require('../helper/response-handler')\nvar windowHelper = require('../helper/window')\nvar TransactionManager = require('./transaction-manager')\n\nfunction UsernamePassword(options) {\n this.baseOptions = options\n this.request = new RequestBuilder(options)\n this.transactionManager = new TransactionManager(\n this.baseOptions.transaction\n )\n}\n\nUsernamePassword.prototype.login = function(options, cb) {\n var url\n var body\n\n url = urljoin(this.baseOptions.rootUrl, 'usernamepassword', 'login')\n\n options.username = options.username || options.email // eslint-disable-line\n\n options = objectHelper.blacklist(options, ['email']) // eslint-disable-line\n\n body = objectHelper\n .merge(this.baseOptions, [\n 'clientID',\n 'redirectUri',\n 'tenant',\n 'responseType',\n 'responseMode',\n 'scope',\n 'audience'\n ])\n .with(options)\n body = this.transactionManager.process(body)\n\n body = objectHelper.toSnakeCase(body, ['auth0Client'])\n\n return this.request\n .post(url)\n .send(body)\n .end(responseHandler(cb))\n}\n\nUsernamePassword.prototype.callback = function(formHtml) {\n var div\n var form\n var _document = windowHelper.getDocument()\n\n div = _document.createElement('div')\n div.innerHTML = formHtml\n form = _document.body.appendChild(div).children[0]\n\n form.submit()\n}\n\nmodule.exports = UsernamePassword\n","var urljoin = require('url-join')\n\nvar RequestBuilder = require('../helper/request-builder')\nvar assert = require('../helper/assert')\nvar responseHandler = require('../helper/response-handler')\n\n/**\n * Auth0 Management API Client (methods allowed to be called from the browser only)\n * @constructor\n * @param {Object} options\n * @param {Object} options.domain your Auth0 account domain\n * @param {Object} options.token a valid API token\n */\nfunction Management(options) {\n /* eslint-disable */\n assert.check(\n options,\n { type: 'object', message: 'options parameter is not valid' },\n {\n domain: { type: 'string', message: 'domain option is required' },\n token: { type: 'string', message: 'token option is required' },\n _sendTelemetry: {\n optional: true,\n type: 'boolean',\n message: '_sendTelemetry option is not valid'\n },\n _telemetryInfo: {\n optional: true,\n type: 'object',\n message: '_telemetryInfo option is not valid'\n }\n }\n )\n /* eslint-enable */\n\n this.baseOptions = options\n\n this.baseOptions.headers = {\n Authorization: 'Bearer ' + this.baseOptions.token\n }\n\n this.request = new RequestBuilder(this.baseOptions)\n this.baseOptions.rootUrl = urljoin(\n 'https://' + this.baseOptions.domain,\n 'api',\n 'v2'\n )\n}\n\n/**\n * @callback userCallback\n * @param {Error} [err] failure reason for the failed request to Management API\n * @param {Object} [result] user profile\n */\n\n/**\n * Returns the user profile\n *\n * @method getUser\n * @param {String} userId identifier of the user to retrieve\n * @param {userCallback} cb\n * @see https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id\n */\nManagement.prototype.getUser = function(userId, cb) {\n var url\n\n assert.check(userId, {\n type: 'string',\n message: 'userId parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'users', userId)\n\n return this.request\n .get(url)\n .end(responseHandler(cb, { ignoreCasing: true }))\n}\n\n/**\n * Updates the user metdata. It will patch the user metdata with the attributes sent.\n *\n *\n * @method patchUserMetadata\n * @param {String} userId\n * @param {Object} userMetadata\n * @param {userCallback} cb\n * @see {@link https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id}\n */\nManagement.prototype.patchUserMetadata = function(userId, userMetadata, cb) {\n var url\n\n assert.check(userId, {\n type: 'string',\n message: 'userId parameter is not valid'\n })\n assert.check(userMetadata, {\n type: 'object',\n message: 'userMetadata parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n\n url = urljoin(this.baseOptions.rootUrl, 'users', userId)\n\n return this.request\n .patch(url)\n .send({ user_metadata: userMetadata })\n .end(responseHandler(cb, { ignoreCasing: true }))\n}\n\n/**\n * Link two users\n *\n * @method linkUser\n * @param {String} userId\n * @param {String} secondaryUserToken\n * @param {userCallback} cb\n * @see {@link https://auth0.com/docs/api/management/v2#!/Users/post_identities}\n */\nManagement.prototype.linkUser = function(userId, secondaryUserToken, cb) {\n var url\n /* eslint-disable */\n assert.check(userId, {\n type: 'string',\n message: 'userId parameter is not valid'\n })\n assert.check(secondaryUserToken, {\n type: 'string',\n message: 'secondaryUserToken parameter is not valid'\n })\n assert.check(cb, { type: 'function', message: 'cb parameter is not valid' })\n /* eslint-enable */\n\n url = urljoin(this.baseOptions.rootUrl, 'users', userId, 'identities')\n\n return this.request\n .post(url)\n .send({ link_with: secondaryUserToken })\n .end(responseHandler(cb, { ignoreCasing: true }))\n}\n\nmodule.exports = Management\n","// CANON HUB: ACCOUNTS\nexport const UPDATE_ACCOUNTS = 'accts::update'\nexport const UPDATE_ACCOUNTS_DETAILS = 'accts::update-details'\nexport const UPDATE_ACCOUNTS_ACCESS = 'accts::update-access'\nexport const UPDATE_SELECTED_ACCOUNT = 'accts::update-selectedaccount'\nexport const CLEAR_ACCOUNTS = 'accts::clear'\nexport const STORE_SELECTED_ACCOUNT = 'accts::store-selected'\n\nexport const UPDATE_SELECTED_DEVICE = 'accts::update-selecteddevice'\n\nexport const UPDATE_SEARCH_OPTIONS = 'accts::update-search-options'\nexport const UPDATE_PAGING_SETTINGS = 'accts::update-paging-settings'\n\nexport const UPDATE_HEADER_ACCOUNT_LIST_REQUEST =\n 'accts::update-header-accountlist::request'\nexport const UPDATE_HEADER_ACCOUNT_LIST_SUCCESS =\n 'accts::update-header-accountlist::success'\nexport const UPDATE_HEADER_ACCOUNT_LIST_FAILURE =\n 'accts::update-header-accountlist::failure'\n\n// CANON HUB: SERVICE ORDERS\nexport const UPDATE_SELECTED_SERVICEORDER = 'accts::update-selectedserviceorder'\n\n// MEMBER INFO. NOT DOCUMENTED IN CH/SWAGGER\nexport const UPDATE_MEMBER_INFO = 'member::update-info'\n\n// AUTHENTICATE\nexport const UPDATE_AUTH = 'auth::update'\nexport const IS_AUTHENTICATING = 'auth::is-authenticating'\n\n// ABORT A FETCH. USED TO CACHE CALLS AGAINST CANONHUB\nexport const ABORT_FETCH_HUB = 'fetch::abort::hub'\n\n//METADATA\nexport const UPDATE_METADATA = 'config::metadata'\n\n//ACL\nexport const UPDATE_ACL = 'config::acl'\n\n//DSF\nexport const UPDATE_DSF_SUCCESS = 'config::dsf-success'\nexport const UPDATE_DSF_REQUEST = 'config::dsf-request'\nexport const UPDATE_DSF_ERROR = 'config::dsf-error'\n","import {\n ISDEMO,\n ID_TOKEN_KEY,\n ACCESS_TOKEN_KEY,\n SUBJECT,\n EXPIRES_AT,\n CALLBACK,\n MEMBER_ID,\n SELECTED_ACCOUNT,\n ACCOUNT_FAVS,\n STORED_ACCOUNT\n // PERMISSONS\n} from './constants'\n\nimport decode from 'jwt-decode'\n\nimport storage from 'localforage'\n// ---------------------------------------------\n// Token handlers\n// ---------------------------------------------\n/**\n * @name clearIdToken\n * @desc\n */\nexport const clearIdToken = () => {\n localStorage.removeItem(ID_TOKEN_KEY)\n}\n\nexport const clearSelectedAndFavAccounts = () => {\n localStorage.removeItem(SELECTED_ACCOUNT)\n localStorage.removeItem(ACCOUNT_FAVS)\n}\n/**\n * @name clearAccessToken\n * @desc\n */\nexport const clearAccessToken = exemptCallback => {\n localStorage.removeItem(ISDEMO)\n localStorage.removeItem(ACCESS_TOKEN_KEY)\n localStorage.removeItem(EXPIRES_AT)\n localStorage.removeItem(SUBJECT)\n\n //localStorage.removeItem(MEMBER_ID)\n //accept a flag and check if the callback localstorage needs to be removed or not\n if (!exemptCallback) localStorage.removeItem(CALLBACK)\n document.cookie.split('').forEach(function (c) {\n document.cookie = c\n .replace(/^ +/, '')\n .replace(/=.*/, '=expires=' + new Date().toUTCString() + 'path=/')\n })\n storage.clear()\n}\n/**\n * @name getParameterByName\n * @desc Helper function that will allow us to extract the access_token and id_token\n */\nconst getParameterByName = name => {\n let match = RegExp('[#&]' + name + '=([^&]*)').exec(window.location.hash)\n return match && decodeURIComponent(match[1].replace(/\\+/g, ' '))\n}\n/**\n * @name setAccessToken\n * @desc Get and store access_token in local storage\n */\nexport const setAccessToken = t => {\n let accessToken = t || getParameterByName(ACCESS_TOKEN_KEY)\n localStorage.setItem(ACCESS_TOKEN_KEY, accessToken)\n}\n/**\n * @name setAccessToken\n * @desc Get and store access_token in local storage\n */\n// Get and store id_token in local storage\nexport const setIdToken = () => {\n let idToken = getParameterByName(ID_TOKEN_KEY)\n localStorage.setItem(ID_TOKEN_KEY, idToken)\n}\n/**\n * @name getTokenExpirationTime\n * @desc\n */\nconst getTokenExpirationTime = encodedToken => {\n if (!encodedToken) return null\n const token = decode(encodedToken)\n if (!token.exp) {\n return null\n }\n if (\n token.exp < token.auth_time ||\n token.exp < token.iat ||\n token.exp < token.nbf\n )\n return null\n return token.exp\n}\n/**\n * @name isTokenExpired\n * @desc\n */\nexport const isTokenExpired = token => {\n if (!token) return true\n const expirationTime = getTokenExpirationTime(token)\n const expiryTime = Math.ceil(new Date().getTime() / 1000)\n return expirationTime < expiryTime\n //for testing purpose\n //return expirationTime < expiryTime + 3260\n}\n/**\n * @name getIdToken\n * @desc\n */\nexport const getIdToken = () => {\n return localStorage.getItem(ID_TOKEN_KEY)\n}\n\n/**\n * @name setSession\n * @desc Save auth data to local storage for later\n */\nexport const setSession = authResult => {\n let expiresAt = JSON.stringify(\n authResult.expiresIn * 1000 + new Date().getTime()\n )\n\n localStorage.setItem(ACCESS_TOKEN_KEY, authResult.accessToken)\n localStorage.setItem(ID_TOKEN_KEY, authResult.idToken)\n localStorage.setItem(EXPIRES_AT, expiresAt)\n const idtoken = decode(authResult.idToken)\n localStorage.setItem(MEMBER_ID, idtoken.id)\n localStorage.setItem(SUBJECT, idtoken.sub)\n}\n","import { addRoles } from 'utils/acl-permissions'\nimport { store } from '../redux/store.js'\nimport { PERMISSONS } from './constants'\nexport const addPermissions = roles => {\n store.dispatch(addRoles(roles))\n localStorage.setItem(PERMISSONS, JSON.stringify(roles))\n}\n\nexport const clearPermissions = () => {\n localStorage.removeItem(PERMISSONS)\n}\n","import {\n clearIdToken,\n clearAccessToken,\n clearSelectedAndFavAccounts\n} from './tokenHandlers'\nimport { clearPermissions } from './aclHandlers'\n\nimport { store, persistor } from '../redux/store.js'\n\nimport * as actionCreators from 'redux/actions/index.js'\nclass PreAuth {\n static process = (isReLogin) => {\n //sri - always login with clean state, so that expired tokens are never used\n clearIdToken()\n if(!isReLogin) clearSelectedAndFavAccounts()\n //sri - dont clear the callback because it will be used for next redirect after sucessfull login\n clearAccessToken(true)\n clearPermissions()\n persistor.purge()\n store.dispatch(actionCreators.isAuthenticating(true))\n }\n}\n\nexport default PreAuth\n","import FileSaver from 'file-saver'\nimport MockService from './index'\n\n//TODO need to find a way for the url string replacers.\n\nconst serialize = (obj) => {\n\tif (Array.isArray(obj)) {\n\t\treturn JSON.stringify(obj.map((i) => serialize(i)))\n\t} else if (typeof obj === 'object' && obj !== null) {\n\t\treturn Object.keys(obj).sort().map((k) => `${k}:${serialize(obj[k])}`).join('|')\n\t}\n\n\treturn obj\n}\n\nconst fetchAscii = (obj) => {\n\tif (!obj) return 0\n\tlet convertedObj = 0\n\n\tfor (let i = 0; i < obj.length; i++) {\n\t\tlet asciiChar = obj.charCodeAt(i)\n\n\t\tconvertedObj += asciiChar\n\t}\n\n\treturn convertedObj\n}\n\nconst getUrlVars = (url) => {\n\tlet vars = []\n\tconst questionMarkIndex = url.indexOf('?')\n\n\tif (questionMarkIndex === -1)\n\t\treturn {\n\t\t\turl,\n\t\t\tvars: null\n\t\t}\n\tvar hashes = url.slice(questionMarkIndex + 1).split('&')\n\tfor (var i = 0; i < hashes.length; i++) {\n\t\tconst objectValues = hashes[i].split('=')\n\t\tconst obj = {}\n\t\tobj[objectValues[0]] = objectValues[1]\n\t\tvars.push(obj)\n\t}\n\n\treturn {\n\t\turl: url.split('?')[0],\n\t\tvars\n\t}\n}\n\nconst transformParmstoAsciiCheckSum = (params) => {\n\tlet asciiParamsSum = 0\n\tvar seralizedParamsString = serialize(params)\n\tseralizedParamsString = seralizedParamsString.replace(/['\"]+/g, '')\n\tasciiParamsSum = fetchAscii(seralizedParamsString)\n\n\t// // for (let paramsObj of params) {\n\t// // \tif (paramsObj) {\n\t// // \t\t// eslint-disable-next-line\n\t// // \t\tObject.keys(paramsObj).forEach(function(key) {\n\t// // \t\t\tasciiParamsSum += fetchAscii(key) + fetchAscii(paramsObj[key])\n\t// // \t\t})\n\t// // \t}\n\t// }\n\n\treturn asciiParamsSum\n}\n\nconst replaceAll = (target, search, replacement) => {\n\treturn target.replace(new RegExp(search, 'g'), replacement)\n}\n\nexport const downloadAPIResponseJSON = (response) => {\n\tlet stringifiedResponse = JSON.stringify(response.data)\n\tlet uglyUrl = response.config.url.split('.canon.com.au/')[1]\n\tlet urlVars = getUrlVars(uglyUrl)\n\tlet method = response.config.method\n\t//let paramsObj = response.config.params\n\tlet asciiParamsSum = urlVars.vars ? transformParmstoAsciiCheckSum(urlVars.vars) : 0\n\tlet blob = new Blob([ stringifiedResponse ], { type: 'application/json' })\n\tlet fileName = asciiParamsSum ? `${method}_${urlVars.url}_${asciiParamsSum}` : `${method}_${urlVars.url}`\n\tFileSaver.saveAs(blob, `${fileName}.json`)\n}\n\nconst urlVarsFix = (url) => {\n\tif (url.indexOf('?') < 0) return ''\n\tlet rtnString = url.split('?')[1]\n\trtnString = replaceAll(rtnString, '=', '_')\n\trtnString = replaceAll(rtnString, '&', '_')\n\treturn '_' + rtnString\n}\n\nconst urlVarsFix2 = (url) => {\n\tif (url.indexOf('?') < 0) return ''\n\tlet rtnString = url.split('?')[1]\n\treturn '_' + window.btoa(rtnString)\n}\n\nconst urlVarsFix3 = (urlvars) => {\n\tif (!urlvars) return ''\n\tlet rtnString = ''\n\tlet searchTerm\n\t// console.warn(urlvars)\n\tfor (let obj in urlvars) {\n\t\tconst key = Object.keys(urlvars[obj])\n\t\tswitch (String(key)) {\n\t\t\tcase 'pageNo':\n\t\t\t\trtnString += '_pg' + urlvars[obj][key]\n\t\t\t\tbreak\n\t\t\tcase 'pageSize':\n\t\t\t\trtnString += '_ps' + urlvars[obj][key]\n\t\t\t\tbreak\n\t\t\tcase 'businessUser':\n\t\t\t\trtnString += '_bususr'\n\t\t\t\tbreak\n\t\t\tcase 'createdFrom':\n\t\t\t\trtnString += '_date'\n\t\t\t\tbreak\n\t\t\tcase 'searchFields':\n\t\t\t\tsearchTerm =\n\t\t\t\t\tString(urlvars[obj][key]).toLowerCase().indexOf('date') >= 0 ? 'date' : String(key).toLowerCase\n\t\t\t\tbreak\n\t\t\tcase 'searchTerms':\n\t\t\t\trtnString += searchTerm === 'date' ? '_date' : '_' + urlvars[obj][key]\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t// do nothing\n\t\t}\n\t}\n\t/* current url params\n businessUser: \"true\"\n createdFrom: \"2018-12-02\"\n includeDeviceDetails: \"true\"\n serviceOrderStatus: \"UNASSIGNED\"\n serviceOrderStatus: \"ASSIGNED\"\n serviceOrderStatus: \"ACCEPTED\"\n serviceOrderStatus: \"ACCEPTED\"\n pageNo: \"1\"\n pageSize: \"15\"\n searchFields: \"invoiceDate,invoiceDate\"\n searchTerms: \"2019-01-01,2018-07-01\" \n searchFields: \"serial\"\n searchTerms: \"DZT51593\"\n operators: \"lt,gt\"\n junction: \"and\"\n orderBy: \"cdssStatus\"\n directions: \"asc\"\n */\n\treturn rtnString\n}\n\nexport const changeRequestConfigToMockURL = (config, mockServerUrl) => {\n\tif (config.url.includes('.canon.com.au/')) {\n\t\tif (MockService.EXEMPT_MOCK_URLS.some((v) => config.url.includes(v))) {\n\t\t\tif (window.DEBUG) console.log('mock: ignoring url change request')\n\t\t\treturn\n\t\t}\n\t\tlet uglyUrl = config.url.split('.canon.com.au/')[1]\n\t\tuglyUrl = replaceAll(uglyUrl, '/', '_')\n\t\t//let url = replaceAll(uglyUrl, '\\\\?', '_')\n\t\tlet urlVars = getUrlVars(uglyUrl)\n\n\t\t// let paramsObj = config.params\n\t\tconst exemptChecksumUrl = 'hub_v3_accounts_456789_orders_assets'\n\n\t\tlet asciiParamsSum =\n\t\t\turlVars.vars && urlVars.url === 0\n\n\n\t\t// asset orders uses same urls for both install and direct deliveries - u cannot exempt checksum there.\n\t\t//[ch] temp disable the checksum as its changing to often with HUB changes\n\t\tlet transformURl = asciiParamsSum\n\t\t\t? `${config.method}_${urlVars.url}_${asciiParamsSum}`\n\t\t\t: `${config.method}_${urlVars.url}`\n\n\t\tconfig.url = `${mockServerUrl}/${transformURl}${urlVarsFix3(urlVars.vars)}.json`\n\t\tconfig.method = 'get'\n\n\t\t//[sp]in case of mock url dont send the authorization header\n\t\tconfig.headers.Authorization = null\n\t\tconfig.params = null\n\t}\n}\n","import axios from 'axios'\nimport ApiConfig from 'config.json'\n\nimport {\n downloadAPIResponseJSON,\n changeRequestConfigToMockURL\n} from './mockAPIWorker'\n\n//[sp]\n/** Axios Interceptor class for downloading the mockresponses from server and render them in case of mock mode. **/\nclass MockService {\n //The role name when encountered to turn into MOCK mode\n static MOCK_USER_ROLE = 'b2b-demo'\n\n /* [sp] 3 modes of mocking \n'mock' is used to intercept the actual calls and call the mock api instead\n'live' mode is used when we want to call the actual calls\n'download' is live mode plus download the corresponding api jsons as files into local directory and feed those to mock api\n*/\n static MODES = {\n MOCK: 'mock',\n DOWNLOAD: 'download',\n LIVE: 'live'\n }\n\n static EXEMPT_MOCK_URLS = ['/selfhelp', '/gcp/']\n\n static configure = mode => {\n if (mode === MockService.MODES.LIVE) return\n\n // Add a response interceptor\n axios.interceptors.response.use(\n response => {\n if (mode === MockService.MODES.DOWNLOAD) {\n downloadAPIResponseJSON(response)\n }\n return response\n },\n error => {\n return Promise.reject(error)\n }\n )\n // Add a request interceptor\n axios.interceptors.request.use(\n config => {\n if (mode === MockService.MODES.MOCK) {\n //based on the PROD or UAT change the request accordingly\n const baseurl = window.isPROD\n ? ApiConfig.demoApi.replace('env', 'prod')\n : ApiConfig.demoApi.replace('env', 'uat')\n changeRequestConfigToMockURL(config, baseurl)\n }\n\n return config\n },\n error => {\n return Promise.reject(error)\n }\n )\n }\n}\n\n//[sp] in case of refresh scenario, check if isDemo from the localstorage and confifure accordingly\nconst isDemo = localStorage.getItem('isDemo')\nif (isDemo) {\n MockService.configure(MockService.MODES.MOCK)\n window.isDEMO = true\n}\n\nexport default MockService\n","import MockService from 'mock-service'\nimport {ACCOUNT_INFO, ISDEMO, MEMBER_INFO} from './constants'\nimport {store} from '../redux/store.js'\nimport * as actionTypes from 'redux/actions/actionTypes.js'\nimport {setSession} from './tokenHandlers'\nimport * as actionCreators from 'redux/actions/index.js'\nimport {configureHotJar} from 'hotjar'\n\n\nclass PostAuth {\n static process = (authResult) => {\n if (window.DEBUG) console.log('auth: post', authResult)\n\n //[sp] if the role is demo then call the change the mode to mock by setting the mock interceptor\n const {idTokenPayload} = authResult\n\n configureHotJar(idTokenPayload.email)\n\n let memberId\n\n //[sp] set the interceptor if the role of the user is demo \"b2b-demo\"\n // MockService.configure(MockService.MODES.DOWNLOAD) // use this to save api/json calls to download folder\n if (idTokenPayload.role && idTokenPayload.role.includes(MockService.MOCK_USER_ROLE)) {\n localStorage.setItem(ISDEMO, true)\n MockService.configure(MockService.MODES.MOCK)\n window.isDEMO = true\n memberId = '15075916'\n } else {\n memberId = idTokenPayload.id\n }\n\n //remove member info\n sessionStorage.removeItem(MEMBER_INFO)\n sessionStorage.removeItem(ACCOUNT_INFO)\n\n store\n .dispatch(\n actionCreators.getCanonHub({\n type: actionTypes.UPDATE_MEMBER_INFO,\n memberId,\n force: true\n })\n )\n .then(() => {\n store.dispatch(actionCreators.getCanonHub({type: actionTypes.UPDATE_ACCOUNTS}))\n })\n .catch((e) => {\n throw new Error(`Error retrieving the Member Info - ${e}`)\n })\n\n store.dispatch(actionCreators.setAuth(authResult))\n setSession(authResult)\n\n //sri- The whole process of authetication is done so set the auth.isAuthenticating state to false.\n store.dispatch(actionCreators.isAuthenticating(false))\n //sri - Move the redirection logic to SSO component since its the best place to do the route redirection rather at this call back.\n }\n}\n\nexport default PostAuth\n","export const configureHotJar = user => {\n //check if the user is in the exemption email list\n const hotJarExemptionList = [\n 'canon.dev@canon.com.au',\n 'mahmod.homaisi@canon.com.au'\n ]\n\n if (hotJarExemptionList.includes(user)) {\n document.cookie =\n '_hjIncludedInSample =-1; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'\n }\n}\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @desc Main authentication thru STS. Uses code from auth0.com\n *\n */\n\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\nimport auth0 from 'auth0/index.js'\nimport axios from 'axios'\n\nimport * as actionCreators from 'redux/actions/index.js'\nimport { store, persistor } from '../redux/store.js'\n\nimport PreAuth from './preAuth'\nimport PostAuth from './postAuth'\n\nimport {\n\tclearIdToken,\n\tclearAccessToken,\n\tgetIdToken,\n\tisTokenExpired,\n\tclearSelectedAndFavAccounts\n} from './tokenHandlers'\nimport { deleteCallBack } from './callBackHandlers'\nimport { clearPermissions } from './aclHandlers'\nimport {\n\tCLIENT_ID,\n\tCLIENT_DOMAIN,\n\tISPROD,\n\tCORE_URL,\n\tSCOPE,\n\tREDIRECT,\n\tOPENID_CONNECT_MULTIVALUES_RESPONSE_TYPE,\n\tAUTOSIGN_COOKIE,\n\tACR_SFDC,\n\tRELOGIN_FLAG,\n\tSELECTED_ACCOUNT\n} from './constants'\n\nvar auth = new auth0.WebAuth({\n\tclientID: CLIENT_ID,\n\tdomain: CLIENT_DOMAIN,\n\toverrides: {\n\t\t__tenant: ISPROD ? 'secure' : 'secure',\n\t\t__token_issuer: CORE_URL,\n\t\t__jwks_uri: `${CORE_URL}/.well-known/jwks`\n\t}\n})\n\n// ---------------------------------------------\n// Authentication handlers\n// ---------------------------------------------\n/**\n * @name login\n * @desc Redirects user to federated login (STS in our case)\n */\nexport function login(idp, isReLogin = false) {\n\t//[sp] invoke the PreAuth Process to clear tokens and purge peristed redux state and set IsAuthenticating flag to true\n\tPreAuth.process(isReLogin)\n\tauth.authorize({\n\t\tresponseType: OPENID_CONNECT_MULTIVALUES_RESPONSE_TYPE,\n\t\tredirectUri: REDIRECT,\n\t\tscope: SCOPE,\n\t\tacr_values: idp ? ACR_SFDC : ''\n\t})\n\tif (window.DEBUG) console.log('logn: login', auth)\n\t//sri - The whole process of authetication has started so set the auth.isAuthenticating state to false.\n}\n/**\n * @name handleAuthentication\n * @desc Checks the returned package from STS against the sent NONCE and STATE\n */\nexport function handleAuthentication() {\n\tauth.parseHash((err, authResult) => {\n\t\tif (window.DEBUG) console.log('auth: handle', authResult)\n\t\tif (authResult && authResult.accessToken && authResult.idToken) {\n\t\t\tPostAuth.process(authResult)\n\t\t} else if (err) {\n\t\t\tconsole.error(err)\n\t\t\tlogout()\n\t\t}\n\t})\n}\n\n/**\n * @name logout\n * @desc Clear localStorage and logout session thru STS\n */\nexport function logout() {\n\tstore.dispatch(actionCreators.setAuth({}))\n\tclearIdToken()\n\tclearAccessToken()\n\tclearPermissions()\n\tclearSelectedAndFavAccounts()\n\t// history.replace('/')\n\tpersistor.purge()\n\tdeleteCallBack()\n\tclearLSAuth()\n\t//To remove the cookie ,expire it to the\n\tdocument.cookie = AUTOSIGN_COOKIE + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; domain=.canon.com.au; path=/'\n\tconst redirect =\n\t\t'https://' +\n\t\tCLIENT_DOMAIN +\n\t\t'/endsession?post_logout_redirect_uri=' +\n\t\twindow.location.origin +\n\t\t'&client_id=' +\n\t\tCLIENT_ID\n\twindow.location.href = encodeURI(redirect)\n}\n\nexport function reLoginSSO(accountNumber) {\n\tstore.dispatch(actionCreators.setAuth({}))\n\tclearIdToken()\n\tclearAccessToken()\n\tclearPermissions()\n\t\n\tpersistor.purge()\n\tdeleteCallBack()\n\tclearLSAuth()\n\t//To remove the cookie ,expire it to the\n\tdocument.cookie = AUTOSIGN_COOKIE + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; domain=.canon.com.au; path=/'\n\n\tconst redirect =\n\t\t'https://' +\n\t\tCLIENT_DOMAIN +\n\t\t'/endsession?post_logout_redirect_uri=' +\n\t\twindow.location.origin +\n\t\t'&client_id=' +\n\t\tCLIENT_ID\n\n\t//call redirect as AJAX to get session logout in STS\n\taxios\n .get(redirect)\n .then(() => {\n\t\t\tlogin(ACR_SFDC, true)\n })\n .catch(error => {\n if (window.DEBUG) console.timeEnd(redirect)\n\t\t\t\tif (window.DEBUG) console.log(error)\n\n\t\t\t\tconst redirect =\n\t\t\t\t\t\t'https://' +\n\t\t\t\t\t\tCLIENT_DOMAIN +\n\t\t\t\t\t\t'/endsession?post_logout_redirect_uri=' +\n\t\t\t\t\t\twindow.location.origin + \"/\" + accountNumber + \"?idp=SFDC\" +\n\t\t\t\t\t\t'&client_id=' +\n\t\t\t\t\t\tCLIENT_ID\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\twindow.location.href = encodeURI(redirect)\n })\t\n\n\t\n\t\n}\n\n/**\n * @name clearLSAuth\n * @desc Clears localStorage associated with the 3rd partys auth0.com\n */\nexport function clearLSAuth() {\n\tfor (var key in localStorage) {\n\t\tif (key.indexOf('com.auth0') === 0) {\n\t\t\tlocalStorage.removeItem(key)\n\t\t}\n\t}\n}\n/**\n * @name changePassword\n * @desc Redirect user to STS change password\n */\nexport function changePassword() {\n\tconst sub = localStorage.getItem('sub')\n\tif (sub) {\n\t\tlet redirect =\n\t\t\t'https://' + CLIENT_DOMAIN + '/password/change?returnUrl=' + window.location.href + '&userid=' + sub\n\t\tredirect = redirect.replace('/connect', '')\n\t\twindow.location.href = encodeURI(redirect)\n\t}\n}\n\nexport function autoSignInOnLand() {\n\tconst idToken = getIdToken()\n\tconst isTokenExp = isTokenExpired(idToken)\n\t//[sp] If token is expired / or if not present check for the autosign cookie. If present try doing a autosign in by calling the login method\n\tif (isTokenExp) {\n\t\tif (document.cookie.indexOf(AUTOSIGN_COOKIE) > -1) {\n\t\t\t//do a autologin , since the STS would be holding the XVRF Session token to auto authenticate the request\n\t\t\t// login()\n\t\t}\n\t}\n}\n/**\n * @name requireAuth\n * @desc\n */\nexport function requireAuth(nextState, replace) {\n\tif (!isLoggedIn()) {\n\t\treplace({ pathname: '/' })\n\t}\n}\n/**\n * @name isLoggedIn\n * @desc\n */\nexport function isLoggedIn() {\n\tconst idToken = getIdToken()\n\tconst isTokenExp = isTokenExpired(idToken)\n\n\treturn !!idToken && !isTokenExp\n}\n","import React, { Component } from 'react'\nimport { Link } from 'react-router-dom'\nimport { Permissions } from 'utils/acl-permissions'\n\n// function splitCamelCaseToString(s) {\n// return \"fal fa-\" + s.split(/(?=[A-Z])/).join('-').toLowerCase()\n// }\n\n//import { getPermissions, PERMISSIONS_ROUTES_ONLY } from 'app-config'\n\nclass BtnIcon extends Component {\n render() {\n const {\n metadata\n } = this.props\n\n // let iconClass = splitCamelCaseToString(this.props.btnIcon)\n const coreRender = () => {\n const {\n onClick,\n loading,\n id,\n newWindow,\n hasChevron,\n btnIcon,\n btnClass,\n disabled,\n btnTo,\n hideOnDisabled,\n btnText,\n title,\n isExternal = false\n } = this.props\n\n const iconClass = !loading ? `fal fa-${btnIcon}` : 'fal fa-sync fa-spin'\n\n const isDisabled = disabled\n const url = isDisabled ? '#' : btnTo\n const linkClass = isDisabled ? 'disabled ' + btnClass : btnClass\n //const isExternal = this.props.isExternal || false\n\n const isHidden = hideOnDisabled && isDisabled ? { display: 'none' } : null\n\n const showChevron = hasChevron\n if (isExternal) {\n return (\n \n {(!showChevron) && (\n \n )}\n {(showChevron) && (\n \n )}\n {btnText}\n \n )\n }\n if (onClick) {\n return (\n \n \n {btnText}\n \n )\n } else {\n return (\n \n {showChevron && (\n \n )}\n \n {btnText}\n \n )\n }\n }\n\n return (\n \n {coreRender()}\n \n )\n }\n}\nexport default BtnIcon\n","import styled from 'styled-components'\nimport { color } from 'styles/styled-components/helpers'\n\nimport Select from 'react-select'\n\n// css calc needs units\nconst fixZero = v => (v === '0' ? '0px' : v)\n\n// Determine the inner height by removing the border width\nconst innerHeight = ({ theme }) =>\n `calc(${theme.forms.height} - ${fixZero(\n theme.forms.borderTopWidth\n )} - ${fixZero(theme.forms.borderBottomWidth)})`\n\nexport const StyledSelect = styled(Select)`\n font-size: ${props => props.theme.forms.fontSize};\n\n .Select-arrow-zone{\n padding:0 5px;\n }\n\n .Select-value-label{\n font-weight:500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .Select-control {\n border-radius: ${props => props.theme.forms.borderRadius};\n border-top-width: ${props => props.theme.forms.borderTopWidth};\n border-right-width: ${props => props.theme.forms.borderRightWidth};\n border-bottom-width: ${props => props.theme.forms.borderBottomWidth};\n border-left-width: ${props => props.theme.forms.borderLeftWidth};\n border-color: #bababa;\n height: ${props => props.theme.forms.height};\n\n &:hover {\n box-shadow: none;\n }\n }\n\n &.Select.is-focused:not(.is-open) {\n > .Select-control {\n box-shadow: none;\n border-color: inherit;\n outline:none;\n }\n }\n\n &.Select.is-disabled:not(.is-open) {\n > .Select-control {\n background-color: ${color('disabled')};\n cursor: not-allowed;\n }\n }\n\n .Select-input {\n height: ${innerHeight};\n line-height: ${innerHeight};\n padding-left: ${props => props.theme.forms.paddingHorizontal};\n padding-right: ${props => props.theme.forms.paddingHorizontal};\n\n > input {\n color:\n line-height: ${innerHeight};\n padding: 0;\n }\n }\n\n &.Select--single {\n .Select-control {\n .Select-value {\n width:98%;\n line-height: ${innerHeight};\n padding-left: ${props => props.theme.forms.paddingHorizontal};\n padding-right: ${props => props.theme.forms.paddingHorizontal};\n }\n }\n }\n\n &.Select--multi {\n .Select-value-icon {\n padding: 1px 5px;\n }\n\n .Select-input {\n margin-left: ${props => props.theme.forms.paddingHorizontal};\n }\n }\n\n .Select-placeholder {\n outline-color: blue;\n line-height: ${innerHeight};\n padding-left: ${props => props.theme.forms.paddingHorizontal};\n padding-right: ${props => props.theme.forms.paddingHorizontal};\n color: ${props => color(props.theme.forms.placeholderColor)(props)};\n opacity: ${props => color(props.theme.forms.placeholderOpacity)(props)};\n }\n`\n\nexport const StyledCreatableSelect = StyledSelect.withComponent(\n Select.Creatable\n)\n","import React, {Component} from 'react'\nimport 'react-select/dist/react-select.css'\n\nimport {StyledSelect, StyledCreatableSelect} from './styles'\n\ntype SelectProps = {\n clearable: boolean,\n creatable: boolean,\n disabled: boolean,\n id: string,\n multi: boolean,\n name: string,\n onBlur: (SyntheticInputEvent) => void,\n onChange: (string | string[]) => void,\n options: string | Object[],\n placeholder: string,\n required: boolean,\n value: string\n}\n\nclass AccountSelect extends Component {\n static defaultProps = {\n options: [],\n type: 'text'\n }\n\n handleChange = (value: Object | Object[]) => {\n if (Array.isArray(value)) {\n const values = value.map(v => v.value)\n this.props.onChange(values)\n return\n }\n\n this.props.onChange(value ? value.value : '')\n }\n\n render() {\n const {\n clearable,\n creatable,\n disabled,\n id,\n multi,\n name,\n onBlur,\n options,\n placeholder,\n required,\n value\n } = this.props\n\n const SelectComponent = creatable ? StyledCreatableSelect : StyledSelect\n\n return (\n \n )\n }\n}\n\nexport default AccountSelect\n","import {metadata} from 'app-config'\n\nconst tiles = [\n {\n title: 'Account',\n icon: 'file-invoice',\n links: [\n {href: '/users', ...metadata.users},\n {href: '/contacts', ...metadata.contacts},\n {href: '/billing', ...metadata.billing}\n ]\n },\n {\n title: 'Service & Support',\n icon: 'handshake',\n links: [\n {\n href: '/service/orders/request',\n ...metadata.serviceOrderRequest\n },\n {href: '/service/orders', ...metadata.serviceOrders},\n {\n href: '/service/relocations/form',\n ...metadata.relocationRequestForm\n },\n {href: '/safetyformlist', ...metadata.safetyformlist},\n {href: '/networkformlist', ...metadata.networkformlist}\n ]\n },\n {\n title: 'Orders',\n icon: 'truck',\n links: [\n {\n href: '/orders/consumables/request',\n ...metadata.consumablesRequest\n },\n {href: '/orders/consumables/', ...metadata.consumables},\n {href: '/orders/assets/', ...metadata.assetorders}\n ]\n },\n {\n title: 'Assets',\n icon: 'box',\n links: [\n {href: '/assets', ...metadata.assets},\n {href: 'https://www.canon.com.au/business/support/certificates%20of%20currency', ...metadata.documentsInsurance},\n {href: 'https://solutions.canon.co.nz/professional-indemnity-liability', ...metadata.professionalIndemnityLiabilityNZ},\n {href: 'https://solutions.canon.co.nz/public-and-products-liability', ...metadata.publicAndProductsLiabilityNZ},\n {\n href: '/assets/meter-reader',\n ...metadata.submitMeterReadings\n },\n {\n href: 'https://readings.canon.co.nz/',\n ...metadata.submitMeterReadingsNZ\n },\n {href: '/assets/status', ...metadata.assetStatus},\n ]\n },\n {\n title: 'News & Resources',\n icon: 'lightbulb',\n links: [\n {\n href: 'https://www.canon.com.au/businessinsights',\n ...metadata.businessInsightsAU\n },\n {\n href: 'https://www.canon.co.nz/businessinsights',\n ...metadata.businessInsightsNZ\n },\n {\n href: 'https://www.youtube.com/playlist?list=PLdjusQgp4g92l5YHr4_QSunzq1uyp-XJM',\n ...metadata.trainingAU\n },\n {\n href: 'https://www.youtube.com/playlist?list=PLTzLyJTlVEnZgWSDzBGog80dgSa6YbL86',\n ...metadata.trainingNZ\n },\n {\n href: 'https://www.canon.co.nz/businessinsights/subscribe',\n ...metadata.subscribeNZ\n },\n {\n href: 'https://solutions.canon.com.au/l/819603/2020-06-17/gtyq/819603/23317/Good_Hygiene_A3_POSTER.pdf',\n text: 'Download COVID-19 Printer Hygiene Poster',\n permissions: [\n \"HygienePosterAU.Read\"\n ]\n },\n {\n href: 'http://mybusiness.canon.co.nz/training',\n ...metadata.productTrainingNZ\n },\n {\n href: 'https://canonmcb.blob.core.windows.net/extras/GoodHygiencePoster.pdf',\n text: 'Download COVID-19 Printer Hygiene Poster',\n permissions: [\n \"HygienePosterNZ.Read\"\n ]\n },\n {\n href: 'https://www.canon.co.nz/business/offers',\n text: 'Subscribe to receive new content and offers',\n permissions: [\n \"HygienePosterNZ.Read\"\n ]\n },\n ]\n },\n {\n title: 'Reports & Documents',\n icon: 'file-invoice',\n links: [\n {\n href: '/reports/generatereports',\n ...metadata.generatereports\n },\n {\n href: '/reports/view-reportsDocuments',\n ...metadata.reportsDocuments\n }\n ]\n }\n]\n\nexport default tiles\n","import React from 'react'\nimport { login, logout, isLoggedIn, changePassword } from 'auth'\nimport Links from 'features/landing/tile.json.js'\nimport LinkButton from 'components/common/buttons/link-button-icon.jsx'\nimport { AuthHOC } from 'utils/acl-permissions'\n\nconst SubMenu = ({\n linksSubmenus,\n toggleLinksSubmenu,\n linkKey,\n accountNum\n}) => {\n return (\n \n toggleLinksSubmenu(Links[linkKey].title)}\n onClick={() => toggleLinksSubmenu(Links[linkKey].title)}\n className=\"links-submenu-header\"\n >\n \n {Links[linkKey].title}\n
\n
    \n {Object.keys(Links[linkKey].links).map(key2 => {\n const isExternal = Links[linkKey].links[key2].href.indexOf('//') > 0\n return (\n
  • \n {!isExternal && (\n \n )}\n {isExternal && (\n \n\n )}\n
  • \n )\n })}\n
\n
\n )\n}\n\nconst SubMenuWithAuth = AuthHOC()(SubMenu, null)\n\nconst HamburgerMenu = ({\n handleLinksHamburgerMenuClick,\n toggleLinksSubmenu,\n showLinksSubmenu,\n linksSubmenus,\n accountNum\n}) => {\n\n // console.log('showLinksSubmenu', showLinksSubmenu)\n return (\n
\n handleLinksHamburgerMenuClick()}\n onClick={() => handleLinksHamburgerMenuClick()}\n />\n {showLinksSubmenu && (\n
\n
\n {Object.keys(Links).map(key => {\n let permissions = new Set()\n\n Links[key].links.forEach(link => {\n if (link.permissions)\n link.permissions.forEach(permission => {\n permissions.add(permission)\n })\n })\n return (\n \n )\n })}\n
\n
\n
\n {(isLoggedIn() && accountNum) && (\n
\n \n Contact us\n \n
\n )}\n {isLoggedIn() && (\n changePassword()}\n onKeyPress={() => changePassword()}\n className=\"password curs-p pt-8\"\n >\n Change\n password\n \n )}\n {!isLoggedIn() && (\n login()}\n role=\"button\"\n tabIndex=\"0\"\n className=\"login curs-p\"\n onClick={() => login()}\n >\n Login\n
\n )}\n {isLoggedIn() && (\n logout()}\n role=\"button\"\n tabIndex=\"0\"\n className=\"login curs-p\"\n onClick={() => logout()}\n >\n Logout\n
\n )}\n
\n
\n )}\n \n )\n}\n\nexport default HamburgerMenu\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n *\n */\n\n// -------------------------------------\n// Dependencies\n// -------------------------------------\n/* --empty block-- */\n\n// -------------------------------------\n// Page - Home\n// -------------------------------------\n/* --empty block-- */\n\n// ---------------------------------------------\n// Export block\n// ---------------------------------------------\nimport HamburgerMenu from './hamburger-menu.js'\n\nexport default HamburgerMenu\n","export const getLocalAccount = dfault => {\n const selectedAccount = localStorage.getItem('selectedAccount')\n const accountFavs = getAccountFavs('accountFavs')\n if (selectedAccount) return selectedAccount\n if (accountFavs && accountFavs.length) return accountFavs[0].Number\n return dfault\n}\nexport const getAccountFavs = id => {\n const myFavs = localStorage.getItem(id)\n return JSON.parse(myFavs)\n}\nexport const setAccountFavs = (accountNum, accountName) => {\n let myList = getAccountFavs('accountFavs') || []\n myList.unshift({ Number: accountNum, Name: accountName })\n localStorage.setItem('accountFavs', JSON.stringify(myList.slice(0, 5)))\n}\nexport const getLocalStorage = id => {\n return localStorage.getItem(id)\n}\nexport const setLocalStorage = (id, payload) => {\n localStorage.setItem(id)\n}\n","import React, {Component, Fragment} from 'react'\nimport StoreManager from \"redux/store-manager\";\nimport dsf from \"../../../redux/reducers/dsf-reducer\";\nimport {Link} from 'react-router-dom'\nimport {connect} from 'react-redux'\nimport {login, logout, isLoggedIn, changePassword, reLoginSSO} from 'auth'\nimport './header.css'\nimport AccountSelect from './AccountSelect/index.js'\nimport HamburgerMenu from './HamburgerMenu'\nimport * as actionCreators from 'redux/actions/index.js'\nimport {debounce} from 'utils'\nimport {setAccountFavs} from '../../common/local-storage/helper.js'\n\nimport {withToastManager} from 'react-toast-notifications'\nimport axios from 'axios'\nimport config from 'config.json'\nimport {store} from '../../../redux/store.js'\nimport * as actionTypes from '../../../redux/actions/actionTypes.js'\nimport {\n ACCOUNT_INFO, MEMBER_ID,\n MEMBER_INFO,\n RELOGIN_FLAG,\n STORED_ACCOUNT\n} from '../../../auth/constants'\n\nlet haveAccountList = false\nlet fetchAccountList = false\n\nconst exemptedURLs = [\n 'callback',\n 'accesserror',\n 'accesserrorsts',\n 'signout',\n 'service',\n 'ordercomplete'\n]\n\nStoreManager.registerReducers({dsf: dsf})\n\n\nclass Header extends Component {\n constructor(props) {\n super(props)\n if (props) {\n this.state = {\n accountList: null,\n accountListMax: 1,\n accountListLarge: false,\n accountNum: '',\n memberAccount: null,\n searchTerm: '',\n showMenu: false,\n hideMenu: false,\n loginOverride: false,\n showSubmenu: false,\n showSubmenu1: true,\n showSubmenu2: false,\n showSubmenu3: false,\n showLinksSubmenu: false,\n accessTokenStatus: false,\n showAccessDenied: false,\n linksSubmenus: {\n Account: true\n }\n }\n }\n\n this.updateSelectedAccount = this.updateSelectedAccount.bind(this)\n this.search = debounce(this.search, 750)\n this.onSearchInputChange = this.onSearchInputChange.bind(this)\n this.onAccountClickHandler = this.onAccountClickHandler.bind(this)\n this.toggleLinksSubmenu = this.toggleLinksSubmenu.bind(this)\n this.handleAccountMenuClick = this.handleAccountMenuClick.bind(this)\n this.handleLinksHamburgerMenuClick = this.handleLinksHamburgerMenuClick.bind(\n this\n )\n this.handleClick = this.handleClick.bind(this)\n }\n\n setAccount(newAccount) {\n this.props.getAccountDetails({\n accountNumber: newAccount,\n force: true\n })\n this.props.updateSelectedAccount(newAccount)\n }\n\n componentDidMount() {\n const url = this.props.location.pathname\n const newAccount = url.split('/')[1]\n\n if (newAccount.length && newAccount !== 'callback' && url !== \"/undefined\") {\n localStorage.setItem(STORED_ACCOUNT, newAccount);\n }\n\n\n if (isLoggedIn()) {\n //[SP] if there is a manual change of the account number in the URL then the header re-mounts, then we need to check if the selectedAccount and fecth the details if different\n const prevSelectedAccount = localStorage.getItem(\n 'selectedAccount'\n )\n\n if (exemptedURLs.includes(newAccount)) return\n if (newAccount) {\n this.setState({\n accountNum: newAccount\n })\n //[MH] check local storage and redux, if not same as header then refresh\n if (newAccount !== prevSelectedAccount || this.props.selectedAccount !== newAccount) this.setAccount(newAccount)\n } else if (prevSelectedAccount !== null && prevSelectedAccount !== \"\") {\n this.setAccount(localStorage.getItem(\n 'selectedAccount'\n ))\n }\n\n if (!this.props?.memberAccount?.member) {\n\n const memberId = localStorage.getItem(MEMBER_ID)\n\n store\n .dispatch(\n actionCreators.getCanonHub({\n type: actionTypes.UPDATE_MEMBER_INFO,\n memberId,\n force: true\n })\n )\n .then(() => {\n store.dispatch(actionCreators.getCanonHub({type: actionTypes.UPDATE_ACCOUNTS}))\n })\n .catch((e) => {\n throw new Error(`Error retrieving the Member Info - ${e}`)\n })\n }\n }\n\n\n this.setState({\n accountListMax: Math.max(\n this.props.memberAccount\n ? this.props.memberAccount.accounts.length\n : 0 || 0,\n this.props.totalResults || 0,\n this.state.accountListMax\n )\n })\n document.addEventListener('touchstart', this.handleClick, false)\n document.addEventListener('mousedown', this.handleClick, false)\n document.addEventListener('keyup', this.handleClick, false)\n }\n\n componentDidUpdate(prevProps) {\n const {authAccessToken, location} = this.props\n\n //watcher on the pathname\n //If the account is changed re fetch the account details\n if (prevProps.authAccessToken !== authAccessToken && authAccessToken) {\n this.setState({accessTokenStatus: true})\n const account = this.state.accountNum\n //we we have an account number at this point it means our initial call would have been blocked\n //so we make the call here\n if (account) this.setAccount(account)\n }\n\n //watcher on the pathname\n //If the account is changed re fetch the account details\n if (prevProps.location.pathname !== location.pathname) {\n\n const newAccount = location.pathname.split('/')[1]\n const prevSelectedAccount = prevProps.location.pathname.split(\n '/'\n )[1]\n if (exemptedURLs.includes(newAccount)) return\n if (newAccount) {\n this.setState({accountNum: newAccount})\n if (newAccount !== prevSelectedAccount) {\n //check if we have an access token\n //not the best approach\n //authAccessToken ? this.setAccount(newAccount) : this.setAccountAttempts(newAccount)\n if (authAccessToken) this.setAccount(newAccount)\n }\n }\n }\n }\n\n //might not be required\n setAccountAttempts(newAccount) {\n const {accessTokenStatus} = this.state\n let i = 0\n do {\n setTimeout(() => {\n this.setAccount(newAccount)\n }, 600)\n i++\n } while (i < 5 || !accessTokenStatus)\n }\n\n //[MH] need to move functions out of this\n //https://reactjs.org/docs/react-component.html#unsafe_componentwillupdate\n componentWillUpdate(nextProps, nextState) {\n\n if (!this.state.showAccessDenied && nextProps.hubError) {\n if (nextProps.hubError === 10106 && !localStorage.getItem(RELOGIN_FLAG)) {\n localStorage.setItem(RELOGIN_FLAG, true)\n\n store.dispatch(actionCreators.getCanonHub({\n type: actionTypes.CLEAR_ACCOUNTS,\n }))\n .then(() => {\n const storedAccount = localStorage.getItem(STORED_ACCOUNT)\n if (storedAccount) reLoginSSO(storedAccount)\n })\n\n //TODO: maybe re-call the last failed API (windows.relocate = fav account) if login doesnt already.\n } else {\n nextProps.history.replace('/accesserrorsts/')\n /** [SP] Move this to PostAuth since its required only once during the login*/\n this.setState({showAccessDenied: true})\n }\n } else if (this.state.showAccessDenied) {\n\n }\n\n if (\n nextProps &&\n nextProps.accountList &&\n nextProps.totalPages &&\n !haveAccountList\n ) {\n if (window.DEBUG) console.log('acct: accountList', nextProps.accountList)\n haveAccountList = true\n this.setState({\n accountListMax: Math.max(\n nextProps.totalResults,\n this.state.accountListMax\n )\n })\n }\n\n if (\n nextProps.memberAccount &&\n this.state.memberAccount &&\n this.state.memberAccount.company === nextProps.memberAccount.company\n ) {\n } else {\n if (!nextProps.memberAccount) return\n this.setState({\n memberAccount: nextProps.memberAccount, // storing locally to stop the flicker of company name,\n })\n if (this.props.toastManager.toasts.length && this.state.toastId) {\n this.props.toastManager.remove(this.state.toastId)\n }\n }\n }\n\n // const scrollToAnchor = () => {\n componentWillUnmount() {\n //sp to handle case of ios, since ios doesn't recognize mousedown events\n document.removeEventListener('touchstart', this.handleClick, false)\n document.removeEventListener('mousedown', this.handleClick, false)\n }\n\n handleClick = e => {\n if (this.node && this.node.contains(e.target)) {\n if (e.keyCode && e.keyCode === 27) {\n this.setState({\n showSubmenu: false,\n showLinksSubmenu: false\n })\n return\n }\n\n } else if (this.state.showLinksSubmenu || this.state.showSubmenu) {\n this.setState({\n showLinksSubmenu: false,\n showSubmenu: false\n })\n }\n }\n updateSelectedAccount = (selectedAccountNumber) => {\n this.props.history.push({\n pathname: `/${selectedAccountNumber}`,\n state: {\n refreshSoState: true,\n accountNumber: selectedAccountNumber\n }\n })\n this.onAccountClickHandler(selectedAccountNumber)\n }\n\n updateDropdownList = accounts => {\n if (!accounts) return []\n const options = accounts.map(e => {\n return {label: e.Name.toLowerCase(), value: e.Number}\n })\n return options\n }\n\n updateAccountList = (accounts, isFav) => {\n if (!accounts || !accounts.length) return\n const url = this.props.location.pathname\n return (\n
    \n {accounts.map((item, key) => {\n\n //get current URL\n\n\n //urlExplode\n let tempUrl = url.split('/')\n //strip account number from URL\n const newAccount = tempUrl[1]\n const newUrl = tempUrl\n newUrl[1] = item.value\n\n //find out new URL by checking exemptedURLs\n let urlSwitch = (exemptedURLs.includes(newAccount)) ? `/${item.value}` : newUrl.join('/')\n //todo move this into helper\n const NotSwitchURLs = [\n {\n \"url\": [\"safetyformtemplate\"],\n \"parentUrl\": 'safetyformtemplates',\n },\n {\n \"url\": [\"networkformtemplate\"],\n \"parentUrl\": 'networkformtemplates',\n },\n {\n \"url\": [\"safetyformbulk\"],\n \"parentUrl\": 'safetyformbulk',\n },\n {\n \"url\": [\"safetyform\"],\n \"parentUrl\": 'safetyform',\n },\n {\n \"url\": [\"networkformbulk\"],\n \"parentUrl\": 'networkformbulk',\n },\n {\n \"url\": [\"networkform\"],\n \"parentUrl\": 'networkform',\n },\n {\n \"url\": [\"assets\"],\n \"parentUrl\": 'assets',\n },\n {\n \"url\": [\"orders\", \"consumables\", \"request\"],\n \"parentUrl\": 'orders/consumables/request',\n },\n {\n \"url\": [\"orders\", \"consumables\"],\n \"parentUrl\": 'orders/consumables',\n },\n {\n \"url\": [\"orders\", \"assets\"],\n \"parentUrl\": 'orders/consumables',\n },\n {\n \"url\": [\"service\", \"orders\", \"request\"],\n \"parentUrl\": 'service/orders/request',\n },\n {\n \"url\": [\"service\", \"orders\"],\n \"parentUrl\": 'service/orders',\n },\n ];\n\n NotSwitchURLs.map(pathSetting => {\n for (let i = 0; i < pathSetting.url.length; i++) {\n if (pathSetting.url[i] !== newUrl[i + 2]) {\n return false;\n } else if (pathSetting.url.length - 1 === i) {\n urlSwitch = `/${item.value}/${pathSetting.parentUrl}`\n }\n }\n })\n\n const name = item.label || item.Name\n\n return name.indexOf('**') < 0 ? (\n
  • \n {\n this.onAccountClickHandler(\n item.value,\n item.label\n )\n }\n }\n >\n {isFav && (\n \n )}\n {name.toLowerCase()}\n \n
  • \n ) : null\n })}\n
\n )\n }\n\n onSearchInputChange = searchTerm => {\n const targetTerm = searchTerm.target.value.replace(\n /[^\\x20-\\x7E]/gim,\n ''\n )\n\n this.setState(\n {\n searchTerm: targetTerm,\n pageNo: 1\n },\n () => {\n this.search()\n }\n )\n }\n\n search = () => {\n this.searchAccounts()\n }\n\n searchAccounts() {\n\n //MH - avoiding redux, using api call to issue with conflicting reducers till we can sort that issue out\n const pageNo = 'pageNo=1'\n const pageSize = '&pageSize=10'\n const search = this.state.searchTerm\n ? '&search=' + this.state.searchTerm\n : ''\n const tempUrl = `${config.accountsApi}?${pageNo}${pageSize}${search}`\n const url = window.isPROD ? tempUrl.replace('uat', '') : tempUrl\n //clear accountList\n this.setState({accountList: []})\n\n if (window.DEBUG) console.time(url)\n return axios\n .get(url)\n .then(response => {\n if (window.DEBUG) console.timeEnd(url)\n\n if (response.data) {\n if (response.data.Error && response.data.Error !== '')\n return []\n if (\n response.data.Payload &&\n response.data.Payload.Account &&\n response.data.Payload.Account.Data\n )\n this.setState({\n accountList: response.data.Payload.Account.Data,\n accountListMax: Math.max(\n this.props.memberAccount\n ? this.props.memberAccount.accounts.length\n : 0 || 0,\n this.props.totalResults || 0,\n this.state.accountListMax\n )\n })\n }\n })\n .catch(error => {\n if (window.DEBUG) console.timeEnd(url)\n // need to do something here when get 403 error. this means the api end point is forbidden (not auth)\n\n // )\n })\n }\n\n onAccountClickHandler(accountNum, accountName) {\n this.setState({\n showSubmenu: false\n })\n if (accountName) {\n setAccountFavs(accountNum, accountName)\n this.props.toastManager.add(\n `Retreiving ${accountName}`,\n {\n appearance: 'success',\n autoDismiss: true,\n autoDismissTimeout: 3250\n // placement: 'bottom-center'\n },\n toastId => {\n this.setState({toastId})\n }\n )\n }\n }\n\n toggleLinksSubmenu = menu => {\n const toggle = !!!this.state.linksSubmenus[menu]\n this.setState({\n linksSubmenus: {...this.state.linksSubmenus, [menu]: toggle}\n })\n }\n handleAccountMenuClick = () => {\n this.setState({\n showSubmenu: !this.state.showSubmenu,\n showLinksSubmenu: false\n })\n if (!fetchAccountList) {\n //one off to get the initial accounts listing\n fetchAccountList = true\n this.searchAccounts()\n }\n this.searchInput && this.searchInput.focus()\n }\n handleLinksHamburgerMenuClick = () => {\n this.setState({\n showSubmenu: false,\n showLinksSubmenu: !this.state.showLinksSubmenu\n })\n }\n\n\n render() {\n const {selectedAccount, accountDetails, accountList} = this.props\n const tempList = accountList || []\n const options = this.state.accountList\n ? this.updateDropdownList(this.state.accountList)\n : tempList\n const listAccounts = this.updateAccountList(options)\n return (\n
\n
\n
\n
\n \n
\n {isLoggedIn() && (\n
\n MyCanon Business\n
\n )}\n
\n (this.node = node)}\n >\n {!isLoggedIn() && (\n \n )}\n\n {isLoggedIn() && (\n \n {\n this.handleAccountMenuClick(true)\n }}\n onKeyPress={() => {\n this.handleAccountMenuClick(true)\n }}\n >\n {this.state.memberAccount &&\n !this.props.isAccountDetailsLoading && (\n \n \n {' '}\n {this.state.memberAccount.company}{' '}\n \n \n \n )}\n {this.props.isAccountDetailsLoading && (\n \n \n {' '}\n Retreiving{' '}\n {this.state.accountNum}{' '}\n \n \n \n )}\n \n
\n
    \n \n {\n this.setState({\n showSubmenu1: !this\n .state.showSubmenu1\n })\n }}\n onClick={() => {\n this.setState({\n showSubmenu1: !this\n .state.showSubmenu1\n })\n }}\n >\n Company\n \n
    \n {this.state.accountListMax ===\n 1 && (\n
    \n {this.state\n .memberAccount &&\n this.state.memberAccount.company.toLowerCase()}\n
    \n )}\n {this.state.accountListMax >\n 1 &&\n this.state.accountListMax <\n 11 &&\n !this.state.searchTerm && (\n \n {\n this.select = ref\n }}\n onBlurResetsInput={\n false\n }\n onSelectResetsInput={\n false\n }\n autoFocus\n options={\n options\n }\n simpleValue\n clearable={\n false\n }\n name=\"selected-state\"\n disabled={false}\n value={\n selectedAccount\n }\n onChange={\n this\n .updateSelectedAccount\n }\n searchable={\n false\n }\n />\n
    \n )}\n {(this.state.accountListMax >\n 10 ||\n this.state.searchTerm) && (\n
    \n
    \n {\n this.searchInput = input\n }}\n className=\"fs-base pr-8\"\n placeholder=\"search\"\n pattern=\"^[a-zA-Z]*$\"\n onChange={\n this\n .onSearchInputChange\n }\n value={\n this.state\n .searchTerm\n }\n />\n
    \n {listAccounts}\n
    \n )}\n
\n \n \n {\n this.setState({\n showSubmenu2: !this\n .state.showSubmenu2\n })\n }}\n onClick={() => {\n this.setState({\n showSubmenu2: !this\n .state.showSubmenu2\n })\n }}\n >\n User\n Profile\n \n
\n
    \n
  • \n \n {this.props\n .accountRole &&\n `${this.props\n .accountRole\n }`}\n
  • \n
  • \n \n {this.state.memberAccount &&\n `${this.state.memberAccount?.member?.FirstName} ${this.state.memberAccount?.member?.LastName}`}\n
  • \n
\n
\n \n \n
\n {\n this.setState({\n showSubmenu3: !this\n .state.showSubmenu3\n })\n }}\n onClick={() => {\n this.setState({\n showSubmenu3: !this\n .state.showSubmenu3\n })\n }}\n >\n \n {accountDetails &&\n (accountDetails.VarCustomer\n ? 'Account Contact'\n : 'Account Contact')}\n \n
\n
    \n
  • \n \n {accountDetails &&\n (accountDetails.VarCustomer\n ? `Account Name`\n : `Account Manager`)}\n
  • \n
  • \n \n {accountDetails &&\n (accountDetails.VarCustomer\n ? `${accountDetails\n .AccountManager\n .FirstName\n }`\n : `${accountDetails\n .AccountManager\n .FirstName\n } ${accountDetails\n .AccountManager\n .LastName\n }`)}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .AccountManager\n .Phone &&\n `${accountDetails\n .AccountManager\n .Phone\n }`}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .AccountManager\n .Mobile && (\n {`${accountDetails\n .AccountManager\n .Mobile\n }`}\n )}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .AccountManager\n .Email && (\n \n {`${accountDetails\n .AccountManager\n .Email\n }`}\n \n )}\n
  • \n {accountDetails &&\n accountDetails &&\n accountDetails.VarCustomer && (\n
  • \n \n {accountDetails &&\n accountDetails\n .AccountManager\n .Website && (\n \n {`${accountDetails\n .AccountManager\n .Website\n }`}\n \n )}\n
  • \n )}\n\n {accountDetails &&\n accountDetails.csm && (\n \n \n Client\n Service\n Manager\n \n
  • \n \n {accountDetails &&\n `${accountDetails\n .csm\n .FirstName\n } ${accountDetails\n .csm\n .LastName\n }`}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .csm\n .Phone &&\n `${accountDetails\n .csm\n .Phone\n }`}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .csm\n .Mobile && (\n {`${accountDetails\n .csm\n .Mobile\n }`}\n )}\n
  • \n
  • \n \n {accountDetails &&\n accountDetails\n .csm\n .Email && (\n \n {`${accountDetails\n .csm\n .Email\n }`}\n \n )}\n
  • \n
    \n )}\n
\n
\n \n \n
\n
\n )}\n {isLoggedIn() && (\n \n this.handleLinksHamburgerMenuClick()\n }\n showLinksSubmenu={this.state.showLinksSubmenu}\n linksSubmenus={this.state.linksSubmenus}\n toggleLinksSubmenu={title =>\n this.toggleLinksSubmenu(title)\n }\n accountNum={this.state.accountNum}\n />\n )}\n \n \n
\n )\n }\n}\n\nconst mapStateToProps = (state, ownProps) => {\n\n const isAccountDetailsLoading = state.canonhub.accountDetails.loading\n const isMemberInfoLoading = state?.canonhub?.memberInfo.loading\n const isAuthenticating = state.auth.isAuthenticating\n const authAccessToken = state.auth.auth ? state.auth.auth.accessToken : ''\n\n const totalResults =\n state.canonhub.account && state.canonhub.account.data\n ? state.canonhub.account.data.TotalResults\n : 1\n const totalPages =\n state.canonhub.account && state.canonhub.account.data\n ? state.canonhub.account.data.TotalPages\n : 1\n const hubError = state?.canonhub?.account?.hubError\n\n\n const tempAccountInfo = sessionStorage.getItem(ACCOUNT_INFO)\n const accountInfo = state.canonhub.account?.Data || JSON.parse(tempAccountInfo)\n\n return {\n isAccountDetailsLoading,\n isMemberInfoLoading,\n isAuthenticating,\n memberAccount:\n state?.canonhub?.accountDetails?.data\n ? {\n company: state.canonhub.accountDetails.data.Name,\n accounts: accountInfo || [],\n member: state.canonhub?.memberInfo?.data,\n }\n : null,\n accountDetails: state.canonhub.accountDetails\n ? state.canonhub.accountDetails.data\n : '',\n accountRole: state?.canonhub?.accountAccess?.data?.Role,\n accountList: accountInfo || [],\n totalResults,\n totalPages,\n authAccessToken,\n selectedAccount: state.account.selectedAccount\n ? state.account.selectedAccount.selectedAccount\n ? state.account.selectedAccount.selectedAccount\n : state.account.selectedAccount\n : '',\n hubError,\n }\n}\n\nconst mapDispatchToProps = dispatch => {\n return {\n updateSelectedAccount: payload =>\n dispatch(actionCreators.setSelectedAccount(payload)),\n updateCanonHub: payload =>\n dispatch(actionCreators.getCanonHub(payload)),\n getAccountDetails: payload =>\n dispatch(actionCreators.getAccountDetails(payload))\n }\n}\nexport default withToastManager(\n connect(\n mapStateToProps,\n mapDispatchToProps\n )(Header)\n)\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n *\n */\n\n// -------------------------------------\n// Dependencies\n// -------------------------------------\n/* --empty block-- */\n\n// -------------------------------------\n// Page - Home\n// -------------------------------------\n/* --empty block-- */\n\n// ---------------------------------------------\n// Export block\n// ---------------------------------------------\nimport header from './header.js'\nimport { withRouter } from 'react-router-dom'\nexport default withRouter(header)\n","import React, {Component, Fragment} from 'react'\nimport { connect } from 'react-redux'\nimport { withToastManager } from 'react-toast-notifications'\nimport {ISNZ} from '../../../auth/constants'\n\nimport './footer.css'\n\nconst d = new Date()\nconst year = d.getFullYear()\n\nconst FooterAU = ({accountDetails}) =>(\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t
  • Canon Australia
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAbout Canon\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCorporate Profile\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSustainability\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCompliance\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCanon in the Community\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t
  • \n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t
  • Business Support
  • \n\t\t\t\t\t\t{accountDetails && !accountDetails.csm && [\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tDrivers and downloads\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
  • ,\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tRegister your product\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
  • ]}\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSafety data sheets\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t{accountDetails && !accountDetails.csm && (\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tEnd user licence agreements\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
  • )}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t
  • Contact Canon Australia
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBusiness\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tGeneral Inquiry\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tPR (Media)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t
  • {`v${process.env.REACT_APP_VERSION}`}
  • \n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t\t
  • \n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n)\n\n\nconst FooterNZ = ({accountDetails}) => (\n\t\n\t\t
\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  • Canon New Zealand
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tAbout Canon\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tCorporate Profile\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSustainability\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tCompliance\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tCanon in the Community\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t
  • \n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  • Business Support
  • \n\t\t\t\t\t{accountDetails && !accountDetails.csm && [\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tDrivers and downloads\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • ]}\n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSafety data sheets\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t{accountDetails && !accountDetails.csm && (\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tEnd user licence agreements\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • )}\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  • Contact Canon New Zealand
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tBusiness\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tGeneral Inquiry\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPR (Media)\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t\t
  • \n\n\t\t\t\t\t
  • \n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  • {`v${process.env.REACT_APP_VERSION}`}
  • \n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n)\n\nconst Footer = props => {\n\tconst {accountDetails,Localization} = props\n\n\treturn (\n\t\t
\n\t\t\t{(ISNZ) && (\n\t\t\t\t\n\t\t\t)}\n\t\t\t{(!ISNZ) && (\n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t)\n}\n\nconst mapStateToProps = (state) => {\n\n return {\n accountDetails: state.canonhub.accountDetails\n ? state.canonhub.accountDetails.data\n : '',\n\t\tLocalization: state.canonhub.accountDetails\n\t\t\t? state.canonhub.accountDetails.Localization\n\t\t\t: '',\n }\n}\nexport default withToastManager(\n connect(\n mapStateToProps\n )(Footer)\n)\n","import {Switch} from 'react-router'\nimport {Route} from 'react-router-dom'\nimport Loading from 'components/common/loading'\nimport Loadable from 'react-loadable'\nimport React from 'react'\nimport {metadata} from 'app-config'\n\nimport {GenericError} from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\nimport PrivateRoute from \"routes/private-route\";\n\nconst Assets = Loadable({\n loader: () => import('./asset-listing/index.js'),\n loading: () => (\n \n )\n})\nconst Asset = Loadable({\n loader: () => import('./asset/index.js'),\n loading: () => (\n \n )\n})\n\nconst AssetStatus = Loadable({\n loader: () => import('./asset-status'),\n loading: () => (\n \n )\n})\n\nconst AssetDetails = Loadable({\n loader: () => import('./asset-status/asset-details'),\n loading: () => (\n \n )\n})\n\n\nconst Routes = () => {\n return (\n \n \n \n \n \n {\n return \n }}\n />\n \n )\n}\n\nexport default Routes\n","import Routes from './routes'\nimport React from 'react'\nimport './index.css'\nimport AnimateLoad from 'components/common/animate-load'\n\nconst Assets = () => (\n
\n
\n \n
\n
\n)\n\nexport default AnimateLoad(Assets)\n","import { Switch } from 'react-router'\nimport { Route } from 'react-router-dom'\nimport Loading from 'components/common/loading'\nimport Loadable from 'react-loadable'\nimport React from 'react'\nimport { metadata } from 'app-config'\nimport { GenericError } from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\n// import Orders from '../orders/orders.js'\n\nconst Billing = Loadable({\n loader: () => import('./billing-listing/index.js'),\n loading: () => (\n \n )\n})\nconst Payment = Loadable({\n loader: () => import('./payment/index.js'),\n loading: () => (\n \n )\n})\n\nconst Routes = () => (\n \n \n \n {\n return \n }}\n />\n \n)\n\nexport default Routes\n","import React from 'react'\nimport './billing.css'\nimport Routes from './routes'\nimport AnimateLoad from 'components/common/animate-load'\n\nconst Billing = () => (\n
\n
\n \n
\n
\n)\n\nexport default AnimateLoad(Billing)\n","import React, {Fragment} from 'react'\nimport LinkButton from 'components/common/buttons/link-button-icon.jsx'\nimport {AuthHOC} from 'utils/acl-permissions'\nimport {Permissions} from 'utils/acl-permissions'\nimport './tile.css'\n\nconst Tile = React.forwardRef((props, ref) => {\n const {links, isNZ} = props\n\n return (\n
\n
\n {props.title}\n \n
\n
\n
    \n {Object.keys(links).map(key => {\n const isExternal = links[key].href.indexOf('//') > 0\n return (\n \n {/*
  • */}\n {!isExternal && (\n \n {/* temporarily disabling this option for NZ*/}\n
  • \n \n
  • \n \n )}\n {isExternal && (\n \n
  • \n \n \n {links[key].text}\n \n
  • \n \n )}\n {/**/}\n
    \n )\n })}\n
\n
\n
\n )\n})\nexport default AuthHOC()(Tile, null)\n","import React, {useEffect, createRef} from 'react'\nimport './landing.css'\nimport AnimateLoad from 'components/common/animate-load'\nimport Tile from './components/tile.js'\nimport {connect, useDispatch} from 'react-redux'\nimport Tiles from './tile.json.js'\nimport {gsap} from 'gsap/dist/gsap'\nimport {Slide} from 'react-slideshow-image'\nimport {setSearchOptions, setPagingSetting} from '../../redux/actions/index'\nimport 'react-slideshow-image/dist/styles.css'\nimport Button from \"../../components/common/buttons/link-button-icon\";\nimport {AU} from 'utils/constants'\n\nconst Landing = (props) => {\n const dispatch = useDispatch()\n\n const slideImages = [\n {\n id: 1,\n title: 'My Canon Business',\n url: '/assets/img/landing-page-hero-nz-slide-1.jpg',\n caption: 'Your Business, Your Time, Your Way'\n },\n {\n id: 2,\n url: '/assets/img/Print-Hub-MCB-Portal-Banner.png',\n title: 'Canon Print Hub',\n caption: 'You qualify for Preferential Customer Pricing through the Canon Print Hub. Register now and receive $150 credit on high quality outsourced printing, including brochures, booklets, signage and more.',\n buttonCaption: 'Register Now',\n buttonAction: () => window.open(\"https://print.canon.co.nz/login/userregistration/UserRegistration\", \"_blank\")\n },\n ];\n\n const {\n isAccountAccessLoading,\n isAccountDetailsLoading,\n memberInfo,\n isNZ\n } = props\n\n const handleSetOptionsData = () => {\n const payload = {}\n dispatch(setSearchOptions(payload))\n dispatch(setPagingSetting(payload))\n }\n // cards, elements tha will be used in the tween\n let cards = []\n\n // the timeline instance\n const tl = gsap.timeline()\n\n //MH- test tween\n const tweenRestart = () => {\n const myRef = '.tile-101'\n tl.to(\n myRef,\n 0.6,\n {\n stagger: {\n autoAlpha: 1,\n y: -20,\n ease: 'easeInOut',\n onComplete: null\n },\n delay: 2\n },\n 0.1\n ).restart()\n }\n\n\n useEffect(\n () => {\n if (\n !cards ||\n cards.length <= 0 ||\n isAccountDetailsLoading ||\n isAccountAccessLoading\n ) return\n\n handleSetOptionsData()\n\n tl.to(\n '.tile-101',\n 0.6,\n {\n stagger: {\n autoAlpha: 1,\n y: -20,\n ease: 'easeInOut',\n onComplete: null\n }\n },\n 0.1\n ).play()\n },\n [isAccountAccessLoading, isAccountDetailsLoading, cards]\n )\n\n return (\n
\n {isNZ ?\n \n {slideImages.map(({id, title, caption, buttonCaption, buttonAction, url}, index) => (\n
\n
\n
\n

\n {title}\n

\n
\n {caption}\n
\n {(buttonCaption && buttonAction) && (\n
\n \n
\n )}\n
\n
\n
\n ))}\n
\n :\n
\n
\n
\n

\n Welcome to MyCanon Business\n

\n
\n Your Business, Your Time, Your{' '} tweenRestart()}>Way\n
\n
\n
\n
\n\n }\n\n \n {Object.keys(Tiles).map(key => {\n let permissions = new Set()\n Tiles[key].links.forEach(link => {\n if (link.permissions)\n link.permissions.forEach(permission => {\n permissions.add(permission)\n })\n })\n\n return (\n div))}\n isNZ={isNZ}\n />\n )\n })}\n
\n \n )\n}\n\nconst mapStateToProps = (state, ownProps) => {\n const isAccountDetailsLoading = state?.canonhub?.accountDetails?.loading\n const isAccountAccessLoading = state?.canonhub?.accountAccess?.loading\n const isNZ = state?.canonhub?.accountDetails?.data?.Localization !== AU\n const memberInfo = state?.canonhub?.memberInfo\n\n return {\n isAccountDetailsLoading,\n isAccountAccessLoading,\n isNZ,\n memberInfo\n }\n}\n\nexport default connect(\n mapStateToProps,\n null\n)(AnimateLoad(Landing))\n","import {Switch} from 'react-router'\nimport {Route} from 'react-router-dom'\nimport Loading from 'components/common/loading'\nimport Loadable from 'react-loadable'\nimport React from 'react'\nimport {metadata} from 'app-config'\nimport {GenericError} from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\n\nconst AssetOrders = Loadable({\n loader: () => import('./asset-orders-listing/index.js'),\n loading: () => (\n \n )\n})\n\nconst AssetOrder = Loadable({\n loader: () => import('./asset-order/index.js'),\n loading: () => (\n \n )\n})\n\n\nconst Routes = () => (\n \n \n \n {\n return \n }}\n />\n \n)\n\nexport default Routes\n","import Routes from './routes'\nimport React from 'react'\nimport './index.css'\nimport AnimateLoad from 'components/common/animate-load'\n\nconst AssetOrders = () => (\n
\n
\n \n
\n
\n)\n\nexport default AnimateLoad(AssetOrders)\n","import {Switch} from 'react-router'\nimport PrivateRoute from 'routes/private-route'\nimport {Route} from 'react-router-dom'\nimport React from 'react'\nimport {metadata} from 'app-config'\nimport Assets from './assets'\nimport {GenericError} from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\nimport Loadable from 'react-loadable'\nimport Loading from 'components/common/loading'\n\nconst Consumables = Loadable({\n loader: () => import('./consumables/consumables-listing/index.js'),\n loading: () => (\n \n )\n})\n\nconst Consumable = Loadable({\n loader: () => import('./consumables/consumable/index.js'),\n loading: () => (\n \n )\n})\n\nconst Request = Loadable({\n loader: () => import('./consumables/consumables-request/index.js'),\n loading: () => (\n \n )\n})\n\nconst Routes = () => (\n \n \n {\n if (props.match.params.orderId === 'request') {\n return \n } else {\n return \n }\n }}\n />\n\n \n {\n return \n }}\n />\n \n)\n\nexport default Routes\n","import Routes from './routes'\nimport React from 'react'\nimport './index.css'\nimport AnimateLoad from 'components/common/animate-load'\n\nconst Orders = () => (\n
\n
\n \n
\n
\n)\n\nexport default AnimateLoad(Orders)\n","import Loading from './components/common/loading'\nimport Loadable from 'react-loadable'\nimport React from 'react'\nimport Assets from 'features/assets'\nimport Billing from 'features/billing'\nimport Landing from 'features/landing'\nimport Orders from 'features/orders'\n\n//TODO need to think/move about the common loader page for all code splitting pages\n\nconst Users = Loadable({\n loader: () => import('features/users'),\n loading: () => (\n
\n \n
\n )\n})\nconst Contacts = Loadable({\n loader: () => import('features/contacts'),\n loading: () => (\n
\n \n
\n )\n})\nconst Contact = Loadable({\n loader: () => import('features/contact'),\n loading: () => (\n
\n \n
\n )\n})\nconst ContactUs = Loadable({\n loader: () => import('features/contact'),\n loading: () => (\n
\n \n
\n )\n})\nconst Safety = Loadable({\n loader: () => import('features/safety'),\n loading: () => (\n
\n \n
\n )\n})\nconst Network = Loadable({\n loader: () => import('features/network'),\n loading: () => (\n
\n \n
\n )\n})\nconst SafetyForm = Loadable({\n loader: () => import('features/safety/safety-form'),\n loading: () => (\n
\n \n
\n )\n})\nconst NetworkForm = Loadable({\n loader: () => import('features/network/network-form'),\n loading: () => (\n
\n \n
\n )\n})\nconst NetworkBulk = Loadable({\n loader: () => import('features/network/network-listing/bulk-listing'),\n\n loading: () => (\n
\n \n
\n )\n})\nconst MeterReading = Loadable({\n loader: () => import('features/meterReading'),\n loading: () => (\n
\n \n
\n )\n})\n\nconst SafetyBulk = Loadable({\n loader: () => import('features/safety/safety-listing/bulk-listing'),\n\n loading: () => (\n
\n \n
\n )\n})\nconst SafetyTemplates = Loadable({\n loader: () => import('features/safety/safety-listing/template-listing'),\n\n loading: () => (\n
\n \n
\n )\n})\nconst SafetyFormTemplate = Loadable({\n loader: () => import('features/safety/safety-form/safety-template'),\n\n loading: () => (\n
\n \n
\n )\n})\n\nconst NetworkTemplates = Loadable({\n loader: () => import('features/network/network-listing/template-listing'),\n\n loading: () => (\n
\n \n
\n )\n})\nconst NetworkFormTemplate = Loadable({\n loader: () => import('features/network/network-form/network-template'),\n\n loading: () => (\n
\n \n
\n )\n})\n\nconst Service = Loadable({\n loader: () => import('features/service'),\n loading: () => (\n
\n \n
\n )\n})\n\nconst ServiceDirect = Loadable({\n loader: () => import('features/service/tech-access-forms'),\n loading: () => (\n
\n \n
\n )\n})\n\nconst ReportsDocuments = Loadable({\n loader: () => import('features/reports/reportsDocuments'),\n loading: () => (\n
\n \n
\n )\n})\n\nconst GenerateReports = Loadable({\n loader: () => import('features/reports/generateReports'),\n loading: () => (\n
\n \n
\n )\n})\n\nexport {\n Assets,\n MeterReading,\n Landing,\n Users,\n Contacts,\n Billing,\n Orders,\n Service,\n Contact,\n ContactUs,\n Safety,\n SafetyForm,\n SafetyBulk,\n SafetyTemplates,\n SafetyFormTemplate,\n NetworkForm,\n Network,\n NetworkBulk,\n GenerateReports,\n ReportsDocuments,\n ServiceDirect,\n NetworkTemplates,\n NetworkFormTemplate\n}\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @repo\n *\n */\n\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\nimport React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport history from 'history/history.js'\nimport {willCallBack} from 'auth'\nimport Loading from 'components/common/loading/index.js'\nimport ErrorCodes from 'utils/errorCodes'\nimport {getLocalAccount} from 'components/common/local-storage/helper.js'\n\nimport './singlesignon.css'\n\nconst DashboardLoading = () => (\n
\n
\n \n
\n
\n)\n\nclass SSO extends Component {\n\n render() {\n return \n }\n}\n\n// eslint-disable-next-line\nconst mapStateToProps = (state, ownProps) => {\n // Sri - We have a redux state named isAuthenticating which is set to true once the authorize process starts by auth0 and set to false by handleaauthentication cb after the /callback call\n // only after the whole authentication is done , redirect to the corresponding pages either the vistied page or the default route dashboard page.\n\n let canRedirect =\n !state.auth.isAuthenticating && // whole process of auth0 is done\n state.canonhub?.account?.data && // the account data has been retrived and set to state.\n state?.auth?.auth?.accessToken && // the authdata has been retrived and set\n state?.canonhub?.memberInfo?.data // All the member related information and permission relating to the user has been retrieved\n\n //[sp] check if there is an error during the account api call process, in that case throw error\n if (!state?.canonhub?.account?.loading && state?.canonhub?.account?.error) {\n canRedirect = false\n throw ErrorCodes.GENERIC\n } else if (!state?.canonhub?.account?.loading && state?.canonhub?.account?.data) {\n if (\n !state?.canonhub?.account?.data?.Data ||\n state?.canonhub?.account?.data?.Data?.length === 0\n ) {\n canRedirect = false\n throw ErrorCodes.NOT_AUTHORIZED\n }\n }\n\n if (canRedirect) {\n //Sri- first check if this call for a redirect, in case the callback key in the localstorage is not empty and redirect to that link\n const callBackURL = willCallBack()\n //sri - remove the callback url irrespectivce of what\n localStorage.removeItem('callback')\n if (callBackURL && (callBackURL !== '/signout' || callBackURL !== '/accesserror' || callBackURL !== '/accesserrorsts')) history.replace(callBackURL)\n //MH temp fix | MCB-820:users redirected to /signout on signin after SSO changes\n else if (state.canonhub.account.data.Data.length > 0) {\n //else if there is no callback url in localstorage then refirect to the dashboard landing page- default redirect\n //[ch] temporary solution before hooking up with persist:root\n // localStorage.setItem(\n // 'member_dashboard',\n // '/dashboard/' + state?.canonhub?.memberInfo.data.Accounts[0].Number\n // )\n setTimeout(() => {\n history.replace(\n `/${getLocalAccount(\n state.canonhub.account.data.Data[0].Number\n )}`\n )\n }, 100)\n } else {\n history.replace('/')\n }\n }\n return {}\n}\n\nexport default connect(\n mapStateToProps,\n {}\n)(SSO)\n","//[SP] Utility classto Loazy load images and other components on scroll into view\nclass LazyLoad {\n static configureLazyLoadImages = () => {\n var win = window\n var doc = window.document\n if (!('requestAnimationFrame' in win)) {\n win.requestAnimationFrame = (function() {\n return (\n win.webkitRequestAnimationFrame ||\n win.mozRequestAnimationFrame ||\n win.oRequestAnimationFrame ||\n win.msRequestAnimationFrame ||\n function(callback) {\n return win.setTimeout(callback, 1000 / 60)\n }\n )\n })()\n }\n\n if (!('cancelAnimationFrame' in win)) {\n win.cancelAnimationFrame = (function() {\n return (\n win.webkitCancelAnimationFrame ||\n win.mozCancelAnimationFrame ||\n win.oCancelAnimationFrame ||\n win.msCancelAnimationFrame ||\n function(id) {\n return win.cancelTimeout(id)\n }\n )\n })()\n }\n\n win.toad = {\n startListening: start\n }\n\n function addEventHandler(ev, h) {\n win.addEventListener\n ? win.addEventListener(ev, h, !1)\n : win.attachEvent\n ? win.attachEvent('on' + ev, h)\n : (win['on' + ev] = h)\n }\n\n function removeEventHandler(ev, h) {\n win.removeEventListener\n ? win.removeEventListener(ev, h, !1)\n : win.detachEvent\n ? win.detachEvent('on' + ev, h)\n : (win['on' + ev] = null)\n }\n\n function isInViewport(r) {\n return r.top >= 0 && r.left >= 0 && r.top <= win.innerHeight\n }\n\n function rebounce(f) {\n var scheduled\n var context\n var args\n var len\n var i\n return function() {\n context = this\n args = []\n len = arguments.length\n i = 0\n\n for (; i < len; ++i) {\n args[i] = arguments[i]\n }\n\n if (!!scheduled) {\n win.cancelAnimationFrame(scheduled)\n }\n\n scheduled = win.requestAnimationFrame(function() {\n f.apply(context, args)\n scheduled = null\n })\n }\n }\n\n function toad() {\n var elements = doc.querySelectorAll('[data-src]') || []\n var len = elements.length\n var j = 0\n var this_el\n\n for (; j < len; ++j) {\n this_el = elements[j]\n\n if (\n !this_el.getAttribute('data-src') ||\n !isInViewport(this_el.getBoundingClientRect())\n ) {\n return\n }\n\n if (\n !!this_el.getAttribute('data-src') &&\n isInViewport(this_el.getBoundingClientRect())\n ) {\n if ('img' === this_el.tagName.toLowerCase()) {\n this_el.src = this_el.getAttribute('data-src')\n this_el.removeAttribute('data-src')\n } else {\n this_el.style.backgroundImage =\n 'url(' + this_el.getAttribute('data-src') + ')'\n this_el.removeAttribute('data-src')\n }\n }\n }\n }\n\n function start() {\n addEventHandler('load', rebounce(toad))\n addEventHandler('scroll', rebounce(toad))\n addEventHandler('resize', rebounce(toad))\n }\n\n window.toad.startListening()\n }\n}\n\nexport default LazyLoad\n","import React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport './home.css'\nimport LazyLoad from 'lazy-load'\nimport { gsap } from \"gsap/dist/gsap\"\nimport { login } from 'auth'\nimport AnimateLoad from 'components/common/animate-load'\nimport { ISNZ } from '../../auth/constants'\n\nclass Home extends Component {\n\n constructor(props) {\n super(props)\n if (props) {\n this.state = {}\n }\n this.cards = []\n this.tl = gsap.timeline({ paused: true })\n this.cycle = 0\n }\n\n componentDidMount() {\n if (this.props.account) {\n }\n LazyLoad.configureLazyLoadImages()\n this.tl.to(\n this.cards,\n 1,\n {\n stagger: {\n autoAlpha: 1,\n repeat: 2,\n yoyo: true,\n repeatDelay: 20,\n ease: 'easeInOut'\n }\n },\n 21\n ).play()\n // console.log(ISNZ)\n this.setState({\n registerLink: ISNZ ? 'https://www.canon.co.nz/business/register' : 'https://solutions.canon.com.au/register',\n videoLink: ISNZ ? 'https://www.youtube.com/embed/yC3uyCeeZsI' : 'https://www.youtube.com/embed/f4fcyEimMP0?list=PLdjusQgp4g92l5YHr4_QSunzq1uyp-XJM'\n\n })\n this.cycle = setInterval(this.handleHeroAnimation, 75000)\n document.body.classList.add('home')\n }\n\n componentWillUnmount() {\n if (this.tl.isActive) {\n this.tl.pause()\n this.tl.kill()\n }\n clearInterval(this.cycle)\n document.body.classList.remove('home')\n }\n\n render() {\n return (\n
\n
\n \n (this.cards[0] = img)}\n />\n (this.cards[1] = img)}\n />\n (this.cards[2] = img)}\n />\n
\n
\n

MyCanon Business

\n

\n Manage your accounts with ease from our simple\n online support hub.\n

\n
\n
Your Business,
\n
Your Time, Your Way
\n \n
\n
\n
\n
    \n
  • \n \n
    View asset usage history
    \n
  • \n
  • \n \n
    Schedule & track your technician requests
    \n
  • \n
  • \n \n
    View & pay invoices
    \n
  • \n
  • \n \n
    Order consumables
    \n
  • \n
  • \n \n
    View & troubleshoot assets
    \n
  • \n
\n
\n
\n
\n See what you can do with MyCanon Business & TechConnect\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n Experience{' '}\n \n
\n

\n A handy tool that lets you book and receive\n status updates on your tech services\n

\n
\n
\n
\n
\n )\n }\n}\nconst mapStateToProps = (state, ownProps) => {\n return {\n account: state.account.selectedAccount\n }\n}\n\nexport default AnimateLoad(\n connect(\n mapStateToProps,\n null\n )(Home)\n)\n","import React from 'react'\nimport {Route, Switch} from 'react-router-dom'\nimport {handleAuthentication} from 'auth'\nimport {\n Assets,\n MeterReading,\n Landing,\n Users,\n Contacts,\n Billing,\n Orders,\n Service,\n Contact,\n ContactUs,\n Safety,\n SafetyBulk,\n SafetyTemplates,\n SafetyFormTemplate,\n NetworkTemplates,\n NetworkFormTemplate,\n SafetyForm,\n Network,\n NetworkForm,\n NetworkBulk,\n GenerateReports,\n ReportsDocuments,\n ServiceDirect\n} from 'loader'\nimport PrivateRoute from './private-route'\nimport SingleSignOnCallBack from 'features/auth/sso/index.js' //SSO thru STS callback\nimport Home from 'features/home'\nimport {ErrorBoundary} from 'components/error-pages'\nimport {metadata} from 'app-config'\nimport {GenericError} from 'components/error-pages'\nimport ErrorCodes from 'utils/errorCodes'\nimport TermsAndConditions from 'components/common/terms-conditions/terms-conditions.js'\n\nconst handleNewAuthentication = (nextState, replace) => {\n //if (/access_token|id_token|error/.test(nextState.location.hash)) {\n handleAuthentication()\n //}\n}\n\n/* [sp] - couldn't figure out best place other than here to have these HOC wrapper. \nHaving generically in the render prop of the react router is causing the CompoenentAttached to the router mount always the router prop changes.\n- Also This is will be the best place to have nested HOC wrappers */\nconst AssetsWrapper = TermsAndConditions(Assets)\nconst MeterReadingWrapper = TermsAndConditions(MeterReading)\nconst LandingWrapper = TermsAndConditions(Landing)\nconst UsersWrapper = TermsAndConditions(Users)\nconst ContactsWrapper = TermsAndConditions(Contacts)\nconst GenerateReportsWrapper = TermsAndConditions(GenerateReports)\nconst ReportsDocumentsWrapper = TermsAndConditions(ReportsDocuments)\nconst BillingWrapper = TermsAndConditions(Billing)\nconst OrdersWrapper = TermsAndConditions(Orders)\nconst ContactWrapper = TermsAndConditions(Contact)\nconst ContactUsWrapper = TermsAndConditions(ContactUs)\n//const ServiceWrapper = TermsAndConditions(Service)\nconst ServiceWrapper = Service\nconst ServiceDirectWrapper = ServiceDirect\nconst SafetyWrapper = TermsAndConditions(Safety)\nconst SafetyFormWrapper = TermsAndConditions(SafetyForm)\nconst SafetyBulkWrapper = TermsAndConditions(SafetyBulk)\nconst SafetyTemplatesWrapper = TermsAndConditions(SafetyTemplates)\nconst SafetyFormTemplateWrapper = TermsAndConditions(SafetyFormTemplate)\nconst NetworkTemplatesWrapper = TermsAndConditions(NetworkTemplates)\nconst NetworkFormTemplateWrapper = TermsAndConditions(NetworkFormTemplate)\n\nconst NetworkWrapper = TermsAndConditions(Network)\nconst NetworkFormWrapper = TermsAndConditions(NetworkForm)\nconst NetworkBulkWrapper = TermsAndConditions(NetworkBulk)\n\nconst Routes = () => (\n \n {/** [sp] Generic error boundary for all routes/ app using the componentDidCatch lifecyle call in the ErrorBoundary component **/}\n \n {\n handleNewAuthentication(props)\n return \n }}\n />{' '}\n {/*[sp]PrivateRoute - A Decorator/ wrapper Route component that \n adds the additonal functionality to check and reauthenticate the corresponding route children if not already authenticated */}\n \n \n \n \n \n \n \n \n \n \n {/*\n\t\t\tSP - Service route is no longer authenticated\n\t\t\tbecuase the unauthenticated salted service order route is a nested child of service,\n\t\t\tinstead check for private routes/ t&c's at service feature routes\n\t\t\t*/}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n (\n \n )}\n permissions={metadata.accesserror.permissions}\n />\n (\n \n )}\n permissions={metadata.accesserrorsts.permissions}\n />\n (\n \n )}\n // permissions={metadata.ordercomplete.permissions}\n />\n \n {/* new unsecured route */}\n \n {\n return \n }}\n />\n \n \n)\nexport default Routes\n","import axios from 'axios'\n// import config from 'config.json'\n\nclass ChatBot {\n static getResponse = query => {\n // .get(`http://172.17.136.6:5001/chatbot?queryText=${query}`)\n return axios\n .get(`https://uatapi.canon.com.au/hub/v2/gcp/query?q=${query}`, {\n heads: {\n Source: 'chatbot'\n }\n })\n .then(response => {\n return response.data\n })\n .then(data => {\n return data\n })\n .catch(error => {\n throw error\n })\n }\n}\n\nexport default ChatBot\n\n//\n\n// let options = {\n// method: 'GET',\n// headers: {\n// 'Content-Type': 'application/json; charset=utf-8',\n// Authorization:\n// 'Bearer ya29.c.ElrOBnYIYdwI3g-9spIypAuXoGGcpfumN8idxIjf7lb-LUL8OVAEPG9dXcTX4lu0IwMcuOS-uL4lF4hhxNsC5mmj3eQ4bKwKsuX8Z4E4-xIgeA2Kx-Sd3AcE-88'\n// },\n// data:\n// '{\"queryInput\":{\"text\":{\"text\":\"book a service\",\"languageCode\":\"en\"}},\"queryParams\":{\"timeZone\":\"Australia/Sydney\"}}',\n// url:\n// 'https://dialogflow.googleapis.com/v2beta1/projects/canvas-dev-abeda/agent/sessions/be0ec7a3-e26b-1533-49b1-93dade57f48d:detectIntent'\n// }\n// axios\n// .get(\n// 'https://dialogflow.googleapis.com/v2beta1/projects/canvas-dev-abeda/agent/sessions/be0ec7a3-e26b-1533-49b1-93dade57f48d:detectIntent',\n// {\n// queryInput: {\n// text: {\n// text: 'book a servce',\n// languageCode: 'en'\n// },\n// queryParams: {\n// timeZone: 'Australia/Sydney'\n// }\n// }\n// }\n// )\n// .then(function(response) {\n// console.log(response)\n// })\n// .catch(function(error) {\n// console.log(error)\n// })\n// .then(function() {\n// // always executed\n// })\n// return axios({\n// options\n// })\n// .then(response => {\n// console.log(response)\n// return response.data\n// })\n// .catch(error => {\n// throw error\n// })\n// return axios\n// .get(`https://dialogflow.googleapis.com/v2beta1/projects/canvas-dev-abeda/agent/sessions/be0ec7a3-e26b-1533-49b1-93dade57f48d:detectIntent`, query)\n// .then(response => {\n// console.log(response)\n// return response.data\n// })\n// .then(data => {\n// return data\n// })\n// .catch(error => {\n// throw error\n// })\n\n// const thing = {\n// queryInput: { text: { text: 'book a service', languageCode: 'en' } },\n// queryParams: { timeZone: 'Australia/Sydney' }\n// }\n// var request = require('request');\n\n// var headers = {\n// 'Content-Type': 'application/json; charset=utf-8',\n// 'Authorization': 'Bearer ya29.c.ElrOBnYIYdwI3g-9spIypAuXoGGcpfumN8idxIjf7lb-LUL8OVAEPG9dXcTX4lu0IwMcuOS-uL4lF4hhxNsC5mmj3eQ4bKwKsuX8Z4E4-xIgeA2Kx-Sd3AcE-88'\n// }\n\n// var dataString = '{\"queryInput\":{\"text\":{\"text\":\"book a service\",\"languageCode\":\"en\"}},\"queryParams\":{\"timeZone\":\"Australia/Sydney\"}}'\n\n// var options = {\n// url: 'https://dialogflow.googleapis.com/v2beta1/projects/canvas-dev-abeda/agent/sessions/be0ec7a3-e26b-1533-49b1-93dade57f48d:detectIntent',\n// method: 'POST',\n// headers: headers,\n// body: dataString\n// }\n\n// let options = {\n// method: 'GET',\n// headers: {\n// 'Content-Type': 'application/json; charset=utf-8',\n// 'Authorization': 'Bearer ya29.c.ElrOBnYIYdwI3g-9spIypAuXoGGcpfumN8idxIjf7lb-LUL8OVAEPG9dXcTX4lu0IwMcuOS-uL4lF4hhxNsC5mmj3eQ4bKwKsuX8Z4E4-xIgeA2Kx-Sd3AcE-88'\n// },\n// data: '{\"queryInput\":{\"text\":{\"text\":\"book a service\",\"languageCode\":\"en\"}},\"queryParams\":{\"timeZone\":\"Australia/Sydney\"}}',\n// url: 'https://dialogflow.googleapis.com/v2beta1/projects/canvas-dev-abeda/agent/sessions/be0ec7a3-e26b-1533-49b1-93dade57f48d:detectIntent'\n// }\n\n// request(options, callback)\n\n// axios({\n// baseURL: 'https://api.shutterstock.com/v2/images/search?query=donkey&page=1&per_page=1',\n// auth: { username: 'CLIENT_ID', password: 'CLIENT_SECRET'},\n// params: { query: 'donkey', page: '1', per_page: '1' }\n// }).then(res => console.log(res));\n\n// curl -H \"Content-Type: application/json; charset=utf-8\" -H\n// \"Authorization: Bearer ya29.c.ElrOBnYIYdwI3g-9spIypAuXoGGcpfumN8idxIjf7lb-LUL8OVAEPG9dXcTX4lu0IwMcuOS-uL4lF4hhxNsC5mmj3eQ4bKwKsuX8Z4E4-xIgeA2Kx-Sd3AcE-88\" -d\n// \"{\\\"queryInput\\\":{\\\"text\\\":{\\\"text\\\":\\\"book a service\\\",\\\"languageCode\\\":\\\"en\\\"}},\\\"queryParams\\\":{\\\"timeZone\\\":\\\"Australia/Sydney\\\"}}\"\n// \"\"\n","import React from 'react'\nimport axios from 'axios'\nimport config from 'config.json'\nimport { uniqueId } from 'lodash'\n\nclass WingmanApi {\n static fetchHelpNode = node => {\n if (window.DEBUG) console.time(`selfhelp ${node}`)\n return axios\n .get(\n `https://uatapi.canon.com.au/hub/v2/selfhelp?path=mfd/support/help/iradvc/nodes/${node}`\n )\n .then(response => {\n if (window.DEBUG) console.timeEnd(`selfhelp ${node}`)\n return response\n })\n .catch(error => {\n if (window.DEBUG) console.timeEnd(`selfhelp ${node}`)\n throw error\n })\n }\n\n static decodeWingman(node, nodeClick, noderoot) {\n if (!node) return null\n const listItems = Object.keys(node.view).map(key => {\n return this.decodeViewType(node.view[key], 'c' + key, nodeClick)\n })\n return (\n \n {listItems}\n \n )\n }\n static decodeViewType = (d, k, nodeClick) => {\n if (!d) return null\n if (!d.type) return null\n let helpModel = d.model ? d.model : 'all' // check the device model against the model/pattern from the json\n let truthy = helpModel === 'all'\n if (!truthy) {\n let helpModelArray = helpModel.split('|')\n for (let i = 0, j = helpModelArray.length; i < j; i++) {\n if (\n this.matchRuleShort(\n this.props.model.toLowerCase(),\n helpModelArray[i]\n )\n )\n truthy = true\n }\n }\n if (d.except && truthy) {\n // check for model exception in the model/pattern\n let helpModelArray = helpModel.split('|')\n for (let i = 0, j = helpModelArray.length; i < j; i++) {\n if (\n this.matchRuleShort(\n this.props.model.toLowerCase(),\n helpModelArray[i]\n )\n )\n truthy = false\n }\n }\n if (!truthy) return null\n let nodeType = d.type\n if (nodeType === 'list' && d.ul) nodeType = 'list.ul'\n if (nodeType === 'list' && d.ol) nodeType = 'list.ol'\n switch (nodeType) {\n case 'text':\n if (d.h2 === 'Or describe the issue with your MFD') return //exception\n if (d.h2)\n return (\n \n
{d.h2}
\n \n )\n if (d.p)\n if (Array.isArray(d.p)) {\n return Object.keys(d.p).map(key => {\n return (\n \n )\n })\n } else {\n return (\n \n )\n }\n\n break\n case 'line':\n return
\n case 'list.ul':\n return (\n
    \n {Object.keys(d.ul).map(key => {\n if (d.ul[key] && d.ul[key].text && d.ul[key].link) {\n return (\n \n nodeClick(\n d.ul[key].link,\n d.ul[key].text\n )\n }\n >\n {/* [{Number(key) + 1}]   */}\n \n {d.ul[key].text}\n \n \n )\n } else if (d.ul[key] && d.ul[key].text) {\n return (\n \n {/* [{Number(key) + 1}]   */}\n \n {d.ul[key].text}\n \n \n )\n } else {\n return null\n }\n })}\n
\n )\n case 'list.ol':\n return (\n
    \n {Object.keys(d.ol).map(key => {\n if (d.ol[key] && d.ol[key].text) {\n return (\n \n {d.ol[key].text}\n {d.ol[key].img && (\n
    \n \n
    \n )}\n \n )\n } else {\n return null\n }\n })}\n
\n )\n case 'img':\n // this.multiElementSplit(d, 'img')\n if (Array.isArray(d.img)) {\n return Object.keys(d.img).map(key => {\n return (\n
\n \n
\n )\n })\n } else {\n return (\n \n )\n }\n case 'button':\n return null\n // return \n // if (d.text === 'Book a tech') {\n // return (\n // \n // )\n // }\n // return (\n // \n // )\n\n case 'pdf':\n return (\n \n \n {d.text}\n \n )\n default:\n return null\n }\n }\n}\n\nexport default WingmanApi\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @desc Chatbox w/ Dialogflow\n * @link https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/\n * @link https://github.com/typicode/react-lodash\n * @link https://medium.com/@heatherbooker/how-to-auto-scroll-to-the-bottom-of-a-div-415e967e7a24\n * @link https://codepen.io/devstreak/pen/dMYgeO styling scroll bars\n * @link https://flaviocopes.com/speech-synthesis-api/ speech synthesis api\n * @link https://mdn.github.io/web-speech-api/speech-color-changer/script.js\n * @link https://www.google.com/intl/en/chrome/demos/speech.html\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speaking\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API#Demo\n * @link https://nzbin.github.io/three-dots/ 3 dots loading\n *\n */\n\n// -------------------------------------\n// Dependencies: core\n// -------------------------------------\nimport React, {Component} from 'react'\nimport './chatbot.css'\nimport ChatBot from './dialogFlow.js'\nimport {uniqueId} from 'lodash'\nimport WingmanApi from 'components/common/wingman/wingman.js'\nimport parse from 'html-react-parser'\nimport {connect} from 'react-redux'\nimport {cloneDeep} from 'lodash'\nimport {gsap} from \"gsap/dist/gsap\"\n\nconst isConstructor = value => {\n try {\n new new Proxy(value, {\n construct() {\n return {}\n }\n })()\n return true\n } catch (err) {\n return false\n }\n}\n\nlet _timeoutID\nlet someElement, observer\nlet speechSynthUtterance =\n 'speechSynthesis' in window ? new SpeechSynthesisUtterance() : '' // gotta do it here else state will complain\n// let recognition =\n// 'webkitSpeechRecognition' in window ? new webkitSpeechRecognition() : ''\nvar SpeechRecognition =\n window.SpeechRecognition || window.webkitSpeechRecognition\nlet recognition = isConstructor(SpeechRecognition)\n ? new SpeechRecognition()\n : null\n\n// console.log('webkitSpeechRecognition' in window)\nclass Chatbot extends Component {\n // ---------------------------------------------\n // Constructor block\n // ---------------------------------------------\n /**\n * @name constructor\n * @desc the constructor for the component class.\n * @param {Object} props - the properties passed to the component.\n */\n constructor(props) {\n super(props)\n this.state = {\n expand: false,\n chatMessages: [],\n wingmanResponse: '',\n postVal: '',\n chatMsgs: [],\n testWing: [],\n SessionId: '',\n AccessToken: '',\n isReady: false,\n isThinking: false,\n isMic: true,\n isSpeak: false,\n fatman: '',\n firstTime: false,\n isManagingFocus: false\n }\n this.textInput = React.createRef()\n this.fetchWingman = this.fetchWingman.bind(this)\n this.handleNodeChange = this.handleNodeChange.bind(this)\n this.handleQuickSelect = this.handleQuickSelect.bind(this)\n this.chatbotRequest = this.chatbotRequest.bind(this)\n this.handleMicClick = this.handleMicClick.bind(this)\n this.handleSpeakClick = this.handleSpeakClick.bind(this)\n this.handleRecognition = this.handleRecognition.bind(this)\n this.fatmanRef = React.createRef()\n //this.myTween = gsap({ paused: true })\n this.chatbotRef = null\n }\n\n /**\n * @name componentDidMount\n * @desc the function called once the component mounted\n */\n componentDidMount() {\n document.body.classList.add('chatbot')\n // const voiceschanged = () => {\n // console.log(`Voices #: ${speechSynthesis.getVoices().length}`)\n // speechSynthesis.getVoices().forEach(voice => {\n // console.log(voice.name, voice.lang)\n // })\n // }\n // speechSynthesis.onvoiceschanged = voiceschanged\n if (speechSynthUtterance) {\n speechSynthUtterance.lang = 'en-AU'\n speechSynthUtterance.name = 'Karen'\n }\n if (recognition) {\n recognition.lang = 'en-US'\n recognition.continuous = false\n recognition.interimResults = false\n recognition.onstart = this.handleRecognition.bind(this)\n recognition.onerror = this.handleRecognition.bind(this)\n recognition.onend = this.handleRecognition.bind(this)\n recognition.onresult = event => this.handleRecognition(event)\n }\n\n this.myTween = gsap.to(this.chatbotRef, 0.35, {\n bottom: 0,\n delay: 1,\n opacity: 1\n })\n // this.myTween.play()\n }\n\n handleMicClick(event) {\n if (this.state.isMic) {\n this.handleInitRecognition()\n } else {\n recognition.stop()\n }\n }\n\n handleRecognition(event) {\n // console.log(s)\n // console.log(s.results)\n // console.log(event.type)\n switch (event.type) {\n case 'start':\n this.setState({\n isMic: false,\n isThinking: true\n })\n break\n case 'result':\n if (\n event &&\n event.results &&\n event.results[0][0] &&\n event.results[0][0].transcript\n ) {\n this.addNewChatMessage(\n \n
\n {event.results[0][0].transcript}\n
\n \n )\n this.chatbotRequest(event.results[0][0].transcript)\n } else {\n this.addNewChatMessage(\n \n
\n Sorry, didn't quite catch that.\n
\n \n )\n }\n\n break\n case 'end':\n this.setState({\n isMic: true,\n isThinking: false\n })\n recognition.stop()\n break\n default:\n }\n }\n\n handleInitRecognition() {\n // recognition = new SpeechRecognition() || null\n recognition && recognition.start()\n }\n\n // componentDidUpdate(prevProps) {\n // // Typical usage (don't forget to compare props):\n // console.log(\n // this.props.info.Member.FirstName,\n // prevProps.info.Member.FirstName,\n // this.props.info.Member.FirstName !== prevProps.info.Member.FirstName\n // )\n // if (this.props.info.Member.FirstName !== prevProps.info.Member.FirstName) {\n // this.addNewChatMessage(\n //
\n //
{`Hi ${\n // this.props.info.Member.FirstName\n // } I'm a chatbot, how can i help?`}
\n //
\n // )\n // }\n // }\n /**\n * @name scrollToBottom\n * @desc scroll to bottom of chatwindow\n */\n scrollToBottom() {\n someElement.scrollTop = someElement.scrollHeight\n // someElement.scrollLeft = someElement.scrollWidth\n }\n\n /**\n * @name componentWillUnmount\n * @desc the function called before the component is unmounted.\n */\n componentWillUnmount() {\n if (observer) observer.disconnect()\n document.body.classList.remove('chatbot')\n }\n\n /**\n * @name clickHandler\n * @desc open/close the chatbot window\n */\n clickHandler() {\n //TODO: disable the observer when chat is minimized\n if (!this.state.isReady) {\n someElement = document.querySelector('.chat-container')\n observer = new MutationObserver(this.scrollToBottom)\n observer.observe(someElement, {childList: true})\n this.addNewChatMessage(\n \n
{`Hi ${this.props.info.Member\n ? this.props.info.Member.FirstName\n : ''\n }, I'm a chatbot, how can i help?`}
\n \n )\n }\n this.setState({\n expand: !this.state.expand,\n isReady: true\n })\n }\n\n /**\n * @name handleInputEnter\n * @desc handle input from a user\n * @param {Object} event - the text input\n */\n handleInputEnter(event) {\n const keyCode = event.keyCode || event.which\n if (keyCode === 13) {\n this.addNewChatMessage(\n \n
{event.target.value}
\n \n )\n this.chatbotRequest(event.target.value)\n this.textInput.current.value = ''\n this.textInput.current.focus()\n }\n }\n\n chatbotRequest(q) {\n const query = `${q}&sessionId=${this.state.SessionId}&accessToken=${this.state.AccessToken\n }&platform=MCB`\n this.setState({\n isThinking: true\n })\n ChatBot.getResponse(query).then(data => {\n if (data.Status === 'OK') {\n const response = data.Payload.DialogflowQueryResponse\n if (response.AccessToken && response.SessionId) {\n this.setState({\n AccessToken: response.AccessToken,\n SessionId: response.SessionId\n })\n }\n const chatResponse =\n this.htmlParse(response.QueryResult.FulfillmentText) || null\n if (\n this.state.isSpeak &&\n speechSynthUtterance &&\n chatResponse\n ) {\n speechSynthUtterance.lang = 'en-AU'\n speechSynthUtterance.name = 'Karen'\n speechSynthUtterance.text = chatResponse.text\n window.speechSynthesis.speak(speechSynthUtterance)\n }\n this.addNewChatMessage(\n \n
\n {response.QueryResult\n ? chatResponse.jsx\n : 'chat offline'}\n
\n \n )\n }\n this.setState({\n isThinking: false\n })\n })\n }\n\n /**\n * @name addNewChatMessage\n * @desc append chat window\n * @param {Element} message - the element to append to the chatwindow\n */\n addNewChatMessage(message) {\n const el = this.state.chatMsgs\n el.push(message)\n this.setState({\n chatMsgs: el\n })\n }\n\n /**\n * @name fetchWingman\n * @desc fetch json (node) from the wingman endppint\n * @param {String} node - the node element\n */\n\n extractContent(html) {\n return new DOMParser().parseFromString(html, 'text/html')\n .documentElement.textContent\n }\n\n fetchWingman(node) {\n // console.log(node)\n const res = WingmanApi.fetchHelpNode(node)\n res.then(response => {\n if (response.status === 200 && response.data.payload.content) {\n this.setState({\n wingmanResponse: response.data.payload.content\n })\n const decode = WingmanApi.decodeWingman(\n response.data.payload.content,\n this.handleNodeChange,\n node\n )\n // const el = this.state.chatMsgs\n // const conCats = el.concat(decode)\n this.setState(\n {\n chatMsgs: cloneDeep(this.state.chatMsgs).concat(decode),\n fatman: cloneDeep(decode)\n // testWing: [...this.state.testWing, decode]\n // testWing: decode\n },\n () => {\n //TODO: include the speech text in the json payload.. rather than trying to decode from the html\n const plainText = this.fatmanRef.current.querySelectorAll(\n '.txt'\n )\n const textArray = []\n plainText.forEach(el => {\n textArray.push(el.innerText)\n })\n // console.log(textArray)\n if (\n this.state.isSpeak &&\n speechSynthUtterance &&\n textArray\n ) {\n speechSynthUtterance.lang = 'en-AU'\n speechSynthUtterance.name = 'Karen'\n speechSynthUtterance.text = textArray.join('. ')\n window.speechSynthesis.speak(speechSynthUtterance)\n }\n }\n )\n }\n }).catch(error => {\n console.log(error)\n })\n }\n\n /**\n * @name handleNodeChange\n * @desc click handler when user clicks a wingman link/navigation\n * @desc also add same message (user input) to the RHS\n * @param {String} node - the node element\n * @param {text} text - the text of what they clicked on\n */\n handleNodeChange(node, text) {\n this.fetchWingman(node)\n this.addNewChatMessage(\n \n
{text}
\n \n )\n }\n\n /**\n * @name htmlParse\n * @desc safely handle the html/json from wingman\n * @param {String} html - the json response\n */\n htmlParse(html) {\n let elements = html\n try {\n elements = elements.replace(\n /__ACTMGR__/g,\n `
${this.props.info.AccountManager.FirstName} ${this.props.info.AccountManager.LastName\n }
e: ${this.props.info.AccountManager.Email\n }
p: ${this.props.info.AccountManager.Phone}
m: ${this.props.info.AccountManager.Mobile\n }`\n ) //who is my account manager\n elements = elements.replace(\n /__ACTNUM__/g,\n `${this.props.info.Number}`\n )\n elements = elements.replace(\n /__PAYNUM__/g,\n `${this.props.info.BPayReference}`\n )\n elements = elements.replace(\n /__PAYTERM__/g,\n `${this.props.info.PaymentTerms}`\n )\n } catch (error) {\n console.log(error)\n }\n\n if (elements.indexOf('__WINGMAN__') >= 0) {\n // elements = 'Lets see if we can work out the issue'\n // this.fetchWingman('iradvc')\n if (window.DEBUG) console.log('cbot: wingman', elements)\n const textResponse = elements.split('__')\n if (\n textResponse.length > 4 &&\n textResponse[3] &&\n textResponse[3].toLowerCase().indexOf('|') >= 0\n ) {\n elements = 'This is what i found out'\n this.fetchWingman(textResponse[3].toLowerCase())\n } else {\n elements = 'Lets see if we can work out the issue'\n this.fetchWingman('iradvc')\n }\n }\n return {jsx: parse(elements), text: elements}\n }\n\n handleQuickSelect(event) {\n this.addNewChatMessage(\n \n
{event.target.value}
\n \n )\n this.chatbotRequest(event.target.value)\n }\n\n handleSpeakClick(event) {\n if (\n this.state.isSpeak &&\n speechSynthUtterance &&\n window.speechSynthesis.speaking\n ) {\n window.speechSynthesis.cancel()\n }\n this.setState({\n isSpeak: !this.state.isSpeak\n })\n }\n\n _onBlur() {\n _timeoutID = setTimeout(() => {\n if (this.state.isManagingFocus) {\n this.setState({\n isManagingFocus: false,\n });\n this.clickHandler()\n }\n }, 0);\n }\n\n _onFocus() {\n clearTimeout(_timeoutID);\n if (!this.state.isManagingFocus) {\n this.setState({\n isManagingFocus: true,\n });\n }\n }\n\n // ---------------------------------------------\n // Render block\n // ---------------------------------------------\n /**\n * @name render\n * @desc the render function for the component.\n */\n render() {\n // const { info } = this.props\n return (\n (this.chatbotRef = div)}\n >\n
\n \n Chatbot\n \n
\n \n
\n\n
\n {this.state.chatMsgs}\n
\n
\n {this.state.fatman}\n
\n {this.state.expand && (\n
\n
\n
\n\n \n\n \n
\n \n
\n
\n\n )}\n\n\n
\n )\n }\n}\n\nconst mapStateToProps = (state, props) => {\n\n const member = state.canonhub?.memberInfo\n\n const info =\n state.canonhub.accountDetails?.data\n ? {\n BPayReference:\n state.canonhub.accountDetails?.data?.BPayReference,\n Id: state.canonhub.accountDetails.data.Id,\n Company: state.canonhub.accountDetails.data.Name,\n Number: state.canonhub.accountDetails.data.Number,\n PaymentTerms: state.canonhub.accountDetails.data.PaymentTerms,\n AccountManager:\n state.canonhub.accountDetails.data.AccountManager,\n Member: {\n FirstName: member?.data?.FirstName,\n LastName: member?.data?.LastName,\n Id: member?.data?.Id,\n Email: member?.data?.Email\n }\n }\n : ''\n return {\n info\n }\n}\n\nexport default connect(\n mapStateToProps,\n {}\n)(Chatbot)\n","import styled from 'styled-components'\n\n// export const Container = styled.div`\n// background: rgba(178, 178, 178, 0.7);\n// text-align: center;\n// font-weight: 500;\n// transition: all 0.2s ease-in-out;\n// padding: 1rem;\n// &:hover {\n// transform: scale(1.1);\n// }\n// .fal {\n// font-size: 1.1rem;\n// font-weight: 500;\n// }\n// `\n\nexport const BackToTopSection = styled.div`\n .ScrollUpButton__Toggled {\n opacity: 0.5;\n &:hover {\n opacity: 1;\n }\n }\n`\n","import React from 'react'\nimport TweenFunctions from 'tween-functions'\n//import PropTypes from 'prop-types'\nimport detectPassiveEvents from 'detect-passive-events'\nimport { BackToTopSection } from './styles'\nimport { callbackify } from 'util'\n\nconst defaultProps = {\n ContainerClassName: 'ScrollUpButton__Container',\n StopPosition: 0,\n ShowAtPostion: 150,\n EasingType: 'easeOutCubic',\n AnimationDuration: 500,\n TransitionClassName: 'ScrollUpButton__Toggled',\n style: {},\n ToggledStyle: {}\n}\n\nclass BackToTop extends React.Component {\n constructor(props) {\n super(props)\n this.state = { ToggleScrollUp: '' }\n this.Animation = {\n StartPosition: 0,\n CurrentAnimationTime: 0,\n StartTime: null,\n AnimationFrame: null\n }\n this.HandleScroll = this.HandleScroll.bind(this)\n this.StopScrollingFrame = this.StopScrollingFrame.bind(this)\n this.ScrollingFrame = this.ScrollingFrame.bind(this)\n this.HandleClick = this.HandleClick.bind(this)\n }\n\n HandleScroll() {\n //window.pageYOffset = current scroll position\n //ShowAtPostion = position at which we want the button to show.\n if (window.pageYOffset > this.props.ShowAtPostion) {\n //styles.Toggled = the class name we want applied to transition the button in.\n this.setState({ ToggleScrollUp: this.props.TransitionClassName })\n } else {\n //remove the class name\n this.setState({ ToggleScrollUp: '' })\n }\n }\n\n HandleClick() {\n this.StopScrollingFrame() //Stoping all AnimationFrames\n this.Animation.StartPosition = window.pageYOffset //current scroll position\n this.Animation.CurrentAnimationTime = 0\n this.Animation.StartTime = null\n //Start the scrolling animation.\n this.Animation.AnimationFrame = window.requestAnimationFrame(\n this.ScrollingFrame\n )\n }\n\n ScrollingFrame() {\n let timestamp = Math.floor(Date.now())\n //If StartTime has not been assigned a value, assign it the start timestamp.\n if (!this.Animation.StartTime) {\n this.Animation.StartTime = timestamp\n }\n\n //set CurrentAnimationTime every iteration of ScrollingFrame()\n this.Animation.CurrentAnimationTime =\n timestamp - this.Animation.StartTime\n //if we hit the StopPosition, StopScrollingFrame()\n if (window.pageYOffset <= this.props.StopPosition) {\n this.StopScrollingFrame()\n } else {\n //Otherwise continue ScrollingFrame to the StopPosition.\n //Does not support horizontal ScrollingFrame.\n //Let TweenFunctions handle the math to give us a new position based on AnimationDuration and EasingType type\n let YPos = TweenFunctions[this.props.EasingType](\n this.Animation.CurrentAnimationTime,\n this.Animation.StartPosition,\n this.props.StopPosition,\n this.props.AnimationDuration\n )\n window.scrollTo(0, YPos)\n //Request another frame to be painted\n this.Animation.AnimationFrame = window.requestAnimationFrame(\n this.ScrollingFrame\n )\n }\n }\n\n StopScrollingFrame() {\n //Stop the Animation Frames.\n window.cancelAnimationFrame(this.Animation.AnimationFrame)\n }\n componentDidMount() {\n this.HandleScroll() // run HandleScroll() at mount incase we are already scrolled down\n window.addEventListener('scroll', this.HandleScroll)\n window.addEventListener(\n 'wheel',\n this.StopScrollingFrame,\n detectPassiveEvents.hasSupport ? { passive: true } : false\n ) //Stop animation if user mouse wheels during animation.\n window.addEventListener(\n 'touchstart',\n this.StopScrollingFrame,\n detectPassiveEvents.hasSupport ? { passive: true } : false\n ) //Stop animation if user touches the screen during animation.\n }\n\n componentWillUnmount() {\n //Remove all events, since component is no longer mounted.\n window.removeEventListener('scroll', this.HandleScroll)\n window.removeEventListener('wheel', this.StopScrollingFrame, false)\n window.removeEventListener('touchstart', this.StopScrollingFrame, false)\n }\n render() {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgba(50, 50, 50, 0.5)',\n height: 50,\n position: 'fixed',\n bottom: 20,\n width: 50,\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -50,\n zIndex: 1000\n },\n SvgStyle: {\n display: 'inline-block',\n width: '100%',\n height: '100%',\n strokeWidth: 0,\n stroke: 'white',\n fill: 'white',\n paddingLeft: 9\n },\n ToggledStyle: {\n opacity: 0.8,\n right: 20\n }\n }\n if (this.props.children) {\n const childrenWithProps = React.Children.map(\n this.props.children,\n child =>\n React.cloneElement(child, {\n className: this.className\n })\n )\n return (\n \n {childrenWithProps}\n \n )\n } else {\n return (\n \n \n \n \n \n )\n }\n }\n}\nexport default BackToTop\n\n/*export const TinyButton = props => {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(87, 86, 86)',\n height: 30,\n position: 'fixed',\n bottom: 70,\n width: 30,\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -75,\n zIndex: 1000,\n fill: '#292929',\n paddingBottom: 1,\n paddingLeft: 1,\n paddingRight: 1,\n transition: 'fill 0.5s linear'\n },\n ToggledStyle: {\n opacity: 1,\n right: 30\n }\n }\n return (\n \n \n \n \n \n )\n}*/\n\nexport const CircleArrow = props => {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(255, 255, 255)',\n borderRadius: '50%',\n border: '3px solid black',\n height: 40,\n position: 'fixed',\n bottom: 60,\n width: 40,\n padding: '5px',\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n //opacity: 0,\n right: -75\n },\n ToggledStyle: {\n //opacity: 0.6,\n right: 20\n }\n }\n return (\n \n \n \n \n \n \n \n )\n}\n\n/*export const VerticleButton = props => {\n var styles = {\n MainStyle: {\n backgroundColor: 'rgb(58, 56, 56)',\n position: 'fixed',\n bottom: 60,\n padding: '5px 10px',\n WebkitTransition: 'all 0.5s ease-in-out',\n transition: 'all 0.5s ease-in-out',\n transitionProperty: 'opacity, right',\n cursor: 'pointer',\n opacity: 0,\n right: -75,\n transform: 'rotate(-90deg)'\n },\n ToggledStyle: {\n opacity: 0.5,\n right: 10\n }\n }\n return (\n \n UP →\n \n )\n}*/\n\n//BackToTop.\n// BackToTop.propTypes = {\n// StopPosition: PropTypes.number,\n// ShowAtPostion: PropTypes.number.isRequired, // show button under this position,\n// EasingType: PropTypes.oneOf([\n// 'linear',\n// 'easeInQuad',\n// 'easeOutQuad',\n// 'easeInOutQuad',\n// 'easeInCubic',\n// 'easeOutCubic',\n// 'easeInOutCubic',\n// 'easeInQuart',\n// 'easeOutQuart',\n// 'easeInOutQuart',\n// 'easeInQuint',\n// 'easeOutQuint',\n// 'easeInOutQuint',\n// 'easeInSine',\n// 'easeOutSine',\n// 'easeInOutSine',\n// 'easeInExpo',\n// 'easeOutExpo',\n// 'easeInOutExpo',\n// 'easeInCirc',\n// 'easeOutCirc',\n// 'easeInOutCirc',\n// 'easeInElastic',\n// 'easeOutElastic',\n// 'easeInOutElastic',\n// 'easeInBack',\n// 'easeOutBack',\n// 'easeInOutBack',\n// 'easeInBounce',\n// 'easeOutBounce',\n// 'easeInOutBounce'\n// ]),\n// AnimationDuration: PropTypes.number // seconds\n// }\n","import React, {Component} from 'react'\nimport './App.css'\nimport Header from 'components/common/header_v2/index.js'\nimport Footer from 'components/common/footer/index.js'\nimport createHistory from 'history/createBrowserHistory';\nimport Routes from 'routes'\nimport Chatbot from 'features/chatbot/index.js'\nimport {CircleArrow as ScrollUpButton} from 'components/back-to-top'\n\nconst history = createHistory();\n\nclass App extends Component {\n render() {\n return (\n
\n
\n \n \n \n
\n
\n )\n }\n}\n\nexport default App\n","import { Workbox } from 'workbox-window'\n// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n // window.location.hostname === 'localhost' ||\n // // [::1] is the IPv6 localhost address.\n // window.location.hostname === '[::1]' ||\n // // 127.0.0.1/8 is considered localhost for IPv4.\n // window.location.hostname.match(\n // /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n // )\n false\n)\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n const swUrl = `${process.env.PUBLIC_URL}/mcb-sw.js`\n\n const wb = new Workbox(swUrl)\n\n wb.addEventListener('installed', event => {\n if (event.isUpdate) {\n if (\n window.confirm(\n `New content is available!. Click OK to refresh`\n )\n ) {\n setTimeout(() => window.location.reload())\n }\n }\n })\n\n wb.register()\n }\n}\n\n// export default function register() {\n// \tif (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n// \t\t// The URL constructor is available in all browsers that support SW.\n// \t\tconst publicUrl = new URL(process.env.PUBLIC_URL, window.location)\n// \t\tif (publicUrl.origin !== window.location.origin) {\n// \t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n// \t\t\t// from what our page is served on. This might happen if a CDN is used to\n// \t\t\t// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n// \t\t\treturn\n// \t\t}\n\n// \t\twindow.addEventListener('load', () => {\n// \t\t\t//[sp] Change the Service worker to point to our Custom MCB service worker instead of CRA SW-preache SW\n// \t\t\t// const swUrl = `${\n// \t\t\t// process.env.PUBLIC_URL\n// \t\t\t// }/service-worker.js?${Math.random()}`\n\n// \t\t\tconst swUrl = `${process.env.PUBLIC_URL}/mcb-sw.js`\n\n// \t\t\tif (isLocalhost) {\n// \t\t\t\t// This is running on localhost. Lets check if a service worker still exists or not.\n// \t\t\t\tcheckValidServiceWorker(swUrl)\n\n// \t\t\t\t// Add some additional logging to localhost, pointing developers to the\n// \t\t\t\t// service worker/PWA documentation.\n// \t\t\t\tnavigator.serviceWorker.ready.then(() => {\n// \t\t\t\t\tconsole.log(\n// \t\t\t\t\t\t'This web app is being served cache-first by a service ' +\n// \t\t\t\t\t\t\t'worker. To learn more, visit https://goo.gl/SC7cgQ'\n// \t\t\t\t\t)\n// \t\t\t\t})\n// \t\t\t} else {\n// \t\t\t\t// Is not local host. Just register service worker\n// \t\t\t\tregisterValidSW(swUrl)\n// \t\t\t}\n// \t\t})\n// \t}\n// }\n\n// function registerValidSW(swUrl) {\n// \tnavigator.serviceWorker\n// \t\t.register(swUrl)\n// \t\t.then((registration) => {\n// \t\t\tregistration.onupdatefound = () => {\n// \t\t\t\tconst installingWorker = registration.installing\n// \t\t\t\tinstallingWorker.onstatechange = () => {\n// \t\t\t\t\tif (installingWorker.state === 'installed') {\n// \t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n// \t\t\t\t\t\t\t// At this point, the old content will have been purged and\n// \t\t\t\t\t\t\t// the fresh content will have been added to the cache.\n// \t\t\t\t\t\t\t// It's the perfect time to display a \"New content is\n// \t\t\t\t\t\t\t// available; please refresh.\" message in your web app.\n// \t\t\t\t\t\t\tconsole.log('New content is available; please refresh.')\n// \t\t\t\t\t\t\talert('My Canon Business has been updated. Please refresh your browser')\n// \t\t\t\t\t\t} else {\n// \t\t\t\t\t\t\t// At this point, everything has been precached.\n// \t\t\t\t\t\t\t// It's the perfect time to display a\n// \t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n// \t\t\t\t\t\t\tconsole.log('Content is cached for offline use.')\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}\n// \t\t\t}\n// \t\t})\n// \t\t.catch((error) => {\n// \t\t\tconsole.error('Error during service worker registration:', error)\n// \t\t})\n// }\n\n// function checkValidServiceWorker(swUrl) {\n// \t// Check if the service worker can be found. If it can't reload the page.\n// \tfetch(swUrl)\n// \t\t.then((response) => {\n// \t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n// \t\t\tif (response.status === 404 || response.headers.get('content-type').indexOf('javascript') === -1) {\n// \t\t\t\t// No service worker found. Probably a different app. Reload the page.\n// \t\t\t\tnavigator.serviceWorker.ready.then((registration) => {\n// \t\t\t\t\tregistration.unregister().then(() => {\n// \t\t\t\t\t\twindow.location.reload()\n// \t\t\t\t\t})\n// \t\t\t\t})\n// \t\t\t} else {\n// \t\t\t\t// Service worker found. Proceed as normal.\n// \t\t\t\tregisterValidSW(swUrl)\n// \t\t\t}\n// \t\t})\n// \t\t.catch(() => {\n// \t\t\tconsole.log('No internet connection found. App is running in offline mode.')\n// \t\t})\n// }\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister()\n })\n navigator.serviceWorker\n .getRegistrations()\n .then(function(registrations) {\n for (let registration of registrations) {\n registration.unregister()\n }\n })\n }\n}\n","import axios from 'axios'\nimport history from 'history/history.js'\nimport {metadata} from 'app-config'\n\nconst forbiddenStatusCodes = [401, 403, 405, 406]\nconst exemptUrls = '/invoices'\n\nexport const configureInterceptors = () => {\n /**\n * @name constructor\n * @desc intercept the outgoing http request and append the token (for Canon STS)\n * @desc calling them injectors cause i keep forgetting there interceptors\n * @param {Object} request - the request properties\n */\n axios.interceptors.request.use(\n (request) => {\n let token = localStorage.getItem('access_token')\n if (window.location.hostname === 'localhost' || window.location.hostname === 'devbusiness.canon.com.au') {\n // add new environment\n //if (!window.isDEMO) request.url = request.url.replace('hub/', 'devhub/')\n }\n if (window.isPROD) request.url = request.url.replace('uat', '')\n\n //[SP] Wrong place; this is the interceptor for the normal requests. Need to put this logic in the MockService for intercepting the mock urls\n // if (window.isDEMO) {\n // request.url = window.isPROD\n // ? request.url.replace('env', 'prod')\n // : request.url.replace('env', 'uat')\n // }\n if (\n window.location.pathname.indexOf('service/techconnect') >= 0 &&\n request.url.indexOf('/serviceOrders/') >= 0 &&\n request.url.indexOf('?key=') > 0\n ) {\n // remove then bearer token on the salted service order request\n if (window.DEBUG) console.log('intc: Salted url - removing token')\n //console.log('cleared token tech connect')\n token = null\n }\n //forms access\n if (\n window.location.pathname.indexOf('service/tech/') >= 0\n // &&\n // request.url.indexOf('/accounts/') >= 0 &&\n // request.url.indexOf('/forms/') > 0 &&\n // request.url.indexOf('technician?url=') > 0 &&\n // request.url.indexOf('key=') > 0\n ) {\n // remove then bearer token on the salted forms access URL\n if (window.DEBUG) console.log('intc: Salted url - removing token')\n //console.log('cleared token service tech')\n // console.log(window.location.pathname)\n token = null\n }\n // console.log(request.headers)\n if (request?.url?.indexOf('canon.com.au') > 0) {\n //console.log('token',token)\n request.headers = {\n Accept: 'application/json',\n ...request.headers,\n\n Authorization: `Bearer ${token}`,\n Source: 'development',\n ...request.heads // overrides any params\n }\n }\n return request\n },\n (error) => {\n console.error(error)\n return Promise.reject(error)\n }\n )\n // ---------------------------------------------\n // HTTP INTERCEPTOR FOR AXIOS - RESPONSE\n // ---------------------------------------------\n axios.interceptors.response.use(\n (response) => {\n return response\n },\n (error) => {\n if (error.response && forbiddenStatusCodes.includes(error.response.status))\n history.push(metadata.accesserror.route)\n // else return Promise.reject(error)\n else return history.push(metadata.accesserror.route)\n }\n )\n}\n","/**\nMost of the time all you need is to “scroll to the top” because you have a long content page, \nthat when navigated to, stays scrolled down. \nThis is straightforward to handle with a component that will scroll the window up on every navigation, \nmake sure to wrap it in withRouter to give it access to the router’s props: */\nimport React, { Component } from 'react'\nimport { withRouter } from 'react-router-dom'\nclass ScrollToTop extends Component {\n componentDidUpdate(prevProps) {\n if (this.props.location !== prevProps.location) {\n window.scrollTo(0, 0)\n }\n }\n\n render() {\n return this.props.children\n }\n}\n\nexport default withRouter(ScrollToTop)\n","/**\n * Canon\n *\n * @package mcb-front-end\n * @project Ignite\n * @link https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app\n *\n */\n\n// -------------------------------------\n// Dependencies: Core\n// -------------------------------------\n//Babel polyfill for IE11 - need to move to webpack config if eject is done to CRA\nimport 'babel-polyfill'\n\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Provider } from 'react-redux'\nimport { Router } from 'react-router-dom'\nimport App from './App'\nimport './index.css'\nimport registerServiceWorker from './registerServiceWorker'\n// import { unregister } from './registerServiceWorker'\nimport { store, persistor } from './redux/store.js'\nimport history from './history/history.js'\nimport packageJSON from '../package.json'\n\nimport { ThemeProvider } from 'styled-components'\nimport theme from './styles/styled-components/theme'\n// eslint-disable-next-line\nimport { PersistGate } from 'redux-persist/integration/react'\nimport { configureInterceptors } from 'interceptors'\nimport HelpTooltipApi from 'components/common/help/help-tooltip.js'\nimport ScrollToTop from 'components/common/scroll-to-top'\nimport { ToastProvider } from 'react-toast-notifications'\n\n// ---------------------------------------------\n// HTTP INTERCEPTOR FOR AXIOS - REQUEST\n// ---------------------------------------------\nconfigureInterceptors()\n\n// ---------------------------------------------\n// APP CONSTRUCT\n// ---------------------------------------------\nconst app = (\n \n \n \n \n \n \n \n \n \n \n \n \n \n)\n// console.log(`mcb : ${packageJSON.ver}`)\n// console.log('envn:', window.isPROD ? 'prod' : 'uat')\n// console.log(`last: ${packageJSON.last}`)\nReactDOM.render(app, document.getElementById('root'))\nregisterServiceWorker()\n//unregister()\n// hello world\nHelpTooltipApi.getMCBHelpData()\n .then(helpContent => {\n localStorage.setItem('help', JSON.stringify(helpContent))\n })\n .catch(error => {\n console.error(error)\n })\n//unregister()\n\n// if (request.url.indexOf('api.ai') > 0) {\n// chatbot api\n// request.headers = {\n// ...request.headers,\n// Accept: 'application/json',\n// Authorization: `Bearer ${token}`,\n// Source: 'development'\n// }\n// }\n\n// if (window.location.hostname.indexOf('mybusiness') >= 0) {\n// request.url = request.url.replace('uat', '')\n// }\n","export default {\n color: {\n white: '#fff',\n black: '#0d1a27',\n base1: '#202020',\n base2: '#4b4b4b',\n base3: '#8a8a8a',\n grey1: '#f6f6f6',\n grey2: '#e0e0e0',\n grey3: '#bababa',\n grey4: '#656a6e',\n success: '#28c93f',\n warning: '#f7c14c',\n error: '#d33e31',\n disabled: '#f0f0f0',\n blue: '#e8f2fa',\n navy: '#24354f',\n shadow: 'rgba(0, 0, 0, 0.15)',\n 'shadow-dark': 'rgba(0, 0, 0, 0.35)',\n primary: '#cc0000',\n secondary: '#0f6599',\n focus: '#b1b1b1'\n },\n drawer: {\n zIndex: 100,\n backdropColor: 'rgba(30, 39, 48, .55)'\n },\n column: {\n spacing: '10px'\n },\n forms: {\n backgroundColor: 'white',\n borderColor: 'grey2',\n borderColorFocus: 'focus',\n borderRadius: '3px',\n borderTopWidth: '1px',\n borderRightWidth: '1px',\n borderBottomWidth: '1px',\n borderLeftWidth: '1px',\n color: 'currentColor',\n errorFontSize: '0.8rem',\n errorFontWeight: '500',\n fontSize: '0.8rem',\n height: '40px',\n labelFontSize: '0.9rem',\n labelFontWeight: 'normal',\n lineHeight: 'normal',\n paddingHorizontal: '.5rem',\n paddingVertical: '0.25rem',\n placeholderColor: 'base2',\n placeholderOpacity: 0.7\n },\n modal: {\n zIndex: 100,\n backdropColor: 'rgba(30, 39, 48, .55)'\n },\n button: {\n borderRadius: '3px',\n fontSize: '.8rem',\n fontSizeLg: '1rem',\n fontSizeSm: '.7rem',\n fontWeight: '500',\n letterSpacing: 'normal',\n lineHeight: 'normal',\n paddingHorizontal: '1.25rem',\n paddingHorizontalLg: '4rem',\n paddingHorizontalSm: '0.5rem',\n paddingVertical: '0.5rem',\n paddingVerticalLg: '1rem',\n paddingVerticalSm: '0.2rem',\n textTransform: 'none'\n },\n heading: {\n h1: '2rem',\n h2: '1.8rem',\n h3: '1.6rem',\n h4: '1.4rem',\n h5: '1.2rem',\n h6: '1rem',\n fontWeight: 400\n },\n browserCompatibility: {\n zIndex: 1000\n },\n easing: {\n cubic: 'cubic-bezier(.9, .12, .3, .98)',\n 'cubic-out': 'cubic-bezier(.1, .12, .13, .98)',\n 'cubic-in': 'cubic-bezier(.98, .1, .12, .69)',\n 'ease-out': 'cubic-bezier(.45, .45, 0, .99)',\n 'ease-in': 'cubic-bezier(.99, 0, .45, .45)'\n },\n boxShadow: {\n '1': '0px 6px 10px 0px rgba(0, 0, 0, 0.15)',\n '2': '0 -3px 5px -1px rgba(0, 0, 0, .2)',\n '3': '0 3px 5px -1px rgba(0, 0, 0, .15)',\n filter: '0px 3px 8px -1px rgba(0, 0, 0, 0.2)'\n }\n}\n","export const ID_TOKEN_KEY = 'id_token'\nexport const ACCESS_TOKEN_KEY = 'access_token'\nexport const ISDEMO = 'isDemo'\nexport const CALLBACK = 'callback'\nexport const MEMBER_ID = 'member_id'\nexport const SUBJECT = 'sub'\nexport const EXPIRES_AT = 'expires_at'\nexport const PERMISSONS = 'permissions'\nexport const MEMBER_INFO = 'loggedInMemberDetails'\nexport const ACCOUNT_INFO = 'memberAccountDetails'\nexport const SELECTED_ACCOUNT = 'selectedAccount'\nexport const ACCOUNT_FAVS = 'accountFavs'\nexport const RELOGIN_FLAG = 'reLoginFlag'\nexport const STORED_ACCOUNT = 'storedAccount'\nexport const OPENID_CONNECT_MULTIVALUES_RESPONSE_TYPE = 'token id_token'\nexport const ISPROD = window.isPROD || window.location.host.indexOf('mybusiness') >= 0\n ? true\n : false\nexport const ISNZ = window.isNZ || window.location.host.indexOf('co.nz') >= 0\n ? true\n : false\nexport const CLIENT_ID = ISPROD\n ? 'canon.mycanonbusiness.prod'\n : 'canon.mycanonbusiness.uat'\nexport const CLIENT_DOMAIN = ISPROD\n ? 'secure.canon.com.au/core/connect'\n : 'uatsecure.canon.com.au/core/connect'\n\nexport const AUTOSIGN_COOKIE = ISPROD\n ? 'autosignin.canon.com.au'\n : 'uat.autosignin.canon.com.au'\n\nexport const REDIRECT = window.location.origin + '/callback'\nexport const SCOPE =\n 'openid profile email phone member roles business webapi access'\n\nexport const ACR_SFDC = 'idp:SFDC'\nexport const SFDC = 'SFDC' // idsrv\nexport const ACR_STS = 'idp:STS'\n\n//CANT USE WINDOW.LOCATION PROTOCOL SINCE IN UAT WE ARE STAGING ON NON SECURE\nexport const CORE_URL = ISPROD\n ? 'https://secure.canon.com.au/core'\n : 'https://uatsecure.canon.com.au/core'\n","var toString = Object.prototype.toString\n\nfunction attribute(o, attr, type, text) {\n type = type === 'array' ? 'object' : type\n if (o && typeof o[attr] !== type) {\n throw new Error(text)\n }\n}\n\nfunction variable(o, type, text) {\n if (typeof o !== type) {\n throw new Error(text)\n }\n}\n\nfunction value(o, values, text) {\n if (values.indexOf(o) === -1) {\n throw new Error(text)\n }\n}\n\nfunction check(o, config, attributes) {\n if (!config.optional || o) {\n variable(o, config.type, config.message)\n }\n if (config.type === 'object' && attributes) {\n var keys = Object.keys(attributes)\n\n for (var index = 0; index < keys.length; index++) {\n var a = keys[index]\n if (!attributes[a].optional || o[a]) {\n if (!attributes[a].condition || attributes[a].condition(o)) {\n attribute(o, a, attributes[a].type, attributes[a].message)\n if (attributes[a].values) {\n value(\n o[a],\n attributes[a].values,\n attributes[a].value_message\n )\n }\n }\n }\n }\n }\n}\n\n/**\n * Wrap `Array.isArray` Polyfill for IE9\n * source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\n *\n * @param {Array} array\n * @private\n */\nfunction isArray(array) {\n if (this.supportsIsArray()) {\n return Array.isArray(array)\n }\n\n return toString.call(array) === '[object Array]'\n}\n\nfunction supportsIsArray() {\n return Array.isArray != null\n}\n\nmodule.exports = {\n check: check,\n attribute: attribute,\n variable: variable,\n value: value,\n isArray: isArray,\n supportsIsArray: supportsIsArray\n}\n","var error = require('./error')\nvar objectHelper = require('./object')\n\nfunction wrapCallback(cb, options) {\n options = options || {}\n options.ignoreCasing = options.ignoreCasing ? options.ignoreCasing : false\n\n return function(err, data) {\n var errObj\n\n if (!err && !data) {\n return cb(\n error.buildResponse('generic_error', 'Something went wrong')\n )\n }\n\n if (!err && data.err) {\n err = data.err\n data = null\n }\n\n if (!err && data.error) {\n err = data\n data = null\n }\n\n if (err) {\n errObj = {\n original: err\n }\n\n if (err.response && err.response.statusCode) {\n errObj.statusCode = err.response.statusCode\n }\n\n if (err.response && err.response.statusText) {\n errObj.statusText = err.response.statusText\n }\n\n if (err.response && err.response.body) {\n err = err.response.body\n }\n\n if (err.err) {\n err = err.err\n }\n errObj.code =\n err.error || err.code || err.error_code || err.status || null\n errObj.description =\n err.errorDescription ||\n err.error_description ||\n err.description ||\n err.error ||\n err.details ||\n err.err ||\n null\n if (options.forceLegacyError) {\n errObj.error = errObj.code\n errObj.error_description = errObj.description\n }\n\n if (err.name) {\n errObj.name = err.name\n }\n\n if (err.policy) {\n errObj.policy = err.policy\n }\n\n return cb(errObj)\n }\n\n if (\n data.type &&\n (data.type === 'text/html' || data.type === 'text/plain')\n ) {\n return cb(null, data.text)\n }\n\n if (options.ignoreCasing) {\n return cb(null, data.body || data)\n }\n\n return cb(null, objectHelper.toCamelCase(data.body || data))\n }\n}\n\nmodule.exports = wrapCallback\n","export const RRP_ADD_PERMISSION = 'RRP_ADD_PERMISSION'\nexport const RRP_REMOVE_PERMISSION = 'RRP_REMOVE_PERMISSION'\nexport const RRP_CLEAR = 'RRP_CLEAR'\n"],"sourceRoot":""}