PageSourceSearch

https://www.bretagne-vakantie.com/app/dist/crt-bretagne/addons/woo…addon-circuits-day-component.0d448aeb9b.mjs

js bretagne-vakantie.com collected 2026-09-26 10:51:00 UTC 2,280 bytes, 1 lines download raw bytes

1import n from"woody_library_woody_component";import r from"woody_addon_circuits_day_map_manager";class a extends n{#o={};#t=null;#i="Step";#e=null;constructor(){super()}async init(i){if(super.init(i),this.config=Object.assign(this.#o,this.config,i),console.log("CircuitDayComponent.init with config : ",this.config),this.#t=this.querySelector("woody-map"),!this.#t)throw new Error("CircuitDayComponent - map is missed");document.querySelector("html")?.attributes?.lang?.value=="fr-FR"&&(this.#i="Etape"),await customElements.whenDefined(this.#t.tagName.toLowerCase()),this.#t.init({manager:new r,getDefaultSelectedPinIndex:()=>this.#e?this.#t.manager.getMappedPinIndex(this.#e):void 0}).catch(e=>{throw e}),this.#t.addEventListener("pinclick",e=>{this.onMapStepClicked(e.detail?.properties?.index)}),this.querySelectorAll(".circuit-pager .button.tabs-related").forEach(e=>{e.addEventListener("click",o=>{this.config.changeDay&&this.config.changeDay(e.dataset.pagerGotoDayIndex)})});const t=this.querySelectorAll("[data-circuit-day-step-index]");if(t.length>0){const e=new IntersectionObserver(o=>{o.forEach(s=>{s.isIntersecting&&this.onStepFocused(s.target.dataset.circuitDayStepIndex)})},{threshold:.75});t.forEach(o=>e.observe(o))}globals?.is_mobile||new IntersectionObserver(o=>{o.forEach(s=>{s.isIntersecting?(this.#t.classList.remove("isMinimap"),this.#t.loaded&&this.#t.fitBounds()):s.boundingClientRect.top<0&&this.#t.classList.add("isMinimap")})},{threshold:.4}).observe(this.#t.parentNode)}onStepFocused(i){if(this.#e!=i){if(this.#e=i,this.#t.loaded){const t=this.#t.manager.getMappedPinIndex(this.#e);console.log("onStepFocused - step_index["+i+"] - pinIndex : "+t),this.#t.setSelectedPinIndex(t)}this.querySelector(".day-map-step-index").textContent=this.#i+" "+(parseInt(this.#e)+1)}}onMapStepClicked(i){const t=`[data-circuit-day-step-index="${i}"]`,e=this.querySelector(t);e?this.scrollTo(e):console.warn("CircuitDayComponent.onMapStepClicked - step not found for selector : ",t)}scrollTo(i,t=200){const e=this.getCoords(i).top;e>t&&window.scrollTo({top:e-t,behavior:"smooth"})}getCoords(i){let t=i.getBoundingClientRect();return{top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY,left:t.left+window.scrollX}}}export{a as default};

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.