1System.register(['vue', '@Obsidian/Utility/rockDateTime'], (function (exports) { 2 'use strict'; 3 var reactive, shallowReadonly, RockDateTime; 4 return { 5 setters: [function (module) { 6 reactive = module.reactive; 7 shallowReadonly = module.shallowReadonly; 8 }, function (module) { 9 RockDateTime = module.RockDateTime; 10 }], 11 execute: (function () { 12 13 exports('useStore', useStore); 14 15 const state = reactive({ 16 currentPerson: null, 17 isAnonymousVisitor: false, 18 pageParameters: {}, 19 contextEntities: {}, 20 pageId: 0, 21 pageGuid: "", 22 sessionGuid: "", 23 interactionGuid: "", 24 executionStartTime: RockDateTime.now().toMilliseconds(), 25 debugTimings: [], 26 loginUrlWithReturnUrl: "", 27 trailblazerMode: false 28 }); 29 class Store { 30 constructor() { 31 this.state = shallowReadonly(state); 32 } 33 setAreSecondaryBlocksShown(areSecondaryBlocksShown) {} 34 initialize(pageConfig) { 35 state.currentPerson = pageConfig.currentPerson || null; 36 state.isAnonymousVisitor = pageConfig.isAnonymousVisitor; 37 state.pageParameters = pageConfig.pageParameters || {}; 38 state.pageId = pageConfig.pageId; 39 state.pageGuid = pageConfig.pageGuid; 40 state.sessionGuid = pageConfig.sessionGuid; 41 state.interactionGuid = pageConfig.interactionGuid; 42 state.executionStartTime = pageConfig.executionStartTime; 43 state.loginUrlWithReturnUrl = pageConfig.loginUrlWithReturnUrl; 44 state.trailblazerMode = pageConfig.trailblazerMode; 45 } 46 addPageDebugTiming(timing) { 47 const pageStartTime = state.executionStartTime; 48 const timestampMs = timing.startTimeMs - pageStartTime; 49 const durationMs = timing.finishTimeMs - timing.startTimeMs; 50 state.debugTimings.push({ 51 timestampMs: timestampMs, 52 durationMs: durationMs, 53 indentLevel: 1, 54 isTitleBold: false, 55 subTitle: timing.subtitle, 56 title: timing.title 57 }); 58 } 59 redirectToLogin() { 60 if (state.loginUrlWithReturnUrl) { 61 window.location.href = state.loginUrlWithReturnUrl; 62 } 63 } 64 get isAuthenticated() { 65 return !!state.currentPerson; 66 } 67 getPageParameter(key) { 68 return state.pageParameters[key]; 69 } 70 setTrailblazerMode(isTrailblazer) { 71 state.trailblazerMode = isTrailblazer; 72 } 73 } exports('Store', Store); 74 const store = new Store(); 75 function useStore() { 76 return store; 77 } 78 79 }) 80 }; 81})); 82//# sourceMappingURL=PageState.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.