'use strict';
const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';

const RESOURCES = {"assets/AssetManifest.bin": "a18a75bbe8839309a2cb2d57b53b9c29",
"assets/AssetManifest.bin.json": "082d3eff96115197d22d029f38910726",
"assets/assets/icons/car_green.png": "bc22151e6e01867c371f67a83ea965af",
"assets/assets/icons/car_green.svg.svg": "1e88a8e585e9e4ce80fbd3647d67397e",
"assets/assets/icons/car_grey.png": "2d20010052c030cd929130963824f76c",
"assets/assets/icons/car_grey.svg.svg": "10b56db54289e7ec2f7c4d6c05dc2f47",
"assets/assets/icons/car_orange.png": "614a5b30db8bb90eaaa835e670cc86db",
"assets/assets/icons/car_orange.svg.svg": "424a3f4b5e0557b43ea52958e4dc41d0",
"assets/assets/icons/car_red.png": "56885b9a949940ac7cc5a27e8ca9421d",
"assets/assets/icons/car_red.svg.svg": "d2527d11fafaca4a37b08ae859b574e4",
"assets/assets/icons/generate_icons.ps1": "6ad580f7aa907446331c2309a6ec80cb",
"assets/assets/icons/icon_parent_tenant.svg": "63c479e044613f68bfb43ad3a1f9e6fa",
"assets/assets/icons/icon_switch_tenant.svg": "bd4797f1ae28fb7c4159fa5cd7912b0e",
"assets/assets/icons/icon_tenant.svg": "1bd8c1307d55b086f66430d62a4df714",
"assets/assets/icons/motor_green.png": "714bc8a36afae8cbc67183bb1d74d358",
"assets/assets/icons/motor_green.svg.svg": "4b2a52d74f1e9f092a1609ab638a820c",
"assets/assets/icons/motor_grey.png": "46dcc4afa7070a81ec0534b2b21426c0",
"assets/assets/icons/motor_grey.svg.svg": "72142ea3e933d01785ae4c2aab82488b",
"assets/assets/icons/motor_orange.png": "b3f1970525bdf5086dadea4181af1b60",
"assets/assets/icons/motor_orange.svg.svg": "5fe7560a5889c10b362b960630520841",
"assets/assets/icons/motor_red.png": "c2b9c6e513d0f6e6dc5f1150a16540e1",
"assets/assets/icons/motor_red.svg.svg": "b240c0365fd88062711bf402fec1e7cb",
"assets/assets/icons/P-merah.png": "b08985c4dab87eae615512c2ff76035f",
"assets/assets/icons/P-orange.png": "3b2dc5a93577a5f5d0ce7ae490f274b8",
"assets/assets/icons_lite/car_green.svg.svg": "fafc0bb57193b8a609773a4684f8bf08",
"assets/assets/icons_lite/car_grey.svg.svg": "f0fd50b887e187cfd7a73fb427e3f78b",
"assets/assets/icons_lite/car_orange.svg.svg": "e9efa458d5cd576ad6422567644693ae",
"assets/assets/icons_lite/car_red.svg.svg": "637ee5ad8ccaceee960fb9f80cb3fcbd",
"assets/assets/icons_lite/motor_green.svg.svg": "5ad0131ab0d70c153d37d2dac76ed6d2",
"assets/assets/icons_lite/motor_grey.svg.svg": "9479ecc1e089380116b48368a6b02157",
"assets/assets/icons_lite/motor_orange.svg.svg": "300c46176547cf5c7357f5189129dec0",
"assets/assets/icons_lite/motor_red.svg.svg": "46f7f34975411eeaf0c111835a17cbc9",
"assets/assets/images/moiko_logo.png": "124b4808252e27637b7a950cf8eb4884",
"assets/assets/images/moiko_mark.png": "124b4808252e27637b7a950cf8eb4884",
"assets/assets/release_notes.json": "0ecd834247038d2915753a7c58e87e76",
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57",
"assets/fonts/MaterialIcons-Regular.otf": "4b99f8c1e66979b4d43e03789b95ab62",
"assets/NOTICES": "32605cc3bf4bd1b4442962ae2a28da2a",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "33b7d9392238c04c131b6ce224e13711",
"assets/packages/flutter_map/lib/assets/flutter_map_logo.png": "208d63cc917af9713fc9572bd5c09362",
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
"assets/shaders/stretch_effect.frag": "40d68efbbf360632f614c731219e95f0",
"canvaskit/canvaskit.js": "8331fe38e66b3a898c4f37648aaf7ee2",
"canvaskit/canvaskit.js.symbols": "a3c9f77715b642d0437d9c275caba91e",
"canvaskit/canvaskit.wasm": "9b6a7830bf26959b200594729d73538e",
"canvaskit/chromium/canvaskit.js": "a80c765aaa8af8645c9fb1aae53f9abf",
"canvaskit/chromium/canvaskit.js.symbols": "e2d09f0e434bc118bf67dae526737d07",
"canvaskit/chromium/canvaskit.wasm": "a726e3f75a84fcdf495a15817c63a35d",
"canvaskit/skwasm.js": "8060d46e9a4901ca9991edd3a26be4f0",
"canvaskit/skwasm.js.symbols": "3a4aadf4e8141f284bd524976b1d6bdc",
"canvaskit/skwasm.wasm": "7e5f3afdd3b0747a1fd4517cea239898",
"canvaskit/skwasm_heavy.js": "740d43a6b8240ef9e23eed8c48840da4",
"canvaskit/skwasm_heavy.js.symbols": "0755b4fb399918388d71b59ad390b055",
"canvaskit/skwasm_heavy.wasm": "b0be7910760d205ea4e011458df6ee01",
"favicon.png": "c4d2e3e463ab65ba3aa2b2e29512e35d",
"flutter.js": "24bc71911b75b5f8135c949e27a2984e",
"flutter_bootstrap.js": "1c1708bf2cb12248a07a4d387d52b40a",
"icons/Icon-192.png": "56f040a99be6965e284680dd13155798",
"icons/Icon-512.png": "940cb3fdd0d8188232caf8946692b665",
"icons/Icon-maskable-192.png": "6e563953787d9cd34a40304902bdde5e",
"icons/Icon-maskable-512.png": "40524d7b2df6b204427208313f44559a",
"index.html": "8de38cff325b41893fac22fdf2df9f8d",
"/": "8de38cff325b41893fac22fdf2df9f8d",
"ios-install.html": "7ca0bfb2d7e0198a67a0df5179165981",
"main.dart.js": "b6bf0b0caa93b6290ac6fb1f8e915391",
"manifest.json": "98f09e0381c395e6c4c187675bbdad8a",
"version.json": "21e2fa47f143fcc41c876e82513895f7"};
// 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;
        });
      });
    })
  );
}
