PageSourceSearch

https://www.visitnc.com/sites/default/files/js/js_d9n46Fjwey2q1jLb…6oCIFcmGe64OWi_yr8hyqH_1VLZCtS7yi2_POxJm1cU

js visitnc.com collected 2026-10-02 02:44:00 UTC 3,885 bytes, 7 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2(function(Drupal,once,drupalSettings){Drupal.behaviors.viewOnMap={attach(context){const locations=window?.drupalSettings?.map_points_data||{};const locationIds=Object.keys(locations);function isMobile(){return window.matchMedia('(max-width: 768px)').matches;}function invisibleIcon(){return L.divIcon({className:'invisible-marker',html:'',iconSize:[0,0]});}function textLabelIcon(text,isHighlighted,id){const anchor=isMobile()?[110/2,30]:[110,30];return L.divIcon({className:'text-label-icon',html:`
3            <div class="map-text-label btn-icon pin ${isHighlighted?'highlighted':''}"
4                 data-id="${id}">
5              ${text}
6            </div>
7          `,iconSize:[220,60],iconAnchor:anchor});}function findStoryPosNum(id){const ele=document.getElementById(`view_map_${id}`);if(ele)return 'Stop '+ele.previousElementSibling.firstElementChild.dataset.map;return "Stop *";}once('view-on-map-btn','.view-on-map-btn',context).forEach((btn)=>{btn.addEventListener('click',function(e){e.preventDefault();const activeId=this.id.replace('view_map_','');const popup=document.getElementById(this.id+'_popup');if(!popup)return;document.querySelectorAll('.view-on-map-popup.is-active').forEach((p)=>p.classList.remove('is-active'));popup.classList.add('is-active');if(!popup._leafletMap){const mapEl=document.createElement('div');mapEl.style.width='100%';mapEl.style.height='100%';popup.querySelector('.map-inner').appendChild(mapEl);const map=L.map(mapEl,{scrollWheelZoom:false,dragging:true,touchZoom:true,doubleClickZoom:false,boxZoom:false,tap:false});L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{attribution:'&copy; OpenStreetMap contributors'}).addTo(map);const bounds=L.latLngBounds();let highlightedMarker=null;locationIds.forEach((id,index)=>{const loc=locations[id];if(!loc?.lat||!loc?.lng)return;const marker=L.marker([loc.lat,loc.lng],{icon:invisibleIcon()}).addTo(map);marker.id=id;marker.stopLabel=findStoryPosNum(id);marker.actualName=loc.title;marker.isHighlighted=id===activeId;if(marker.isHighlighted)highlightedMarker=marker;marker.defaultZIndex=marker.isHighlighted?1000:0;marker.hoverZIndex=2000;marker.setZIndexOffset(marker.defaultZIndex);marker.setIcon(textLabelIcon(marker.stopLabel,marker.isHighlighted,marker.id));marker.on('add',()=>{const el=marker.getElement();if(!el)return;const label=el.querySelector('.map-text-label');if(!label)return;el.addEventListener('mouseenter',()=>{label.textContent=marker.actualName;marker.setZIndexOffset(marker.hoverZIndex);});el.addEventListener('mouseleave',()=>{label.textContent=marker.stopLabel;marker.setZIndexOffset(marker.defaultZIndex);});el.addEventListener('click',(e)=>{e.stopPropagation();map.setView(marker.getLatLng(),12,{animate:true,duration:0.5});});});bounds.extend([loc.lat,loc.lng]);});popup._leafletMap=map;popup._highlightedMarker=highlightedMarker;setTimeout(()=>{map.invalidateSize();if(isMobile()&&highlightedMarker)map.setView(highlightedMarker.getLatLng(),9,{animate:true,duration:0.5});else{if(bounds.isValid())map.fitBounds(bounds,{padding:[60,60],maxZoom:8});}},200);}else setTimeout(()=>{const map=popup._leafletMap;map.invalidateSize();const highlightedMarker=popup._highlightedMarker;if(isMobile()&&highlightedMarker)map.setView(highlightedMarker.getLatLng(),9,{animate:true,duration:0.5});else{const existingBounds=L.latLngBounds();locationIds.forEach((id)=>{const loc=locations[id];if(!loc?.lat||!loc?.lng)return;existingBounds.extend([loc.lat,loc.lng]);});if(existingBounds.isValid())map.fitBounds(existingBounds,{padding:[60,60],maxZoom:8});}},200);});});once('view-on-map-close','.map-close',context).forEach((btn)=>{btn.addEventListener('click',function(e){e.stopPropagation();this.closest('.view-on-map-popup')?.classList.remove('is-active');});});}};})(Drupal,once,drupalSettings);;

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.