HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/zenoxpressjobs.com/wp-content/plugins/popup-builder-block/build/blocks/form/index.js
(()=>{var e,t={246:(e,t,o)=>{"use strict";function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){a(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function l(e){return l="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},l(e)}function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(this,arguments)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function c(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}o.r(t),o.d(t,{MultiDrag:()=>_t,Sortable:()=>Fe,Swap:()=>ct,default:()=>Ct});var p=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=c(/Edge/i),d=c(/firefox/i),b=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),h=c(/iP(ad|od|hone)/i),g=c(/chrome/i)&&c(/android/i),f={capture:!1,passive:!1};function m(e,t,o){e.addEventListener(t,o,!p&&f)}function v(e,t,o){e.removeEventListener(t,o,!p&&f)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function _(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function x(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&y(e,t):y(e,t))||n&&e===o)return e;if(e===o)break}while(e=_(e))}return null}var w,C=/\s+/g;function j(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(C," ")}}function k(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function S(e,t){var o="";if("string"==typeof e)o=e;else do{var n=k(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function M(e,t,o){if(e){var n=e.getElementsByTagName(t),i=0,l=n.length;if(o)for(;i<l;i++)o(n[i],i);return n}return[]}function B(){return document.scrollingElement||document.documentElement}function D(e,t,o,n,i){if(e.getBoundingClientRect||e===window){var l,a,r,s,c,u,d;if(e!==window&&e.parentNode&&e!==B()?(a=(l=e.getBoundingClientRect()).top,r=l.left,s=l.bottom,c=l.right,u=l.height,d=l.width):(a=0,r=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||o)&&e!==window&&(i=i||e.parentNode,!p))do{if(i&&i.getBoundingClientRect&&("none"!==k(i,"transform")||o&&"static"!==k(i,"position"))){var b=i.getBoundingClientRect();a-=b.top+parseInt(k(i,"border-top-width")),r-=b.left+parseInt(k(i,"border-left-width")),s=a+l.height,c=r+l.width;break}}while(i=i.parentNode);if(n&&e!==window){var h=S(i||e),g=h&&h.a,f=h&&h.d;h&&(s=(a/=f)+(u/=f),c=(r/=g)+(d/=g))}return{top:a,left:r,bottom:s,right:c,width:d,height:u}}}function E(e,t,o){for(var n=I(e,!0),i=D(e)[t];n;){var l=D(n)[o];if(!("top"===o||"left"===o?i>=l:i<=l))return n;if(n===B())break;n=I(n,!1)}return!1}function P(e,t,o,n){for(var i=0,l=0,a=e.children;l<a.length;){if("none"!==a[l].style.display&&a[l]!==Fe.ghost&&(n||a[l]!==Fe.dragged)&&x(a[l],o.draggable,e,!1)){if(i===t)return a[l];i++}l++}return null}function T(e,t){for(var o=e.lastElementChild;o&&(o===Fe.ghost||"none"===k(o,"display")||t&&!y(o,t));)o=o.previousElementSibling;return o||null}function O(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Fe.clone||t&&!y(e,t)||o++;return o}function A(e){var t=0,o=0,n=B();if(e)do{var i=S(e),l=i.a,a=i.d;t+=e.scrollLeft*l,o+=e.scrollTop*a}while(e!==n&&(e=e.parentNode));return[t,o]}function I(e,t){if(!e||!e.getBoundingClientRect)return B();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=k(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return B();if(n||t)return o;n=!0}}}while(o=o.parentNode);return B()}function N(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function R(e,t){return function(){if(!w){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),w=setTimeout((function(){w=void 0}),t)}}}function L(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function H(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function $(e,t){k(e,"position","absolute"),k(e,"top",t.top),k(e,"left",t.left),k(e,"width",t.width),k(e,"height",t.height)}function F(e){k(e,"position",""),k(e,"top",""),k(e,"left",""),k(e,"width",""),k(e,"height","")}function z(e,t,o){var n={};return Array.from(e.children).forEach((function(i){var l,a,r,s;if(x(i,t.draggable,e,!1)&&!i.animated&&i!==o){var c=D(i);n.left=Math.min(null!==(l=n.left)&&void 0!==l?l:1/0,c.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,c.top),n.right=Math.max(null!==(r=n.right)&&void 0!==r?r:-1/0,c.right),n.bottom=Math.max(null!==(s=n.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var G="Sortable"+(new Date).getTime();var V=[],W={initializeByDefault:!0},U={mount:function(e){for(var t in W)W.hasOwnProperty(t)&&!(t in e)&&(e[t]=W[t]);V.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),V.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var l=e+"Global";V.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][l]&&t[n.pluginName][l](i({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](i({sortable:t},o)))}))},initializePlugins:function(e,t,o,n){for(var i in V.forEach((function(n){var i=n.pluginName;if(e.options[i]||n.initializeByDefault){var l=new n(e,t,e.options);l.sortable=e,l.options=e.options,e[i]=l,r(o,l.defaults)}})),e.options)if(e.options.hasOwnProperty(i)){var l=this.modifyOption(e,i,e.options[i]);void 0!==l&&(e.options[i]=l)}},getEventProperties:function(e,t){var o={};return V.forEach((function(n){"function"==typeof n.eventProperties&&r(o,n.eventProperties.call(t[n.pluginName],e))})),o},modifyOption:function(e,t,o){var n;return V.forEach((function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(n=i.optionListeners[t].call(e[i.pluginName],o))})),n}};function X(e){var t=e.sortable,o=e.rootEl,n=e.name,l=e.targetEl,a=e.cloneEl,r=e.toEl,s=e.fromEl,c=e.oldIndex,d=e.newIndex,b=e.oldDraggableIndex,h=e.newDraggableIndex,g=e.originalEvent,f=e.putSortable,m=e.extraEventProperties;if(t=t||o&&o[G]){var v,y=t.options,_="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||p||u?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=r||o,v.from=s||o,v.item=l||o,v.clone=a,v.oldIndex=c,v.newIndex=d,v.oldDraggableIndex=b,v.newDraggableIndex=h,v.originalEvent=g,v.pullMode=f?f.lastPutMode:void 0;var x=i(i({},m),U.getEventProperties(n,t));for(var w in x)v[w]=x[w];o&&o.dispatchEvent(v),y[_]&&y[_].call(t,v)}}var Y=["evt"],K=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,l=function(e,t){if(null==e)return{};var o,n,i=function(e,t){if(null==e)return{};var o,n,i={},l=Object.keys(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||(i[o]=e[o]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}(o,Y);U.pluginEvent.bind(Fe)(e,t,i({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:oe,cloneEl:ne,cloneHidden:ie,dragStarted:me,putSortable:pe,activeSortable:Fe.active,originalEvent:n,oldIndex:le,oldDraggableIndex:re,newIndex:ae,newDraggableIndex:se,hideGhostForTarget:Re,unhideGhostForTarget:Le,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){q({sortable:t,name:e,originalEvent:n})}},l))};function q(e){X(i({putSortable:pe,cloneEl:ne,targetEl:Z,rootEl:ee,oldIndex:le,oldDraggableIndex:re,newIndex:ae,newDraggableIndex:se},e))}var Z,J,Q,ee,te,oe,ne,ie,le,ae,re,se,ce,pe,ue,de,be,he,ge,fe,me,ve,ye,_e,xe,we=!1,Ce=!1,je=[],ke=!1,Se=!1,Me=[],Be=!1,De=[],Ee="undefined"!=typeof document,Pe=h,Te=u||p?"cssFloat":"float",Oe=Ee&&!g&&!h&&"draggable"in document.createElement("div"),Ae=function(){if(Ee){if(p)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ie=function(e,t){var o=k(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=P(e,0,t),l=P(e,1,t),a=i&&k(i),r=l&&k(l),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+D(i).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+D(l).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var p="left"===a.float?"left":"right";return!l||"both"!==r.clear&&r.clear!==p?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=n&&"none"===o[Te]||l&&"none"===o[Te]&&s+c>n)?"vertical":"horizontal"},Ne=function(e){function t(e,o){return function(n,i,l,a){var r=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==e&&(o||r))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,i,l,a),o)(n,i,l,a);var s=(o?n:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},n=e.group;n&&"object"==l(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},Re=function(){!Ae&&Q&&k(Q,"display","none")},Le=function(){!Ae&&Q&&k(Q,"display","")};Ee&&!g&&document.addEventListener("click",(function(e){if(Ce)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ce=!1,!1}),!0);var He=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,l=e.clientY,je.some((function(e){var t=e[G].options.emptyInsertThreshold;if(t&&!T(e)){var o=D(e),n=i>=o.left-t&&i<=o.right+t,r=l>=o.top-t&&l<=o.bottom+t;return n&&r?a=e:void 0}})),a);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[G]._onDragOver(o)}}var i,l,a},$e=function(e){Z&&Z.parentNode[G]._isOutsideThisEl(e.target)};function Fe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r({},t),e[G]=this;var o,n,l={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ie(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Fe.supportPointer&&"PointerEvent"in window&&(!b||h),emptyInsertThreshold:5};for(var a in U.initializePlugins(this,e,l),l)!(a in t)&&(t[a]=l[a]);for(var s in Ne(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Oe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?m(e,"pointerdown",this._onTapStart):(m(e,"mousedown",this._onTapStart),m(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(e,"dragover",this),m(e,"dragenter",this)),je.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==k(e,"display")&&e!==Fe.ghost){n.push({target:e,rect:D(e)});var t=i({},n[n.length-1].rect);if(e.thisAnimationDuration){var o=S(e,!0);o&&(t.top-=o.f,t.left-=o.e)}e.fromRect=t}}))},addAnimationState:function(e){n.push(e)},removeAnimationState:function(e){n.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(n,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof e&&e());var i=!1,l=0;n.forEach((function(e){var o=0,n=e.target,a=n.fromRect,r=D(n),s=n.prevFromRect,c=n.prevToRect,p=e.rect,u=S(n,!0);u&&(r.top-=u.f,r.left-=u.e),n.toRect=r,n.thisAnimationDuration&&N(s,r)&&!N(a,r)&&(p.top-r.top)/(p.left-r.left)==(a.top-r.top)/(a.left-r.left)&&(o=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(p,s,c,t.options)),N(r,a)||(n.prevFromRect=a,n.prevToRect=r,o||(o=t.options.animation),t.animate(n,p,r,o)),o&&(i=!0,l=Math.max(l,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),o),n.thisAnimationDuration=o)})),clearTimeout(o),i?o=setTimeout((function(){"function"==typeof e&&e()}),l):"function"==typeof e&&e(),n=[]},animate:function(e,t,o,n){if(n){k(e,"transition",""),k(e,"transform","");var i=S(this.el),l=i&&i.a,a=i&&i.d,r=(t.left-o.left)/(l||1),s=(t.top-o.top)/(a||1);e.animatingX=!!r,e.animatingY=!!s,k(e,"transform","translate3d("+r+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}))}function ze(e,t,o,n,i,l,a,r){var s,c,d=e[G],b=d.options.onMove;return!window.CustomEvent||p||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=n,s.related=i||t,s.relatedRect=l||D(t),s.willInsertAfter=r,s.originalEvent=a,e.dispatchEvent(s),b&&(c=b.call(d,s,a)),c}function Ge(e){e.draggable=!1}function Ve(){Be=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Ue(e){return setTimeout(e,0)}function Xe(e){return clearTimeout(e)}Fe.prototype={constructor:Fe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ve=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,i=n.preventOnFilter,l=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,r=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||r,c=n.filter;if(function(e){De.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var n=t[o];n.checked&&De.push(n)}}(o),!Z&&!(/mousedown|pointerdown/.test(l)&&0!==e.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!b||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=x(r,n.draggable,o,!1))&&r.animated||oe===r)){if(le=O(r),re=O(r,n.draggable),"function"==typeof c){if(c.call(this,e,r,this))return q({sortable:t,rootEl:s,name:"filter",targetEl:r,toEl:o,fromEl:o}),K("filter",t,{evt:e}),void(i&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=x(s,n.trim(),o,!1))return q({sortable:t,rootEl:n,name:"filter",targetEl:r,fromEl:o,toEl:o}),K("filter",t,{evt:e}),!0}))))return void(i&&e.preventDefault());n.handle&&!x(s,n.handle,o,!1)||this._prepareDragStart(e,a,r)}}},_prepareDragStart:function(e,t,o){var n,i=this,l=i.el,a=i.options,r=l.ownerDocument;if(o&&!Z&&o.parentNode===l){var s=D(o);if(ee=l,J=(Z=o).parentNode,te=Z.nextSibling,oe=o,ce=a.group,Fe.dragged=Z,ue={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},ge=ue.clientX-s.left,fe=ue.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",n=function(){K("delayEnded",i,{evt:e}),Fe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(e,t),q({sortable:i,name:"choose",originalEvent:e}),j(Z,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){M(Z,e.trim(),Ge)})),m(r,"dragover",He),m(r,"mousemove",He),m(r,"touchmove",He),a.supportPointer?(m(r,"pointerup",i._onDrop),!this.nativeDraggable&&m(r,"pointercancel",i._onDrop)):(m(r,"mouseup",i._onDrop),m(r,"touchend",i._onDrop),m(r,"touchcancel",i._onDrop)),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),K("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(u||p))n();else{if(Fe.eventCanceled)return void this._onDrop();a.supportPointer?(m(r,"pointerup",i._disableDelayedDrag),m(r,"pointercancel",i._disableDelayedDrag)):(m(r,"mouseup",i._disableDelayedDrag),m(r,"touchend",i._disableDelayedDrag),m(r,"touchcancel",i._disableDelayedDrag)),m(r,"mousemove",i._delayedDragTouchMoveHandler),m(r,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&m(r,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Ge(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"pointerup",this._disableDelayedDrag),v(e,"pointercancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,t?"touchmove":"mousemove",this._onTouchMove):(m(Z,"dragend",this),m(ee,"dragstart",this._onDragStart));try{document.selection?Ue((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(we=!1,ee&&Z){K("dragStarted",this,{evt:t}),this.nativeDraggable&&m(document,"dragover",$e);var o=this.options;!e&&j(Z,o.dragClass,!1),j(Z,o.ghostClass,!0),Fe.active=this,e&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,Re();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(Z.parentNode[G]._isOutsideThisEl(e),t)do{if(t[G]&&t[G]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=_(t));Le()}},_onTouchMove:function(e){if(ue){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,i=e.touches?e.touches[0]:e,l=Q&&S(Q,!0),a=Q&&l&&l.a,r=Q&&l&&l.d,s=Pe&&xe&&A(xe),c=(i.clientX-ue.clientX+n.x)/(a||1)+(s?s[0]-Me[0]:0)/(a||1),p=(i.clientY-ue.clientY+n.y)/(r||1)+(s?s[1]-Me[1]:0)/(r||1);if(!Fe.active&&!we){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(Q){l?(l.e+=c-(be||0),l.f+=p-(he||0)):l={a:1,b:0,c:0,d:1,e:c,f:p};var u="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");k(Q,"webkitTransform",u),k(Q,"mozTransform",u),k(Q,"msTransform",u),k(Q,"transform",u),be=c,he=p,de=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=D(Z,!0,Pe,!0,e),o=this.options;if(Pe){for(xe=e;"static"===k(xe,"position")&&"none"===k(xe,"transform")&&xe!==document;)xe=xe.parentNode;xe!==document.body&&xe!==document.documentElement?(xe===document&&(xe=B()),t.top+=xe.scrollTop,t.left+=xe.scrollLeft):xe=B(),Me=A(xe)}j(Q=Z.cloneNode(!0),o.ghostClass,!1),j(Q,o.fallbackClass,!0),j(Q,o.dragClass,!0),k(Q,"transition",""),k(Q,"transform",""),k(Q,"box-sizing","border-box"),k(Q,"margin",0),k(Q,"top",t.top),k(Q,"left",t.left),k(Q,"width",t.width),k(Q,"height",t.height),k(Q,"opacity","0.8"),k(Q,"position",Pe?"absolute":"fixed"),k(Q,"zIndex","100000"),k(Q,"pointerEvents","none"),Fe.ghost=Q,e.appendChild(Q),k(Q,"transform-origin",ge/parseInt(Q.style.width)*100+"% "+fe/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,i=o.options;K("dragStart",this,{evt:e}),Fe.eventCanceled?this._onDrop():(K("setupClone",this),Fe.eventCanceled||((ne=H(Z)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),j(ne,this.options.chosenClass,!1),Fe.clone=ne),o.cloneId=Ue((function(){K("clone",o),Fe.eventCanceled||(o.options.removeCloneOnHide||ee.insertBefore(ne,Z),o._hideClone(),q({sortable:o,name:"clone"}))})),!t&&j(Z,i.dragClass,!0),t?(Ce=!0,o._loopId=setInterval(o._emulateDragOver,50)):(v(document,"mouseup",o._onDrop),v(document,"touchend",o._onDrop),v(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,Z)),m(document,"drop",o),k(Z,"transform","translateZ(0)")),we=!0,o._dragStartId=Ue(o._dragStarted.bind(o,t,e)),m(document,"selectstart",o),me=!0,window.getSelection().removeAllRanges(),b&&k(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,l,a=this.el,r=e.target,s=this.options,c=s.group,p=Fe.active,u=ce===c,d=s.sort,b=pe||p,h=this,g=!1;if(!Be){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),r=x(r,s.draggable,a,!0),H("dragOver"),Fe.eventCanceled)return g;if(Z.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return F(!1);if(Ce=!1,p&&!s.disabled&&(u?d||(n=J!==ee):pe===this||(this.lastPutMode=ce.checkPull(this,p,Z,e))&&c.checkPut(this,p,Z,e))){if(l="vertical"===this._getDirection(e,r),t=D(Z),H("dragOverValid"),Fe.eventCanceled)return g;if(n)return J=ee,$(),this._hideClone(),H("revert"),Fe.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),F(!0);var f=T(a,s.draggable);if(!f||function(e,t,o){var n=D(T(o.el,o.options.draggable)),i=z(o.el,o.options,Q);return t?e.clientX>i.right+10||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>i.bottom+10||e.clientX>n.right&&e.clientY>n.top}(e,l,this)&&!f.animated){if(f===Z)return F(!1);if(f&&a===e.target&&(r=f),r&&(o=D(r)),!1!==ze(ee,a,Z,t,r,o,e,!!r))return $(),f&&f.nextSibling?a.insertBefore(Z,f.nextSibling):a.appendChild(Z),J=a,V(),F(!0)}else if(f&&function(e,t,o){var n=D(P(o.el,0,o.options,!0)),i=z(o.el,o.options,Q);return t?e.clientX<i.left-10||e.clientY<n.top&&e.clientX<n.right:e.clientY<i.top-10||e.clientY<n.bottom&&e.clientX<n.left}(e,l,this)){var m=P(a,0,s,!0);if(m===Z)return F(!1);if(o=D(r=m),!1!==ze(ee,a,Z,t,r,o,e,!1))return $(),a.insertBefore(Z,m),J=a,V(),F(!0)}else if(r.parentNode===a){o=D(r);var v,y,_,w=Z.parentNode!==a,C=!function(e,t,o){var n=o?e.left:e.top,i=o?e.right:e.bottom,l=o?e.width:e.height,a=o?t.left:t.top,r=o?t.right:t.bottom,s=o?t.width:t.height;return n===a||i===r||n+l/2===a+s/2}(Z.animated&&Z.toRect||t,r.animated&&r.toRect||o,l),S=l?"top":"left",M=E(r,"top","top")||E(Z,"top","top"),B=M?M.scrollTop:void 0;if(ve!==r&&(y=o[S],ke=!1,Se=!C&&s.invertSwap||w),v=function(e,t,o,n,i,l,a,r){var s=n?e.clientY:e.clientX,c=n?o.height:o.width,p=n?o.top:o.left,u=n?o.bottom:o.right,d=!1;if(!a)if(r&&_e<c*i){if(!ke&&(1===ye?s>p+c*l/2:s<u-c*l/2)&&(ke=!0),ke)d=!0;else if(1===ye?s<p+_e:s>u-_e)return-ye}else if(s>p+c*(1-i)/2&&s<u-c*(1-i)/2)return function(e){return O(Z)<O(e)?1:-1}(t);return(d=d||a)&&(s<p+c*l/2||s>u-c*l/2)?s>p+c/2?1:-1:0}(e,r,o,l,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Se,ve===r),0!==v){var A=O(Z);do{A-=v,_=J.children[A]}while(_&&("none"===k(_,"display")||_===Q))}if(0===v||_===r)return F(!1);ve=r,ye=v;var I=r.nextElementSibling,N=!1,R=ze(ee,a,Z,t,r,o,e,N=1===v);if(!1!==R)return 1!==R&&-1!==R||(N=1===R),Be=!0,setTimeout(Ve,30),$(),N&&!I?a.appendChild(Z):r.parentNode.insertBefore(Z,N?I:r),M&&L(M,0,B-M.scrollTop),J=Z.parentNode,void 0===y||Se||(_e=Math.abs(y-D(r)[S])),V(),F(!0)}if(a.contains(Z))return F(!1)}return!1}function H(s,c){K(s,h,i({evt:e,isOwner:u,axis:l?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:b,target:r,completed:F,onMove:function(o,n){return ze(ee,a,Z,t,o,D(o),e,n)},changed:V},c))}function $(){H("dragOverAnimationCapture"),h.captureAnimationState(),h!==b&&b.captureAnimationState()}function F(t){return H("dragOverCompleted",{insertion:t}),t&&(u?p._hideClone():p._showClone(h),h!==b&&(j(Z,pe?pe.options.ghostClass:p.options.ghostClass,!1),j(Z,s.ghostClass,!0)),pe!==h&&h!==Fe.active?pe=h:h===Fe.active&&pe&&(pe=null),b===h&&(h._ignoreWhileAnimating=r),h.animateAll((function(){H("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(r===Z&&!Z.animated||r===a&&!r.animated)&&(ve=null),s.dragoverBubble||e.rootEl||r===document||(Z.parentNode[G]._isOutsideThisEl(e.target),!t&&He(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function V(){ae=O(Z),se=O(Z,s.draggable),q({sortable:h,name:"change",toEl:a,newIndex:ae,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",He),v(document,"mousemove",He),v(document,"touchmove",He)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"pointercancel",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;ae=O(Z),se=O(Z,o.draggable),K("drop",this,{evt:e}),J=Z&&Z.parentNode,ae=O(Z),se=O(Z,o.draggable),Fe.eventCanceled||(we=!1,Se=!1,ke=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Xe(this.cloneId),Xe(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&k(document.body,"user-select",""),k(Z,"transform",""),e&&(me&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||pe&&"clone"!==pe.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),Z&&(this.nativeDraggable&&v(Z,"dragend",this),Ge(Z),Z.style["will-change"]="",me&&!we&&j(Z,pe?pe.options.ghostClass:this.options.ghostClass,!1),j(Z,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ae>=0&&(q({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),q({sortable:this,name:"remove",toEl:J,originalEvent:e}),q({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),q({sortable:this,name:"sort",toEl:J,originalEvent:e})),pe&&pe.save()):ae!==le&&ae>=0&&(q({sortable:this,name:"update",toEl:J,originalEvent:e}),q({sortable:this,name:"sort",toEl:J,originalEvent:e})),Fe.active&&(null!=ae&&-1!==ae||(ae=le,se=re),q({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){K("nulling",this),ee=Z=J=Q=te=ne=oe=ie=ue=de=me=ae=se=le=re=ve=ye=pe=ce=Fe.dragged=Fe.ghost=Fe.clone=Fe.active=null,De.forEach((function(e){e.checked=!0})),De.length=be=he=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,i=o.length,l=this.options;n<i;n++)x(e=o[n],l.draggable,this.el,!1)&&t.push(e.getAttribute(l.dataIdAttr)||We(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach((function(e,t){var i=n.children[t];x(i,this.options.draggable,n,!1)&&(o[e]=i)}),this),t&&this.captureAnimationState(),e.forEach((function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return x(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=U.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Ne(o)},destroy:function(){K("destroy",this);var e=this.el;e[G]=null,v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart),v(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),je.splice(je.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ie){if(K("hideClone",this),Fe.eventCanceled)return;k(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),ie=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ie){if(K("showClone",this),Fe.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(ne,te):ee.appendChild(ne):ee.insertBefore(ne,Z),this.options.group.revertClone&&this.animate(Z,ne),k(ne,"display",""),ie=!1}}else this._hideClone()}},Ee&&m(document,"touchmove",(function(e){(Fe.active||we)&&e.cancelable&&e.preventDefault()})),Fe.utils={on:m,off:v,css:k,find:M,is:function(e,t){return!!x(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:R,closest:x,toggleClass:j,clone:H,index:O,nextTick:Ue,cancelNextTick:Xe,detectDirection:Ie,getChild:P,expando:G},Fe.get=function(e){return e[G]},Fe.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Fe.utils=i(i({},Fe.utils),e.utils)),U.mount(e)}))},Fe.create=function(e,t){return new Fe(e,t)},Fe.version="1.15.6";var Ye,Ke,qe,Ze,Je,Qe,et=[],tt=!1;function ot(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function nt(){clearInterval(Qe)}var it,lt=R((function(e,t,o,n){if(t.scroll){var i,l=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,s=t.scrollSpeed,c=B(),p=!1;Ke!==o&&(Ke=o,ot(),Ye=t.scroll,i=t.scrollFn,!0===Ye&&(Ye=I(o,!0)));var u=0,d=Ye;do{var b=d,h=D(b),g=h.top,f=h.bottom,m=h.left,v=h.right,y=h.width,_=h.height,x=void 0,w=void 0,C=b.scrollWidth,j=b.scrollHeight,S=k(b),M=b.scrollLeft,E=b.scrollTop;b===c?(x=y<C&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),w=_<j&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(x=y<C&&("auto"===S.overflowX||"scroll"===S.overflowX),w=_<j&&("auto"===S.overflowY||"scroll"===S.overflowY));var P=x&&(Math.abs(v-l)<=r&&M+y<C)-(Math.abs(m-l)<=r&&!!M),T=w&&(Math.abs(f-a)<=r&&E+_<j)-(Math.abs(g-a)<=r&&!!E);if(!et[u])for(var O=0;O<=u;O++)et[O]||(et[O]={});et[u].vx==P&&et[u].vy==T&&et[u].el===b||(et[u].el=b,et[u].vx=P,et[u].vy=T,clearInterval(et[u].pid),0==P&&0==T||(p=!0,et[u].pid=setInterval(function(){n&&0===this.layer&&Fe.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*s:0,o=et[this.layer].vx?et[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Fe.dragged.parentNode[G],o,t,e,Je,et[this.layer].el)||L(et[this.layer].el,o,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&d!==c&&(d=I(d,!1)));tt=p}}),30),at=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,i=e.activeSortable,l=e.dispatchSortableEvent,a=e.hideGhostForTarget,r=e.unhideGhostForTarget;if(t){var s=o||i;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,p=document.elementFromPoint(c.clientX,c.clientY);r(),s&&!s.el.contains(p)&&(l("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function rt(){}function st(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;it=t},dragOverValid:function(e){var t=e.completed,o=e.target,n=e.onMove,i=e.activeSortable,l=e.changed,a=e.cancel;if(i.options.swap){var r=this.sortable.el,s=this.options;if(o&&o!==r){var c=it;!1!==n(o)?(j(o,s.swapClass,!0),it=o):it=null,c&&c!==it&&j(c,s.swapClass,!1)}l(),t(!0),a()}},drop:function(e){var t,o,n,i,l,a,r=e.activeSortable,s=e.putSortable,c=e.dragEl,p=s||this.sortable,u=this.options;it&&j(it,u.swapClass,!1),it&&(u.swap||s&&s.options.swap)&&c!==it&&(p.captureAnimationState(),p!==r&&r.captureAnimationState(),o=it,l=(t=c).parentNode,a=o.parentNode,l&&a&&!l.isEqualNode(o)&&!a.isEqualNode(t)&&(n=O(t),i=O(o),l.isEqualNode(a)&&n<i&&i++,l.insertBefore(o,l.children[n]),a.insertBefore(t,a.children[i])),p.animateAll(),p!==r&&r.animateAll())},nulling:function(){it=null}},r(e,{pluginName:"swap",eventProperties:function(){return{swapItem:it}}})}rt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=P(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:at},r(rt,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:at},r(st,{pluginName:"removeOnSpill"});var pt,ut,dt,bt,ht,gt=[],ft=[],mt=!1,vt=!1,yt=!1;function _t(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?m(document,"pointerup",this._deselectMultiDrag):(m(document,"mouseup",this._deselectMultiDrag),m(document,"touchend",this._deselectMultiDrag))),m(document,"keydown",this._checkKeyDown),m(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,o){var n="";gt.length&&ut===e?gt.forEach((function(e,t){n+=(t?", ":"")+e.textContent})):n=o.textContent,t.setData("Text",n)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;dt=t},delayEnded:function(){this.isMultiDrag=~gt.indexOf(dt)},setupClone:function(e){var t=e.sortable,o=e.cancel;if(this.isMultiDrag){for(var n=0;n<gt.length;n++)ft.push(H(gt[n])),ft[n].sortableIndex=gt[n].sortableIndex,ft[n].draggable=!1,ft[n].style["will-change"]="",j(ft[n],this.options.selectedClass,!1),gt[n]===dt&&j(ft[n],this.options.chosenClass,!1);t._hideClone(),o()}},clone:function(e){var t=e.sortable,o=e.rootEl,n=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||gt.length&&ut===t&&(xt(!0,o),n("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,o=e.rootEl,n=e.cancel;this.isMultiDrag&&(xt(!1,o),ft.forEach((function(e){k(e,"display","")})),t(),ht=!1,n())},hideClone:function(e){var t=this,o=(e.sortable,e.cloneNowHidden),n=e.cancel;this.isMultiDrag&&(ft.forEach((function(e){k(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),o(),ht=!0,n())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ut&&ut.multiDrag._deselectMultiDrag(),gt.forEach((function(e){e.sortableIndex=O(e)})),gt=gt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,o=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){gt.forEach((function(e){e!==dt&&k(e,"position","absolute")}));var n=D(dt,!1,!0,!0);gt.forEach((function(e){e!==dt&&$(e,n)})),vt=!0,mt=!0}o.animateAll((function(){vt=!1,mt=!1,t.options.animation&&gt.forEach((function(e){F(e)})),t.options.sort&&wt()}))}},dragOver:function(e){var t=e.target,o=e.completed,n=e.cancel;vt&&~gt.indexOf(t)&&(o(!1),n())},revert:function(e){var t=e.fromSortable,o=e.rootEl,n=e.sortable,i=e.dragRect;gt.length>1&&(gt.forEach((function(e){n.addAnimationState({target:e,rect:vt?D(e):i}),F(e),e.fromRect=i,t.removeAnimationState(e)})),vt=!1,function(e,t){gt.forEach((function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)}))}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(e){var t=e.sortable,o=e.isOwner,n=e.insertion,i=e.activeSortable,l=e.parentEl,a=e.putSortable,r=this.options;if(n){if(o&&i._hideClone(),mt=!1,r.animation&&gt.length>1&&(vt||!o&&!i.options.sort&&!a)){var s=D(dt,!1,!0,!0);gt.forEach((function(e){e!==dt&&($(e,s),l.appendChild(e))})),vt=!0}if(!o)if(vt||wt(),gt.length>1){var c=ht;i._showClone(t),i.options.animation&&!ht&&c&&ft.forEach((function(e){i.addAnimationState({target:e,rect:bt}),e.fromRect=bt,e.thisAnimationDuration=null}))}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,o=e.isOwner,n=e.activeSortable;if(gt.forEach((function(e){e.thisAnimationDuration=null})),n.options.animation&&!o&&n.multiDrag.isMultiDrag){bt=r({},t);var i=S(dt,!0);bt.top-=i.f,bt.left-=i.e}},dragOverAnimationComplete:function(){vt&&(vt=!1,wt())},drop:function(e){var t=e.originalEvent,o=e.rootEl,n=e.parentEl,i=e.sortable,l=e.dispatchSortableEvent,a=e.oldIndex,r=e.putSortable,s=r||this.sortable;if(t){var c=this.options,p=n.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),j(dt,c.selectedClass,!~gt.indexOf(dt)),~gt.indexOf(dt))gt.splice(gt.indexOf(dt),1),pt=null,X({sortable:i,rootEl:o,name:"deselect",targetEl:dt,originalEvent:t});else{if(gt.push(dt),X({sortable:i,rootEl:o,name:"select",targetEl:dt,originalEvent:t}),t.shiftKey&&pt&&i.el.contains(pt)){var u=O(pt),d=O(dt);~u&&~d&&u!==d&&function(){var e,l;d>u?(l=u,e=d):(l=d,e=u+1);for(var a=c.filter;l<e;l++)~gt.indexOf(p[l])||x(p[l],c.draggable,n,!1)&&(a&&("function"==typeof a?a.call(i,t,p[l],i):a.split(",").some((function(e){return x(p[l],e.trim(),n,!1)})))||(j(p[l],c.selectedClass,!0),gt.push(p[l]),X({sortable:i,rootEl:o,name:"select",targetEl:p[l],originalEvent:t})))}()}else pt=dt;ut=s}if(yt&&this.isMultiDrag){if(vt=!1,(n[G].options.sort||n!==o)&&gt.length>1){var b=D(dt),h=O(dt,":not(."+this.options.selectedClass+")");if(!mt&&c.animation&&(dt.thisAnimationDuration=null),s.captureAnimationState(),!mt&&(c.animation&&(dt.fromRect=b,gt.forEach((function(e){if(e.thisAnimationDuration=null,e!==dt){var t=vt?D(e):b;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),wt(),gt.forEach((function(e){p[h]?n.insertBefore(e,p[h]):n.appendChild(e),h++})),a===O(dt))){var g=!1;gt.forEach((function(e){e.sortableIndex===O(e)||(g=!0)})),g&&(l("update"),l("sort"))}gt.forEach((function(e){F(e)})),s.animateAll()}ut=s}(o===n||r&&"clone"!==r.lastPutMode)&&ft.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,ft.length=0},destroyGlobal:function(){this._deselectMultiDrag(),v(document,"pointerup",this._deselectMultiDrag),v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||ut!==this.sortable||e&&x(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;gt.length;){var t=gt[0];j(t,this.options.selectedClass,!1),gt.shift(),X({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[G];t&&t.options.multiDrag&&!~gt.indexOf(e)&&(ut&&ut!==t&&(ut.multiDrag._deselectMultiDrag(),ut=t),j(e,t.options.selectedClass,!0),gt.push(e))},deselect:function(e){var t=e.parentNode[G],o=gt.indexOf(e);t&&t.options.multiDrag&&~o&&(j(e,t.options.selectedClass,!1),gt.splice(o,1))}},eventProperties:function(){var e,t=this,o=[],n=[];return gt.forEach((function(e){var i;o.push({multiDragElement:e,index:e.sortableIndex}),i=vt&&e!==dt?-1:vt?O(e,":not(."+t.options.selectedClass+")"):O(e),n.push({multiDragElement:e,index:i})})),{items:(e=gt,function(e){if(Array.isArray(e))return s(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 s(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?s(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.")}()),clones:[].concat(ft),oldIndicies:o,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function xt(e,t){ft.forEach((function(o,n){var i=t.children[o.sortableIndex+(e?Number(n):0)];i?t.insertBefore(o,i):t.appendChild(o)}))}function wt(){gt.forEach((function(e){e!==dt&&e.parentNode&&e.parentNode.removeChild(e)}))}Fe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):this.options.supportPointer?m(document,"pointermove",this._handleFallbackAutoScroll):t.touches?m(document,"touchmove",this._handleFallbackAutoScroll):m(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),nt(),ot(),clearTimeout(w),w=void 0},nulling:function(){Je=Ke=Ye=tt=Qe=qe=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(n,i);if(Je=e,t||this.options.forceAutoScrollFallback||u||p||b){lt(e,this.options,l,t);var a=I(l,!0);!tt||Qe&&n===qe&&i===Ze||(Qe&&nt(),Qe=setInterval((function(){var l=I(document.elementFromPoint(n,i),!0);l!==a&&(a=l,ot()),lt(e,o.options,l,t)}),10),qe=n,Ze=i)}else{if(!this.options.bubbleScroll||I(l,!0)===B())return void ot();lt(e,this.options,I(l,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Fe.mount(st,rt);const Ct=Fe},1609:e=>{"use strict";e.exports=window.React},1720:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var l=typeof o;if("string"===l||"number"===l)e.push(o);else if(Array.isArray(o)){if(o.length){var a=i.apply(null,o);a&&e.push(a)}}else if("object"===l)if(o.toString===Object.prototype.toString)for(var r in o)n.call(o,r)&&o[r]&&e.push(r);else e.push(o.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o)}()},5021:(e,t,o)=>{"use strict";const n=window.wp.blocks,i=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.element,r=window.wp.components,s=window.wp.primitives,c=window.ReactJSXRuntime,p=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),u=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),d=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),b=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),h=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),g=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),f=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),m=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(s.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var v=o(5901);const y=({label:e,message:t,handleClick:o,pluginName:n="gutenkit"})=>(0,c.jsxs)(r.Popover,{onFocusOutside:o,position:"middle left top",className:"gkit-dialog-popup",children:[(0,c.jsxs)("div",{className:"gkit-dialog-popup__header",children:[(0,c.jsxs)("div",{className:"gkit-dialog-title",children:[e,(0,c.jsx)("span",{className:"gkit-dialog-title__badge",children:(0,i.__)("Pro","gutenkit-blocks-addon")})]}),(0,c.jsx)("button",{className:"gkit-dialog-close",onClick:o,children:(0,c.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 36 36",children:(0,c.jsx)("path",{d:"M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z"})})})]}),(0,c.jsx)("div",{className:"gkit-dialog-message",children:t}),(0,c.jsx)("div",{className:"gkit-dialog-buttons-wrapper",children:(0,c.jsx)("a",{href:`https://wpmet.com/plugin/${n}/pricing/`,target:"_blank",rel:"noopener noreferrer",className:"gkit-dialog-button",children:(0,i.__)("Upgrade Now","gutenkit-blocks-addon")})})]}),_=(0,a.memo)((({repeaterFields:e=[],children:t,onChange:o,itemLabelName:n="",buttonLabel:l,isProActive:s})=>{const[p,u]=(0,a.useState)(!1),d=()=>{u((e=>!e))},b=(0,a.useCallback)(((e,t,o)=>{if(t[o]){let i=t[o];if(!(null==(n=e.props.condition)||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&0===n.trim().length||!1===n)){const{props:t}=e,o=t?.condition?.name?t?.condition?.name.split("."):[];if(Array.isArray(t?.condition)){let e=0;return t?.condition.forEach((t=>{i[t.name]===t.value&&e++})),e===t?.condition.length}return"parent"===t?.condition?.type?t?.condition?.name===t?.condition?.value:o.length>1?i[o[0]][o[1]]===t?.condition?.value:i[t?.condition?.name]===t?.condition?.value}return!0}var n}),[e]),h=["email","name","tel"],g=e.map((e=>e.type)).filter((e=>h.includes(e)));return(0,c.jsxs)("div",{className:"gkit-repeater",children:[e&&(0,c.jsx)(v.ReactSortable,{list:e,setList:o,handle:".components-panel__body-toggle",children:e.map(((i,l)=>{let p=((e,t,o)=>"tel"===e[t]?"Phone":"email"===e[t]||"name"===e[t]?e[t]:e.label?e.label:`${e[t]} #${o+1}`)(i,n,l);return(0,c.jsxs)("div",{className:"gkit-repeater__item gkit-control-wrap",children:[(0,c.jsx)(r.PanelBody,{title:p,initialOpen:!1,className:"gkit-repeater__item__panel",children:(0,c.jsx)("div",{className:"gkit-repeater__item-content",children:t.map(((t,n)=>{if(b(t,e,l)){let r={...t.props};return"type"===t.props.name&&s&&(r.options=r.options.map((e=>({...e,disabled:h.includes(e.value)&&g.includes(e.value)&&e.value!==i.type})))),(0,a.cloneElement)(t,{...r,key:n,value:i[t.props.name],onChange:n=>((t,n,i)=>{const l=JSON.parse(JSON.stringify(e));l[t][n]=i,o(l)})(l,t.props.name,n)})}}))})}),(0,c.jsxs)("div",{className:"repeater-action-btns",children:[!h.includes(e[l].type)&&(0,c.jsx)(r.Button,{className:"gkit-repeater__item__clone-button gkit-repeater__item__action-button",icon:"admin-page",label:"Clone Item",onClick:()=>(t=>{const n=[...e];n.splice(t+1,0,n[t]),o(n)})(l)}),"email"!==e[l].type&&(0,c.jsx)(r.Button,{className:"gkit-repeater__item__delete-button gkit-repeater__item__action-button",icon:"no-alt",label:"Delete Item",onClick:()=>(t=>{const n=[...e];n.splice(t,1),o(n)})(l)})]})]},l)}))}),(0,c.jsx)(r.Button,{className:"gkit-repeater__add-button",icon:m,variant:"primary",onClick:()=>{if(!s&&e.length>=2)d();else{const n={};for(const e of t)n[e.props.name]=e.props.default||"";o([...e,n])}},children:l||(0,i.__)("Add Field","popup-builder-block")}),p&&(0,c.jsx)(y,{label:(0,i.__)("Add More Fields","popup-builder-block"),message:(0,i.__)("Add More Fields and also enjoy more exclusive features with PopupKit Pro.","popup-builder-block"),pluginName:"popupkit",handleClick:d})]})})),x=({label:e,value:t,onChange:o})=>{const{GkitRangeUnit:n,GkitResponsive:i}=window.popupBuilderBlock.components,{useDeviceType:l}=window.popupBuilderBlock.helpers,a=l();return(0,c.jsx)(i,{children:(0,c.jsx)(n,{label:e,value:t?.fieldSize?.[a],onChange:e=>o({...t,fieldSize:{...t?.fieldSize,[a]:e}}),units:{"%":{min:0,max:100},px:{}}})})},w=({slug:e,onChange:t})=>{const[o,n]=(0,a.useState)(!1),l=(0,c.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("g",{fill:"#ababab",children:(0,c.jsx)("path",{d:"M18.43 4.25a.76.76 0 0 0-.75.75v2.43l-.84-.84a7.24 7.24 0 0 0-12 2.78.74.74 0 0 0 .46 1 .729.729 0 0 0 .25 0 .76.76 0 0 0 .71-.51 5.63 5.63 0 0 1 1.37-2.2 5.76 5.76 0 0 1 8.13 0l.84.84h-2.41a.75.75 0 1 0 0 1.5h4.24a.74.74 0 0 0 .75-.75V5a.75.75 0 0 0-.75-.75ZM18.68 13.68a.761.761 0 0 0-1 .47 5.63 5.63 0 0 1-1.37 2.2 5.76 5.76 0 0 1-8.13 0l-.84-.84h2.47a.75.75 0 1 0 0-1.5H5.57a.74.74 0 0 0-.75.75V19a.75.75 0 1 0 1.5 0v-2.43l.84.84a7.24 7.24 0 0 0 12-2.78.74.74 0 0 0-.48-.95Z"})})});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r.Button,{title:(0,i.__)("Sync Accounts","popup-builder-block"),className:"integration-sync "+(o?"syncing":""),icon:l,onClick:()=>{n(!0),setTimeout((()=>{n(!1)}),1e3),t()}}),(0,c.jsx)(r.ExternalLink,{className:"add-account-button",href:popupBuilderBlock.adminUrl+"admin.php?page=popupkit#integration",children:(0,i.__)("Add New Account","popup-builder-block")})]})},C=window.wp.apiFetch;var j=o.n(C);const k=window.wp.data,S=(0,a.memo)((({attributes:e,setAttributes:t,device:o,clientId:n})=>{const{GkitBoxShadow:l,GkitColor:s,GkitPanelBody:m,GkitRepeater:v,GkitResponsive:y,GkitSwitcher:C,GkitTabs:S,GkitTypography:M,GkitBackgrounGroup:B,GkitText:D,GkitSlider:E,GkitIconPicker:P,GkitRangeUnit:T,GkitSelect:O,GkitBorderControl:A,GkitChoose:I,GkitBoxControl:N,GkitNumber:R,GkitAdvancedUrl:L,GkitComplexSelect:H,GkitProSwitcherNotice:$}=window.popupBuilderBlock.components,{gkitResponsiveValue:F,useFontFamilyinBlock:z,responsiveHelper:G,colorsGroup:V,boxControlUnit:W,useHasProActive:U,useBlockStyles:X}=window.popupBuilderBlock.helpers,Y=U({windowVariable:"popupBuilderBlock",hookName:"pbb.is-pro-active",cookieName:"isPopupkitValid",apiPath:"pbb"}),[K,q]=(0,a.useState)([]),[Z,J]=(0,a.useState)(!1),[Q,ee]=(0,a.useState)([]),[te,oe]=(0,a.useState)([]),[ne,ie]=(0,a.useState)([]),[le,ae]=(0,a.useState)([]),[re,se]=(0,a.useState)(!0);(0,a.useEffect)((()=>{Y&&j()({path:"/pbb/v1/lists"}).then((e=>{q(e.data)}))}),[Z]),(0,a.useEffect)((()=>{e?.mailchimpAccount?.value&&(re||t({mailchimpList:{}}),j()({method:"GET",path:"pbb/v1/mailchimp/lists?api_key="+e?.mailchimpAccount?.value}).then((e=>{ee(e.options)}))),se(!1)}),[e?.mailchimpAccount]),(0,a.useEffect)((()=>{e?.activeCampaignAccount?.value&&(oe([]),t({activeCampaignList:null}),j()({method:"GET",path:"pbb/v1/activeCampaign/lists?index="+e?.activeCampaignAccount?.index}).then((e=>{if(e?.lists?.length){const t=e.lists.map((e=>({value:e.id,label:e.name})));oe(t)}})).catch((e=>{console.error("Failed to fetch ActiveCampaign lists:",e),oe([])})))}),[e?.activeCampaignAccount]),(0,a.useEffect)((()=>{e?.hubspotAccount?.value&&(ae([]),t({hubspotLists:null}))}),[e?.hubspotAccount]),(0,a.useEffect)((()=>{e?.zapierAccount?.value&&(ie([]),t({zapierList:null}),j()({method:"GET",path:"pbb/v1/zapier/lists?index="+e?.zapierAccount?.index}).then((e=>{if(e?.lists?.length){const t=e.lists.map((e=>({value:e.id,label:e.name})));ie(t)}})).catch((e=>{console.error("Failed to fetch zapier lists:",e),ie([])})))}),[e?.zapierAccount]),z([e?.titleTypography,e?.labelTypography,e?.buttonTypography]),X(e,t,"blocksCSS",((e,t)=>{const{parseCSS:o,getBoxValue:n,getBorderValue:i,getSliderValue:l,getColor:a,getBoxShadowValue:r,getTypographyValue:s}=window.popupBuilderBlock.helpers,c=e.blockClass,p=t=>e?.formFields?.map(((e,o)=>{if(Object.keys(e?.width||{}).length>0&&e?.width?.fieldSize?.[t])return{selector:`.${c} .pbb-form__field.pbb-form__field-${o}`,width:`${l(e?.width?.fieldSize?.[t])}`}})).filter(Boolean);return o([[{selector:`.${c}.pbb-form`,background:a(e?.formBgColor)},{selector:`.${c} .pbb-form__label`,color:a(e?.labelColor)},{selector:`.${c} .pbb-form__label.required::after`,color:a(e?.markColor)},{selector:`.popup-builder .${c} .pbb-form__input`,color:a(e?.fieldColor),fill:a(e?.fieldColor),background:a(e?.fieldBgColor)},{selector:`.popup-builder .${c} .pbb-form__input-wrap:hover .pbb-form__input`,color:a(e?.fieldColorHover),fill:a(e?.fieldColorHover),background:a(e?.fieldBgColorHover)},{selector:`.popup-builder .${c} .pbb-form__input:focus`,color:a(e?.fieldColorFocus),fill:a(e?.fieldColorFocus),background:a(e?.fieldBgColorFocus)},{selector:`.popup-builder .${c} .pbb-form__input::placeholder`,color:a(e?.fieldPlaceholderColor)},{selector:`.popup-builder .${c} .pbb-form__input-wrap:hover .pbb-form__input::placeholder`,color:a(e?.fieldPlaceholderColorHover)},{selector:`.popup-builder .${c} .pbb-form__input:focus::placeholder`,color:a(e?.fieldPlaceholderColorFocus)},{selector:`.popup-builder .${c} .pbb-form__input-wrap`,...i(e?.fieldBorder),background:a(e?.fieldBgColor),"box-shadow":r(e?.fieldBoxShadow)},{selector:`.popup-builder .${c} .pbb-form__input-wrap .input-icon`,fill:a(e?.fieldIconColor)},{selector:`.popup-builder .${c} .pbb-form__input-wrap:hover`,...i(e?.fieldBorderHover),"box-shadow":r(e?.fieldBoxShadowHover),background:a(e?.fieldBgColorHover)},{selector:`.popup-builder .${c} .pbb-form__input-wrap:focus-within`,...i(e?.fieldBorderFocus),"box-shadow":r(e?.fieldBoxShadowFocus),background:a(e?.fieldBgColorFocus)},{selector:`.popup-builder .${c} .pbb-form__submit-btn`,color:a(e?.buttonColor),"text-shadow":r(e.textShadow),background:a(e?.buttonBgColor),...i(e?.buttonBorder),"flex-direction":"left"===e?.iconPosition?"row":"row-reverse",gap:l(e?.iconSpaceBetween),"box-shadow":r(e?.buttonBoxShadowNormal)},{selector:`.popup-builder .${c} .pbb-form__submit-btn .input-icon`,fill:a(e?.buttonIconColor)},{selector:`.popup-builder .${c} .pbb-form__submit-btn:hover .input-icon`,fill:a(e?.buttonHoverIconColor)},{selector:`.popup-builder .${c} .pbb-form__submit-btn:hover`,color:a(e?.buttonHoverColor),background:a(e?.buttonHoverBgColor),...i(e?.buttonHoverBorder),"box-shadow":r(e?.buttonBoxShadowHover)},{selector:`.popup-builder .${c} .pbb-form__field.response .pbb-form-response.error`,color:a(e?.errorMessageColor),"background-color":a(e?.errorMessageBg),...i(e?.submissionErrorMessageBorder)},{selector:`.popup-builder .${c} .pbb-form-success`,color:a(e?.successMessageColor),"background-color":a(e?.successMessageBg),...i(e?.submissionSuccessMessageBorder),"box-shadow":r(e?.successMessageBoxShadow)},{selector:`.${c} .pbb-form__submit-btn-wrap`,...e?.isButtonPosition?{position:e?.buttonPosition}:{}}],t=>[{selector:`.${c}.pbb-form`,"margin-right":`calc(-${l(e?.[`columnsGap${t}`])} / 2)`,"margin-left":`calc(-${l(e?.[`columnsGap${t}`])} / 2)`,"row-gap":`${l(e?.[`rowsGap${t}`])}`,...n(e[`formPadding${t}`],"padding"),...n(e[`formMargin${t}`],"margin")},{selector:`.${c} .pbb-form__field`,"padding-right":`calc(${l(e?.[`columnsGap${t}`])} / 2)`,"padding-left":`calc(${l(e?.[`columnsGap${t}`])} / 2)`},{selector:`.${c} :is(.pbb-form__input, .pbb-form__input::placeholder)`,...s(e?.fieldTypography,t)},{selector:`.popup-builder .${c} :is(.pbb-form__input-wrap, .pbb-form__input)`,...n(e?.[`fieldBorderRadius${t}`],"border-radius")},{selector:`.popup-builder .${c} .pbb-form__input-wrap:hover .pbb-form__input, .popup-builder .${c} .pbb-form__input-wrap:hover`,...n(e?.[`fieldBorderRadiusHover${t}`],"border-radius")},{selector:`.popup-builder .${c} .pbb-form__input-wrap .pbb-form__input:focus, .popup-builder .${c} .pbb-form__input-wrap:focus-within`,...n(e?.[`fieldBorderRadiusFocus${t}`],"border-radius")},{selector:`.popup-builder .${c} .pbb-form__input-wrap`,...n(e[`fieldPadding${t}`],"padding")},{selector:`.popup-builder .${c} .pbb-form__input-wrap .input-icon`,"font-size":l(e[`fieldIconSize${t}`]),...n(e[`fieldIconPadding${t}`],"padding")},{selector:`.popup-builder .${c} .pbb-form__submit-btn .input-icon`,"font-size":l(e[`buttonIconSize${t}`])},{selector:`.popup-builder .${c} .pbb-form__label`,...s(e?.labelTypography,t),"margin-bottom":l(e?.[`labelSpacing${t}`])},{selector:`.popup-builder .${c} .pbb-form__submit-btn`,width:l(e?.[`buttonWidth${t}`]),position:"right"===e?.buttonHorizontalOrientation||"left"===e?.buttonHorizontalOrientation?"absolute":"relative",top:"right"===e?.buttonHorizontalOrientation||"left"===e?.buttonHorizontalOrientation?"1px":"auto",right:"right"===e?.buttonHorizontalOrientation?"0px":"auto",left:"left"===e?.buttonHorizontalOrientation?"0px":"auto",...s(e?.buttonTypography,t),...n(e?.[`buttonPadding${t}`],"padding"),...n(e?.[`buttonMargin${t}`],"margin"),...n(e?.[`buttonBorderRadius${t}`],"border-radius")},{selector:`.${c} .pbb-form__submit-btn-wrap`,"justify-content":e?.[`buttonAlignment${t}`],...!0===e?.isButtonPosition&&{[e.buttonHorizontalOrientation]:""!==e.buttonPosition?l(e[`buttonHorizontalOffset${t}`]):void 0,[e.buttonVerticalOrientation]:""!==e.buttonPosition?l(e[`buttonVerticalOffset${t}`]):void 0}},{selector:`.popup-builder .${c} .pbb-form-success`,...n(e?.[`submissionMessagePadding${t}`],"padding"),...n(e?.[`submissionMessageBorderRadius${t}`],"border-radius"),...n(e?.[`submissionMessageMargin${t}`],"margin"),...s(e?.successMessageTypography,t)},...p(t)]],t)})(e));const ce=()=>J(!Z),{buttonClickActions:pe,stepOptions:ue}=(0,a.useMemo)((()=>{let e=[{label:(0,i.__)("None","popup-builder-block"),value:"none"},{label:(0,i.__)("Redirect to Url","popup-builder-block"),value:"redirect-url"},{label:(0,i.__)("Open Email Client","popup-builder-block"),value:"email"},{label:(0,i.__)("Click to Call","popup-builder-block"),value:"call"},{label:(0,i.__)("Copy Text","popup-builder-block"),value:"copy-text"},{label:(0,i.__)("Close Campaign","popup-builder-block"),value:"close-campaign"},{label:(0,i.__)("Reload The Page","popup-builder-block"),value:"reload-page"},{label:(0,i.__)("Open in a New Window","popup-builder-block"),value:"new-window"}],t=[];const o=(0,k.select)("core/block-editor").getBlockParentsByBlockName(n,"popup-builder-block/steps");if(o.length>0){const n=(0,k.select)("core/block-editor").getBlockAttributes(o[0]);t=n?.steps.map(((e,t)=>({label:e.title||"",value:t})))||[],e=[...e,{label:(0,i.__)("Go to a Step","popup-builder-block"),value:"step"}]}return{buttonClickActions:e,stepOptions:t}}),[n]);return(0,c.jsx)(S,{type:"top-level",tabs:[{name:"content",title:(0,i.__)("Content","popup-builder-block")},{name:"style",title:(0,i.__)("Style","popup-builder-block")}],children:n=>{switch(n.name){case"content":return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(m,{title:(0,i.__)("Form Fields","popup-builder-block"),children:[(0,c.jsxs)(_,{itemLabelName:"type",onChange:e=>t({formFields:e}),repeaterFields:e.formFields,isProActive:Y,children:[Y?(0,c.jsx)(O,{label:(0,i.__)("Type","popup-builder"),name:"type",options:[{value:"name",label:"Name"},{value:"email",label:"Email"},{value:"tel",label:"Phone"},{value:"text",label:"Text"},{value:"textarea",label:"Text Area"},{value:"number",label:"Number"}],default:"text"}):(0,c.jsx)(O,{label:(0,i.__)("Type","popup-builder"),name:"type",options:[{value:"name",label:"Name"},{value:"email",label:"Email"},{value:"",label:"Phone (Pro)",disabled:!0},{value:"",label:"Text (Pro)",disabled:!0},{value:"",label:"Text Area (Pro)",disabled:!0},{value:"",label:"Number (Pro)",disabled:!0}],default:"name"}),(0,c.jsx)(C,{label:(0,i.__)("Required?","popup-builder-block"),name:"required",default:!0}),(0,c.jsx)(D,{label:(0,i.__)("Placeholder","popup-builder"),labelBlock:!0,name:"placeholder",isSupportDynamicContent:!1,default:"Enter your message"}),(0,c.jsx)(D,{label:(0,i.__)("Field Label","popup-builder"),labelBlock:!0,name:"label",isSupportDynamicContent:!1}),(0,c.jsx)(R,{label:(0,i.__)("Rows","popup-builder-block"),name:"textAreaRows",labelPosition:"side",condition:{name:"type",value:"textarea"}}),(0,c.jsx)(x,{label:(0,i.__)("Field Width","popup-builder-block"),name:"width",default:{fieldSize:{Desktop:{unit:"%",size:100}}}}),(0,c.jsx)(C,{label:(0,i.__)("Show Icon","popup-builder-block"),name:"showIcon"}),(0,c.jsx)(P,{apiPath:"pbb",label:(0,i.__)("Icon","popup-builder-block"),name:"icon",condition:{name:"showIcon",value:!0}}),(0,c.jsx)(D,{label:(0,i.__)("Field ID","popup-builder"),labelBlock:!0,name:"id",isSupportDynamicContent:!1}),(0,c.jsx)(D,{label:(0,i.__)("Default value","popup-builder"),labelBlock:!0,name:"defaultValue",isSupportDynamicContent:!1})]}),(0,c.jsx)(C,{label:(0,i.__)("Show Label","popup-builder-block"),value:e.showLabel,onChange:e=>t({showLabel:e})}),e.showLabel&&(0,c.jsx)(C,{label:(0,i.__)("Required Mark","popup-builder-block"),value:e.requiredMark,onChange:e=>t({requiredMark:e})})]}),(0,c.jsxs)(m,{title:(0,i.__)("Button","popup-builder-block"),children:[(0,c.jsx)(O,{label:(0,i.__)("After Submit Action","popup-builder-block"),value:e.buttonClickAction,onChange:e=>{const o={buttonClickAction:e};"step"===e&&(o.step=0),t(o)},options:pe}),"step"===e?.buttonClickAction&&(0,c.jsx)(O,{label:(0,i.__)("Select Step","popup-builder-block"),value:e?.step,onChange:e=>t({step:e}),options:ue}),"redirect-url"===e.buttonClickAction&&(0,c.jsx)(L,{label:(0,i.__)("Redirect URL","popup-builder-block"),value:e.buttonRedirectUrl,onChange:e=>t({buttonRedirectUrl:e}),isSettingsDisable:!0,isSupportDynamicContent:!1}),"email"===e.buttonClickAction&&(0,c.jsx)(D,{label:(0,i.__)("Email Address","popup-builder-block"),value:e.buttonEmail,inputType:"email",onChange:e=>t({buttonEmail:e}),labelBlock:!0,isSupportDynamicContent:!1}),"call"===e.buttonClickAction&&(0,c.jsx)(D,{label:(0,i.__)("Phone Number","popup-builder-block"),value:e.buttonPhone,inputType:"tel",onChange:e=>t({buttonPhone:e}),labelBlock:!0,isSupportDynamicContent:!1}),"copy-text"===e.buttonClickAction&&(0,c.jsx)(D,{label:(0,i.__)("Text to Copy","popup-builder-block"),value:e.buttonCopyText,onChange:e=>t({buttonCopyText:e}),labelBlock:!0,isSupportDynamicContent:!1}),"new-window"===e.buttonClickAction&&(0,c.jsx)(L,{label:(0,i.__)("New Window URL","popup-builder-block"),value:e.buttonNewWindowUrl,onChange:e=>t({buttonNewWindowUrl:e}),isSettingsDisable:!0,isSupportDynamicContent:!1}),["none","email","call","copy-text","new-window"].includes(e.buttonClickAction)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(C,{label:(0,i.__)("Close Campaign?","popup-builder-block"),value:e.closeCampaign,onChange:e=>t({closeCampaign:e})}),e.closeCampaign&&(0,c.jsx)(R,{label:(0,i.__)("Delay time (s) to close campaign","popup-builder-block"),value:e.closeCampaignDelay,onChange:e=>t({closeCampaignDelay:e})})]}),(0,c.jsx)(C,{label:(0,i.__)("Conversion tracking?","popup-builder-block"),value:e.istrackConversion,onChange:e=>t({istrackConversion:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Button Width","popup-builder-block"),value:F(e,"buttonWidth",o),onChange:e=>G("buttonWidth",e,o,t),units:{"%":{min:0,max:100},px:{}}})}),(0,c.jsx)(C,{label:(0,i.__)("Use Icon","popup-builder-block"),value:e.usebuttonIcon,onChange:e=>t({usebuttonIcon:e})}),e.usebuttonIcon&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(P,{label:(0,i.__)("Icon","popup-builder-block"),apiPath:"pbb",value:e.buttonIcon,onChange:e=>t({buttonIcon:e})}),(0,c.jsx)(I,{label:(0,i.__)("Icon Position","popup-builder-block"),value:e.iconPosition,options:[{label:(0,i.__)("Left","popup-builder-block"),value:"left",icon:p},{label:(0,i.__)("Right","popup-builder-block"),value:"right",icon:u}],onChange:e=>t({iconPosition:e})}),(0,c.jsx)(T,{label:(0,i.__)("Space Between","popup-builder-block"),value:e.iconSpaceBetween,onChange:e=>t({iconSpaceBetween:e}),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})]}),(0,c.jsx)(r.__experimentalDivider,{}),(0,c.jsx)(D,{label:(0,i.__)("After Submission Message","popup-builder-block"),value:e.buttonSuccessMessage,onChange:e=>t({buttonSuccessMessage:e}),labelBlock:!0})]}),(0,c.jsx)(m,{title:(0,i.__)("Integrations","popup-builder-block"),children:Y?(0,c.jsx)(H,{label:(0,i.__)("Select Integrations","popup-builder-block"),value:e?.integration,options:[{label:(0,i.__)("Mailchimp","popup-builder-block"),value:"mailchimp"},{label:(0,i.__)("Fluent CRM","popup-builder-block"),value:"fluentCRM"},{label:(0,i.__)("Active Campaign","popup-builder-block"),value:"activeCampaign"},{label:(0,i.__)("Zapier","popup-builder-block"),value:"zapier"},{label:(0,i.__)("Hubspot","popup-builder-block"),value:"hubspot"}],isMulti:!0,onChange:e=>t({integration:e})}):(0,c.jsx)(r.__experimentalSpacer,{marginBottom:"14px",children:(0,c.jsx)($,{label:(0,i.__)("Add Integrations","popup-builder-block"),message:(0,i.__)("Add and Unlock more integrations with PopupKit Pro","popup-builder-block"),pluginName:"popupkit"})})}),e?.integration.some((e=>"mailchimp"===e.value))&&(0,c.jsxs)(m,{title:(0,i.__)("MailChimp","popup-builder-block"),children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Account","popup-builder-block"),value:e?.mailchimpAccount,options:K?.mailchimp?.accounts.map(((e,t)=>({label:e["account-name"],value:e["api-key"],index:t})))||[],isMulti:!1,onChange:e=>{t({mailchimpAccount:e})}}),e?.mailchimpAccount?.value&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Lists","popup-builder-block"),value:e?.mailchimpList,options:Q,isMulti:!1,onChange:e=>t({mailchimpList:e})}),(0,c.jsx)(C,{label:(0,i.__)("Double Opt-in","popup-builder-block"),value:e.mailchimpDoubleOptin,onChange:e=>t({mailchimpDoubleOptin:e})})]}),(0,c.jsx)(w,{slug:"mailchimp",onChange:ce})]}),e?.integration.some((e=>"fluentCRM"===e.value))&&(0,c.jsxs)(m,{title:(0,i.__)("Fluent CRM","popup-builder-block"),children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Account","popup-builder-block"),value:e?.fluentCRMAccount,options:K?.fluentCRM?.accounts.map(((e,t)=>({label:e["account-name"],value:e["api-url"],index:t})))||[],isMulti:!1,onChange:e=>{t({fluentCRMAccount:e})}}),(0,c.jsx)(w,{slug:"fluentCRM",onChange:ce})]}),e?.integration.some((e=>"activeCampaign"===e.value))&&(0,c.jsxs)(m,{title:(0,i.__)("Active Campaign","popup-builder-block"),children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Account","popup-builder-block"),value:e?.activeCampaignAccount,options:K?.activeCampaign?.accounts.map(((e,t)=>({label:e["account-name"],value:e["api-key"],index:t})))||[],isMulti:!1,onChange:e=>{t({activeCampaignAccount:e})}}),e?.activeCampaignAccount?.value&&(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(H,{label:(0,i.__)("Provider Lists","popup-builder-block"),value:e?.activeCampaignList,options:te,isMulti:!1,onChange:e=>t({activeCampaignList:e})})}),(0,c.jsx)(w,{slug:"activeCampaign",onChange:ce})]}),e?.integration.some((e=>"zapier"===e.value))&&(0,c.jsxs)(m,{title:(0,i.__)("Zapier","popup-builder-block"),children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Account","popup-builder-block"),value:e?.zapierAccount,options:K?.zapier?.accounts.map(((e,t)=>({label:e["account-name"],value:e["webhook-url"],index:t})))||[],isMulti:!1,onChange:e=>{t({zapierAccount:e})}}),(0,c.jsx)(w,{slug:"zapier",onChange:ce})]}),e?.integration.some((e=>"hubspot"===e.value))&&(0,c.jsxs)(m,{title:(0,i.__)("Hubspot","popup-builder-block"),children:[(0,c.jsx)(H,{label:(0,i.__)("Provider Account","popup-builder-block"),value:e?.hubspotAccount,options:K?.hubspot?.accounts.map(((e,t)=>({label:e["account-name"],value:e["access-token"],index:t})))||[],isMulti:!1,onChange:e=>{t({hubspotAccount:e})}}),(0,c.jsx)(w,{slug:"hubspot",onChange:ce})]})]});case"style":return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(m,{title:(0,i.__)("Form","popup-builder-block"),children:[(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.formBgColor,onChange:e=>t({formBgColor:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Padding","popup-builder-block"),values:F(e,"formPadding",o),onChange:e=>G("formPadding",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Margin","popup-builder-block"),values:F(e,"formMargin",o),onChange:e=>G("formMargin",e,o,t)})}),(0,c.jsx)(r.__experimentalDivider,{}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Columns Gap","popup-builder-block"),value:F(e,"columnsGap",o),onChange:e=>G("columnsGap",e,o,t),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Rows Gap","popup-builder-block"),value:F(e,"rowsGap",o),onChange:e=>G("rowsGap",e,o,t),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})})]}),e.showLabel&&(0,c.jsxs)(m,{title:(0,i.__)("Label","popup-builder-block"),children:[(0,c.jsx)(M,{label:(0,i.__)("Typography","popup-builder-block"),value:e.labelTypography,onChange:e=>t({labelTypography:e})}),(0,c.jsx)(s,{label:(0,i.__)("label Color","popup-builder-block"),value:e.labelColor,onChange:e=>t({labelColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Mark Color","popup-builder-block"),value:e.markColor,onChange:e=>t({markColor:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Spacing","popup-builder-block"),value:F(e,"labelSpacing",o),onChange:e=>G("labelSpacing",e,o,t),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})})]}),(0,c.jsxs)(m,{title:(0,i.__)("Field","popup-builder-block"),children:[(0,c.jsx)(M,{label:(0,i.__)("Typography","popup-builder-block"),value:e.fieldTypography,onChange:e=>t({fieldTypography:e})}),(0,c.jsx)(r.__experimentalDivider,{}),(0,c.jsx)(S,{type:"normal",tabs:[{name:"normal",title:(0,i.__)("Normal","popup-builder-block")},{name:"hover",title:(0,i.__)("Hover","popup-builder-block")},{name:"focus",title:(0,i.__)("Focus","popup-builder-block")}],children:n=>"normal"===n.name?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.fieldColor,onChange:e=>t({fieldColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.fieldBgColor,onChange:e=>t({fieldBgColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Placeholder Color","popup-builder-block"),value:e.fieldPlaceholderColor,onChange:e=>t({fieldPlaceholderColor:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.fieldBorder,onChange:e=>t({fieldBorder:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Border Radius","popup-builder-block"),values:F(e,"fieldBorderRadius",o),onChange:e=>G("fieldBorderRadius",e,o,t)})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.fieldBoxShadow,onChange:e=>t({fieldBoxShadow:e})})]}):"hover"===n.name?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.fieldColorHover,onChange:e=>t({fieldColorHover:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.fieldBgColorHover,onChange:e=>t({fieldBgColorHover:e})}),(0,c.jsx)(s,{label:(0,i.__)("Placeholder Color","popup-builder-block"),value:e.fieldPlaceholderColorHover,onChange:e=>t({fieldPlaceholderColorHover:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.fieldBorderHover,onChange:e=>t({fieldBorderHover:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Border Radius","popup-builder-block"),values:F(e,"fieldBorderRadiusHover",o),onChange:e=>G("fieldBorderRadiusHover",e,o,t)})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.fieldBoxShadowHover,onChange:e=>t({fieldBoxShadowHover:e})})]}):"focus"===n.name?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.fieldColorFocus,onChange:e=>t({fieldColorFocus:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.fieldBgColorFocus,onChange:e=>t({fieldBgColorFocus:e})}),(0,c.jsx)(s,{label:(0,i.__)("Placeholder Color","popup-builder-block"),value:e.fieldPlaceholderColorFocus,onChange:e=>t({fieldPlaceholderColorFocus:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.fieldBorderFocus,onChange:e=>t({fieldBorderFocus:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Border Radius","popup-builder-block"),values:F(e,"fieldBorderRadiusFocus",o),onChange:e=>G("fieldBorderRadiusFocus",e,o,t)})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.fieldBoxShadowFocus,onChange:e=>t({fieldBoxShadowFocus:e})})]}):void 0}),(0,c.jsx)(r.__experimentalDivider,{margin:"5"}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Padding","popup-builder-block"),values:F(e,"fieldPadding",o),onChange:e=>G("fieldPadding",e,o,t)})}),(0,c.jsx)(r.__experimentalDivider,{margin:"5"}),(0,c.jsx)(r.__experimentalSpacer,{marginBottom:"5px",children:(0,c.jsx)(r.__experimentalHeading,{level:5,children:(0,i.__)("Icon","popup-builder-block")})}),(0,c.jsx)(s,{label:(0,i.__)("Color","popup-builder-block"),value:e.fieldIconColor,onChange:e=>t({fieldIconColor:e})}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Size","popup-builder-block"),value:F(e,"fieldIconSize",o),onChange:e=>G("fieldIconSize",e,o,t),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Padding","popup-builder-block"),values:F(e,"fieldIconPadding",o),onChange:e=>G("fieldIconPadding",e,o,t)})})]}),(0,c.jsxs)(m,{title:(0,i.__)("Button","popup-builder-block"),children:[(0,c.jsx)(C,{label:(0,i.__)("Use Position","popup-builder-block"),value:e.isButtonPosition,onChange:e=>t({isButtonPosition:e})}),e.isButtonPosition?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(O,{label:(0,i.__)("Position","popup-builder-block"),value:e?.buttonPosition,options:[{label:"Default",value:""},{label:"Absolute",value:"absolute"},{label:"Fixed",value:"fixed"}],onChange:e=>t({buttonPosition:e}),__nextHasNoMarginBottom:!0}),""!==e?.buttonPosition&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(I,{label:(0,i.__)("Horizontal Orientation","popup-builder-block"),value:e?.buttonHorizontalOrientation,options:[{label:"Left",value:"left",icon:p},{label:"Right",value:"right",icon:u}],onChange:e=>{t({buttonHorizontalOrientation:e})},isToggle:!1}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Offset","popup-builder-block"),value:F(e,"buttonHorizontalOffset",o),onChange:e=>G("buttonHorizontalOffset",e,o,t),units:{px:{min:-1e3,max:1e3},vw:{min:-1e3,max:1e3},"%":{min:0,max:1e3}}})}),(0,c.jsx)(I,{label:(0,i.__)("Vertical Orientation","popup-builder-block"),value:e?.buttonVerticalOrientation,options:[{label:"Top",value:"top",icon:g},{label:"Bottom",value:"bottom",icon:f}],onChange:e=>{t({buttonVerticalOrientation:e})},isToggle:!1}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Offset","popup-builder-block"),value:F(e,"buttonVerticalOffset",o),onChange:e=>G("buttonVerticalOffset",e,o,t),units:{px:{min:-1e3,max:1e3},vw:{min:-1e3,max:1e3},"%":{min:0,max:1e3}}})})]})]}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(y,{children:(0,c.jsx)(I,{label:(0,i.__)("Alignment","popup-builder-block"),value:F(e,"buttonAlignment",o),onChange:e=>G("buttonAlignment",e,o,t),options:[{label:(0,i.__)("Left","popup-builder-block"),value:"flex-start",icon:d},{label:(0,i.__)("Center","popup-builder-block"),value:"center",icon:b},{label:(0,i.__)("Right","popup-builder-block"),value:"flex-end",icon:h}]})})}),(0,c.jsx)(M,{label:(0,i.__)("Typography","popup-builder-block"),value:e.buttonTypography,onChange:e=>t({buttonTypography:e})}),(0,c.jsx)(l,{label:(0,i.__)("Text Shadow","popup-builder-block"),value:e?.textShadow,onChange:e=>t({textShadow:e}),exclude:{spread:!0,position:!0}}),(0,c.jsx)(S,{type:"normal",tabs:[{name:"normal",title:(0,i.__)("Normal","popup-builder-block")},{name:"hover",title:(0,i.__)("Hover","popup-builder-block")}],children:o=>"normal"===o.name?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.buttonColor,onChange:e=>t({buttonColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.buttonBgColor,onChange:e=>t({buttonBgColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Icon Color","popup-builder-block"),value:e.buttonIconColor,onChange:e=>t({buttonIconColor:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.buttonBorder,onChange:e=>t({buttonBorder:e})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.buttonBoxShadowNormal,onChange:e=>t({buttonBoxShadowNormal:e})})]}):"hover"===o.name?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.buttonHoverColor,onChange:e=>t({buttonHoverColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.buttonHoverBgColor,onChange:e=>t({buttonHoverBgColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Icon Color","popup-builder-block"),value:e.buttonHoverIconColor,onChange:e=>t({buttonHoverIconColor:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.buttonHoverBorder,onChange:e=>t({buttonHoverBorder:e})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.buttonBoxShadowHover,onChange:e=>t({buttonBoxShadowHover:e})})]}):void 0}),(0,c.jsx)(r.__experimentalDivider,{}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Border Radius","popup-builder-block"),values:F(e,"buttonBorderRadius",o),onChange:e=>G("buttonBorderRadius",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Margin","popup-builder-block"),values:F(e,"buttonMargin",o),onChange:e=>G("buttonMargin",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Padding","popup-builder-block"),values:F(e,"buttonPadding",o),onChange:e=>G("buttonPadding",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(T,{label:(0,i.__)("Icon Size","popup-builder-block"),value:F(e,"buttonIconSize",o),onChange:e=>G("buttonIconSize",e,o,t),units:{px:{min:0,max:100,step:1},rem:{min:0,max:10,step:.1},em:{min:0,max:10,step:.1}}})})]}),(0,c.jsxs)(m,{title:(0,i.__)("Submission Message","popup-builder-block"),children:[(0,c.jsx)(M,{label:(0,i.__)("Typography","popup-builder-block"),value:e.successMessageTypography,onChange:e=>t({successMessageTypography:e})}),(0,c.jsx)(s,{label:(0,i.__)("Text Color","popup-builder-block"),value:e.successMessageColor,onChange:e=>t({successMessageColor:e})}),(0,c.jsx)(s,{label:(0,i.__)("Background Color","popup-builder-block"),value:e.successMessageBg,onChange:e=>t({successMessageBg:e})}),(0,c.jsx)(A,{label:(0,i.__)("Border","popup-builder-block"),value:e.submissionSuccessMessageBorder,onChange:e=>t({submissionSuccessMessageBorder:e})}),(0,c.jsx)(l,{label:(0,i.__)("Box Shadow","popup-builder-block"),value:e?.successMessageBoxShadow,onChange:e=>t({successMessageBoxShadow:e})}),(0,c.jsx)(r.__experimentalDivider,{}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Border Radius","popup-builder-block"),values:F(e,"submissionMessageBorderRadius",o),onChange:e=>G("submissionMessageBorderRadius",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Margin","popup-builder-block"),values:F(e,"submissionMessageMargin",o),onChange:e=>G("submissionMessageMargin",e,o,t)})}),(0,c.jsx)(y,{children:(0,c.jsx)(N,{label:(0,i.__)("Padding","popup-builder-block"),values:F(e,"submissionMessagePadding",o),onChange:e=>G("submissionMessagePadding",e,o,t)})})]})]})}}})}));var M=o(6942),B=o.n(M);const D=({blockProps:e,attributes:t,setAttributes:o,isEdit:n=!1})=>{const{inputFieldSize:a,requiredMark:r,showLabel:s,buttonFieldSize:p,hideNameField:u}=t,{GkitIcon:d}=window.popupBuilderBlock.components,b=(document.title,["name","email","tel"]);return(0,c.jsxs)("form",{...e,children:[t.formFields.map(((e,t)=>{const{type:a,label:p,placeholder:u,id:h,required:g=!1,icon:f,textAreaRows:m,showIcon:v,defaultValue:y=""}=e,_="textarea"!==a?"input":"textarea",x="textarea"!==a?{type:"name"===a?"text":a}:{rows:m||3};return y&&(n?x.defaultValue=y:x.value=y),(0,c.jsxs)("div",{className:B()("pbb-form__field",`pbb-form__field-${t}`),children:[n&&s?(0,c.jsx)(l.RichText,{identifier:`label-${t}`,tagName:"label",value:p,className:B()("pbb-form__label",{required:g&&r}),placeholder:(0,i.__)("Enter Label...","popup-builder-block"),onChange:e=>{((e,t,n)=>{const i=JSON.parse(JSON.stringify(formFields));i[e].label=n,o({formFields:i})})(t,0,e)}}):s&&(0,c.jsxs)("label",{className:B()("pbb-form__label",{required:g&&r}),for:h||`${a}-${t}`,children:[" ",p," "]}),(0,c.jsxs)("div",{className:"pbb-form__input-wrap",children:[v&&(0,c.jsx)(d,{icon:f,tagName:"span",className:"input-icon"}),(0,c.jsx)(_,{name:b.includes(a)?a:p?(w=p,w.toLowerCase().replace(/\s+/g,"-")):`${a}-${t+1}`,id:h||`${a}-${t+1}`,className:"pbb-form__input",placeholder:u,required:g,...x})]})]},t);var w})),(0,c.jsx)("div",{className:"pbb-form__field pbb-form__submit-btn-wrap",children:(0,c.jsxs)("button",{type:"submit",className:"pbb-form__submit-btn",onClick:e=>e.preventDefault(),children:[t?.usebuttonIcon&&(0,c.jsx)(d,{icon:t?.buttonIcon,tagName:"span",className:"input-icon"}),n?(0,c.jsx)(l.RichText,{identifier:"submit",tagName:"span",className:"btn-text",value:t?.buttonText,onChange:e=>{o({buttonText:e})},placeholder:(0,i.__)("Subscribe","popup-builder-block")}):(0,c.jsx)("span",{className:"btn-text",children:t?.buttonText})]})})]})},E=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"popup-builder-block/form","version":"1.0.0","title":"Form","category":"popup-builder-block","icon":"menu-alt3","keywords":["form","data","popupkit","popup-builder-block","submit"],"description":"popup-builder-block Form block.","example":{"preview":true},"attributes":{"blockID":{"type":"string"},"blockClass":{"type":"string"},"blocksCSS":{"type":"object"},"inputFieldSize":{"type":"string","default":"25"},"showLabel":{"type":"boolean","default":false},"requiredMark":{"type":"boolean","default":false},"hideNameField":{"type":"boolean","default":false},"formBgColor":{"type":"string"},"formPaddingDesktop":{"type":"object"},"formPaddingTablet":{"type":"object"},"formPaddingMobile":{"type":"object"},"formPaddingTabletLandscape":{"type":"object"},"formPaddingMobileLandscape":{"type":"object"},"formPaddingLaptop":{"type":"object"},"formPaddingWideScreen":{"type":"object"},"formMarginDesktop":{"type":"object"},"formMarginTablet":{"type":"object"},"formMarginMobile":{"type":"object"},"formMarginTabletLandscape":{"type":"object"},"formMarginMobileLandscape":{"type":"object"},"formMarginLaptop":{"type":"object"},"formMarginWideScreen":{"type":"object"},"buttonWidthDesktop":{"type":"object","default":{"unit":"%","size":100}},"buttonWidthTablet":{"type":"object"},"buttonWidthMobile":{"type":"object"},"buttonText":{"type":"string","default":"Subscribe Now"},"buttonClickAction":{"type":"string","default":"none"},"step":{"type":"string"},"buttonRedirectUrl":{"type":"object"},"buttonEmail":{"type":"string"},"buttonSuccessMessage":{"type":"string","default":"Submitted Successfully"},"buttonPhone":{"type":"string"},"buttonCopyText":{"type":"string"},"buttonNewWindowUrl":{"type":"object"},"closeCampaign":{"type":"boolean","default":true},"closeCampaignDelay":{"type":"number","default":3},"istrackConversion":{"type":"boolean","default":true},"integration":{"type":"array","default":[]},"popupkitLeads":{"type":"array","default":[{"label":"Location","value":"location"},{"label":"Browser","value":"browser"},{"label":"Device","value":"device"}]},"mailchimpAccount":{"type":"object"},"fluentCRMAccount":{"type":"object"},"activeCampaignAccount":{"type":"object"},"hubspotAccount":{"type":"object"},"zapierAccount":{"type":"object"},"mailchimpDoubleOptin":{"type":"boolean","default":false},"mailchimpList":{"type":"object"},"activeCampaignList":{"type":"object"},"hubspotList":{"type":"object"},"zapierList":{"type":"object"},"columnsGapDesktop":{"type":"object","default":{"unit":"px","size":10}},"columnsGapWideScreen":{"type":"object"},"columnsGapLaptop":{"type":"object"},"columnsGapTabletLandscape":{"type":"object"},"columnsGapTablet":{"type":"object"},"columnsGapMobileLandscape":{"type":"object"},"columnsGapMobile":{"type":"object"},"rowsGapDesktop":{"type":"object","default":{"unit":"px","size":10}},"rowsGapWideScreen":{"type":"object"},"rowsGapLaptop":{"type":"object"},"rowsGapTabletLandscape":{"type":"object"},"rowsGapTablet":{"type":"object"},"rowsGapMobileLandscape":{"type":"object"},"rowsGapMobile":{"type":"object"},"fieldPlaceholderColor":{"type":"string"},"fieldPlaceholderColorHover":{"type":"string"},"fieldPlaceholderColorFocus":{"type":"string"},"fieldColor":{"type":"string"},"fieldColorHover":{"type":"string"},"fieldColorFocus":{"type":"string"},"fieldBgColor":{"type":"string"},"fieldBgColorHover":{"type":"string"},"fieldBgColorFocus":{"type":"string"},"fieldTypography":{"type":"object"},"fieldPaddingDesktop":{"type":"object"},"fieldPaddingWideScreen":{"type":"object"},"fieldPaddingLaptop":{"type":"object"},"fieldPaddingTablet":{"type":"object"},"fieldPaddingTabletLandscape":{"type":"object"},"fieldPaddingMobile":{"type":"object"},"fieldPaddingMobileLandscape":{"type":"object"},"fieldBorder":{"type":"object"},"fieldBorderHover":{"type":"object"},"fieldBorderFocus":{"type":"object"},"fieldBoxShadow":{"type":"object"},"fieldBoxShadowHover":{"type":"object"},"fieldBoxShadowFocus":{"type":"object"},"fieldBorderRadiusDesktop":{"type":"object"},"fieldBorderRadiusTablet":{"type":"object"},"fieldBorderRadiusMobile":{"type":"object"},"fieldBorderRadiusTabletLandscape":{"type":"object"},"fieldBorderRadiusMobileLandscape":{"type":"object"},"fieldBorderRadiusLaptop":{"type":"object"},"fieldBorderRadiusWideScreen":{"type":"object"},"fieldBorderRadiusHoverDesktop":{"type":"object"},"fieldBorderRadiusHoverTablet":{"type":"object"},"fieldBorderRadiusHoverMobile":{"type":"object"},"fieldBorderRadiusHoverTabletLandscape":{"type":"object"},"fieldBorderRadiusHoverMobileLandscape":{"type":"object"},"fieldBorderRadiusHoverLaptop":{"type":"object"},"fieldBorderRadiusHoverWideScreen":{"type":"object"},"fieldBorderRadiusFocusDesktop":{"type":"object"},"fieldBorderRadiusFocusTablet":{"type":"object"},"fieldBorderRadiusFocusMobile":{"type":"object"},"fieldBorderRadiusFocusTabletLandscape":{"type":"object"},"fieldBorderRadiusFocusMobileLandscape":{"type":"object"},"fieldBorderRadiusFocusLaptop":{"type":"object"},"fieldBorderRadiusFocusWideScreen":{"type":"object"},"labelSpacingDesktop":{"type":"object","default":{"unit":"px","size":10}},"labelSpacingWideScreen":{"type":"object"},"labelSpacingLaptop":{"type":"object"},"labelSpacingTabletLandscape":{"type":"object"},"labelSpacingTablet":{"type":"object"},"labelSpacingMobileLandscape":{"type":"object"},"labelSpacingMobile":{"type":"object"},"labelColor":{"type":"string"},"markColor":{"type":"string"},"labelTypography":{"type":"object"},"buttonAlignmentDesktop":{"type":"string"},"buttonAlignmentWideScreen":{"type":"string"},"buttonAlignmentLaptop":{"type":"string"},"buttonAlignmentTablet":{"type":"string"},"buttonAlignmentTabletLandscape":{"type":"string"},"buttonAlignmentMobileLandscape":{"type":"string"},"buttonAlignmentMobile":{"type":"string"},"buttonTypography":{"type":"object"},"textShadow":{"type":"object"},"usebuttonIcon":{"type":"boolean","default":false},"buttonIcon":{"type":"object"},"buttonBoxShadowNormal":{"type":"object"},"buttonBoxShadowHover":{"type":"object"},"iconPosition":{"type":"string","default":"left"},"iconSpaceBetween":{"type":"object","default":{"unit":"px","size":10}},"buttonIconSizeDesktop":{"type":"object"},"buttonIconSizeWideScreen":{"type":"object"},"buttonIconSizeLaptop":{"type":"object"},"buttonIconSizeTabletLandscape":{"type":"object"},"buttonIconSizeTablet":{"type":"object"},"buttonIconSizeMobileLandscape":{"type":"object"},"buttonIconSizeMobile":{"type":"object"},"buttonColor":{"type":"string"},"buttonIconColor":{"type":"string"},"buttonHoverIconColor":{"type":"string"},"buttonBgColor":{"type":"string"},"buttonBorder":{"type":"object"},"buttonHoverColor":{"type":"string"},"buttonHoverBgColor":{"type":"string"},"buttonHoverBorder":{"type":"object"},"buttonBorderRadiusDesktop":{"type":"object"},"buttonBorderRadiusWideScreen":{"type":"object"},"buttonBorderRadiusLaptop":{"type":"object"},"buttonBorderRadiusTabletLandscape":{"type":"object"},"buttonBorderRadiusTablet":{"type":"object"},"buttonBorderRadiusMobileLandscape":{"type":"object"},"buttonBorderRadiusMobile":{"type":"object"},"buttonPaddingDesktop":{"type":"object"},"buttonPaddingWideScreen":{"type":"object"},"buttonPaddingLaptop":{"type":"object"},"buttonPaddingTabletLandscape":{"type":"object"},"buttonPaddingTablet":{"type":"object"},"buttonPaddingMobileLandscape":{"type":"object"},"buttonPaddingMobile":{"type":"object"},"buttonMarginDesktop":{"type":"object"},"buttonMarginWideScreen":{"type":"object"},"buttonMarginLaptop":{"type":"object"},"buttonMarginTabletLandscape":{"type":"object"},"buttonMarginTablet":{"type":"object"},"buttonMarginMobileLandscape":{"type":"object"},"buttonMarginMobile":{"type":"object"},"successMessageColor":{"type":"string"},"successMessageBg":{"type":"string"},"errorMessageColor":{"type":"string"},"errorMessageBg":{"type":"string"},"submissionMessageWidthDesktop":{"type":"object","default":{"unit":"px","size":400}},"submissionMessageWidthWideScreen":{"type":"object"},"submissionMessageWidthLaptop":{"type":"object"},"submissionMessageWidthTabletLandscape":{"type":"object"},"submissionMessageWidthTablet":{"type":"object"},"submissionMessageWidthMobileLandscape":{"type":"object"},"submissionMessageWidthMobile":{"type":"object"},"submissionMessagePaddingDesktop":{"type":"object"},"submissionMessagePaddingWideScreen":{"type":"object"},"submissionMessagePaddingLaptop":{"type":"object"},"submissionMessagePaddingTabletLandscape":{"type":"object"},"submissionMessagePaddingTablet":{"type":"object"},"submissionMessagePaddingMobileLandscape":{"type":"object"},"submissionMessagePaddingMobile":{"type":"object"},"submissionMessageMarginDesktop":{"type":"object"},"submissionMessageMarginWideScreen":{"type":"object"},"submissionMessageMarginLaptop":{"type":"object"},"submissionMessageMarginTabletLandscape":{"type":"object"},"submissionMessageMarginTablet":{"type":"object"},"submissionMessageMarginMobileLandscape":{"type":"object"},"submissionMessageMarginMobile":{"type":"object"},"submissionSuccessMessageBorder":{"type":"object"},"submissionErrorMessageBorder":{"type":"object"},"submissionMessageBorderRadiusDesktop":{"type":"object"},"submissionMessageBorderRadiusWideScreen":{"type":"object"},"submissionMessageBorderRadiusLaptop":{"type":"object"},"submissionMessageBorderRadiusTabletLandscape":{"type":"object"},"submissionMessageBorderRadiusTablet":{"type":"object"},"submissionMessageBorderRadiusMobileLandscape":{"type":"object"},"submissionMessageBorderRadiusMobile":{"type":"object"},"fieldIconColor":{"type":"string"},"fieldIconSizeDesktop":{"type":"object"},"fieldIconSizeWideScreen":{"type":"object"},"fieldIconSizeLaptop":{"type":"object"},"fieldIconSizeTabletLandscape":{"type":"object"},"fieldIconSizeTablet":{"type":"object"},"fieldIconSizeMobileLandscape":{"type":"object"},"fieldIconSizeMobile":{"type":"object"},"fieldIconPaddingDesktop":{"type":"object"},"fieldIconPaddingWideScreen":{"type":"object"},"fieldIconPaddinglaptop":{"type":"object"},"fieldIconPaddingTabletLandscape":{"type":"object"},"fieldIconPaddingTablet":{"type":"object"},"fieldIconPaddingMobileLandscape":{"type":"object"},"fieldIconPaddingMobile":{"type":"object"},"formFields":{"type":"array","default":[{"type":"name","label":"Name","placeholder":"Enter your name","required":true,"width":{"fieldSize":{"Desktop":{"unit":"%","size":100}}},"showIcon":false},{"type":"email","label":"Email","placeholder":"Enter your email","required":true,"width":{"fieldSize":{"Desktop":{"unit":"%","size":100}}},"showIcon":false}]},"isButtonPosition":{"type":"boolean","default":false},"buttonPosition":{"type":"string","default":""},"buttonVerticalOrientation":{"type":"string"},"buttonVerticalOffsetDesktop":{"type":"object"},"buttonVerticalOffsetWideScreen":{"type":"object"},"buttonVerticalOffsetLaptop":{"type":"object"},"buttonVerticalOffsetTablet":{"type":"object"},"buttonVerticalOffsetTabletLandscape":{"type":"object"},"buttonVerticalOffsetMobile":{"type":"object"},"buttonVerticalOffsetMobileLandscape":{"type":"object"},"buttonHorizontalOrientation":{"type":"string"},"buttonHorizontalOffsetDesktop":{"type":"object"},"buttonHorizontalOffsetWideScreen":{"type":"object"},"buttonHorizontalOffsetLaptop":{"type":"object"},"buttonHorizontalOffsetTablet":{"type":"object"},"buttonHorizontalOffsetTabletLandscape":{"type":"object"},"buttonHorizontalOffsetMobile":{"type":"object"},"buttonHorizontalOffsetMobileLandscape":{"type":"object"},"successMessageTypography":{"type":"object"},"successMessageBorder":{"type":"object"},"successMessageBoxShadow":{"type":"object"}},"supports":{"html":false,"anchor":true},"textdomain":"popup-builder-block","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./frontend.js"}');(0,n.registerBlockType)(E.name,{...E,edit:function({attributes:e,setAttributes:t,clientId:o,isSelected:n}){const{GkitStyle:i,GkitIcon:a,GkitSuspense:r}=window.popupBuilderBlock.components,{useDeviceType:s,useBlockStyles:p}=window.popupBuilderBlock.helpers,u=s(),d=(0,l.useBlockProps)({className:"pbb-form",autoComplete:"off"});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i,{blocksCSS:e?.blocksCSS}),n&&(0,c.jsx)(r,{children:(0,c.jsx)(S,{attributes:e,setAttributes:t,device:u,clientId:o})}),(0,c.jsx)(D,{blockProps:d,attributes:e,setAttributes:t,isEdit:!0})]})},icon:{src:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",fill:"none",children:(0,c.jsx)("path",{d:"M19.188 1.75H4.812A3.566 3.566 0 0 0 1.25 5.312v14.375a3.566 3.566 0 0 0 3.562 3.562h14.375a3.566 3.566 0 0 0 3.562-3.562V5.312a3.565 3.565 0 0 0-3.561-3.562zm2.062 17.938a2.064 2.064 0 0 1-2.062 2.062H4.812a2.064 2.064 0 0 1-2.062-2.062V5.312c0-1.137.925-2.062 2.062-2.062h14.375c1.138 0 2.062.925 2.062 2.062v14.375l.001.001zM18 5.5H6a.75.75 0 0 0-.75.75v3c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-3A.75.75 0 0 0 18 5.5zm-.75 3H6.75V7h10.5v1.5zm.75 3H6a.75.75 0 0 0-.75.75v3c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-.75-.75zm-.75 3H6.75V13h10.5v1.5zM18 18h-6a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z",fill:"#181A26"})})},save:function({attributes:e,clientId:t}){let o={action:e.buttonClickAction,istrackConversion:e.istrackConversion,message:e.buttonSuccessMessage};const n=()=>{o.closeCampaign=e.closeCampaign,3!==e?.closeCampaignDelay&&(o.closeCampaignDelay=e.closeCampaignDelay)};switch(e.buttonClickAction){case"none":n();break;case"redirect-url":o.redirectURL=e.buttonRedirectUrl?.url;break;case"email":o.email=e.buttonEmail,n();break;case"call":o.phone=e.buttonPhone,n();break;case"copy-text":o.copyText=e.buttonCopyText,n();break;case"new-window":o.newWindowURL=e.buttonNewWindowUrl?.url,n();break;case"close-campaign":o.closeCampaign=!0;break;case"step":o.step=e.step}if(e?.integration?.length>0){const t=e?.integration.map((e=>e.value));if(o.integration={},t.includes("popupkit")){const t=e?.popupkitLeads?.map((e=>e.value))||[];o.integration.popupkitLeads=t}var i,a,r,s,p,u,d,b,h;t.includes("mailchimp")&&(o.integration.mailchimp={apiKey:null!==(i=e?.mailchimpAccount?.index)&&void 0!==i?i:"",listId:e?.mailchimpList?.value||"",doubleOptin:null!==(a=e?.mailchimpDoubleOptin)&&void 0!==a&&a}),t.includes("fluentCRM")&&(o.integration.fluentCRM={apiKey:null!==(r=e?.fluentCRMAccount?.index)&&void 0!==r?r:""}),t.includes("activeCampaign")&&(o.integration.activeCampaign={apiKey:null!==(s=e?.activeCampaignAccount?.index)&&void 0!==s?s:"",listId:null!==(p=e?.activeCampaignList?.value)&&void 0!==p?p:""}),t.includes("zapier")&&(o.integration.zapier={apiKey:null!==(u=e?.zapierAccount?.index)&&void 0!==u?u:"",listId:null!==(d=e?.zapierList?.value)&&void 0!==d?d:""}),t.includes("hubspot")&&(o.integration.hubspot={apiKey:null!==(b=e?.hubspotAccount?.index)&&void 0!==b?b:"",listId:null!==(h=e?.hubspotList?.value)&&void 0!==h?h:""})}const g=l.useBlockProps.save({className:"pbb-form",method:"post",autoComplete:"on","data-settings":JSON.stringify(o),novalidate:!0});return(0,c.jsx)(D,{blockProps:g,attributes:e})}})},5901:(e,t,o)=>{var n=o(246),i=o(1720),l=o(1609),a=o(8997);function r(e){return e&&e.__esModule?e.default:e}function s(e,t,o,n){Object.defineProperty(e,t,{get:o,set:n,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function p(e){e.forEach((e=>c(e.element)))}function u(e){e.forEach((e=>{!function(e,t,o){const n=e.children[o]||null;e.insertBefore(t,n)}(e.parentElement,e.element,e.oldIndex)}))}function d(e,t){const o=g(e),n={parentElement:e.from};let i=[];switch(o){case"normal":i=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":i=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...n},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...n}];break;case"multidrag":i=e.oldIndicies.map(((t,o)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[o].index,...n})))}const l=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(i,t);return l}function b(e,t){const o=[...t];return e.concat().reverse().forEach((e=>o.splice(e.oldIndex,1))),o}function h(e,t,o,n){const i=[...t];return e.forEach((e=>{const t=n&&o&&n(e.item,o);i.splice(e.newIndex,0,t||e.item)})),i}function g(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>m));const f={dragging:null};class m extends l.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,l.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,f),r(a)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();r(n).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:o,id:n}=this.props,i={style:t,className:o,id:n},a=e&&null!==e?e:"div";return(0,l.createElement)(a,{ref:this.ref,...i},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:o="sortable-selected",chosenClass:n="sortable-chosen",dragClass:a="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:p="sortable-swap-highlight",filter:u="sortable-filter",list:d}=this.props;if(!e||null==e)return null;const b=t||"data-id";return l.Children.map(e,((e,t)=>{if(void 0===e)return;const a=d[t]||{},{className:s}=e.props,c="string"==typeof u&&{[u.replace(".","")]:!!a.filtered},p=r(i)(s,{[o]:a.selected,[n]:a.chosen,...c});return(0,l.cloneElement)(e,{[b]:e.key,className:p})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:o,children:n,tag:i,style:l,className:a,clone:r,onAdd:s,onChange:c,onChoose:p,onClone:u,onEnd:d,onFilter:b,onRemove:h,onSort:g,onStart:f,onUnchoose:m,onUpdate:v,onMove:y,onSpill:_,onSelect:x,onDeselect:w,...C}=e;return C}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:o}=this.props,n=e.willInsertAfter||-1;if(!o)return n;const i=o(e,t,this.sortable,f);return void 0!==i&&i}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const o=this.props[t];o&&o(e,this.sortable,f)}onAdd(e){const{list:t,setList:o,clone:n}=this.props,i=d(e,[...f.dragging.props.list]);p(i),o(h(i,t,e,n).map((e=>Object.assign(e,{selected:!1}))),this.sortable,f)}onRemove(e){const{list:t,setList:o}=this.props,n=g(e),i=d(e,t);u(i);let l=[...t];if("clone"!==e.pullMode)l=b(i,l);else{let t=i;switch(n){case"multidrag":t=i.map(((t,o)=>({...t,element:e.clones[o]})));break;case"normal":t=i.map((t=>({...t,element:e.clone})));break;default:r(a)(!0,`mode "${n}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${n}" plugin`)}p(t),i.forEach((t=>{const o=t.oldIndex,n=this.props.clone(t.item,e);l.splice(o,1,n)}))}l=l.map((e=>Object.assign(e,{selected:!1}))),o(l,this.sortable,f)}onUpdate(e){const{list:t,setList:o}=this.props,n=d(e,t);return p(n),u(n),o(function(e,t){return h(e,b(e,t))}(n,t),this.sortable,f)}onStart(){f.dragging=this}onEnd(){f.dragging=null}onChoose(e){const{list:t,setList:o}=this.props;o(t.map(((t,o)=>{let n=t;return o===e.oldIndex&&(n=Object.assign(t,{chosen:!0})),n})),this.sortable,f)}onUnchoose(e){const{list:t,setList:o}=this.props;o(t.map(((t,o)=>{let n=t;return o===e.oldIndex&&(n=Object.assign(n,{chosen:!1})),n})),this.sortable,f)}onSpill(e){const{removeOnSpill:t,revertOnSpill:o}=this.props;t&&!o&&c(e.item)}onSelect(e){const{list:t,setList:o}=this.props,n=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const o=t.index;if(-1===o)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);n[o].selected=!0})),o(n,this.sortable,f)}onDeselect(e){const{list:t,setList:o}=this.props,n=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(n[t].selected=!0)})),o(n,this.sortable,f)}}var v,y;v=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||v.hasOwnProperty(e)||Object.defineProperty(v,e,{enumerable:!0,get:function(){return y[e]}})}))},6942:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=a(e,l(o)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)n.call(e,o)&&e[o]&&(t=a(t,o));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o)}()},8997:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>l});var n=!0,i="Invariant failed";function l(e,t){if(!e){if(n)throw new Error(i);var o="function"==typeof t?t():t;throw new Error(o?i+": "+o:i)}}}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var l=o[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,o,i,l)=>{if(!o){var a=1/0;for(p=0;p<e.length;p++){for(var[o,i,l]=e[p],r=!0,s=0;s<o.length;s++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](o[s])))?o.splice(s--,1):(r=!1,l<a&&(a=l));if(r){e.splice(p--,1);var c=i();void 0!==c&&(t=c)}}return t}l=l||0;for(var p=e.length;p>0&&e[p-1][2]>l;p--)e[p]=e[p-1];e[p]=[o,i,l]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={519:0,119:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,l,[a,r,s]=o,c=0;if(a.some((t=>0!==e[t]))){for(i in r)n.o(r,i)&&(n.m[i]=r[i]);if(s)var p=s(n)}for(t&&t(o);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(p)},o=globalThis.webpackChunkpopup_builder_block=globalThis.webpackChunkpopup_builder_block||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var i=n.O(void 0,[119],(()=>n(5021)));i=n.O(i)})();