1import{r as e}from"./neutralIslandHtml.B-kyhm8_.js?dpl=dpl_D7Hw5ZtQwqgjHp2uALEjeVwzt7k8";import{t}from"./locationsMapViewport.C_j6smGe.js?dpl=dpl_D7Hw5ZtQwqgjHp2uALEjeVwzt7k8";import{c as n}from"./siteStyles.HWUO4WGW.js?dpl=dpl_D7Hw5ZtQwqgjHp2uALEjeVwzt7k8";var r=`flex h-full flex-col border bg-paper p-4 shadow-[4px_4px_0_rgba(14,23,54,0.07)] transition `,i=`border-[#f76b1e] ring-2 ring-[#f76b1e]/20`,a=`border-[#d0d7dc] hover:border-[#f76b1e]`;function o(e){return n({tone:e?`primary`:`secondary`,size:`compact`,className:`text-[0.68rem] tracking-[0.14em]`})}function s(e){return n({tone:e?`primary`:`secondary`,size:`compact`,className:`w-full`})}function c(){let t=document.querySelector(`[data-locations-map]`),n=e(`script[data-locations-map-runtime]`);!t||!n||l(t,n)}function l(e,n){let c=n.branches,l=new Map(c.map(e=>[e.slug,e])),u=e.dataset.mapsEmbedKey??``,d=e.querySelector(`[data-locations-map-frame]`),f=e.querySelector(`[data-locations-map-count]`),p=Array.from(e.querySelectorAll(`[data-locations-map-region]`)),m=`all`,h=null,g=null;function _(){if(!d)return!1;let e=d.getBoundingClientRect(),t=Math.round(e.width),n=Math.round(e.height);return t<1||n<1||g&&g.width===t&&g.height===n?!1:(g={width:t,height:n},!0)}function v(){let _=m===`all`?c:c.filter(e=>e.region===m),v=h?l.get(h):void 0,y=n.regions.find(e=>e.key===m)?.label,b=t(v?`Garton Tractor ${v.name}, ${v.address}`:m===`all`?`Garton Tractor California`:`Garton Tractor ${y}, California`,v?[v]:_,g??void 0,u);for(let e of p){let t=e.dataset.locationsMapRegion===m;e.setAttribute(`aria-pressed`,String(t)),e.className=o(t)}f&&(f.textContent=`${_.length} of ${c.length} branches`),d&&(d.title=v?`Google Map for Garton Tractor ${v.name}`:`Google Map of ${y??`Garton Tractor locations`}`,d.getAttribute(`src`)!==b&&(d.src=b));let x=new Set(_.map(({slug:e})=>e));e.querySelectorAll(`[data-locations-map-card]`).forEach(e=>{let t=e.dataset.locationsMapCard??``;e.hidden=!x.has(t);let n=t===h;e.className=r+(n?i:a);let o=e.querySelector(`[data-branch-action="show-on-map"]`);o&&(o.setAttribute(`aria-pressed`,String(n)),o.className=s(n))})}for(let e of p)e.addEventListener(`click`,()=>{m=e.dataset.locationsMapRegion??`all`,h=null,v()});e.querySelectorAll(`[data-branch-action="show-on-map"]`).forEach(e=>{let t=e.closest(`[data-locations-map-card]`)?.dataset.locationsMapCard;!t||!l.has(t)||e.addEventListener(`click`,()=>{h=t,v()})}),_(),v(),d&&typeof ResizeObserver<`u`&&new ResizeObserver(()=>{_()&&v()}).observe(d)}c();
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.