{"version":3,"mappings":";u2BA0DMA,EAAc,IAAO,GAAK,4CA1BhC,MAAMC,EAAiCC,EAAqB,IAAMC,EAAA,WAAO,8CAAmE,4FAAC,EACvIC,EAAsBF,EAAqB,IAAMC,EAAA,WAAO,mCAAwD,6FAAC,EACjHE,EAAaH,EAAqB,IAAMC,EAAA,WAAO,0BAAuC,6FAAC,EAEvFG,EAAQC,EAAS,EACjB,CAAC,aAAAC,CAAY,EAAIC,EAAQ,EACzB,CAAC,iBAAAC,CAAgB,EAAIC,EAAe,EAGpCC,EAAUC,EAAkB,IAAMP,EAAM,MAAM,IAAI,OAAO,EACzDQ,EAAmBD,EAAkB,IAAMP,EAAM,MAAM,IAAI,YAAY,EACvES,EAAkBF,EAAS,KAAO,CACtC,QAAWD,EAAQ,MACnB,oBAAqBE,EAAiB,OACtC,EAEF,QAAQ,IAAI,mCAAmC,EAG3C,UAAU,QACZE,IACG,KAAK,IAAM,QAAQ,IAAI,wCAAwC,CAAC,EAChE,MAAM,IAAM,QAAQ,KAAK,oCAAoC,CAAC,EAG7D,MAAAC,EAAeC,EAAmB,IAAI,EAEtCC,EAAYD,EAAI,CAAC,EAEjBE,EAAe,IAAM,CACzB,QAAQ,IAAI,qBAAqB,EACpBH,EAAA,MAAQ,OAAO,YAAY,IAAM,CAClCE,EAAA,QACV,QAAQ,IAAI,kBAAkBA,EAAU,KAAK,GAAG,EAC/BT,EAAA,GAChBV,CAAW,CAChB,EAGA,OAAAqB,EAAY,IAAM,CACZJ,EAAa,QACf,cAAcA,EAAa,KAAK,EAChC,QAAQ,IAAI,qBAAqB,EACnC,CACD,EAGDK,EAAc,IAAM,CACLd,EAAA,EACAY,EAAA,EACd,EAEDG,EAAY,IAAM,CAChB,QAAQ,IAAI,sBAAsBX,EAAQ,KAAK,EAAE,EAClD","names":["pollTimeout","AccountMarkedForDeletionDialog","defineAsyncComponent","__vitePreload","TrialHasEndedDialog","AppBanners","store","useStore","fetchSession","useAuth","fetchBuildNumber","useAppSettings","booting","computed","rightSidebarOpen","mainClassObject","bootstrap","pollInterval","ref","pollCount","startPolling","onUnmounted","onBeforeMount","watchEffect"],"ignoreList":[],"sources":["../../../resources/js/layouts/TheDashboardLayout.vue"],"sourcesContent":["<template>\n  <div>\n    <v-layout>\n      <v-main :class=\"mainClassObject\">\n        <AppBanners/>\n\n        <!-- Dialogs -->\n        <AccountMarkedForDeletionDialog/>\n        <TrialHasEndedDialog/>\n\n        <!-- Loader -->\n        <div id=\"app-loader\">\n          <div class=\"app-logo\">\n            <img :src=\"fleetwireLogo\" alt=\"Fleetwire Logo\">\n          </div>\n          <span>Loading application...</span>\n        </div>\n\n        <slot></slot>\n      </v-main>\n    </v-layout>\n  </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {computed, defineAsyncComponent, onBeforeMount, onUnmounted, ref, watchEffect} from 'vue'\nimport {useStore} from 'vuex';\nimport fleetwireLogo from '@/../images/fleetwire-logo-new.png';\nimport {bootstrap} from 'vue-gtag'\nimport {useAuth} from '@/composables/useAuth';\nimport {useAppSettings} from '@/composables/useAppSettings';\n\nconst AccountMarkedForDeletionDialog = defineAsyncComponent(() => import('@/components/dashboard/dialogs/AccountMarkedForDeletionDialog.vue'));\nconst TrialHasEndedDialog = defineAsyncComponent(() => import('@/components/dashboard/dialogs/TrialHasEndedDialog.vue'));\nconst AppBanners = defineAsyncComponent(() => import('@/components/dashboard/AppBanners.vue'));\n\nconst store = useStore();\nconst {fetchSession} = useAuth();\nconst {fetchBuildNumber} = useAppSettings();\n\n/** Reactive state for booting */\nconst booting = computed<boolean>(() => store.state.app.booting);\nconst rightSidebarOpen = computed<boolean>(() => store.state.app.rightSidebar);\nconst mainClassObject = computed(() => ({\n  'booting': booting.value,\n  'right-bar-enabled': rightSidebarOpen.value\n}));\n\nconsole.log('🚀 TheDashboardLayout Initialized');\n\n/** Initialize Google Analytics (gtag) */\nif (navigator.onLine) {\n  bootstrap()\n    .then(() => console.log('✅ Google Analytics (gtag) Bootstrapped'))\n    .catch(() => console.warn('⚠️ Google Analytics failed to load'));\n}\n\nconst pollInterval = ref<number | null>(null);\nconst pollTimeout = 1000 * 60 * 5; // 5 minutes\nconst pollCount = ref(0);\n\nconst startPolling = () => {\n  console.dir('⏱️ Starting Polling');\n  pollInterval.value = window.setInterval(() => {\n    pollCount.value++;\n    console.dir(`⏱️ Polling... (${pollCount.value})`);\n    fetchBuildNumber();\n  }, pollTimeout);\n};\n\n// ✅ Cleanup on unmount\nonUnmounted(() => {\n  if (pollInterval.value) {\n    clearInterval(pollInterval.value);\n    console.log('🛑 Polling Stopped!');\n  }\n});\n\n/** Fetch session on mount */\nonBeforeMount(() => {\n  fetchSession();\n  startPolling();\n});\n/** Watch for booting changes */\nwatchEffect(() => {\n  console.log(`🕒 Booting Status: ${booting.value}`);\n});\n</script>\n\n<style scoped>\n\n.v-main.booting #app-loader {\n  display: block;\n}\n\n#app-loader {\n  display: none;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: #fff;\n  z-index: 9999;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n}\n\n#app-loader .app-logo {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  text-align: center;\n  width: 100px;\n  height: 140px;\n  margin-left: -52px;\n  margin-top: -70px;\n}\n\n#app-loader .app-logo img {\n  width: 100px;\n}\n\n#app-loader > span {\n  color: #181818;\n  font-size: 20px;\n  text-align: center;\n  display: block;\n  width: 200px;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-left: -100px;\n  margin-top: 75px;\n}\n\n</style>"],"file":"assets/TheDashboardLayout-3Xs7pMWy.js"}