View file File name : formBuilderRegistrars.js Content :(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)r.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)}()},5573:e=>{"use strict";var t=/["'&<>]/;e.exports=function(e){var n,r=""+e,i=t.exec(r);if(!i)return r;var o="",a=0,l=0;for(a=i.index;a<r.length;a++){switch(r.charCodeAt(a)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}l!==a&&(o+=r.substring(l,a)),l=a+1,o+=n}return l!==a?o+r.substring(l,a):o}},8679:(e,t,n)=>{"use strict";var r=n(1296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||i}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=g(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var l=s(t),m=s(n),h=0;h<a.length;++h){var v=a[h];if(!(o[v]||r&&r[v]||m&&m[v]||l&&l[v])){var b=p(n,v);try{c(t,v,b)}catch(e){}}}}return t}},6103:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,g=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,C=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case l:case a:case g:return e;default:switch(e=e&&e.$$typeof){case c:case p:case h:case m:case s:return e;default:return t}}case i:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=h,t.Memo=m,t.Portal=i,t.Profiler=l,t.StrictMode=a,t.Suspense=g,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===h},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===a||e===g||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===C||e.$$typeof===v)},t.typeOf=w},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},9921:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,l=60109,s=60110,c=60112,u=60113,d=60120,p=60115,g=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;n=f("react.element"),r=f("react.portal"),i=f("react.fragment"),o=f("react.strict_mode"),a=f("react.profiler"),l=f("react.provider"),s=f("react.context"),c=f("react.forward_ref"),u=f("react.suspense"),d=f("react.suspense_list"),p=f("react.memo"),g=f("react.lazy"),f("react.block"),f("react.server.block"),f("react.fundamental"),f("react.debug_trace_mode"),f("react.legacy_hidden")}t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case g:case p:case l:return e;default:return t}}case r:return t}}}(e)===s}},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},5251:(e,t,n)=>{"use strict";var r=n(9196),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:l.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},9196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(9196),t=n.n(e);const r=window.wp.element,i=(0,r.forwardRef)((function({icon:e,size:t=24,...n},i){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:i})})),o=window.wp.i18n,a=window.wp.blockEditor,l=window.wp.components,s=window.wp.data;function c(){return window.giveStorageData}function u(){return window.givewp.form.blocks}function d({rootClientId:t}){return(0,e.createElement)(a.Inserter,{position:"bottom center",rootClientId:t,__experimentalIsQuick:!0,className:"give-section__empty-block-inserter",renderToggle:({onToggle:t,disabled:n,isOpen:r})=>{const i=(0,o._x)("Add block","Generic label for block inserter button","give");return(0,e.createElement)(l.Tooltip,{text:i},(0,e.createElement)(l.Button,{className:"block-editor-button-block-appender",onClick:t,"aria-haspopup":"true","aria-expanded":r,disabled:n,label:i},(0,o.__)("Drag a block here or click to add a block","give")))},isAppender:!0})}const p=[{name:"givewp/section",settings:{title:(0,o.__)("Section","give"),category:"section",description:(0,o.__)("A section groups form fields and content together.","give"),icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M5 3H3V5H5V3ZM9 3H7V5H9V3ZM7 19H9V21H7V19ZM5 7H3V9H5V7ZM19 7H21V9H19V7ZM5 11H3V13H5V11ZM19 11H21V13H19V11ZM5 15H3V17H5V15ZM19 15H21V17H19V15ZM5 19H3V21H5V19ZM11 3H13V5H11V3ZM13 19H11V21H13V19ZM15 3H17V5H15V3ZM17 19H15V21H17V19ZM19 3H21V5H19V3ZM21 19H19V21H21V19Z",fill:"currentColor"}))}),supports:{html:!1,givewp:{conditionalLogic:!0}},attributes:{title:{type:"string",source:"attribute",selector:"h1",default:(0,o.__)("Section Title","give")},description:{type:"string",source:"attribute",selector:"p",default:(0,o.__)("Section Description","give")},allowedBlocks:{default:!0},innerBlocksTemplate:{default:[]}},edit:function(t){const{attributes:{title:n,description:r},setAttributes:i,clientId:c}=t,p=(0,s.useSelect)((e=>{const{getBlockOrder:t}=e(a.store);return t(c).length>0}),[c]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"block-editor-block-list__layout-section"},(0,e.createElement)("header",{style:{display:"flex",flexDirection:"column",gap:"8px"}},n.length>0&&(0,e.createElement)(a.RichText,{tagName:"h2",value:n,onChange:e=>i({title:e}),style:{margin:"0",fontSize:"22px",fontWeight:700,lineHeight:"1.6"},allowedFormats:[]}),r.length>0&&(0,e.createElement)(a.RichText,{tagName:"p",value:r,onChange:e=>i({description:e}),style:{fontSize:"16px",fontWeight:500,marginTop:"0.25rem"},allowedFormats:[]})),(0,e.createElement)(a.InnerBlocks,{allowedBlocks:u().getAll().filter((e=>"givewp/section"!==e.name)).map((e=>e.name)),template:t.attributes.innerBlocksTemplate,renderAppender:p?a.InnerBlocks.DefaultBlockAppender:()=>(0,e.createElement)("div",{className:"give-section__empty-block-inserter"},(0,e.createElement)(d,{rootClientId:c})),prioritizedInserterBlocks:["givewp/text","givewp/paragraph","givewp-form-field-manager/dropdown","givewp-form-field-manager/phone","givewp-form-field-manager/radio","givewp-form-field-manager/html"]})),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Attributes","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:"Title",value:n,onChange:e=>i({title:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextareaControl,{label:"Description",value:r,onChange:e=>i({description:e})})))))},save:function(){return null}}}],g=(p.map((({name:e})=>e)),p),f=[{name:"givewp/paragraph",settings:{title:(0,o.__)("Paragraph","give"),description:"Place a styled paragraph in your form.",category:"content",supports:{html:!1,multiple:!0,givewp:{conditionalLogic:!0}},attributes:{content:{type:"string",source:"attribute",selector:"p",default:""}},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("line",{x1:"14.917",y1:"20",x2:"14.917",y2:"4.88889",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("line",{x1:"10.4727",y1:"20",x2:"10.4727",y2:"4.88889",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("line",{x1:"18.333",y1:"4.75",x2:"9.44412",y2:"4.75",stroke:"#1E1E1E",strokeWidth:"1.5"}),(0,e.createElement)("path",{d:"M9.13889 8.88889V12.96C7.21109 12.6071 5.75 10.9186 5.75 8.88889C5.75 6.85914 7.21109 5.17065 9.13889 4.81778V8.88889Z",fill:"#1E1E1E",stroke:"#1E1E1E",strokeWidth:"1.5"}))}),edit:function({attributes:t,setAttributes:n}){const{content:r}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.RichText,{tagName:"p",value:r,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>n({content:e}),placeholder:(0,o.__)("Enter some text","give")}))},save:function(){return null}}}],m=(f.map((e=>e.name)),f),h=window.lodash;function v({label:t,setAttributes:n,onBlur:r=h.noop}){return(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label","give"),value:t,onChange:e=>n({label:e}),onBlur:r})}function b({placeholder:t,setAttributes:n}){return(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder","give"),value:t,onChange:e=>n({placeholder:e})})}function y({isRequired:t,setAttributes:n}){return(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Required","give"),checked:t,onChange:()=>n({isRequired:!t})})}const C=({title:t,children:n})=>(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:t,initialOpen:!0},n));function w({attributes:t,setAttributes:n,onLabelTextControlBlur:r=h.noop,showLabel:i=!0,showPlaceholder:a=!0,showRequired:s=!0}){const{label:c,placeholder:u,isRequired:d,options:p}=t,g=d?"give-is-required":"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",null,void 0===p?(0,e.createElement)(l.TextControl,{label:c,placeholder:u,required:d,className:g,readOnly:!0,onChange:null,value:u}):(0,e.createElement)("select",null,p.map((t=>(0,e.createElement)("option",{key:t.value,value:t.value},t.label))))),(0,e.createElement)(C,{title:(0,o.__)("Field Settings","give")},i&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(v,{label:c,setAttributes:n,onBlur:r})),a&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(b,{placeholder:u,setAttributes:n})),s&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(y,{isRequired:d,setAttributes:n}))))}const _={title:(0,o.__)("Field","give"),category:"input",supports:{html:!1,multiple:!0},attributes:{fieldName:{type:"string",source:"attribute"},label:{type:"string",source:"attribute",default:(0,o.__)("Text Field","give")},placeholder:{type:"string",source:"attribute",default:""},isRequired:{type:"boolean",source:"attribute",default:!1},options:{type:"array"}},edit:w,save:function(){return null}},x=_,{fieldName:E,label:I,placeholder:D,isRequired:S,options:L}=_.attributes;var P=n(4184),A=n.n(P);const N={...x,title:(0,o.__)("Text Field","give"),category:"custom",description:(0,o.__)("A custom text field that donors can use.","give"),supports:{givewp:{fieldSettings:{label:{default:(0,o.__)("Text field","give")},description:!0,placeholder:!0,defaultValue:!0,emailTag:!0},conditionalLogic:!0}},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M10.8449 6.89062L7.05176 16.5H9.1684L9.89932 14.6484H14.1006L14.8316 16.5H16.9482L13.155 6.89062H10.8449ZM10.6765 12.6797L12 9.32658L13.3235 12.6797H10.6765Z",fill:"#000C00"}),(0,e.createElement)(l.Path,{d:"M18 2.625H6V0.75H0.75V6H2.625V18H0.75V23.25H6V21.375H18V23.25H23.25V18H21.375V6H23.25V0.75H18V2.625ZM2.25 4.5V2.25H4.5V4.5H2.25ZM4.5 21.75H2.25V19.5H4.5V21.75ZM18 19.875H6V18H4.125V6H6V4.125H18V6H19.875V18H18V19.875ZM21.75 19.5V21.75H19.5V19.5H21.75ZM19.5 2.25H21.75V4.5H19.5V2.25Z",fill:"#000C00"}))}),edit:function({attributes:t}){const{label:n,isRequired:r,description:i,placeholder:o,defaultValue:a}=t;return(0,e.createElement)("div",{className:A()({"give-is-required":r})},(0,e.createElement)("span",{className:"components-input-control__label give-text-block__label"},n),i&&(0,e.createElement)("p",{className:"give-text-block__description"},i),(0,e.createElement)("input",{type:"text",placeholder:o,readOnly:!0,onChange:null,value:a}))}},T={name:"givewp/text",settings:N},O={name:"givewp/company",settings:{...x,title:(0,o.__)("Company","give"),description:(0,o.__)("Donors can input their company name","give"),supports:{multiple:!1},attributes:{label:{default:(0,o.__)("Company Name","give")}},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M18 2H6C4.897 2 4 2.897 4 4V21C4 21.2652 4.10536 21.5196 4.29289 21.7071C4.48043 21.8946 4.73478 22 5 22H19C19.2652 22 19.5196 21.8946 19.7071 21.7071C19.8946 21.5196 20 21.2652 20 21V4C20 2.897 19.103 2 18 2ZM18 20H6V4H18V20Z",fill:"currentColor"}),(0,e.createElement)(l.Path,{d:"M8 6H11V8H8V6ZM13 6H16V8H13V6ZM8 10H11V12H8V10ZM13 10.031H16V12H13V10.031ZM8 14H11V16H8V14ZM13 14H16V16H13V14Z",fill:"currentColor"}))})}};var R=n(5893),B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)};function k(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)}var M=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},H={k:1e3,m:1e6,b:1e9},V=function(e){var t=e.value,n=e.groupSeparator,r=void 0===n?",":n,i=e.decimalSeparator,o=void 0===i?".":i,a=e.allowDecimals,l=void 0===a||a,s=e.decimalsLimit,c=void 0===s?2:s,u=e.allowNegativeValue,d=void 0===u||u,p=e.disableAbbreviations,g=void 0!==p&&p,f=e.prefix,m=void 0===f?"":f,h=e.transformRawValue,v=(void 0===h?function(e){return e}:h)(t);if("-"===v)return v;var b=g?[]:["k","m","b"],y=new RegExp("((^|\\D)-\\d)|(-"+M(m)+")").test(v),C=RegExp("(\\d+)-?"+M(m)).exec(t)||[],w=C[0],_=C[1],x=function(e,t){void 0===t&&(t=",");var n=new RegExp(M(t),"g");return e.replace(n,"")}(m?w?v.replace(w,"").concat(_):v.replace(m,""):v,r),E=function(e,t){var n=M(t.join("")),r=new RegExp("[^\\d"+n+"]","gi");return e.replace(r,"")}(x,k([r,o],b)),I=E;if(!g){if(b.some((function(e){return e===E.toLowerCase().replace(o,"")})))return"";var D=function(e,t){void 0===t&&(t=".");var n=new RegExp("(\\d+("+M(t)+"\\d*)?)([kmb])$","i"),r=e.match(n);if(r){var i=r[1],o=r[3],a=H[o.toLowerCase()];return Number(i.replace(t,"."))*a}}(E,o);D&&(I=String(D))}var S=y&&d?"-":"";if(o&&I.includes(o)){var L=E.split(o),P=L[0],A=L[1],N=c&&A?A.slice(0,c):A;return""+S+P+(l?""+o+N:"")}return""+S+I},G=function(e,t){var n=t.groupSeparator,r=void 0===n?",":n,i=t.decimalSeparator,o=void 0===i?".":i,a=new RegExp("\\d([^"+M(r)+M(o)+"0-9]+)"),l=e.match(a);return l?l[1]:void 0},F=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,a=void 0===o?"":o,l=e.suffix,s=void 0===l?"":l;if(""===t||void 0===t)return"";if("-"===t)return"-";var c=new RegExp("^\\d?-"+(a?M(a)+"?":"")+"\\d").test(t),u="."!==n?j(t,n,c):t,d={minimumFractionDigits:i||0,maximumFractionDigits:20},p=(r?new Intl.NumberFormat(r.locale,r.currency?B(B({},d),{style:"currency",currency:r.currency}):d):new Intl.NumberFormat(void 0,d)).formatToParts(Number(u)),g=U(p,e),f=G(g,B({},e)),m=t.slice(-1)===n?n:"",h=(u.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return void 0===i&&h&&n&&(g=g.includes(n)?g.replace(RegExp("(\\d+)("+M(n)+")(\\d+)","g"),"$1$2"+h):f&&!s?g.replace(f,""+n+h+f):""+g+n+h),s&&m?""+g+m+s:f&&m?g.replace(f,""+m+f):f&&s?g.replace(f,""+m+s):[g,m,s].join("")},j=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(M(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},U=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=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?k(k([],e),[n]):[n,c]:"currency"===s?n?e:k(k([],e),[c]):"group"===s?l?e:k(k([],e),[void 0!==r?r:c]):"decimal"===s?void 0!==o&&0===o?e:k(k([],e),[void 0!==i?i:c]):k(k([],e),"fraction"===s?[void 0!==o?c.slice(0,o):c]:[c])}),[""]).join("")},q={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},W=function(e){return RegExp(/\d/,"gi").test(e)},z=(0,e.forwardRef)((function(n,r){var i=n.allowDecimals,o=void 0===i||i,a=n.allowNegativeValue,l=void 0===a||a,s=n.id,c=n.name,u=n.className,d=n.customInput,p=n.decimalsLimit,g=n.defaultValue,f=n.disabled,m=void 0!==f&&f,h=n.maxLength,v=n.value,b=n.onValueChange,y=n.fixedDecimalLength,C=n.placeholder,w=n.decimalScale,_=n.prefix,x=n.suffix,E=n.intlConfig,I=n.step,D=n.min,S=n.max,L=n.disableGroupSeparators,P=void 0!==L&&L,A=n.disableAbbreviations,N=void 0!==A&&A,T=n.decimalSeparator,O=n.groupSeparator,R=n.onChange,k=n.onFocus,M=n.onBlur,H=n.onKeyDown,j=n.onKeyUp,U=n.transformRawValue,z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,["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(T&&W(T))throw new Error("decimalSeparator cannot be a number");if(O&&W(O))throw new Error("groupSeparator cannot be a number");var Z=(0,e.useMemo)((function(){return function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce((function(e,t,n){return"currency"===t.type?B(B({},e),0===n?{currencySymbol:t.value,prefix:t.value}:{currencySymbol:t.value,suffix:t.value}):"group"===t.type?B(B({},e),{groupSeparator:t.value}):"decimal"===t.type?B(B({},e),{decimalSeparator:t.value}):e}),q)}(E)}),[E]),$=T||Z.decimalSeparator||"",K=O||Z.groupSeparator||"";if($&&K&&$===K&&!1===P)throw new Error("decimalSeparator cannot be the same as groupSeparator");var Y={decimalSeparator:$,groupSeparator:K,disableGroupSeparators:P,intlConfig:E,prefix:_||Z.prefix,suffix:x},J={decimalSeparator:$,groupSeparator:K,allowDecimals:o,decimalsLimit:p||y||2,allowNegativeValue:l,disableAbbreviations:N,prefix:_||Z.prefix,transformRawValue:U},X=null!=g?F(B(B({},Y),{decimalScale:w,value:String(g)})):null!=v?F(B(B({},Y),{decimalScale:w,value:String(v)})):"",Q=(0,e.useState)(X),ee=Q[0],te=Q[1],ne=(0,e.useState)(!1),re=ne[0],ie=ne[1],oe=(0,e.useState)(0),ae=oe[0],le=oe[1],se=(0,e.useState)(0),ce=se[0],ue=se[1],de=(0,e.useState)(null),pe=de[0],ge=de[1],fe=(0,e.useRef)(null);(0,e.useImperativeHandle)(r,(function(){return fe.current}));var me=function(e,t){ie(!0);var n=function(e){var t=e.selectionStart,n=e.value,r=e.lastKeyStroke,i=e.stateValue,o=e.groupSeparator,a=t,l=n;if(i&&a){var s=n.split("");return"Backspace"===r&&i[a]===o&&(s.splice(a-1,1),a-=1),"Delete"===r&&i[a]===o&&(s.splice(a,1),a+=1),{modifiedValue:l=s.join(""),cursorPosition:a}}return{modifiedValue:l,cursorPosition:t}}({selectionStart:t,value:e,lastKeyStroke:pe,stateValue:ee,groupSeparator:K}),r=n.modifiedValue,i=n.cursorPosition,o=V(B({value:r},J));if(!(h&&o.replace(/-/g,"").length>h)){if(""===o||"-"===o||o===$)return b&&b(void 0,c,{float:null,formatted:"",value:""}),te(o),void le(1);var a=$?o.replace($,"."):o,l=parseFloat(a),s=F(B({value:o},Y));if(null!=i){var u=i+(s.length-e.length);u=u<=0?_?_.length:0:u,le(u),ue(ce+1)}te(s),b&&b(o,c,{float:l,formatted:s,value:o})}};(0,e.useEffect)((function(){re&&"-"!==ee&&fe.current&&document.activeElement===fe.current&&fe.current.setSelectionRange(ae,ae)}),[ee,ae,fe,re,ce]);var he=B({type:"text",inputMode:"decimal",id:s,name:c,className:u,onChange:function(e){var t=e.target,n=t.value,r=t.selectionStart;me(n,r),R&&R(e)},onBlur:function(e){var t=e.target.value,n=V(B({value:t},J));if("-"===n||n===$||!n)return te(""),void(M&&M(e));var r=function(e,t,n){if(n&&e.length>1){if(e.includes(t)){var r=e.split(t),i=r[0];if((o=r[1]).length>n)return""+i+t+o.slice(0,n)}var o,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,$,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 r=e.split(t),i=r[0],o=r[1];if(0===n)return i;var a=o||"";if(a.length<n)for(;a.length<n;)a+="0";else a=a.slice(0,n);return""+i+t+a}(r,$,void 0!==w?w:y),o=parseFloat(i.replace($,".")),a=F(B(B({},Y),{value:i}));b&&b(i,c,{float:o,formatted:a,value:i}),te(a),M&&M(e)},onFocus:function(e){return k&&k(e),ee?ee.length:0},onKeyDown:function(e){var t=e.key;if(ge(t),I&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),le(ee.length);var n=parseFloat(null!=v?String(v).replace($,"."):V(B({value:ee},J)))||0,r="ArrowUp"===t?n+I:n-I;if(void 0!==D&&r<D)return;if(void 0!==S&&r>S)return;var i=String(I).includes(".")?Number(String(I).split(".")[1].length):void 0;me(String(i?r.toFixed(i):r).replace(".",$))}H&&H(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==ee){var r=G(ee,{groupSeparator:K,decimalSeparator:$});if(r&&n&&n>ee.length-r.length&&fe.current){var i=ee.length-r.length;fe.current.setSelectionRange(i,i)}}j&&j(e)},placeholder:C,disabled:m,value:null==v||"-"===ee||$&&ee===$?ee:F(B(B({},Y),{decimalScale:re?void 0:w,value:String(v)})),ref:fe},z);if(d){var ve=d;return t().createElement(ve,B({},he))}return t().createElement("input",B({},he))}));z.displayName="CurrencyInput";const Z=z,$=window.wp.compose,K=window.wp.keycodes;function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function J(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Y(e,t)}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function ee(e){var t=function(e,t){if("object"!=Q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:t+""}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){var r,i,o;r=e,i=t,o=n[t],(i=ee(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ie="function"==typeof Symbol&&Symbol.observable||"@@observable",oe=function(){return Math.random().toString(36).substring(7).split("").join(".")},ae={INIT:"@@redux/INIT"+oe(),REPLACE:"@@redux/REPLACE"+oe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+oe()}};function le(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(re(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(re(1));return n(le)(e,t)}if("function"!=typeof e)throw new Error(re(2));var i=e,o=t,a=[],l=a,s=!1;function c(){l===a&&(l=a.slice())}function u(){if(s)throw new Error(re(3));return o}function d(e){if("function"!=typeof e)throw new Error(re(4));if(s)throw new Error(re(5));var t=!0;return c(),l.push(e),function(){if(t){if(s)throw new Error(re(6));t=!1,c();var n=l.indexOf(e);l.splice(n,1),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(re(7));if(void 0===e.type)throw new Error(re(8));if(s)throw new Error(re(9));try{s=!0,o=i(o,e)}finally{s=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:ae.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(re(10));i=e,p({type:ae.REPLACE})}})[ie]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(re(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[ie]=function(){return this},e},r}function se(e,t){return function(){return t(e.apply(this,arguments))}}function ce(e,t){if("function"==typeof e)return se(e,t);if("object"!=typeof e||null===e)throw new Error(re(16));var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=se(i,t))}return n}function ue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var de=t().createContext(null),pe=function(e){e()},ge=function(){return pe},fe={notify:function(){},get:function(){return[]}};function me(e,t){var n,r=fe;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){var e=ge(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=fe)},getListeners:function(){return r}};return a}var he="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?e.useLayoutEffect:e.useEffect;const ve=function(n){var r=n.store,i=n.context,o=n.children,a=(0,e.useMemo)((function(){var e=me(r);return{store:r,subscription:e}}),[r]),l=(0,e.useMemo)((function(){return r.getState()}),[r]);he((function(){var e=a.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,l]);var s=i||de;return t().createElement(s.Provider,{value:a},o)};function be(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var ye=n(8679),Ce=n.n(ye),we=n(9864),_e=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],xe=["reactReduxForwardedRef"],Ee=[],Ie=[null,null];function De(e,t){var n=e[1];return[t.payload,n+1]}function Se(e,t,n){he((function(){return e.apply(void 0,t)}),n)}function Le(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function Pe(e,t,n,r,i,o,a,l,s,c){if(e){var u=!1,d=null,p=function(){if(!u){var e,n,p=t.getState();try{e=r(p,i.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?a.current||s():(o.current=e,l.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var Ae=function(){return[null,0]};function Ne(n,r){void 0===r&&(r={});var i=r,o=i.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,l=i.methodName,s=void 0===l?"connectAdvanced":l,c=i.renderCountProp,u=void 0===c?void 0:c,d=i.shouldHandleStateChanges,p=void 0===d||d,g=i.storeKey,f=void 0===g?"store":g,m=(i.withRef,i.forwardRef),h=void 0!==m&&m,v=i.context,b=void 0===v?de:v,y=be(i,_e),C=b;return function(r){var i=r.displayName||r.name||"Component",o=a(i),l=X({},y,{getDisplayName:a,methodName:s,renderCountProp:u,shouldHandleStateChanges:p,storeKey:f,displayName:o,wrappedComponentName:i,WrappedComponent:r}),c=y.pure,d=c?e.useMemo:function(e){return e()};function g(i){var o=(0,e.useMemo)((function(){var e=i.reactReduxForwardedRef,t=be(i,xe);return[i.context,e,t]}),[i]),a=o[0],s=o[1],c=o[2],u=(0,e.useMemo)((function(){return a&&a.Consumer&&(0,we.isContextConsumer)(t().createElement(a.Consumer,null))?a:C}),[a,C]),g=(0,e.useContext)(u),f=Boolean(i.store)&&Boolean(i.store.getState)&&Boolean(i.store.dispatch);Boolean(g)&&Boolean(g.store);var m=f?i.store:g.store,h=(0,e.useMemo)((function(){return function(e){return n(e.dispatch,l)}(m)}),[m]),v=(0,e.useMemo)((function(){if(!p)return Ie;var e=me(m,f?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[m,f,g]),b=v[0],y=v[1],w=(0,e.useMemo)((function(){return f?g:X({},g,{subscription:b})}),[f,g,b]),_=(0,e.useReducer)(De,Ee,Ae),x=_[0][0],E=_[1];if(x&&x.error)throw x.error;var I=(0,e.useRef)(),D=(0,e.useRef)(c),S=(0,e.useRef)(),L=(0,e.useRef)(!1),P=d((function(){return S.current&&c===D.current?S.current:h(m.getState(),c)}),[m,x,c]);Se(Le,[D,I,L,c,P,S,y]),Se(Pe,[p,m,b,h,D,I,L,S,y,E],[m,b,h]);var A=(0,e.useMemo)((function(){return t().createElement(r,X({},P,{ref:s}))}),[s,r,P]);return(0,e.useMemo)((function(){return p?t().createElement(u.Provider,{value:w},A):A}),[u,A,w])}var m=c?t().memo(g):g;if(m.WrappedComponent=r,m.displayName=g.displayName=o,h){var v=t().forwardRef((function(e,n){return t().createElement(m,X({},e,{reactReduxForwardedRef:n}))}));return v.displayName=o,v.WrappedComponent=r,Ce()(v,r)}return Ce()(m,r)}}function Te(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Oe(e,t){if(Te(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Te(e[n[i]],t[n[i]]))return!1;return!0}function Re(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Be(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ke(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Be(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=Be(i),i=r(t,n)),i},r}}const Me=[function(e){return"function"==typeof e?ke(e):void 0},function(e){return e?void 0:Re((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?Re((function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"==typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)})):void 0}],He=[function(e){return"function"==typeof e?ke(e):void 0},function(e){return e?void 0:Re((function(){return{}}))}];function Ve(e,t,n){return X({},n,e,t)}const Ge=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,l){var s=e(t,n,l);return a?i&&o(s,r)||(r=s):(a=!0,r=s),r}}}(e):void 0},function(e){return e?void 0:function(){return Ve}}];var Fe=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function je(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function Ue(e,t,n,r,i){var o,a,l,s,c,u=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,g=!1;return function(i,f){return g?function(i,g){var f,m,h=!d(g,a),v=!u(i,o,g,a);return o=i,a=g,h&&v?(l=e(o,a),t.dependsOnOwnProps&&(s=t(r,a)),c=n(l,s,a)):h?(e.dependsOnOwnProps&&(l=e(o,a)),t.dependsOnOwnProps&&(s=t(r,a)),c=n(l,s,a)):v?(f=e(o,a),m=!p(f,l),l=f,m&&(c=n(l,s,a)),c):c}(i,f):(l=e(o=i,a=f),s=t(r,a),c=n(l,s,a),g=!0,c)}}function qe(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=be(t,Fe),a=n(e,o),l=r(e,o),s=i(e,o);return(o.pure?Ue:je)(a,l,s,e,o)}var We=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ze(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Ze(e,t){return e===t}function $e(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Ne:n,i=t.mapStateToPropsFactories,o=void 0===i?He:i,a=t.mapDispatchToPropsFactories,l=void 0===a?Me:a,s=t.mergePropsFactories,c=void 0===s?Ge:s,u=t.selectorFactory,d=void 0===u?qe:u;return function(e,t,n,i){void 0===i&&(i={});var a=i,s=a.pure,u=void 0===s||s,p=a.areStatesEqual,g=void 0===p?Ze:p,f=a.areOwnPropsEqual,m=void 0===f?Oe:f,h=a.areStatePropsEqual,v=void 0===h?Oe:h,b=a.areMergedPropsEqual,y=void 0===b?Oe:b,C=be(a,We),w=ze(e,o,"mapStateToProps"),_=ze(t,l,"mapDispatchToProps"),x=ze(n,c,"mergeProps");return r(d,X({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:_,initMergeProps:x,pure:u,areStatesEqual:g,areOwnPropsEqual:m,areStatePropsEqual:v,areMergedPropsEqual:y},C))}}const Ke=$e(),Ye=window.ReactDOM;var Je,Xe=n.n(Ye);function Qe(t,n){var r=(0,e.useState)((function(){return{inputs:n,result:t()}}))[0],i=(0,e.useRef)(!0),o=(0,e.useRef)(r),a=i.current||Boolean(n&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,o.current.inputs))?o.current:{inputs:n,result:t()};return(0,e.useEffect)((function(){i.current=!1,o.current=a}),[a]),a.result}Je=Ye.unstable_batchedUpdates,pe=Je;var et=Qe,tt=function(e,t){return Qe((function(){return e}),t)};var nt=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},rt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},it=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},ot={top:0,right:0,bottom:0,left:0},at=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?ot:n,i=e.border,o=void 0===i?ot:i,a=e.padding,l=void 0===a?ot:a,s=nt(rt(t,r)),c=nt(it(t,o)),u=nt(it(c,l));return{marginBox:s,borderBox:nt(t),paddingBox:c,contentBox:u,margin:r,border:o,padding:l}},lt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),n},st=function(e,t){var n,r,i=e.borderBox,o=e.border,a=e.margin,l=e.padding,s=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return at({borderBox:s,border:o,margin:a,padding:l})},ct=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),st(e,t)},ut=function(e,t){var n={top:lt(t.marginTop),right:lt(t.marginRight),bottom:lt(t.marginBottom),left:lt(t.marginLeft)},r={top:lt(t.paddingTop),right:lt(t.paddingRight),bottom:lt(t.paddingBottom),left:lt(t.paddingLeft)},i={top:lt(t.borderTopWidth),right:lt(t.borderRightWidth),bottom:lt(t.borderBottomWidth),left:lt(t.borderLeftWidth)};return at({borderBox:e,margin:n,padding:r,border:i})},dt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ut(t,n)},pt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function gt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(i=t[n])||pt(r)&&pt(i)))return!1;var r,i;return!0}const ft=function(e,t){var n;void 0===t&&(t=gt);var r,i=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}},mt=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function ht(e,t){}function vt(){}function bt(e,t,n){var r=t.map((function(t){var r,i,o=(r=n,i=t.options,X({},r,{},i));return e.addEventListener(t.eventName,t.fn,o),function(){e.removeEventListener(t.eventName,t.fn,o)}}));return function(){r.forEach((function(e){e()}))}}ht.bind(null,"warn"),ht.bind(null,"error");var yt=!0,Ct="Invariant failed";function wt(e){this.message=e}function _t(e,t){if(!e)throw new wt(yt?Ct:Ct+": "+(t||""))}wt.prototype.toString=function(){return this.message};var xt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=vt,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof wt&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}J(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=bt(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof wt))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(t().Component),Et=function(e){return e+1},It=function(e,t){var n=e.droppableId===t.droppableId,r=Et(e.index),i=Et(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},Dt=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},St=function(e){return"\n The item has returned to its starting position\n of "+Et(e.index)+"\n"},Lt={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:function(e){return"\n You have lifted an item in position "+Et(e.source.index)+"\n"},onDragUpdate:function(e){var t=e.destination;if(t)return It(e.source,t);var n=e.combine;return n?Dt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+St(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+It(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+Dt(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+St(e.source)+"\n "}},Pt={x:0,y:0},At=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Nt=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Tt=function(e,t){return e.x===t.x&&e.y===t.y},Ot=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Rt=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Bt=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},kt=function(e,t){return Math.min.apply(Math,t.map((function(t){return Bt(e,t)})))},Mt=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Ht=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Vt=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Gt=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=nt({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):nt(e)},Ft=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=function(e,t){return t?Ht(e,t.scroll.diff.displacement):e}(t.marginBox,i),a=function(e,t,n){var r;return n&&n.increasedBy?X({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(o,r,n);return{page:t,withPlaceholder:n,active:Gt(a,i)}},jt=function(e,t){e.frame||_t(!1);var n=e.frame,r=Nt(t,n.scroll.initial),i=Ot(r),o=X({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}});return X({},e,{frame:o,subject:Ft({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o})})};function Ut(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function qt(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Wt(e,t){if(e.find)return e.find(t);var n=qt(e,t);return-1!==n?e[n]:void 0}function zt(e){return Array.prototype.slice.call(e)}var Zt=ft((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),$t=ft((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),Kt=ft((function(e){return Ut(e)})),Yt=ft((function(e){return Ut(e)})),Jt=ft((function(e,t){var n=Yt(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return n}));function Xt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Qt(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var en=ft((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),tn=function(e,t){return e.descriptor.droppableId===t.descriptor.id},nn={point:Pt,value:0},rn={invisible:{},visible:{},all:[]},on={displaced:rn,displacedBy:nn,at:null},an=function(e,t){return function(n){return e<=n&&n<=t}},ln=function(e){var t=an(e.top,e.bottom),n=an(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<e.top&&r.bottom>e.bottom,l=r.left<e.left&&r.right>e.right;return!(!a||!l)||a&&o||l&&i}},sn=function(e){var t=an(e.top,e.bottom),n=an(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},cn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},un={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},dn=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Pt;return Ht(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,r,o)},pn=function(e){return dn(X({},e,{isVisibleThroughFrameFn:ln}))},gn=function(e){return dn(X({},e,{isVisibleThroughFrameFn:sn}))},fn=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var o=i[e];return!o||o.shouldAnimate};function mn(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var l=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return nt(rt(n,r))}(t,r),s=t.descriptor.id;if(e.all.push(s),!pn({target:l,destination:n,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c={draggableId:s,shouldAnimate:fn(s,a,o)};return e.visible[s]=c,e}),{all:[],visible:{},invisible:{}})}function hn(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:rn,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function vn(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,c=tn(t,r);if(null==l)return hn({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var u=Wt(n,(function(e){return e.descriptor.index===l}));if(!u)return hn({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var d=en(t,n),p=n.indexOf(u);return{displaced:mn({afterDragging:d.slice(p),destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function bn(e,t){return Boolean(t.effected[e])}var yn=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Cn=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},wn=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Rt(t.line,n.marginBox[t.end]+yn(t,r),Cn(t,n.marginBox,r))},xn=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Rt(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Cn(t,n.marginBox,r))},En=function(e,t){var n=e.frame;return n?At(t,n.scroll.diff.displacement):t},In=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,l=t.at;return r&&l?"REORDER"===l.type?function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=Jt(i.descriptor.id,r),l=n.page,s=i.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Rt(t.line,n.contentBox[t.start]+yn(t,r),Cn(t,n.contentBox,r))}({axis:s,moveInto:i.page,isMoving:l});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var p=r[d];if(bn(d,o))return xn({axis:s,moveRelativeTo:p.page,isMoving:l});var g=st(p.page,u.point);return xn({axis:s,moveRelativeTo:g,isMoving:l})}var f=a[a.length-1];if(f.descriptor.id===n.descriptor.id)return l.borderBox.center;if(bn(f.descriptor.id,o)){var m=st(f.page,Ot(o.displacedBy.point));return wn({axis:s,moveRelativeTo:m,isMoving:l})}return wn({axis:s,moveRelativeTo:f.page,isMoving:l})}({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Qt(n);i||_t(!1);var o=i.draggableId,a=r[o].page.borderBox.center,l=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return bn(r,n)?o?Pt:Ot(i.point):o?i.point:Pt}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return At(a,l)}({impact:t,draggables:i,afterCritical:o}):a}(e),n=e.droppable;return n?En(n,t):t},Dn=function(e,t){var n=Nt(t,e.scroll.initial),r=Ot(n);return{frame:nt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Sn(e,t){return e.map((function(e){return t[e]}))}var Ln=function(e){var t,n,r=e.pageBorderBoxCenter,i=e.draggable,o=(t=e.viewport,n=r,At(t.scroll.diff.displacement,n)),a=Nt(o,i.page.borderBox.center);return At(i.client.borderBox.center,a)},Pn=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=void 0!==a&&a,s=Nt(r,t.page.borderBox.center),c={target:Ht(t.page.borderBox,s),destination:n,withDroppableDisplacement:o,viewport:i};return l?function(e){return dn(X({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=an(e.top,e.bottom),r=an(e.left,e.right);return function(e){return t===cn?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):gn(c)},An=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var u=Jt(r.descriptor.id,i),d=tn(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!Xt(o))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return X({},o,{at:t})}var l=o.displaced.all,s=l.length?l[0]:null;if(t)return s?a(s):null;var c=en(n,i);if(!s)return c.length?a(c[c.length-1].descriptor.id):null;var u=qt(c,(function(e){return e.descriptor.id===s}));-1===u&&_t(!1);var d=u-1;return d<0?null:a(c[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:o})||function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,c=e.afterCritical,u=l.at;if(u||_t(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return a<l||a>(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==d?null:vn({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var p=function(e){var t=e.isMovingForward,n=e.draggables,r=e.combine,i=e.afterCritical;if(!e.destination.isCombineEnabled)return null;var o=r.draggableId,a=n[o].descriptor.index;return bn(o,i)?t?a:a-1:t?a+1:a}({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:u.combine,afterCritical:c});return null==p?null:vn({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:p})}({isMovingForward:t,isInHomeList:d,draggable:n,draggables:i,destination:r,insideDestination:u,previousImpact:o,viewport:a,afterCritical:c});if(!p)return null;var g=In({impact:p,draggable:n,droppable:r,draggables:i,afterCritical:c});if(Pn({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Ln({pageBorderBoxCenter:g,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var f=Nt(g,l),m=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=Dn(n,At(n.scroll.current,o)),l=r.frame?jt(r,At(r.frame.scroll.current,o)):r,s=t.displaced,c=mn({afterDragging:Sn(s.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),u=mn({afterDragging:Sn(s.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},p={},g=[s,c,u];return s.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,g);t?p[e]=t:d[e]=!0})),X({},t,{displaced:{all:s.all,invisible:d,visible:p}})}({impact:p,viewport:a,destination:r,draggables:i,maxScrollChange:f});return{clientSelection:s,impact:m,scrollJumpRequest:f}},Nn=function(e){var t=e.subject.active;return t||_t(!1),t},Tn=function(e,t){var n=e.page.borderBox.center;return bn(e.descriptor.id,t)?Nt(n,t.displacedBy.point):n},On=function(e,t){var n=e.page.borderBox;return bn(e.descriptor.id,t)?Ht(n,Ot(t.displacedBy.point)):n},Rn=ft((function(e,t){var n=t[e.line];return{value:n,point:Rt(e.line,n)}})),Bn=function(e,t){return X({},e,{scroll:X({},e.scroll,{max:t})})},kn=function(e,t,n){var r=e.frame;tn(t,e)&&_t(!1),e.subject.withPlaceholder&&_t(!1);var i=Rn(e.axis,t.displaceBy).point,o=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return Rt(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],o=Jt(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-i;return o<=0?null:Rt(r.line,o)}(e,i,n),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r)return X({},e,{subject:Ft({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame})});var l=o?At(r.scroll.max,o):r.scroll.max,s=Bn(r,l);return X({},e,{subject:Ft({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:s}),frame:s})},Mn=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Hn=function(e){var t=e.state,n=e.type,r=function(e,t){var n=Mn(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,l=a.axis.direction,s="vertical"===l&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===l&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(s&&!i)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,g=p.draggables,f=p.droppables;return s?An({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:g,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=an(a[l.start],a[l.end]),c=Kt(i).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return ln(o.frame)(Nn(e))})).filter((function(e){var n=Nn(e);return t?a[l.crossAxisEnd]<n[l.crossAxisEnd]:n[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var t=Nn(e),n=an(t[l.start],t[l.end]);return s(t[l.start])||s(t[l.end])||n(a[l.start])||n(a[l.end])})).sort((function(e,n){var r=Nn(e)[l.crossAxisStart],i=Nn(n)[l.crossAxisStart];return t?r-i:i-r})).filter((function(e,t,n){return Nn(e)[l.crossAxisStart]===Nn(n[0])[l.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return an(Nn(e)[l.start],Nn(e)[l.end])(n[l.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return Nn(e)[l.start]-Nn(t)[l.start]}))[0]:c.sort((function(e,t){var r=kt(n,Vt(Nn(e))),i=kt(n,Vt(Nn(t)));return r!==i?r-i:Nn(e)[l.start]-Nn(t)[l.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:l});if(!c)return null;var u=Jt(c.descriptor.id,o),d=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.afterCritical,o=e.insideDestination.filter((function(e){return gn({target:On(e,i),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var o=Bt(t,En(r,Tn(e,i))),a=Bt(t,En(r,Tn(n,i)));return o<a?-1:a<o?1:e.descriptor.index-n.descriptor.index}));return o[0]||null}({pageBorderBoxCenter:n,viewport:l,destination:c,insideDestination:u,afterCritical:s}),p=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:rn,displacedBy:nn,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=In({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:s}),d=tn(i,a)?a:kn(a,i,o);return Pn({draggable:i,destination:d,newPageBorderBoxCenter:u,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p,g=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),f=(p=n.descriptor.index,n.descriptor.id===i.descriptor.id||g?p:p+1);return vn({draggable:i,insideDestination:r,destination:a,viewport:l,displacedBy:Rn(a.axis,i.displaceBy),last:rn,index:f})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:u,viewport:l,afterCritical:s});if(!p)return null;var g=In({impact:p,draggable:r,droppable:c,draggables:o,afterCritical:s});return{clientSelection:Ln({pageBorderBoxCenter:g,draggable:r,viewport:l}),impact:p,scrollJumpRequest:null}}({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:g,droppables:f,viewport:t.viewport,afterCritical:t.afterCritical})};function Vn(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Gn(e){var t=an(e.top,e.bottom),n=an(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}var Fn=function(e,t){return nt(Ht(e,t))};function jn(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var Un=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,s=Fn(n.page.borderBox,t),c=function(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=Kt(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,i=e.subject.active;if(!i)return!1;if(r=i,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(Gn(i)(t.center))return!0;var o=e.axis,a=i.center[o.crossAxisLine],l=t[o.crossAxisStart],s=t[o.crossAxisEnd],c=an(i[o.crossAxisStart],i[o.crossAxisEnd]),u=c(l),d=c(s);return!u&&!d||(u?l<a:s>a)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.candidates,r=e.draggable.page.borderBox.center,i=n.map((function(e){var n=e.axis,i=Rt(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Bt(r,i)}})).sort((function(e,t){return t.distance-e.distance}));return i[0]?i[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}({pageBorderBox:s,draggable:n,droppables:i});if(!c)return on;var u=i[c],d=Jt(u.descriptor.id,r),p=function(e,t){var n=e.frame;return n?Fn(t,n.scroll.diff.value):t}(u,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var l=i.axis,s=Rn(i.axis,t.displaceBy),c=s.value,u=n[l.start],d=n[l.end],p=Wt(en(t,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[l.size]/4,o=bn(t,a),s=jn({displaced:r.displaced,id:t});return o?s?d>n[l.start]+i&&d<n[l.end]-i:u>n[l.start]-c+i&&u<n[l.end]-c-i:s?d>n[l.start]+c+i&&d<n[l.end]+c-i:u>n[l.start]+i&&u<n[l.end]-i}));return p?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:u,insideDestination:d,afterCritical:l})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,c=Rn(r.axis,n.displaceBy),u=c.value,d=t[s.start],p=t[s.end],g=function(e){var t=e.draggable,n=e.closest;return n?e.inHomeList&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:Wt(en(n,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=bn(t,l),i=jn({displaced:o,id:t});return r?i?p<=n:d<n-u:i?p<=n+u:d<n})),inHomeList:tn(n,r)});return vn({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:c,index:g})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:u,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},qn=function(e,t){var n;return X({},e,((n={})[t.descriptor.id]=t,n))},Wn=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,l=i||t.viewport,s=r||t.dimensions,c=n||t.current.client.selection,u=Nt(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:At(t.initial.client.borderBoxCenter,u)},p={selection:At(d.selection,l.scroll.current),borderBoxCenter:At(d.borderBoxCenter,l.scroll.current),offset:At(d.offset,l.scroll.diff.value)},g={client:d,page:p};if("COLLECTING"===t.phase)return X({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:g});var f=s.draggables[t.critical.draggable.id],m=o||Un({pageOffset:p.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),h=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.impact,o=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=Mn(t),o=Mn(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var l=function(e){var t=e.subject.withPlaceholder;t||_t(!1);var n=e.frame;if(!n)return X({},e,{subject:Ft({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var r=t.oldFrameMaxScroll;r||_t(!1);var i=Bn(n,r);return X({},e,{subject:Ft({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null}),frame:i})}(a);return qn(r,l)}({previousImpact:e.previousImpact,impact:i,droppables:r}),a=Mn(i);if(!a)return o;var l=r[a];if(tn(t,l))return o;if(l.subject.withPlaceholder)return o;var s=kn(l,t,n);return qn(o,s)}({draggable:f,impact:m,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables});return X({},t,{current:g,dimensions:{draggables:s.draggables,droppables:h},impact:m,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})},zn=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,l=function(e,t){return e.map((function(e){return t[e]}))}(a.all,r);return X({},t,{displaced:mn({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a})})},Zn=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,l=In({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return Ln({pageBorderBoxCenter:l,draggable:n,viewport:o})},$n=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&_t(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,c=l[t.critical.draggable.id],u=Mn(i);u||_t(!1);var d=s[u],p=zn({impact:i,viewport:o,destination:d,draggables:l}),g=Zn({impact:p,draggable:c,droppable:d,draggables:l,viewport:o,afterCritical:t.afterCritical});return Wn({impact:p,clientSelection:g,state:t,dimensions:a,viewport:o})},Kn=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Rn(n.axis,t.displaceBy),a=Jt(n.descriptor.id,r),l=a.indexOf(t);-1===l&&_t(!1);var s,c=a.slice(l+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:u};return{impact:{displaced:mn({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(s=t.descriptor,{index:s.index,droppableId:s.droppableId})}},afterCritical:d}},Yn=function(e){return"SNAP"===e.movementMode},Jn=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:qn(e.droppables,t)}}(e.dimensions,t);return!Yn(e)||n?Wn({state:e,dimensions:r}):$n({state:e,dimensions:r})};function Xn(e){return e.isDragging&&"SNAP"===e.movementMode?X({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Qn={phase:"IDLE",completed:null,shouldFlush:!1},er=function(e,t){if(void 0===e&&(e=Qn),"FLUSH"===t.type)return X({},Qn,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&_t(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],u={selection:i,borderBoxCenter:s.client.borderBox.center,offset:Pt},d={client:u,page:{selection:At(u.selection,o.scroll.initial),borderBoxCenter:At(u.selection,o.scroll.initial),offset:At(u.selection,o.scroll.diff.value)}},p=Kt(a.droppables).every((function(e){return!e.isFixedOnPage})),g=Kn({draggable:s,home:c,draggables:a.draggables,viewport:o}),f=g.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:p,impact:f,afterCritical:g.afterCritical,onLiftImpact:f,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&_t(!1),X({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&_t(!1),function(e){var t=e.state,n=e.published,r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return jt(n,e.scroll)})),i=X({},t.dimensions.droppables,{},Zt(r)),o=$t(function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,o=function(e){var t=e.frame;return t||_t(!1),t}(n[t]),a=o.scroll.diff.value,l=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=st(t.client,n),o=ct(i,r);return X({},t,{placeholder:X({},t.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:At(i,a),initialWindowScroll:r.scroll.initial});return l}))}({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=X({},t.dimensions.draggables,{},o);n.removals.forEach((function(e){delete a[e]}));var l={droppables:i,draggables:a},s=Mn(t.impact),c=s?l.droppables[s]:null,u=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],p=Kn({draggable:u,home:d,draggables:a,viewport:t.viewport}),g=p.impact,f=p.afterCritical,m=c&&c.isCombineEnabled?t.impact:g,h=Un({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:m,viewport:t.viewport,afterCritical:f}),v=X({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:h,onLiftImpact:g,dimensions:l,afterCritical:f,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:X({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Vn(e)||_t(!1);var m=t.payload.client;return Tt(m,e.current.client.selection)?e:Wn({state:e,clientSelection:m,impact:Yn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Xn(e);if("COLLECTING"===e.phase)return Xn(e);Vn(e)||_t(!1);var h=t.payload,v=h.id,b=h.newScroll,y=e.dimensions.droppables[v];if(!y)return e;var C=jt(y,b);return Jn(e,C,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Vn(e)||_t(!1);var w=t.payload,_=w.id,x=w.isEnabled,E=e.dimensions.droppables[_];E||_t(!1),E.isEnabled===x&&_t(!1);var I=X({},E,{isEnabled:x});return Jn(e,I,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Vn(e)||_t(!1);var D=t.payload,S=D.id,L=D.isCombineEnabled,P=e.dimensions.droppables[S];P||_t(!1),P.isCombineEnabled===L&&_t(!1);var A=X({},P,{isCombineEnabled:L});return Jn(e,A,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Vn(e)||_t(!1),e.isWindowScrollAllowed||_t(!1);var N=t.payload.newScroll;if(Tt(e.viewport.scroll.current,N))return Xn(e);var T=Dn(e.viewport,N);return Yn(e)?$n({state:e,viewport:T}):Wn({state:e,viewport:T})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Vn(e))return e;var O=t.payload.maxScroll;if(Tt(O,e.viewport.scroll.max))return e;var R=X({},e.viewport,{scroll:X({},e.viewport.scroll,{max:O})});return X({phase:"DRAGGING"},e,{viewport:R})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&_t(!1);var B=Hn({state:e,type:t.type});return B?Wn({state:e,impact:B.impact,clientSelection:B.clientSelection,scrollJumpRequest:B.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var k=t.payload.reason;return"COLLECTING"!==e.phase&&_t(!1),X({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:k})}if("DROP_ANIMATE"===t.type){var M=t.payload,H=M.completed,V=M.dropDuration,G=M.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&_t(!1),{phase:"DROP_ANIMATING",completed:H,dropDuration:V,newHomeClientOffset:G,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},tr=function(e){return{type:"LIFT",payload:e}},nr=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},rr=function(){return{type:"COLLECTION_STARTING",payload:null}},ir=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},or=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},ar=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},lr=function(e){return{type:"MOVE",payload:e}},sr=function(){return{type:"MOVE_UP",payload:null}},cr=function(){return{type:"MOVE_DOWN",payload:null}},ur=function(){return{type:"MOVE_RIGHT",payload:null}},dr=function(){return{type:"MOVE_LEFT",payload:null}},pr=function(){return{type:"FLUSH",payload:null}},gr=function(e){return{type:"DROP_COMPLETE",payload:e}},fr=function(e){return{type:"DROP",payload:e}},mr="cubic-bezier(.2,1,.1,1)",hr=0,vr=.7,br=.75,yr="0.2s cubic-bezier(0.2, 0, 0, 1)",Cr={fluid:"opacity "+yr,snap:"transform "+yr+", opacity "+yr,drop:function(e){var t=e+"s "+mr;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+yr,placeholder:"height "+yr+", width "+yr+", margin "+yr},wr=function(e){return Tt(e,Pt)?null:"translate("+e.x+"px, "+e.y+"px)"},_r=wr,xr=function(e,t){var n=wr(e);return n?t?n+" scale("+br+")":n:null},Er=.33,Ir=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),o=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&_t(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&_t(!1);var a=i.critical,l=i.dimensions,s=l.draggables[i.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:X({},r,{displaced:rn}),didDropInsideDroppable:!0}:{impact:zn({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),u=c.impact,d=c.didDropInsideDroppable,p=d?Xt(u):null,g=d?Qt(u):null,f={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:s.descriptor.id,type:s.descriptor.type,source:f,reason:o,mode:i.movementMode,destination:p,combine:g},h=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,l=r.droppables,s=Mn(t),c=s?l[s]:null,u=l[n.descriptor.droppableId],d=Zn({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:c||u,viewport:i});return Nt(d,n.client.borderBox.center)}({impact:u,draggable:s,dimensions:l,viewport:i.viewport,afterCritical:i.afterCritical}),v={critical:i.critical,afterCritical:i.afterCritical,result:m,impact:u};if(!Tt(i.current.client.offset,h)||Boolean(m.combine)){var b=function(e){var t=e.reason,n=Bt(e.current,e.destination);if(n<=0)return Er;if(n>=1500)return.55;var r=Er+n/1500*.22000000000000003;return Number(("CANCEL"===t?.6*r:r).toFixed(2))}({current:i.current.client.offset,destination:h,reason:o});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:h,dropDuration:b,completed:v}})}else n(gr({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},Dr=function(){return{x:window.pageXOffset,y:window.pageYOffset}};var Sr=function(e){var t=function(e){var t=e.onWindowScroll,n=mt((function(){t(Dr())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),i=vt;function o(){return i!==vt}return{start:function(){o()&&_t(!1),i=bt(window,[r])},stop:function(){o()||_t(!1),n.cancel(),i(),i=vt},isActive:o}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Lr=function(e,t){t()},Pr=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Ar=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},Nr=function(e,t){var n=function(e,t){var n,r=(n=[],{add:function(e){var t=setTimeout((function(){return function(e){var t=qt(n,(function(t){return t.timerId===e}));-1===t&&_t(!1),n.splice(t,1)[0].callback()}(t)})),r={timerId:t,callback:e};n.push(r)},flush:function(){if(n.length){var e=[].concat(n);n.length=0,e.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}),i=null,o=function(n){i||_t(!1),i=null,Lr(0,(function(){return Ar(e().onDragEnd,n,t,Lt.onDragEnd)}))};return{beforeCapture:function(t,n){i&&_t(!1),Lr(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){i&&_t(!1),Lr(0,(function(){var r=e().onBeforeDragStart;r&&r(Pr(t,n))}))},start:function(n,o){i&&_t(!1);var a=Pr(n,o);i={mode:o,lastCritical:n,lastLocation:a.source,lastCombine:null},r.add((function(){Lr(0,(function(){return Ar(e().onDragStart,a,t,Lt.onDragStart)}))}))},update:function(n,o){var a=Xt(o),l=Qt(o);i||_t(!1);var s=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(n,i.lastCritical);s&&(i.lastCritical=n);var c,u,d=(u=a,!(null==(c=i.lastLocation)&&null==u||null!=c&&null!=u&&c.droppableId===u.droppableId&&c.index===u.index));d&&(i.lastLocation=a);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(i.lastCombine,l);if(p&&(i.lastCombine=l),s||d||p){var g=X({},Pr(n,i.mode),{combine:l,destination:a});r.add((function(){Lr(0,(function(){return Ar(e().onDragUpdate,g,t,Lt.onDragUpdate)}))}))}},flush:function(){i||_t(!1),r.flush()},drop:o,abort:function(){if(i){var e=X({},Pr(i.lastCritical,i.mode),{combine:null,destination:null,reason:"CANCEL"});o(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},Tr=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&_t(!1),e.dispatch(gr({completed:r.completed}))}else t(n)}}},Or=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=bt(window,[o])}))}}}},Rr=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(fr({reason:r.reason})))}}}},Br=ue,kr=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,l=e.autoScroller;return le(er,Br(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(re(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(i)}));return r=ue.apply(void 0,o)(n.dispatch),ne(ne({},n),{},{dispatch:r})}}}((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,l=o.clientSelection,s=o.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(gr({completed:c.completed})),"IDLE"!==n().phase&&_t(!1),r(pr()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:s}});var u={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},d=e.startPublishing(u),p=d.critical,g=d.dimensions,f=d.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:p,dimensions:g,clientSelection:l,movementMode:s,viewport:f}})}else t(i)}}}}(n),Ir,Tr,Or,Rr,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&_t(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(l),Sr,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),Nr(o,a))))},Mr=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Nt({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Hr=function(){var e=document.documentElement;return e||_t(!1),e},Vr=function(){var e=Hr();return Mr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function Gr(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var Fr,jr,Ur=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame((function(){i=null;var e=r,o=e.additions,a=e.removals,l=e.modified,s=Object.keys(o).map((function(e){return t.draggable.getById(e).getDimension(Pt)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(l).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:s,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||_t(!1);var i=n.critical.draggable;"ADDITION"===t.type&&Gr(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&Gr(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||_t(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||_t(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||_t(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&_t(!1);var r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:o.descriptor},l=e.subscribe(i);return n={critical:a,unsubscribe:l},function(e){var t,n,r,i,o,a,l,s=e.critical,c=e.scrollOptions,u=e.registry,d=(t=Dr(),n=Vr(),r=t.y,i=t.x,a=(o=Hr()).clientWidth,l=o.clientHeight,{frame:nt({top:r,left:i,right:i+a,bottom:r+l}),scroll:{initial:t,current:t,max:n,diff:{value:Pt,displacement:Pt}}}),p=d.scroll.current,g=s.droppable,f=u.droppable.getAllByType(g.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(p,c)})),m=u.draggable.getAllByType(s.draggable.type).map((function(e){return e.getDimension(p)}));return{dimensions:{draggables:$t(m),droppables:Zt(f)},critical:s,viewport:d}}({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},qr=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},Wr=function(e){window.scrollBy(e.x,e.y)},zr=ft((function(e){return Kt(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),Zr=function(e){return Math.pow(e,2)},$r=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},Kr=360,Yr=1200,Jr=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return 28;if(e===t.startScrollingFrom)return 1;var n=$r({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=28*Zr(1-n);return Math.ceil(r)}(t,n);return 0===o?0:i?Math.max(function(e,t){var n=t,r=Yr,i=Date.now()-n;if(i>=Yr)return e;if(i<Kr)return 1;var o=$r({startOfRange:Kr,endOfRange:r,current:i}),a=e*Zr(o);return Math.ceil(a)}(o,r),1):o},Xr=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:.25*e[t.size],maxScrollValueAt:.05*e[t.size]}}(t,i);return n[i.end]<n[i.start]?Jr({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*Jr({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},Qr=Mt((function(e){return 0===e?0:e})),ei=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=Xr({container:n,distanceToEdges:a,dragStartTime:t,axis:cn,shouldUseTimeDampening:o}),s=Xr({container:n,distanceToEdges:a,dragStartTime:t,axis:un,shouldUseTimeDampening:o}),c=Qr({x:s,y:l});if(Tt(c,Pt))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?Tt(u,Pt)?null:u:null},ti=Mt((function(e){return 0===e?0:e>0?1:-1})),ni=(Fr=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,i=At(t,r),o={x:Fr(i.x,n.x),y:Fr(i.y,n.y)};return Tt(o,Pt)?null:o}),ri=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=ti(r),a=ni({max:i,current:n,change:o});return!a||0!==o.x&&0===a.x||0!==o.y&&0===a.y},ii=function(e,t){return ri({current:e.scroll.current,max:e.scroll.max,change:t})},oi=function(e,t){var n=e.frame;return!!n&&ri({current:n.scroll.current,max:n.scroll.max,change:t})},ai=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.shouldUseTimeDampening,o=ei({dragStartTime:e.dragStartTime,container:t.frame,subject:n,center:r,shouldUseTimeDampening:i});return o&&ii(t,o)?o:null}({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r});if(s)return void i(s)}var c=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=function(e,t){var n=Wt(zr(t),(function(t){return t.frame||_t(!1),Gn(t.frame.pageMarginBox)(e)}));return n}(t,r);return o}({center:a,destination:Mn(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=ei({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&oi(t,l)?l:null}({dragStartTime:n,droppable:c,subject:l,center:a,shouldUseTimeDampening:r});u&&o(c.descriptor.id,u)}},li=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow;return function(e){var i=e.scrollJumpRequest;if(i){var o=Mn(e.impact);o||_t(!1);var a=function(e,t){if(!oi(e,t))return t;var r=function(e,t){var n=e.frame;return n&&oi(e,t)?ni({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=Nt(t,r);return n(e.descriptor.id,i),Nt(t,i)}(e.dimensions.droppables[o],i);if(a){var l=e.viewport,s=function(e,t,n){if(!e)return n;if(!ii(t,n))return n;var i=function(e,t){if(!ii(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return ni({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var o=Nt(n,i);return r(o),Nt(n,o)}(e.isWindowScrollAllowed,l,a);s&&function(e,n){var r=At(e.current.client.selection,n);t({client:r})}(e,s)}}}},si=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollDroppable,n=mt(e.scrollWindow),r=mt(t),i=null,o=function(e){i||_t(!1);var t=i,o=t.shouldUseTimeDampening,a=t.dragStartTime;ai({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:a,shouldUseTimeDampening:o})};return{start:function(e){i&&_t(!1);var t=Date.now(),n=!1,r=function(){n=!0};ai({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&o(e)},stop:function(){i&&(n.cancel(),r.cancel(),i=null)},scroll:o}}({scrollWindow:n,scrollDroppable:t}),o=li({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},ci="data-rbd",ui={base:jr=ci+"-drag-handle",draggableId:jr+"-draggable-id",contextId:jr+"-context-id"},di=function(){var e=ci+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),pi=function(){var e=ci+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),gi={contextId:ci+"-scroll-container-context-id"},fi=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},mi=function(e){var t,n,r,i=(t=e,function(e){return"["+e+'="'+t+'"]'}),o=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(ui.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n transition: "+Cr.outOfTheWay+";\n ",{selector:i(di.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),o,{selector:i(pi.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:fi(a,"always"),resting:fi(a,"resting"),dragging:fi(a,"dragging"),dropAnimating:fi(a,"dropAnimating"),userCancel:fi(a,"userCancel")}},hi="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?e.useLayoutEffect:e.useEffect,vi=function(){var e=document.querySelector("head");return e||_t(!1),e},bi=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t},yi=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Ci(e){return e instanceof yi(e).HTMLElement}function wi(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||_t(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Ut(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||_t(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return Ut(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var _i=t().createContext(null),xi=function(){var e=document.body;return e||_t(!1),e},Ei={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Ii=function(e){return"rbd-announcement-"+e},Di=0,Si={separator:"::"};function Li(e,t){return void 0===t&&(t=Si),et((function(){return""+e+t.separator+Di++}),[t.separator,e])}var Pi=t().createContext(null);function Ai(t){var n=(0,e.useRef)(t);return(0,e.useEffect)((function(){n.current=t})),n}var Ni,Ti,Oi=((Ni={})[13]=!0,Ni[9]=!0,Ni),Ri=function(e){Oi[e.keyCode]&&e.preventDefault()},Bi=function(){var e="visibilitychange";return"undefined"==typeof document?e:Wt([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),ki={type:"IDLE"};function Mi(){}var Hi=((Ti={})[34]=!0,Ti[33]=!0,Ti[36]=!0,Ti[35]=!0,Ti);var Vi={type:"IDLE"},Gi={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Fi(e,t){if(null==t)return!1;if(Boolean(Gi[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Fi(e,t.parentElement)}function ji(e,t){var n=t.target;return!!Ci(n)&&Fi(e,n)}var Ui=function(e){return nt(e.getBoundingClientRect()).center},qi=function(){var e="matches";return"undefined"==typeof document?e:Wt([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function Wi(e,t){return null==e?null:e[qi](t)?e:Wi(e.parentElement,t)}function zi(e,t){return e.closest?e.closest(t):Wi(e,t)}function Zi(e){e.preventDefault()}function $i(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function Ki(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!!o&&!!o.options.isEnabled&&!!qr(n.getState(),i)}var Yi=[function(t){var n=(0,e.useRef)(ki),r=(0,e.useRef)(vt),i=et((function(){return{eventName:"mousedown",fn:function(e){if(!e.defaultPrevented&&0===e.button&&!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)){var n=t.findClosestDraggableId(e);if(n){var i=t.tryGetLock(n,l,{sourceEvent:e});if(i){e.preventDefault();var o={x:e.clientX,y:e.clientY};r.current(),u(i,o)}}}}}}),[t]),o=et((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(e){if(!e.defaultPrevented){var n=t.findClosestDraggableId(e);if(n){var r=t.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||t.canGetLock(n)&&e.preventDefault())}}}}}),[t]),a=tt((function(){r.current=bt(window,[o,i],{passive:!1,capture:!0})}),[o,i]),l=tt((function(){"IDLE"!==n.current.type&&(n.current=ki,r.current(),a())}),[a]),s=tt((function(){var e=n.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),c=tt((function(){var e=function(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},l=r();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);if("PENDING"!==l.type&&_t(!1),s=l.point,c=a,Math.abs(c.x-s.x)>=5||Math.abs(c.y-s.y)>=5){var s,c;e.preventDefault();var u=l.actions.fluidLift(a);i({type:"DRAGGING",actions:u})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Ri(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&_t(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:Bi,fn:t}]}({cancel:s,completed:l,getPhase:function(){return n.current},setPhase:function(e){n.current=e}});r.current=bt(window,e,{capture:!0,passive:!1})}),[s,l]),u=tt((function(e,t){"IDLE"!==n.current.type&&_t(!1),n.current={type:"PENDING",point:t,actions:e},c()}),[c]);hi((function(){return a(),function(){r.current()}}),[a])},function(t){var n=(0,e.useRef)(Mi),r=et((function(){return{eventName:"keydown",fn:function(e){if(!e.defaultPrevented&&32===e.keyCode){var r=t.findClosestDraggableId(e);if(r){var o=t.tryGetLock(r,s,{sourceEvent:e});if(o){e.preventDefault();var a=!0,l=o.snapLift();n.current(),n.current=bt(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(Hi[r.keyCode]?r.preventDefault():Ri(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Bi,fn:n}]}(l,s),{capture:!0,passive:!1})}}}function s(){a||_t(!1),a=!1,n.current(),i()}}}}),[t]),i=tt((function(){n.current=bt(window,[r],{passive:!1,capture:!0})}),[r]);hi((function(){return i(),function(){n.current()}}),[i])},function(t){var n=(0,e.useRef)(Vi),r=(0,e.useRef)(vt),i=tt((function(){return n.current}),[]),o=tt((function(e){n.current=e}),[]),a=et((function(){return{eventName:"touchstart",fn:function(e){if(!e.defaultPrevented){var n=t.findClosestDraggableId(e);if(n){var i=t.tryGetLock(n,s,{sourceEvent:e});if(i){var o=e.touches[0],a={x:o.clientX,y:o.clientY};r.current(),p(i,a)}}}}}}),[t]),l=tt((function(){r.current=bt(window,[a],{capture:!0,passive:!1})}),[a]),s=tt((function(){var e=n.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(Vi),r.current(),l())}),[l,o]),c=tt((function(){var e=n.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),u=tt((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:i},n=bt(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&_t(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:Bi,fn:t}]}(t),e),o=bt(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:Bi,fn:t}]}(t),e);r.current=function(){n(),o()}}),[c,i,s]),d=tt((function(){var e=i();"PENDING"!==e.type&&_t(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[i,o]),p=tt((function(e,t){"IDLE"!==i().type&&_t(!1);var n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,i,o,d]);hi((function(){return l(),function(){r.current();var e=i();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(Vi))}}),[i,l,o]),hi((function(){return bt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Ji(t){var n=t.contextId,r=t.store,i=t.registry,o=t.customSensors,a=t.enableDefaultSensors,l=[].concat(a?Yi:[],o||[]),s=(0,e.useState)((function(){return function(){var e=null;function t(){e||_t(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&_t(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=tt((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);hi((function(){var e=r.getState();return r.subscribe((function(){var t=r.getState();c(e,t),e=t}))}),[s,r,c]),hi((function(){return s.tryAbandon}),[s.tryAbandon]);for(var u=tt((function(e){return Ki({lockAPI:s,registry:i,store:r,draggableId:e})}),[s,i,r]),d=tt((function(e,t,o){return function(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent;if(!Ki({lockAPI:t,store:r,registry:i,draggableId:o}))return null;var s=i.draggable.getById(o),c=function(e,t){var n="["+di.contextId+'="'+e+'"]',r=Wt(zt(document.querySelectorAll(n)),(function(e){return e.getAttribute(di.id)===t}));return r&&Ci(r)?r:null}(n,s.descriptor.id);if(!c)return null;if(l&&!s.options.canDragInteractiveElements&&ji(c,l))return null;var u=t.claim(a||vt),d="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function g(){return t.isActive(u)}var f=function(e,t){$i({expected:e,phase:d,isLockActive:g,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(e){function n(){t.release(),d="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=bt(window,[{eventName:"click",fn:Zi,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(fr({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&_t(!1)),r.dispatch(tr(e.liftActionArgs)),d="DRAGGING",X({isActive:function(){return $i({expected:"DRAGGING",phase:d,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return $i({expected:"PRE_DRAG",phase:d,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=mt((function(e){f((function(){return lr({client:e})}))}));return X({},m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return f(sr)},moveRight:function(){return f(ur)},moveDown:function(){return f(cr)},moveLeft:function(){return f(dr)}};return m({liftActionArgs:{id:o,clientSelection:Ui(c),movementMode:"SNAP"},cleanup:vt,actions:e})},abort:function(){$i({expected:"PRE_DRAG",phase:d,isLockActive:g,shouldWarn:!0})&&t.release()}}}({lockAPI:s,registry:i,contextId:n,store:r,draggableId:e,forceSensorStop:t,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[n,s,i,r]),p=tt((function(e){return function(e,t){var n=function(e,t){var n,r=t.target;if(!((n=r)instanceof yi(n).Element))return null;var i=function(e){return"["+ui.contextId+'="'+e+'"]'}(e),o=zi(r,i);return o&&Ci(o)?o:null}(e,t);return n?n.getAttribute(ui.draggableId):null}(n,e)}),[n]),g=tt((function(e){var t=i.draggable.findById(e);return t?t.options:null}),[i.draggable]),f=tt((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==r.getState().phase&&r.dispatch(pr()))}),[s,r]),m=tt(s.isClaimed,[s]),h=et((function(){return{canGetLock:u,tryGetLock:d,findClosestDraggableId:p,findOptionsForDraggable:g,tryReleaseLock:f,isLockClaimed:m}}),[u,d,p,g,f,m]),v=0;v<l.length;v++)l[v](h)}var Xi=function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function Qi(e){return e.current||_t(!1),e.current}function eo(n){var r=n.contextId,i=n.setCallbacks,o=n.sensors,a=n.nonce,l=n.dragHandleUsageInstructions,s=(0,e.useRef)(null),c=Ai(n),u=tt((function(){return Xi(c.current)}),[c]),d=function(t){var n=et((function(){return Ii(t)}),[t]),r=(0,e.useRef)(null);return(0,e.useEffect)((function(){var e=document.createElement("div");return r.current=e,e.id=n,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),X(e.style,Ei),xi().appendChild(e),function(){setTimeout((function(){var t=xi();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)}))}}),[n]),tt((function(e){var t=r.current;t&&(t.textContent=e)}),[])}(r),p=function(t){var n=t.contextId,r=t.text,i=Li("hidden-text",{separator:"-"}),o=et((function(){return"rbd-hidden-text-"+(e={contextId:n,uniqueId:i}).contextId+"-"+e.uniqueId;var e}),[i,n]);return(0,e.useEffect)((function(){var e=document.createElement("div");return e.id=o,e.textContent=r,e.style.display="none",xi().appendChild(e),function(){var t=xi();t.contains(e)&&t.removeChild(e)}}),[o,r]),o}({contextId:r,text:l}),g=function(t,n){var r=et((function(){return mi(t)}),[t]),i=(0,e.useRef)(null),o=(0,e.useRef)(null),a=tt(ft((function(e){var t=o.current;t||_t(!1),t.textContent=e})),[]),l=tt((function(e){var t=i.current;t||_t(!1),t.textContent=e}),[]);hi((function(){(i.current||o.current)&&_t(!1);var e=bi(n),s=bi(n);return i.current=e,o.current=s,e.setAttribute(ci+"-always",t),s.setAttribute(ci+"-dynamic",t),vi().appendChild(e),vi().appendChild(s),l(r.always),a(r.resting),function(){var e=function(e){var t=e.current;t||_t(!1),vi().removeChild(t),e.current=null};e(i),e(o)}}),[n,l,a,r.always,r.resting,t]);var s=tt((function(){return a(r.dragging)}),[a,r.dragging]),c=tt((function(e){a("DROP"!==e?r.userCancel:r.dropAnimating)}),[a,r.dropAnimating,r.userCancel]),u=tt((function(){o.current&&a(r.resting)}),[a,r.resting]);return et((function(){return{dragging:s,dropping:c,resting:u}}),[s,c,u])}(r,a),f=tt((function(e){Qi(s).dispatch(e)}),[]),m=et((function(){return ce({publishWhileDragging:nr,updateDroppableScroll:ir,updateDroppableIsEnabled:or,updateDroppableIsCombineEnabled:ar,collectionStarting:rr},f)}),[f]),h=function(){var t=et(wi,[]);return(0,e.useEffect)((function(){return function(){requestAnimationFrame(t.clean)}}),[t]),t}(),v=et((function(){return Ur(h,m)}),[h,m]),b=et((function(){return si(X({scrollWindow:Wr,scrollDroppable:v.scrollDroppable},ce({move:lr},f)))}),[v.scrollDroppable,f]),y=function(t){var n=(0,e.useRef)({}),r=(0,e.useRef)(null),i=(0,e.useRef)(null),o=(0,e.useRef)(!1),a=tt((function(e,t){var r={id:e,focus:t};return n.current[e]=r,function(){var t=n.current;t[e]!==r&&delete t[e]}}),[]),l=tt((function(e){var n=function(e,t){var n="["+ui.contextId+'="'+e+'"]',r=zt(document.querySelectorAll(n));if(!r.length)return null;var i=Wt(r,(function(e){return e.getAttribute(ui.draggableId)===t}));return i&&Ci(i)?i:null}(t,e);n&&n!==document.activeElement&&n.focus()}),[t]),s=tt((function(e,t){r.current===e&&(r.current=t)}),[]),c=tt((function(){i.current||o.current&&(i.current=requestAnimationFrame((function(){i.current=null;var e=r.current;e&&l(e)})))}),[l]),u=tt((function(e){r.current=null;var t=document.activeElement;t&&t.getAttribute(ui.draggableId)===e&&(r.current=e)}),[]);return hi((function(){return o.current=!0,function(){o.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}}),[]),et((function(){return{register:a,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:s}}),[a,u,c,s])}(r),C=et((function(){return kr({announce:d,autoScroller:b,dimensionMarshal:v,focusMarshal:y,getResponders:u,styleMarshal:g})}),[d,b,v,y,u,g]);s.current=C;var w=tt((function(){var e=Qi(s);"IDLE"!==e.getState().phase&&e.dispatch(pr())}),[]),_=tt((function(){var e=Qi(s).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);i(et((function(){return{isDragging:_,tryAbort:w}}),[_,w]));var x=tt((function(e){return qr(Qi(s).getState(),e)}),[]),E=tt((function(){return Vn(Qi(s).getState())}),[]),I=et((function(){return{marshal:v,focus:y,contextId:r,canLift:x,isMovementAllowed:E,dragHandleUsageInstructionsId:p,registry:h}}),[r,v,p,y,x,E,h]);return Ji({contextId:r,store:C,registry:h,customSensors:o,enableDefaultSensors:!1!==n.enableDefaultSensors}),(0,e.useEffect)((function(){return w}),[w]),t().createElement(Pi.Provider,{value:I},t().createElement(ve,{context:_i,store:C},n.children))}var to=0;function no(e){var n=et((function(){return""+to++}),[]),r=e.dragHandleUsageInstructions||Lt.dragHandleUsageInstructions;return t().createElement(xt,null,(function(i){return t().createElement(eo,{nonce:e.nonce,contextId:n,setCallbacks:i,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var ro=function(e){return function(t){return e===t}},io=ro("scroll"),oo=ro("auto"),ao=(ro("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),lo=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return ao(n,io)||ao(n,oo)}(t)?t:e(t.parentElement)},so=function(e){return{x:e.scrollLeft,y:e.scrollTop}},co=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},uo={passive:!1},po={passive:!0},go=function(e){return e.shouldPublishImmediately?uo:po};function fo(t){var n=(0,e.useContext)(t);return n||_t(!1),n}var mo=function(e){return e&&e.env.closestScrollable||null};function ho(){}var vo={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},bo=t().memo((function(n){var r=(0,e.useRef)(null),i=tt((function(){r.current&&(clearTimeout(r.current),r.current=null)}),[]),o=n.animate,a=n.onTransitionEnd,l=n.onClose,s=n.contextId,c=(0,e.useState)("open"===n.animate),u=c[0],d=c[1];(0,e.useEffect)((function(){return u?"open"!==o?(i(),d(!1),ho):r.current?ho:(r.current=setTimeout((function(){r.current=null,d(!1)})),i):ho}),[o,u,i]);var p=tt((function(e){"height"===e.propertyName&&(a(),"close"===o&&l())}),[o,l,a]),g=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.placeholder;return e.isAnimatingOpenOnMount||"close"===e.animate?vo:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Cr.placeholder:null}}({isAnimatingOpenOnMount:u,animate:n.animate,placeholder:n.placeholder});return t().createElement(n.placeholder.tagName,{style:g,"data-rbd-placeholder-context-id":s,onTransitionEnd:p,ref:n.innerRef})})),yo=t().createContext(null),Co=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return J(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(t().PureComponent),wo=5e3,_o=4500,xo=function(e,t){return t?Cr.drop(t.duration):e?Cr.snap:Cr.fluid},Eo=function(e,t){return e?t?hr:vr:null};function Io(e){e.preventDefault()}var Do=function(e,t){return e===t},So=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function Lo(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Po={mapped:{type:"SECONDARY",offset:Pt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Lo(null)}},Ao=Ke((function(){var e,t,n,r=(e=ft((function(e,t){return{x:e,y:t}})),t=ft((function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=ft((function(e,n,r,i,o,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:l,snapshot:t(n,i,o,a,null)}}})),function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var o=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],l=Mn(r.impact),s=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(o.x,o.y),r.movementMode,a,i.isClone,l,s,c)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==i.draggableId)return null;var p=i.isClone,g=r.dimensions.draggables[i.draggableId],f=d.result,m=f.mode,h=So(f),v=function(e){return e.combine?e.combine.draggableId:null}(f),b={duration:r.dropDuration,curve:mr,moveTo:r.newHomeClientOffset,opacity:v?hr:null,scale:v?br:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:g,dropping:b,draggingOver:h,combineWith:v,mode:m,forceShouldAnimate:null,snapshot:t(m,p,h,v,b)}}}return null}),i=function(){var e=ft((function(e,t){return{x:e,y:t}})),t=ft(Lo),n=ft((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(Pt,e,!0):null},i=function(t,i,o,a){var l=o.displaced.visible[t],s=Boolean(a.inVirtualList&&a.effected[t]),c=Qt(o),u=c&&c.draggableId===t?i:null;if(!l){if(!s)return r(u);if(o.displaced.invisible[t])return null;var d=Ot(a.displacedBy.point),p=e(d.x,d.y);return n(p,u,!0)}if(s)return r(u);var g=o.displacedBy.point,f=e(g.x,g.y);return n(f,u,l.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||i(e,t)||Po}}),{dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:_i,pure:!0,areStatePropsEqual:Do})((function(t){var n=(0,e.useRef)(null),r=tt((function(e){n.current=e}),[]),i=tt((function(){return n.current}),[]),o=fo(Pi),a=o.contextId,l=o.dragHandleUsageInstructionsId,s=o.registry,c=fo(yo),u=c.type,d=c.droppableId,p=et((function(){return{id:t.draggableId,index:t.index,type:u,droppableId:d}}),[t.draggableId,t.index,u,d]),g=t.children,f=t.draggableId,m=t.isEnabled,h=t.shouldRespectForcePress,v=t.canDragInteractiveElements,b=t.isClone,y=t.mapped,C=t.dropAnimationFinished;b||function(t){var n=Li("draggable"),r=t.descriptor,i=t.registry,o=t.getDraggableRef,a=t.canDragInteractiveElements,l=t.shouldRespectForcePress,s=t.isEnabled,c=et((function(){return{canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:s}}),[a,s,l]),u=tt((function(e){var t=o();return t||_t(!1),function(e,t,n){void 0===n&&(n=Pt);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=ut(i,r),a=ct(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(r,t,e)}),[r,o]),d=et((function(){return{uniqueId:n,descriptor:r,options:c,getDimension:u}}),[r,u,c,n]),p=(0,e.useRef)(d),g=(0,e.useRef)(!0);hi((function(){return i.draggable.register(p.current),function(){return i.draggable.unregister(p.current)}}),[i.draggable]),hi((function(){if(g.current)g.current=!1;else{var e=p.current;p.current=d,i.draggable.update(d,e)}}),[d,i.draggable])}(et((function(){return{descriptor:p,registry:s,getDraggableRef:i,canDragInteractiveElements:v,shouldRespectForcePress:h,isEnabled:m}}),[p,s,i,v,h,m]));var w=et((function(){return m?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:Io}:null}),[a,l,f,m]),_=tt((function(e){"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&C()}),[C,y]),x=et((function(){var e=function(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,o=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(i),s=l?xr(n,o):_r(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:xo(a,i),transform:s,opacity:Eo(o,l),zIndex:l?_o:wo,pointerEvents:"none"}}(e):{transform:_r((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}(y),t="DRAGGING"===y.type&&y.dropping?_:null;return{innerRef:r,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:w}}),[a,w,f,y,_,r]),E=et((function(){return{draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}}),[p.droppableId,p.id,p.index,p.type]);return g(x,y.snapshot,E)}));function No(e){return fo(yo).isUsingCloneFor!==e.draggableId||e.isClone?t().createElement(Ao,e):null}function To(e){var n="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),i=Boolean(e.shouldRespectForcePress);return t().createElement(No,X({},e,{isClone:!1,isEnabled:n,canDragInteractiveElements:r,shouldRespectForcePress:i}))}var Oo=function(e,t){return e===t.droppable.type},Ro=function(e,t){return t.draggables[e.draggable.id]},Bo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||_t(!1),document.body}},ko=Ke((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=X({},e,{shouldAnimatePlaceholder:!1}),n=ft((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=ft((function(r,i,o,a,l,s){var c=l.descriptor.id;if(l.descriptor.droppableId===r){var u=s?{render:s,dragging:n(l.descriptor)}:null,d={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!i)return t;if(!a)return e;var p={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}}));return function(n,i){var o=i.droppableId,a=i.type,l=!i.isDropDisabled,s=i.renderClone;if(n.isDragging){var c=n.critical;if(!Oo(a,c))return t;var u=Ro(c,n.dimensions),d=Mn(n.impact)===o;return r(o,l,d,d,u,s)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!Oo(a,p.critical))return t;var g=Ro(p.critical,n.dimensions);return r(o,l,So(p.result)===o,Mn(p.impact)===o,g,s)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var f=n.completed;if(!Oo(a,f.critical))return t;var m=Mn(f.impact)===o,h=Boolean(f.impact.at&&"COMBINE"===f.impact.at.type),v=f.critical.droppable.id===o;return m?h?e:t:v?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:_i,pure:!0,areStatePropsEqual:Do})((function(n){var r=(0,e.useContext)(Pi);r||_t(!1);var i=r.contextId,o=r.isMovementAllowed,a=(0,e.useRef)(null),l=(0,e.useRef)(null),s=n.children,c=n.droppableId,u=n.type,d=n.mode,p=n.direction,g=n.ignoreContainerClipping,f=n.isDropDisabled,m=n.isCombineEnabled,h=n.snapshot,v=n.useClone,b=n.updateViewportMaxScroll,y=n.getContainerForClone,C=tt((function(){return a.current}),[]),w=tt((function(e){a.current=e}),[]),_=(tt((function(){return l.current}),[]),tt((function(e){l.current=e}),[])),x=tt((function(){o()&&b({maxScroll:Vr()})}),[o,b]);!function(t){var n=(0,e.useRef)(null),r=fo(Pi),i=Li("droppable"),o=r.registry,a=r.marshal,l=Ai(t),s=et((function(){return{id:t.droppableId,type:t.type,mode:t.mode}}),[t.droppableId,t.mode,t.type]),c=(0,e.useRef)(s),u=et((function(){return ft((function(e,t){n.current||_t(!1);var r={x:e,y:t};a.updateDroppableScroll(s.id,r)}))}),[s.id,a]),d=tt((function(){var e=n.current;return e&&e.env.closestScrollable?so(e.env.closestScrollable):Pt}),[]),p=tt((function(){var e=d();u(e.x,e.y)}),[d,u]),g=et((function(){return mt(p)}),[p]),f=tt((function(){var e=n.current,t=mo(e);e&&t||_t(!1),e.scrollOptions.shouldPublishImmediately?p():g()}),[g,p]),m=tt((function(e,t){n.current&&_t(!1);var i=l.current,o=i.getDroppableRef();o||_t(!1);var a=function(e){return{closestScrollable:lo(e),isFixedOnPage:co(e)}}(o),c={ref:o,descriptor:s,env:a,scrollOptions:t};n.current=c;var u=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,c=r.closestScrollable,u=function(e,t){var n=dt(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,a=i+t.scrollWidth,l=rt({top:r,right:a,bottom:o,left:i},n.border);return at({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=ct(u,i),p=function(){if(!c)return null;var e=dt(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:ct(e,i),scroll:so(c),scrollSize:t,shouldClipSubject:s}}(),g=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,s=e.closest,c=function(){if(!s)return null;var e=s.scrollSize,t=s.client,n=Mr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:Pt,displacement:Pt}}}}(),u="vertical"===o?cn:un;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:u,isEnabled:n,client:a,page:l,frame:c,subject:Ft({page:l,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:d,closest:p});return g}({ref:o,descriptor:s,env:a,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),d=a.closestScrollable;return d&&(d.setAttribute(gi.contextId,r.contextId),d.addEventListener("scroll",f,go(c.scrollOptions))),u}),[r.contextId,s,f,l]),h=tt((function(){var e=n.current,t=mo(e);return e&&t||_t(!1),so(t)}),[]),v=tt((function(){var e=n.current;e||_t(!1);var t=mo(e);n.current=null,t&&(g.cancel(),t.removeAttribute(gi.contextId),t.removeEventListener("scroll",f,go(e.scrollOptions)))}),[f,g]),b=tt((function(e){var t=n.current;t||_t(!1);var r=mo(t);r||_t(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),y=et((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:h,dragStopped:v,scroll:b}}),[v,m,h,b]),C=et((function(){return{uniqueId:i,descriptor:s,callbacks:y}}),[y,s,i]);hi((function(){return c.current=C.descriptor,o.droppable.register(C),function(){n.current&&v(),o.droppable.unregister(C)}}),[y,s,v,C,a,o.droppable]),hi((function(){n.current&&a.updateDroppableIsEnabled(c.current.id,!t.isDropDisabled)}),[t.isDropDisabled,a]),hi((function(){n.current&&a.updateDroppableIsCombineEnabled(c.current.id,t.isCombineEnabled)}),[t.isCombineEnabled,a])}({droppableId:c,type:u,mode:d,direction:p,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:g,getDroppableRef:C});var E=t().createElement(Co,{on:n.placeholder,shouldAnimate:n.shouldAnimatePlaceholder},(function(e){var n=e.onClose,r=e.data,o=e.animate;return t().createElement(bo,{placeholder:r,onClose:n,innerRef:_,animate:o,contextId:i,onTransitionEnd:x})})),I=et((function(){return{innerRef:w,placeholder:E,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":i}}}),[i,c,E,w]),D=v?v.dragging.draggableId:null,S=et((function(){return{droppableId:c,type:u,isUsingCloneFor:D}}),[c,D,u]);return t().createElement(yo.Provider,{value:S},s(I,h),function(){if(!v)return null;var e=v.dragging,n=v.render,r=t().createElement(No,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(t,r){return n(t,r,e)}));return Xe().createPortal(r,y())}())}));ko.defaultProps=Bo;var Mo=function(){return Mo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mo.apply(this,arguments)};function Ho(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Vo(e){var t=e.label,n=e.help,i=e.hideLabelFromVision,o=e.value,a=e.onValueChange,s=e.currency,c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["label","help","hideLabelFromVision","value","onValueChange","currency"]),u=(0,r.useState)(o),d=u[0],p=u[1],g=(0,$.useInstanceId)(l.BaseControl,"wp-components-base-control");return(0,R.jsx)(l.BaseControl,{label:t,help:n,id:g,hideLabelFromVision:i,children:(0,R.jsx)(Z,Mo({id:g,value:d,onValueChange:function(e){p(e),a(function(e){if(!e)return e;for(var t,n,r=0,i=new Intl.NumberFormat(window.navigator.language).formatToParts(1234.56);r<i.length;r++){var o=i[r];"group"===o.type?t=o.value:"decimal"===o.type&&(n=o.value)}return e.replaceAll(t,"").replace(n,".")}(e))},className:"components-text-control__input",allowDecimals:!0,allowNegativeValue:!1,maxLength:9,intlConfig:{locale:window.navigator.language,currency:s}},c))})}function Go(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}"function"==typeof SuppressedError&&SuppressedError,Go(".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 Fo,jo=window.wp;function Uo(e){var t=e.id,n=e.label,i=void 0===n?null:n,o=e.content,a=e.setContent,s=e.rows,c=void 0===s?20:s,u=e.showEditorTabs,d=void 0!==u&&u,p=e.showMediaButtons,g=void 0!==p&&p,f=e.plugins,m=void 0===f?"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpautoresize,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview":f,h=e.toolbar1,v=void 0===h?"bold,italic,wp_add_media,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,fullscreen,wp_adv":h,b=e.toolbar2,y=void 0===b?"formatselect,strikethrough,hr,forecolor,pastetext,removeformat,unlink,outdent,indent,undo,redo":b,C=(0,r.useRef)(!1),w=(0,r.useState)(o),_=w[0],x=w[1];return(0,r.useEffect)((function(){C.current&&a(_)}),[_]),(0,r.useEffect)((function(){C.current&&_!==o&&window.tinymce.get("editor-".concat(t)).setContent(o)}),[o]),(0,r.useEffect)((function(){function e(e){var t;_&&e.on("loadContent",(function(){e._lastChange&&e._lastChange!==_?e.setContent(e.getContent()):e.setContent(_)})),e.on("blur",(function(){t=e.selection.getBookmark(2,!0);var n=document.querySelector(".interface-interface-skeleton__content"),r=n.scrollTop;return e.once("focus",(function(){t&&(e.selection.moveToBookmark(t),n.scrollTop!==r&&(n.scrollTop=r))})),!1})),e.on("mousedown touchstart",(function(){t=null}));var n=(0,$.debounce)((function(){var t=e.getContent();t!==e._lastChange&&(e._lastChange=t,x(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(function(t){K.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==K.BACKSPACE&&t.keyCode!==K.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===K.F10&&t.stopPropagation()})),e.on("init",(function(){var t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function n(){setTimeout((function(){jo.editor.initialize("editor-".concat(t),{mediaButtons:g,tinymce:{tinymce:!0,plugins:m,toolbar1:v,toolbar2:y,setup:e,resize:!1,statusbar:!1},quicktags:!0})}),250)}function r(){"complete"===document.readyState&&n()}return C.current=!0,"complete"===document.readyState?n():document.addEventListener("readystatechange",r),function(){document.removeEventListener("readystatechange",r),jo.editor.remove("editor-".concat(t))}}),[]),(0,R.jsx)("div",{className:"givewp-classic-editor ".concat(!!d&&"show-editor-tabs"),children:(0,R.jsx)(l.BaseControl,{id:"editor-base-control-".concat(t),label:i,children:(0,R.jsx)("textarea",{rows:c,id:"editor-".concat(t),onChange:function(e){window.tinymce.get("editor-".concat(t))._lastChange=e.target.value,x(e.target.value)}})})})}function qo(){return(0,R.jsxs)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:[(0,R.jsx)(l.Path,{d:"M10 6.25C10.1658 6.25 10.3247 6.31585 10.4419 6.43306C10.5592 6.55027 10.625 6.70924 10.625 6.875V9.375H13.125C13.2908 9.375 13.4497 9.44085 13.5669 9.55806C13.6842 9.67527 13.75 9.83424 13.75 10C13.75 10.1658 13.6842 10.3247 13.5669 10.4419C13.4497 10.5592 13.2908 10.625 13.125 10.625H10.625V13.125C10.625 13.2908 10.5592 13.4497 10.4419 13.5669C10.3247 13.6842 10.1658 13.75 10 13.75C9.83424 13.75 9.67527 13.6842 9.55806 13.5669C9.44085 13.4497 9.375 13.2908 9.375 13.125V10.625H6.875C6.70924 10.625 6.55027 10.5592 6.43306 10.4419C6.31585 10.3247 6.25 10.1658 6.25 10C6.25 9.83424 6.31585 9.67527 6.43306 9.55806C6.55027 9.44085 6.70924 9.375 6.875 9.375H9.375V6.875C9.375 6.70924 9.44085 6.55027 9.55806 6.43306C9.67527 6.31585 9.83424 6.25 10 6.25Z"}),(0,R.jsx)(l.Path,{d:"M2.5 10C2.5 9.01509 2.69399 8.03982 3.0709 7.12987C3.44781 6.21993 4.00026 5.39314 4.6967 4.6967C5.39314 4.00026 6.21993 3.44781 7.12987 3.0709C8.03982 2.69399 9.01509 2.5 10 2.5C10.9849 2.5 11.9602 2.69399 12.8701 3.0709C13.7801 3.44781 14.6069 4.00026 15.3033 4.6967C15.9997 5.39314 16.5522 6.21993 16.9291 7.12987C17.306 8.03982 17.5 9.01509 17.5 10C17.5 11.9891 16.7098 13.8968 15.3033 15.3033C13.8968 16.7098 11.9891 17.5 10 17.5C8.01088 17.5 6.10322 16.7098 4.6967 15.3033C3.29018 13.8968 2.5 11.9891 2.5 10ZM10 3.75C8.3424 3.75 6.75269 4.40848 5.58058 5.58058C4.40848 6.75269 3.75 8.3424 3.75 10C3.75 11.6576 4.40848 13.2473 5.58058 14.4194C6.75269 15.5915 8.3424 16.25 10 16.25C11.6576 16.25 13.2473 15.5915 14.4194 14.4194C15.5915 13.2473 16.25 11.6576 16.25 10C16.25 8.3424 15.5915 6.75269 14.4194 5.58058C13.2473 4.40848 11.6576 3.75 10 3.75Z"})]})}function Wo(){return(0,R.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:(0,R.jsx)(l.Path,{d:"M6.875 9.375C6.70924 9.375 6.55027 9.44085 6.43306 9.55806C6.31585 9.67527 6.25 9.83424 6.25 10C6.25 10.1658 6.31585 10.3247 6.43306 10.4419C6.55027 10.5592 6.70924 10.625 6.875 10.625H13.125C13.2908 10.625 13.4497 10.5592 13.5669 10.4419C13.6842 10.3247 13.75 10.1658 13.75 10C13.75 9.83424 13.6842 9.67527 13.5669 9.55806C13.4497 9.44085 13.2908 9.375 13.125 9.375H6.875ZM10 2.5C9.01509 2.5 8.03982 2.69399 7.12987 3.0709C6.21993 3.44781 5.39314 4.00026 4.6967 4.6967C4.00026 5.39314 3.44781 6.21993 3.0709 7.12987C2.69399 8.03982 2.5 9.01509 2.5 10C2.5 10.9849 2.69399 11.9602 3.0709 12.8701C3.44781 13.7801 4.00026 14.6069 4.6967 15.3033C5.39314 15.9997 6.21993 16.5522 7.12987 16.9291C8.03982 17.306 9.01509 17.5 10 17.5C11.9891 17.5 13.8968 16.7098 15.3033 15.3033C16.7098 13.8968 17.5 11.9891 17.5 10C17.5 8.01088 16.7098 6.10322 15.3033 4.6967C13.8968 3.29018 11.9891 2.5 10 2.5ZM3.75 10C3.75 8.3424 4.40848 6.75269 5.58058 5.58058C6.75269 4.40848 8.3424 3.75 10 3.75C11.6576 3.75 13.2473 4.40848 14.4194 5.58058C15.5915 6.75269 16.25 8.3424 16.25 10C16.25 11.6576 15.5915 13.2473 14.4194 14.4194C13.2473 15.5915 11.6576 16.25 10 16.25C8.3424 16.25 6.75269 15.5915 5.58058 14.4194C4.40848 13.2473 3.75 11.6576 3.75 10Z"})})}function zo(){return(0,R.jsxs)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[(0,R.jsx)(l.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.33301 5.66667C1.33301 5.29848 1.63148 5 1.99967 5H13.9997C14.3679 5 14.6663 5.29848 14.6663 5.66667C14.6663 6.03486 14.3679 6.33333 13.9997 6.33333H1.99967C1.63148 6.33333 1.33301 6.03486 1.33301 5.66667Z"}),(0,R.jsx)(l.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.33301 10.3333C1.33301 9.96514 1.63148 9.66667 1.99967 9.66667H13.9997C14.3679 9.66667 14.6663 9.96514 14.6663 10.3333C14.6663 10.7015 14.3679 11 13.9997 11H1.99967C1.63148 11 1.33301 10.7015 1.33301 10.3333Z"})]})}function Zo(e){var t=e.handleAddOption,n=e.label,r=e.readOnly;return(0,R.jsxs)("div",{className:"givewp-options-header",children:[(0,R.jsx)(l.BaseControl.VisualLabel,{className:"givewp-options-header--label",children:n}),!r&&(0,R.jsx)(l.Button,{icon:qo,className:"givewp-options-header--button",onClick:t})]})}!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"}(Fo||(Fo={}));var $o=function(e){return Object.values(Fo).includes(e)};function Ko(e){var t,n,r,i=e.currency,a=e.provided,s=e.option,c=e.showHidden,u=e.multiple,d=e.selectable,p=e.defaultTooltip,g=e.handleUpdateOptionLabel,f=e.handleUpdateOptionValue,m=e.handleUpdateOptionChecked,h=e.handleRemoveOption,v=e.readOnly,b=e.disabled,y=e.draggable,C=e.maxLabelLength;return(0,R.jsxs)("div",Mo({className:"givewp-options-list--item",ref:a.innerRef},a.draggableProps,{children:[(0,R.jsx)("span",Mo({className:"givewp-options-list--item--draggable"},a.dragHandleProps,{children:y&&(0,R.jsx)(l.Icon,{icon:zo})})),(0,R.jsx)(l.Tooltip,{text:p||(0,o.__)("Default","give"),position:"top",placement:"top",delay:500,children:(0,R.jsx)("div",{children:d&&(0,R.jsx)("input",{type:u?"checkbox":"radio",checked:s.checked,className:"givewp-options-list--item--checked",onClick:function(){return m(!s.checked)},disabled:b})})}),(0,R.jsx)("div",{className:P("givewp-options-list--item--inputs",(t={},t["givewp-options-list--item--inputs--open"]=c,t)),children:$o(i)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Vo,{currency:i,label:(0,o.__)("Donation amount level","give"),hideLabelFromVision:!0,value:s.value,onValueChange:function(e){f(e)}}),c&&(0,R.jsxs)("div",{className:"givewp-options-list__textarea-wrapper",children:[(0,R.jsx)("textarea",{className:"givewp-options-list__textarea",value:s.label,onChange:function(e){return g(e.target.value)},maxLength:C>0?C:void 0}),C>0&&(0,R.jsxs)("span",{className:"givewp-options-list__textarea-counter",children:[null!==(r=null===(n=null==s?void 0:s.label)||void 0===n?void 0:n.length)&&void 0!==r?r:0,"/",C]})]})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("input",{type:"text",value:s.label,placeholder:(0,o.__)("Label","give"),onChange:function(e){return g(e.target.value)},readOnly:v}),c&&(0,R.jsx)("input",{type:"text",value:s.value,placeholder:(0,o.__)("Value","give"),onChange:function(e){return f(e.target.value)},readOnly:v})]})}),!v&&(0,R.jsx)(l.Button,{icon:Wo,className:"givewp-options-list--item--button",onClick:function(){return h()}})]}))}function Yo(e){var t=e.currency,n=e.options,r=e.showHidden,i=e.multiple,o=e.selectable,a=e.setOptions,l=e.defaultControlsTooltip,s=e.onRemoveOption,c=e.readOnly,u=e.disableSoloCheckedOption,d=e.draggable,p=e.maxLabelLength,g=function(e){return function(){s?s(n[e],e):(n[e].label="",n[e].value="",a(n.filter((function(t,n){return n!==e}))))}},f=function(e){return function(t){var r=Ho([],n,!0);r[e].label=t,a(r)}},m=function(e){return function(t){var r=Ho([],n,!0);r[e].value=t,a(r)}},h=function(e,t){return function(r){if(t||!n[e].checked){var i=Ho([],n,!0);t||i.forEach((function(t,n){n!==e&&(t.checked=!1)})),i[e].checked=r,a(i)}}};return(0,R.jsx)(no,{onDragEnd:function(e){if(e.destination){var t=Ho([],n,!0),r=t.splice(e.source.index,1)[0];t.splice(e.destination.index,0,r),a(t)}},children:(0,R.jsx)(ko,{droppableId:"options",children:function(e){return(0,R.jsxs)("div",Mo({},e.droppableProps,{ref:e.innerRef,children:[n.map((function(e,a){var s=e.id?e.id:a;return(0,R.jsx)(To,{draggableId:"option-".concat(s),index:a,children:function(s){return(0,R.jsx)(Ko,{currency:t,provided:s,option:e,showHidden:r,multiple:i,selectable:o,defaultTooltip:l,handleRemoveOption:g(a),handleUpdateOptionLabel:f(a),handleUpdateOptionValue:m(a),handleUpdateOptionChecked:h(a,i),readOnly:c,disabled:i&&u&&e.checked&&1===n.filter((function(e){return e.checked})).length,draggable:d,maxLabelLength:p})}},s)})),e.placeholder]}))}})})}function Jo(e){var t=e.currency,n=e.multiple,i=e.selectable,a=void 0===i||i,s=e.options,c=e.setOptions,u=e.defaultControlsTooltip,d=e.onAddOption,p=e.onRemoveOption,g=e.readOnly,f=void 0!==g&&g,m=e.label,h=void 0===m?(0,o.__)("Options","give"):m,v=e.disableSoloCheckedOption,b=void 0!==v&&v,y=e.draggable,C=void 0===y||y,w=e.toggleLabel,_=void 0===w?(0,o.__)("Show values","give"):w,x=e.toggleEnabled,E=void 0!==x&&x,I=e.onHandleToggle,D=e.maxLabelLength,S=void 0===D?0:D,L=(0,r.useState)(E),P=L[0],A=L[1];return(0,R.jsxs)(R.Fragment,{children:[!f&&(0,R.jsx)(l.PanelRow,{children:(0,R.jsx)(l.ToggleControl,{label:_,checked:P,onChange:function(){A(!P),I(!P)}})}),(0,R.jsx)(l.PanelRow,{children:(0,R.jsxs)(l.BaseControl,{id:"give",children:[(0,R.jsx)(Zo,{handleAddOption:function(){d?d():c(Ho(Ho([],s,!0),[{label:"",value:"",checked:!1}],!1))},label:h,readOnly:f}),(0,R.jsx)(Yo,{currency:$o(t)&&t,options:s,showHidden:P,multiple:n,selectable:a,setOptions:c,defaultControlsTooltip:u,onRemoveOption:p,readOnly:f,disableSoloCheckedOption:b,draggable:C,maxLabelLength:S})]})})]})}Go(".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}"),Go(".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}"),Go(".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 Xo=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),Qo=(e="")=>e.trim().toLowerCase(),ea={...x,title:(0,o.__)("Donor Name","give"),description:(0,o.__)("Collects the donor name with display options.","give"),supports:{multiple:!1},attributes:{showHonorific:{type:"boolean",default:!0},useGlobalSettings:{type:"boolean",default:"true"},honorifics:{type:"array",default:["Mr","Ms","Mrs"]},firstNameLabel:{type:"string",source:"attribute",default:(0,o.__)("First name","give")},firstNamePlaceholder:{type:"string",source:"attribute",default:(0,o.__)("First name","give")},lastNameLabel:{type:"string",source:"attribute",default:(0,o.__)("Last name","give")},lastNamePlaceholder:{type:"string",source:"attribute",default:(0,o.__)("Last name","give")},requireLastName:{type:"boolean",default:!1}},edit:function({attributes:{showHonorific:t,useGlobalSettings:n,honorifics:r,firstNameLabel:i,firstNamePlaceholder:s,lastNameLabel:u,lastNamePlaceholder:d,requireLastName:p},setAttributes:g}){var f;const[m,h]=(0,e.useState)(null!==(f=Object.values(r)[0])&&void 0!==f?f:""),[v,b]=(0,e.useState)(Object.values(r).map((e=>({label:Xo(e),value:Qo(e),checked:m===e})))),y=e=>{b(e);const t={};Object.values(e).forEach((e=>{Object.assign(t,{[e.label]:e.label})})),g({honorifics:t})};return void 0===n&&g({useGlobalSettings:!0}),(0,e.useEffect)((()=>{const e=n?c().nameTitlePrefixes:["Mr","Ms","Mrs"];y(Object.values(e).map((e=>({label:Xo(e),value:Qo(e),checked:m===e}))))}),[n]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{style:{display:"grid",gridTemplateColumns:t&&v.length>0?"1fr 2fr 2fr":"1fr 1fr",gap:"15px"}},!!t&&(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Title","give"),options:v,value:m,onChange:h,style:{padding:"16px 38px 16px 16px"}}),(0,e.createElement)(l.TextControl,{label:i,placeholder:s,required:!0,className:"give-is-required",readOnly:!0,value:s,onChange:null}),(0,e.createElement)(l.TextControl,{label:u,placeholder:d,required:p,className:p?"give-is-required":"",value:d,onChange:null,readOnly:!0})),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Name Title Prefix","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Show Name Title Prefix","give"),checked:t,onChange:()=>g({showHonorific:!t}),help:(0,o.__)("Do you want to add a name title prefix dropdown field before the donor's first name field? This will display a dropdown with options such as Mrs, Miss, Ms, Sir, and Dr for the donor to choose from.","give")})),!!t&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)("div",{style:{width:"100%"}},(0,e.createElement)("div",null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Options","give"),onChange:()=>g({useGlobalSettings:!n}),value:n,options:[{label:(0,o.__)("Global","give"),value:"true"},{label:(0,o.__)("Customize","give"),value:"false"}]})),n&&(0,e.createElement)("p",{style:{color:"#595959",fontStyle:"SF Pro Text",fontSize:"0.75rem",lineHeight:"120%",fontWeight:400,marginTop:"0.5rem"}},(0,o.__)(" Go to the settings to change the "),(0,e.createElement)("a",{href:"/wp-admin/edit.php?post_type=give_forms&page=give-settings&tab=display§ion=display-settings",target:"_blank",rel:"noopener noreferrer"},(0,o.__)("Global Title Prefixes options."))))),!!t&&!n&&(0,e.createElement)("div",{style:{marginTop:"1rem"}},(0,e.createElement)(Jo,{multiple:!1,selectable:!1,options:v,setOptions:y,defaultControlsTooltip:(0,o.__)("Title Prefixes","give")}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("First Name","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:i,onChange:e=>g({firstNameLabel:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:s,onChange:e=>g({firstNamePlaceholder:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Last Name","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:u,onChange:e=>g({lastNameLabel:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:d,onChange:e=>g({lastNamePlaceholder:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Required","give"),checked:p,onChange:()=>g({requireLastName:!p}),help:(0,o.__)("Do you want to force the Last Name field to be required?","give")})))))},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M14.2736 13.4026C14.1721 13.3682 13.5308 13.0689 13.9315 11.8076H13.9258C14.9704 10.6936 15.7686 8.90101 15.7686 7.13619C15.7686 4.42256 14.026 3 12.0006 3C9.97402 3 8.24093 4.4219 8.24093 7.13619C8.24093 8.90827 9.03473 10.7081 10.0857 11.8195C10.4954 12.9321 9.76281 13.3451 9.60966 13.4032C7.48861 14.1974 5 15.6451 5 17.0743V17.6101C5 19.5573 8.64613 20 12.0204 20C15.3998 20 19 19.5573 19 17.6101V17.0743C19 15.6022 16.4993 14.1657 14.2736 13.4026Z",fill:"currentColor"}))})},ta={name:"givewp/donor-name",settings:ea},na={name:"givewp/email",settings:{...x,title:(0,o.__)("Email","give"),description:(0,o.__)("The required email field for donors to enter their email address.","give"),supports:{multiple:!1},attributes:{...x.attributes,label:{default:(0,o.__)("Email Address")},isRequired:{type:"boolean",source:"attribute",default:!0}},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6ZM20 6L12 11L4 6H20ZM20 18H4V8L12 13L20 8V18Z",fill:"currentColor"}))}),edit:t=>(0,e.createElement)(w,{showRequired:!1,...t,attributes:{...t.attributes,isRequired:!0}})}},ra=window.wp.hooks,ia=({label:t,icon:n})=>(0,e.createElement)("div",{style:{backgroundColor:"var(--givewp-gray-20)",padding:"16px",display:"flex",justifyContent:"space-between"}},t," ",n),oa={name:"givewp/payment-gateways",settings:{...x,title:(0,o.__)("Payment Gateways","give"),description:(0,o.__)("Display payment gateway options for donors to process their donation.","give"),supports:{multiple:!1},attributes:{},edit:function(t){const{gateways:n}=c();return(0,e.createElement)("div",{style:{fontSize:"16px",padding:"24px",textAlign:"center",border:"1px dashed var(--givewp-gray-100)",borderRadius:"5px",backgroundColor:"var(--givewp-gray-10)"}},(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"}},n.filter((e=>(0,ra.applyFilters)(`givewp_form_builder_payment_gateway_enabled_${e.id}`,e.enabled,e))).map((t=>(0,e.createElement)(ia,{key:t.id,label:t.label,icon:(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.21293 14.6663H6.78626C6.63422 14.6664 6.48673 14.6144 6.36827 14.5191C6.2498 14.4238 6.16747 14.2909 6.13493 14.1423L5.8636 12.8863C5.50164 12.7277 5.15842 12.5294 4.84026 12.295L3.6156 12.685C3.47064 12.7312 3.31423 12.7265 3.17234 12.6715C3.03046 12.6166 2.91163 12.5148 2.8356 12.383L1.6196 10.2823C1.54436 10.1504 1.51612 9.99689 1.53949 9.84684C1.56287 9.69679 1.63647 9.55912 1.74826 9.45634L2.69826 8.58967C2.65506 8.19708 2.65506 7.80093 2.69826 7.40834L1.74826 6.54367C1.63631 6.44086 1.56261 6.30306 1.53923 6.15286C1.51585 6.00267 1.54419 5.84899 1.6196 5.71701L2.83293 3.61501C2.90896 3.48322 3.02779 3.3814 3.16968 3.32647C3.31156 3.27153 3.46797 3.26678 3.61293 3.31301L4.8376 3.70301C5.00026 3.58301 5.1696 3.47101 5.34426 3.36967C5.51293 3.27501 5.68626 3.18901 5.8636 3.11234L6.1356 1.85767C6.16798 1.70914 6.25015 1.57613 6.36849 1.48071C6.48684 1.38528 6.63424 1.33317 6.78626 1.33301H9.21293C9.36495 1.33317 9.51236 1.38528 9.6307 1.48071C9.74904 1.57613 9.83122 1.70914 9.8636 1.85767L10.1383 3.11301C10.4998 3.27252 10.8429 3.47079 11.1616 3.70434L12.3869 3.31434C12.5318 3.26829 12.6881 3.27312 12.8298 3.32805C12.9715 3.38298 13.0903 3.48469 13.1663 3.61634L14.3796 5.71834C14.5343 5.98967 14.4809 6.33301 14.2509 6.54434L13.3009 7.41101C13.3441 7.8036 13.3441 8.19975 13.3009 8.59234L14.2509 9.45901C14.4809 9.67101 14.5343 10.0137 14.3796 10.285L13.1663 12.387C13.0902 12.5188 12.9714 12.6206 12.8295 12.6755C12.6876 12.7305 12.5312 12.7352 12.3863 12.689L11.1616 12.299C10.8437 12.5332 10.5007 12.7313 10.1389 12.8897L9.8636 14.1423C9.83108 14.2908 9.74885 14.4236 9.63052 14.5189C9.51219 14.6142 9.36486 14.6662 9.21293 14.6663ZM7.99693 5.33301C7.28969 5.33301 6.61141 5.61396 6.11131 6.11406C5.61122 6.61415 5.33026 7.29243 5.33026 7.99967C5.33026 8.70692 5.61122 9.38519 6.11131 9.88529C6.61141 10.3854 7.28969 10.6663 7.99693 10.6663C8.70418 10.6663 9.38245 10.3854 9.88255 9.88529C10.3826 9.38519 10.6636 8.70692 10.6636 7.99967C10.6636 7.29243 10.3826 6.61415 9.88255 6.11406C9.38245 5.61396 8.70418 5.33301 7.99693 5.33301Z",fill:"#1E1E1E"}))})))))},icon:function(){return(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M11.3158 4L17.0774 5.824C17.2381 5.87483 17.3785 5.97639 17.4782 6.11383C17.5779 6.25128 17.6317 6.41742 17.6316 6.588V8H19.2105C19.4199 8 19.6207 8.08429 19.7688 8.23431C19.9168 8.38434 20 8.58783 20 8.8V10.4H9.73684V8.8C9.73684 8.58783 9.82002 8.38434 9.96807 8.23431C10.1161 8.08429 10.3169 8 10.5263 8H16.0526V7.176L11.3158 5.6752L6.57895 7.176V13.0992C6.57883 13.589 6.68967 14.0723 6.90292 14.5118C7.11617 14.9513 7.42614 15.3354 7.80895 15.6344L7.95816 15.7432L11.3158 18.064L14.3016 16H10.5263C10.3169 16 10.1161 15.9157 9.96807 15.7657C9.82002 15.6157 9.73684 15.4122 9.73684 15.2V12H20V15.2C20 15.4122 19.9168 15.6157 19.7688 15.7657C19.6207 15.9157 19.4199 16 19.2105 16L16.6684 16.0008C16.3629 16.4088 15.9918 16.7688 15.5632 17.0648L11.3158 20L7.06842 17.0656C6.43094 16.6252 5.90928 16.0336 5.54879 15.3423C5.18831 14.6511 4.99992 13.881 5 13.0992V6.588C5.0001 6.41755 5.05391 6.25159 5.1536 6.11431C5.25329 5.97702 5.39365 5.87559 5.55421 5.8248L11.3158 4Z",fill:"currentColor"}))})}}},aa=({label:t})=>(0,e.createElement)("div",{style:{display:"flex",justifyContent:"space-between"}},(0,e.createElement)("div",null,t),(0,e.createElement)("div",{style:{height:"20px",width:"120px",backgroundColor:"var(--givewp-gray-30)"}})),la={name:"givewp/donation-summary",settings:{...x,title:(0,o.__)("Donation Summary","give"),description:(0,o.__)("Shows a donation summary in real-time for donors to review before donating.","give"),supports:{multiple:!1},attributes:{},edit:function(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{style:{padding:"30px 20px",display:"flex",fontSize:"16px",gap:"16px",flexDirection:"column",border:"1px dashed var(--givewp-gray-100)",borderRadius:"5px",backgroundColor:"var(--givewp-gray-10)"}},(0,e.createElement)(aa,{label:(0,o.__)("Payment Amount","give")}),(0,e.createElement)(aa,{label:(0,o.__)("Giving Frequency","give")}),(0,e.createElement)(aa,{label:(0,e.createElement)("strong",null,(0,o.__)("Donation Total","give"))})))},icon:()=>(0,e.createElement)(l.Icon,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M9.75 10.6521H12C12.2387 10.6521 12.4676 10.5573 12.6364 10.3885C12.8052 10.2198 12.9 9.99088 12.9 9.75223C12.9 9.51359 12.8052 9.28471 12.6364 9.11597C12.4676 8.94722 12.2387 8.85241 12 8.85241H11.1V8.4025C11.1 8.16386 11.0052 7.93498 10.8364 7.76623C10.6676 7.59748 10.4387 7.50268 10.2 7.50268C9.96131 7.50268 9.73239 7.59748 9.56361 7.76623C9.39483 7.93498 9.30001 8.16386 9.30001 8.4025V8.89741C8.75319 9.00842 8.26713 9.31861 7.9362 9.76777C7.60526 10.2169 7.45306 10.773 7.50914 11.328C7.56521 11.8831 7.82557 12.3975 8.23966 12.7714C8.65374 13.1453 9.19203 13.3521 9.75 13.3515H10.65C10.7694 13.3515 10.8838 13.3989 10.9682 13.4833C11.0526 13.5677 11.1 13.6821 11.1 13.8014C11.1 13.9208 11.0526 14.0352 10.9682 14.1196C10.8838 14.2039 10.7694 14.2513 10.65 14.2513H8.40001C8.16131 14.2513 7.93239 14.3461 7.76361 14.5149C7.59483 14.6836 7.50001 14.9125 7.50001 15.1512C7.50001 15.3898 7.59483 15.6187 7.76361 15.7874C7.93239 15.9562 8.16131 16.051 8.40001 16.051H9.30001V16.5009C9.30001 16.7395 9.39483 16.9684 9.56361 17.1372C9.73239 17.3059 9.96131 17.4007 10.2 17.4007C10.4387 17.4007 10.6676 17.3059 10.8364 17.1372C11.0052 16.9684 11.1 16.7395 11.1 16.5009V16.006C11.6468 15.895 12.1329 15.5848 12.4638 15.1356C12.7947 14.6865 12.9469 14.1304 12.8909 13.5754C12.8348 13.0203 12.5744 12.5059 12.1604 12.132C11.7463 11.7581 11.208 11.5513 10.65 11.5519H9.75C9.63066 11.5519 9.5162 11.5045 9.43181 11.4201C9.34742 11.3357 9.30001 11.2213 9.30001 11.102C9.30001 10.9826 9.34742 10.8682 9.43181 10.7838C9.5162 10.6995 9.63066 10.6521 9.75 10.6521ZM20.1 12.0018H17.4V3.9034C17.4006 3.74484 17.3593 3.58893 17.2803 3.45146C17.2013 3.31399 17.0873 3.19983 16.95 3.12055C16.8132 3.04158 16.658 3 16.5 3C16.342 3 16.1868 3.04158 16.05 3.12055L13.35 4.66825L10.65 3.12055C10.5132 3.04158 10.358 3 10.2 3C10.042 3 9.88682 3.04158 9.75 3.12055L7.05001 4.66825L4.35001 3.12055C4.21319 3.04158 4.05799 3 3.90001 3C3.74202 3 3.58682 3.04158 3.45001 3.12055C3.31266 3.19983 3.19871 3.31399 3.11969 3.45146C3.04066 3.58893 2.99938 3.74484 3.00001 3.9034V18.3005C3.00001 19.0165 3.28447 19.7031 3.79082 20.2093C4.29717 20.7156 4.98392 21 5.70001 21H18.3C19.0161 21 19.7028 20.7156 20.2092 20.2093C20.7155 19.7031 21 19.0165 21 18.3005V12.9016C21 12.663 20.9052 12.4341 20.7364 12.2653C20.5676 12.0966 20.3387 12.0018 20.1 12.0018ZM5.70001 19.2004C5.46131 19.2004 5.23239 19.1056 5.06361 18.9368C4.89483 18.7681 4.80001 18.5392 4.80001 18.3005V5.46009L6.60001 6.48588C6.73891 6.55842 6.8933 6.5963 7.05001 6.5963C7.20672 6.5963 7.3611 6.55842 7.50001 6.48588L10.2 4.93819L12.9 6.48588C13.0389 6.55842 13.1933 6.5963 13.35 6.5963C13.5067 6.5963 13.6611 6.55842 13.8 6.48588L15.6 5.46009V18.3005C15.6024 18.6075 15.6572 18.9118 15.762 19.2004H5.70001ZM19.2 18.3005C19.2 18.5392 19.1052 18.7681 18.9364 18.9368C18.7676 19.1056 18.5387 19.2004 18.3 19.2004C18.0613 19.2004 17.8324 19.1056 17.6636 18.9368C17.4948 18.7681 17.4 18.5392 17.4 18.3005V13.8014H19.2V18.3005Z",fill:"currentColor"}))})}},sa=({children:t,descriptionsEnabled:n})=>{const r=A()({"give-donation-block__levels":!0,"give-donation-block__levels--descriptions":n});return(0,e.createElement)("div",{className:r},t)},ca=({selected:t,children:n,descriptionsEnabled:r})=>{const i=A()({"give-donation-block__level":!0,"give-donation-block__level--selected":t,"give-donation-block__level--descriptions":r});return(0,e.createElement)("div",{className:i},n)},ua=e=>{const{currency:t="USD"}=c();return F({value:e,intlConfig:{locale:window.navigator.language,currency:t}})},da=({label:t,help:n,hideLabelFromVision:i,value:o,onValueChange:a,...s})=>{const[u,d]=(0,r.useState)(o),{currency:p="USD"}=c(),g=(0,$.useInstanceId)(l.BaseControl,"wp-components-base-control");return(0,e.createElement)(l.BaseControl,{label:t,help:n,id:g,hideLabelFromVision:i},(0,e.createElement)(Z,{id:g,value:u,onValueChange:e=>{d(e),a(function(e){if(!e)return e;const t=new Intl.NumberFormat(window.navigator.language).formatToParts(1234.56);let n,r;for(const e of t)"group"===e.type?n=e.value:"decimal"===e.type&&(r=e.value);return e.replaceAll(n,"").replace(r,".")}(e))},className:"components-text-control__input",allowDecimals:!0,allowNegativeValue:!1,maxLength:9,intlConfig:{locale:window.navigator.language,currency:p},...s}))},pa={"one-time":{singular:(0,o.__)("one-time","give"),plural:(0,o.__)("one-time","give"),adjective:(0,o.__)("Once","give")},day:{singular:(0,o.__)("day","give"),plural:(0,o.__)("days","give"),adjective:(0,o.__)("Daily","give")},week:{singular:(0,o.__)("week","give"),plural:(0,o.__)("weeks","give"),adjective:(0,o.__)("Weekly","give")},month:{singular:(0,o.__)("month","give"),plural:(0,o.__)("months","give"),adjective:(0,o.__)("Monthly","give")},quarter:{singular:(0,o.__)("quarter","give"),plural:(0,o.__)("quarters","give"),adjective:(0,o.__)("Quarterly","give")},year:{singular:(0,o.__)("year","give"),plural:(0,o.__)("years","give"),adjective:(0,o.__)("Yearly","give")}},ga=()=>(0,e.createElement)("div",{style:{fontSize:"12px",fontWeight:"500",display:"flex",flexDirection:"column",gap:"12px",padding:"12px 16px 19px",borderRadius:"5px",boxShadow:"0 2px 2px 0 rgba(221, 221, 221, 0.25)",border:"solid 0.5px var(--givewp-primary-700)"}},(0,e.createElement)("div",{style:{}},(0,o.__)("Provide donors the option of making flexible recurring donations.","give")),(0,e.createElement)("div",{style:{display:"flex",justifyContent:"space-around"}},(0,e.createElement)(l.Button,{href:"https://givewp.com/addons/recurring-donations",target:"_blank",rel:"noopener noreferrer",variant:"primary",style:{backgroundColor:"var(--givewp-primary-500)",padding:"4px 8px",height:"auto"}},"Upgrade your plan"),(0,e.createElement)(l.Button,{href:"https://givewp.com/addons/recurring-donations",target:"_blank",rel:"noopener noreferrer",variant:"link",style:{color:"var(--givewp-gray-100)"}},"Read more")));function fa({priceOption:t,setAttributes:n,attributes:r}){return(0,e.createElement)(l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,o.__)("Donation Type","give"),onChange:e=>{n({priceOption:e})},value:t,help:"multi"===t?(0,o.__)("Set multiple price donations for this form.","give"):(0,o.__)("The donation amount is fixed to the following amount:","give")},(0,e.createElement)(l.__experimentalToggleGroupControlOption,{label:(0,o.__)("Multi-level","give"),value:"multi"}),(0,e.createElement)(l.__experimentalToggleGroupControlOption,{label:(0,o.__)("Fixed","give"),value:"set"}))}const ma=(e,t)=>Object.keys(pa).indexOf(e)-Object.keys(pa).indexOf(t),ha=[{label:(0,o.__)("Daily","give"),value:"day"},{label:(0,o.__)("Weekly","give"),value:"week"},{label:(0,o.__)("Monthly","give"),value:"month"},{label:(0,o.__)("Quarterly","give"),value:"quarter"},{label:(0,o.__)("Yearly","give"),value:"year"}],va=[{label:(0,o.__)("Every","give"),value:"1"},{label:(0,o.__)("Every 2nd","give"),value:"2"},{label:(0,o.__)("Every 3rd","give"),value:"3"},{label:(0,o.__)("Every 4th","give"),value:"4"},{label:(0,o.__)("Every 5th","give"),value:"5"},{label:(0,o.__)("Every 6th","give"),value:"6"}],ba=[{label:(0,o.__)("Ongoing","give"),value:"0"}].concat([...Array(25).keys()].slice(2).map((e=>({label:(0,o.sprintf)((0,o.__)("%d donations","give"),e),value:e.toString()})))),ya=({attributes:t,setAttributes:n})=>{const{label:i=(0,o.__)("Donation Amount","give"),levels:s,descriptionsEnabled:u=!1,priceOption:d,setPrice:p,customAmount:g,customAmountMin:f,customAmountMax:m,recurringEnabled:h,recurringBillingInterval:v,recurringBillingPeriodOptions:b,recurringLengthOfTime:y,recurringOptInDefaultBillingPeriod:C,recurringEnableOneTimeDonations:w=!0}=t,_=b.length>1||w;(0,e.useEffect)((()=>{("one-time"!==C||w)&&["one-time"].concat(b).includes(C)||n({recurringOptInDefaultBillingPeriod:b[0]})}),[b,w]);const x=(0,r.useCallback)((e=>{const t=Array.from(new Set(b.concat([e])));t.sort(ma),n({recurringBillingPeriodOptions:t})}),[b]),E=(0,r.useCallback)((e=>{const t=b.filter((t=>t!==e));b.length>1&&(t.sort(ma),n({recurringBillingPeriodOptions:t}))}),[b]),{gateways:I,recurringAddonData:D,gatewaySettingsUrl:S}=c(),L=I.filter((e=>e.enabled)),P=I.filter((e=>e.supportsSubscriptions)),A=L.some((e=>e.supportsSubscriptions)),N=A&&h,[T,O]=(0,e.useState)(s.map((e=>{var t;return{...e,id:String(Math.floor(1e6*Math.random())),value:null!==(t=e?.value.toString())&&void 0!==t?t:""}}))),R=(0,r.useCallback)((e=>(w&&(e=["one-time"].concat(e)),e.map((e=>({label:pa[e].singular.toLowerCase().replace(/\w/,(e=>e.toUpperCase())),value:e}))))),[b,w]),{currency:B="USD"}=c();return(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Field Settings","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label","give"),value:i,onChange:e=>n({label:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Donation Options","give"),initialOpen:!0},(0,e.createElement)(fa,{priceOption:d,attributes:t,setAttributes:n}),"set"===d?(0,e.createElement)(da,{label:(0,o.__)("Set Donation","give"),value:p,onBlur:()=>!p&&n({setPrice:25}),onValueChange:e=>n({setPrice:e?parseInt(e):0})}):(0,e.createElement)(Jo,{currency:B,multiple:!1,options:T,setOptions:e=>{const t=e.filter((e=>e.value)).map((e=>({...e,value:Number(e.value)})));O(e),n({levels:t})},onAddOption:()=>{const e=s.map((e=>Number(e.value))),t=e.length?String(2*Math.max(...e)):"10",r={id:String(Math.floor(1e6*Math.random())),label:"",value:t,checked:!1};s.length||(r.checked=!0),O([...T,r]),n({levels:[...s,r]})},onRemoveOption:(e,t)=>{const r=s.filter(((e,n)=>n!==t));e.checked&&r.length>0&&(r[0].checked=!0),O(r),n({levels:r})},defaultControlsTooltip:(0,o.__)("Default Level","give"),toggleLabel:(0,o.__)("Enable amount description","give"),toggleEnabled:u,onHandleToggle:e=>n({descriptionsEnabled:e}),maxLabelLength:120})),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Custom Amount","give"),initialOpen:!1},(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Custom Amount","give"),checked:g,onChange:()=>n({customAmount:!g})}),!!g&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(da,{label:(0,o.__)("Minimum","give"),value:f,onValueChange:e=>n({customAmountMin:e}),help:(0,o.__)("Sets the minimum donation amount for all gateways.","give")}),(0,e.createElement)(da,{label:(0,o.__)("Maximum","give"),value:m,onValueChange:e=>n({customAmountMax:e}),help:(0,o.__)("Sets the maximum donation amount for all gateways. Leave empty for no maximum amount.","give")}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Recurring Donations","give"),initialOpen:!1},!A&&(D.isInstalled?(0,e.createElement)("div",{style:{fontSize:"13px",lineHeight:"1.3em",display:"flex",flexDirection:"column",gap:"12px",padding:"6px 12px 12px 0"}},(0,e.createElement)("div",null,(0,o.__)("None of the payment gateways currently enabled support Recurring Donations. To collect recurring donations, enable one of the following payment gateways:","give")),(0,e.createElement)("ul",{style:{listStyleType:"inherit",marginLeft:"12px"}},P.map((t=>(0,e.createElement)("li",{key:t.id},t.label)))),(0,e.createElement)("a",{href:S,target:"_blank",rel:"noreferrer noopener"},"Go to Payment Gateway Settings")):(0,e.createElement)(ga,null)),A&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Enable recurring donation","give"),checked:h,onChange:()=>n({recurringEnabled:!h})}))),!!N&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Enable one-time donation","give"),checked:w,onChange:()=>{n({recurringEnableOneTimeDonations:!w})}})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.BaseControl,{id:"recurringBillingPeriodOptions",label:(0,o.__)("Frequency","give")},(0,e.createElement)("div",{style:{width:"100%",display:"grid",gridTemplateColumns:"1fr 1fr"}},ha.map((t=>(0,e.createElement)(l.CheckboxControl,{key:t.value,label:t.label,checked:b.includes(t.value),onChange:e=>e?x(t.value):E(t.value),disabled:1===b.length&&b.includes(t.value),__nextHasNoMarginBottom:!0})))))),_&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Default Frequency","give"),value:null!=C?C:w?"one-time":b[0],options:R(b),onChange:e=>n({recurringOptInDefaultBillingPeriod:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Interval","give"),options:va,value:v,onChange:e=>n({recurringBillingInterval:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Number of Donations","give"),options:ba,value:y,onChange:e=>n({recurringLengthOfTime:e})})))))},Ca={day:{singular:(0,o.__)("day","give"),plural:(0,o.__)("days","give"),adjective:(0,o.__)("daily","give")},week:{singular:(0,o.__)("week","give"),plural:(0,o.__)("weeks","give"),adjective:(0,o.__)("weekly","give")},month:{singular:(0,o.__)("month","give"),plural:(0,o.__)("months","give"),adjective:(0,o.__)("monthly","give")},quarter:{singular:(0,o.__)("quarter","give"),plural:(0,o.__)("quarters","give"),adjective:(0,o.__)("quarterly","give")},year:{singular:(0,o.__)("year","give"),plural:(0,o.__)("years","give"),adjective:(0,o.__)("yearly","give")}};class wa{constructor(e){if(!xa(e))throw new Error(`Invalid subscription period: ${e}`);this.period=e}label(){const e=Ca[this.period];return new _a(e)}}class _a{shouldCapitalize=!1;constructor(e){this.periodLabel=e}capitalize(){return this.shouldCapitalize=!0,this}singular(){return this.format(this.periodLabel.singular)}plural(){return this.format(this.periodLabel.plural)}adjective(){return this.format(this.periodLabel.adjective)}get(e){return e>1?`${e} ${this.format(this.periodLabel.plural)}`:this.format(this.periodLabel.singular)}format(e){return this.shouldCapitalize?e.toLowerCase().replace(/\w/,(e=>e.toUpperCase())):e}}const xa=e=>e in Ca;function Ea({amount:t}){return(0,r.createInterpolateElement)((0,o.__)("This donation is <amount/>","give"),{amount:(0,e.createElement)("strong",null,t)})}function Ia({isFixedAmount:t,fixedAmount:n,period:i,frequency:a,installments:l}){const s=new wa(i),c=l?(0,o.__)("This donation <amount /> every <period /> for <count /> <donations />.","give"):(0,o.__)("This donation <amount /> every <period />.","give");return(0,r.createInterpolateElement)(c,{amount:t?(0,e.createElement)("span",null,(0,o.__)("is","give")," ",(0,e.createElement)("strong",null,n)):(0,e.createElement)("span",null,(0,o.__)("repeats","give")),period:(0,e.createElement)("strong",null,s.label().get(a)),count:(0,e.createElement)("strong",null,l),donations:(0,e.createElement)("strong",null,(0,o.__)("donations","give"))})}const Da=({children:t})=>(0,e.createElement)("div",{style:{backgroundColor:"var(--givewp-gray-20)",padding:"12px 16px",borderRadius:"5px"}},t),Sa=({levels:t,descriptionsEnabled:n})=>(0,e.createElement)(sa,{descriptionsEnabled:n},t.map(((t,r)=>{const i=ua(t?.value?.toString());return(0,e.createElement)(ca,{selected:t.checked,key:r,descriptionsEnabled:n},(0,e.createElement)("span",{className:A()({"give-donation-block__level__amount":n})},i),n&&(0,e.createElement)("span",{className:"give-donation-block__level__label"},t.label?t.label:(0,o.__)("Description goes here","give")))}))),La=({amount:t})=>(0,e.createElement)(da,{value:t,label:(0,o.__)("Custom amount","give"),hideLabelFromVision:!0}),Pa=({amount:t})=>(0,e.createElement)(Da,null,(0,e.createElement)(Ea,{amount:t})),Aa=({options:t,defaultSelected:n})=>(0,e.createElement)(l.RadioControl,{className:"give-billing-period-control",label:(0,o.__)("Billing Period","give"),hideLabelFromVision:!0,selected:null!=n?n:t[0],options:t.map((e=>({label:"one-time"===e?(0,o.__)("One Time","give"):pa[e].adjective,value:e}))),onChange:e=>null}),Na=JSON.parse('[{"clientId":"8371d4c7-0e8d-4aff-a1a1-b4520f008132","name":"givewp/section","isValid":true,"attributes":{"title":"How much would you like to donate today?","description":"All donations directly impact our organization and help us further our mission."},"innerBlocks":[{"clientId":"bddaa0ea-29bf-4143-b62d-aae3396e9b0f","name":"givewp/donation-amount","isValid":true,"attributes":{"label":"Donation Amount","levels":[{"value":10,"checked":true},{"value":25},{"value":50},{"value":100},{"value":250},{"value":500}],"priceOption":"multi","setPrice":25,"customAmount":true,"customAmountMin":1,"recurringBillingPeriodOptions":["month"],"recurringBillingInterval":1,"recurringEnabled":false,"recurringLengthOfTime":"0","recurringOptInDefaultBillingPeriod":"month","recurringEnableOneTimeDonations":true},"innerBlocks":[]}]},{"clientId":"2d74bf4b-4b82-4bea-aed7-431801709351","name":"givewp/section","isValid":true,"attributes":{"title":"Who\'s Giving Today?","description":"We\'ll never share this information with anyone."},"innerBlocks":[{"clientId":"1dc9cc78-698b-443a-8679-572d0667b7d8","name":"givewp/donor-name","isValid":true,"attributes":{"showHonorific":false,"honorifics":["Mr","Ms","Mrs"],"firstNameLabel":"First name","firstNamePlaceholder":"First name","lastNameLabel":"Last name","lastNamePlaceholder":"Last name","requireLastName":false},"innerBlocks":[]},{"clientId":"6f0af86f-703d-400d-9cf9-322d5691307b","name":"givewp/email","isValid":true,"attributes":{"label":"Email Address","isRequired":true},"innerBlocks":[]}]},{"clientId":"52596cc5-ab49-433e-b8e9-23fb4871fb5c","name":"givewp/section","isValid":true,"attributes":{"title":"Payment Details","description":"How would you like to pay for your donation?"},"innerBlocks":[{"name":"givewp/donation-summary","clientId":"b7114360-8542-4043-8296-26d2ae995d24","isValid":true,"attributes":[],"innerBlocks":[]},{"clientId":"145d8b8a-1870-4516-b0d5-fa7848578819","name":"givewp/payment-gateways","isValid":true,"attributes":{},"innerBlocks":[]}]}]'),{recurringBillingInterval:Ta,recurringBillingPeriodOptions:Oa,recurringLengthOfTime:Ra,recurringEnabled:Ba,recurringEnableOneTimeDonations:ka,customAmountMin:Ma,customAmount:Ha,setPrice:Va,priceOption:Ga,levels:Fa}=(Za="givewp/donation-amount",Na.flatMap((({innerBlocks:e})=>e)).find((({name:e})=>e===Za))?.attributes),ja={name:"givewp/donation-amount",settings:{...x,title:(0,o.__)("Donation Amount and Levels","give"),description:(0,o.__)("The interface for donors to specify the amount they want to donate.","give"),supports:{multiple:!1,html:!1},attributes:{label:{type:"string",source:"attribute",default:(0,o.__)("Donation Amount","give")},levels:{type:"array",default:Fa},priceOption:{type:"string",default:Ga},setPrice:{type:"number",default:Va},customAmount:{type:"boolean",default:Ha},customAmountMin:{type:"number",default:Ma},customAmountMax:{type:"number"},recurringEnabled:{type:"boolean",default:Ba},recurringBillingInterval:{type:"number",default:Ta},recurringBillingPeriodOptions:{type:"array",default:Oa},recurringLengthOfTime:{type:"string",default:Ra},recurringEnableOneTimeDonations:{type:"boolean",default:ka}},edit:({attributes:t,setAttributes:n})=>{const{label:r=(0,o.__)("Donation Amount","give"),levels:i,priceOption:a,setPrice:s,customAmount:u,recurringEnabled:d,recurringBillingInterval:p,recurringBillingPeriodOptions:g,recurringLengthOfTime:f,recurringOptInDefaultBillingPeriod:m,recurringEnableOneTimeDonations:h,descriptionsEnabled:v}=t,{gateways:b}=c(),y=b.some((e=>e.enabled&&e.supportsSubscriptions))&&d,C="multi"===a,w="set"===a,_=y&&(g.length>1||h),x=w&&!u,E=y&&"one-time"!==m&&(x||y&&!_||Number(f)>0||Number(p)>1),I=x&&!E,D=ua(s.toString());return(0,e.createElement)(l.BaseControl,{id:"amount-field",label:r},(0,e.createElement)("div",{className:"give-donation-block"},_&&(0,e.createElement)(Aa,{options:h?["one-time"].concat(g):g,defaultSelected:m}),C&&(0,e.createElement)(Sa,{levels:i,descriptionsEnabled:v}),u&&(0,e.createElement)(La,{amount:s}),E&&(0,e.createElement)(Da,null,(0,e.createElement)(Ia,{isFixedAmount:w,fixedAmount:D,period:m,frequency:parseInt(p),installments:parseInt(f)})),I&&(0,e.createElement)(Pa,{amount:D}),(0,e.createElement)(ya,{attributes:t,setAttributes:n})))},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M11.5789 4.44118H20M4 7.52941L7.36842 4M7.36842 4V19M11.5789 8.85294H18.3158M11.5789 13.2647H16.6316M11.5789 17.6765H14.9474",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))})}},Ua=window.wp.primitives,qa=(0,e.createElement)(Ua.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Ua.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),Wa={name:"givewp/login",settings:{...x,icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M7.86239 -7.48537e-05L14.2413 -2.60971e-05C15.0462 -3.88525e-05 15.7106 -4.93415e-05 16.2518 0.044168C16.8139 0.0900932 17.3306 0.188658 17.8159 0.435948C18.5686 0.819441 19.1805 1.43136 19.564 2.18401C19.8113 2.66935 19.9099 3.18605 19.9558 3.74815C20 4.28934 20 4.95369 20 5.75865V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.8159C19.1805 18.5686 18.5686 19.1805 17.8159 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20L7.8624 20C7.06701 20.0005 6.47635 20.0008 5.9647 19.8637C4.58433 19.4938 3.50614 18.4156 3.13627 17.0353C2.99917 16.5236 2.99949 15.9329 2.99993 15.1376L2.99997 15C2.99997 14.4477 3.44769 14 3.99997 14C4.55226 14 4.99997 14.4477 4.99997 15C4.99997 15.9943 5.00856 16.2953 5.06812 16.5176C5.25306 17.2078 5.79215 17.7469 6.48234 17.9318C6.70461 17.9914 7.00562 18 7.99997 18H14.2C15.0566 18 15.6388 17.9992 16.0889 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5902 17.5902 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.0889C17.9992 15.6388 18 15.0566 18 14.2V5.79997C18 4.94339 17.9992 4.3611 17.9624 3.91101C17.9266 3.4726 17.8617 3.24839 17.782 3.09199C17.5902 2.71567 17.2843 2.40971 16.908 2.21796C16.7516 2.13827 16.5274 2.07335 16.0889 2.03753C15.6388 2.00075 15.0566 1.99997 14.2 1.99997H7.99997C7.00562 1.99997 6.70461 2.00856 6.48234 2.06812C5.79215 2.25306 5.25306 2.79215 5.06812 3.48234C5.00856 3.70461 4.99997 4.00562 4.99997 4.99997C4.99997 5.55226 4.55226 5.99997 3.99997 5.99997C3.44769 5.99997 2.99997 5.55226 2.99997 4.99997L2.99993 4.86239C2.99949 4.06701 2.99917 3.47635 3.13627 2.9647C3.50614 1.58433 4.58433 0.50614 5.9647 0.136271C6.47635 -0.00082539 7.06701 -0.000505557 7.86239 -7.48537e-05Z",fill:"currentColor"}),(0,e.createElement)(l.Path,{d:"M9.29289 5.29289C9.68342 4.90237 10.3166 4.90237 10.7071 5.29289L14.7071 9.29289C15.0976 9.68342 15.0976 10.3166 14.7071 10.7071L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L11.5858 11H1C0.447715 11 0 10.5523 0 10C0 9.44771 0.447715 9 1 9H11.5858L9.29289 6.70711C8.90237 6.31658 8.90237 5.68342 9.29289 5.29289Z",fill:"currentColor"}))}),title:(0,o.__)("User Login","give"),description:(0,o.__)("Provides the donor the option to log in to complete donation","give"),supports:{multiple:!1},attributes:{required:{type:"boolean",default:!1},loginRedirect:{type:"boolean",default:!1},loginNotice:{type:"string",default:(0,o.__)("Already have an account? Log in.","give")},loginConfirmation:{type:"string",default:(0,o.__)("Thank you for your continued support.","give")}},edit:({attributes:t,setAttributes:n})=>{const{required:r,loginRedirect:s,loginNotice:c,loginConfirmation:u}=t;return(0,e.createElement)(e.Fragment,null,!!r&&(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"}},(0,e.createElement)("div",{style:{display:"flex",flexDirection:"row",gap:"15px"}},(0,e.createElement)(l.TextControl,{label:(0,o.__)("Username","give"),onChange:()=>null,value:"",placeholder:(0,o.__)("Enter your username or email","give")}),(0,e.createElement)(l.TextControl,{type:"password",label:(0,o.__)("Password","give"),onChange:()=>null,value:"",placeholder:(0,o.__)("Enter your password","give")})),(0,e.createElement)("div",{style:{alignItems:"center",display:"flex",flexDirection:"row-reverse",gap:"15px",justifyContent:"space-between"}},(0,e.createElement)(l.Button,{variant:"primary",style:{backgroundColor:"var(--givewp-neutral-70)",color:"var(--givewp-grey-900)",borderRadius:"4px",fontSize:"1rem",fontWeight:"600",height:"auto",lineHeight:"1.38",padding:"12px 16px"}},(0,o.__)("Log In","give")),(0,e.createElement)(l.Button,{style:{color:"var(--givewp-grey-700)",display:"inline",fontSize:"14px",fontWeight:"500",padding:"0"}},(0,o.__)("Forgot your password?","give")," ",(0,e.createElement)("strong",null,(0,o.__)("Reset","give"))))),!r&&(0,e.createElement)("div",{style:{backgroundColor:"var(--givewp-grey-50)",borderRadius:"5px",display:"flex",padding:"12px 24px"}},(0,e.createElement)(l.Button,{icon:s?(0,e.createElement)(i,{icon:qa,style:{height:"20px",width:"20px"}}):void 0,style:{flexDirection:"row-reverse",fontSize:"14px",height:"auto",lineHeight:"1.5",padding:"0"}},c)),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Settings","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Require donor login","give"),checked:r,onChange:()=>n({required:!r}),help:(0,o.__)("Enable this option if you want to require the donor login by default.","give")})),!r&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Login Notice","give"),value:c,onChange:e=>n({loginNotice:e}),help:(0,o.__)("Add your own to customize or leave blank to use the default text placeholder.","give")})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Redirect to login page","give"),checked:s,onChange:e=>n({loginRedirect:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Login Confirmation","give"),value:u,onChange:e=>n({loginConfirmation:e}),help:(0,o.__)("Add your own to customize or leave blank to use the default text placeholder.","give")})))))}}},za=({countryList:t,countryLabel:n})=>{var r;const[i,o]=(0,e.useState)(null!==(r=t[0])&&void 0!==r?r:""),a=t.map((e=>({label:e.label,value:e.value,disabled:"none"===e.label||""===e.label})));return(0,e.createElement)(l.SelectControl,{label:n,required:!0,className:"give-is-required",options:a,value:i,onChange:o})};var Za;const $a={name:"givewp/billing-address",settings:{...x,title:(0,o.__)("Billing Address","give"),description:(0,o.__)("Collects the donor billing address with display options.","give"),supports:{multiple:!1},attributes:{groupLabel:{type:"string",source:"attribute",selector:"p",default:"Billing Address"},country:{type:"array",source:"attribute",default:[{value:"sample",label:(0,o.__)("A full country list will be displayed here...","give")}]},countryLabel:{type:"string",source:"attribute",default:(0,o.__)("Country","give")},address1Label:{type:"string",source:"attribute",default:(0,o.__)("Address Line 1","give")},address1Placeholder:{type:"string",source:"attribute",default:(0,o.__)("Address Line 1","give")},address2Label:{type:"string",source:"attribute",default:(0,o.__)("Address Line 2","give")},address2Placeholder:{type:"string",source:"attribute",default:(0,o.__)("Address Line 2","give")},requireAddress2:{type:"boolean",default:!1},cityLabel:{type:"string",source:"attribute",default:(0,o.__)("City","give")},cityPlaceholder:{type:"string",source:"attribute",default:(0,o.__)("City","give")},stateLabel:{type:"string",source:"attribute",default:(0,o.__)("State/Province/Country","give")},statePlaceholder:{type:"string",source:"attribute",default:(0,o.__)("This changes by country selection...","give")},zipLabel:{type:"string",source:"attribute",default:(0,o.__)("Zip/Postal Code","give")},zipPlaceholder:{type:"string",source:"attribute",default:(0,o.__)("Zip/Postal Code","give")}},edit:function({attributes:{groupLabel:t,country:n,countryLabel:r,address1Label:i,address1Placeholder:s,address2Label:c,address2Placeholder:u,requireAddress2:d,cityLabel:p,cityPlaceholder:g,stateLabel:f,statePlaceholder:m,zipLabel:h,zipPlaceholder:v},setAttributes:b}){return(0,e.createElement)(e.Fragment,null,t.length>0&&(0,e.createElement)("div",{style:{gridArea:"groupLabel",marginTop:"-1.5rem"}},(0,e.createElement)(a.RichText,{tagName:"p",value:t,onChange:e=>b({groupLabel:e}),style:{width:"100%",fontSize:"1.1rem",fontWeight:500},allowedFormats:[],className:"give-billing-address-block__group-label"})),(0,e.createElement)("div",{style:{display:"grid",gridTemplateAreas:'\n "country country"\n "address1 address1"\n "address2 address2"\n "city state"\n "zip zip"\n ',gridAutoColumns:"1fr",gap:"1rem"}},(0,e.createElement)("div",{style:{gridArea:"country"}},(0,e.createElement)(za,{countryList:n,countryLabel:r})),(0,e.createElement)("div",{style:{gridArea:"address1"}},(0,e.createElement)(l.TextControl,{label:i,placeholder:s,required:!0,className:"give-is-required",readOnly:!0,value:s,onChange:null})),(0,e.createElement)("div",{style:{gridArea:"address2"}},(0,e.createElement)(l.TextControl,{label:c,placeholder:u,required:d,className:d?"give-is-required":"",value:u,onChange:null,readOnly:!0})),(0,e.createElement)("div",{style:{gridArea:"city"}},(0,e.createElement)(l.TextControl,{label:p,placeholder:g,required:!0,className:"give-is-required",readOnly:!0,value:g,onChange:null})),(0,e.createElement)("div",{style:{gridArea:"state"}},(0,e.createElement)(l.TextControl,{label:f,placeholder:m,required:!0,className:"give-is-required",value:m,onChange:null,readOnly:!0})),(0,e.createElement)("div",{style:{gridArea:"zip"}},(0,e.createElement)(l.TextControl,{label:h,placeholder:v,required:!0,className:"give-is-required",value:v,onChange:null,readOnly:!0}))),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Group","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:"Label",value:t,onChange:e=>b({groupLabel:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Country","give"),initialOpen:!1},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:r,onChange:e=>b({countryLabel:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Address 1","give"),initialOpen:!1},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:i,onChange:e=>b({address1Label:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:s,onChange:e=>b({address1Placeholder:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Address 2","give"),initialOpen:!1},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:c,onChange:e=>b({address2Label:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:u,onChange:e=>b({address2Placeholder:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Required","give"),checked:d,onChange:()=>b({requireAddress2:!d}),help:(0,o.__)("Do you want to force the Address Line 2 field to be required?","give")}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("City","give"),initialOpen:!1},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:p,onChange:e=>b({cityLabel:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:g,onChange:e=>b({cityPlaceholder:e})}))),(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Zip","give"),initialOpen:!1},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:h,onChange:e=>b({zipLabel:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Placeholder"),value:v,onChange:e=>b({zipPlaceholder:e})})))))},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M12.9166 11.3247C13.5076 10.8719 13.942 10.2452 14.1585 9.5328C14.3751 8.82039 14.3629 8.05804 14.1239 7.35287C13.8848 6.6477 13.4308 6.03517 12.8256 5.60135C12.2205 5.16752 11.4946 4.93422 10.75 4.93422C10.0054 4.93422 9.27953 5.16752 8.67437 5.60135C8.06922 6.03517 7.6152 6.6477 7.37613 7.35287C7.13705 8.05804 7.12494 8.82039 7.34149 9.5328C7.55804 10.2452 7.99237 10.8719 8.58344 11.3247C7.47438 11.7389 6.50807 12.4637 5.8 13.4125C5.71049 13.5318 5.67206 13.6819 5.69315 13.8295C5.71425 13.9772 5.79315 14.1105 5.9125 14.2C6.03185 14.2895 6.18186 14.3279 6.32955 14.3068C6.47723 14.2857 6.61049 14.2068 6.7 14.0875C7.17156 13.4588 7.78303 12.9484 8.48598 12.597C9.18894 12.2455 9.96407 12.0625 10.75 12.0625C11.5359 12.0625 12.3111 12.2455 13.014 12.597C13.717 12.9484 14.3284 13.4588 14.8 14.0875C14.8895 14.2068 15.0228 14.2857 15.1705 14.3068C15.3181 14.3279 15.4682 14.2895 15.5875 14.2C15.7068 14.1105 15.7857 13.9772 15.8068 13.8295C15.8279 13.6819 15.7895 13.5318 15.7 13.4125C14.9919 12.4637 14.0256 11.7389 12.9166 11.3247ZM8.3125 8.5C8.3125 8.01791 8.45546 7.54664 8.72329 7.1458C8.99113 6.74495 9.37181 6.43253 9.81721 6.24804C10.2626 6.06356 10.7527 6.01528 11.2255 6.10934C11.6984 6.20339 12.1327 6.43554 12.4736 6.77643C12.8145 7.11732 13.0466 7.55164 13.1407 8.02447C13.2347 8.4973 13.1864 8.9874 13.002 9.43279C12.8175 9.87819 12.505 10.2589 12.1042 10.5267C11.7034 10.7945 11.2321 10.9375 10.75 10.9375C10.1035 10.9375 9.48355 10.6807 9.02643 10.2236C8.56931 9.76645 8.3125 9.14647 8.3125 8.5ZM17.5 0.4375H4C3.6519 0.4375 3.31806 0.575781 3.07192 0.821922C2.82578 1.06806 2.6875 1.4019 2.6875 1.75V4.1875H1C0.850816 4.1875 0.707742 4.24676 0.602252 4.35225C0.496763 4.45774 0.4375 4.60082 0.4375 4.75C0.4375 4.89918 0.496763 5.04226 0.602252 5.14775C0.707742 5.25324 0.850816 5.3125 1 5.3125H2.6875V9.4375H1C0.850816 9.4375 0.707742 9.49676 0.602252 9.60225C0.496763 9.70774 0.4375 9.85082 0.4375 10C0.4375 10.1492 0.496763 10.2923 0.602252 10.3977C0.707742 10.5032 0.850816 10.5625 1 10.5625H2.6875V14.6875H1C0.850816 14.6875 0.707742 14.7468 0.602252 14.8523C0.496763 14.9577 0.4375 15.1008 0.4375 15.25C0.4375 15.3992 0.496763 15.5423 0.602252 15.6477C0.707742 15.7532 0.850816 15.8125 1 15.8125H2.6875V18.25C2.6875 18.5981 2.82578 18.9319 3.07192 19.1781C3.31806 19.4242 3.6519 19.5625 4 19.5625H17.5C17.8481 19.5625 18.1819 19.4242 18.4281 19.1781C18.6742 18.9319 18.8125 18.5981 18.8125 18.25V1.75C18.8125 1.4019 18.6742 1.06806 18.4281 0.821922C18.1819 0.575781 17.8481 0.4375 17.5 0.4375ZM17.6875 18.25C17.6875 18.2997 17.6677 18.3474 17.6326 18.3826C17.5974 18.4177 17.5497 18.4375 17.5 18.4375H4C3.95027 18.4375 3.90258 18.4177 3.86742 18.3826C3.83225 18.3474 3.8125 18.2997 3.8125 18.25V1.75C3.8125 1.70027 3.83225 1.65258 3.86742 1.61742C3.90258 1.58225 3.95027 1.5625 4 1.5625H17.5C17.5497 1.5625 17.5974 1.58225 17.6326 1.61742C17.6677 1.65258 17.6875 1.70027 17.6875 1.75V18.25Z",fill:"currentColor"}))})}},Ka={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function Ya(e){return t=>{Ka[t]={...e,...Ka[t]}}}["address","main","div","figure","p","pre"].forEach(Ya({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Ya({content:8,type:73})),["p","pre"].forEach(Ya({content:8,type:65})),["s","small","span","del","ins"].forEach(Ya({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(Ya({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(Ya({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(Ya({type:89}));const Ja=Object.freeze(Ka),Xa=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Qa=Object.keys(Ja).filter((e=>"canvas"!==e&&"iframe"!==e)),el=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),tl=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function nl(){return nl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}function rl({attributes:e={},className:n,children:r=null,selfClose:i=!1,tagName:o}){const a=o;return i?t().createElement(a,nl({className:n},e)):t().createElement(a,nl({className:n},e),r)}class il{attribute(e,t){return t}node(e,t){return t}}var ol=n(5573),al=n.n(ol);function ll(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sl=/(url|image|image-set)\(/i;class cl extends il{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(sl)&&delete t[e]})),t}}const ul=/^<(!doctype|(html|head|body)(\s|>))/i,dl=/^(aria-|data-|\w+:)/iu,pl=/{{{(\w+)\/?}}}/;function gl(){if("undefined"!=typeof window&&"undefined"!=typeof document)return document.implementation.createHTMLDocument("Interweave")}class fl{constructor(e,t={},n=[],r=[]){var i;ll(this,"allowed",void 0),ll(this,"banned",void 0),ll(this,"blocked",void 0),ll(this,"container",void 0),ll(this,"content",[]),ll(this,"props",void 0),ll(this,"matchers",void 0),ll(this,"filters",void 0),ll(this,"keyIndex",void 0),this.props=t,this.matchers=n,this.filters=[...r,new cl],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(i=t.allowList)&&void 0!==i?i:Qa),this.banned=new Set(Xa),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t),t)}applyNodeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t),t)}applyMatchers(e,t){const n={},{props:r}=this;let i=e,o=0,a=null;return this.matchers.forEach((e=>{const l=e.asTag().toLowerCase(),s=this.getTagConfig(l);if(r[e.inverseName]||!this.isTagAllowed(l))return;if(!this.canRenderChild(t,s))return;let c="";for(;i&&(a=e.match(i));){const{index:t,length:l,match:s,valid:u,void:d,...p}=a,g=e.propName+String(o);t>0&&(c+=i.slice(0,t)),u?(c+=d?`{{{${g}/}}}`:`{{{${g}}}}${s}{{{/${g}}}}`,this.keyIndex+=1,o+=1,n[g]={children:s,matcher:e,props:{...r,...p,key:this.keyIndex}}):c+=s,e.greedy?(i=c+i.slice(t+l),c=""):i=i.slice(t+(l||s.length))}e.greedy||(i=c+i)})),0===o?e:this.replaceTokens(i,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName)&&!e.void&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&Boolean(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const r=(void 0!==n.g&&n.g.INTERWEAVE_SSR_POLYFILL||gl)();if(!r)return;const i=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===i||"fragment"===i?r.body:r.createElement(i);return e.match(ul)||(o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?al()(e):e)),o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes?([...e.attributes].forEach((i=>{const{name:o,value:a}=i,l=o.toLowerCase(),s=el[l]||el[o];if(!this.isSafe(e))return;if(!l.match(dl)&&(!t&&(!s||2===s)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c="style"===l?this.extractStyleAttribute(e):a;4===s?c=!0:3===s?c=Number.parseFloat(String(c)):5!==s&&(c=String(c)),n[tl[l]||l]=this.applyAttributeFilters(l,c),r+=1})),0===r?null:n):null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach((n=>{const r=e.style[n];"string"!=typeof r&&"number"!=typeof r||(t[n.replace(/-([a-z])/g,((e,t)=>String(t).toUpperCase()))]=r)})),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Ja[e]?{...t,...Ja[e],tagName:e}:t}isSafe(e){if("undefined"!=typeof HTMLAnchorElement&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,n){const{noHtml:r,noHtmlExceptMatchers:i,allowElements:o,transform:a,transformOnlyAllowList:l}=this.props;let s=[],c="";return[...e.childNodes].forEach((e=>{if(1===e.nodeType){const d=e.nodeName.toLowerCase(),p=this.getTagConfig(d);c&&(s.push(c),c="");const g=this.applyNodeFilters(d,e);if(!g)return;let f;if(a&&(!l||this.isTagAllowed(d))){this.keyIndex+=1;const e=this.keyIndex;f=this.parseNode(g,p);const n=a(g,f,p);if(null===n)return;if(void 0!==n)return void s.push(t().cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(d))return;if(r||i&&"br"!==d||!this.isTagAllowed(d)||!o&&!this.canRenderChild(n,p))s=[...s,...this.parseNode(g,p.tagName?p:n)];else{var u;this.keyIndex+=1;const e=this.extractAttributes(g),n={tagName:d};e&&(n.attributes=e),p.void&&(n.selfClose=p.void),s.push(t().createElement(rl,{...n,key:this.keyIndex},null!==(u=f)&&void 0!==u?u:this.parseNode(g,p)))}}else if(3===e.nodeType){const t=r&&!i?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:c+=t}})),c&&s.push(c),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,i=null;for(;i=r.match(pl);){const[e,o]=i,a=i.index,l=e.includes("/");a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:s,matcher:c,props:u}=t[o];let d;if(l)d=e.length,n.push(c.createElement(s,u));else{const i=r.match(new RegExp(`{{{/${o}}}}`));d=i.index+i[0].length,n.push(c.createElement(this.replaceTokens(r.slice(e.length,i.index),t),u))}r=r.slice(d)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}}function ml(e){var n;const{attributes:r,className:i,containerTagName:o,content:a,emptyContent:l,parsedContent:s,tagName:c,noWrap:u}=e,d=null!==(n=null!=o?o:c)&&void 0!==n?n:"span",p="fragment"===d||u;let g;if(s)g=s;else{const t=new fl(null!=a?a:"",e).parse();t.length>0&&(g=t)}return g||(g=l),p?t().createElement(t().Fragment,null,g):t().createElement(rl,{attributes:r,className:i,tagName:d},g)}function hl({href:t}){return(0,e.createElement)("p",{style:{color:"#595959",fontStyle:"SF Pro Text",fontSize:"0.75rem",lineHeight:"140%",fontWeight:400}},(0,o.__)(" Go to the settings to change the "),(0,e.createElement)("a",{href:t,target:"_blank",rel:"noopener noreferrer"},(0,o.__)("Global Label and Text options.")))}function vl(){return(0,e.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},(0,e.createElement)(l.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,e.createElement)(l.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 bl({id:t,help:n,heading:r,buttonCaption:i,children:o,onButtonClick:a,isButtonActive:s}){return(0,e.createElement)(l.BaseControl,{id:t,help:n},(0,e.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},(0,e.createElement)("span",null,r),(0,e.createElement)(l.Button,{className:A()("givewp-control-popover-setting-button",{"givewp-control-popover-setting-button--active":s,"givewp-control-popover-setting-button--has-caption":""!==i}),onClick:a,icon:i?null:vl,children:i||null})),o)}const yl=(0,e.createElement)(Ua.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(Ua.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"}));function Cl({title:t,visible:n,onClose:i,children:a}){return(0,r.useEffect)((()=>i),[]),n?(0,e.createElement)(l.Popover,{className:"givewp-styled-popover-content-settings",placement:"left-end",variant:"unstyled",focusOnMount:!1},(0,e.createElement)("div",{className:"givewp-styled-popover-content-settings__header"},(0,e.createElement)("h1",null,t),(0,e.createElement)(l.Button,{onClick:i,icon:yl,label:(0,o.__)("Close","give")})),(0,e.createElement)("div",{className:"givewp-styled-popover-content-settings__content"},a)):null}const wl="showModalTerms",_l="showFormTerms",xl="showLinkTerms";function El({label:t,linkText:n,isFormDisplay:r,agreementText:i}){return(0,e.createElement)("div",{className:"givewp-terms-and-conditions"},(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container",style:{display:r?"block":"inline-flex"}},(0,e.createElement)(l.CheckboxControl,{label:t,onChange:null,disabled:!0}),r&&(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container__form-display"},(0,e.createElement)(ml,{content:i})),!r&&(0,e.createElement)("div",{className:"givewp-terms-and-conditions-container__link-display"},n)))}const Il={name:"givewp/terms-and-conditions",settings:{...x,title:(0,o.__)("Terms and conditions","give"),description:(0,o.__)("Donors can accept the terms and conditions","give"),supports:{multiple:!1,html:!0},attributes:{useGlobalSettings:{type:"boolean",source:"attribute",default:"true"},checkboxLabel:{type:"string",source:"attribute",default:(0,o.__)("I agree to the Terms and conditions.","give")},displayType:{type:"string",source:"attribute",default:"showFormTerms"},linkText:{type:"string",source:"attribute",default:(0,o.__)("Show terms","give")},linkUrl:{type:"string",source:"attribute",default:""},agreementText:{type:"string",default:(0,o.__)("<p>Acceptance of any contribution, gift or grant is at the discretion of the GiveWP.</p><p>The GiveWP will not accept any gift unless it can be used or expended consistently with the purpose and mission of the GiveWP.</p><p>No irrevocable gift, whether outright or life-income in character, will be accepted if under any reasonable set of circumstances the gift would jeopardize the donor’s financial security.</p><p>The GiveWP will refrain from providing advice about the tax or other treatment of gifts and will encourage donors to seek guidance from their own professional advisers to assist them in the process of making their donation.</p>","give")},modalHeading:{type:"string",source:"attribute",default:(0,o.__)("Do you consent to the following","give")},modalAcceptanceText:{type:"string",source:"attribute",default:(0,o.__)("Accept","give")}},edit:function({attributes:{checkboxLabel:t,displayType:n,linkText:i,useGlobalSettings:s,linkUrl:u,agreementText:d,modalHeading:p,modalAcceptanceText:g},setAttributes:f}){const[m,h]=(0,r.useState)(!1),v=c().termsAndConditions;s&&(t=v.checkboxLabel,d=v.agreementText);const b=n===wl,y=n===_l,C=n===xl;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(El,{label:t,linkText:i,isFormDisplay:y,agreementText:d}),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Field Options","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("TERMS AND CONDITIONS","give"),onChange:()=>f({useGlobalSettings:!s}),value:s,options:[{label:(0,o.__)("Global","give"),value:"true"},{label:(0,o.__)("Customize","give"),value:"false"}]})),s?(0,e.createElement)(hl,{href:"/wp-admin/edit.php?post_type=give_forms&page=give-settings&tab=display§ion=term-and-conditions"}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Checkbox Label","give"),value:t,onChange:e=>f({checkboxLabel:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.SelectControl,{label:(0,o.__)("Display Type","give"),onChange:e=>f({displayType:e}),value:n,options:[{label:(0,o.__)("Show terms in modal","give"),value:wl},{label:(0,o.__)("Show terms in form","give"),value:_l},{label:(0,o.__)("Link to terms","give"),value:xl}]})),(C||b)&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Link Text","give"),value:i,onChange:e=>f({linkText:e})})),C&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("URL","give"),value:u,onChange:e=>f({linkUrl:e})})),!C&&(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(bl,{id:"terms-and-conditions",help:(0,o.__)("This is the actual text which the user will have to agree to in order to make a donation.","give"),heading:(0,o.__)("Agreement Text","give"),onButtonClick:()=>h(!m),isButtonActive:m},(0,e.createElement)(Cl,{title:(0,o.__)("Agreement Text","give"),visible:m,onClose:()=>h(!1)},(0,e.createElement)(Uo,{id:"givewp-agreement-text",label:(0,o.__)("","give"),content:d,setContent:e=>f({agreementText:e})})))),b&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Modal Heading","give"),value:p,onChange:e=>f({modalHeading:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Modal Accept Button","give"),value:g,onChange:e=>f({modalAcceptanceText:e})})))))))},icon:function(){return(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8292 6.34164L17.4317 6.64288L18.0571 6.39271L18.5 6.21555V18.7845L18.0571 18.6073L17.4317 18.3571L16.8292 18.6584L15.3849 19.3805L12.9743 18.577L12.5 18.4189L12.0257 18.577L9.61509 19.3805L8.17082 18.6584L7.56834 18.3571L6.94291 18.6073L6.5 18.7845V6.21555L6.94291 6.39271L7.56834 6.64288L8.17082 6.34164L9.61509 5.6195L12.0257 6.42302L12.5 6.58114L12.9743 6.42302L15.3849 5.6195L16.8292 6.34164ZM20 4L18.5 4.6L17.5 5L15.5 4L12.5 5L9.5 4L7.5 5L6.5 4.6L5 4V5V5.61555V19.3844V20V21L6.5 20.4L7.5 20L9.5 21L12.5 20L15.5 21L17.5 20L18.5 20.4L20 21V20V19.3844V5.61555V5V4ZM16.5 10.25V8.75H8.5V10.25H16.5ZM16.5 13.25V11.75H8.5V13.25H16.5ZM8.5 16.25V14.75H16.5V16.25H8.5Z",fill:"currentColor"}))})}}},Dl=(0,e.createElement)(Ua.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Ua.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})),Sl=({label:t,helpText:n})=>(0,e.createElement)(e.Fragment,null,t,(0,e.createElement)("div",{className:"components-base-control__help"},(0,e.createElement)("small",{style:{fontStyle:"normal",color:"#757575"}},n))),Ll={fieldSettings:{label:{default:(0,o.__)("Comment","give")},description:{default:(0,o.__)("Would you like to add a comment to this donation?","give")},metaKey:!1,placeholder:!1,required:!1,storeAsDonorMeta:!1,displayInAdmin:!1,displayInReceipt:!1,defaultValue:!1,emailTag:!1}},Pl={title:(0,o.__)("Donor Comments","give"),description:(0,o.__)("Do you want to provide donors the ability to add a comment to their donation? The comment will display publicly on the donor wall if they do not select to give anonymously.","give"),category:"input",supports:{html:!1,multiple:!1,givewp:Ll},icon:Dl,edit:function({attributes:t}){const{label:n,description:r}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",null,(0,e.createElement)(l.TextareaControl,{style:{backgroundColor:"#fff"},readOnly:!0,label:(0,e.createElement)(Sl,{label:n,helpText:r}),value:"",onChange:()=>null})))},save:()=>null},Al={name:"givewp/donor-comments",settings:Pl},Nl={fieldSettings:{label:{default:(0,o.__)("Make this an anonymous donation.","give")},description:{default:(0,o.__)("Would you like to prevent your name, image, and comment from being displayed publicly?","give")},metaKey:!1,placeholder:!1,required:!1,storeAsDonorMeta:!1,displayInAdmin:!1,displayInReceipt:!1,defaultValue:!1,emailTag:!1}},Tl={title:(0,o.__)("Anonymous Donation","give"),description:(0,o.__)("Do you want to provide donors the ability mark themselves anonymous while giving? This will prevent their information from appearing publicly on your website but you will still receive their information for your records in the admin panel.","give"),category:"input",supports:{html:!1,multiple:!1,givewp:Nl},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{d:"M10.8449 6.89062L7.05176 16.5H9.1684L9.89932 14.6484H14.1006L14.8316 16.5H16.9482L13.155 6.89062H10.8449ZM10.6765 12.6797L12 9.32658L13.3235 12.6797H10.6765Z",fill:"#000C00"}),(0,e.createElement)(l.Path,{d:"M18 2.625H6V0.75H0.75V6H2.625V18H0.75V23.25H6V21.375H18V23.25H23.25V18H21.375V6H23.25V0.75H18V2.625ZM2.25 4.5V2.25H4.5V4.5H2.25ZM4.5 21.75H2.25V19.5H4.5V21.75ZM18 19.875H6V18H4.125V6H6V4.125H18V6H19.875V18H18V19.875ZM21.75 19.5V21.75H19.5V19.5H21.75ZM19.5 2.25H21.75V4.5H19.5V2.25Z",fill:"#000C00"}))}),edit:function({attributes:t}){const{label:n,description:r}=t;return(0,e.createElement)("div",{className:"givewp-fields-anonymous-donations"},(0,e.createElement)(l.CheckboxControl,{checked:!1,label:n,readOnly:!0,onChange:null,help:r}))},save:()=>null},Ol={name:"givewp/anonymous",settings:Tl};var Rl=[["af","93"],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"],["ax","358",1,["18"]]],Bl=[];for(let e=0;e<Rl.length;e++){let t=Rl[e];Bl[e]={name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{}}}var kl=Bl,Ml={af:"Afghanistan",ax:"Åland Islands",al:"Albania",dz:"Algeria",as:"American Samoa",ad:"Andorra",ao:"Angola",ai:"Anguilla",aq:"Antarctica",ag:"Antigua & Barbuda",ar:"Argentina",am:"Armenia",aw:"Aruba",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bm:"Bermuda",bt:"Bhutan",bo:"Bolivia",ba:"Bosnia & Herzegovina",bw:"Botswana",bv:"Bouvet Island",br:"Brazil",io:"British Indian Ocean Territory",vg:"British Virgin Islands",bn:"Brunei",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cv:"Cape Verde",bq:"Caribbean Netherlands",ky:"Cayman Islands",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",cx:"Christmas Island",cc:"Cocos (Keeling) Islands",co:"Colombia",km:"Comoros",cg:"Congo - Brazzaville",cd:"Congo - Kinshasa",ck:"Cook Islands",cr:"Costa Rica",ci:"Côte d’Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curaçao",cy:"Cyprus",cz:"Czechia",dk:"Denmark",dj:"Djibouti",dm:"Dominica",do:"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",sz:"Eswatini",et:"Ethiopia",fk:"Falkland Islands",fo:"Faroe Islands",fj:"Fiji",fi:"Finland",fr:"France",gf:"French Guiana",pf:"French Polynesia",tf:"French Southern Territories",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gi:"Gibraltar",gr:"Greece",gl:"Greenland",gd:"Grenada",gp:"Guadeloupe",gu:"Guam",gt:"Guatemala",gg:"Guernsey",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hm:"Heard & McDonald Islands",hn:"Honduras",hk:"Hong Kong SAR China",hu:"Hungary",is:"Iceland",in:"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",im:"Isle of Man",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",je:"Jersey",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kw:"Kuwait",kg:"Kyrgyzstan",la:"Laos",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mo:"Macao SAR China",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mq:"Martinique",mr:"Mauritania",mu:"Mauritius",yt:"Mayotte",mx:"Mexico",fm:"Micronesia",md:"Moldova",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ms:"Montserrat",ma:"Morocco",mz:"Mozambique",mm:"Myanmar (Burma)",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nc:"New Caledonia",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",nu:"Niue",nf:"Norfolk Island",kp:"North Korea",mk:"North Macedonia",mp:"Northern Mariana Islands",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",ps:"Palestinian Territories",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pn:"Pitcairn Islands",pl:"Poland",pt:"Portugal",pr:"Puerto Rico",qa:"Qatar",re:"Réunion",ro:"Romania",ru:"Russia",rw:"Rwanda",ws:"Samoa",sm:"San Marino",st:"São Tomé & Príncipe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sx:"Sint Maarten",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",gs:"South Georgia & South Sandwich Islands",kr:"South Korea",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",bl:"St. Barthélemy",sh:"St. Helena",kn:"St. Kitts & Nevis",lc:"St. Lucia",mf:"St. Martin",pm:"St. Pierre & Miquelon",vc:"St. Vincent & Grenadines",sd:"Sudan",sr:"Suriname",sj:"Svalbard & Jan Mayen",se:"Sweden",ch:"Switzerland",sy:"Syria",tw:"Taiwan",tj:"Tajikistan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",tk:"Tokelau",to:"Tonga",tt:"Trinidad & Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tc:"Turks & Caicos Islands",tv:"Tuvalu",um:"U.S. Outlying Islands",vi:"U.S. Virgin Islands",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom",us:"United States",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",va:"Vatican City",ve:"Venezuela",vn:"Vietnam",wf:"Wallis & Futuna",eh:"Western Sahara",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe",selectedCountryAriaLabel:"Selected country",noCountrySelected:"No country selected",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},Hl=0,Vl={allowDropdown:!0,autoPlaceholder:"polite",countrySearch:!0,containerClass:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:[],showFlags:!0,showSelectedDialCode:!1,strictMode:!1,useFullscreenPopup:typeof navigator<"u"&&typeof window<"u"&&(/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500),utilsScript:""},Gl=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],Fl=e=>e.replace(/\D/g,""),jl=(e="")=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),Ul=e=>{let t=Fl(e);if("1"===t.charAt(0)){let e=t.substr(1,3);return-1!==Gl.indexOf(e)}return!1},ql=(e,t)=>e.name<t.name?-1:e.name>t.name?1:0,Wl=(e,t,n)=>{let r=document.createElement(e);return t&&Object.entries(t).forEach((([e,t])=>r.setAttribute(e,t))),n&&n.appendChild(r),r},zl=e=>{let{instances:t}=window.intlTelInputGlobals;Object.values(t).forEach((t=>t[e]()))};if("object"==typeof window){let e={defaults:Vl,documentReady:()=>"complete"===document.readyState,getCountryData:()=>kl,getInstance:t=>{let n=t.getAttribute("data-intl-tel-input-id");return n?e.instances[n]:null},instances:{},loadUtils:e=>window.intlTelInputUtils||window.intlTelInputGlobals.startedLoadingUtilsScript?null:(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,new Promise(((t,n)=>((e,t,n)=>{let r=document.createElement("script");r.onload=()=>{zl("handleUtils"),t&&t()},r.onerror=()=>{zl("rejectUtilsScriptPromise"),n&&n()},r.className="iti-load-utils",r.async=!0,r.src=e,document.body.appendChild(r)})(e,t,n)))),version:"21.2.4"};window.intlTelInputGlobals=e}var Zl=(e,t)=>{let n=new class{id;promise;telInput;activeItem;highlightedItem;options;hadInitialPlaceholder;isRTL;selectedCountryData;countries;dialCodeMaxLen;dialCodeToIso2Map;dialCodes;preferredCountries;countryContainer;selectedCountry;selectedCountryInner;selectedCountryA11yText;selectedDialCode;dropdownArrow;dropdownContent;searchInput;searchResultsA11yText;countryList;dropdown;hiddenInput;hiddenInputCountry;maxCoreNumberLength;defaultCountry;_handleHiddenInputSubmit;_handleLabelClick;_handleClickSelectedCountry;_handleCountryContainerKeydown;_handleInputEvent;_handleKeydownEvent;_handleWindowScroll;_handleMouseoverCountryList;_handleClickCountryList;_handleClickOffToClose;_handleKeydownOnDropdown;_handleSearchChange;resolveAutoCountryPromise;rejectAutoCountryPromise;resolveUtilsScriptPromise;rejectUtilsScriptPromise;constructor(e,t={}){this.id=Hl++,this.telInput=e,this.activeItem=null,this.highlightedItem=null,this.options=Object.assign({},Vl,t),this.hadInitialPlaceholder=!!e.getAttribute("placeholder")}_init(){this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.countrySearch&&!this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!0);let e=this.options.allowDropdown&&!this.options.showSelectedDialCode;!this.options.showFlags&&e&&(this.options.showFlags=!0),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.i18n={...Ml,...this.options.i18n};let t=new Promise(((e,t)=>{this.resolveAutoCountryPromise=e,this.rejectAutoCountryPromise=t})),n=new Promise(((e,t)=>{this.resolveUtilsScriptPromise=e,this.rejectUtilsScriptPromise=t}));this.promise=Promise.all([t,n]),this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){this._processAllCountries(),this._processDialCodes(),this._processPreferredCountries(),this._translateCountryNames(),(this.options.onlyCountries.length||this.options.i18n)&&this.countries.sort(ql)}_addToDialCodeMap(e,t,n){t.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=t.length),this.dialCodeToIso2Map.hasOwnProperty(t)||(this.dialCodeToIso2Map[t]=[]);for(let n=0;n<this.dialCodeToIso2Map[t].length;n++)if(this.dialCodeToIso2Map[t][n]===e)return;let r=void 0!==n?n:this.dialCodeToIso2Map[t].length;this.dialCodeToIso2Map[t][r]=e}_processAllCountries(){let{onlyCountries:e,excludeCountries:t}=this.options;if(e.length){let t=e.map((e=>e.toLowerCase()));this.countries=kl.filter((e=>t.indexOf(e.iso2)>-1))}else if(t.length){let e=t.map((e=>e.toLowerCase()));this.countries=kl.filter((t=>-1===e.indexOf(t.iso2)))}else this.countries=kl}_translateCountryNames(){for(let e=0;e<this.countries.length;e++){let t=this.countries[e].iso2.toLowerCase();this.options.i18n.hasOwnProperty(t)&&(this.countries[e].name=this.options.i18n[t])}}_processDialCodes(){this.dialCodes={},this.dialCodeMaxLen=0,this.dialCodeToIso2Map={};for(let e=0;e<this.countries.length;e++){let t=this.countries[e];this.dialCodes[t.dialCode]||(this.dialCodes[t.dialCode]=!0),this._addToDialCodeMap(t.iso2,t.dialCode,t.priority)}for(let e=0;e<this.countries.length;e++){let t=this.countries[e];if(t.areaCodes){let e=this.dialCodeToIso2Map[t.dialCode][0];for(let n=0;n<t.areaCodes.length;n++){let r=t.areaCodes[n];for(let n=1;n<r.length;n++){let i=t.dialCode+r.substr(0,n);this._addToDialCodeMap(e,i),this._addToDialCodeMap(t.iso2,i)}this._addToDialCodeMap(t.iso2,t.dialCode+r)}}}}_processPreferredCountries(){this.preferredCountries=[];for(let e=0;e<this.options.preferredCountries.length;e++){let t=this.options.preferredCountries[e].toLowerCase(),n=this._getCountryData(t,!0);n&&this.preferredCountries.push(n)}}_generateMarkup(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&(!this.telInput.form||!this.telInput.form.hasAttribute("autocomplete"))&&this.telInput.setAttribute("autocomplete","off");let{allowDropdown:e,showSelectedDialCode:t,showFlags:n,containerClass:r,hiddenInput:i,dropdownContainer:o,fixDropdownWidth:a,useFullscreenPopup:l,countrySearch:s,i18n:c}=this.options,u="iti";e&&(u+=" iti--allow-dropdown"),t&&(u+=" iti--show-selected-dial-code"),n&&(u+=" iti--show-flags"),r&&(u+=` ${r}`),l||(u+=" iti--inline-dropdown");let d=Wl("div",{class:u});if(this.telInput.parentNode?.insertBefore(d,this.telInput),(n||t)&&(this.countryContainer=Wl("div",{class:"iti__country-container"},d),this.selectedCountry=Wl("button",{type:"button",class:"iti__selected-country",...e&&{"aria-expanded":"false","aria-label":this.options.i18n.selectedCountryAriaLabel,"aria-haspopup":s?"true":"listbox","aria-controls":s?`iti-${this.id}__dropdown-content`:`iti-${this.id}__country-listbox`,...s?{role:"combobox"}:{}}},this.countryContainer),this.selectedCountryInner=Wl("div",null,this.selectedCountry),this.selectedCountryA11yText=Wl("span",{class:"iti__a11y-text"},this.selectedCountryInner)),d.appendChild(this.telInput),this.selectedCountry&&this.telInput.disabled&&this.selectedCountry.setAttribute("aria-disabled","true"),t&&(this.selectedDialCode=Wl("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e){this.telInput.disabled||this.selectedCountry.setAttribute("tabindex","0"),this.dropdownArrow=Wl("div",{class:"iti__arrow","aria-hidden":"true"},this.selectedCountry);let e=a?"":"iti--flexible-dropdown-width";if(this.dropdownContent=Wl("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${e}`}),s&&(this.searchInput=Wl("input",{type:"text",class:"iti__search-input",placeholder:c.searchPlaceholder,role:"combobox","aria-expanded":"true","aria-label":c.searchPlaceholder,"aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},this.dropdownContent),this.searchResultsA11yText=Wl("span",{class:"iti__a11y-text"},this.dropdownContent)),this.countryList=Wl("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":c.countryListAriaLabel},this.dropdownContent),this.preferredCountries.length&&!s&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),Wl("li",{class:"iti__divider","aria-hidden":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),s&&this._updateSearchResultsText(),o){let e="iti iti--container";e+=l?" iti--fullscreen-popup":" iti--inline-dropdown",s&&(e+=" iti--country-search"),this.dropdown=Wl("div",{class:e}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}if(i){let e=i(this.telInput.getAttribute("name")||"");e.phone&&(this.hiddenInput=Wl("input",{type:"hidden",name:e.phone}),d.appendChild(this.hiddenInput)),e.country&&(this.hiddenInputCountry=Wl("input",{type:"hidden",name:e.country}),d.appendChild(this.hiddenInputCountry))}}_appendListItems(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],o=n?"-preferred":"",a=Wl("li",{id:`iti-${this.id}__item-${i.iso2}${o}`,class:`iti__country ${t}`,tabindex:"-1",role:"option","data-dial-code":i.dialCode,"data-country-code":i.iso2,"aria-selected":"false"},this.countryList);i.nodeById[this.id]=a;let l="";this.options.showFlags&&(l+=`<div class='iti__flag-box'><div class='iti__flag iti__${i.iso2}'></div></div>`),l+=`<span class='iti__country-name'>${i.name}</span>`,l+=`<span class='iti__dial-code'>+${i.dialCode}</span>`,a.insertAdjacentHTML("beforeend",l)}}_setInitialState(e=!1){let t=this.telInput.getAttribute("value"),n=this.telInput.value,r=!t||"+"!==t.charAt(0)||n&&"+"===n.charAt(0)?n:t,i=this._getDialCode(r),o=Ul(r),{initialCountry:a}=this.options;if(i&&!o)this._updateCountryFromNumber(r);else if("auto"!==a||e){let e=a?a.toLowerCase():"";e&&this._getCountryData(e,!0)?this._setCountry(e):i&&o?this._setCountry("us"):this._setCountry()}r&&this._updateValFromNumber(r)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.hiddenInput||this.hiddenInputCountry)&&this.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){this._handleHiddenInputSubmit=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.telInput.form?.addEventListener("submit",this._handleHiddenInputSubmit)}_initDropdownListeners(){this._handleLabelClick=e=>{this.dropdownContent.classList.contains("iti__hide")?this.telInput.focus():e.preventDefault()};let e=this.telInput.closest("label");e&&e.addEventListener("click",this._handleLabelClick),this._handleClickSelectedCountry=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.telInput.disabled&&!this.telInput.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._handleClickSelectedCountry),this._handleCountryContainerKeydown=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._openDropdown()),"Tab"===e.key&&this._closeDropdown()},this.countryContainer.addEventListener("keydown",this._handleCountryContainerKeydown)}_initRequests(){this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(()=>{window.intlTelInputGlobals.loadUtils(this.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"!==this.options.initialCountry||this.selectedCountryData.iso2?this.resolveAutoCountryPromise():this._loadAutoCountry()}_loadAutoCountry(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(((e="")=>{let t=e.toLowerCase();t&&this._getCountryData(t,!0)?(window.intlTelInputGlobals.autoCountry=t,setTimeout((()=>zl("handleAutoCountry")))):(this._setInitialState(!0),zl("rejectAutoCountryPromise"))}),(()=>{this._setInitialState(!0),zl("rejectAutoCountryPromise")})))}_initTelInputListeners(){let{strictMode:e,formatAsYouType:t}=this.options,n=!1;this._handleInputEvent=r=>{this._updateCountryFromNumber(this.telInput.value)&&this._triggerCountryChange();let i=r&&r.data&&/[^+0-9]/.test(r.data),o=r&&"insertFromPaste"===r.inputType&&this.telInput.value;if(i||o&&!e?n=!0:/[^+0-9]/.test(this.telInput.value)||(n=!1),t&&!n){let e=this.telInput.selectionStart||0,t=this.telInput.value.substring(0,e).replace(/[^+0-9]/g,"").length,n=r&&"deleteContentForward"===r.inputType,i=this._formatNumberAsYouType(),o=((e,t,n,r)=>{if(0===n&&!r)return 0;let i=0;for(let n=0;n<t.length;n++){if(/[+0-9]/.test(t[n])&&i++,i===e&&!r)return n+1;if(r&&i===e+1)return n}return t.length})(t,i,e,n);this.telInput.value=i,this.telInput.setSelectionRange(o,o)}},this.telInput.addEventListener("input",this._handleInputEvent),e&&(this._handleKeydownEvent=e=>{if(1===e.key.length&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=0===this.telInput.selectionStart&&"+"===e.key,n=/^[0-9]$/.test(e.key),r=t||n,i=this._getFullNumber(),o=window.intlTelInputUtils.getCoreNumber(i,this.selectedCountryData.iso2),a=this.maxCoreNumberLength&&o.length>=this.maxCoreNumberLength;(!r||a)&&e.preventDefault()}},this.telInput.addEventListener("keydown",this._handleKeydownEvent))}_cap(e){let t=parseInt(this.telInput.getAttribute("maxlength")||"",10);return t&&e.length>t?e.substr(0,t):e}_trigger(e){let t=new Event(e,{bubbles:!0,cancelable:!0});this.telInput.dispatchEvent(t)}_openDropdown(){let{fixDropdownWidth:e,countrySearch:t}=this.options;if(e&&(this.dropdownContent.style.width=`${this.telInput.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&!t)this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0);else{let e=this.countryList.firstElementChild;e&&(this._highlightListItem(e,!1),this.countryList.scrollTop=0),t&&this.searchInput.focus()}this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){let e=this.telInput.getBoundingClientRect(),t=document.documentElement.scrollTop,n=e.top+t,r=this.telInput.offsetHeight,i=this.dropdownContent.offsetHeight,o=n+r+i<t+window.innerHeight,a=n-i>t,l=!this.options.countrySearch&&!o&&a;if(((e,t,n)=>{n&&!e.classList.contains(t)?e.classList.add(t):!n&&e.classList.contains(t)&&e.classList.remove(t)})(this.dropdownContent,"iti__dropdown-content--dropup",l),this.options.dropdownContainer){let t=l?0:r;this.dropdown.style.top=`${e.top+t}px`,this.dropdown.style.left=`${e.left}px`,this._handleWindowScroll=()=>this._closeDropdown(),window.addEventListener("scroll",this._handleWindowScroll)}}}_bindDropdownListeners(){this._handleMouseoverCountryList=e=>{let t=e.target?.closest(".iti__country");t&&this._highlightListItem(t,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=e=>{let t=e.target?.closest(".iti__country");t&&this._selectListItem(t)},this.countryList.addEventListener("click",this._handleClickCountryList);let e=!0;this._handleClickOffToClose=()=>{e||this._closeDropdown(),e=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);let t="",n=null;if(this._handleKeydownOnDropdown=e=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),"ArrowUp"===e.key||"ArrowDown"===e.key?this._handleUpDownKey(e.key):"Enter"===e.key?this._handleEnterKey():"Escape"===e.key&&this._closeDropdown()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)&&(e.stopPropagation(),n&&clearTimeout(n),t+=e.key.toLowerCase(),this._searchForCountry(t),n=setTimeout((()=>{t=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){let e=()=>{let e=this.searchInput.value.trim();e?this._filterCountries(e):this._filterCountries("",!0)},t=null;this._handleSearchChange=()=>{t&&clearTimeout(t),t=setTimeout((()=>{e(),t=null}),100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",(e=>e.stopPropagation()))}}_filterCountries(e,t=!1){let n=!0;this.countryList.innerHTML="";let r=jl(e);for(let e=0;e<this.countries.length;e++){let i=this.countries[e],o=jl(i.name),a=`+${i.dialCode}`;if(t||o.includes(r)||a.includes(r)||i.iso2.includes(r)){let e=i.nodeById[this.id];e&&this.countryList.appendChild(e),n&&(this._highlightListItem(e,!1),n=!1)}}this.countryList.scrollTop=0,this._updateSearchResultsText()}_updateSearchResultsText(){let e,{i18n:t}=this.options,n=this.countryList.childElementCount;e=0===n?t.zeroSearchResults:1===n?t.oneSearchResult:t.multipleSearchResults.replace("${count}",n.toString()),this.searchResultsA11yText.textContent=e}_handleUpDownKey(e){let t="ArrowUp"===e?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;if(t?t.classList.contains("iti__divider")&&(t="ArrowUp"===e?t.previousElementSibling:t.nextElementSibling):this.countryList.childElementCount>1&&(t="ArrowUp"===e?this.countryList.lastElementChild:this.countryList.firstElementChild),t){this._scrollTo(t,!1);let e=!this.options.countrySearch;this._highlightListItem(t,e)}}_handleEnterKey(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}_searchForCountry(e){for(let t=0;t<this.countries.length;t++){let n=this.countries[t];if(n.name.substr(0,e.length).toLowerCase()===e){let e=n.nodeById[this.id];this._highlightListItem(e,!1),this._scrollTo(e,!0);break}}}_updateValFromNumber(e){let t=e;if(this.options.formatOnDisplay&&window.intlTelInputUtils&&this.selectedCountryData){let e=this.options.nationalMode||"+"!==t.charAt(0)&&!this.options.showSelectedDialCode,{NATIONAL:n,INTERNATIONAL:r}=window.intlTelInputUtils.numberFormat,i=e?n:r;t=window.intlTelInputUtils.formatNumber(t,this.selectedCountryData.iso2,i)}t=this._beforeSetNumber(t),this.telInput.value=t}_updateCountryFromNumber(e){let t=e.indexOf("+"),n=t?e.substring(t):e,r=this.selectedCountryData.dialCode;n&&"1"===r&&"+"!==n.charAt(0)&&("1"!==n.charAt(0)&&(n=`1${n}`),n=`+${n}`),this.options.showSelectedDialCode&&r&&"+"!==n.charAt(0)&&(n=`+${r}${n}`);let i=this._getDialCode(n,!0),o=Fl(n),a=null;if(i){let e=this.dialCodeToIso2Map[Fl(i)],t=-1!==e.indexOf(this.selectedCountryData.iso2)&&o.length<=i.length-1;if(!("1"===r&&Ul(o)||t))for(let t=0;t<e.length;t++)if(e[t]){a=e[t];break}}else"+"===n.charAt(0)&&o.length?a="":(!n||"+"===n)&&!this.selectedCountryData.iso2&&(a=this.defaultCountry);return null!==a&&this._setCountry(a)}_highlightListItem(e,t){let n=this.highlightedItem;n&&(n.classList.remove("iti__highlight"),n.setAttribute("aria-selected","false")),this.highlightedItem=e,this.highlightedItem.classList.add("iti__highlight"),this.highlightedItem.setAttribute("aria-selected","true"),this.selectedCountry.setAttribute("aria-activedescendant",e.getAttribute("id")||""),this.options.countrySearch&&this.searchInput.setAttribute("aria-activedescendant",e.getAttribute("id")||""),t&&this.highlightedItem.focus()}_getCountryData(e,t){for(let t=0;t<this.countries.length;t++)if(this.countries[t].iso2===e)return this.countries[t];if(t)return null;throw new Error(`No country data for '${e}'`)}_setCountry(e){let{allowDropdown:t,showSelectedDialCode:n,showFlags:r,countrySearch:i,i18n:o}=this.options,a=this.selectedCountryData.iso2?this.selectedCountryData:{};if(this.selectedCountryData=e&&this._getCountryData(e,!1)||{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedCountryInner){let t="",n="";e?r&&(t=`iti__flag iti__${e}`,n=`${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`):(t="iti__flag iti__globe",n=o.noCountrySelected),this.selectedCountryInner.className=t,this.selectedCountryA11yText.textContent=n}if(this._setSelectedCountryTitleAttribute(e,n),n){let e=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.selectedDialCode.innerHTML=e;let t=this.selectedCountry.offsetWidth||this._getHiddenSelectedCountryWidth();this.isRTL?this.telInput.style.paddingRight=`${t+6}px`:this.telInput.style.paddingLeft=`${t+6}px`}if(this._updatePlaceholder(),this._updateMaxLength(),t&&!i){let t=this.activeItem;if(t&&(t.classList.remove("iti__active"),t.setAttribute("aria-selected","false")),e){let t=this.countryList.querySelector(`#iti-${this.id}__item-${e}-preferred`)||this.countryList.querySelector(`#iti-${this.id}__item-${e}`);t&&(t.setAttribute("aria-selected","true"),t.classList.add("iti__active"),this.activeItem=t)}}return a.iso2!==e}_updateMaxLength(){if(this.options.strictMode&&window.intlTelInputUtils)if(this.selectedCountryData.iso2){let e=window.intlTelInputUtils.numberType[this.options.placeholderNumberType],t=window.intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,!1,e,!0),n=t;for(;window.intlTelInputUtils.isPossibleNumber(t,this.selectedCountryData.iso2);)n=t,t+="0";let r=window.intlTelInputUtils.getCoreNumber(n,this.selectedCountryData.iso2);this.maxCoreNumberLength=r.length}else this.maxCoreNumberLength=null}_setSelectedCountryTitleAttribute(e=null,t){if(!this.selectedCountry)return;let n;n=e&&!t?`${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`:e?this.selectedCountryData.name:"Unknown",this.selectedCountry.setAttribute("title",n)}_getHiddenSelectedCountryWidth(){if(this.telInput.parentNode){let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",document.body.appendChild(e);let t=this.countryContainer.cloneNode();e.appendChild(t);let n=this.selectedCountry.cloneNode(!0);t.appendChild(n);let r=n.offsetWidth;return document.body.removeChild(e),r}return 0}_updatePlaceholder(){let{autoPlaceholder:e,placeholderNumberType:t,nationalMode:n,customPlaceholder:r}=this.options,i="aggressive"===e||!this.hadInitialPlaceholder&&"polite"===e;if(window.intlTelInputUtils&&i){let e=window.intlTelInputUtils.numberType[t],i=this.selectedCountryData.iso2?window.intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,n,e):"";i=this._beforeSetNumber(i),"function"==typeof r&&(i=r(i,this.selectedCountryData)),this.telInput.setAttribute("placeholder",i)}}_selectListItem(e){let t=this._setCountry(e.getAttribute("data-country-code"));this._closeDropdown(),this._updateDialCode(e.getAttribute("data-dial-code")),this.telInput.focus(),t&&this._triggerCountryChange()}_closeDropdown(){this.dropdownContent.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.selectedCountry.removeAttribute("aria-activedescendant"),this.highlightedItem&&this.highlightedItem.setAttribute("aria-selected","false"),this.options.countrySearch&&this.searchInput.removeAttribute("aria-activedescendant"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.options.useFullscreenPopup||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._trigger("close:countrydropdown")}_scrollTo(e,t){let n=this.countryList,r=document.documentElement.scrollTop,i=n.offsetHeight,o=n.getBoundingClientRect().top+r,a=o+i,l=e.offsetHeight,s=e.getBoundingClientRect().top+r,c=s+l,u=s-o+n.scrollTop,d=i/2-l/2;if(s<o)t&&(u-=d),n.scrollTop=u;else if(c>a){t&&(u+=d);let e=i-l;n.scrollTop=u-e}}_updateDialCode(e){let t,n=this.telInput.value,r=`+${e}`;if("+"===n.charAt(0)){let e=this._getDialCode(n);t=e?n.replace(e,r):r,this.telInput.value=t}}_getDialCode(e,t){let n="";if("+"===e.charAt(0)){let r="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(!isNaN(parseInt(o,10))){if(r+=o,t)this.dialCodeToIso2Map[r]&&(n=e.substr(0,i+1));else if(this.dialCodes[r]){n=e.substr(0,i+1);break}if(r.length===this.dialCodeMaxLen)break}}}return n}_getFullNumber(){let e,t=this.telInput.value.trim(),{dialCode:n}=this.selectedCountryData,r=Fl(t);return e=this.options.showSelectedDialCode&&!this.options.nationalMode&&"+"!==t.charAt(0)&&n&&r?`+${n}`:"",e+t}_beforeSetNumber(e){let t=e;if(this.options.showSelectedDialCode){let e=this._getDialCode(t);if(e){e=`+${this.selectedCountryData.dialCode}`;let n=" "===t[e.length]||"-"===t[e.length]?e.length+1:e.length;t=t.substr(n)}}return this._cap(t)}_triggerCountryChange(){this._trigger("countrychange")}_formatNumberAsYouType(){let e=this._getFullNumber(),t=window.intlTelInputUtils?window.intlTelInputUtils.formatNumberAsYouType(e,this.selectedCountryData.iso2):e,{dialCode:n}=this.selectedCountryData;return this.options.showSelectedDialCode&&!this.options.nationalMode&&"+"!==this.telInput.value.charAt(0)&&t.includes(`+${n}`)?(t.split(`+${n}`)[1]||"").trim():t}handleAutoCountry(){"auto"===this.options.initialCountry&&window.intlTelInputGlobals.autoCountry&&(this.defaultCountry=window.intlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}handleUtils(){window.intlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())),this.resolveUtilsScriptPromise()}destroy(){if(this.options.allowDropdown){this._closeDropdown(),this.selectedCountry.removeEventListener("click",this._handleClickSelectedCountry),this.countryContainer.removeEventListener("keydown",this._handleCountryContainerKeydown);let e=this.telInput.closest("label");e&&e.removeEventListener("click",this._handleLabelClick)}let{form:e}=this.telInput;this._handleHiddenInputSubmit&&e&&e.removeEventListener("submit",this._handleHiddenInputSubmit),this.telInput.removeEventListener("input",this._handleInputEvent),this._handleKeydownEvent&&this.telInput.removeEventListener("keydown",this._handleKeydownEvent),this.telInput.removeAttribute("data-intl-tel-input-id");let t=this.telInput.parentNode;t?.parentNode?.insertBefore(this.telInput,t),t?.parentNode?.removeChild(t),delete window.intlTelInputGlobals.instances[this.id]}getExtension(){return window.intlTelInputUtils?window.intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber(e){if(window.intlTelInputUtils){let{iso2:t}=this.selectedCountryData;return window.intlTelInputUtils.formatNumber(this._getFullNumber(),t,e)}return""}getNumberType(){return window.intlTelInputUtils?window.intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(window.intlTelInputUtils){let{iso2:e}=this.selectedCountryData;return window.intlTelInputUtils.getValidationError(this._getFullNumber(),e)}return-99}isValidNumber(e=!0){let t=this._getFullNumber();return!/\p{L}/u.test(t)&&(window.intlTelInputUtils?window.intlTelInputUtils.isPossibleNumber(t,this.selectedCountryData.iso2,e):null)}isValidNumberPrecise(){let e=this._getFullNumber();return!/\p{L}/u.test(e)&&(window.intlTelInputUtils?window.intlTelInputUtils.isValidNumber(e,this.selectedCountryData.iso2):null)}setCountry(e){let t=e.toLowerCase();this.selectedCountryData.iso2!==t&&(this._setCountry(t),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}setNumber(e){let t=this._updateCountryFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}setPlaceholderNumberType(e){this.options.placeholderNumberType=e,this._updatePlaceholder()}}(e,t);return n._init(),e.setAttribute("data-intl-tel-input-id",n.id.toString()),window.intlTelInputGlobals.instances[n.id]=n,n},$l=({initialValue:n="",onChangeNumber:r=(()=>{}),onChangeCountry:i=(()=>{}),onChangeValidity:o=(()=>{}),onChangeErrorCode:a=(()=>{}),usePreciseValidation:l=!1,initOptions:s={},inputProps:c={}})=>{let u=(0,e.useRef)(null),d=(0,e.useRef)(null),p=()=>{let e=d.current?.getNumber()||"",t=d.current?.getSelectedCountryData().iso2||"";if(r(e),i(t),d.current)if(l?d.current.isValidNumberPrecise():d.current.isValidNumber())o(!0),a(null);else{let e=d.current.getValidationError();o(!1),a(e)}};return(0,e.useEffect)((()=>{let e=u.current;return e&&(d.current=Zl(e,s),e.addEventListener("countrychange",p)),()=>{e&&e.removeEventListener("countrychange",p),d.current?.destroy()}}),[]),t().createElement("input",{type:"tel",ref:u,onInput:p,defaultValue:n,...c})};const Kl={...x,title:(0,o.__)("Donor Phone","give"),description:(0,o.__)("Donors can input their phone number","give"),supports:{multiple:!1},attributes:{...x.attributes,label:{default:(0,o.__)("Phone Number","give")},required:{type:"boolean",source:"attribute",default:!1}},icon:()=>(0,e.createElement)(i,{icon:(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0554 21.8806C12.8621 20.9743 9.84919 19.2639 7.33755 16.7523C4.82592 14.2406 3.11557 11.2277 2.20923 8.03448C2.20386 8.01555 2.19853 7.99679 2.19324 7.97817C2.04573 7.45916 1.93134 7.05669 1.9297 6.50479C1.92782 5.87402 2.13333 5.08378 2.44226 4.53384C2.97354 3.58807 4.11431 2.37601 5.09963 1.87764C5.95097 1.44704 6.95637 1.44704 7.80771 1.87764C8.64995 2.30364 9.58794 3.2572 10.1109 4.06146C10.7573 5.0558 10.7573 6.33767 10.1109 7.33201C9.93761 7.59846 9.69068 7.84497 9.40402 8.13114C9.31476 8.22025 9.21651 8.28464 9.28176 8.42053C9.92958 9.76981 10.8131 11.0354 11.9337 12.1561C13.0544 13.2768 14.32 14.1603 15.6693 14.8081C15.81 14.8756 15.8654 14.7792 15.9587 14.6858C16.2449 14.3991 16.4914 14.1522 16.7578 13.979C17.7522 13.3325 19.034 13.3325 20.0284 13.979C20.8111 14.4879 21.7895 15.4465 22.2122 16.2821C22.6428 17.1335 22.6428 18.1389 22.2122 18.9902C21.7138 19.9755 20.5018 21.1163 19.556 21.6476C19.0061 21.9565 18.2158 22.162 17.585 22.1601C17.0331 22.1585 16.6307 22.0441 16.1117 21.8966C16.0931 21.8913 16.0743 21.886 16.0554 21.8806Z",fill:"currentColor"}))}),edit:function({attributes:{label:t,required:n},setAttributes:r}){const{intlTelInputSettings:i}=c();return(0,e.useEffect)((()=>{const e=setTimeout((()=>{document.querySelectorAll(".iti__tel-input").forEach((function(e){const t=document.querySelector(".iti__country-container").offsetWidth;e.style.paddingLeft=String(t+4)+"px"}))}),100);return()=>{clearInterval(e)}}),[]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:A()({"give-is-required":n})},(0,e.createElement)(l.BaseControl,{id:"give-form-builder-phone-label",label:t},(0,e.createElement)($l,{initOptions:{initialCountry:i.initialCountry,showSelectedDialCode:i.showSelectedDialCode,strictMode:i.strictMode,i18n:i.i18n,useFullscreenPopup:i.useFullscreenPopup,utilsScript:i.utilsScriptUrl}}))),(0,e.createElement)(a.InspectorControls,null,(0,e.createElement)(l.PanelBody,{title:(0,o.__)("Field Settings","give"),initialOpen:!0},(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.TextControl,{label:(0,o.__)("Label"),value:t,onChange:e=>r({label:e})})),(0,e.createElement)(l.PanelRow,null,(0,e.createElement)(l.ToggleControl,{label:(0,o.__)("Required","give"),checked:n,onChange:e=>r({required:e})})))))}},Yl=[T,O,ta,na,{name:"givewp/donor-phone",settings:Kl},oa,la,ja,Wa,$a,Il,Al,Ol];window.givewp||(window.givewp={form:{}}),window.givewp.form.blocks=new class{blocks=[];get(e){return this.blocks.find((({name:t})=>t===e))}getAll(){return this.blocks}register(e,t){if(this.get(e))throw new Error(`Block "${e}" is already registered.`);this.blocks.push({name:e,settings:t})}},[...g,...m,...Yl].forEach((({name:e,settings:t})=>{u().register(e,t)}))})()})();