PageSourceSearch

https://www.cantref.com/app/brands/default/5056.1c4bb3b80be448cf7935.js

js cantref.com collected 2026-09-29 02:39:42 UTC 38,939 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkloop_web=globalThis.webpackChunkloop_web||[]).push([[204,5056],{204(t,e,a){a.r(e),a.d(e,{keyboardControl:()=>s});const s={active:!1};let i=null;const r=t=>{clearTimeout(i),i=setTimeout(()=>{document.body.classList.toggle("keyboard-control",t),s.active=t},100)};document.body.addEventListener("keydown",function(t){switch(t.key){case"Escape":case"Up":case"ArrowUp":case"Down":case"ArrowDown":case"Left":case"ArrowLeft":case"Tab":case"Right":case"ArrowRight":case"PageUp":case"PageDown":case"Spacebar":case" ":case"Enter":case"Return":r(!0)}}),document.body.addEventListener("mousedown",function(){r(!1)}),document.body.addEventListener("touchstart",function(){r(!1)})},5056(t,e,a){a.r(e),a.d(e,{createFrom:()=>c});var s=a(7819),i=a.n(s),r=a(204),n=a(3223);const h=t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,o=(t,e,a,s)=>{let i=Math.abs(t-a),r=Math.abs(e-s);return Math.sqrt(i*i+r*r)},l=(t,e,a)=>Math.min(Math.max(t,e),a);class p{constructor(t){this.wrapper=t,this.id=t.id,this.parentWrapper=t.parentNode,this.interactions=!1,this.redrawTimestamp=Date.now();let e=this;this.hunt=new(i())(this.parentWrapper,{enter:function(){e.init()}}),window.dispatchEvent(new Event("scroll"))}createSmallerArtwork(t,e){this.halfSizeImageCanvas.width=Math.floor(this.mapArtwork.width/2),this.halfSizeImageCanvas.height=Math.floor(this.mapArtwork.height/2),this.halfSizeImageCanvasCtx.clearRect(0,0,this.halfSizeImageCanvas.width,this.halfSizeImageCanvas.height),this.halfSizeImageCanvasCtx.drawImage(e,0,0,this.halfSizeImageCanvas.width,this.halfSizeImageCanvas.height),createImageBitmap(this.halfSizeImageCanvas).then(e=>{this.mapLayers.layers[t].halfSizeImage=e,this.halfSizeImageCanvas.width=0,this.halfSizeImageCanvas.height=0}),this.quarterSizeImageCanvas.width=Math.floor(this.mapArtwork.width/4),this.quarterSizeImageCanvas.height=Math.floor(this.mapArtwork.height/4),this.quarterSizeImageCanvasCtx.clearRect(0,0,this.quarterSizeImageCanvas.width,this.quarterSizeImageCanvas.height),this.quarterSizeImageCanvasCtx.drawImage(e,0,0,this.quarterSizeImageCanvas.width,this.quarterSizeImageCanvas.height),createImageBitmap(this.quarterSizeImageCanvas).then(e=>{this.mapLayers.layers[t].quarterSizeImage=e,this.quarterSizeImageCanvas.width=0,this.quarterSizeImageCanvas.height=0})}init(){this.expanded=!1,this.wrapperWidth=0,this.wrapperHeight=0,this.lastInputX=0,this.lastInputY=0,this.wrapperFocusX=0,this.wrapperFocusY=0,this.animatedMove={active:!1},this.wrapper.removeAttribute("hidden"),this.interactions=!0;let t=null,e=this.parentWrapper;for(;e!=document.body&&null==t;){for(let a=0,s=e.classList.length;a<s;a++)if(0==e.classList[a].indexOf("theme--")){t=e.classList[a];break}t||(e=e.parentNode)}null!=t&&this.wrapper.classList.add(t);let a=this.wrapper.dataset.w,s=this.wrapper.dataset.h,i=this.wrapper.dataset.threshold,r=this.wrapper.dataset.startId,h=this.wrapper.dataset.startLayerId,p=this.wrapper.dataset.startTourId;if(""!=a&&""!=s){this.mapStage=this.wrapper.querySelector(".interactive-map--map-stage"),this.mapWidth=0,this.mapHeight=0,this.mapSearch=null,this.touches=null,this.mapArtwork={el:this.wrapper.querySelector(".interactive-map--artwork"),top:0,left:0,width:parseInt(a),height:parseInt(s),ratio:parseInt(a)/parseInt(s)},this.pixelDensity=1;let t=1.4,e=window.devicePixelRatio;this.pixelDensity=e>0?e>t?t:e:1,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.style.width=this.wrapper.offsetWidth+"px",this.canvas.style.height=this.wrapper.offsetHeight+"px",this.canvas.width=this.wrapper.offsetWidth*this.pixelDensity,this.canvas.height=this.wrapper.offsetHeight*this.pixelDensity,this.wrapper.appendChild(this.canvas),this.halfSizeImageCanvas=document.createElement("canvas"),this.halfSizeImageCanvasCtx=this.halfSizeImageCanvas.getContext("2d"),this.quarterSizeImageCanvas=document.createElement("canvas"),this.quarterSizeImageCanvasCtx=this.quarterSizeImageCanvas.getContext("2d"),this.mapAnnotations={el:this.mapArtwork.el.querySelector(".interactive-map--annotations"),threshold:parseFloat(i),visible:!1,scale:1},this.mapOverlay={el:this.wrapper.querySelector(".interactive-map--overlay"),active:!1,contentId:null,contentContainer:this.wrapper.querySelector(".interactive-map--overlay-content--inner"),closeBtn:this.wrapper.querySelector("button.interactive-map--overlay-content--close"),instructions:this.wrapper.querySelector(`.interactive-map--overlay #${this.id}--instructions`)},this.mapLayers={layers:[],selectionActive:!1,multipleSolidLayers:this.mapArtwork.el.querySelectorAll('.interactive-map--artwork--layer[data-solid-layer="true"]').length>1},this.tours=null;
1let c=this.wrapper.querySelectorAll(".interactive-map--tour");c.length>0&&(this.tours={selectionActive:!1,data:[],controls:this.wrapper.querySelector(".interactive-map--tour-controls"),controlsTitle:this.wrapper.querySelector(".interactive-map--tour-controls--title"),controlsStage:this.wrapper.querySelector(".interactive-map--tour-controls--stage"),prevButton:this.wrapper.querySelector(".interactive-map--tour-controls--prev"),nextButton:this.wrapper.querySelector(".interactive-map--tour-controls--next"),endButton:this.wrapper.querySelector(".interactive-map--tour-controls--end-tour"),activeTourIndex:0,activeStageIndex:0},this.wrapper.classList.add("with-tours"),this.tours.prevButton.onclick=()=>{this.interactions&&this.prevTourStage()},this.tours.nextButton.onclick=()=>{this.interactions&&this.nextTourStage()},this.tours.endButton.onclick=()=>{this.interactions&&this.endTour()},c.forEach((t,e)=>{this.tours.data[e]={id:t.dataset.tourId,title:t.dataset.tourTitle,intro:t.querySelector(".interactive-map--tour--introduction"),finish:t.querySelector(".interactive-map--tour--finish"),stages:[]};let a=t.querySelector(".interactive-map--tour--introduction");null!=a&&this.tours.data[e].stages.push({content:a.innerHTML,isIntro:!0,isFinish:!1});let s=t.querySelectorAll(".interactive-map--tour--stage");s.length>0&&s.forEach(t=>{let a="";a=t.classList.contains("custom-content")?t.innerHTML:this.mapOverlay.el.querySelector(`#${t.dataset.contentId}`).innerHTML,this.tours.data[e].stages.push({content:a,isIntro:!1,isFinish:!1,targetAnnotationEl:this.mapAnnotations.el.querySelector(`button[data-content-id="${t.dataset.contentId}"]`).parentNode})});let i=t.querySelector(".interactive-map--tour--finish");null!=i&&this.tours.data[e].stages.push({content:i.innerHTML,isIntro:!1,isFinish:!0})})),this.mapMinScale=0,this.mapScale=1,this.mapX=0,this.mapY=0,this.mapMoved=!1,this.mapFocusX=.5,this.mapFocusY=.5,this.redrawRequested=!1,this.mouse={down:!1,prevX:0,prevY:0},this.touch={active:!1,one_prevX:0,one_prevY:0,initDistance:0,initMapScale:0},this.mapArtwork.el.style.width=this.mapArtwork.width+"px",this.mapArtwork.el.style.height=this.mapArtwork.height+"px",this.resize(this.wrapper.offsetWidth,this.wrapper.offsetHeight),this.ro=new ResizeObserver(t=>{for(let e of t){const t=e.contentRect;let a=Math.ceil(t.width),s=Math.ceil(t.height);this.wrapperWidth==a&&this.wrapperHeight==s||this.resize(a,s)}}),this.ro.observe(this.wrapper),this.changeScale(this.mapMinScale),this.wrapper.addEventListener("mousemove",t=>{this.interactions&&(this.lastInputX=t.clientX,this.lastInputY=t.clientY,this.setFocusPoint())}),this.mapStage.addEventListener("mousewheel",t=>{if(this.interactions){t.preventDefault(),t.stopPropagation();let e=this.mapScale+t.wheelDelta/2e3;e=l(e,this.mapMinScale,1),e!=this.mapScale&&this.changeScale(e)}}),this.mapStage.addEventListener("mousedown",t=>{this.interactions&&(this.mapLayers.selectionActive&&this.toggleLayerList(!0),t.preventDefault(),this.mapMoved=!1,0==t.button&&(this.mouse.down=!0,this.mouse.prevX=t.clientX,this.mouse.prevY=t.clientY))}),document.addEventListener("mouseup",t=>{this.interactions&&(this.mouse.down=!1,clearTimeout(this.mapControls.repeatTimeout),this.resetMapControls())}),document.addEventListener("mousemove",t=>{this.interactions&&this.mouse.down&&this.mapScale>this.mapMinScale&&(t.preventDefault(),this.drag(t.clientX-this.mouse.prevX,t.clientY-this.mouse.prevY),this.mouse.prevX=t.clientX,this.mouse.prevY=t.clientY)}),this.mapStage.addEventListener("touchstart",t=>{this.interactions&&(this.mapLayers.selectionActive&&this.toggleLayerList(!0),this.mapMoved=!1,1==t.touches.length?(this.getAdjustedTouches(t),this.touch.active=!0,this.touch.one_prevX=this.touches[0].x,this.touch.one_prevY=this.touches[0].y):2==t.touches.length&&(this.getAdjustedTouches(t),this.touch.active=!0,this.touch.initDistance=o(this.touches[0].x,this.touches[0].y,this.touches[1].x,this.touches[1].y),this.touch.initMapScale=this.mapScale+0))}),this.mapStage.addEventListener("touchmove",t=>{if(this.interactions&&this.touch.active)if(t.preventDefault(),1==t.touches.length&&this.mapScale>this.mapMinScale)this.getAdjustedTouches(t),this.drag(this.touches[0].x-this.touch.one_prevX,this.touches[0].y-this.touch.one_prevY),this.touch.one_prevX=this.touches[0].x,this.touch.one_prevY=this.touches[0].y;else if(2==t.touches.length){this.getAdjustedTouches(t),this.lastInputX=(this.touches[0].x+this.touches[1].x)/2,this.lastInputY=(this.touches[0].y+this.touches[1].y)/2,this.setFocusPoint();let e=o(this.touches[0].x,this.touches[0].y,this.touches[1].x,this.touches[1].y),a=this.touch.initMapScale*(e/this.touch.initDistance);a=l(a,this.mapMinScale,1),a!=this.mapScale&&this.changeScale(a)}}),document.addEventListener("touchend",()=>{this.interactions&&(this.touch.active=!1,clearTimeout(this.mapControl
1s.repeatTimeout),this.resetMapControls())}),this.mapArtwork.el.querySelectorAll(".interactive-map--artwork--layer").forEach((t,e)=>{let a=t.dataset.layerId,s=parseFloat(t.dataset.layerIndex),i=null!=this.mapAnnotations.el?this.mapAnnotations.el.querySelector(`.interactive-map--annotations--layer[data-layer-id="${a}"]`):null;this.mapLayers.layers[e]={enabled:"true"==t.dataset.enabledAtStart,layerId:a,layerIndex:s,layerTitle:t.dataset.layerTitle,solidLayer:!1,subLayer:!1,artwork:t,img:null,imgLoaded:!1,annotations:i,annotationsItems:[]};let r=t.dataset.imgSrc;if(void 0!==r&&(this.mapLayers.layers[e].img=new Image,this.mapLayers.layers[e].img.src=r,this.mapLayers.layers[e].img.complete?(this.mapLayers.layers[e].imgLoaded=!0,this.createSmallerArtwork(e,this.mapLayers.layers[e].img)):this.mapLayers.layers[e].img.onload=()=>{this.mapLayers.layers[e].imgLoaded=!0,this.createSmallerArtwork(e,this.mapLayers.layers[e].img),this.requestRedraw()}),void 0!==t.dataset.solidLayer&&(this.mapLayers.layers[e].solidLayer=!0),void 0!==t.dataset.subLayerParentIndex&&(this.mapLayers.layers[e].subLayer=!0,this.mapLayers.layers[e].subLayerParentIndex=parseInt(t.dataset.subLayerParentIndex)),null!=this.mapLayers.layers[e].annotations){let t=this.mapLayers.layers[e].annotations.querySelectorAll("li");null!=t&&t.forEach(t=>{let a=t.dataset.x,i=t.dataset.y;t.style.left=`${a}%`,t.style.top=`${i}%`;let r=t.querySelector("button");this.mapLayers.layers[e].annotationsItems.push({layerIndex:s,el:t,x:a,y:i,text:t.dataset.searchTitle,searchText:t.dataset.searchTitle.toLowerCase(),searchKeywords:t.dataset.searchKeywords.toLowerCase().split(","),button:r,buttonTargetContentId:null!=r?r.dataset.contentId:null})}),this.mapLayers.layers[e].annotationsItemsCount=this.mapLayers.layers[e].annotationsItems.length}});let m=this.mapAnnotations.el.querySelectorAll("button");if(m.length>0&&m.forEach(t=>{(t=>{let e=(0,n.D4)(t.innerHTML).length,a=t.innerHTML.split(" ");if(a.length>1){let s=0,i=a.length>2?14:18,r="<span>";a.forEach(t=>{if((t=(0,n.D4)(t)).length>0&&" "!=t){let a=t.trim().length,h=!1;s+1+a>i&&(h=!0),e>i&&e-(s+1)<s&&(h=!0),h?(r+=`${s>0?"</span> <span>":""}${(0,n.lF)(t)}`,s=a):(r+=`${s>0?" ":""}${(0,n.lF)(t)}`,s+=(s>0?1:0)+a)}}),r+="</span>",t.innerHTML=r}})(t),t.onclick=()=>{this.interactions&&this.mapAnnotations.visible&&!this.mapMoved&&this.showContent(t.dataset.contentId)}}),this.mapOverlay.closeBtn.onclick=()=>{this.interactions&&this.mapOverlay.active&&this.hideContent()},this.mapControls={pressing:!1,initPressDelay:!0,repeatTimeout:null,zoomIn:this.wrapper.querySelector(".interactive-map--controls--zoom--in"),zoomOut:this.wrapper.querySelector(".interactive-map--controls--zoom--out"),expand:this.wrapper.querySelector(".interactive-map--controls--expand"),mapDown:this.wrapper.querySelector(".interactive-map--controls--move--down"),mapUp:this.wrapper.querySelector(".interactive-map--controls--move--up"),mapRight:this.wrapper.querySelector(".interactive-map--controls--move--right"),mapLeft:this.wrapper.querySelector(".interactive-map--controls--move--left")},this.controlListeners(this.mapControls.zoomIn,"zoomIn"),this.controlListeners(this.mapControls.zoomOut,"zoomOut"),this.controlListeners(this.mapControls.expand,"expand"),this.controlListeners(this.mapControls.mapDown,"mapDown"),this.controlListeners(this.mapControls.mapUp,"mapUp"),this.controlListeners(this.mapControls.mapRight,"mapRight"),this.controlListeners(this.mapControls.mapLeft,"mapLeft"),this.updateNavControls(),null!=this.mapOverlay.instructions&&this.showContent(`${this.id}--instructions`),this.controlsWrapper=this.wrapper.querySelector(".interactive-map--controls"),this.mapLayers.layers.length>1&&(this.mapLayers.selectButton=document.createElement("BUTTON"),this.mapLayers.selectButton.classList.add("interactive-map--controls--layers-selection","map-control-btn"),this.mapLayers.selectButton.setAttribute("type","button"),this.mapLayers.selectButton.setAttribute("title","Layers selection"),this.mapLayers.selectButton.setAttribute("aria-controls",`${this.id}--layers-list`),this.mapLayers.selectButton.innerHTML='<span class="visually-hidden">Layers selection</span><i aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M288 0c-8.5 0-17 1.7-24.8 5.1L53.9 94.8C40.6 100.5 32 113.5 32 128s8.6 27.5 21.9 33.2l209.3 89.7c7.8 3.4 16.3 5.1 24.8 5.1s17-1.7 24.8-5.1l209.3-89.7c13.3-5.7 21.9-18.8 21.9-33.2s-8.6-27.5-21.9-33.2L312.8 5.1C305 1.7 296.5 0 288 0zm-5.9 49.2C284 48.4 286 48 288 48s4 .4 5.9 1.2L477.7 128 293.9 206.8c-1.9 .8-3.9 1.2-5.9 1.2s-4-.4-5.9-1.2L98.3 128 282.1 49.2zM53.9 222.8C40.6 228.5 32 241.5 32 256s8.6 27.5 21.9 33.2l209.3 89.7c7.8 3.4 16.3 5.1 24.8 5.1s17-1.7 24.8-5.1l209.3-89.7c13.3-5.7 21.9-18.8 21.9-33.2s-8.6-27.5-21.9-33.2l-31.2-13.4L430 235.5 477.7 256 293.9 334.8c-1.9 .8-3.9 1.2-5.9 1.2s-4-.4-5.9-1.2L98.3 256 146 235.5 85.1 209.4 53.9 222.8zm0 128C40.6 356.5 32 369.5 32 384s8.6 27.5 21.9 33.2l209.3 89.7c7.8 3.4 16.3 5.1 24.8 5.1s17-1.7 24.8-5.1l209.3-89.7c13.3-5.7 21.9-18.8 21.9-33.2s-8.6-27.5-21.9-33.2l-31.2-13.4L430 363.5 477.7 384 293.9 462.8c-1.9 .8-3.9 1.2-5.9 1.2s-4-.4-5.9-1.2L98.3 384 146 363.5 85.1 337.4 53.9 350.8z"/></svg></i>',this.mapLayers.selectButton.onclick=()=>{this.interactions&&this.toggleLayerList()},this.controlsWrapper.appendChild(this.mapLayers.selectButton),this.mapLayers.selectList=document.createElement("DIV"),this.mapLayers.selectList.setAttribute("id",`${this.id}--layers-list`),this.mapLayers.selectList.classList.add("interactive-map--controls--layers-list"),this.mapLayers.multipleSolidLayers&&this.mapLayers.selectList.classList.add("interactive-map--controls--layers-list--multi-level"),this.mapLayers.selectList.setAttribute("aria-hidden","true"),this.mapLayers.layers.forEac
1h((t,e)=>{(this.mapLayers.multipleSolidLayers||e>0)&&(t.layerButton=document.createElement("BUTTON"),t.layerButton.setAttribute("type","button"),t.layerButton.setAttribute("title",t.layerTitle),t.layerButton.setAttribute("aria-controls",`${this.id}`),t.layerButton.setAttribute("data-layer-index",`${t.layerIndex}`),t.layerButton.innerHTML=`${this.mapLayers.multipleSolidLayers&&t.subLayer?'<span class="sub-layer-indent" aria-hidden="true"></span>':""}<span class="indicator" aria-hidden="true"></span><span>${t.layerTitle}</span>`,this.mapLayers.multipleSolidLayers&&t.solidLayer&&t.layerButton.classList.add("solid-layer"),this.mapLayers.multipleSolidLayers&&t.subLayer&&t.layerButton.classList.add("sub-layer"),t.enabled&&t.layerButton.classList.add("enabled"),t.layerButton.onclick=()=>{this.interactions&&this.toggleLayer(t.layerIndex)},this.mapLayers.selectList.appendChild(t.layerButton))}),this.controlsWrapper.appendChild(this.mapLayers.selectList)),this.tours&&(this.tours.selectButton=document.createElement("BUTTON"),this.tours.selectButton.classList.add("interactive-map--controls--tours-selection","map-control-btn"),this.tours.selectButton.setAttribute("type","button"),this.tours.selectButton.setAttribute("title","Tours selection"),this.tours.selectButton.setAttribute("aria-controls",`${this.id}--tours-list`),this.tours.selectButton.innerHTML='<span class="visually-hidden">Tours selection</span><i aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M111 7c9.4-9.4 24.6-9.4 33.9 0l88 88c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47L152 360c0 39.8 32.2 72 72 72s72-32.2 72-72l0-208c0-66.3 53.7-120 120-120s120 53.7 120 120l0 278.1 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-88 88c-9.4 9.4-24.6 9.4-33.9 0l-88-88c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L488 152c0-39.8-32.2-72-72-72s-72 32.2-72 72l0 208c0 66.3-53.7 120-120 120s-120-53.7-120-120l0-278.1L57 129c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L111 7z"/></svg></i>',this.tours.selectButton.onclick=()=>{this.interactions&&this.toggleToursList()},this.controlsWrapper.appendChild(this.tours.selectButton),this.tours.selectList=document.createElement("DIV"),this.tours.selectList.setAttribute("id",`${this.id}--tours-list`),this.tours.selectList.classList.add("interactive-map--controls--tours-list"),this.tours.selectList.setAttribute("aria-hidden","true"),this.tours.data.forEach((t,e)=>{let a=e;t.tourButton=document.createElement("BUTTON"),t.tourButton.setAttribute("type","button"),t.tourButton.setAttribute("title",t.title),t.tourButton.setAttribute("data-tour-index",`${a}`),t.tourButton.innerHTML=`<span>${t.title}</span>`,t.tourButton.onclick=()=>{this.interactions&&this.startTour(a)},this.tours.selectList.appendChild(t.tourButton)}),this.controlsWrapper.appendChild(this.tours.selectList)),null!=r||null!=h||null!=p)if(null!=r){let t=this.mapAnnotations.el.querySelector(`button[data-content-id="${r}"]`);null!=t&&this.focusOnAnnotation(t.parentNode)}else if(null!=p&&null!=this.tours){let t=-1;this.tours.data.forEach((e,a)=>{e.id==p&&(t=a)}),t>-1&&this.tours.selectList.querySelector(`button[data-tour-index="${t}"]`).click()}else if(null!=h){let t=this.mapArtwork.el.querySelector(`.interactive-map--artwork--layer[data-layer-id="${h}"]`);null!=t&&this.mapLayers.selectList.querySelector(`button[data-layer-index="${t.dataset.layerIndex}"]`).click()}if(this.searchSystem=this.wrapper.classList.contains("with-search"),this.searchSystem){this.mapSearch={panelActive:!1,watch:null,prevSearchText:null,searchAnnotations:[],searchResults:null},this.mapSearch.openButton=document.createElement("BUTTON"),this.mapSearch.openButton.classList.add("interactive-map--controls--search--open","map-control-btn"),this.mapSearch.openButton.setAttribute("type","button"),this.mapSearch.openButton.setAttribute("title","Open search"),this.mapSearch.openButton.setAttribute("aria-controls",`${this.id}--search-panel`),this.mapSearch.openButton.innerHTML='<span class="visually-hidden">Open search</span><i aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path title="Open search" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg></i>',this.controlsWrapper.appendChild(this.mapSearch.openButton),this.mapSearch.panel=document.createElement("DIV"),this.mapSearch.panel.classList.add("interactive-map--controls--search--panel"),this.mapSearch.panel.setAttribute("id",`${this.id}--search-panel`),this.mapSearch.panel.setAttribute("aria-hidden","true");let t=`<div class="interactive-map--controls--search--panel--top"><label for="${this.id}--search-panel--input">Search</label>`;t+=`<input class="form-control" maxLength="50" id="${this.id}--search-panel--input" placeHolder="Search for..." type="search" value="" autocomplete="off" spellcheck="false" autocorrect="off" tabindex="-1" /></div>`,this.mapSearch.panel.innerHTML=t,this.controlsWrapper.appendChild(this.mapSearch.panel),this.mapSearch.input=this.mapSearch.panel.querySelector('input[type="search"]'),this.mapSearch.results=document.createElement("DIV"),this.mapSearch.results.classList.add("interactive-map--controls--search--panel--results"),this.mapSearch.panel.appendChild(this.mapSearch.results),this.mapSearch.closeButton=document.createElement("BUTTON"),this.mapSearch.closeButton.classList.add("interactive-map--controls--search--close","btn","btn-link","p-0"),this.mapSearch.closeButton.setAttribute("type","button"),this.mapSearch.closeButton.setAttribute("title","Close search"),this.mapSearch.closeButton.setAttribute("aria-controls",`${this.id}--search-panel`),this.mapSearch.closeButton.setAttribute("tabindex","-1"),this.mapSearch.closeButton.innerHTML='<span class="visually-hidden">Close search</span><i aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path title="Close search" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg></i>',this.mapSearch.panel.appendChild(this.mapSearch.closeButton),this.mapSearch.openButton.addEventListener("click",()=>{this.interactions&&(this.mapSearch.panelActive||(this.mapLayers.selectionActive&&this.toggleLayerList(!0),this.tours&&this.tours.selectionActive&&this.toggleToursList(!0),this.mapSearch.input.removeAttribute("tabindex"),this.mapSearch.closeButton.removeAttribute("tabindex"),this.mapSearch.panel.removeAttribute("aria-hidden"),this.mapSearch.input.focus(),this.mapSearch.panelActive=!0))}),this.mapSearch.closeButton.addEventListener("click",()=>{this.interactions&&this.mapSearch.panelActive&&(this.mapSearch.panel.setAttribute("aria-hidden","true"),this.mapSearch.panelActive=!1,this.mapSearch.input.setAttribute("tabindex","-1"),this.mapSearch.closeButton.setAttribute("tabindex","-1"))}),null!=this.mapSearch.input&&(this.mapSearch.input.onfocus=()=>{this.watchSearchText(!0)},this.mapSearch.input.onblur=()=>{this.watchSearchText(!1)})}}}getAdjustedTouches(t){this.touches=[{x:t.touches[0].pageX-window.scrollX,y:t.touches[0].pageY-window.scrollY},{x:2==t.touches.length?t.touches[1].pageX-window.scrollX:null,y:2==t.touches.length?t.touches[1].pageY-window.scrollY:null}]}focusOnAnnotation(t){let e=t;if(null!=this.mapLayers.selectList){let t=e.parentNode.parentNode.dataset.layerIndex,a=this.mapLayers.selectList.querySelector(`button[data-layer-index="${t}"]`);null!=a&&(a.classList.contains("enabled")||a.click())}let a=(this.mapEdgeSpaceX+parseFloat(e.dataset.x)/100*this.mapArtwork.width)/this.mapWidth,s=(this.mapEdgeSpaceY+parseFloat(e.dataset.y)/100*this.mapArtwork.height)/this.mapHeight;this.centerMapFocus(),this.startMoveAnimation(this.mapFocusX,l(a,0,1),this.mapFocusY,l(s,0,1),this.mapScale,1,null),null==this.mapOverlay.instructions&&null!=t.button&&r.keyboardControl.active&&t.button.focus()}centerMapFocus(){this.mapFocusX=l((Math.abs(this.mapX)+.5*this.wrapperW
1idth)*(1/this.mapScale)/this.mapWidth,0,1),this.mapFocusY=l((Math.abs(this.mapY)+.5*this.wrapperHeight)*(1/this.mapScale)/this.mapHeight,0,1)}startMoveAnimation(t,e,a,s,i,r,n){this.interactions=!1,this.animatedMove={active:!0,zoomIteration:.05,zoomCompletion:this.mapScale<1?0:1,moveIteration:.02,moveCompletion:0,startX:t,endX:e,xDistance:e-t,startY:a,endY:s,yDistance:s-a,startScale:i,endScale:r,scaleDistance:r-i,callback:n},this.doMoveAnimation()}doMoveAnimation(){let t=this.animatedMove;if(this.wrapperFocusX=this.wrapperWidth/2,this.wrapperFocusY=this.wrapperHeight/2,t.moveCompletion<1){t.moveCompletion+=t.moveIteration;let e=h(t.moveCompletion),a=t.startX+t.xDistance*e,s=t.startY+t.yDistance*e;this.mapFocusX=l(a,0,1),this.mapFocusY=l(s,0,1),this.changeScale(this.mapScale)}else{t.zoomCompletion+=t.zoomIteration;let e=h(t.zoomCompletion),a=t.startScale+t.scaleDistance*e;this.changeScale(a)}window.requestAnimationFrame(()=>{t.moveCompletion>=1&&t.zoomCompletion>=1?this.endMoveAnimation():this.doMoveAnimation()})}endMoveAnimation(){let t=this.animatedMove;"function"==typeof t.callback&&t.callback(),this.animatedMove={active:!1},this.interactions=!0}controlListeners(t,e){t.addEventListener("mousedown",t=>{t.preventDefault(),this.interactions&&0==t.button&&(this.mapControls.pressing=!0,this.doMapControl(e))}),t.addEventListener("touchstart",t=>{t.preventDefault(),this.interactions&&1==t.touches.length&&(this.mapControls.pressing=!0,this.doMapControl(e))})}setFocusPoint(t=!1){if(t)this.wrapperFocusX=this.wrapperWidth/2,this.wrapperFocusY=this.wrapperHeight/2;else{let t=this.wrapper.getBoundingClientRect();this.wrapperFocusX=this.lastInputX-t.left,this.wrapperFocusY=this.lastInputY-t.top}let e=(this.wrapperFocusX-this.mapX)*(1/this.mapScale)/this.mapWidth,a=(this.wrapperFocusY-this.mapY)*(1/this.mapScale)/this.mapHeight;this.mapFocusX=l(e,0,1),this.mapFocusY=l(a,0,1)}getMinScale(){let t=this.wrapperHeight/this.mapHeight,e=this.wrapperWidth/this.mapWidth;this.mapMinScale=t<e?t:e}resize(t,e){this.wrapperWidth=t,this.wrapperHeight=e;let a=t/e;this.canvas.width=t*this.pixelDensity,this.canvas.height=e*this.pixelDensity,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this.wrapperFocusX=this.wrapperWidth/2,this.wrapperFocusY=this.wrapperHeight/2,this.lastInputX=this.wrapperFocusX,this.lastInputY=this.wrapperFocusY,a>this.mapArtwork.ratio?(this.mapHeight=this.mapArtwork.height,this.mapEdgeSpaceY=0,this.mapWidth=this.mapArtwork.height/e*t,this.mapEdgeSpaceX=(this.mapWidth-this.mapArtwork.width)/2):(this.mapWidth=this.mapArtwork.width,this.mapEdgeSpaceX=0,this.mapHeight=this.mapArtwork.width/t*e,this.mapEdgeSpaceY=(this.mapHeight-this.mapArtwork.height)/2),this.mapStage.style.width=Math.ceil(this.mapWidth)+"px",this.mapStage.style.height=Math.ceil(this.mapHeight)+"px",this.mapArtwork.top=(this.mapHeight-this.mapArtwork.height)/2,this.mapArtwork.left=(this.mapWidth-this.mapArtwork.width)/2,this.mapArtwork.el.style.top=Math.ceil(this.mapArtwork.top)+"px",this.mapArtwork.el.style.left=Math.ceil(this.mapArtwork.left)+"px";let s=(this.mapScale-this.mapMinScale)/(1-this.mapMinScale);this.getMinScale(),this.mapScale=this.mapMinScale+(1-this.mapMinScale)*s,this.moveIncrement=50,this.scaleIncrement=(1-this.mapMinScale)/20,t>0&&this.changeScale(this.mapScale)}changeScale(t){let e=this.wrapperFocusX-this.mapWidth*this.mapFocusX*t,a=this.wrapperFocusY-this.mapHeight*this.mapFocusY*t,s=(t-this.mapMinScale)/(1-this.mapMinScale);this.mapMinXlimit=0-this.mapEdgeSpaceX*s,this.mapMaxXlimit=this.wrapperWidth-this.mapWidth*t+this.mapEdgeSpaceX*s,this.mapMinYlimit=0-this.mapEdgeSpaceY*s,this.mapMaxYlimit=this.wrapperHeight-this.mapHeight*t+this.mapEdgeSpaceY*s,e=l(e,this.mapMaxXlimit,this.mapMinXlimit),a=l(a,this.mapMaxYlimit,this.mapMinYlimit),this.mapScale=t,this.mapX=e,this.mapY=a,this.mapAnnotations.scale=1/t,this.requestRedraw()}drag(t,e){this.mapMoved=!0;let a=this.mapX+t,s=this.mapY+e;this.mapX=l(a,this.mapMaxXlimit,this.mapMinXlimit),this.mapY=l(s,this.mapMaxYlimit,this.mapMinYlimit),this.setFocusPoint(),this.requestRedraw()}requestRedraw(){this.redrawRequested||(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this.redraw()}))}redraw(){let t=Date.now();t-this.redrawTimestamp>33?(this.mapStage.style.transform=`translate3d(${this.mapX}px,${this.mapY}px,0) scale(${this.mapScale})`,this.mapStage.classList.toggle("draggable",this.mapScale>this.mapMinScale),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.mapLayers.layers.forEac
1h((t,e)=>{if(t.enabled){if(t.img&&t.imgLoaded){let e=(this.mapX+this.mapEdgeSpaceX*this.mapScale)*this.pixelDensity,a=(this.mapY+this.mapEdgeSpaceY*this.mapScale)*this.pixelDensity,s=this.mapArtwork.width*this.mapScale*this.pixelDensity,i=this.mapArtwork.height*this.mapScale*this.pixelDensity,r=t.quarterSizeImage;this.mapScale>.25&&(r=t.halfSizeImage),this.mapScale>.5&&(r=t.img),this.ctx.drawImage(r,e,a,s,i)}t.artwork.removeAttribute("aria-hidden"),null!=t.annotations&&(t.annotations.removeAttribute("aria-hidden"),t.annotationsItems.forEach(t=>{null!=t.button&&(t.button.removeAttribute("disabled"),t.button.setAttribute("tabIndex","0"))}))}else t.artwork.setAttribute("aria-hidden","true"),null!=t.annotations&&(t.annotations.setAttribute("aria-hidden","true"),t.annotationsItems.forEach(t=>{null!=t.button&&(t.button.setAttribute("disabled","disabled"),t.button.setAttribute("tabIndex","-1"))}))}),this.mapScale>=this.mapAnnotations.threshold?this.mapAnnotations.visible||(this.mapAnnotations.visible=!0,this.toggleAnnotations(!0)):this.mapAnnotations.visible&&(this.mapAnnotations.visible=!1,this.toggleAnnotations(!1)),this.mapAnnotations.el.style=`--scale: ${this.mapAnnotations.scale};`,this.updateNavControls(),this.redrawRequested=!1,this.redrawTimestamp=t):window.requestAnimationFrame(()=>{this.redraw()})}toggleAnnotations(t){t?window.requestAnimationFrame(()=>{this.mapAnnotations.el.classList.remove("show"),this.mapAnnotations.el.classList.add("fade"),this.mapAnnotations.el.classList.add("active"),window.requestAnimationFrame(()=>{this.mapAnnotations.el.classList.add("show")})}):window.requestAnimationFrame(()=>{this.mapAnnotations.el.classList.add("fade"),window.requestAnimationFrame(()=>{this.mapAnnotations.el.classList.remove("show"),this.mapAnnotations.el.ontransitioned=t=>{t.target==this.mapAnnotations.el&&(this.mapAnnotations.el.ontransitioned=null,this.mapAnnotations.el.classList.remove("active","fade"))}})})}showContent(t){this.mapOverlay.active||window.requestAnimationFrame(()=>{let e=this.mapOverlay.el.querySelector(`#${t}`).innerHTML;this.mapOverlay.contentContainer.innerHTML=null!=e?e:"",window.requestAnimationFrame(()=>{this.mapOverlay.el.removeAttribute("aria-hidden"),this.mapOverlay.active=!0,window.requestAnimationFrame(()=>{this.mapOverlay.contentId=t,window.requestAnimationFrame(()=>{this.mapOverlay.el.classList.add("show"),this.mapOverlay.active=!0,r.keyboardControl.active&&this.mapOverlay.closeBtn.focus()})})})})}hideContent(){this.mapOverlay.el.classList.remove("show"),this.mapOverlay.el.setAttribute("aria-hidden",!0),this.mapOverlay.contentContainer.innerHTML="",this.mapOverlay.contentId!=`${this.id}--instructions`&&r.keyboardControl.active&&this.mapAnnotations.el.querySelector(`button[data-content-id="${this.mapOverlay.contentId}"]`).focus(),this.mapOverlay.contentId=null,this.mapOverlay.active=!1}updateNavControls(){this.toggleButton(this.mapControls.zoomIn,this.mapScale<1),this.toggleButton(this.mapControls.zoomOut,this.mapScale>this.mapMinScale),this.toggleButton(this.mapControls.mapDown,this.mapY<=-1),this.toggleButton(this.mapControls.mapUp,Math.abs(this.mapY-this.mapMaxYlimit)>1),this.toggleButton(this.mapControls.mapRight,this.mapX<=-1),this.toggleButton(this.mapControls.mapLeft,Math.abs(this.mapX-this.mapMaxXlimit)>1)}doMapControl(t){let e;switch(this.setFocusPoint(!0),t){case"zoomIn":e=Math.min(this.mapScale+this.scaleIncrement,1),this.changeScale(e);break;case"zoomOut":e=Math.max(this.mapScale-this.scaleIncrement,this.mapMinScale),this.changeScale(e);break;case"expand":this.expandMap();break;case"mapDown":this.mapY=l(this.mapY+this.moveIncrement,this.mapMaxYlimit,this.mapMinYlimit),this.requestRedraw();break;case"mapUp":this.mapY=l(this.mapY-this.moveIncrement,this.mapMaxYlimit,this.mapMinYlimit),this.requestRedraw();break;case"mapRight":this.mapX=l(this.mapX+this.moveIncrement,this.mapMaxXlimit,this.mapMinXlimit),this.requestRedraw();break;case"mapLeft":this.mapX=l(this.mapX-this.moveIncrement,this.mapMaxXlimit,this.mapMinXlimit),this.requestRedraw()}
1this.mapControls.pressing&&(clearTimeout(this.mapControls.repeatTimeout),this.mapControls.repeatTimeout=setTimeout(()=>{this.doMapControl(t)},this.mapControls.initPressDelay?600:200)),this.mapControls.initPressDelay=!1}resetMapControls(){this.mapControls.pressing=!1,clearTimeout(this.mapControls.repeatTimeout),this.mapControls.repeatTimeout=null,this.mapControls.initPressDelay=!0}toggleButton(t,e){e?t.removeAttribute("disabled"):t.setAttribute("disabled",!0)}expandMap(){this.expanded?(this.parentWrapper.appendChild(this.wrapper),document.body.removeChild(this.expandWrapper),this.expandWrapper=null,this.expanded=!1,this.mapControls.expand.classList.remove("expanded")):(this.expandWrapper=document.createElement("DIV"),this.expandWrapper.classList.add("interactive-map--expand-wrapper"),document.body.appendChild(this.expandWrapper),this.expandWrapper.appendChild(this.wrapper),this.expanded=!0,this.mapControls.expand.classList.add("expanded"))}watchSearchText(t){t?this.mapSearch.watch=setInterval(()=>{this.checkSearchText()},200):(clearInterval(this.mapSearch.watch),this.mapSearch.watch=null,this.mapSearch.searchText=null,this.mapSearch.prevSearchText=null)}checkSearchText(){this.mapSearch.prevSearchText=this.mapSearch.searchText;let t=this.mapSearch.input.value.toLowerCase().trim(),e=t.length>2?t:"";if(e!=this.mapSearch.prevSearchText){this.mapSearch.searchText=e;let t=[];if(""!=this.mapSearch.searchText&&this.mapLayers.layers.forEach((e,a)=>{for(let s=0;s<e.annotationsItemsCount;s++){let i=0;e.annotationsItems[s].searchText==this.mapSearch.searchText?i+=200:e.annotationsItems[s].searchText.indexOf(this.mapSearch.searchText)>=0&&(i+=100),e.annotationsItems[s].searchKeywords.length>0&&e.annotationsItems[s].searchKeywords.forEach(t=>{t.length>2&&(t==this.mapSearch.searchText?i+=50:t.indexOf(this.mapSearch.searchText)>=0&&(i+=5))}),i>0&&t.push({layerIndex:a,annotiationIndex:s,score:i})}}),this.mapSearch.results.innerHTML="",t.length>0){t.sort(function(t,e){return e.score-t.score});let e=document.createElement("UL"),a="";t.forEach(t=>{if(this.mapLayers.multipleSolidLayers){let s=this.mapLayers.layers[t.layerIndex].subLayer?this.mapLayers.layers[this.mapLayers.layers[t.layerIndex].subLayerParentIndex].layerTitle:this.mapLayers.layers[t.layerIndex].layerTitle;if(s!=a){a=s;let t=document.createElement("LI");t.classList.add("layer-title"),t.innerHTML=a,e.appendChild(t)}}let s=document.createElement("LI"),i=document.createElement("BUTTON");i.classList.add("btn","btn-link","p-0"),i.innerHTML=this.mapLayers.layers[t.layerIndex].annotationsItems[t.annotiationIndex].text,i.addEventListener("click",()=>{this.interactions&&this.focusOnAnnotation(this.mapLayers.layers[t.layerIndex].annotationsItems[t.annotiationIndex].el)}),s.appendChild(i),e.appendChild(s)}),this.mapSearch.results.appendChild(e)}}}toggleLayerList(t=!1){t||this.mapLayers.selectionActive?(this.mapLayers.selectList.setAttribute("aria-hidden","true"),this.mapLayers.selectionActive=!1):(this.searchSystem&&this.mapSearch.panelActive&&(this.mapSearch.input.setAttribute("tabindex","-1"),this.mapSearch.closeButton.setAttribute("tabindex","-1"),this.mapSearch.panel.setAttribute("aria-hidden","true"),this.mapSearch.panelActive=!1),this.tours&&this.tours.selectionActive&&this.toggleToursList(!0),this.mapLayers.selectList.removeAttribute("aria-hidden"),this.mapLayers.selectionActive=!0)}toggleLayer(t){let e=this.mapLayers.layers[t];if(this.mapLayers.multipleSolidLayers){if(t>0||!this.mapLayers.layers[0].enabled){if(this.mapLayers.layers[t].enabled){if(e.solidLayer)for(let e=this.mapLayers.layers.length-1;e>=0;e-=1){let a=this.mapLayers.layers[e];if(a.subLayer&&a.subLayerParentIndex==t)a.enabled=!1,a.layerButton.classList.remove("enabled");else if(a.solidLayer&&e<t){a.enabled=!0,a.layerButton.classList.add("enabled");break}}e.enabled=!1,e.layerButton.classList.remove("enabled")}else{let a=0;e.solidLayer?a=e.layerIndex:e.subLayer&&(a=e.subLayerParentIndex),this.mapLayers.layers.forEach((e,s)=>{(e.layerIndex<a||e.solidLayer&&e.layerIndex!=a||e.subLayer&&e.subLayerParentIndex!=a)&&(e.enabled=!1,e.layerButton.classList.remove("enabled")),e.solidLayer&&a==s&&(e.enabled=!0,e.layerButton.classList.add("enabled")),e.subLayer&&e.subLayerParentIndex==t&&(e.enabled=!0,e.layerButton.classList.add("enabled"))}),e.enabled=!0,e.layerButton.classList.add("enabled")}this.requestRedraw()}}else e.enabled=!e.enabled,e.layerButton.classList.toggle("enabled",e.enabled),this.requestRedraw()}toggleToursList(t=!1){t||this.tours.selectionActive?(this.tours.selectList.setAttribute("aria-hidden","true"),this.tours.selectionActive=!1):(this.searchSystem&&this.mapSearch.panelActive&&(this.mapSearch.input.setAttribute("tabindex","-1"),this.mapSearch.closeButton.setAttribute("tabindex","-1"),this.mapSearch.panel.setAttribute("aria-hidden","true"),this.mapSearch.panelActive=!1),this.mapLayers.selectionActive&&this.toggleLayerList(!0),this.tours.selectList.removeAttribute("aria-hidden"),this.tours.selectionActive=!0)}startTour(t){this.tours.activeTourIndex=t,this.toggleToursList(!0),this.controlsWrapper.setAttribute("aria-hidden","true"),this.tours.controls.removeAttribute("aria-hidden"),this.showTourStage(0)}showTourStage(t){this.tours.activeStageIndex=t;let e=this.tours.data[this.tours.activeTourIndex],a=e.stages[this.tours.activeStageIndex];a.isIntro||a.isFinish||this.focusOnAnnotation(a.targetAnnotationEl),window.requestAnimationFrame(()=>{this.tours.controlsTitle.innerHTML=e.title,this.tours.controlsStage.innerHTML=this.tours.activeStageIndex+1+" / "+e.stages.length,this.mapOverlay.contentContainer.innerHTML=a.content,window.requestAnimationFrame(()=>{this.mapOverlay.el.removeAttribute("aria-hidden"),this.mapOverlay.active=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this.mapOverlay.el.classList.add("show"),this.mapOverlay.active=!0,r.keyboardControl.active&&this.mapOverlay.closeBtn.focus()})})})}),this.tours.activeStageIndex>0?this.tours.prevButton.removeAttribute("disabled"):this.tours.prevButton.setAttribute("disabled","disabled"),this.tours.activeStageIndex<e.stages.length-1?this.tours.nextButton.removeAttribute("disabled"):this.tours.nextButton.setAttribute("disabled","disabled")}prevTourStage(){this.tours.activeStageIndex>0&&this.showTourStage(this.tours.activeStageIndex-1)}nextTourStage(){let t=this.tours.data[this.tours.activeTourIndex];this.tours.activeStageIndex<t.stages.length-1&&this.showTourStage(this.tours.activeStageIndex+1)}endTour(t){this.tours.controls.setAttribute("aria-hidden","true"),this.controlsWrapper.removeAttribute("aria-hidden"),this.mapOverlay.active&&(this.mapOverlay.el.classList.remove("show"),this.mapOverlay.el.setAttribute("aria-hidden",!0),this.mapOverlay.active=!1)}}function c(t){t.forEach(t=>{1===t.nodeType&&new p(t)})}}}]);

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.