https://www.goodcompany.com.au/_next/static/chunks/pages/admin/bac…/[id]/charity-6537a431133910d2.js
1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0e9bd7a4-af0f-4a3c-8335-c99b77bf6970",e._sentryDebugIdIdentifier="sentry-dbid-0e9bd7a4-af0f-4a3c-8335-c99b77bf6970")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6504],{532:(e,t,n)=>{"use strict";n.d(t,{Lw:()=>v,yB:()=>a.A});var a=n(84974),r=n(37876),o=n(14232);n(30063),n(80828);var i=n(15039),l=n.n(i),s=n(8949),c=n(35070),d=n(68441),u=n(44264),p=n(45991);let h=u.Ay.div.withConfig({componentId:"sc-13b73589-0"})(["background-color:#ffffff;position:fixed;z-index:400;top:5.1428571rem;right:0;left:0;"]),m=e=>{let{titleList:t,selected:n,hidePreviousButton:a,onClickBack:o,onNavigate:i}=e,l=t.map(e=>{let{id:t,title:n}=e;return{id:String(t),label:n}}),s=null!=n?String(n):l.length>0?l[0].id:void 0;return(0,r.jsx)(h,{children:(0,r.jsx)(p.A,{onClickBack:o,onNavigate:i,stepList:l,currentStep:s,hideLeftButton:a})})};var g=n(19818),f=n(7550),x=n.n(f);let v=e=>{let{actions:t,onPrevious:n,onNext:a,children:i,showTopCard:u,titleList:p,pageIndex:h,topTitle:f,tipsOpen:v,onCloseTips:y,hidePreviousButton:b=!1}=e,w=(0,o.useContext)(g.f5);return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(d.TD,{}),(0,r.jsxs)("header",{className:x().header,children:[(0,r.jsx)("div",{className:x().logoContainer,children:(0,r.jsx)("a",{href:"/","aria-label":"Home",children:(0,r.jsx)("img",{className:x().logoImage,src:w.getLogoUrl(),height:60,alt:"Logo"})})}),(0,r.jsx)("div",{className:x().progressContainer,children:(0,r.jsx)(s.E,{as:"h1",fontWeight:"medium",children:f})}),(0,r.jsx)("div",{className:x().actionsContainer,children:null==t?void 0:t.map((e,t)=>(0,r.jsx)(c.$,{onClick:e.onAction,url:e.url,target:e.external?"_blank":void 0,tone:e.destructive?"critical":void 0,disabled:e.disabled,icon:e.icon,children:e.content},t))})]}),u&&0!=h&&(0,r.jsx)(m,{onClickBack:n,onNavigate:a,titleList:p,selected:h,hidePreviousButton:b}),(0,r.jsxs)("main",{className:l()(x().main,0===h&&x().extraPadding),children:[(0,r.jsx)("div",{className:x().pageControl,children:!1}),(0,r.jsx)("div",{className:x().pageContent,children:i}),(0,r.jsx)("div",{className:x().pageControl,children:!1})]})]})}},7550:e=>{e.exports={logoContainer:"CreateScreenLayout_logoContainer__2fp5V",progressContainer:"CreateScreenLayout_progressContainer__4DD_0",progressBar:"CreateScreenLayout_progressBar__xgvqz",actionsContainer:"CreateScreenLayout_actionsContainer__8_h8E",main:"CreateScreenLayout_main__p0uYF",pageControl:"CreateScreenLayout_pageControl__B_bMn",pageControlButton:"CreateScreenLayout_pageControlButton__f9iHq",pageContent:"CreateScreenLayout_pageContent__bnc4p",hide:"CreateScreenLayout_hide__Rxh8m",extraPadding:"CreateScreenLayout_extraPadding__yrr_a",logoImage:"CreateScreenLayout_logoImage__5b_HQ",header:"CreateScreenLayout_header__hAzxV",skeletonShimmerAnimation:"CreateScreenLayout_skeletonShimmerAnimation__R5i4z"}},12999:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var a=n(14232),r=n(76232),o=n(96132);let i=(0,a.memo)(function(e){let t=(0,a.useId)(),{showToast:n,hideToast:i}=(0,o.j)();return(0,r.h)(()=>(n({id:t,...e}),()=>{i({id:t})}),[e]),null})},13352:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(37876),r=n(81903),o=n(32395);let i=n(44264).Ay.p.withConfig({componentId:"sc-d7bb092a-0"})(["margin-right:10px;"]),l=e=>{let{title:t,text:n,open:l,primaryText:s,secondaryText:c,hideSecondaryAction:d,forceClose:u,onDelete:p,onClose:h}=e;return(0,a.jsx)(r.a,{open:l,onClose:u||h,title:t,primaryAction:{content:s||"Yes",onAction:p},secondaryActions:!d&&[{content:c||"No",onAction:h}],children:(0,a.jsx)(r.a.Section,{children:(0,a.jsx)(o.a,{children:(0,a.jsx)(i,{children:(0,a.jsx)("p",{children:n})})})})})}},15127:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/backoffice/content-approval/[id]/charity",function(){return n(40850)}])},20982:(e,t,n)=>{"use strict";n.d(t,{Y:()=>c});var a=n(36190),r=n(69034),o=n(93087),i=n(9938),l=n(53965);let s=async e=>{let t=await a.LN(e.req),n=(await (0,i.KU)(l.RootClient,e.req)).getRoot(),o=(await n).currentSite.features;return[...(0,r.bJ)(t)?[]:t.items,...o]},c=(0,o.Lu)(s)},24168:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var a=n(37876),r=n(14232),o=n(18847),i=n.n(o),l=n(36020),s=n.n(l),c=n(9348),d=n.n(c),u=n(2682),p=n(32395),h=n(8949),m=n(94089),g=n(12999),f=n(82027);let x=e=>{let{value:t,id:o,error:l,placeholder:c,isRequired:x=!1,conversionRequired:v=!1,convertPermanent:y=!1,readonly:b,label:w,minHeight:j,
1contentWidth:C,mention:A,onChange:_,onFocus:S}=e,[k,N]=(0,r.useState)(t||""),[E,D]=(0,r.useState)(v),[L,V]=(0,r.useState)(!1),M=(0,r.useMemo)(()=>i()(async()=>n.e(764).then(n.bind(n,80764)).then(e=>e.Editor),{loadableGenerated:{webpack:()=>[80764]},ssr:!1}),[]);(0,r.useEffect)(()=>{if(!t)return void N("");if(t&&E||t&&y){D(!1);let e=A?t.replace(/@(?=\{\{)/g,""):t;N((0,u.AD)(e)&&d().toHTML(e)?d().toHTML(e):e)}},[t,E,y,A]);let R=A?"editor-with-mentions":"editor-basic";return(0,a.jsxs)(p.a,{gap:"100",children:[w&&(0,a.jsx)(h.E,{as:"span",children:w}),(0,a.jsx)("div",{className:x&&!t&&l?s().error:s().shrink,children:(0,a.jsx)(M,{tinymceScriptSrc:"/tinymce/tinymce.min.js",value:k,init:{license_key:"gpl",menubar:!1,convert_urls:!1,plugins:["link","lists","emoticons","autolink","autosave","wordcount","image"],automatic_uploads:!0,image_dimensions:!C,images_upload_handler:async e=>{try{let t=e.blob(),n=new File([t],e.filename(),{type:t.type}),a=await (0,f.imageUpload)(n,"backoffice");if(!(null==a?void 0:a.url))throw Error("Image upload failed");return a.url}catch(e){throw V(!0),Error("Image upload failed")}},toolbar:"undo redo | bold italic underline | bullist numlist | alignleft aligncenter alignright al
1ignjustify | link image emoticons | removeformat",branding:!1,statusbar:!1,placeholder:c,min_height:j||160,readonly:!!b,content_style:"\n .email-template-token {\n color: #1f6feb;\n font-weight: 600;\n }\n ".concat(C?"body { max-width: ".concat(C,"px; margin: 0 auto; } img { max-width: 100%; height: auto; }"):"","\n "),setup:e=>{var t;if(C){let t=e=>{let t=parseInt(e.attr("width")||"",10);if(t&&t<=C)return;e.attr("width",String(C)),e.attr("height",void 0);let n=(e.attr("style")||"").replace(/(width|height)\s*:\s*[\d.]+px;?/gi,"").trim();e.attr("style","".concat(n).concat(n&&!n.endsWith(";")?";":""," height: auto;").trim())};e.on("init",()=>{e.parser.addNodeFilter("img",e=>e.forEach(t)),e.serializer.addNodeFilter("img",e=>e.forEach(t))})}e.on("keydown",t=>{if("Backspace"!==t.key&&8!==t.keyCode)return;let n=e.selection,a=e.dom;if(!n.isCollapsed())return;let r=n.getNode(),o=a.getParent(r,"span.email-template-token");if(o){t.preventDefault(),n.select(o),n.setContent("");return}let i=n.getRng().startContainer;if(i&&3===i.nodeType){let e=i.nodeValue||"";if(/^\s*\{\{[^}]+\}\}\s*$/.test(e)){t.preventDefault();let e=a.createRng();e.setStart(i,0),e.setEnd(i,i.length),n.setRng(e),n.setContent("")}}}),A&&(null==(t=A.suggestions)?void 0:t.length)&&e.ui.registry.addAutocompleter("emailTemplateTokens",{trigger:A.trigger||"@",minChars:0,onAction:(t,n,a)=>{e.selection.setRng(n),e.insertContent(a),t.hide()},fetch:e=>{let t=e.toLowerCase();return Promise.resolve(A.suggestions.filter(e=>!t||e.text.toLowerCase().includes(t)).map(e=>({type:"autocompleteitem",value:'<span class="email-template-token">'.concat(e.value,"</span>"),text:e.text})))}})}},onEditorChange:e=>{N(e),_(e.replace(/<[^>]+>/g,"").trim()?e:"",o)},onFocus:S},R)}),x&&!t&&(0,a.jsx)(m.W,{message:l,fieldID:""}),L&&(0,a.jsx)(g.y,{content:"Image upload failed. Please try again.",error:!0,onDismiss:()=>V(!1)})]})}},29218:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(37876),r=n(8949);n(14232);let o=e=>{let{recWidth:t,recHeight:n,pdfAccept:o}=e;return n&&t?(0,a.jsx)(r.E,{as:"span",variant:"headingSm",fontWeight:"medium",children:" accepts jpg/png/gif/bmp, recommended ratio minimum width and height of ".concat(t,"px\n * ").concat(n,"px, max 6mb ").concat(o?" - accepts PDF files":"")}):(0,a.jsx)(r.E,{as:"span",variant:"headingSm",fontWeight:"medium",children:" accepts jpg/png/gif/bmp, for optimal results, please use a landscape image ".concat(o?" - accepts PDF files":"")})}},35602:(e,t,n)=>{"use strict";n.d(t,{H:()=>h});var a=n(14232),r=n(36938),o=n(8484),i={Item:"Polaris-FormLayout__Item",grouped:"Polaris-FormLayout--grouped",condensed:"Polaris-FormLayout--condensed"};function l(e){let{children:t,condensed:n=!1}=e,r=(0,o.xW)(i.Item,n?i.condensed:i.grouped);return t?a.createElement("div",{className:r},t):null}var s=n(32395),c=n(89219),d=n(30414),u=n(8949);function p(e){let t,n,{children:o,condensed:i,title:p,helpText:h}=e,m=(0,a.useId)(),g=null,f=null;h&&(t="".concat(m,"HelpText"),g=a.createElement(d.a,{id:t,color:"text-secondary"},h)),p&&(n="".concat(m,"Title"),f=a.createElement(u.E,{id:n,as:"p"},p));let x=a.Children.map(o,e=>(0,r.ee)(e,l,{condensed:i}));return a.createElement(s.a,{role:"group",gap:"200","aria-labelledby":n,"aria-describedby":t},f,a.createElement(c.o,{gap:"300"},x),g)}let h=(0,a.memo)(function(e){let{children:t}=e;return a.createElement(s.a,{gap:"400"},a.Children.map(t,m))});function m(e,t){return(0,r.qL)(e,p)?e:(0,r.ee)(e,l,{key:t})}h.Group=p},36020:e=>{e.exports={shrink:"draftjs-editor_shrink__dVObq",error:"draftjs-editor_error__shi__",editor:"draftjs-editor_editor__yGsOg",skeletonShimmerAnimation:"draftjs-editor_skeletonShimmerAnimation__SQ4_X"}},40850:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>H});var a=n(37876),r=n(14232),o=n(36190),i=n(13352),l=n(49647),s=n(35999),c=n(36987),d=n(75391),u=n(29218),p=n(24168),h=n(19818),m=n(66123),g=n(80425),f=n(15598),x=n(35602),v=n(84218),y=n(89219),b=n(8949);let w=()=>{let{values:e}=(0,d.j7)();return(0,a.jsxs)(g.P.AnnotatedSection,{title:"Charity Details",children:[(0,a.jsx)(f.u,{children:(0,a.jsx)(f.u.Section,{children:(0,a.jsxs)(x.H,{children:[(0,a.jsx)(s.A,{name:"newValue.name",label:"Charity Name",component:v.A,disabled:!0,autoComplete:""}),(0,a.jsxs)(x.H.Group,{children:[(0,a.jsx)(s.A,{name:"newValue.contact.address",label:"Address",component:v.A,disabled:!0,autoComplete:""}),(0,a.jsx)(s.A,{name:"newValue.contact.website",label:"Website",component:v.A,disabled:!0,autoComplete:""})]}),(0,a.jsx)(s.A,{name:"newValue.description",label:"Description",component:p.A,conversionRequired:!0})]})})}),(0,a.jsx)(f.u,{title:"Logo",children:(0,a.jsx)(f.u.Section,{children:(0,a.jsxs)(x.H,{children:[(0,a.jsxs)(y.o,{align:"center",blockAlign:"center",gap:"100",wrap:!0,children:[(0,a.jsx)(s.A,{component:c.A,name:"newValue.logoImageUrl",mapProps:e=>{let{value:t,onChange:n}=e;return{...e,onChange:e=>{n&&n(null==e?void 0:e.url)},value:t?{url:t,source:""}:void 0}},enableSearch:!0,hideFadedPreview:!0}),(0,a.jsx)(u.A,{recHeight:"325",recWidth:"650"})]}),(0,a.jsx)("br",{})]})})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(f.u.Section,{children:(0,a.jsx)(x.H,{children:(0,a.jsxs)(x.H.Group,{children:[(0,a.jsx)(s.A,{name:"newValue.contact.phoneNumber",label:"Phone Number (include area code)",component:v.A,disabled:!0,autoComplete:""}),e.newValue.isAcceptingDonations&&(0,a.jsx)(h.f5.Consumer,{children:e=>(0,a.jsx)(s.A,{name:"newValue.abn",label:(0,m.wH)(e.getCountry()),component:v.A,disabled:!0,autoComplete:""})})]})})})}),e.newValue.isAcceptingDonations&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.u,{children:(0,a.jsx)(f.u.Section,{children:(0,a.jsx)(x.H,{children:(0,a.jsxs)(x.H.Group,{children:[(0,a.jsx)(s.A,{component:v.A,name:"newValue.charityBankAccount.bsb",label:"BSB",disabled:!0,autoComplete:"",requiredIndicator:!0}),(0,a.jsx)(s.A,{component:v.A,name:"newValue.charityBankAccount.accountName",label:"Charity's bank account name",disabled:!0,autoComplete:"",requiredIndicator:!0}),(0,a.jsx)(s.A,{component:v.A,name:"newValue.charityBankAccount.accountNumber",label:"Account Number",disabled:!0,autoComplete:"",requiredIndicator:!0})]})})})}),(0,a.jsx)(f.u,{title:"Bank Statement or Deposit Slip",children:(0,a.jsx)(f.u.Section,{children:(0,a.jsxs)(x.H,{children:[(0,a.jsxs)(y.o,{align:"center",gap:"400",wrap:!0,children:[(0,a.jsx)(b.E,{as:"p",tone:"subdued",children:"recommended ratio 800px x 800px, max 6mb. Accepts jpeg, png, gif, bmp."}),(0,a.jsx)(s.A,{component:c.A,name:"newValue.charityBankAccount.bankStatementImageUrl",enableSearch:!1,hideFadedPreview:!0,mapProps:e=>{let{value:t,onChange:n}=e;return{...e,onChange:e=>{n&&n(null==e?void 0:e.url)},value:t?{url:t,source:""}:void 0}}})]}),(0,a.jsx)("br",{})]})})})]})]})};var j=n(57792),C=n(88052),A=n(32395);let _=e=>{let{status:t,name:n,isAcceptingDonations:r,isVolunteering:o}=e;return(0,a.jsx)(g.P.AnnotatedSection,{title:"Charity Status",children:(0,a.jsx)(f.u,{children:(0,a.jsxs)(f.u.Section,{children:[(0,a.jsxs)(y.o,{align:"space-between",gap:"400",children:[(0,a.jsxs)(b.E,{as:"span",fontWeight:"medium",children:["Charity: ",(0,a.jsx)(j.R,{children:"".concat(n).substring(0,30)})]}),(0,a.jsx)(C.E,{tone:"info",children:t})]}),(0,a.jsx)("br",{}),(0,a.jsxs)(A.a,{gap:"200",children:[(0,a.jsxs)(b.E,{as:"p",tone:"subdued",children:["Charity is ",!r&&"not ","accepting donations"]}),(0,a.jsxs)(b.E,{as:"p",tone:"subdued",children:["Charity is ",!o&&"not ","publishing volunteering opportunities"]})]})]})})})};var S=n(45161),k=n.n(S),N=n(2682),E=n(82404);let D=e=>{var t,n,r,o,i,l,s,c;let{newValue:d,oldValue:u}=e;return(0,a.jsxs)(g.P.AnnotatedSection,{title:"Content Changes",description:"Compare the changes between the original and proposed charity information",children:[(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat(null==u?void 0:u.name),newValue:"".concat(d.name),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Title",rightTitle:"New Title"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.contact)&&(null==u?void 0:u.contact.address)),newValue:"".concat(d.contact&&d.contact.address),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Address",rightTitle:"New Address"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.contact)&&(null==u?void 0:u.contact.website)),newValue:"".concat((null==d?void 0:d.contact)&&(null==d?void 0:d.contact.website)),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Website",rightTitle:"New Website"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat(null!=(s=null==(r=(0,N.xN)(null==u?void 0:u.description)[0])||null==(n=r.props)||null==(t=n.children)?void 0:t[0])?s:""),newValue:"".concat(null!=(c=null==(l=(0,N.xN)(d.description)[0])||null==(i=l.props)||null==(o=i.children)?void 0:o[0])?c:""),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Description",rightTitle:"New Description"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(E.EW,{itemOne:(0,a.jsx)(E.D4,{src:"".concat(null==u?void 0:u.logoImageUrl)||"https://cdn-test.goodcompany.org/unknown/tset.png",alt:"Old Logo"}),itemTwo:(0,a.jsx)(E.D4,{src:"".concat(d.logoImageUrl),alt:"New Logo"})})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(h.f5.Consumer,{children:e=>(0,a.jsx)(k(),{oldValue:"".concat(null==u?void 0:u.abn),newValue:"".concat(null==d?void 0:d.abn),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old ".concat((0,m.wH)(e.getCountry())),rightTitle:"New ".concat((0,m.wH)(e.getCountry()))})})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.contact)&&(null==u?void 0:u.contact.phoneNumber)),newValue:"".concat(d.contact&&d.contact.phoneNumber),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old PhoneNumber",rightTitle:"New PhoneNumber"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(h.f5.Consumer,{children:e=>"au"===e.getCountry().code&&(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.charityBankAccount)&&(null==u?void 0:u.charityBankAccount.bsb)),newValue:"".concat(d.charityBankAccount&&d.charityBankAccount.bsb),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old BSB",rightTitle:"New BSB"})})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.charityBankAccount)&&(null==u?void 0:u.charityBankAccount.accountName)),newValue:"".concat(d.charityBankAccount&&d.charityBankAccount.accountName),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old AccountName",rightTitle:"New AccountName"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(k(),{oldValue:"".concat((null==u?void 0:u.charityBankAccount)&&(null==u?void 0:u.charityBankAccount.accountNumber)),newValue:"".concat(d.charityBankAccount&&d.charityBankAccount.accountNumber),compareMethod:S.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old AccountNumber",rightTitle:"New AccountNumber"})}),(0,a.jsx)(f.u,{children:(0,a.jsx)(E.EW,{itemOne:(0,a.jsx)(E.D4,{src:"".concat((null==u?void 0:u.charityBankAccount)&&(null==u?void 0:u.charityBankAccount.bankStatementImageUrl))||"https://cdn-test.goodcompany.org/unknown/tset.png",alt:"Old Image"}),itemTwo:(0,a.jsx)(E.D4,{src:"".concat(d.charityBankAccount&&d.charityBankAccount.bankStatementImageUrl),alt:"New Image"})})})]})};var L=n(12999),V=n(83334),M=n(35070);let R=e=>{var t;let{onSaveError:n,saved:o,toggleSave:s,onApprove:c,onDeny:u,validate:p}=e,[h,m]=(0,r.useState)({approveModel:!1,denyModel:!1}),{values:g}=(0,d.j7)(),f=o?(0,a.jsx)(L.y,{content:n?"Error occurred":"Saved",onDismiss:s}):void 0,x=async e=>{await p()&&m(t=>({...t,[e]:!t[e]}))};return(0,a.jsx)(l.A.Slide,{id:"",fields:["oldValue","newValue"],submit:()=>!0,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_,{name:g.newValue.name,status:g.a
1pprovalStatus,isAcceptingDonations:g.newValue.isAcceptingDonations,isVolunteering:g.newValue.isAcceptingVolunteering}),"Update"===g.actionType&&g.oldValue&&g.newValue&&(0,a.jsx)(D,{newValue:g.newValue,oldValue:g.oldValue}),(0,a.jsx)(w,{}),f,n&&(0,a.jsx)(V.lZ,{tone:"critical",children:n}),("ApprovalFailed"===g.approvalStatus||"DenialFailed"===g.approvalStatus)&&(null==(t=g.resultMessages)?void 0:t.length)>0&&(0,a.jsx)(V.lZ,{tone:"critical",title:"This content request failed",children:g.resultMessages[g.resultMessages.length-1].value}),(0,a.jsx)("br",{}),("AwaitingResponse"===g.approvalStatus||"ApprovalFailed"===g.approvalStatus||"DenialFailed"===g.approvalStatus)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(y.o,{align:"end",blockAlign:"center",gap:"200",children:[(0,a.jsx)(M.$,{onClick:()=>x("denyModel"),children:"Deny"}),(0,a.jsx)(M.$,{onClick:()=>x("approveModel"),variant:"primary",children:"Update and Approve"})]}),(0,a.jsx)(i.A,{open:h.approveModel,onClose:()=>x("approveModel"),text:"Are you sure you want to approve this content?",onDelete:()=>{x("approveModel"),null==c||c()}},"approveModel"),(0,a.jsx)(i.A,{open:h.denyModel,onClose:()=>x("denyModel"),text:"Are you sure you want to deny this content?",onDelete:()=>{x("denyModel"),u()}},"denyModel")]})]})})};var P=n(532),T=n(78306),B=n(89099),O=n(28751),W=n(20982),I=n(9938);let F=e=>{let{id:t}=e,[n,i]=(0,r.useState)({loading:!0,spinnerLoading:!1,errorMessage:void 0,data:void 0,saved:!1}),s=(0,B.useRouter)();(0,r.useEffect)(()=>{c()},[]);let c=async()=>{try{let e=await (0,o.J6)(t);i(t=>({...t,loading:!1,data:e}))}catch(e){i(t=>({...t,loading:!1,errorMessage:e.message}))}},d=()=>{i(e=>({...e,saved:!e.saved}))},u=async e=>{try{e.denied?(i(e=>({...e,spinnerLoading:!0})),await (0,o.s9)(t)):(i(e=>({...e,spinnerLoading:!0})),await (0,o.tK)(t,{contentDomain:e.contentDomain,charity:e.newValue,hasContentChangedByApprover:e.hasContentChangedByApprover})),i({...n,saved:!n.saved}),s.push("/".concat((0,I.JJ)(),"/admin/backoffice/content-approval"))}catch(e){i({...n,spinnerLoading:!1,onSaveError:e})}};return(0,a.jsx)(P.yB,{title:"Charity Profile",adminArea:"backoffice",loading:n.loading,errorMessage:n.errorMessage,showSpinnerLoading:n.spinnerLoading,backAction:{content:"Content Approval",url:"/admin/backoffice/content-approval"},children:(0,a.jsx)(g.P,{children:(0,a.jsx)(l.A,{defaultData:function(){let{data:e}=n;return{...e,oldValue:e&&e.proposedContent&&e.proposedContent.oldValue,newValue:e&&e.proposedContent&&e.proposedContent.newValue}}(),onAfterValidate:()=>{},onSubmit:u,children:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.A,{formikProps:e,headerOffset:200}),(0,a.jsx)(R,{toggleSave:d,onApprove:()=>{e.setFieldValue("hasContentChangedByApprover",e.dirty),e.submitForm()},onDeny:()=>{e.setFieldValue("denied",!0),e.submitForm()},validate:async()=>(await e.validateForm(),e.isValid)})]})})})})};F.getInitialProps=async e=>({id:e.query.id});let H=(0,W.Y)(O.x.BackOffice_ManageCharities)(F)},49647:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(37876),r=n(14232),o=n(32565),i=n(81318);let l=r.createContext({validateStep:()=>Promise.resolve(!0)});class s extends r.Component{render(){let{defaultData:e,schema:t,onSubmit:n,children:r,historyManager:s,onAfterValidate:c}=this.props;return(0,a.jsx)(o.sQ,{start:"",historyManager:s,children:o=>{let{currentSlide:s}=o;return(0,a.jsx)(i.Si,{defaultData:e,schema:t,currentPage:s,onSubmit:n,onAfterValidate:c,children:e=>{let{validateStep:t,...n}=e;return(0,a.jsx)(l.Provider,{value:{validateStep:t},children:r(n)})}})}})}}s.Slide=function(e){let{fields:t,children:n,id:r,submit:s=!1}=e;return(0,a.jsx)(l.Consumer,{children:e=>{let{validateStep:l}=e;return(0,a.jsx)(i.Si.Page,{id:r,fields:t,submit:s,children:(0,a.jsx)(o.q7,{id:r,singleSlide:!0,onBeforeNavigate:l,children:n})})}})}},57792:(e,t,n)=>{"use strict";n.d(t,{R:()=>o});var a=n(14232),r={Code:"Polaris-InlineCode__Code"};let o=e=>{let{children:t}=e;return a.createElement("code",{className:r.Code},t)}},80425:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var a=n(14232),r={Layout:"Polaris-Layout",Section:"Polaris-Layout__Section","Section-fullWidth":"Polaris-Layout__Section--fullWidth","Section-oneHalf":"Polaris-Layout__Section--oneHalf","Section-oneThird":"Polaris-Layout__Section--oneThird",AnnotatedSection:"Polaris-Layout__AnnotatedSection",AnnotationWrapper:"Polaris-Layout__AnnotationWrapper",AnnotationContent:"Polaris-Layout__AnnotationContent",Annotation:"Polaris-Layout__Annotation"},o=n(95740),i=n(8949),l=n(30414),s=n(8484);function c(e){let{children:t,variant:n}=e,o=(0,s.xW)(r.Section,r["Section-".concat(n)]);return a.createElement("div",{className:o},t)}let d=function(e){let{sectioned:t,children:n}=e,o=t?a.createElement(c,null,n):n;return a.createElement("div",{className:r.Layout},o)};d.AnnotatedSection=function(e){let{children:t,title:n,description:s,id:c}
1=e,d="string"==typeof s?a.createElement(i.E,{as:"p",variant:"bodyMd"},s):s;return a.createElement("div",{className:r.AnnotatedSection},a.createElement("div",{className:r.AnnotationWrapper},a.createElement("div",{className:r.Annotation},a.createElement(o.T,{spacing:"tight"},a.createElement(i.E,{id:c,variant:"headingMd",as:"h2"},n),d&&a.createElement(l.a,{color:"text-secondary"},d))),a.createElement("div",{className:r.AnnotationContent},t)))},d.Section=c},80828:e=>{e.exports={header:"minimal_header__XpFdq",main:"minimal_main__ZyzSJ",pageContent:"minimal_pageContent__Mj_hS",skeletonShimmerAnimation:"minimal_skeletonShimmerAnimation__EZC7x"}},82404:(e,t,n)=>{"use strict";n.d(t,{D4:()=>f,EW:()=>g});var a=n(14232),r=n(37876),o=(0,a.forwardRef)(({transition:e,...t},n)=>{let a={position:"absolute",top:0,left:0,width:"100%",height:"100%",transition:e?`clip-path ${e}`:void 0,userSelect:"none",willChange:"clip-path, transition",KhtmlUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"};return(0,r.jsx)("div",{...t,style:a,"data-rcs":"clip-item",ref:n})});o.displayName="ContainerClip";var i=(0,a.forwardRef)(({children:e,disabled:t,portrait:n,position:a,transition:o},i)=>{let l={position:"absolute",top:0,width:n?"100%":void 0,height:n?void 0:"100%",background:"none",border:0,padding:0,pointerEvents:"all",appearance:"none",WebkitAppearance:"none",MozAppearance:"none",outline:0,transform:n?"translate3d(0, -50% ,0)":"translate3d(-50%, 0, 0)",transition:o?`${n?"top":"left"} ${o}`:void 0};return(0,r.jsx)("button",{ref:i,"aria-label":"Drag to move or focus and use arrow keys","aria-orientation":n?"vertical":"horizontal","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"data-rcs":"handle-container",disabled:t,role:"slider",style:l,children:e})});i.displayName="ThisHandleContainer";var l=({flip:e})=>(0,r.jsx)("div",{className:"__rcs-handle-arrow",style:{width:0,height:0,borderTop:"8px solid transparent",borderRight:"10px solid",borderBottom:"8px solid transparent",transform:e?"rotate(180deg)":void 0}}),s=({className:e="__rcs-handle-root",disabled:t,buttonStyle:n,linesStyle:a,portrait:o,style:i,...s})=>{let c={display:"flex",flexDirection:o?"row":"column",placeItems:"center",height:"100%",cursor:t?"not-allowed":o?"ns-resize":"ew-resize",pointerEvents:"none",color:"#fff",...i},d={flexGrow:1,height:o?2:"100%",width:o?"100%":2,backgroundColor:"currentColor",pointerEvents:"auto",boxShadow:"0 0 4px rgba(0,0,0,.5)",...a},u={display:"grid",gridAutoFlow:"column",gap:8,placeContent:"center",flexShrink:0,width:56,height:56,borderRadius:"50%",borderStyle:"solid",borderWidth:2,pointerEvents:"auto",backdropFilter:"blur(7px)",WebkitBackdropFilter:"blur(7px)",backgroundColor:"rgba(0, 0, 0, 0.125)",boxShadow:"0 0 4px rgba(0,0,0,.35)",transform:o?"rotate(90deg)":void 0,...n};return(0,r.jsxs)("div",{...s,className:e,style:c,children:[(0,r.jsx)("div",{className:"__rcs-handle-line",style:d}),(0,r.jsxs)("div",{className:"__rcs-handle-button",style:u,children:[(0,r.jsx)(l,{}),(0,r.jsx)(l,{flip:!0})]}),(0,r.jsx)("div",{className:"__rcs-handle-line",style:d})]})},c=(e=>(e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_UP="ArrowUp",e.ARROW_DOWN="ArrowDown",e))(c||{}),d=(e,t,n,r)=>{let o=(0,a.useRef)();(0,a.useEffect)(()=>{o.current=t},[t]),(0,a.useEffect)(()=>{if(!(n&&n.addEventListener))return;let t=e=>o.current&&o.current(e);return n.addEventListener(e,t,r),()=>{n.removeEventListener(e,t,r)}},[e,n,r])},u="u">typeof window&&"u">typeof window.document&&"u">typeof window.document.createElement?a.useLayoutEffect:a.useEffect,p={capture:!1,passive:!0},h={capture:!0,passive:!1},m=e=>{e.preventDefault(),e.currentTarget.focus()},g=(0,a.forwardRef)(({boundsPadding:e=0,browsingContext:t=globalThis,changePositionOnHover:n=!1,disabled:l=!1,handle:g,itemOne:f,itemTwo:x,keyboardIncrement:v="5%",onlyHandleDraggable:y=!1,onPositionChange:b,portrait:w=!1,position:j=50,style:C,transition:A,..._},S)=>{let k=(0,a.useRef)(null),N=(0,a.useRef)(null),E=(0,a.useRef)(null),D=(0,a.useRef)(j),[L,V]=(0,a.useState)(!1),[M,R]=(0,a.useState)(!0),P=(0,a.useRef)(!1),[T,B]=(0,a.useState)(),O=(e
1=>{let t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{t.current=e}),t.current})(j),W=(0,a.useCallback)(function({x:n,y:a,isOffset:r}){let o=k.current,i=E.current,l=N.current,{width:s,height:c,left:d,top:u}=o.getBoundingClientRect();if(0===s||0===c)return;let p=Math.min(Math.max((w?r?a-u-t.scrollY:a:r?n-d-t.scrollX:n)/(w?c:s)*100,0),100),h=w?c/(o.offsetHeight||1):s/(o.offsetWidth||1),m=e*h/(w?c:s)*100,g=Math.min(Math.max(p,m*h),100-m*h);D.current=p,i.setAttribute("aria-valuenow",`${Math.round(D.current)}`),i.style.top=w?`${g}%`:"0",i.style.left=w?"0":`${g}%`,l.style.clipPath=w?`inset(${g}% 0 0 0)`:`inset(0 0 0 ${g}%)`,b&&b(D.current)},[e,b,w,t]);(0,a.useEffect)(()=>{let{width:e,height:t}=k.current.getBoundingClientRect(),n=j===O?D.current:j;W({x:e/100*n,y:t/100*n})},[e,j,w,O,W]);let I=(0,a.useCallback)(e=>{e.preventDefault(),l||0!==e.button||(W({isOffset:!0,x:e.pageX,y:e.pageY}),V(!0),R(!0))},[l,W]),F=(0,a.useCallback)(function(e){W({isOffset:!0,x:e.pageX,y:e.pageY}),R(!1)},[W]),H=(0,a.useCallback)(()=>{V(!1),R(!0)},[]),U=(0,a.useCallback)(({width:e,height:t})=>{let{width:n,height:a}=k.current.getBoundingClientRect();W({x:e/100*D.current*n/e,y:t/100*D.current*a/t})},[W]),z=(0,a.useCallback)(e=>{if(!Object.values(c).includes(e.key))return;e.preventDefault(),R(!0);let{top:t,left:n}=E.current.getBoundingClientRect(),{width:a,height:r}=k.current.getBoundingClientRect(),o="string"==typeof v?parseFloat(v):v/a*100,i=Math.min(Math.max((w?"ArrowLeft"===e.key||"ArrowDown"===e.key:"ArrowRight"===e.key||"ArrowUp"===e.key)?D.current+o:D.current-o,0),100);W({x:w?n:a*i/100,y:w?r*i/100:t})},[v,w,W]);(0,a.useEffect)(()=>{B(y?E.current:k.current)},[y]),(0,a.useEffect)(()=>{let e=k.current,t=()=>{L||H()};return n&&(e.addEventListener("pointermove",F,p),e.addEventListener("pointerleave",t,p)),()=>{e.removeEventListener("pointermove",F),e.removeEventListener("pointerleave",t)}},[n,F,H,L]),(0,a.useEffect)(()=>(L&&!P.current&&(t.addEventListener("pointermove",F,p),t.addEventListener("pointerup",H,p),P.current=!0),()=>{P.current&&(t.removeEventListener("pointermove",F),t.removeEventListener("pointerup",H),P.current=!1)}),[F,H,L,t]),(0,a.useImperativeHandle)(S,()=>({rootContainer:k.current,handleContainer:E.current,setPosition(e){let{width:t,height:n}=k.current.getBoundingClientRect();W({x:t/100*e,y:n/100*e})}}),[W]),((e,t)=>{let n=(0,a.useRef)(),r=(0,a.useCallback)(()=>{e.current&&n.current&&n.current.observe(e.current)},[e]);u(()=>(n.current=new ResizeObserver(([e])=>t(e.contentRect)),r(),()=>{n.current&&n.current.disconnect()}),[t,r])})(k,U),d("keydown",z,E.current,h),d("click",m,E.current,h),d("pointerdown",I,T,h);let q=g||(0,r.jsx)(s,{disabled:l,portrait:w}),$=M?A:void 0,G={position:"relative",display:"flex",overflow:"hidden",cursor:L?w?"ns-resize":"ew-resize":void 0,touchAction:"none",userSelect:"none",KhtmlUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",...C};return(0,r.jsxs)("div",{..._,ref:k,style:G,"data-rcs":"root",children:[f,(0,r.jsx)(o,{ref:N,transition:$,children:x}),(0,r.jsx)(i,{disabled:l,portrait:w,position:Math.round(D.current),ref:E,transition:$,children:q})]})});g.displayName="ReactCompareSlider";var f=(0,a.forwardRef)(({style:e,...t},n)=>{let a=(({boxSizing:e="border-box",objectFit:t="cover",objectPosition:n="center center",...a}={})=>({display:"block",width:"100%",height:"100%",maxWidth:"100%",boxSizing:e,objectFit:t,objectPosition:n,...a}))(e);return(0,r.jsx)("img",{ref:n,...t,style:a,"data-rcs":"image"})});f.displayName="ReactCompareSliderImage"},95740:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var a=n(14232),r=n(8484),o={TextContainer:"Polaris-TextContainer",spacingTight:"Polaris-TextContainer--spacingTight",spacingLoose:"Polaris-TextContainer--spacingLoose"};function i(e){let{spacing:t,children:n}=e,i=(0,r.xW)(o.TextContainer,t&&o[(0,r.Ny)("spacing",t)]);return a.createElement("div",{className:i},n)}}},e=>{e.O(0,[2026,9879,6494,6960,2120,7930,1286,7083,766,4905,6471,9282,4974,8794,6190,1449,636,6593,8792],()=>e(e.s=15127)),_N_E=e.O()}]); 2//# sourceMappingURL=charity-6537a431133910d2.js.map
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.