PageSourceSearch

https://www.aig.com.cn/etc.clientlibs/core/wcm/components/commons/site/clientlibs/imageDynamicMedia.min.js

js aig.com.cn collected 2026-10-07 19:38:29 UTC 1,813 bytes, 4 lines download raw bytes

1(function(l){window.CMP=window.CMP||{};window.CMP.image=window.CMP.image||{};window.CMP.image.dynamicMedia=function(){function g(b,a){for(var c=b.length,d=0;d<c-1&&b[d]<a;)d++;return void 0!==b[d]?b[d].toString():a}var f={},m=window.devicePixelRatio||1,h=function(b){var a=new XMLHttpRequest;b=b.split("{.width}")[0]+"?req\x3dset,json";a.open("GET",b,!1);a.onload=function(){if(200<=a.status&&400>a.status){var c=new RegExp(/^{[\s\S]*}$/gmi),d=(new RegExp(/^(?:\/\*jsonp\*\/)?\s*([^()]+)\(([\s\S]+),\s*"[0-9]*"\);?$/gmi)).exec(a.responseText),
2e;d&&(d=d[2],c.test(d)&&(e=JSON.parse(d)));if(e&&e.set.relation&&0<e.set.relation.length)for(c=0;c<e.set.relation.length;c++)f[parseInt(e.set.relation[c].userdata.SmartCropWidth)]=":"+e.set.relation[c].userdata.SmartCropDef}};a.send();return f},k=function(b,a){for(var c=b.offsetWidth;20>c&&a&&!b._autoWidth;)c=a.offsetWidth,a=a.parentNode;return c};return{getAutoSmartCrops:h,getSrcSet:function(b,a){if(0<Object.keys(a).length){var c=[];for(var d in f)c.push(b.replace("{.width}",a[d])+" "+d+"w")}return c.join(",")},
3getSrc:function(b,a){-1<b.indexOf("{.width}")&&(b=b.replace("{.width}",a));return b},setDMAttributes:function(b,a){var c=a.src.replace("dpr\x3doff","dpr\x3don,{dpr}");c=c.replace("{dpr}",m);var d={};"SmartCrop:Auto"===a.smartcroprendition&&(d=h(c));if(a.widths&&0<a.widths.length||0<Object.keys(d).length){var e=b.querySelector("img");b=k(b,b.parentNode);"SmartCrop:Auto"===a.smartcroprendition?(e.setAttribute("srcset",CMP.image.dynamicMedia.getSrcSet(c,d)),a=g(Object.keys(d,b)),e.setAttribute("src",
4CMP.image.dynamicMedia.getSrc(c,d[a]))):(a=g(a.widths,b),e.setAttribute("src",CMP.image.dynamicMedia.getSrc(c,a)))}},getWidth:k}}();l.dispatchEvent(new CustomEvent("core.wcm.components.commons.site.image.dynamic-media.loaded"))})(window.document);

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.