-
Notifications
You must be signed in to change notification settings - Fork 2
/
service-worker.js
2 lines (2 loc) · 53 KB
/
service-worker.js
1
2
!function(){var e={211:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!==e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function s(n){e.removeListener(t,i),r(n)}function i(){"function"===typeof e.removeListener&&e.removeListener("error",s),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&g(e,"error",t,n)}(e,s,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var s,i,o,l;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),o=i[t]),void 0===o)o=i[t]=n,++e._eventsCount;else if("function"===typeof o?o=i[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=u.bind(r);return s.listener=n,r.wrapFn=s,s}function f(e,t,n){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"===typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(s):p(s,s.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"===typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(i){r.once&&e.removeEventListener(t,s),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s="error"===e,i=this._events;if(void 0!==i)s=s&&void 0===i.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var l=c.length,u=p(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,s,i,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(s=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){o=n[i].listener,s=i;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var s,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(s=i[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},485:function(e,t,n){var r=n(369).Symbol;e.exports=r},380:function(e,t,n){var r=n(485),s=n(871),i=n(282),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):i(e)}},940:function(e,t,n){var r=n(796),s=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(s,""):e}},132:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},871:function(e,t,n){var r=n(485),s=Object.prototype,i=s.hasOwnProperty,o=s.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(c){}var s=o.call(e);return r&&(t?e[a]=n:delete e[a]),s}},282:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},369:function(e,t,n){var r=n(132),s="object"==typeof self&&self&&self.Object===Object&&self,i=r||s||Function("return this")();e.exports=i},796:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},497:function(e,t,n){var r=n(537),s=n(568),i=n(410),o=Math.max,a=Math.min;e.exports=function(e,t,n){var c,l,u,h,f,d,p=0,g=!1,_=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=c,r=l;return c=l=void 0,p=t,h=e.apply(r,n)}function m(e){var n=e-d;return void 0===d||n>=t||n<0||_&&e-p>=u}function w(){var e=s();if(m(e))return P(e);f=setTimeout(w,function(e){var n=t-(e-d);return _?a(n,u-(e-p)):n}(e))}function P(e){return f=void 0,y&&c?v(e):(c=l=void 0,h)}function E(){var e=s(),n=m(e);if(c=arguments,l=this,d=e,n){if(void 0===f)return function(e){return p=e,f=setTimeout(w,t),g?v(e):h}(d);if(_)return clearTimeout(f),f=setTimeout(w,t),v(d)}return void 0===f&&(f=setTimeout(w,t)),h}return t=i(t)||0,r(n)&&(g=!!n.leading,u=(_="maxWait"in n)?o(i(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==f&&clearTimeout(f),p=0,c=d=l=f=void 0},E.flush=function(){return void 0===f?h:P(s())},E}},537:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},462:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},534:function(e,t,n){var r=n(380),s=n(462);e.exports=function(e){return"symbol"==typeof e||s(e)&&"[object Symbol]"==r(e)}},568:function(e,t,n){var r=n(369);e.exports=function(){return r.Date.now()}},946:function(e,t,n){var r=n(497),s=n(537);e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return s(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:i,maxWait:t,trailing:o})}},410:function(e,t,n){var r=n(940),s=n(537),i=n(534),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}},524:function(){"use strict";try{self["workbox:core:6.6.0"]&&_()}catch(e){}},939:function(){"use strict";try{self["workbox:precaching:6.6.0"]&&_()}catch(e){}},511:function(){"use strict";try{self["workbox:routing:6.6.0"]&&_()}catch(e){}},642:function(){"use strict";try{self["workbox:strategies:6.6.0"]&&_()}catch(e){}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";n(524);const e=function(e){let t=e;for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.length>0&&(t+=` :: ${JSON.stringify(r)}`),t};class t extends Error{constructor(t,n){super(e(t,n)),this.name=t,this.details=n}}const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},s=e=>[r.prefix,e,r.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||s(r.precache),o=e=>e||s(r.runtime);function a(e,t){const n=t();return e.waitUntil(n),n}n(939);function c(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:n,url:r}=e;if(!r)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!n){const e=new URL(r,location.href);return{cacheKey:e.href,url:e.href}}const s=new URL(r,location.href),i=new URL(r,location.href);return s.searchParams.set("__WB_REVISION__",n),{cacheKey:s.href,url:i.href}}class l{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async e=>{let{request:t,state:n}=e;n&&(n.originalRequest=t)},this.cachedResponseWillBeUsed=async e=>{let{event:t,state:n,cachedResponse:r}=e;if("install"===t.type&&n&&n.originalRequest&&n.originalRequest instanceof Request){const e=n.originalRequest.url;r?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return r}}}class u{constructor(e){let{precacheController:t}=e;this.cacheKeyWillBeUsed=async e=>{let{request:t,params:n}=e;const r=(null===n||void 0===n?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return r?new Request(r,{headers:t.headers}):t},this._precacheController=t}}let h;async function f(e,n){let r=null;if(e.url){r=new URL(e.url).origin}if(r!==self.location.origin)throw new t("cross-origin-copy-response",{origin:r});const s=e.clone(),i={headers:new Headers(s.headers),status:s.status,statusText:s.statusText},o=n?n(i):i,a=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?s.body:await s.blob();return new Response(a,o)}const d=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function p(e,t){const n=new URL(e);for(const r of t)n.searchParams.delete(r);return n.href}class g{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const _=new Set;function y(e){return new Promise((t=>setTimeout(t,e)))}n(642);function v(e){return"string"===typeof e?new Request(e):e}class m{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new g,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:n}=this;let r=v(e);if("navigate"===r.mode&&n instanceof FetchEvent&&n.preloadResponse){const e=await n.preloadResponse;if(e)return e}const s=this.hasCallback("fetchDidFail")?r.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))r=await e({request:r.clone(),event:n})}catch(o){if(o instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:o.message})}const i=r.clone();try{let e;e=await fetch(r,"navigate"===r.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:n,request:i,response:e});return e}catch(a){throw s&&await this.runCallbacks("fetchDidFail",{error:a,event:n,originalRequest:s.clone(),request:i.clone()}),a}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=v(e);let n;const{cacheName:r,matchOptions:s}=this._strategy,i=await this.getCacheKey(t,"read"),o=Object.assign(Object.assign({},s),{cacheName:r});n=await caches.match(i,o);for(const a of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await a({cacheName:r,matchOptions:s,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,n){const r=v(e);await y(0);const s=await this.getCacheKey(r,"write");if(!n)throw new t("cache-put-with-no-response",{url:d(s.url)});const i=await this._ensureResponseSafeToCache(n);if(!i)return!1;const{cacheName:o,matchOptions:a}=this._strategy,c=await self.caches.open(o),l=this.hasCallback("cacheDidUpdate"),u=l?await async function(e,t,n,r){const s=p(t.url,n);if(t.url===s)return e.match(t,r);const i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await e.keys(t,i);for(const a of o)if(s===p(a.url,n))return e.match(a,r)}(c,s.clone(),["__WB_REVISION__"],a):null;try{await c.put(s,l?i.clone():i)}catch(h){if(h instanceof Error)throw"QuotaExceededError"===h.name&&await async function(){for(const e of _)await e()}(),h}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:u,newResponse:i.clone(),request:s,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))r=v(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const n=this._pluginStateMap.get(t),r=r=>{const s=Object.assign(Object.assign({},r),{state:n});return t[e](s)};yield r}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const r of this.iterateCallbacks("cacheWillUpdate"))if(t=await r({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&200!==t.status&&(t=void 0),t}}class w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n="string"===typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,s=new m(this,{event:t,request:n,params:r}),i=this._getResponse(s,n,t);return[i,this._awaitComplete(i,s,n,t)]}async _getResponse(e,n,r){let s;await e.runCallbacks("handlerWillStart",{event:r,request:n});try{if(s=await this._handle(n,e),!s||"error"===s.type)throw new t("no-response",{url:n.url})}catch(i){if(i instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(s=await t({error:i,event:r,request:n}),s)break;if(!s)throw i}for(const t of e.iterateCallbacks("handlerWillRespond"))s=await t({event:r,request:n,response:s});return s}async _awaitComplete(e,t,n,r){let s,i;try{s=await e}catch(i){}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:s}),await t.doneWaiting()}catch(o){o instanceof Error&&(i=o)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:s,error:i}),t.destroy(),i)throw i}}class P extends w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(P.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,n){let r;const s=n.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=s.integrity,i=e.integrity,o=!i||i===t;if(r=await n.fetch(new Request(e,{integrity:"no-cors"!==e.mode?i||t:void 0})),t&&o&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await n.cachePut(e,r.clone());0}}return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();const r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new t("bad-precaching-response",{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,r]of this.plugins.entries())r!==P.copyRedirectedCacheableResponsesPlugin&&(r===P.defaultPrecacheCacheabilityPlugin&&(e=n),r.cacheWillUpdate&&t++);0===t?this.plugins.push(P.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}P.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate(e){let{response:t}=e;return!t||t.status>=400?null:t}},P.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate(e){let{response:t}=e;return t.redirected?await f(t):t}};class E{constructor(){let{cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new P({cacheName:i(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const n=[];for(const r of e){"string"===typeof r?n.push(r):r&&void 0===r.revision&&n.push(r.url);const{cacheKey:e,url:s}=c(r),i="string"!==typeof r&&r.revision?"reload":"default";if(this._urlsToCacheKeys.has(s)&&this._urlsToCacheKeys.get(s)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(s),secondEntry:e});if("string"!==typeof r&&r.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==r.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:s});this._cacheKeysToIntegrities.set(e,r.integrity)}if(this._urlsToCacheKeys.set(s,e),this._urlsToCacheModes.set(s,i),n.length>0){const e=`Workbox is precaching URLs without revision info: ${n.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return a(e,(async()=>{const t=new l;this.strategy.plugins.push(t);for(const[s,i]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(i),n=this._urlsToCacheModes.get(s),r=new Request(s,{integrity:t,cache:n,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:r,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}}))}activate(e){return a(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(const s of t)n.has(s.url)||(await e.delete(s),r.push(s.url));return{deletedURLs:r}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n){return(await self.caches.open(this.strategy.cacheName)).match(n)}}createHandlerBoundToURL(e){const n=this.getCacheKeyForURL(e);if(!n)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:n},t.params),this.strategy.handle(t))}}let R;const T=()=>(R||(R=new E),R);n(511);const S=e=>e&&"object"===typeof e?e:{handle:e};class C{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";this.handler=S(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=S(e)}}class A extends C{constructor(e,t,n){super((t=>{let{url:n}=t;const r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),t,n)}}class b{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const n=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const n=new Request(...t);return this.handleRequest({request:n,event:e})})));e.waitUntil(n),e.ports&&e.ports[0]&&n.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest(e){let{request:t,event:n}=e;const r=new URL(t.url,location.href);if(!r.protocol.startsWith("http"))return void 0;const s=r.origin===location.origin,{params:i,route:o}=this.findMatchingRoute({event:n,request:t,sameOrigin:s,url:r});let a=o&&o.handler;const c=t.method;if(!a&&this._defaultHandlerMap.has(c)&&(a=this._defaultHandlerMap.get(c)),!a)return void 0;let l;try{l=a.handle({url:r,request:t,event:n,params:i})}catch(h){l=Promise.reject(h)}const u=o&&o.catchHandler;return l instanceof Promise&&(this._catchHandler||u)&&(l=l.catch((async e=>{if(u){0;try{return await u.handle({url:r,request:t,event:n,params:i})}catch(s){s instanceof Error&&(e=s)}}if(this._catchHandler)return this._catchHandler.handle({url:r,request:t,event:n});throw e}))),l}findMatchingRoute(e){let{url:t,sameOrigin:n,request:r,event:s}=e;const i=this._routes.get(r.method)||[];for(const o of i){let e;const i=o.match({url:t,sameOrigin:n,request:r,event:s});if(i)return e=i,(Array.isArray(e)&&0===e.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(e=void 0),{route:o,params:e}}return{}}setDefaultHandler(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,S(e))}setCatchHandler(e){this._catchHandler=S(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const n=this._routes.get(e.method).indexOf(e);if(!(n>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(n,1)}}let L;const I=()=>(L||(L=new b,L.addFetchListener(),L.addCacheListener()),L);function O(e,n,r){let s;if("string"===typeof e){const t=new URL(e,location.href);0;s=new C((e=>{let{url:n}=e;return n.href===t.href}),n,r)}else if(e instanceof RegExp)s=new A(e,n,r);else if("function"===typeof e)s=new C(e,n,r);else{if(!(e instanceof C))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});s=e}return I().registerRoute(s),s}class D extends C{constructor(e,t){super((n=>{let{request:r}=n;const s=e.getURLsToCacheKeys();for(const i of function(e){let{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n="index.html",cleanURLs:r=!0,urlManipulation:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const i=new URL(e,location.href);i.hash="",yield i.href;const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const n of[...e.searchParams.keys()])t.some((e=>e.test(n)))&&e.searchParams.delete(n);return e}(i,t);if(yield o.href,n&&o.pathname.endsWith("/")){const e=new URL(o.href);e.pathname+=n,yield e.href}if(r){const e=new URL(o.href);e.pathname+=".html",yield e.href}if(s){const e=s({url:i});for(const t of e)yield t.href}}()}(r.url,t)){const t=s.get(i);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}function N(e){return T().matchPrecache(e)}function U(e){T().precache(e)}function x(e,t){U(e),function(e){const t=T();O(new D(t,e))}(t)}const k={cacheWillUpdate:async e=>{let{response:t}=e;return 200===t.status||0===t.status?t:null}};class W extends w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(k),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,n){const r=[];const s=[];let i;if(this._networkTimeoutSeconds){const{id:t,promise:o}=this._getTimeoutPromise({request:e,logs:r,handler:n});i=t,s.push(o)}const o=this._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:n});s.push(o);const a=await n.waitUntil((async()=>await n.waitUntil(Promise.race(s))||await o)());if(!a)throw new t("no-response",{url:e.url});return a}_getTimeoutPromise(e){let t,{request:n,logs:r,handler:s}=e;return{promise:new Promise((e=>{t=setTimeout((async()=>{e(await s.cacheMatch(n))}),1e3*this._networkTimeoutSeconds)})),id:t}}async _getNetworkPromise(e){let t,n,{timeoutId:r,request:s,logs:i,handler:o}=e;try{n=await o.fetchAndCachePut(s)}catch(a){a instanceof Error&&(t=a)}return r&&clearTimeout(r),!t&&n||(n=await o.cacheMatch(s)),n}}class H extends w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,n){let r,s;try{const t=[n.fetch(e)];if(this._networkTimeoutSeconds){const e=y(1e3*this._networkTimeoutSeconds);t.push(e)}if(s=await Promise.race(t),!s)throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`)}catch(i){i instanceof Error&&(r=i)}if(!s)throw new t("no-response",{url:e.url,error:r});return s}}class M extends w{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(k)}async _handle(e,n){const r=n.fetchAndCachePut(e).catch((()=>{}));n.waitUntil(r);let s,i=await n.cacheMatch(e);if(i)0;else{0;try{i=await r}catch(o){o instanceof Error&&(s=o)}}if(!i)throw new t("no-response",{url:e.url,error:s});return i}}const q=Object.freeze({getClientsInfo:"GET_CLIENTS_INFO",clientsInfo:"CLIENTS_INFO",claimClients:"CLAIM_CLIENTS",skipWaiting:"SKIP_WAITING",startRecording:"START_RECORDING",recordingStarted:"RECORDING_STARTED",recordingError:"RECORDING_ERROR",confirmRecordingCompletion:"CONFIRM_RECORDING_COMPLETION",completeRecording:"COMPLETE_RECORDING",recordingCompleted:"RECORDING_COMPLETED",dhis2ConnectionStatusUpdate:"DHIS2_CONNECTION_STATUS_UPDATE",getImmediateDhis2ConnectionStatusUpdate:"GET_IMMEDIATE_DHIS2_CONNECTION_STATUS_UPDATE"});var K=n(946),j=n.n(K);const B=(e,t)=>t.some((t=>e instanceof t));let F,G;const V=new WeakMap,$=new WeakMap,Q=new WeakMap,J=new WeakMap,z=new WeakMap;let X={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return $.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Q.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ee(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function Y(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(G||(G=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(te(this),n),ee(V.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ee(e.apply(te(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];const i=e.call(te(this),t,...r);return Q.set(i,t.sort?t.sort():[t]),ee(i)}}function Z(e){return"function"===typeof e?Y(e):(e instanceof IDBTransaction&&function(e){if($.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)}));$.set(e,t)}(e),B(e,F||(F=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,X):e)}function ee(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(ee(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",i)}));return t.then((t=>{t instanceof IDBCursor&&V.set(t,e)})).catch((()=>{})),z.set(t,e),t}(e);if(J.has(e))return J.get(e);const t=Z(e);return t!==e&&(J.set(e,t),z.set(t,e)),t}const te=e=>z.get(e);function ne(e,t){let{blocked:n,upgrade:r,blocking:s,terminated:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=indexedDB.open(e,t),a=ee(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(ee(o.result),e.oldVersion,e.newVersion,ee(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),a.then((e=>{i&&e.addEventListener("close",(()=>i())),s&&e.addEventListener("versionchange",(()=>s()))})).catch((()=>{})),a}const re=["get","getKey","getAll","getAllKeys","count"],se=["put","add","delete","clear"],ie=new Map;function oe(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(ie.get(t))return ie.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=se.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!re.includes(n))return;const i=async function(e){const t=this.transaction(e,s?"readwrite":"readonly");let i=t.store;for(var o=arguments.length,a=new Array(o>1?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];return r&&(i=i.index(a.shift())),(await Promise.all([i[n](...a),s&&t.done]))[0]};return ie.set(t,i),i}X=(e=>({...e,get:(t,n,r)=>oe(t,n)||e.get(t,n,r),has:(t,n)=>!!oe(t,n)||e.has(t,n)}))(X);const ae="dhis2-base-url-db",ce="dhis2-base-url-store",le=1;function ue(){return ne(ae,le,{upgrade(e,t){0===t&&e.createObjectStore(ce,{keyPath:"appName"}),console.debug("[sections-db] Done upgrading DB")}})}const he="sections-db",fe="sections-store",de=1;function pe(){return ne(he,de,{upgrade(e,t){0===t&&e.createObjectStore(fe,{keyPath:"sectionId"}),console.debug("[sections-db] Done upgrading DB")}})}function ge(){return function(e){let{blocked:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(()=>t())),ee(n).then((()=>{}))}(he)}const _e=["other-assets","app-shell"],ye=[/\/api(\/\d+)?\/system\/info/,/\/api(\/\d+)?\/userSettings/,/\/api(\/\d+)?\/me\?fields=id$/],ve=[/^\.\/static\/js\/moment-locales\//],me=JSON.parse({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_CACHING_PATTERNS_TO_OMIT_FROM_APP_SHELL||{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_CACHING_PATTERNS_TO_OMIT||"[]").map((e=>new RegExp(e))),we="true"==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_CACHING_OMIT_EXTERNAL_REQUESTS_FROM_APP_SHELL||"true"==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_CACHING_OMIT_EXTERNAL_REQUESTS;function Pe(e){const t=new URL("./",self.location.href);if(e.href.startsWith(t.href))return!0;if(ye.some((t=>t.test(e.href))))return!0;if(we&&e.origin!==self.location.origin)return!1;return!me.some((t=>t.test(e.href)))}async function Ee(){const e=await caches.keys();return Promise.all(e.map((async e=>{const t=/workbox/.test(e),n=!!_e.find((t=>t===e)),r=await self.dbPromise,s=!!await r.get(fe,e);if(!t&&!n&&!s)return console.debug(`[SW] Cache with key ${e} is unused and will be deleted`),caches.delete(e)})))}function Re(){return self.clients.matchAll({includeUncontrolled:!0}).then((e=>e.filter((e=>e.url.startsWith(self.registration.scope)))))}const Te=j()((async e=>{(await Re()).forEach((t=>t.postMessage({type:q.dhis2ConnectionStatusUpdate,payload:{isConnected:e}})))}),1e3);async function Se(e){if(!self.dhis2BaseUrl){const e=await async function(e){return(await ue()).get(ce,e).then((e=>null===e||void 0===e?void 0:e.baseUrl))}("Data Quality");if(!e)return!0;self.dhis2BaseUrl=e}return e.url.startsWith(self.dhis2BaseUrl)}const Ce={fetchDidFail:async e=>{let{request:t}=e;await Se(t)&&Te(!1)},fetchDidSucceed:async e=>{let{request:t,response:n}=e;return await Se(t)&&Te(!0),n}},Ae=JSON.parse({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_CACHING_PATTERNS_TO_OMIT_FROM_CACHEABLE_SECTIONS||"[]").map((e=>new RegExp(e)));function be(e){return e in self.clientRecordingStates}function Le(e){let{url:t,event:n}=e;const r=n.clientId;if(!be(r))return!1;if(void 0!==self.clientRecordingStates[r].confirmationTimeout)return!1;return!Ae.some((e=>e.test(t.href)))}class Ie extends w{_handle(e,t){const{event:n}=t,r=self.clientRecordingStates[n.clientId];return clearTimeout(r.recordingTimeout),r.pendingRequests.add(e),t.fetch(e).then((t=>function(e,t,n){const r=self.clientRecordingStates[n];if(!r)return t;(function(e,t,n){if(n.ok){const r=n.clone();caches.open(e).then((e=>e.put(t,r)))}})(De("temp",n),e,t),r.fulfilledRequests+=1,r.pendingRequests.delete(e),0===r.pendingRequests.size&&function(e){const t=self.clientRecordingStates[e];t.recordingTimeout=setTimeout((()=>Oe(null,e)),t.recordingTimeoutDelay)}(n);return t}(e,t,n.clientId))).catch((e=>{throw Oe(e,n.clientId),e}))}}function Oe(e,t){const n=self.clientRecordingStates[t];if(n&&(console.debug("[SW] Stopping recording",{clientId:t,recordingState:n}),clearTimeout(n.recordingTimeout)),e)return self.clients.get(t).then((t=>{t.postMessage({type:q.recordingError,payload:{msg:e.message}})})),void Ne(t);!async function(e){const t=await self.clients.get(e);if(!t)return console.debug("[SW] Client not found for ID",e),void Ne(e);t.postMessage({type:q.confirmRecordingCompletion}),function(e){const t=self.clientRecordingStates[e];t.confirmationTimeout=setTimeout((()=>{console.warn("[SW] Completion confirmation timed out. Clearing recording for client",e),Ne(e)}),1e4)}(e)}(t)}function De(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("-")}function Ne(e){delete self.clientRecordingStates[e];const t=De("temp",e);return caches.delete(t)}n(211);!function(){if(!("true"==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_DHIS2_APP_VERSION:"1.10.33",REACT_APP_DHIS2_APP_NAME:"Data Quality",REACT_APP_DHIS2_APP_LOGINAPP:"false",REACT_APP_DHIS2_BASE_URL:".."}.REACT_APP_DHIS2_APP_PWA_ENABLED))return self.addEventListener("install",(()=>{self.skipWaiting()})),void self.addEventListener("activate",(async()=>{console.log("Removing previous service worker"),self.registration.unregister();const e=await self.caches.keys();await Promise.all(e.map((e=>self.caches.delete(e)))),await ge(),(await self.clients.matchAll({type:"window"})).forEach((e=>e.navigate(e.url)))}));self.__WB_DISABLE_DEV_LOGS=!0,self.clientRecordingStates={},function(){const e="..";if(e)try{self.dhis2BaseUrl=new URL(e).href}catch{self.dhis2BaseUrl=new URL(e,self.location.href).href}}();const e=new RegExp("/[^/?]+\\.[^/]+$");{const t=[{'revision':'3a0986f33995c47fe71691e8797670de','url':'./index.html'},{'revision':null,'url':'./static/css/3320.5b06ded5.chunk.css'},{'revision':null,'url':'./static/css/app.49a2cccf.chunk.css'},{'revision':null,'url':'./static/css/main.4536e618.css'},{'revision':null,'url':'./static/js/3320.27ddb100.chunk.js'},{'revision':null,'url':'./static/js/app.55e3d9b3.chunk.js'},{'revision':null,'url':'./static/js/main.29916082.js'},{'revision':null,'url':'./static/js/moment-locales/af.ce0c32f9.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-dz.f3bd1c9c.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-kw.31dfa738.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-ly.091c3144.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-ma.b278621b.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-sa.3a6b74d8.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar-tn.3d9aab83.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ar.cfae42fa.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/az.1062ba34.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/be.c2d79927.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bg.7df57edd.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bm.8210c9c8.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bn-bd.98826db2.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bn.580f3ea3.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bo.8a694426.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/br.179bf56e.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/bs.47dca8d2.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ca.0035b427.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/cs.71d77ecb.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/cv.c9b03858.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/cy.395a7c05.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/da.89dbea02.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/de-at.93980fed.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/de-ch.94ff1a12.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/de.8959cf47.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/dv.de98f36f.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/el.f7ce79a5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-au.a2d99218.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-ca.39b303a5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-gb.965ff5f8.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-ie.93db1d5e.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-il.1705c9dc.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-in.ea6a1f62.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-nz.f5d28b2d.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/en-sg.79dae4d6.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/eo.1fa22866.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/es-do.066a0f77.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/es-mx.cad53fe5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/es-us.495226e8.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/es.76a53abd.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/et.748eb9d3.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/eu.06a312df.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fa.abe1ed59.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fi.d4d37753.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fil.ad37e2c1.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fo.d78ce916.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fr-ca.07e27ecf.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fr-ch.b7e844d7.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fr.40b437a6.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/fy.9d222fb3.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ga.7a7c5001.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/gd.48d48d03.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/gl.8ba131a7.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/gom-deva.b7920577.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/gom-latn.b60d4234.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/gu.4e5025be.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/he.c5c03f4d.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/hi.b1417f19.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/hr.b2d8ea33.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/hu.276af5cc.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/hy-am.5f69941e.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/id.512756fa.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/is.35940018.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/it-ch.b460edbf.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/it.5f2d86f7.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ja.014b0c77.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/jv.f93c52bc.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ka.d4cf076a.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/kk.2441f6a7.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/km.22d25fbc.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/kn.b10b2b4c.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ko.10cb4875.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ku.6f657e2d.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ky.77e467d2.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/lb.0c9dc58b.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/lo.72f54310.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/lt.41c2655b.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/lv.3b06e411.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/me.af649659.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/mi.53fdddb2.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/mk.b84c2b59.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ml.6c24b541.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/mn.5534e326.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/mr.a0dd321a.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ms-my.a6c10f9e.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ms.3502a207.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/mt.52fade50.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/my.7b12d45a.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/nb.9abafcef.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ne.a5f1d1aa.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/nl-be.e950bb33.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/nl.a9017081.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/nn.33f695ff.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/oc-lnc.c1a1e817.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/pa-in.1d595ff4.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/pl.c83e12ba.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/pt-br.76b8c4a9.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/pt.d53377e1.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ro.586f2b22.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ru.8779e7e6.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sd.46c10aad.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/se.add2db09.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/si.0047a33a.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sk.4f69c0e5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sl.55199afe.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sq.5bf780f5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sr-cyrl.32383f96.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sr.43506742.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ss.be3a3b8a.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sv.98c61808.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/sw.32b1005b.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ta.cb0ac240.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/te.13b9cdb4.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tet.55799f24.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tg.5de342b5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/th.c3a1a6dd.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tk.23993258.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tl-ph.d5cf6663.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tlh.bdccc1cb.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tr.52856080.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tzl.622a7e07.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tzm-latn.4c482fd5.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/tzm.6df229f3.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ug-cn.bfa30cdb.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/uk.81e09fe4.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/ur.a40e1a90.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/uz-latn.2159f2c4.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/uz.ee7c7bcc.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/vi.e80b7d65.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/x-pseudo.41a149b3.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/yo.2631e50f.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/zh-cn.c3f2de98.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/zh-hk.84e93b80.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/zh-mo.86bd7b1b.chunk.js'},{'revision':null,'url':'./static/js/moment-locales/zh-tw.4af30557.chunk.js'},{'revision':null,'url':'./static/media/MaterialIcons-Regular.1811d381e9d3e8334394.woff'},{'revision':null,'url':'./static/media/MaterialIcons-Regular.45c4a4612e18a3255f51.ttf'},{'revision':null,'url':'./static/media/MaterialIcons-Regular.56395d5d012de45e4955.eot'},{'revision':null,'url':'./static/media/MaterialIcons-Regular.fa3334fe030aed8470dd.woff2'},{'revision':null,'url':'./static/media/roboto-latin-100.a45108d3b34af91f9113.woff'},{'revision':null,'url':'./static/media/roboto-latin-100.c2aa4ab115bf9c6057cb.woff2'},{'revision':null,'url':'./static/media/roboto-latin-100italic.451d4e559d6f57cdf6a1.woff'},{'revision':null,'url':'./static/media/roboto-latin-100italic.7f839a8652da29745ce4.woff2'},{'revision':null,'url':'./static/media/roboto-latin-300.37a7069dc30fc663c878.woff2'},{'revision':null,'url':'./static/media/roboto-latin-300.865f928cbabcc9f8f2b5.woff'},{'revision':null,'url':'./static/media/roboto-latin-300italic.bd5b7a13f2c52b531a2a.woff'},{'revision':null,'url':'./static/media/roboto-latin-300italic.c64e7e354c88e613c77c.woff2'},{'revision':null,'url':'./static/media/roboto-latin-400.176f8f5bd5f02b3abfcf.woff2'},{'revision':null,'url':'./static/media/roboto-latin-400.49ae34d4cc6b98c00c69.woff'},{'revision':null,'url':'./static/media/roboto-latin-400italic.b1d9d9904bfca8802a63.woff'},{'revision':null,'url':'./static/media/roboto-latin-400italic.d022bc70dc1bf7b3425d.woff2'},{'revision':null,'url':'./static/media/roboto-latin-500.cea99d3e3e13a3a599a0.woff'},{'revision':null,'url':'./static/media/roboto-latin-500.f5b74d7ffcdf85b9dd60.woff2'},{'revision':null,'url':'./static/media/roboto-latin-500italic.0d8bb5b3ee5f5dac9e44.woff2'},{'revision':null,'url':'./static/media/roboto-latin-500italic.18d00f739ff1e1c52db1.woff'},{'revision':null,'url':'./static/media/roboto-latin-700.2267169ee7270a22a963.woff'},{'revision':null,'url':'./static/media/roboto-latin-700.c18ee39fb002ad58b6dc.woff2'},{'revision':null,'url':'./static/media/roboto-latin-700italic.7d8125ff7f707231fd89.woff2'},{'revision':null,'url':'./static/media/roboto-latin-700italic.9360531f9bb817f917f0.woff'},{'revision':null,'url':'./static/media/roboto-latin-900.870c8c1486f76054301a.woff2'},{'revision':null,'url':'./static/media/roboto-latin-900.bac8362e7a6ea60b6983.woff'},{'revision':null,'url':'./static/media/roboto-latin-900italic.c20d916c1a1b094c1cec.woff'},{'revision':null,'url':'./static/media/roboto-latin-900italic.cb5ad999740e9d8a8bd1.woff2'}]||[],n=t.find((e=>{let{url:t}=e;return t.endsWith("index.html")}));U([n]);const r="./index.html";O((t=>{let{request:n,url:r}=t;return"navigate"===n.mode&&(!r.pathname.startsWith("/_")&&!(e.test(r.pathname)&&!r.pathname.endsWith("index.html")))}),(e=>{let{request:t}=e;return fetch(t).then((e=>"opaqueredirect"!==e.type&&e.ok?N(r):e)).catch((()=>N(r)))}));x(t.filter((e=>{if(e===n)return!1;return!ve.some((t=>t.test(e.url)))})));x(self.__WB_PLUGIN_MANIFEST||[]);x(self.__WB_BUILD_MANIFEST||[])}var t;O((e=>{let{url:t}=e;return/\/api(\/\d+)?(\/system)?\/ping/.test(t.pathname)}),new H),O(Le,new Ie({plugins:[Ce]})),O((e=>{let{url:t}=e;return Pe(t)&&/\.(jpg|gif|png|bmp|tiff|ico|woff)$/.test(t.pathname)}),new M({cacheName:"other-assets",plugins:[Ce]})),O((e=>{let{url:t}=e;return Pe(t)}),new W({cacheName:"app-shell",plugins:[Ce]})),t=new class extends w{_handle(e,t){return t.fetch(e).catch((t=>caches.match(e).then((e=>{if(!e)throw t;return e}))))}}({plugins:[Ce]}),I().setDefaultHandler(t),self.addEventListener("message",(e=>{e.data&&(e.data.type===q.getClientsInfo&&async function(e){const t=e.source.id,n=await Re();self.clients.get(t).then((e=>{e.postMessage({type:q.clientsInfo,payload:{clientsCount:n.length}})}))}(e),e.data.type===q.claimClients&&async function(){self.clients.claim(),(await self.clients.matchAll({includeUncontrolled:!0})).forEach((e=>e.navigate(e.url)))}(),e.data.type===q.skipWaiting&&self.skipWaiting(),e.data.type===q.getImmediateDhis2ConnectionStatusUpdate&&Te.flush(),e.data.type===q.startRecording&&function(e){var t,n,r;if(console.debug("[SW] Starting recording"),null===(t=e.data.payload)||void 0===t||!t.sectionId)throw new Error("[SW] No section ID specified to record");const s=e.source.id;if(be(s))throw new Error("[SW] Can't start a new recording; a recording is already in process");const i={sectionId:null===(n=e.data.payload)||void 0===n?void 0:n.sectionId,pendingRequests:new Set,fulfilledRequests:0,recordingTimeout:void 0,recordingTimeoutDelay:(null===(r=e.data.payload)||void 0===r?void 0:r.recordingTimeoutDelay)||1e3,confirmationTimeout:void 0};self.clientRecordingStates[s]=i,self.clients.get(s).then((e=>{e.postMessage({type:q.recordingStarted})}))}(e),e.data.type===q.completeRecording&&async function(e){try{const t=self.clientRecordingStates[e];console.debug("[SW] Completing recording",{clientId:e,recordingState:t}),clearTimeout(t.confirmationTimeout),void 0===self.dbPromise&&(self.dbPromise=pe()),(await self.dbPromise).put(fe,{sectionId:t.sectionId,lastUpdated:new Date,requests:t.fulfilledRequests}).catch(console.error);const n=await caches.open(t.sectionId),r=await caches.open(De("temp",e));(await r.keys()).forEach((async e=>{const t=await r.match(e);n.put(e,t)})),Ne(e),self.clients.get(e).then((e=>{e.postMessage({type:q.recordingCompleted})}))}catch(t){Oe(t,e)}}(e.source.id))})),self.addEventListener("activate",(e=>{e.waitUntil(function(){const e=pe();return self.dbPromise=e,e}().then(Ee))}))}()}()}();
//# sourceMappingURL=service-worker.js.map