PageSourceSearch

https://www.shannons.com.au/etc.clientlibs/core/wcm/components/ima…-229bd0100d6215b69b6a5534e4889492-lc.min.js

js shannons.com.au collected 2026-09-24 18:11:59 UTC 9,536 bytes, 22 lines download raw bytes

1'use strict';window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(g){g=(this.document||this.ownerDocument).querySelectorAll(g);var b=this,f;do for(f=g.length;0<=--f&&g.item(f)!==b;);while(0>f&&(b=b.parentElement));return b});
2window.Element&&!Element.prototype.matches&&(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(g){g=(this.document||this.ownerDocument).querySelectorAll(g);for(var b=g.length;0<=--b&&g.item(b)!==this;);return-1<b});
3Object.assign||(Object.assign=function(g,b){if(null===g)throw new TypeError("Cannot convert undefined or null to object");for(var f=Object(g),k=1;k<arguments.length;k++){var c=arguments[k];if(null!==c)for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(f[h]=c[h])}return f});
4(function(g){g.forEach(function(b){Object.prototype.hasOwnProperty.call(b,"remove")||Object.defineProperty(b,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype]);
5(function(g){window.CMP=window.CMP||{};window.CMP.utils=function(){return{readData:function(b,f){b=b.dataset;var g=[];f=f.charAt(0).toUpperCase()+f.slice(1);f=["is","hook"+f];for(var c in b)if(Object.prototype.hasOwnProperty.call(b,c)){var h=b[c];0===c.indexOf("cmp")&&(c=c.slice(3),c=c.charAt(0).toLowerCase()+c.substring(1),-1===f.indexOf(c)&&(g[c]=h))}return g},setupProperties:function(b,f){var g={},c;for(c in f)if(Object.prototype.hasOwnProperty.call(f,c)){var h=f[c];g[c]=b&&null!=b[c]?h&&"function"===
6typeof h.transform?h.transform(b[c]):b[c]:f[c]["default"]}return g}}}()})(window.document);
7(function(g){window.CMP=window.CMP||{};window.CMP.image=window.CMP.image||{};window.CMP.image.dynamicMedia=function(){function b(a,e){for(var b=a.length,c=0;c<b-1&&a[c]<e;)c++;return void 0!==a[c]?a[c].toString():e}var f={},g=window.devicePixelRatio||1,c=function(a){var e=new XMLHttpRequest;a=a.split("{.width}")[0]+"?req\x3dset,json";e.open("GET",a,!1);e.onload=function(){if(200<=e.status&&400>e.status){var a=new RegExp(/^{[\s\S]*}$/gmi),b=(new RegExp(/^(?:\/\*jsonp\*\/)?\s*([^()]+)\(([\s\S]+),\s*"[0-9]*"\);?$/gmi)).exec(e.responseText),
8c;b&&(b=b[2],a.test(b)&&(c=JSON.parse(b)));if(c&&c.set.relation&&0<c.set.relation.length)for(a=0;a<c.set.relation.length;a++)f[parseInt(c.set.relation[a].userdata.SmartCropWidth)]=":"+c.set.relation[a].userdata.SmartCropDef}};e.send();return f},h=function(a,c){for(var b=a.offsetWidth;20>b&&c&&!a._autoWidth;)b=c.offsetWidth,c=c.parentNode;return b};return{getAutoSmartCrops:c,getSrcSet:function(a,c){if(0<Object.keys(c).length){var b=[];for(var e in f)b.push(a.replace("{.width}",c[e])+" "+e+"w")}return b.join(",")},
9getSrc:function(a,c){-1<a.indexOf("{.width}")&&(a=a.replace("{.width}",c));return a},setDMAttributes:function(a,e){var f=e.src.replace("dpr\x3doff","dpr\x3don,{dpr}");f=f.replace("{dpr}",g);var l={};"SmartCrop:Auto"===e.smartcroprendition&&(l=c(f));if(e.widths&&0<e.widths.length||0<Object.keys(l).length){var m=a.querySelector("img");a=h(a,a.parentNode);"SmartCrop:Auto"===e.smartcroprendition?(m.setAttribute("srcset",CMP.image.dynamicMedia.getSrcSet(f,l)),e=b(Object.keys(l,a)),m.setAttribute("src",
10CMP.image.dynamicMedia.getSrc(f,l[e]))):(e=b(e.widths,a),m.setAttribute("src",CMP.image.dynamicMedia.getSrc(f,e)))}},getWidth:h}}();g.dispatchEvent(new CustomEvent("core.wcm.components.commons.site.image.dynamic-media.loaded"))})(window.document);
11(function(){function g(a){function e(a){a.element.removeAttribute("data-cmp-is");a.options.src&&0<=a.options.src.indexOf("width\x3d{width}")&&(q=!0,p="width\x3d{width}");d._properties=CMP.utils.setupProperties(a.options,k);u(a.element);a.options.src&&Object.prototype.hasOwnProperty.call(a.options,"dmimage")&&"SmartCrop:Auto"===a.options.smartcroprendition&&(n=CMP.image.dynamicMedia.getAutoSmartCrops(a.options.src));d._elements.noscript&&(d._elements.container=d._elements.link?d._elements.link:d._elements.self,
12v(),d._properties.lazy&&m(),d._elements.map&&d._elements.image.addEventListener("load",
12w),window.addEventListener("resize",x),"focus click load transitionend animationend scroll".split(" ").forEach(function(a){document.addEventListener(a,d.update)}),d._elements.image.addEventListener("cmp-image-redraw",d.update),d._interSectionObserver=new IntersectionObserver(function(a,c){a.forEach(function(a){0<a.intersectionRatio&&d.update()})}),d._interSectionObserver.observe(d._elements.self),d.update())}function g(){var a=
13d._properties.widths&&0<d._properties.widths.length||0<Object.keys(n).length;if(0<Object.keys(n).length){var b=h(Object.keys(n),!1);b=n[b]}else b=a?(d._properties.dmimage?"":".")+h(d._properties.widths,!0):"";q&&(b=""!==b?"width\x3d"+b.substring(1):"");b=d._properties.src.replace(p,b);b=b.replace("{dpr}",c);var f=d._elements.image.getAttribute("src");if(b!==f)if(null===f||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"===f)d._elements.image.setAttribute("src",b);else{var e=
14d._properties.src.split(p),g=f.startsWith(e[0]);g&&1<e.length&&(g=f.endsWith(e[e.length-1]));g&&(d._elements.image.setAttribute("src",b),a||window.removeEventListener("scroll",d.update))}d._lazyLoaderShowing&&d._elements.image.addEventListener("load",r);d._interSectionObserver.unobserve(d._elements.self)}function h(a,b){for(var f=d._elements.self,e=f.clientWidth;0===e&&f.parentNode;)f=f.parentNode,e=f.clientWidth;b=e*(b?c:1);f=a.length;for(e=0;e<f-1&&a[e]<b;)e++;return a[e].toString()}function m(){var a=
15d._elements.image.getAttribute("width"),b=d._elements.image.getAttribute("height");if(a&&b){var c=f.style;c["padding-bottom"]=b/a*100+"%";for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(d._elements.image.style[e]=c[e])}d._elements.image.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");d._elements.image.classList.add(f.cssClass);d._lazyLoaderShowing=!0}function v(){var a=d._elements.noscript.textContent.trim();a=a.replace(/&(amp;)*lt;/g,
16"\x3c");a=a.replace(/&(amp;)*gt;/g,"\x3e");a=(new DOMParser).parseFromString(a,"text/html");var c=a.querySelector(b.image);c.removeAttribute("src");d._elements.container.insertBefore(c,d._elements.noscript);(a=a.querySelector(b.map))&&d._elements.container.insertBefore(a,d._elements.noscript);d._elements.noscript.parentNode.removeChild(d._elements.noscript);d._elements.container.matches(b.image)?d._elements.image=d._elements.container:d._elements.image=d._elements.container.querySelector(b.image);
17d._elements.map=d._elements.container.querySelector(b.map);d._elements.areas=d._elements.container.querySelectorAll(b.area)}function r(){d._elements.image.classList.remove(f.cssClass);for(var a in f.style)Object.prototype.hasOwnProperty.call(f.style,a)&&(d._elements.image.style[a]="");d._elements.image.removeEventListener("load",r);d._lazyLoaderShowing=!1}function t(){if(d._elements.areas&&0<d._elements.areas.length)for(var a=0;a<d._elements.areas.length;a++){var b=d._elements.image.width,c=d._elements.image.height;
18if(b&&c){var e=d._elements.areas[a].dataset.cmpRelcoords;if(e){e=e.split(",");for(var f=Array(e.length),g=0;g<f.length;g++)f[g]=0===g%2?parseInt(e[g]*b):parseInt(e[g]*c);d._elements.areas[a].coords=f}}}}function u(a){d._elements={};d._elements.self=a;a=d._elements.self.querySelectorAll("[data-cmp-hook-image]");for(var b=0;b<a.length;b++){var c=a[b],e="image";e=e.charAt(0).toUpperCase()+e.slice(1);d._elements[c.dataset["cmpHook"+e]]=c}}function x(){d.update();t()}function w(){t()}var d=this,n={},q=
19!1,p="{.width}";d.update=function(){if(d._properties.lazy){if(null===d._elements.container.offsetParent)var a=!1;else{a=window.pageYOffset;var b=a+document.documentElement.clientHeight,c=d._elements.container.getBoundingClientRect().top+a;a=c+d._elements.container.clientHeight>=a-d._properties.lazythreshold&&c<=b+d._properties.lazythreshold}a&&g()}else g()};a&&a.element&&e(a)}var b={self:'[data-cmp-is\x3d"image"]',image:'[data-cmp-hook-image\x3d"image"]',map:'[data-cmp-hook-image\x3d"map"]',area:'[data-cmp-hook-image\x3d"area"]'},
20f={cssClass:"cmp-image__image--is-loading",style:{height:0,"padding-bottom":""}},k={widths:{"default":[],transform:function(a){var b=[];a.split(",").forEach(function(a){a=parseFloat(a);isNaN(a)||b.push(a)});return b}},lazy:{"default":!1,transform:function(a){return!(null===a||"undefined"===typeof a)}},dmimage:{"default":!1,transform:function(a){return!(null===a||"undefined"===typeof a)}},lazythreshold:{"default":0,transform:function(a){a=parseInt(a);return isNaN(a)?0:a}},src:{transform:function(a){return decodeURIComponent(a)}}},
21c=window.devicePixelRatio||1,h="loading"!==document.readyState?Promise.resolve():new Promise(function(a){document.addEventListener("DOMContentLoaded",a)});
21Promise.all([h]).then(function(){for(var a=document.querySelectorAll(b.self),c=0;c<a.length;c++)new g({element:a[c],options:CMP.utils.readData(a[c],"image")});a=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;c=document.querySelector("body");(new a(function(a){a.forEach(function(a){a=[].slice.call(a.addedNodes);
220<a.length&&a.forEach(function(a){a.querySelectorAll&&[].slice.call(a.querySelectorAll(b.self)).forEach(function(a){new g({element:a,options:CMP.utils.readData(a,"image")})})})})})).observe(c,{subtree:!0,childList:!0,characterData:!0})})})();

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.