PageSourceSearch

https://trinhfoundation.org/_next/static/chunks/pages/admin/author/update/[id]-d0a02fc171e0e9f8.js

js trinhfoundation.org collected 2026-10-06 13:02:57 UTC 14,725 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3421],{79090:function(t,e,n){"use strict";var i=n(1413),a=n(67294),o=n(15294),r=n(91146),s=function(t,e){return a.createElement(r.Z,(0,i.Z)((0,i.Z)({},t),{},{ref:e,icon:o.Z}))};s.displayName="LoadingOutlined",e.Z=a.forwardRef(s)},57953:function(t,e,n){"use strict";n.d(e,{Z:function(){return y}});var i=n(94184),a=n.n(i),o=n(27856),r=n(98423),s=n(67294),l=n(53124),c=n(96159),u=n(51222),d=n(67968),p=n(45503),_=n(14747);const m=new u.E4("antSpinMove",{to:{opacity:1}}),f=new u.E4("antRotate",{to:{transform:"rotate(405deg)"}}),h=t=>({[`${t.componentCls}`]:Object.assign(Object.assign({},(0,_.Wf)(t)),{position:"absolute",display:"none",color:t.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${t.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${t.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-t.spinDotSize/2},[`${t.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(t.spinDotSize-t.fontSize)/2+2,textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-t.spinDotSize/2-10},"&-sm":{[`${t.componentCls}-dot`]:{margin:-t.spinDotSizeSM/2},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeSM-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-t.spinDotSizeSM/2-10}},"&-lg":{[`${t.componentCls}-dot`]:{margin:-t.spinDotSizeLG/2},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeLG-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-t.spinDotSizeLG/2-10}}},[`${t.componentCls}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${t.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:t.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(t.spinDotSize-t.marginXXS/2)/2,height:(t.spinDotSize-t.marginXXS/2)/2,backgroundColor:t.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:m,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:f,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeSM,i:{width:(t.spinDotSizeSM-t.marginXXS/2)/2,height:(t.spinDotSizeSM-t.marginXXS/2)/2}},[`&-lg ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeLG,i:{width:(t.spinDotSizeLG-t.marginXXS)/2,height:(t.spinDotSizeLG-t.marginXXS)/2}},[`&${t.componentCls}-show-text ${t.componentCls}-text`]:{display:"block"}})});var g=(0,d.Z)("Spin",(t=>{const e=(0,p.TS)(t,{spinDotDefault:t.colorTextDescription,spinDotSize:t.controlHeightLG/2,spinDotSizeSM:.35*t.controlHeightLG,spinDotSizeLG:t.controlHeight});return[h(e)]}),{contentHeight:400}),v=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n};let S=null;const b=t=>{const{spinPrefixCls:e,spinning:n=!0,delay:i=0,className:u,size:d="default",tip:p,wrapperClassName:_,style:m,children:f,hashId:h}=t,g=v(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children","hashId"]),[b,x]=s.useState((()=>n&&!function(t,e){return!!t&&!!e&&!isNaN(Number(e))}(n,i)));s.useEffect((()=>{const t=(0,o.D)(i,(()=>{x(n)}));return t(),()=>{var e;null===(e=null===t||void 0===t?void 0:t.cancel)||void 0===e||e.call(t)}}),[i,n]);const y=s.useMemo((()=>"undefined"!==typeof f),[f]),{direction:C}=s.useContext(l.E_),N=a()(e,{[`${e}-sm`]:"small"===d,[`${e}-lg`]:"large"===d,[`${e}-spinning`]:b,[`${e}-show-text`]:!!p,[`${e}-rtl`]:"rtl"===C},u,h),w=a()(`${e}-container`,{[`${e}-blur`]:b}),D=(0,r.Z)(g,["indicator","prefixCls"]),z=s.createElement("div",Object.assign({},D,{style:m,className:N,"aria-live":"polite","aria-busy":b}),function(t,e){const{indicator:n}=e,i=`${t}-dot`;return null===n?null:(0,c.l$)(n)?(0,c.Tm)(n,{className:a()(n.props.className,i)}):(0,c.l$)(S)?(0,c.Tm)(S,{className:a()(S.props.className,i)}):s.createElement("span",{className:a()(i,`${t}-dot-spin`)},s.createElement("i",{className:`${t}-dot-item`}),s.createElement("i",{className:`${t}-dot-item`}),s.createElement("i",{className:`${t}-dot-item`}),s.createElement("i",{className:`${t}-dot-item`}))}(e,t),p?s.createElement("div",{className:`${e}-text`},p):null);return y?s.createElement("div",Object.assign({},D,{className:a()(`${e}-nested-loading`,_,h)}),b&&s.createElement("div",{key:"loading"},z),s.createElement("div",{className:w,key:"container"},f)):z},x=t=>{const{prefixCls:e}=t,{getPrefixCls:n}=s.useContext(l.E_),i=n("spin",e),[a,o]=g(i),r=Object.assign(Object.assign({},t),{spinPrefixCls:i,hashId:o});return a(s.createElement(b,Object.assign({},r)))};x.setDefaultIndicator=t=>{S=t};var y=x},70847:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/author/update/[id]",function(){return n(38604)}])},30452:function(t,e,n){"use strict";var i=n(41799),a=n(69396),o=n(85893),r=n(64082),s=n(72708),l=(n(9669),s.Z.Dragger);e.Z=function(t){return(0,o.jsxs)(l,(0,a.Z)((0,i.Z)({className:t.className?t.className:null,onChange:t.changeHandler,size:t.size?t.size:"large",action:t.action?t.action:"".concat("https://trinh-api-n24xr.ondigitalocean.app/v1/","upload/").concat(t.folderName),listType:"picture",maxCount:t.maxCount?t.maxCount:1},t),{children:[(0,o.jsx)("p",{className:"ant-upload-drag-icon",children:(0,o.jsx)(r.Z,{})}),(0,o.jsx)("p",{className:"ant-upload-text",children:"Click or drag file to this area to upload"})]}))}},81206:function(t,e,n){"use strict";n.d(e,{a:function(){return l}});var i=n(85893),a=n(79090),o=n(57953),r=n(27698),s=n.n(r),l=function(t){var e=(0,i.jsx)(a.Z,{style:{fontSize:t.size?t.size:24,color:t.color?t.color:"white"},spin:!0});return(0,i.jsx)("span",{className:t.full?s()["loader--full"]:s().loader,children:(0,i.jsx)(o.Z,{indicator:e})})}},25549:function(t,e,n){"use strict";var i=n(85893),a=(n(67294),n(19979)),o=n.n(a),r=n(99504);n(4298);e.Z=function(t){return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:o().editor,id:t.
1id,children:(0,i.jsx)(r.vM,{editorUrl:"".concat("https://trinhfoundation.org","/ckeditor/ckeditor.js"),initData:t.value,onChange:function(e){try{var n=e.editor.getData();"function"==typeof t.onChange&&t.onChange(n)}catch(i){console.log(i)}},config:{filebrowserUploadUrl:"".concat("https://trinh-api-n24xr.ondigitalocean.app/v1/","ck-editor-upload/").concat(t.folder),filebrowserUploadMethod:"xhr",uploadUrl:"".concat("https://trinh-api-n24xr.ondigitalocean.app/v1/","ck-editor-upload/").concat(t.folder),imageUploadUrl:"".concat("https://trinh-api-n24xr.ondigitalocean.app/v1/","ck-editor-upload/").concat(t.folder)}})})})}},64069:function(t,e,n){"use strict";var i=n(47568),a=n(82670),o=n(29815),r=n(70655),s=n(67294),l=n(32739);e.Z=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,s.useState)(e),c=n[0],u=(n[1],(0,s.useState)({})),d=u[0],p=u[1],_=(0,s.useState)([]),m=_[0],f=_[1],h=(0,s.useState)([]),g=h[0],v=h[1],S=(0,s.useState)(t),b=S[0],x=S[1],y=(0,l.o)()[1],C=function(){var t=(0,i.Z)((function(t){var e,n,i,a,s,l,u,d;return(0,r.__generator)(this,(function(r){switch(r.label){case 0:return[4,y("IMAGE_UPLOAD",((n={}).file=t.file,n.fileList=t.fileList,n.folder=b,n))];case 1:return e=r.sent(),i=e.file,a=e.fileList,s=e.error,console.log(i,a,s),d={},s||(c?(l=(0,o.Z)(m),i.removed?-1!=(u=l.findIndex((function(t){return t.uid==i.uid})))&&(l.splice(u,1),f((0,o.Z)(l))):Object.entries(i).length>0&&(l.push(i),f((0,o.Z)(l)))):i.removed?p(d):Object.entries(i).length>0&&(i&&i.url?(i.url.startsWith("https://")||(i.url="https://".concat(i.url)),p(i)):p(i)),v(a)),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),N=function(){c?f([]):p({}),v([])},w=function(t,e){c?(0,a.Z)(t,Array)?f(t):f([t]):p(t),v(e)},D=function(t){x(t)};return{image:d,images:m,imageList:g,folder:b,imageChangeHandler:C,clearImage:N,setData:w,updateFolder:D}}},38604:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return x}});var i=n(47568),a=n(828),o=n(70655),r=n(85893),s=n(81916),l=n.n(s),c=n(30452),u=n(67294),d=n(36742),p=n(87978),_=n(71577),m=n(81206),f=n(11163),h=n(74487),g=n(64069),v=n(25549),S=n(32739),b=n(25646);function x(){var t=(0,a.Z)((0,S.o)(),2),e=(t[0],t[1]),n=(0,u.useState)(""),s=n[0],x=n[1],y=(0,u.useState)(""),C=y[0],N=y[1],w=(0,g.Z)("authors"),D=(0,u.useState)(!0),z=D[0],$=D[1],I=(0,u.useState)(!1),E=I[0],Z=I[1],j=(0,f.useRouter)(),G=(0,u.useContext)(b.Z),W=function(){var t=(0,i.Z)((function(t){var e,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:Z(!0),t.preventDefault(),(n={}).name=s,n.about=C,n.image=w.image,e=n,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,k(e)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),console.error(i),[3,4];case 4:return Z(!1),[2]}}))}));return function(e){return t.apply(this,arguments)}}();function k(t){return O.apply(this,arguments)}function O(){return(O=(0,i.Z)((function(t){var n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return n=j.query.id,[4,e("UPDATE",((i={}).model=h.S7,i.id=n,i.data=t,i.token=G.token,i))];case 1:return[2,a.sent()]}}))}))).apply(this,arguments)}var Y=(0,u.useCallback)(function(){var t=(0,i.Z)((function(t){var n,i,a;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return $(!0),[4,e("GET_ONE",((i={}).model=h.S7,i.id=t,i.token=G.token,i))];case 1:return n=o.sent(),a=n.data.item,x(a.name),N(a.about),a.image&&w.setData(a.image,[a.image]),$(!1),[2]}}))}));return function(e){return t.apply(this,arguments)}}(),[]);return(0,u.useEffect)((function(){var t=j.query.id;t&&G.token&&Y(t)}),[Y,j.query,G.token]),(0,r.jsx)(d.Z,{name:"Update Author",children:z?(0,r.jsx)(m.a,{full:!0}):(0,r.jsx)("div",{className:l().update,children:(0,r.jsxs)("div",{className:l().update__container,children:[(0,r.jsx)("div",{className:l().update__container__label,children:"Name"}),(0,r.jsx)(p.Z,{className:l().update__container__input,onChange:function(t){return x(t.target.value)},value:s,size:"large",id:"name"}),(0,r.jsx)("div",{className:l().update__container__label,children:"About"}),(0,r.jsx)(v.Z,{folder:"authors",value:C,onChange:function(t){return N(t)}}),(0,r.jsx)("div",{className:l().update__container__label,children:"Image"}),(0,r.jsx)("div",{className:l().update__container__input,children:(0,r.jsx)(c.Z,{className:l()["update__container__input--upload"],changeHandler:w.imageChangeHandler,folderName:"authors",defaultFileList:w.imageList,id:"image"})}),(0,r.jsx)(_.ZP,{className:l()["update__container__input--submit"],onClick:W,loading:E,id:"updateButton",children:"Update"})]})})})}},27698:function(t){t.exports={loader:"loader_loader__W_eGo","loader--full":"loader_loader--full__Wquxp"}},19979:function(t){t.exports={editor:"WYSIWYG_editor__Nlucp",swing:"WYSIWYG_swing__46nbQ",move:"WYSIWYG_move__v3oI5",statisticMove:"WYSIWYG_statisticMove__TC7FS",text:"WYSIWYG_text__VVtwK",shineScale:"WYSIWYG_shineScale___V7gH",shineRotate:"WYSIWYG_shineRotate__4Bb0X",circle:"WYSIWYG_circle__dGOaw",gradient:"WYSIWYG_gradient__nTMjZ",slide:"WYSIWYG_slide__S7LZH",glowing:"WYSIWYG_glowing__Es3cU",linearGradient:"WYSIWYG_linearGradient__PmZqt",zoom:"WYSIWYG_zoom__ApHgT"}},81916:function(t){t.exports={update__container:"update_update__container__C5DXz",update__container__label:"update_update__container__label__oV5qy",update__container__table:"update_update__container__table__rfvQf",update__container__table__input:"update_update__container__table__input__WViBi",update__container__table__add:"update_update__container__table__add__pTkcg",update__container__input
1:"update_update__container__input__zI79Z","update__container__input--checkbox":"update_update__container__input--checkbox__Dmc9e","update__container__input--upload":"update_update__container__input--upload__hd3Ip","update__container__input--submit":"update_update__container__input--submit__UYt3V","update__container__input--disabled":"update_update__container__input--disabled__Rdh_K",swing:"update_swing__JbIZF",move:"update_move__Er8E7",statisticMove:"update_statisticMove__AQGvN",text:"update_text__6f5zY",shineScale:"update_shineScale__6WCGO",shineRotate:"update_shineRotate__prH_i",circle:"update_circle__E_Ano",gradient:"update_gradient__pUqSX",slide:"update_slide__INo_7",glowing:"update_glowing__FpiHN",linearGradient:"update_linearGradient__klM4i",zoom:"update_zoom__BbhO1"}},82670:function(t,e,n){"use strict";function i(t,e){return null!=e&&"undefined"!==typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}n.d(e,{Z:function(){return i}})},27856:function(t,e,n){"use strict";function i(t,e,n){var i=(n||{}).atBegin;return function(t,e,n){var i,a=n||{},o=a.noTrailing,r=void 0!==o&&o,s=a.noLeading,l=void 0!==s&&s,c=a.debounceMode,u=void 0===c?void 0:c,d=!1,p=0;function _(){i&&clearTimeout(i)}function m(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=this,c=Date.now()-p;function m(){p=Date.now(),e.apply(s,a)}function f(){i=void 0}d||(l||!u||i||m(),_(),void 0===u&&c>t?l?(p=Date.now(),r||(i=setTimeout(u?f:m,t))):m():!0!==r&&(i=setTimeout(u?f:m,void 0===u?t-c:t)))}return m.cancel=function(t){var e=(t||{}).upcomingOnly,n=void 0!==e&&e;_(),d=!n},m}(t,e,{debounceMode:!1!==(void 0!==i&&i)})}n.d(e,{D:function(){return i}})}},function(t){t.O(0,[2422,1517,8819,9814,3206,5137,8330,6742,9774,2888,179],(function(){return e=70847,t(t.s=e);var e}));var e=t.O();_N_E=e}]);

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.