PageSourceSearch

https://www.trimt-nsa.gov.tw/_next/static/chunks/5459-3f8eec6d4769cdd6.js

js trimt-nsa.gov.tw collected 2026-09-24 20:05:50 UTC 9,796 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5459],{5459:function(e,l,a){var t=a(85893),r=a(67294),n=a(87536),i=a(30752),s=a(92762),d=a(21499),c=a(14983),o=a(7076),x=a(5739),m=a(31488),u=a(94960),p=a(89048),h=a(9198),f=a.n(h);a(5843);var j=a(64467),b=a(74306);(0,h.registerLocale)("zh-tw",j.Z);let N=e=>{let{title:l,needComment:a,comment_name:r,id:n,type:i,name:s,idx:d,callback:c,register:o,watch:x,options:m,setValue:p}=e;return x(s),(0,t.jsxs)("div",{className:"d-flex position-relative",children:[(0,t.jsx)("input",{className:"hide-switch",type:i===u.iz.RADIO?"radio":"checkbox",name:s,value:n,id:"".concat(s,"-").concat(d),...o(s,{onChange:e=>{null==c||c(e.target.value)},...m})}),(0,t.jsxs)("label",{className:"option d-flex pl-12px pr-2 py-1 border rounded bg-white trs-all focus-hint ".concat(i===u.iz.RADIO?"radio":""),htmlFor:"".concat(s,"-").concat(d),children:[l,a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("input",{className:"ml-1 px-1 border-top-0 border-left-0 border-right-0 border-bottom",type:"text",id:r,...o(r,{required:null!==x(s)&&void 0!==x(s)&&1*x(s)===n&&"此欄位為必填"})})})]})]})},g=(0,r.forwardRef)((e,l)=>{let{data:a,children:h,onSubmit:j,className:g,policy:v=[{text:"隱私權政策及個人資料使用宣告",url:"/zh-tw/privacy"}],onFormChange:z,showCaptcha:y=!0,hideAcceptBorder:k=!1,acceptCenter:C=!1,acceptText:w}=e,E=(0,b.bU)(),A=(0,r.useRef)(),[Z]=(0,r.useState)((0,p.k$)()),{setValue:q,watch:F,control:R,register:D,handleSubmit:I,formState:{errors:T}}=(0,n.cI)({mode:"onSubmit",defaultValues:{},criteriaMode:"firstError",shouldUnregister:!0});return(0,r.useImperativeHandle)(l,()=>({setValue:q,watch:F})),(0,t.jsxs)("form",{className:g||"",onSubmit:I(j),children:[a.map((e,l)=>{let{title:a,name:i,type:s,value:h,defaultValue:j,options:b,items:g,hint:y,hintClassName:A,label:Z,filterDate:I,minDate:S,maxDate:_,minTime:M,maxTime:P,min:O={value:1},max:Q={value:9999},accept:V="",multiple:B=!1,maxFileNums:H=10,maxFileSize:U=20,callback:X,noAddress:K,orderByGroup:L}=e,W=s===u.iz.RADIO||s===u.iz.CHECKBOX||s===u.iz.ADDRESS||s===u.iz.NUMBER,$=W?"fieldset":r.Fragment;return s===u.iz.HIDDEN?(0,t.jsx)("input",{type:"hidden",name:i,value:h,...D(i)},l):s===u.iz.ACCEPT?(0,t.jsxs)("div",{className:"d-block py-3 ".concat(k?""
1:"border-bottom"," ").concat(C?"d-flex justify-content-center align-items-center":""),children:[(0,t.jsx)("input",{className:"hide-switch",type:"checkbox",name:i,id:i,value:h,...D(i,{...b,onChange:e=>{z&&z(i,e.target.checked),(null==b?void 0:b.onChange)&&b.onChange(e)}})}),(0,t.jsx)("label",{className:"option d-flex flex font-bold",htmlFor:i,children:(0,t.jsx)("div",{children:w||(0,t.jsxs)(t.Fragment,{children:["我已詳閱",v.map((e,l)=>{let{text:a,url:r}=e;return(0,t.jsxs)("div",{className:"d-inline-block",children:[l>0&&"、",(0,t.jsxs)("a",{className:"text-primary",href:r,target:"_blank",rel:"noopener noreferrer",title:"".concat(a,"(另開視窗)"),children:["「",a,"」"]})]},l)}),"文件內容,並完全同意其中各項規定"]})})}),T[i]&&(0,t.jsx)("div",{className:"mt-4px text-danger fz-13px",children:T[i].message})]},l):(0,t.jsx)("div",{className:"d-block py-3 border-bottom",children:(0,t.jsxs)($,{children:[(0,t.jsxs)(W?"legend":"label",{className:"d-inline-flex align-items-baseline mb-1 fz-18px fz-xl-20px font-weight-bold",...W?null:{htmlFor:i},children:[(0,t.jsx)(m.ZP,{children:a}),!!(null==b?void 0:b.required)&&(0,t.jsxs)("div",{className:"ml-1 fz-15px font-weight-bold text-primary",children:["(",(0,t.jsx)(m.ZP,{children:"必填"}),")"]}),!(null==b?void 0:b.required)&&(0,t.jsxs)("div",{className:"ml-2 text-info fz-15px font-weight-normal",children:["(",(0,t.jsx)(m.ZP,{children:"非必填"}),")"]})]}),s===u.iz.FILE&&(0,t.jsx)(n.Qr,{control:R,name:i,rules:{required:null==b?void 0:b.required},render:e=>{let{field:{onChange:l,name:a,ref:r},formState:{errors:n}}=e;return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(o.Z,{className:"mb-1",name:a,onChange:e=>l(e),accept:V,multiple:B,label:Z||"選取檔案",ref:r,maxFileNums:H,maxFileSize:U})})}}),s===u.iz.TEXT&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("input",{type:"text",className:"ipt d-block px-1 rounded fz-16px ".concat(T[i]&&"border-danger"),name:i,id:i,autoComplete:"off",...D(i,b||{})})}),s===u.iz.EMAIL&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("input",{type:"text",className:"ipt d-block px-1 rounded fz-16px ".concat(T[i]&&"border-danger"),name:i,id:i,autoComplete:"off",...D(i,{...b,pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"email格式:[email protected]"}})})}),s===u.iz.COORDINATE&&(0,t.jsxs)("div",{className:"d-flex",children:[(0,t.jsx)("input",{type:"text",className:"ipt d-block px-1 rounded fz-16px ".concat(T[i]&&"border-danger"),name:i,id:i,autoComplete:"off",...D(i,b||{}),style:{maxWidth:400}}),(0,t.jsxs)("button",{className:"btn btn-outline-primary flex-shrink-0 ml-1 rounded text-primary",type:"button",onClick:()=>{(0,p.kK)().then(e=>{q(i,"".concat(e.lat,",").concat(e.lng))})},children:[(0,t.jsx)("i",{className:"icon icon-location mr-4px","aria-hidden":"true"}),"取得當前座標"]})]}),s===u.iz.TEXTAREA&&(0,t.jsx)("textarea",{type:"text",className:"ipt d-block h-[200px] p-1 rounded fz-16px ".concat(T[i]&&"border-danger"),name:i,id:i,autoComplete:"off",...D(i,b||{})}),(s===u.iz.RADIO||s===u.iz.CHECKBOX)&&(L?(0,t.jsx)("div",{children:g.reduce((e,l)=>e.includes(l.group)?e:[...e,l.group],[]).map((e,l)=>(0,t.jsxs)("div",{className:"mb-2 mb-0-last",children:[(0,t.jsx)("div",{className:"font-weight-bold fz-md-18px text-primary",children:e}),(0,t.jsx)("ul",{className:"d-flex flex-wrap mt-2",children:null==g?void 0:g.filter(l=>{let{group:a}=l;return a===e}).map((e,a)=>{let{title:r,id:n,needComment:d}=e;return(0,t.jsx)("li",{className:"mb-2 mr-2",children:(0,t.jsx)(N,{title:r,needComment:d,id:n,type:s,name:i,idx:"".concat(l,"-").concat(a),callback:X,register:D,watch:F,setValue:q,options:{...b,required:null!==F(i)&&void 0!==F(i)&&1*F(i)===n&&"此欄位為必填"}})},n)})})]},l))}):(0,t.jsx)("ul",{className:"d-flex flex-wrap",children:null==g?void 0:g.map((e,l)=>{let{title:a,id:r,needComment:n,comment_name:d}=e;return(0,t.jsx)("li",{className:"mb-2 mr-2",children:(0,t.jsx)(N,{title:a,needComment:n,comment_name:d,id:r,type:s,name:i,idx:l,callback:X,register:D,watch:F,setValue:q,options:{...b,required:null!==F(i)&&void 0!==F(i)&&1*F(i)===r&&"此欄位為必填"}})},r)})})),s===u.iz.TIME_RANGE&&(0,t.jsx)(n.Qr,{control:R,name:i,rules:{required:null==b?void 0:b.required},defaultValue:j,render:e=>
1{let{field:{onChange:l,value:a,ref:r}}=e;return(0,t.jsx)("div",{className:"d-flex",children:(0,t.jsx)(c.Z,{value:a,onChange:e=>{l(e)},minTime:M,maxTime:P,ref:r})})}}),s===u.iz.ADDRESS&&(0,t.jsx)(n.Qr,{control:R,name:i,rules:{required:null==b?void 0:b.required},defaultValue:j,render:e=>{let{field:{onChange:l,value:a,ref:r}}=e;return(0,t.jsx)("div",{className:"w-100",children:(0,t.jsx)(x.Z,{onChange:l,noAddress:!!K})})}}),s===u.iz.DATE&&(0,t.jsx)(n.Qr,{control:R,name:i,rules:{required:"此欄位為必填"},render:e=>{let{field:{onChange:l,name:a,value:r,ref:n},formState:{errors:i}}=e;return(0,t.jsxs)("div",{className:"position-relative",style:{maxWidth:180},children:[(0,t.jsx)(f(),{selected:r,onChange:e=>{l(e)},dateFormat:"yyyy-MM-dd",locale:"zh-tw",peekNextMonth:!0,dropdownMode:"select",placeholderText:(0,m.Iu)("範例:",E)+"".concat(new Date().getFullYear(),"-01-01"),className:"".concat(i[a]&&"border-danger"," ipt d-block flex-fill px-1 rounded fz-16px"),ref:e=>{e&&n(e.input)},id:a,...I?{filterDate:I}:null,...S?{minDate:S}:null,..._?{maxDate:_}:null}),(0,t.jsx)("i",{className:"icon icon-calendar h-5 w-5 text-info absolute-top-right pointer-events-none fz-20px","aria-hidden":"true"})]})}}),s===u.iz.NUMBER&&(0,t.jsx)(n.Qr,{control:R,name:i,rules:{required:null==b?void 0:b.required,min:O,max:Q},defaultValue:j,render:e=>{let{field:{onChange:l,value:a,ref:r}}=e;return(0,t.jsx)("div",{className:"d-flex",children:(0,t.jsx)(d.Z,{value:a||j,onChange:e=>{l(e)},min:O.value,max:Q.value,ref:r})})}}),y&&(0,t.jsx)(t.Fragment,{children:Array.isArray(y)?y.map((e,l)=>(0,t.jsx)("div",{className:A||"mt-4px text-info fz-13px",children:e},l)):(0,t.jsx)("div",{className:A||"mt-4px text-info fz-13px",children:(0,t.jsx)(m.ZP,{children:y})})}),T[i]&&(0,t.jsx)("div",{className:"mt-4px text-danger fz-13px",children:(0,t.jsx)(m.ZP,{children:T[i].message})}),T["".concat(i,"_comment")]&&(0,t.jsx)("div",{className:"mt-4px text-danger fz-13px",children:T["".concat(i,"_comment")].message})]})},l)}),y&&(0,t.jsxs)("div",{className:"py-3 border-bottom",children:[(0,t.jsxs)("label",{className:"d-inline-flex align-items-baseline mb-1 fz-18px fz-xl-20px font-weight-bold",htmlFor:"captcha",children:[(0,t.jsx)(m.ZP,{children:"驗證碼"}),(0,t.jsxs)("div",{className:"ml-2 text-primary fz-15px font-weight-bold",children:["(",(0,t.jsx)(m.ZP,{children:"必填"}),")"]})]}),(0,t.jsxs)("div",{className:"d-flex align-items-center",children:[(0,t.jsx)("input",{type:"text",className:"ipt d-block px-1 rounded fz-16px ".concat(T.captcha&&"border-danger"),name:"captcha",id:"captcha",autoComplete:"off",...D("captcha",{required:"此欄位為必填"}),style:{maxWidth:120}}),(0,t.jsx)(i.Z,{className:"ml-1",ref:A}),(0,t.jsx)(s.Z,{className:"ml-1"}),(0,t.jsxs)("button",{className:"btn flex-shrink-0 ml-1 rounded",type:"button",style:{width:42,he
1ight:42},onClick:()=>{A.current.reload()},children:[(0,t.jsx)("i",{className:"icon icon-reload","aria-hidden":"true"}),(0,t.jsx)("div",{className:"sr-only",children:"更新驗證碼圖片"})]})]}),T.captcha&&(0,t.jsx)("div",{className:"mt-4px text-danger fz-12px",children:(0,t.jsx)(m.ZP,{children:T.captcha.message})})]}),(0,t.jsx)("input",{name:"__RequestVerificationToken",type:"hidden",value:Z}),h]})});l.Z=r.memo(g)}}]);

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.