PageSourceSearch

https://www.ditp.go.th/_next/static/chunks/pages/e-survey-from/[id]/preview-f3f3ef80e7db56d9.js

js ditp.go.th collected 2026-10-02 04:03:19 UTC 7,167 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19],{77393:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/e-survey-from/[id]/preview",function(){return t(54772)}])},13897:function(e,a,t){"use strict";t.d(a,{h:function(){return o}});var s=t(84906),l=t(99571),r=t(67294);let o=e=>{let{ssoAccount:a,locale:t,mode:o="live"}=e,[i,d]=(0,r.useState)([]),[n,u]=(0,r.useState)([]),[v,c]=(0,r.useState)(!0),m="guest_saved_form_".concat(s.B$),g="sso_saved_form_".concat(null==a?void 0:a.ssoid),p=!a,y=(0,r.useCallback)((e,a)=>e.surveyDocumentID===a&&e.locale===t&&e.mode===o,[t,o]),f=(0,r.useCallback)(()=>{try{if(a){let e=localStorage.getItem(g),a=JSON.parse(e||"[]");u(a)}let e=localStorage.getItem(m),t=JSON.parse(e||"[]");d(t)}catch(e){console.error("Error loading survey data:",e),d([]),u([])}finally{c(!1)}},[m,g,a]),x=(0,r.useCallback)((e,a)=>{try{let s=JSON.parse(localStorage.getItem(m)||"[]"),l=JSON.parse(localStorage.getItem(g)||"[]");if(p){let l;l=s.find(e=>y(e,a))?s.map(t=>y(t,a)?{...t,values:e,lastUpdate:new Date().toISOString()}:t):[...s,{surveyDocumentID:a,locale:t,mode:o,values:e,lastUpdate:new Date().toISOString()}],d(l),localStorage.setItem(m,JSON.stringify(l))}else{let s;s=l.find(e=>y(e,a))?l.map(t=>y(t,a)?{...t,values:e,lastUpdate:new Date().toISOString()}:t):[...l,{surveyDocumentID:a,locale:t,mode:o,values:e,lastUpdate:new Date().toISOString()}],u(s),localStorage.setItem(g,JSON.stringify(s))}return!0}catch(e){return console.error("Error saving survey data:",e),!1}},[m,g,p,y,t,o]),S=(0,r.useCallback)(()=>{try{return localStorage.removeItem(m),d([]),localStorage.removeItem(g),u([]),!0}catch(e){return console.error("Error clearing survey data:",e),!1}},[m,g,p]),_=(0,r.useCallback)(e=>{if(p){let a=JSON.parse(localStorage.getItem(m)||"[]").filter(a=>!y(a,e));d(a),localStorage.setItem(m,JSON.stringify(a))}else{let a=JSON.parse(localStorage.getItem(g)||"[]").filter(a=>!y(a,e));u(a),localStorage.setItem(g,JSON.stringify(a))}},[p,m,g,y]),h=(0,r.useCallback)((e,a)=>{var t,s;let r=i,o=n;try{r=JSON.parse(localStorage.getItem(m)||"[]"),o=JSON.parse(localStorage.getItem(g)||"[]")}catch(e){console.error(e)}if(p){let s=(null===(t=r.find(a=>y(a,e)))||void 0===t?void 0:t.values)||null;return(0,l.rd)(a,s)}{let t=(null===(s=o.find(a=>y(a,e)))||void 0===s?void 0:s.values)||null;return(0,l.rd)(a,t)}},[p,i,n,y,m,g]);return(0,r.useEffect)(()=>{f()},[f]),{storageGuestData:i,storageSsoData:n,isLoading:v,saveFormData:x,removeFormData:_,clearData:S,loadData:f,getSavedFormData:h}}},84906:function(e,a,t){"use strict";t.d(a,{B$:function(){return s}}),t(97385);let s="cid-ditp"},54772:function(e,a,t){"use strict";t.r(a),t.d(a,{CreateAssessmentPage:function(){return p},__N_SSP:function(){return g}});var s=t(85893),l=t(66308),r=t(67294),o=t(3632),i=t(68341),d=t.n(i),n=t(10544),u=t(49899),v=t(99571),c=t(61488),m=t(55698),g=!0;function p(e){var a,t,i,g,p,y,f,x,S,_,h,N,b,w,j,I,k,O,P,D,J,C,E,A,U,Z,z,B,F;let{ssoAccount:R}=e,T=(0,r.useMemo)(()=>{var a,t;if(null===(a=e.surveysdata)||void 0===a?void 0:a.data)return(0,v.DQ)(null===(t=e.surveysdata)||void 0===t?void 0:t.data)},[e.surveysdata]),X=null==T?void 0:T.isAssessment,$=[{label:"หน้าหลัก",link:"/"},{label:X?"แบบสอบถามความพร้อมในการส่งออก / Export Readiness Assessment":"แบบสอบถามประชาชน / Public Participation (e-Form / e-Survey)",link:X?"/e-survey-export-readiness-assessment":"/e-survey-public-participation"},{label:null===(t=e.surveysdata)||void 0===t?void 0:null===(a=t.data)||void 0===a?void 0:a.survey_name}];return e.surveysdata?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{title:(null==e?void 0:null===(g=e.surveysdata)||void 0===g?void 0:null===(i=g.data)||void 0===i?void 0:i.survey_name)||"แบบประเมิน (Preview)",description:(null==e?void 0:null===(y=e.surveysdata)||void 0===y?void 0:null===(p=y.data)||void 0===p?void 0:p.survey_description)?e.surveysdata.data.survey_description.replace(/<[^>]*>?/gm,"").trim().slice(0,160):"Preview แบบประเมิน",breadcrumbs:[{label:(null==e?void 0:null===(x=e.message)||void 0===x?void 0:null===(f=x.HomePage)||void 0===f?void 0:f.home)||"หน้าหลัก",link:"/"},{label:(null==e?void 0:null===(_=e.surveysdata)||void 0===_?void 0:null===(S=_.data)||void 0===S?void 0:S.survey_name)||"แบบประเมิน (Preview)"}]}),(0,s.jsxs)("div",{className:"pt-16 pb-16",style:{background:(null===(N=e.surveysdata)||void 0===N?void 0:null===(h=N.data)||void 0===h?void 0:h.background_theme)?"url(".concat(null===(w=e.surveysdata)||void 0===w?void 0:null===(b=w.data)||void 0===b?void 0:b.background_theme,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}
1,children:[(0,s.jsx)("div",{className:"sticky top-[60px] bg-white z-20",children:(0,s.jsx)(o.Z,{paths:$})}),(0,s.jsxs)("div",{className:"max-w-screen-lg mx-auto p-6 bg-white rounded-2xl mt-6",children:[(null===(I=e.surveysdata)||void 0===I?void 0:null===(j=I.data)||void 0===j?void 0:j.image_cover)&&(null===(O=e.surveysdata)||void 0===O?void 0:null===(k=O.data)||void 0===k?void 0:k.image_cover_active)?(0,s.jsx)("div",{className:"max-w-[1000px] h-[180px] overflow-hidden rounded-2xl",children:(0,s.jsx)("img",{src:null===(D=e.surveysdata)||void 0===D?void 0:null===(P=D.data)||void 0===P?void 0:P.image_cover,alt:"Profile",className:"w-full h-full object-cover object-[center_80%]"})}):null,(0,s.jsxs)("div",{className:"flex flex-row space-x-4 mt-8",children:[(0,s.jsx)("p",{children:"ทำเเบบสอบถาม:"}),(0,s.jsxs)("div",{className:"flex flex-row space-x-2",children:[(0,s.jsx)("img",{src:"/icons/group_login.png",alt:"Profile",className:"w-[20px] h-[20px]"}),(0,s.jsx)("p",{className:"font-semibold",children:R?"User":"Guest"})]})]}),(0,s.jsxs)("div",{className:"mt-8",children:[(0,s.jsx)("h1",{className:"text-[24px] lg:text-[40px] font-semibold text-[#10143C]",children:null===(C=e.surveysdata)||void 0===C?void 0:null===(J=C.data)||void 0===J?void 0:J.survey_name}),(null===(A=e.surveysdata)||void 0===A?void 0:null===(E=A.data)||void 0===E?void 0:E.role_ditps)&&e.surveysdata.data.role_ditps.length>0?(0,s.jsxs)("div",{className:"text-sm text-[#10143C] mb-4",children:["โดย"," ",e.surveysdata.data.role_ditps.map(e=>e.name).join(", ")]}):null,(0,s.jsx)("div",{className:"mb-8",children:(null===(Z=e.surveysdata)||void 0===Z?void 0:null===(U=Z.data)||void 0===U?void 0:U.survey_description)?d()(null===(B=e.surveysdata)||void 0===B?void 0:null===(z=B.data)||void 0===z?void 0:z.survey_description):null}),(0,s.jsx)("div",{className:"container",children:(0,s.jsx)(n.f1,{children:(0,s.jsx)(u.Z,{isPreview:!0,surveyData:T,storageKey:"ditp_survey_test",enableAutoSave:!0,showProgress:!0,showNavigation:!0,className:"test-survey-form",ssoAccount:R})})})]}),(0,s.jsx)(c.Z,{isPreview:!0,survey:null===(F=e.surveysdata)||void 0===F?void 0:F.data,messages:e.message})]})]})]}):(0,s.jsx)(m.Z,{})}a.default=p}},function(e){e.O(0,[2275,8341,6310,512,8899,3349,7717,6308,1289,266,7804,2888,9774,179],function(){return e(e.s=77393)}),_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.