Edit file File name : offlineGatewayFormBuilder.js Content :(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},5251:(e,t,n)=>{"use strict";var o=n(9196),i=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var o,s={},c=null,p=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(p=t.ref),t)r.call(t,o)&&!l.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{$$typeof:i,type:e,key:c,ref:p,props:s,_owner:a.current}}},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},9196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.hooks,t={offlineEnabled:{type:"boolean",default:!0},offlineUseGlobalInstructions:{type:"boolean",default:!0},offlineDonationInstructions:{type:"string",default:window.giveOfflineGatewaySettings.defaultInstructions}};var o=n(9196),i=n.n(o);const r=window.wp.compose,a=window.wp.blockEditor,l=window.wp.i18n,s=window.wp.components,c=window.wp.element;var p=n(4184),d=n.n(p);function u(){return(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},(0,o.createElement)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.069 2.251H8.25a.75.75 0 1 1 0 1.5H5.1c-.642 0-1.08 0-1.417.028-.329.027-.497.076-.614.136a1.5 1.5 0 0 0-.656.655c-.06.117-.108.286-.135.614-.027.338-.028.775-.028 1.417v6.3c0 .643 0 1.08.028 1.417.027.329.076.497.135.614a1.5 1.5 0 0 0 .656.656c.117.06.285.108.614.135.338.028.775.028 1.417.028h6.3c.642 0 1.08 0 1.417-.028.329-.027.497-.076.614-.135a1.5 1.5 0 0 0 .655-.656c.06-.117.109-.285.136-.614.027-.338.028-.774.028-1.417v-3.15a.75.75 0 0 1 1.5 0v3.181c0 .604 0 1.102-.033 1.508-.035.422-.109.81-.294 1.173a3 3 0 0 1-1.311 1.311c-.364.186-.752.26-1.173.294-.406.033-.904.033-1.508.033H5.069c-.604 0-1.102 0-1.508-.033-.421-.034-.809-.108-1.173-.294a3 3 0 0 1-1.311-1.31c-.185-.365-.26-.752-.294-1.174-.033-.406-.033-.904-.033-1.508V6.57c0-.604 0-1.102.033-1.508.035-.421.109-.809.294-1.173a3 3 0 0 1 1.311-1.31c.364-.186.752-.26 1.173-.295.406-.033.904-.033 1.508-.033z",fill:"#737373"}),(0,o.createElement)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.345 1.346a2.34 2.34 0 1 1 3.31 3.31L9.483 11.83l-.044.044c-.215.216-.406.406-.635.547-.201.123-.42.214-.65.269-.261.063-.53.063-.836.062H6a.75.75 0 0 1-.75-.75v-1.318c0-.305 0-.574.062-.836.055-.23.146-.449.27-.65.14-.23.33-.42.546-.635l.045-.044 7.172-7.172z",fill:"#737373"}))}function g({id:e,help:t,heading:n,buttonCaption:i,children:r,onButtonClick:a,isButtonActive:l}){return(0,o.createElement)(s.BaseControl,{id:e,help:t},(0,o.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},(0,o.createElement)("span",null,n),(0,o.createElement)(s.Button,{className:d()("givewp-control-popover-setting-button",{"givewp-control-popover-setting-button--active":l,"givewp-control-popover-setting-button--has-caption":""!==i}),onClick:a,icon:i?null:u,children:i||null})),r)}const m=window.wp.primitives,v=(0,o.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(m.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));var f=n(5893),w=function(){return w=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},w.apply(this,arguments)};function h(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||t)}var b=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},y={k:1e3,m:1e6,b:1e9},S=function(e){var t=e.value,n=e.groupSeparator,o=void 0===n?",":n,i=e.decimalSeparator,r=void 0===i?".":i,a=e.allowDecimals,l=void 0===a||a,s=e.decimalsLimit,c=void 0===s?2:s,p=e.allowNegativeValue,d=void 0===p||p,u=e.disableAbbreviations,g=void 0!==u&&u,m=e.prefix,v=void 0===m?"":m,f=e.transformRawValue,w=(void 0===f?function(e){return e}:f)(t);if("-"===w)return w;var S=g?[]:["k","m","b"],E=new RegExp("((^|\\D)-\\d)|(-"+b(v)+")").test(w),_=RegExp("(\\d+)-?"+b(v)).exec(t)||[],x=_[0],D=_[1],R=function(e,t){void 0===t&&(t=",");var n=new RegExp(b(t),"g");return e.replace(n,"")}(v?x?w.replace(x,"").concat(D):w.replace(v,""):w,o),C=function(e,t){var n=b(t.join("")),o=new RegExp("[^\\d"+n+"]","gi");return e.replace(o,"")}(R,h([o,r],S)),N=C;if(!g){if(S.some((function(e){return e===C.toLowerCase().replace(r,"")})))return"";var P=function(e,t){void 0===t&&(t=".");var n=new RegExp("(\\d+("+b(t)+"\\d*)?)([kmb])$","i"),o=e.match(n);if(o){var i=o[1],r=o[3],a=y[r.toLowerCase()];return Number(i.replace(t,"."))*a}}(C,r);P&&(N=String(P))}var B=E&&d?"-":"";if(r&&N.includes(r)){var T=C.split(r),O=T[0],k=T[1],A=c&&k?k.slice(0,c):k;return""+B+O+(l?""+r+A:"")}return""+B+N},E=function(e,t){var n=t.groupSeparator,o=void 0===n?",":n,i=t.decimalSeparator,r=void 0===i?".":i,a=new RegExp("\\d([^"+b(o)+b(r)+"0-9]+)"),l=e.match(a);return l?l[1]:void 0},_=function(e){var t=e.value,n=e.decimalSeparator,o=e.intlConfig,i=e.decimalScale,r=e.prefix,a=void 0===r?"":r,l=e.suffix,s=void 0===l?"":l;if(""===t||void 0===t)return"";if("-"===t)return"-";var c=new RegExp("^\\d?-"+(a?b(a)+"?":"")+"\\d").test(t),p="."!==n?x(t,n,c):t,d={minimumFractionDigits:i||0,maximumFractionDigits:20},u=(o?new Intl.NumberFormat(o.locale,o.currency?w(w({},d),{style:"currency",currency:o.currency}):d):new Intl.NumberFormat(void 0,d)).formatToParts(Number(p)),g=D(u,e),m=E(g,w({},e)),v=t.slice(-1)===n?n:"",f=(p.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return void 0===i&&f&&n&&(g=g.includes(n)?g.replace(RegExp("(\\d+)("+b(n)+")(\\d+)","g"),"$1$2"+f):m&&!s?g.replace(m,""+n+f+m):""+g+n+f),s&&v?""+g+v+s:m&&v?g.replace(m,""+v+m):m&&s?g.replace(m,""+v+s):[g,v,s].join("")},x=function(e,t,n){var o=e;return t&&"."!==t&&(o=o.replace(RegExp(b(t),"g"),"."),n&&"-"===t&&(o="-"+o.slice(1))),o},D=function(e,t){var n=t.prefix,o=t.groupSeparator,i=t.decimalSeparator,r=t.decimalScale,a=t.disableGroupSeparators,l=void 0!==a&&a;return e.reduce((function(e,t,a){var s=t.type,c=t.value;return 0===a&&n?"minusSign"===s?[c,n]:"currency"===s?h(h([],e),[n]):[n,c]:"currency"===s?n?e:h(h([],e),[c]):"group"===s?l?e:h(h([],e),[void 0!==o?o:c]):"decimal"===s?void 0!==r&&0===r?e:h(h([],e),[void 0!==i?i:c]):h(h([],e),"fraction"===s?[void 0!==r?c.slice(0,r):c]:[c])}),[""]).join("")},R={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},C=function(e){return RegExp(/\d/,"gi").test(e)};(0,o.forwardRef)((function(e,t){var n=e.allowDecimals,r=void 0===n||n,a=e.allowNegativeValue,l=void 0===a||a,s=e.id,c=e.name,p=e.className,d=e.customInput,u=e.decimalsLimit,g=e.defaultValue,m=e.disabled,v=void 0!==m&&m,f=e.maxLength,h=e.value,b=e.onValueChange,y=e.fixedDecimalLength,x=e.placeholder,D=e.decimalScale,N=e.prefix,P=e.suffix,B=e.intlConfig,T=e.step,O=e.min,k=e.max,A=e.disableGroupSeparators,K=void 0!==A&&A,L=e.disableAbbreviations,I=void 0!==L&&L,M=e.decimalSeparator,F=e.groupSeparator,G=e.onChange,U=e.onFocus,H=e.onBlur,V=e.onKeyDown,Z=e.onKeyUp,j=e.transformRawValue,z=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(M&&C(M))throw new Error("decimalSeparator cannot be a number");if(F&&C(F))throw new Error("groupSeparator cannot be a number");var Y=(0,o.useMemo)((function(){return function(e){var t=e||{},n=t.locale,o=t.currency;return(n?new Intl.NumberFormat(n,o?{currency:o,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce((function(e,t,n){return"currency"===t.type?w(w({},e),0===n?{currencySymbol:t.value,prefix:t.value}:{currencySymbol:t.value,suffix:t.value}):"group"===t.type?w(w({},e),{groupSeparator:t.value}):"decimal"===t.type?w(w({},e),{decimalSeparator:t.value}):e}),R)}(B)}),[B]),W=M||Y.decimalSeparator||"",$=F||Y.groupSeparator||"";if(W&&$&&W===$&&!1===K)throw new Error("decimalSeparator cannot be the same as groupSeparator");var J={decimalSeparator:W,groupSeparator:$,disableGroupSeparators:K,intlConfig:B,prefix:N||Y.prefix,suffix:P},X={decimalSeparator:W,groupSeparator:$,allowDecimals:r,decimalsLimit:u||y||2,allowNegativeValue:l,disableAbbreviations:I,prefix:N||Y.prefix,transformRawValue:j},Q=null!=g?_(w(w({},J),{decimalScale:D,value:String(g)})):null!=h?_(w(w({},J),{decimalScale:D,value:String(h)})):"",q=(0,o.useState)(Q),ee=q[0],te=q[1],ne=(0,o.useState)(!1),oe=ne[0],ie=ne[1],re=(0,o.useState)(0),ae=re[0],le=re[1],se=(0,o.useState)(0),ce=se[0],pe=se[1],de=(0,o.useState)(null),ue=de[0],ge=de[1],me=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return me.current}));var ve=function(e,t){ie(!0);var n=function(e){var t=e.selectionStart,n=e.value,o=e.lastKeyStroke,i=e.stateValue,r=e.groupSeparator,a=t,l=n;if(i&&a){var s=n.split("");return"Backspace"===o&&i[a]===r&&(s.splice(a-1,1),a-=1),"Delete"===o&&i[a]===r&&(s.splice(a,1),a+=1),{modifiedValue:l=s.join(""),cursorPosition:a}}return{modifiedValue:l,cursorPosition:t}}({selectionStart:t,value:e,lastKeyStroke:ue,stateValue:ee,groupSeparator:$}),o=n.modifiedValue,i=n.cursorPosition,r=S(w({value:o},X));if(!(f&&r.replace(/-/g,"").length>f)){if(""===r||"-"===r||r===W)return b&&b(void 0,c,{float:null,formatted:"",value:""}),te(r),void le(1);var a=W?r.replace(W,"."):r,l=parseFloat(a),s=_(w({value:r},J));if(null!=i){var p=i+(s.length-e.length);p=p<=0?N?N.length:0:p,le(p),pe(ce+1)}te(s),b&&b(r,c,{float:l,formatted:s,value:r})}};(0,o.useEffect)((function(){oe&&"-"!==ee&&me.current&&document.activeElement===me.current&&me.current.setSelectionRange(ae,ae)}),[ee,ae,me,oe,ce]);var fe=w({type:"text",inputMode:"decimal",id:s,name:c,className:p,onChange:function(e){var t=e.target,n=t.value,o=t.selectionStart;ve(n,o),G&&G(e)},onBlur:function(e){var t=e.target.value,n=S(w({value:t},X));if("-"===n||n===W||!n)return te(""),void(H&&H(e));var o=function(e,t,n){if(n&&e.length>1){if(e.includes(t)){var o=e.split(t),i=o[0];if((r=o[1]).length>n)return""+i+t+r.slice(0,n)}var r,a=e.length>n?new RegExp("(\\d+)(\\d{"+n+"})"):new RegExp("(\\d)(\\d+)"),l=e.match(a);if(l)return""+(i=l[1])+t+l[2]}return e}(n,W,y),i=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var o=e.split(t),i=o[0],r=o[1];if(0===n)return i;var a=r||"";if(a.length<n)for(;a.length<n;)a+="0";else a=a.slice(0,n);return""+i+t+a}(o,W,void 0!==D?D:y),r=parseFloat(i.replace(W,".")),a=_(w(w({},J),{value:i}));b&&b(i,c,{float:r,formatted:a,value:i}),te(a),H&&H(e)},onFocus:function(e){return U&&U(e),ee?ee.length:0},onKeyDown:function(e){var t=e.key;if(ge(t),T&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),le(ee.length);var n=parseFloat(null!=h?String(h).replace(W,"."):S(w({value:ee},X)))||0,o="ArrowUp"===t?n+T:n-T;if(void 0!==O&&o<O)return;if(void 0!==k&&o>k)return;var i=String(T).includes(".")?Number(String(T).split(".")[1].length):void 0;ve(String(i?o.toFixed(i):o).replace(".",W))}V&&V(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==ee){var o=E(ee,{groupSeparator:$,decimalSeparator:W});if(o&&n&&n>ee.length-o.length&&me.current){var i=ee.length-o.length;me.current.setSelectionRange(i,i)}}Z&&Z(e)},placeholder:x,disabled:v,value:null==h||"-"===ee||W&&ee===W?ee:_(w(w({},J),{decimalScale:oe?void 0:D,value:String(h)})),ref:me},z);if(d){var we=d;return i().createElement(we,w({},fe))}return i().createElement("input",w({},fe))})).displayName="CurrencyInput";const N=window.wp.keycodes;function P(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}"function"==typeof SuppressedError&&SuppressedError,P(".mce-floatpanel,.mce-inline-toolbar-grp,.mce-notification{z-index:9999999999!important}.components-popover__content .givewp-classic-editor{margin:0!important}.givewp-classic-editor{width:100%}.givewp-classic-editor>label{box-sizing:border-box;display:block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:.7rem;margin-top:1.5rem;max-width:100%;overflow:hidden;padding-bottom:0;padding-top:0;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;z-index:1}.givewp-classic-editor .wp-editor-tools{z-index:auto}.givewp-classic-editor .wp-editor-tabs{display:none}.givewp-classic-editor .wp-editor-container{border-radius:.125rem;overflow:hidden}.givewp-classic-editor .mce-top-part:before{display:none}.givewp-classic-editor .mce-tinymce,.givewp-classic-editor .wp-editor-container{box-shadow:none}.givewp-classic-editor textarea{width:100%}.givewp-classic-editor .wp-switch-editor{box-sizing:content-box!important}.givewp-classic-editor.show-editor-tabs .wp-editor-tabs{display:block!important}.givewp-classic-editor.show-editor-tabs .quicktags-toolbar input.button.button-small{background:#f6f7f7;border-color:var(--wp-admin-theme-color)!important;color:var(--wp-admin-theme-color);font-size:12px!important;inline-size:auto;line-height:2;min-height:26px;padding:0 8px;vertical-align:top}.givewp-classic-editor.show-editor-tabs .wp-editor-wrap.html-active textarea{border:0}");var B,T=window.wp;function O(e){var t=e.id,n=e.label,o=void 0===n?null:n,i=e.content,a=e.setContent,l=e.rows,p=void 0===l?20:l,d=e.showEditorTabs,u=void 0!==d&&d,g=e.showMediaButtons,m=void 0!==g&&g,v=e.plugins,w=void 0===v?"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpautoresize,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview":v,h=e.toolbar1,b=void 0===h?"bold,italic,wp_add_media,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,fullscreen,wp_adv":h,y=e.toolbar2,S=void 0===y?"formatselect,strikethrough,hr,forecolor,pastetext,removeformat,unlink,outdent,indent,undo,redo":y,E=(0,c.useRef)(!1),_=(0,c.useState)(i),x=_[0],D=_[1];return(0,c.useEffect)((function(){E.current&&a(x)}),[x]),(0,c.useEffect)((function(){E.current&&x!==i&&window.tinymce.get("editor-".concat(t)).setContent(i)}),[i]),(0,c.useEffect)((function(){function e(e){var t;x&&e.on("loadContent",(function(){e._lastChange&&e._lastChange!==x?e.setContent(e.getContent()):e.setContent(x)})),e.on("blur",(function(){t=e.selection.getBookmark(2,!0);var n=document.querySelector(".interface-interface-skeleton__content"),o=n.scrollTop;return e.once("focus",(function(){t&&(e.selection.moveToBookmark(t),n.scrollTop!==o&&(n.scrollTop=o))})),!1})),e.on("mousedown touchstart",(function(){t=null}));var n=(0,r.debounce)((function(){var t=e.getContent();t!==e._lastChange&&(e._lastChange=t,D(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(function(t){N.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==N.BACKSPACE&&t.keyCode!==N.DELETE||!function(e){var t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(t.preventDefault(),t.stopImmediatePropagation()),t.altKey&&t.keyCode===N.F10&&t.stopPropagation()})),e.on("init",(function(){var t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function n(){setTimeout((function(){T.editor.initialize("editor-".concat(t),{mediaButtons:m,tinymce:{tinymce:!0,plugins:w,toolbar1:b,toolbar2:S,setup:e,resize:!1,statusbar:!1},quicktags:!0})}),250)}function o(){"complete"===document.readyState&&n()}return E.current=!0,"complete"===document.readyState?n():document.addEventListener("readystatechange",o),function(){document.removeEventListener("readystatechange",o),T.editor.remove("editor-".concat(t))}}),[]),(0,f.jsx)("div",{className:"givewp-classic-editor ".concat(!!u&&"show-editor-tabs"),children:(0,f.jsx)(s.BaseControl,{id:"editor-base-control-".concat(t),label:o,children:(0,f.jsx)("textarea",{rows:p,id:"editor-".concat(t),onChange:function(e){window.tinymce.get("editor-".concat(t))._lastChange=e.target.value,D(e.target.value)}})})})}!function(e){e.USD="USD",e.CAD="CAD",e.EUR="EUR",e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ARS="ARS",e.AUD="AUD",e.AZN="AZN",e.BAM="BAM",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BWP="BWP",e.BYN="BYN",e.BZD="BZD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EEK="EEK",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GNF="GNF",e.GTQ="GTQ",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KHR="KHR",e.KMF="KMF",e.KRW="KRW",e.KWD="KWD",e.KZT="KZT",e.LBP="LBP",e.LKR="LKR",e.LTL="LTL",e.LVL="LVL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MOP="MOP",e.MUR="MUR",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SOS="SOS",e.SYP="SYP",e.THB="THB",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.XAF="XAF",e.XOF="XOF",e.YER="YER",e.ZAR="ZAR",e.ZMK="ZMK",e.ZWL="ZWL"}(B||(B={})),P(".givewp-options-header{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}.givewp-options-header--label{margin-bottom:0}.givewp-options-header--button{color:var(--givewp-grey-500);height:fit-content!important;min-width:fit-content!important;padding:0!important}.givewp-options-header--button svg{height:1.25rem;width:1.25rem}.givewp-options-list--item{display:grid;gap:.5rem;grid-template-columns:auto auto 1fr auto;grid-template-rows:2rem;margin-top:.5rem}.givewp-options-list--item>*{align-self:center}.givewp-options-list--item--draggable{color:var(--givewp-grey-500);cursor:grab;display:flex;user-select:none}.givewp-options-list--item--checked{margin:0!important;width:1rem!important}.givewp-options-list--item--inputs{display:flex;flex-direction:column;gap:.25rem}.givewp-options-list--item--inputs .components-base-control{margin-bottom:0!important}.givewp-options-list--item--inputs--open{grid-row:span 2}.givewp-options-list--item--inputs .givewp-options-list__textarea-wrapper{display:grid;gap:2px;width:calc(100% + 20px + .5rem)}.givewp-options-list--item--inputs .givewp-options-list__textarea-wrapper .givewp-options-list__textarea{border:1px solid #8c8c8c;border-radius:2px;height:64px}.givewp-options-list--item--inputs .givewp-options-list__textarea-counter{color:var(--givewp-grey-500);font-size:.625rem;line-height:1.4;text-align:right}.givewp-options-list--item--button{color:var(--givewp-grey-500);height:fit-content!important;min-width:fit-content!important;padding:0!important}"),P(".givewp-form-settings__section{border-bottom:1px solid var(--givewp-grey-50);display:flex;gap:3.5rem;margin-bottom:2.5rem;padding-bottom:2.5rem}@media (max-width:1279px){.givewp-form-settings__section{flex-direction:column;gap:2rem}}.givewp-form-settings__section__header{width:20rem}@media (max-width:1279px){.givewp-form-settings__section__header{padding-left:3.25rem;width:100%}}.givewp-form-settings__section__header h4{color:var(--givewp-grey-900);font-size:1rem;line-height:1.5rem;margin:0 0 var(--givewp-spacing-2)}.givewp-form-settings__section__header p{color:var(--givewp-grey-500);font-size:.75rem;line-height:1.125rem;margin:0}.givewp-form-settings__section__body{flex:1;max-width:33.25rem}.givewp-form-settings__section__body>:not(.no-extra-gap){padding-left:3.25rem}"),P(".givewp-block-notice{background:#fffaf2;border-left:2px solid var(--givewp-orange-400);border-radius:2px;padding:var(--givewp-spacing-3) var(--givewp-spacing-4)}.givewp-block-notice span{display:block;font-size:12px}.givewp-block-notice__title{color:var(--givewp-grey-900);font-size:.75rem;font-stretch:normal;font-style:normal;font-weight:600;line-height:1.33}.givewp-block-notice__description{color:var(--givewp-grey-700);margin:var(--givewp-spacing-2) 0 var(--givewp-spacing-4) 0}.givewp-block-notice__anchor{color:var(--givewp-grey-900);cursor:pointer}");const k=(0,o.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(m.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"}));function A({textToCopy:e}){const[t,n]=(0,o.useState)(!1),i=(0,r.useCopyToClipboard)(e,(()=>(n(!0),setTimeout((()=>n(!1)),1e3))));return(0,o.createElement)(s.Button,{className:"givewp-template-tags__copy-button",isSmall:!0,variant:"tertiary",ref:i,icon:k},t?(0,l.__)("Copied!","give"):(0,l.__)("Copy Tag","give"))}function K({templateTags:e,templateTagsRef:t}){return(0,o.createElement)("ul",{className:"givewp-template-tags__list",ref:t},e.map((({id:e,description:t})=>{const n=`{${e}}`;return(0,o.createElement)("li",{className:"givewp-template-tags__list-item",key:e},(0,o.createElement)("div",{className:"givewp-template-tags__list-item-top"},(0,o.createElement)("span",{className:"givewp-template-tags__tag"},n),(0,o.createElement)(A,{textToCopy:n})),(0,o.createElement)("div",{className:"givewp-template-tags__list-item-bottom"},(0,o.createElement)("span",{className:"givewp-template-tags__description"},t)))})))}function L({content:e,onContentChange:t,onClose:n,templateTags:i,heading:r,richText:a}){return(0,o.createElement)(s.Popover,{className:"givewp-popover-content-settings",resize:!1,shift:!0,placement:"left",offset:30},(0,o.createElement)("div",{className:"givewp-popover-content-settings__header"},(0,o.createElement)("div",{className:"givewp-popover-content-settings__heading"},(0,o.createElement)("span",null,r)),(0,o.createElement)(s.Button,{icon:v,className:"givewp-popover-content-settings__close-button",onClick:n})),a?(0,o.createElement)(O,{id:"givewp-popover-content-with-template-tags",label:(0,l.__)("","give"),content:e,setContent:e=>{t(e)}}):(0,o.createElement)(s.TextareaControl,{className:"givewp-popover-content-settings__textarea",value:e,onChange:e=>{t(e)}}),(0,o.createElement)("div",{className:"givewp-popover-content-settings__template-tags-heading"},(0,o.createElement)("span",null,(0,l.__)("Template tags","give"))),(0,o.createElement)("div",{className:"givewp-popover-content-settings__template-tags"},(0,o.createElement)(K,{templateTags:i})))}const I=[{id:"offline_mailing_address",description:(0,l.__)("The mailing address provided to the donor to send their payment to.","give")},{id:"sitename",description:(0,l.__)("The name of this website.","give")}];function M({attributes:e,setAttributes:n}){const{isOpen:i,toggle:r,close:p}=function(){const[e,t]=(0,c.useState)(!1);return{isOpen:e,setIsOpen:t,toggle:()=>t((e=>!e)),open:()=>t(!0),close:()=>t(!1)}}();!function(e,t,n){(0,c.useEffect)((()=>{const o=Object.keys(n).reduce(((t,o)=>(!e.hasOwnProperty(o)&&n[o].hasOwnProperty("default")&&(t[o]=n[o].default),t)),{});t(o)}),[])}(e,n,t);const d=window.giveOfflineGatewaySettings,u=(m=(0,l.__)("Global instructions are defined in the <a>Global Settings</a>. When disabled, custom instructions can be written for this form","give"),(0,c.createInterpolateElement)(m,{a:(0,o.createElement)("a",{href:d.offlineSettingsUrl,target:"_blank"})}));var m;return(0,o.createElement)(a.InspectorControls,null,(0,o.createElement)(s.PanelBody,{title:(0,l.__)("Offline Donations","give")},(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:(0,l.__)("Enable offline donations","give"),checked:e.offlineEnabled,onChange:e=>n({offlineEnabled:e})})),e.offlineEnabled&&(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:(0,l.__)("Use global instructions","give"),checked:e.offlineUseGlobalInstructions,onChange:e=>n({offlineUseGlobalInstructions:e}),help:u})),e.offlineEnabled&&!e.offlineUseGlobalInstructions&&(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(g,{id:"offline-donation-instructions",help:(0,l.__)("Enter the instructions you want to display to the donor during the donation process. Most likely this would include important information like mailing address and who to make the check out to","give"),heading:(0,l.__)("Donation Instructions","give"),onButtonClick:r,isButtonActive:i},i&&(0,o.createElement)(L,{onContentChange:e=>n({offlineDonationInstructions:e}),heading:(0,l.__)("Donation Instructions","give"),content:e.offlineDonationInstructions,templateTags:I,onClose:p,richText:!0})))))}const F=(0,r.createHigherOrderComponent)((e=>t=>"givewp/payment-gateways"===t.name?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(e,{...t}),(0,o.createElement)(M,{...t})):(0,o.createElement)(e,{...t})),"withInspectorControl");(0,e.addFilter)("blocks.registerBlockType","givewp/stripe-payment-element",(function(e,n){return"givewp/payment-gateways"===n&&(e.attributes={...e.attributes,offlineAttributes:t}),e})),window.giveOfflineGatewaySettings.offlineEnabled&&(0,e.addFilter)("editor.BlockEdit","givewp/stripe-payment-element",F)})()})();Save