(()=>{"use strict";var t={n:i=>{var e=i&&i.__esModule?()=>i.default:()=>i;return t.d(e,{a:e}),e},d:(i,e)=>{for(var s in e)t.o(e,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:e[s]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{default:()=>o});const e=window.AFFWP.portal.portalForm;var s=t.n(e);const o=function(){const t=s()();return{...t,...{sectionId:"custom-affiliate-slugs-settings",originalSlug:"",showConfirmField(){const t=this.getField("custom-affiliate-slug-setting");return!1!==t&&this.originalSlug!==t.value&&""!==t.value},async resetConfirmations(){this.updateFieldValue("custom-affiliate-slug-confirm-delete",!1),this.updateFieldValue("custom-affiliate-slug-confirm",""),this.isValidating=!0,this.removeErrors(["custom-affiliate-slug-confirm","custom-affiliate-slug-confirm-delete"]),await Promise.all([this.validateControl("custom-affiliate-slug-confirm"),this.validateControl("custom-affiliate-slug-confirm-delete")]),this.isValidating=!1},async validateControl(i){const e=t.validateControl.bind(this);"custom-affiliate-slug-setting"===i&&await this.resetConfirmations(),e(i)},showConfirmDeleteField(){if(!0===this.isLoading)return!1;const t=this.getField("custom-affiliate-slug-setting");return!1!==t&&""!==this.originalSlug&&""===t.value},async submitForm(){const i=t.submitForm.bind(this);await i(),this.resetConfirmations(),this.resetSlug()},resetSlug(){const t=this.getField("custom-affiliate-slug-setting");!1!==t&&(this.originalSlug=t.value)},async init(){const i=t.init.bind(this);await i(),this.resetSlug()}}}};((window.AFFWP=window.AFFWP||{}).portal=window.AFFWP.portal||{}).casSettings=i})();