PageSourceSearch

https://veriportali.tuik.gov.tr/assets/PressReleases-CjZmJpi0.js

js tuik.gov.tr collected 2026-09-24 08:27:39 UTC 7,399 bytes, 1 lines download raw bytes

1import{j as e,c as C}from"./vendor-data-dD2NRr_z.js";import{L as j,r as u,f as P}from"./vendor-react-CejNKufS.js";import{b as S}from"./press-gvNBKrGt.js";import{a as g}from"./index-BYaJiG-Z.js";import{j as b,k as y,l as _,m as F,c as v,n as A,o as M,d as w,D as I,p as R,q as B,b as L}from"./main-DqKRJY-Z.js";import{S as E,g as T}from"./iconHelper-BAsDy_aE.js";import{u as N}from"./usePressFavoriteActions-D2D9H-42.js";import{u as p}from"./vendor-i18n-DjIPP2Le.js";import{S as V}from"./press-CvF4Tmeu.js";import{S as q}from"./SegmentedControl-CojcJihn.js";import"./vendor-ui-B07L2da6.js";import"./index-CevMAlsH.js";import"./ekonomik_guven-OxGfvcn3.js";function O(){return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:Array.from({length:20}).map((t,r)=>e.jsx(g,{width:32,height:32,borderRadius:6},r))}),[...Array(4)].map((t,r)=>e.jsx("div",{className:"mb-8",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[...Array(20)].map((d,m)=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"mb-3",children:e.jsx(g,{width:250,height:24})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(g,{width:24,height:24}),e.jsx(g,{width:24,height:24})]})]},m))})},r))]})}function k({item:t}){const{t:r}=p(),{isUserLoggedIn:d}=b(),{favoriteMap:m,handleFavorite:i,handleNotification:l,isMutating:s,isFavoriteMutating:a,isNotificationMutating:n}=N(),o=m.get(t.id?.toString())||{isFavorite:!1,isNotificationActive:!1},{isFavorite:c,isNotificationActive:h}=o,x=r(d?c?"press.favorite.remove":"press.favorite.add":"press.favorite.login_required"),f=r(d?h?"press.notification.disable":"press.notification.enable":"press.notification.login_required");return e.jsxs("li",{className:"flex justify-between items-center rounded-lg p-1 px-2 hover:bg-gray-200 dark:hover:bg-white/10 transition-colors cursor-pointer gap-5",children:[e.jsx(j,{to:t.url,className:"text-foreground font-medium flex-1 text-sm sm:text-base",children:t.title}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(j,{to:`${t.url}/metadata`,className:"shrink-0",children:e.jsx("button",{type:"button",className:"flex items-center justify-center w-8 h-8 md:w-10 md:h-10 rounded-lg transition-colors duration-300 cursor-pointer hover:text-gray-800 text-primary-300","data-tooltip-id":"tooltip","data-tooltip-content":r("actions.open_metadata"),"aria-label":r("actions.open_metadata"),children:e.jsx(E,{className:"w-5 h-5 md:w-6 md:h-6","aria-hidden":!0})})}),e.jsx("button",{type:"button",className:v("flex items-center justify-center w-8 h-8 md:w-10 md:h-10 rounded-lg duration-300 text-primary-300",s?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>i(t.id),disabled:s,"data-tooltip-id":"tooltip","data-tooltip-content":x,"aria-label":x,"aria-busy":s,children:a?e.jsx(y,{"aria-hidden":!0}):c?e.jsx(_,{className:"w-4 h-4 sm:w-5 sm:h-5 transition-colors hover:text-gray-800","aria-hidden":"true"}):e.jsx(F,{className:"w-4 h-4 sm:w-5 sm:h-5 transition-colors hover:text-gray-800","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:v("flex items-center justify-center w-8 h-8 md:w-10 md:h-10 rounded-lg duration-300 text-primary-300",s?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>l(t.id),disabled:s,"data-tooltip-id":"tooltip","data-tooltip-content":f,"aria-label":f,"aria-busy":s,children:n?e.jsx(y,{"aria-hidden":!0}):h?e.jsx(A,{className:"w-4 h-4 sm:w-5 sm:h-5 transition-colors hover:text-gray-800","aria-hidden":!0}):e.jsx(M,{className:"w-4 h-4 sm:w-5 sm:h-5 transition-colors hover:text-gray-800","aria-hidden":!0})})]})]},t.id)}function U({pressReleaseList:t}){const r=u.useRef({}),{i18n:d}=p(),{groupedPressReleases:m,letters:i}=u.useMemo(()=>{if(!t?.length)return{groupedPressReleases:{},letters:[]};const s={},a=new Set;t.forEach(o=>{if(o.title&&o.title.length>0){const c=o.title.charAt(0).toUpperCase();a.add(c),s[c]||(s[c]=[]),s[c].push(o)}}),Object.keys(s).forEach(o=>{s[o].sort((c,h)=>c.title.localeCompare(h.title,d.language))});const n=Array.from(a).sort((o,c)=>o.localeCompare(c,d.language));return{groupedPressReleases:s,letters:n}},[t,d.language]),l=s=>{r.current[s]?.scrollIntoView({behavior:"smooth",block:"start"})};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-wrap gap-2 justify-center mb-6",children:i.map(s=>e.jsx("button",{onClick:()=>l(s),className:"flex items-center justify-center w-6 h-6 md:w-8 md:h-8 rounded-md text-base md:text-lg cursor-pointer font-medium transition-all duration-300 shadow-sm text-danger-500 bg-section hover:bg-gray-200",type:"button",children:s},s))}),e.jsx("div",{className:"space-y-3 mb-10",children:i.map(s=>e.jsxs("div",{ref:a=>r.current[s]=a,className:"scroll-mt-30",children:[e.jsx("h2",{className:"text-xl lg:text-2xl font-bold text-foreground",children:s}),e.jsx(w,{className:"h-0.5 my-1.5"}),e.jsx("ul",{className:"grid grid-cols-1 md:grid-cols-2 space-y-1 gap-x-10",children:m[s]?.map(a=>e.jsx(k,{item:a},a.id))})]},s))})]})}const $=u.memo(U);function z({pressReleaseList:t}){const{i18n:r}=p(),{categories:d,groupedPressReleases:m}=u.useMemo(()=>
1{if(!t?.length)return{categories:[],groupedPressReleases:{}};const i={},l=new Map;return t.forEach(a=>{const n=a.categoryId,o=a?.categoryName||"";n&&!l.has(n)&&l.set(n,o),i[o]||(i[o]=[]),i[o].push(a)}),Object.keys(i).forEach(a=>{i[a].sort((n,o)=>n.title.localeCompare(o.title,r.language))}),{categories:Array.from(l.entries()).map(([a,n])=>({id:a,name:n})).sort((a,n)=>a.name.localeCompare(n.name,r.language)),groupedPressReleases:i}},[t,r.language]);return e.jsx("div",{className:"space-y-10 mb-10",children:d.map(i=>{const l=m[i.name];if(!l?.length)return null;const s=T(i.id);return e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg lg:text-2xl flex items-center gap-3 md:gap-5 font-semibold text-foreground",children:[e.jsx(s,{className:"w-10 h-10 shrink-0 text-primary-800","aria-hidden":!0}),i.name]}),e.jsx(w,{className:"h-0.5 my-1.5"}),e.jsx("ul",{className:"grid grid-cols-1 md:grid-cols-2 space-y-1 gap-x-10",children:l.map(a=>e.jsx(k,{item:a},a.id))})]},i.id)})})}const D=u.memo(z);function H(){const{t,i18n:r}=p(),{isUserLoggedIn:d}=b(),{isFavoritesLoading:m}=N(),{data:i=[],isLoading:l}=C({queryKey:["press-release-list",r.language],queryFn:()=>S(r.language)}),[s,a]=P(),n=s.get("view")||"theme",o=h=>{a(h==="theme"?{}:{view:h})},c=[{value:"theme",label:t("press.theme_view")},{value:"alphabetic",label:t("press.alphabetic_view")}];return e.jsxs(e.Fragment,{children:[e.jsx(I,{title:t("nav.press_releases"),description:t("meta_descriptions.press_releases")}),e.jsxs("div",{className:"max-width-container",children:[e.jsx(R,{children:e.jsx(B,{children:t("nav.press_releases")})}),e.jsx(L,{title:t("nav.press_releases")}),(l||d&&m)&&e.jsx(O,{}),!l&&(i==null||i?.length===0)&&e.jsxs("div",{className:"flex flex-col items-center gap-5 justify-center my-6 md:my-20",children:[e.jsx(V,{className:"text-primary-800 size-30 md:size-40","aria-hidden":!0}),e.jsx("p",{className:"text-primary-800 font-semibold text-center text-sm md:text-base",children:t("press.empty_list")})]}),!l&&!(d&&m)&&i?.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(q,{value:n,onChange:o,items:c}),n==="alphabetic"?e.jsx($,{pressReleaseList:i}):e.jsx(D,{pressReleaseList:i})]})]})]})}const ie=u.memo(H);export{ie 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.