|
|
|
'use strict';
|
|
|
|
const MANIFEST = 'flutter-app-manifest';
|
|
|
|
const TEMP = 'flutter-temp-cache';
|
|
|
|
const CACHE_NAME = 'flutter-app-cache';
|
|
|
|
|
|
|
|
const RESOURCES = {"splash/style.css": "52986a9e1d69ad779d02334a06b33a81",
|
|
|
|
"splash/img/light-1x.png": "db5b72b7f4b38640c974f20d9c90f464",
|
|
|
|
"splash/img/light-2x.png": "9371a9e18df59f2bbe9b32e04c3fc5d4",
|
|
|
|
"splash/img/dark-3x.png": "da261be18bbda768fa1462fd8a8cef46",
|
|
|
|
"splash/img/light-3x.png": "da261be18bbda768fa1462fd8a8cef46",
|
|
|
|
"splash/img/dark-1x.png": "db5b72b7f4b38640c974f20d9c90f464",
|
|
|
|
"splash/img/dark-2x.png": "9371a9e18df59f2bbe9b32e04c3fc5d4",
|
|
|
|
"splash/img/dark-4x.png": "e0346148103c17a87682a35525499afe",
|
|
|
|
"splash/img/light-4x.png": "e0346148103c17a87682a35525499afe",
|
|
|
|
"auth.html": "88530dca48290678d3ce28a34fc66cbd",
|
|
|
|
"icons/Icon-192.png": "839e87c4f6800df757bb28180f8e2949",
|
|
|
|
"icons/Icon-512.png": "f57dad4f6efa0339b50d5c65f36dc03c",
|
|
|
|
"assets/FontManifest.json": "6a590c591cb18c7ac3b63b1fcaa45b57",
|
|
|
|
"assets/AssetManifest.bin.json": "a8792774193369bbf0b5aa65f4219cb7",
|
|
|
|
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
|
|
|
|
"assets/assets/info-logo.png": "9d1d72596564e6639fd984fea2dfd048",
|
|
|
|
"assets/assets/banner.png": "4a005db27a8787aea061537223dabb7d",
|
|
|
|
"assets/assets/sas-emoji.json": "b9d99fc6dda6a3250af57af969b4a02d",
|
|
|
|
"assets/assets/logo.svg": "d042b70cf11a41f2764028e85b07a00a",
|
|
|
|
"assets/assets/favicon.png": "3ea6cdc2aeab08defd0659bad734a69b",
|
|
|
|
"assets/assets/login_wallpaper.png": "05f9f8c2f3a51c757f0a7914096b3bdb",
|
|
|
|
"assets/assets/js/package/olm_legacy.js": "89449cce143a94c311e5d2a8717012fc",
|
|
|
|
"assets/assets/js/package/olm.js": "1c13112cb119a2592b9444be60fdad1f",
|
|
|
|
"assets/assets/js/package/olm.wasm": "1bee19214b0a80e2f498922ec044f470",
|
|
|
|
"assets/assets/sounds/call.ogg": "7e8c646f83fba83bfb9084dc1bfec31e",
|
|
|
|
"assets/assets/sounds/notification.ogg": "d928d619828e6dbccf6e9e40f1c99d83",
|
|
|
|
"assets/assets/sounds/phone.ogg": "5c8fb947eb92ca55229cb6bbf533c40f",
|
|
|
|
"assets/assets/banner_transparent.png": "364e2030f739bf0c7ed1c061c4cb5901",
|
|
|
|
"assets/assets/logo.png": "d329be9cd7af685717f68e03561f96c0",
|
|
|
|
"assets/fonts/Roboto/Roboto-Italic.ttf": "cebd892d1acfcc455f5e52d4104f2719",
|
|
|
|
"assets/fonts/Roboto/Roboto-Bold.ttf": "b8e42971dec8d49207a8c8e2b919a6ac",
|
|
|
|
"assets/fonts/Roboto/Roboto-Regular.ttf": "8a36205bd9b83e03af0591a004bc97f4",
|
|
|
|
"assets/fonts/Roboto/RobotoMono-Regular.ttf": "7e173cf37bb8221ac504ceab2acfb195",
|
|
|
|
"assets/fonts/MaterialIcons-Regular.otf": "77233484cc03566366523d51f62d6236",
|
|
|
|
"assets/AssetManifest.bin": "efd851891d4d19487fc051fe7f3bfd78",
|
|
|
|
"assets/packages/record_web/assets/js/record.worklet.js": "356bcfeddb8a625e3e2ba43ddf1cc13e",
|
|
|
|
"assets/packages/handy_window/assets/handy-window.css": "0434ee701235cf1c72458fd4ce022a64",
|
|
|
|
"assets/packages/handy_window/assets/handy-window-dark.css": "45fb3160206a5f74c0a9f1763c00c372",
|
|
|
|
"assets/packages/flutter_map/lib/assets/flutter_map_logo.png": "208d63cc917af9713fc9572bd5c09362",
|
|
|
|
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "bf619178a1771fb6a056dd98bc108d5d",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Script-Regular.ttf": "55d2dcd4778875a53ff09320a85a5296",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Size4-Regular.ttf": "85554307b465da7eb785fd3ce52ad282",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-Bold.ttf": "9eef86c1f9efa78ab93d41a0551948f7",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Size2-Regular.ttf": "959972785387fe35f7d47dbfb0385bc4",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Caligraphic-Regular.ttf": "7ec92adfa4fe03eb8e9bfb60813df1fa",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_AMS-Regular.ttf": "657a5353a553777e270827bd1630e467",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Fraktur-Regular.ttf": "dede6f2c7dad4402fa205644391b3a94",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_SansSerif-Italic.ttf": "d89b80e7bdd57d238eeaa80ed9a1013a",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-Regular.ttf": "5a5766c715ee765aa1398997643f1589",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Size3-Regular.ttf": "e87212c26bb86c21eb028aba2ac53ec3",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-BoldItalic.ttf": "e3c361ea8d1c215805439ce0941a1c8d",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Math-Italic.ttf": "a7732ecb5840a15be39e1eda377bc21d",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Typewriter-Regular.ttf": "87f56927f1ba726ce0591955c8b3b42d",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Fraktur-Bold.ttf": "46b41c4de7a936d099575185a94855c4",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_SansSerif-Regular.ttf": "b5f967ed9e4933f1c3165a12fe3436df",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_SansSerif-Bold.ttf": "ad0a28f28f736cf4c121bcb0e719b88a",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Math-BoldItalic.ttf": "946a26954ab7fbd7ea78df07795a6cbc",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Caligraphic-Bold.ttf": "a9c8e437146ef63fcd6fae7cf65ca859",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-Italic.ttf": "ac3b1882325add4f148f05db8cafd401",
|
|
|
|
"assets/packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Size1-Regular.ttf": "1e6a3368d660edc3a2fbbe72edfeaa85",
|
|
|
|
"assets/packages/wakelock_plus/assets/no_sleep.js": "7748a45cd593f33280669b29c2c8919a",
|
|
|
|
"assets/AssetManifest.json": "cb240191779e36deab4b8c8c677311ec",
|
|
|
|
"assets/NOTICES": "6da95b8fa19646e7244ae7ba268dbea8",
|
|
|
|
"index.html": "14693c238ff9856e7c94674e748ec891",
|
|
|
|
"/": "14693c238ff9856e7c94674e748ec891",
|
|
|
|
"main.dart.js": "a28760b66c3d7a5a70d8d478b65ce241",
|
|
|
|
"favicon.png": "a409751f0ecf6dee76fb350d7402f9be",
|
|
|
|
"version.json": "8de5909270a83075fc8cc02271e7a17f",
|
|
|
|
"flutter_bootstrap.js": "259193cc70245947b46109bbcd978c87",
|
|
|
|
"canvaskit/skwasm.js.symbols": "c3c05bd50bdf59da8626bbe446ce65a3",
|
|
|
|
"canvaskit/skwasm.wasm": "4051bfc27ba29bf420d17aa0c3a98bce",
|
|
|
|
"canvaskit/chromium/canvaskit.wasm": "399e2344480862e2dfa26f12fa5891d7",
|
|
|
|
"canvaskit/chromium/canvaskit.js.symbols": "ee7e331f7f5bbf5ec937737542112372",
|
|
|
|
"canvaskit/chromium/canvaskit.js": "901bb9e28fac643b7da75ecfd3339f3f",
|
|
|
|
"canvaskit/canvaskit.wasm": "9251bb81ae8464c4df3b072f84aa969b",
|
|
|
|
"canvaskit/canvaskit.js.symbols": "74a84c23f5ada42fe063514c587968c6",
|
|
|
|
"canvaskit/canvaskit.js": "738255d00768497e86aa4ca510cce1e1",
|
|
|
|
"canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b03",
|
|
|
|
"canvaskit/skwasm.js": "5d4f9263ec93efeb022bb14a3881d240",
|
|
|
|
"manifest.json": "cc4b6aa791018840b65fd0b0e325b201",
|
|
|
|
"flutter.js": "383e55f7f3cce5be08fcf1f3881f585c"};
|
|
|
|
// The application shell files that are downloaded before a service worker can
|
|
|
|
// start.
|
|
|
|
const CORE = ["main.dart.js",
|
|
|
|
"index.html",
|
|
|
|
"flutter_bootstrap.js",
|
|
|
|
"assets/AssetManifest.bin.json",
|
|
|
|
"assets/FontManifest.json"];
|
|
|
|
|
|
|
|
// During install, the TEMP cache is populated with the application shell files.
|
|
|
|
self.addEventListener("install", (event) => {
|
|
|
|
self.skipWaiting();
|
|
|
|
return event.waitUntil(
|
|
|
|
caches.open(TEMP).then((cache) => {
|
|
|
|
return cache.addAll(
|
|
|
|
CORE.map((value) => new Request(value, {'cache': 'reload'})));
|
|
|
|
})
|
|
|
|
);
|
|
|
|
});
|
|
|
|
// During activate, the cache is populated with the temp files downloaded in
|
|
|
|
// install. If this service worker is upgrading from one with a saved
|
|
|
|
// MANIFEST, then use this to retain unchanged resource files.
|
|
|
|
self.addEventListener("activate", function(event) {
|
|
|
|
return event.waitUntil(async function() {
|
|
|
|
try {
|
|
|
|
var contentCache = await caches.open(CACHE_NAME);
|
|
|
|
var tempCache = await caches.open(TEMP);
|
|
|
|
var manifestCache = await caches.open(MANIFEST);
|
|
|
|
var manifest = await manifestCache.match('manifest');
|
|
|
|
// When there is no prior manifest, clear the entire cache.
|
|
|
|
if (!manifest) {
|
|
|
|
await caches.delete(CACHE_NAME);
|
|
|
|
contentCache = await caches.open(CACHE_NAME);
|
|
|
|
for (var request of await tempCache.keys()) {
|
|
|
|
var response = await tempCache.match(request);
|
|
|
|
await contentCache.put(request, response);
|
|
|
|
}
|
|
|
|
await caches.delete(TEMP);
|
|
|
|
// Save the manifest to make future upgrades efficient.
|
|
|
|
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
|
|
|
|
// Claim client to enable caching on first launch
|
|
|
|
self.clients.claim();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var oldManifest = await manifest.json();
|
|
|
|
var origin = self.location.origin;
|
|
|
|
for (var request of await contentCache.keys()) {
|
|
|
|
var key = request.url.substring(origin.length + 1);
|
|
|
|
if (key == "") {
|
|
|
|
key = "/";
|
|
|
|
}
|
|
|
|
// If a resource from the old manifest is not in the new cache, or if
|
|
|
|
// the MD5 sum has changed, delete it. Otherwise the resource is left
|
|
|
|
// in the cache and can be reused by the new service worker.
|
|
|
|
if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) {
|
|
|
|
await contentCache.delete(request);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Populate the cache with the app shell TEMP files, potentially overwriting
|
|
|
|
// cache files preserved above.
|
|
|
|
for (var request of await tempCache.keys()) {
|
|
|
|
var response = await tempCache.match(request);
|
|
|
|
await contentCache.put(request, response);
|
|
|
|
}
|
|
|
|
await caches.delete(TEMP);
|
|
|
|
// Save the manifest to make future upgrades efficient.
|
|
|
|
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
|
|
|
|
// Claim client to enable caching on first launch
|
|
|
|
self.clients.claim();
|
|
|
|
return;
|
|
|
|
} catch (err) {
|
|
|
|
// On an unhandled exception the state of the cache cannot be guaranteed.
|
|
|
|
console.error('Failed to upgrade service worker: ' + err);
|
|
|
|
await caches.delete(CACHE_NAME);
|
|
|
|
await caches.delete(TEMP);
|
|
|
|
await caches.delete(MANIFEST);
|
|
|
|
}
|
|
|
|
}());
|
|
|
|
});
|
|
|
|
// The fetch handler redirects requests for RESOURCE files to the service
|
|
|
|
// worker cache.
|
|
|
|
self.addEventListener("fetch", (event) => {
|
|
|
|
if (event.request.method !== 'GET') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var origin = self.location.origin;
|
|
|
|
var key = event.request.url.substring(origin.length + 1);
|
|
|
|
// Redirect URLs to the index.html
|
|
|
|
if (key.indexOf('?v=') != -1) {
|
|
|
|
key = key.split('?v=')[0];
|
|
|
|
}
|
|
|
|
if (event.request.url == origin || event.request.url.startsWith(origin + '/#') || key == '') {
|
|
|
|
key = '/';
|
|
|
|
}
|
|
|
|
// If the URL is not the RESOURCE list then return to signal that the
|
|
|
|
// browser should take over.
|
|
|
|
if (!RESOURCES[key]) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// If the URL is the index.html, perform an online-first request.
|
|
|
|
if (key == '/') {
|
|
|
|
return onlineFirst(event);
|
|
|
|
}
|
|
|
|
event.respondWith(caches.open(CACHE_NAME)
|
|
|
|
.then((cache) => {
|
|
|
|
return cache.match(event.request).then((response) => {
|
|
|
|
// Either respond with the cached resource, or perform a fetch and
|
|
|
|
// lazily populate the cache only if the resource was successfully fetched.
|
|
|
|
return response || fetch(event.request).then((response) => {
|
|
|
|
if (response && Boolean(response.ok)) {
|
|
|
|
cache.put(event.request, response.clone());
|
|
|
|
}
|
|
|
|
return response;
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
);
|
|
|
|
});
|
|
|
|
self.addEventListener('message', (event) => {
|
|
|
|
// SkipWaiting can be used to immediately activate a waiting service worker.
|
|
|
|
// This will also require a page refresh triggered by the main worker.
|
|
|
|
if (event.data === 'skipWaiting') {
|
|
|
|
self.skipWaiting();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (event.data === 'downloadOffline') {
|
|
|
|
downloadOffline();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Download offline will check the RESOURCES for all files not in the cache
|
|
|
|
// and populate them.
|
|
|
|
async function downloadOffline() {
|
|
|
|
var resources = [];
|
|
|
|
var contentCache = await caches.open(CACHE_NAME);
|
|
|
|
var currentContent = {};
|
|
|
|
for (var request of await contentCache.keys()) {
|
|
|
|
var key = request.url.substring(origin.length + 1);
|
|
|
|
if (key == "") {
|
|
|
|
key = "/";
|
|
|
|
}
|
|
|
|
currentContent[key] = true;
|
|
|
|
}
|
|
|
|
for (var resourceKey of Object.keys(RESOURCES)) {
|
|
|
|
if (!currentContent[resourceKey]) {
|
|
|
|
resources.push(resourceKey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return contentCache.addAll(resources);
|
|
|
|
}
|
|
|
|
// Attempt to download the resource online before falling back to
|
|
|
|
// the offline cache.
|
|
|
|
function onlineFirst(event) {
|
|
|
|
return event.respondWith(
|
|
|
|
fetch(event.request).then((response) => {
|
|
|
|
return caches.open(CACHE_NAME).then((cache) => {
|
|
|
|
cache.put(event.request, response.clone());
|
|
|
|
return response;
|
|
|
|
});
|
|
|
|
}).catch((error) => {
|
|
|
|
return caches.open(CACHE_NAME).then((cache) => {
|
|
|
|
return cache.match(event.request).then((response) => {
|
|
|
|
if (response != null) {
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
throw error;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
);
|
|
|
|
}
|