PageSourceSearch

https://trianglecurling.com/assets/PublicStonesPage-DJ-nHxIU.js

js trianglecurling.com collected 2026-10-08 05:59:39 UTC 5,788 bytes, 1 lines download raw bytes

1import{$ as e,a5 as b,r as m}from"./vendor-C1VgWBuX.js";import{e as g,g as j,P as S,S as N,q as h}from"./index-5hIAAaYU.js";import{I as u}from"./InlineStateMessage-BM010uxt.js";import{f,m as v,M as w,s as r,g as y}from"./curlingStones-3WiNdEWU.js";import{S as E}from"./StoneIceMap-DstzAnrX.js";import"./sheetStoneColors-DdPUJVIn.js";const p=6;function d({stone:t}){return e.jsxs(b,{to:y(t.id),className:"font-medium text-primary-teal-link hover:underline",children:["Stone ",t.wcfRegistrationNumber]})}function L(t){return t.from?`${r(t.from)} to ${r(t.to)}`:r(t.to)}function C({stones:t}){return e.jsx(e.Fragment,{children:t.map((n,s)=>e.jsxs("span",{children:[s>0?", ":null,e.jsx(d,{stone:n})]},n.id))})}function x({stones:t,detail:n}){return e.jsxs("details",{className:"text-sm",children:[e.jsxs("summary",{className:"cursor-pointer rounded font-medium text-primary-teal-link hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-teal/40",children:["Show all ",t.length," stones"]}),e.jsx("ul",{className:"mt-2 grid gap-x-6 gap-y-1 text-gray-700 sm:grid-cols-2",children:t.map(s=>e.jsxs("li",{children:[e.jsx(d,{stone:s}),": ",n(s)]},s.id))})]})}function I(t){return new Set(t.map(s=>s.side)).size===1?`side ${t[0]?.side}`:"each stone’s side in play"}function T(t){const{stones:n}=t,[s,l]=n,a=n.length;switch(t.kind){case"rotated":return{title:"Sheets rotated",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[a," ",a===1?"stone":"stones"," moved to the next sheet: A to B, B to C, C to D, and D to A. Spares stayed in place."]}),e.jsx(x,{stones:n,detail:L})]})};case"swapped":return{title:"Stones swapped",body:s&&l?e.jsxs("p",{children:[e.jsx(d,{stone:s})," moved to ",r(s.to),", and ",e.jsx(d,{stone:l})," ","moved to ",r(l.to),"."]}):s?e.jsxs("p",{children:[e.jsx(d,{stone:s})," moved to ",r(s.to)," in a swap."]}):null};case"moved":return{title:"Stone moved",body:s?e.jsxs("p",{children:[e.jsx(d,{stone:s})," moved ",s.from?`from ${r(s.from)} `:"","to"," ",r(s.to),"."]}):null};case"flipped":return{title:"Stone flipped",body:s?e.jsxs("p",{children:[e.jsx(d,{stone:s})," now runs on side ",s.side,"."]}):null};case"added":return{title:a===1?"Stone added":`${a} stones added`,body:a>p?e.jsx(x,{stones:n,detail:o=>r(o.to)}):e.jsx("ul",{className:"space-y-0.5",children:n.map(o=>e.jsxs("li",{children:[e.jsx(d,{stone:o})," at ",r(o.to)]},o.id))})};case"maintenance":{const o=t.activityType??"texturing",i=`${v({...t,activityType:o})} on ${I(n)}.`;return{title:w[o],body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:i}),a>p?e.jsx(x,{stones:n,detail:c=>`side ${c.side}`}):e.jsx("p",{children:e.jsx(C,{stones:n})})]})}}}}function $({entries:t}){return e.jsx("ol",{className:"public-card divide-y divide-gray-200",children:t.map(n=>{const{title:s,body:l}=T(n);return e.jsxs("li",{className:"grid gap-1 p-4 sm:grid-cols-[8rem_minmax(0,1fr)] sm:gap-4 sm:p-5",children:[e.jsx("time",{dateTime:n.date,className:"text-sm font-medium text-gray-600",children:f(n.date)}),e.jsxs("div",{className:"space-y-1.5 text-sm text-gray-700",children:[e.jsx("p",{className:"text-base font-semibold text-gray-900",children:s}),l,n.notes?e.jsxs("p",{className:"text-gray-600",children:["Note: ",n.notes]}):null]})]},n.id)})})}const k={title:"Curling stones | Triangle Curling Club",description:"Where each of the club’s curling stones is in play, with position and maintenance history.",canonicalPath:"/stones"};function A(){const[t,n]=m.useState(null),[s,l]=m.useState(!0),[a,o]=m.useState(null);return m.useEffect(()=>{let i=!1;return g("/public/stones/activity").then(c=>{i||n(c)}).catch(c=>{i||o(j(c,"Recent changes are not available right now."))}).finally(()=>{i||l(!1)}),()=>{i=!0}},[]),e.jsxs("section",{className:"space-y-3","aria-labelledby":"stone-recent-changes-heading",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{id:"stone-recent-changes-heading",className:"text-2xl font-semibold tracking-tight text-gray-900",children:"Changes in the last 12 months"}),e.jsxs("p",{className:"text-sm text-gray-600",children:["Rotations, swaps, and other moves, plus texturing, band narrowing, and imprinting",t?` since ${f(t.since)}`:"","."]})]}),s?e.jsx(u,{title:"Loading recent changes"}):a||!t?e.jsx(u,{title:"Unable to load recent changes",description:a,tone:"warning"}):t.entries.length===0?e.jsx(u,{title:"No changes in the last 12 months",description:"Moves and maintenance will appear here as they are recorded."}
1):e.jsx($,{entries:t.entries})]})}function B(){const[t,n]=m.useState([]),[s,l]=m.useState(!0),[a,o]=m.useState(null);return m.useEffect(()=>{let i=!1;return g("/public/stones").then(c=>{i||n(c.stones)}).catch(c=>{i||o(j(c,"Stone information is not available right now."))}).finally(()=>{i||l(!1)}),()=>{i=!0}},[]),e.jsxs(S,{children:[e.jsx(N,{...k}),e.jsx("section",{className:"public-section",children:e.jsx("div",{className:"public-container",children:e.jsxs("div",{className:"public-content space-y-6",children:[e.jsx("div",{className:"public-page-title-rule",children:e.jsx("h1",{className:"public-heading text-balance",children:"Curling stones"})}),e.jsx("p",{className:"max-w-3xl text-gray-700",children:"Every stone on each sheet is shown in handle order, red on the left and yellow on the right. The small letter on each stone is the running surface in play. Select a stone to see where it has been and how it has been maintained."}),s?e.jsx(h,{title:"Loading stones",description:"Gathering the current stone layout."}):a?e.jsx(h,{title:"Unable to load stones",description:a,tone:"warning"}):t.length===0?e.jsx(h,{title:"No stones listed yet",description:"Check back soon."}):e.jsxs(e.Fragment,{children:[e.jsx(E,{stones:t,tone:"public",getStoneHref:i=>y(i.id)}),e.jsx(A,{})]})]})})})]})}export{B 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.