(()=>{"use strict";const e=wp.i18n,t=wp.hooks,n=wp.components;function r(e){return r="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},r(e)}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}(0,t.addFilter)("rank_math_block_howto_data","rank-math-pro",(function(t,r){var a=r.attributes,o=r.setAttributes;return wp.element.createElement(React.Fragment,null,a.hasOwnProperty("estimatedCost")&&wp.element.createElement("div",{className:"rank-math-howto-estimated-cost"},wp.element.createElement(n.TextControl,{label:(0,e.__)("Estimated Cost","rank-math-pro"),className:"rank-math-block-text",value:a.estimatedCostCurrency,placeholder:(0,e.__)("USD","rank-math-pro"),onChange:function(e){o({estimatedCostCurrency:e})}}),wp.element.createElement(n.TextControl,{type:"number",className:"rank-math-block-text",value:a.estimatedCost,placeholder:(0,e.__)("Estimated Cost","rank-math-pro"),onChange:function(e){o({estimatedCost:e})}})),a.hasOwnProperty("supply")&&wp.element.createElement(n.TextareaControl,{label:(0,e.__)("Supply","rank-math-pro"),className:"rank-math-block-textarea",help:(0,e.__)("Add one supply element per line.","rank-math-pro"),value:a.supply,onChange:function(e){o({supply:e})}}),a.hasOwnProperty("tools")&&wp.element.createElement(n.TextareaControl,{label:(0,e.__)("Tools","rank-math-pro"),className:"rank-math-block-textarea",help:(0,e.__)("Add one tool per line.","rank-math-pro"),value:a.tools,onChange:function(e){o({tools:e})}}),a.hasOwnProperty("material")&&wp.element.createElement(n.TextareaControl,{label:(0,e.__)("Material","rank-math-pro"),className:"rank-math-block-textarea",value:a.material,onChange:function(e){o({material:e})}}))}));var m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"questions";return function(){var r=t.setAttributes,l=t.index,m=o(t[n]);1===e&&l<m.length-1&&(m[l]=t[n][l+e],m[l+e]=t[n][l],r(a({},n,m))),-1===e&&l>0&&(m[l]=t[n][l+e],m[l+e]=t[n][l],r(a({},n,m)))}};(0,t.addFilter)("rank_math_block_faq_actions","rank-math-pro",(function(t,r){var a=r.questions,o=r.index;if(!(a.length<2))return wp.element.createElement(React.Fragment,null,wp.element.createElement(n.Button,{icon:"arrow-up",className:0===o?"rank-math-item-move move-up rank-math-item-disabled":"rank-math-item-move move-up",title:(0,e.__)("Move up","rank-math-pro"),onClick:m(-1,r)}),wp.element.createElement(n.Button,{icon:"arrow-down",className:o===a.length-1?"rank-math-item-move move-down rank-math-item-disabled ":"rank-math-item-move move-down",onClick:m(1,r),title:(0,e.__)("Move down","rank-math-pro")}))})),(0,t.addFilter)("rank_math_block_howto_actions","rank-math-pro",(function(t,r){var a=r.steps,o=r.index;if(!(a.length<2))return wp.element.createElement(React.Fragment,null,wp.element.createElement(n.Button,{icon:"arrow-up",className:0===o?"rank-math-item-move move-up rank-math-item-disabled":"rank-math-item-move move-up",title:(0,e.__)("Move up","rank-math-pro"),onClick:m(-1,r,"steps")}),wp.element.createElement(n.Button,{icon:"arrow-down",className:o===a.length-1?"rank-math-item-move move-down rank-math-item-disabled ":"rank-math-item-move move-down",onClick:m(1,r,"steps"),title:(0,e.__)("Move down","rank-math-pro")}))}))})();