1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c37eac6e-6d22-4e56-95ef-75f1e415f8a2",e._sentryDebugIdIdentifier="sentry-dbid-c37eac6e-6d22-4e56-95ef-75f1e415f8a2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5787],{86898:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var a=s(37876),l=s(14232),n=s(43965);function r(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)(!0),[i,d]=(0,l.useState)(!1),[o,c]=(0,l.useState)(null),[u,m]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let s=await fetch("/api/cms/settings/yearly-vision"),a=await s.json();if(!s.ok||!a.success)throw Error(a.message||"Failed to load settings");e||t(a.data)}catch(t){e||m(t instanceof Error?t.message:"Failed to load settings")}finally{e||r(!1)}})(),()=>{e=!0}},[]);let g=async()=>{d(!0),c(null),m(null);try{let t=Object.fromEntries(e.map(e=>[e.localeCode,e.value])),s=await fetch("/api/cms/settings/yearly-vision",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:t})}),a=await s.json();if(!s.ok||!a.success)throw Error(a.message||"Failed to save settings");c("Yearly vision title updated")}catch(e){m(e instanceof Error?e.message:"Failed to save settings")}finally{d(!1)}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"px-4 py-6 sm:px-6 lg:px-8",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold text-gray-900",children:"Home Content"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-gray-700",children:"Manage global homepage text."})]}),u&&(0,a.jsx)("div",{className:"mb-4 rounded-md bg-red-50 p-4 text-sm text-red-700",children:u}),o&&(0,a.jsx)("div",{className:"mb-4 rounded-md bg-green-50 p-4 text-sm text-green-700",children:o}),(0,a.jsxs)("div",{className:"rounded-lg bg-white p-6 shadow",children:[(0,a.jsx)("h2",{className:"text-lg font-medium text-gray-900",children:"Yearly Vision Title"}),s?(0,a.jsx)("p",{className:"mt-4 text-sm text-gray-500",children:"Loading..."}):(0,a.jsxs)("div",{className:"mt-4 space-y-4",children:[e.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium uppercase text-gray-700",children:e.localeCode}),(0,a.jsx)("input",{type:"text",value:e.value,onChange:s=>{var a,l;return a=e.localeCode,l=s.target.value,void t(e=>e.map(e=>e.localeCode===a?{...e,value:l}:e))},className:"w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500"})]},e.localeCode)),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"button",onClick:g,disabled:i,className:"rounded-md bg-[#00408C] px-4 py-2 text-sm font-semibold text-white hover:bg-blue-500 disabled:opacity-50",children:i?"Saving...":"Save"})})]})]})]})})}},95970:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cms/home-content",function(){return s(86898)}])}},e=>{e.O(0,[8230,3965,636,6593,8792],()=>e(e.s=95970)),_N_E=e.O()}]);
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.