1 2importScripts('https://eu2-api.eng.bloomreach.com/js/service-worker.min.js'); 3var urls = ["/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/jquery-3.6.0.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/jquery.validate.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/ui/jquery-autocomplete.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/jquery.zoom.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/slick/slick.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/nouislider/nouislider.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/radialindicator/radialIndicator.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/ellipsis/jquery.ellipsis.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/plyr/plyr.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/isInViewport.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/photoswipe.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/lazyload/10/lazyload.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/app.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/pdp.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/plp.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/storefront.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/ui/jquery-ui.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/jquery/migrate/jquery-migrate-1.4.1.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/qrcode/qrcode.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/wnumb/wNumb.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/theta-carousel/theta-carousel.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/lib/adyen/adyen3ds2.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/lib/vtail.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/js/lib/vtailPlayer.min.js","/on/demandware.static/Sites-hunkemoller-fr-Site/-/default/dw08c6039b/fonts/Hunkemoller.woff2","/on/demandware.static/Sites-hunkemoller-fr-Site/-/default/dwa249d569/fonts/HaveHeartOne.woff2","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/account-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/account-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/cart-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/cart-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/checkout-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/checkout-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/content-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/content-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/error-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/error-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/mixmatch-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/mixmatch-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/pdp-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/pdp-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/storelocator-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/storelocator-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/homepage.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/homepage-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/plp.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/plp-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/clp.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/clp-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-account-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-account-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-accountlogin-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-accountlogin-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-cart-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-cart-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-checkout-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-checkout-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-steps-page-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/loyalty-steps-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/style.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/style-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/style-loyalty.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/style-loyalty-above-768.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/incountry-page.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/app.min.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/global.css","/on/demandware.static/Sites-hunkemoller-fr-Site/-/fr_FR/v1791168957725/css/global-above-768.css"]; 4var cacheParam = new URL(location).searchParams.get('cache'); 5(function() { 6 var nativeAddAll = Cache.prototype.addAll; 7 var userAgent = navigator.userAgent.match(/(Firefox|Chrome)\/(\d+\.)/); 8 9 // Has nice behavior of `var` which everyone hates 10 if (userAgent) { 11 var agent = userAgent[1]; 12 var version = parseInt(userAgent[2]); 13 } 14 15 if ( 16 nativeAddAll && (!userAgent || 17 (agent === 'Firefox' && version >= 46) || 18 (agent === 'Chrome' && version >= 50) 19 ) 20 ) { 21 return; 22 } 23 24 Cache.prototype.addAll = function addAll(requests) { 25 var cache = this; 26 27 // Since DOMExceptions are not constructable: 28 function NetworkError(message) { 29 this.name = 'NetworkError'; 30 this.code = 19; 31 this.message = message; 32 } 33 34 NetworkError.prototype = Object.create(Error.prototype); 35 36 return Promise.resolve().then(function() { 37 if (arguments.length < 1) throw new TypeError(); 38 39 // Simulate sequence<(Request or USVString)> binding: 40 var sequence = []; 41 42 requests = requests.map(function(request) { 43 if (request instanceof Request) { 44 return request; 45 } 46 else { 47 return String(request); // may throw TypeError 48 } 49 }); 50 51 return Promise.all( 52 requests.map(function(request) { 53 if (typeof request === 'string') {
54 request = new Request(request); 55 } 56 57 var scheme = new URL(request.url).protocol; 58 59 if (scheme !== 'http:' && scheme !== 'https:') { 60 throw new NetworkError("Invalid scheme"); 61 } 62 63 return fetch(request.clone()); 64 }) 65 ); 66 }).then(function(responses) { 67 // If some of the responses has not OK-eish status, 68 // then whole operation should reject 69 if (responses.some(function(response) { 70 return !response.ok; 71 })) { 72 throw new NetworkError('Incorrect response status'); 73 } 74 75 // TODO: check that requests don't overwrite one another 76 // (don't think this is possible to polyfill due to opaque responses) 77 return Promise.all( 78 responses.map(function(response, i) { 79 return cache.put(requests[i], response); 80 }) 81 ); 82 }).then(function() { 83 return undefined; 84 }); 85 }; 86 87 Cache.prototype.add = function add(request) { 88 return this.addAll([request]); 89 }; 90}()); 91 92 93 94self.addEventListener('install', function(e) { 95 self.skipWaiting(); 96}); 97 98self.addEventListener('activate', function (e) { 99 e.waitUntil( 100 caches.keys().then(function (cacheNames) { 101 return Promise.all( 102 cacheNames.filter(function (cacheName) { 103 return cacheName !== cacheParam; 104 }).map(function (cacheName) { 105 return caches.delete(cacheName); 106 }) 107 ); 108 }) 109 ); 110}); 111self.addEventListener('fetch', function (event) { 112 try { 113 if (event.request.method !== 'GET' || !(event.request.url.indexOf('http') === 0)) return; 114 event.respondWith( 115 caches.open(cacheParam).then(function(cache){ 116 return cache.match(event.request).then(function (response) { 117 var fetchPromise = fetch(event.request).then(function (networkResponse) { 118 //accept only responce type 'basic' as opaque responses increase cache size significantly 119 if (networkResponse.type === 'basic' && event.request.url.match(/.png|.img|.webp|.gif|.svg|.js|.woff2|.css|.ico/)) { 120 cache.put(event.request, networkResponse.clone()); 121 } 122 return networkResponse; 123 }); 124 return response || fetchPromise; 125 }); 126 }), 127 ); 128 } catch (e) { 129 return; 130 } 131});
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.