PageSourceSearch

https://www.mammern.ch/compiled/index/js/imagemap-npm.8581d35dcc81ca1cc7ef.js

js mammern.ch collected 2026-10-02 21:25:48 UTC 2,082 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkCMS=self.webpackChunkCMS||[]).push([[418],{16934:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(19755),a=n.n(r);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i="load",u="usemap",c="coords",d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selector=t instanceof Array?t:document.querySelectorAll(t),"complete"!==document.readyState?window.addEventListener(i,this.update.bind(this)):this.update(),window.addEventListener("resize",this.debounce(this.update,n).bind(this))}var t,n,r;return t=e,n=[{key:"update",value:function(){for(var e=this.selector,t=0;t<e.length;t++){var n=e[t];if(void 0===n.getAttribute(u))return;var r=n.cloneNode();r.addEventListener(i,this.handleImageLoad(n.offsetWidth,n.offsetHeight)),r.src=n.src}}},{key:"debounce",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];window.clearTimeout(t),t=window.setTimeout((function(t){return e.apply(t,o)}),r,n)}}},{key:"handleImageLoad",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r){for(var a=r.target.width,o=r.target.height,i=t/100,d=n/100,s=r.target.getAttribute(u).replace(/^#/,""),l=document.querySelectorAll(e.genAreaSelector(s)),f=function(e){var t=l[e],n=(t.dataset.coords=t.dataset.coords||t.getAttribute(c)).split(","),r=n.map((function(e,t){return Number(t%2==0?n[t]/a*100*i:n[t]/o*100*d)}));t.setAttribute(c,r.toString())},h=0;h<l.length;h++)f(h)}}}],r=[{key:"genAreaSelector",value:function(e){return'map[name="'.concat(e,'"] area')}}],n&&o(t.prototype,n),r&&o(t,r),e}();function s(e,t){return new d(e,t)}void 0!==a()&&a().fn&&(a().fn.imageMap=function(e){return new d(this.toArray(),e)}),s.VERSION="1.1.7";const l=s}}]);

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.