PageSourceSearch

https://techplay.jp/webv2/assets/a5dc16a/build/assets/index-zrgd7-Ib.js

js techplay.jp collected 2026-10-02 02:47:28 UTC 3,878 bytes, 1 lines download raw bytes

1import{b4 as Y,r as x,i as v,cJ as z,dz as J,dA as L,X as U,b2 as w,cI as X,j as e,c as q,d as A,E,T as C,cL as G}from"./app-CQDOLSaW.js";import{u as Q}from"./useCalendarNavigation-D7rg5OUd.js";import{u as R}from"./useFilteredEvents-D7Mhz0Pg.js";import{CalendarCell as V}from"./CalendarCell-DUZjHwtw.js";import{CalendarHeader as Z}from"./CalendarHeader-Da9biaZV.js";import{SearchHeader as _}from"./SearchHeader-Dg1fKlku.js";import"./AdEvent-CtO6pTpA.js";import"./useAdImpression-D2IXl0Tm.js";import"./useTooltipPosition-BZskJGqR.js";import"./EventTooltip-1Ch6jyVB.js";import"./CalendarEventItem-Ciy15Qy7.js";import"./CalendarLegendItem-C2JJEX3P.js";const ee=Y([]),se=Y(""),te=Y(!1);function ae(t,s){return x.useMemo(()=>{const r=v(`${t}-${s}-01`),o=r.endOf("month"),n=r.startOf("week"),i=o.endOf("week"),d=[];let a=n;for(;a.isBefore(i)||a.isSame(i);)a.month()+1===s?d.push(a.date()):d.push(null),a=a.add(1,"day");const m=[];for(let l=0;l<d.length;l+=7){const f=d.slice(l,l+7);m.push({id:`w${t}${s}${l/7}`,days:f.map((u,c)=>({day:u,id:u?`d${t}${s}${u}`:`${c<f.findIndex(j=>j!==null)?"b":"a"}${c}`,isSunday:c===0,isSaturday:c===6}))})}return m},[t,s])}const re=(t,s)=>{const{favoriteEventIdSet:r}=z(t,s),{data:o}=J(t,s),{data:n}=L(t,s),i=x.useMemo(()=>new Set(o==null?void 0:o.map(Number)),[o]),d=x.useMemo(()=>new Set(n==null?void 0:n.map(Number)),[n]);return{favoriteEventIdSet:r,registeredEventIdSet:i,clippedEventIdSet:d}};function ve({year:t,month:s,ads:r,className:o,...n}){const{auth:i,currentUrl:d}=U().props,a=`${t}年${s}月のイベントカレンダー`,[m,l]=w(ee),[f,u]=x.useState(m),[c,j]=w(se),[k,g]=x.use
1State(c),[S,O]=w(te),y=v(`${t}-${s}-01`),$=y.endOf("month"),{data:T,isLoading:P}=X({from:y.format("YYYY-MM-DD"),to:$.format("YYYY-MM-DD"),keyword:c||void 0}),{favoriteEventIdSet:D,registeredEventIdSet:F,clippedEventIdSet:K}=re(!!i,{from:y.format("YYYY-MM-DD"),to:$.format("YYYY-MM-DD")}),N=R(T,{selectedAreaIds:m,showFavoriteOnly:S,favoriteEventIdSet:D}),H=ae(t,s),b=v(`${t}-${s}-01`),{isPrevDisabled:M,isNextDisabled:I,handlePrevMonth:W,handleNextMonth:B}=Q({currentDate:b});return e.jsxs("main",{className:"max-w-main-container mx-auto py-4 space-y-2",children:[e.jsx(q,{currentUrl:d,items:[{label:a}]}),!i&&e.jsxs("div",{className:"pt-4",children:[e.jsx(A.PageTitle,{children:a}),e.jsx(A.Info,{className:"my-2",children:"TECH PLAYに登録されているイベントをカレンダーから探すことができます。"})]}),e.jsxs("div",{className:E("space-y-2",o),...n,children:[e.jsx(_,{onChangePrefecture:u,onChangeKeyword:g,onSearch:()=>{l(f),j(k)},showFavoriteOnly:S,setShowFavoriteOnly:O,initialKeyword:c,initialAreaIds:m}),e.jsxs("div",{className:"bg-white border border-gray-300",children:[e.jsx(Z,{year:t,month:s}),e.jsxs("table",{className:"w-full table-fixed border-t",children:[e.jsx("thead",{children:e.jsx("tr",{children:[{day:"日",className:"bg-red-50"},{day:"月"},{day:"火"},{day:"水"},{day:"木"},{day:"金"},{day:"土",className:"bg-blue-50"}].map(p=>e.jsx("th",{className:E("w-1/7 text-center p-2",p.className),children:p.day},p.day))})}),e.jsx("tbody",{className:P?"opacity-50":"",children:H.map(p=>e.jsx("tr",{children:p.days.map(h=>e.jsx(V,{calendarDay:h,year:t,month:s,events:(N==null?void 0:N[v(`${t}-${s}-${h.day}`).format("YYYY-MM-DD")])??[],ads:(r==null?void 0:r[h.day||Number.NaN])??[],favoriteEventIdSet:D,registeredEventIdSet:F,clippedEventIdSet:K},h.id))},p.id))})]})]})]}),e.jsxs("div",{className:"flex gap-4 py-4 font-bold text-xl",children:[e.jsx("h1",{className:"",children:a}),e.jsxs("div",{className:"space-x-2",children:[!M&&e.jsx(C,{onClick:W,variant:"primary",children:b.subtract(1,"month").format("M月")}),!M&&!I&&e.jsx("span",{className:"font-extralight",children:"|"}),!I&&e.jsx(C,{onClick:B,variant:"primary",children:b.add(1,"month").format("M月")})]})]}),e.jsx(G,{})]})}export{ve as DesktopCalendar};

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.