PageSourceSearch

https://choose-pt.jp/chp-BuQ69Ee5.chunk.js

js choose-pt.jp collected 2026-10-04 05:55:14 UTC 4,188 bytes, 1 lines download raw bytes

1import{a as S,i as P,b as E,k as R,Y as X,z as Y,r as n,bG as $,bH as b,bI as A,$ as k,j as t,x as B,M as F,bJ as U,e as g,L as q,m as z}from"./chp-index.dI7DWhB6.min.js";import{P as G}from"./chp-CeSQRHGP.chunk.js";import{N as w}from"./chp-0Wp9RWLJ.chunk.js";import{N as H}from"./chp-DGJaYJRz.chunk.js";import"./chp-CuNexg4s.chunk.js";import"./chp-K9gn-yWl.chunk.js";import"./chp-D7ya_uDZ.chunk.js";function ee(){var j,N;const o=S(),{notices:m,categories:p,categoriesLoad:L}=P(e=>e.notice),{t:c}=E(),M=R(L)&&p.length===0,[l,v]=X(),i=Y(),[u,h]=n.useState(!0),[a,_]=n.useState(()=>{const e=i.state||{},s=l.get("category_id");return{category_id:e.category_id??(s?Number(s):""),page:e.page??(parseInt(l.get("page"),10)||1),per_page:20}}),d=n.useRef(null),r=n.useRef({isDown:!1,startX:0,startScrollLeft:0}),y=n.useRef(i.key);n.useEffect(()=>(o($()),()=>{o(b())}),[]),n.useEffect(()=>{d.current&&d.current.scrollIntoView({behavior:"auto",inline:"center",block:"nearest"})},[a.category_id]),n.useEffect(()=>{const e={};a.category_id&&(e.category_id=a.category_id),a.page>1&&(e.page=a.page),v(e,{replace:!0}),o(b()),h(!0),o(A(a)).finally(()=>h(!1))},[a.category_id,a.page]),n.useEffect(()=>{if(i.key===y.current)return;y.current=i.key;const e=l.get("category_id"),s={category_id:e?Number(e):"",page:parseInt(l.get("page"),10)||1};s.category_id===a.category_id&&s.page===a.page||(_(T=>({...T,...s})),k())},[i.key]);const x=e=>{_(s=>({...s,category_id:e,page:1}))},D=e=>{_(s=>({...s,page:e})),k()},C=e=>{r.current={isDown:!0,startX:e.pageX,startScrollLeft:e.currentTarget.scrollLeft}},I=e=>{if(!r.current.isDown)return;e.preventDefault();const s=e.pageX-r.current.startX;e.currentTarget.scrollLeft=r.current.startScrollLeft-s},f=()=>{r.current.isDown=!1};return t.jsxs(t.Fragment,{children:[t.jsx(B,{title:c("meta:notice.title"),keywords:c("meta:notice.keywords"),description:c("meta:notice.description"),ogDescription:c("meta:notice.og_description")}),t.jsx("div",{className:"notice",children:t.jsxs("div",{className:"container-bg__gray4",children:[t.jsx(F,{className:"container__title",textAlign:"center",children:c("notice:page_title")}),t.jsxs("div",{className:"notice__tabs",onMouseDown:C,onMouseMove:I,onMouseUp:f,onMouseLeave:f,children:[t.jsxs("button",{ref:a.category_id?null:d,className:`notice__tab${a.category_id?"":" notice__tab--active"}`,onClick:()=>x(""),children:[t.jsx(U,{}),c("notice:all")]}),M&&[0,1,2].map(e=>t.jsx("span",{className:"notice__tab",children:t.jsx(g,{width:56})},e)),p.map(e=>t.jsxs("button",{ref:a.category_id===e.id?d:null,className:`notice__tab${a.category_id===e.id?" notice__tab--active":""}`,onClick:()=>x(e.id),children:[t.jsx(w,{name:e.name}),t.jsx("span",{className:"notice__tab-label",children:e.name})]},e.id))]}),u&&t.jsx("ul",{className:"notice__list",children:[0,1,2,3,4].map(e=>t.jsx("li",{className:"notice__item",children:t.jsxs("span",{className:"notice__item-link",children:[t.jsxs("span",{className:"notice__item-meta",children:[t.jsx("span",{className:"notice__item-date",children:t.jsx(g,{width:62})}),t.jsx(g,{width:72,height:20,className:"dt-tag-skeleton",variant:"rectangular"})]}),t.jsx("span",{className:"notice__item-title",children:t.jsx(g,{width:e%2?"70%":"88%"})})]})},e))}),!u&&t.jsxs(t.Fragment,{children:[t.jsxs("ul",{className:"notice__list",children:[((j=m.data)==null?void 0:j.length)===0&&t.jsx("li",{className:"notice__empty",children:c("notice:empty")}),(N=m.data)==null?void 0:N.map(e=>t.jsx("li",{className:"notice__item",children:t.jsxs(q,{to:`/notice/${e.id}`,state:{category_id:a.category_id,page:a.page},className:"notice__item-link",children:[t.jsxs("span",{className:"notice__item-meta",children:[t.jsx("span",{className:"notice__item-date",children:z(e.published_at).format("YYYY.M.D")}),e.category&&t.jsxs("span",{className:"notice__category-chip",style:{backgroundColor:e.category.color},children:[t.jsx(w,{name:e.category.name}),t.jsx("span",{className:"notice__category-chip-label",children:e.category.name})]}),e.is_new&&t.jsx(H,{label:c("notice:new_badge")})]}),t.jsx("span",{className:"notice__item-title",children:e.title})]})},e.id))]}),t.jsx(G,{meta:m.meta,onChange:D})]})]})})]})}export{ee 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.