%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/1857783/root/var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/repeater/
Upload File :
Create Path :
Current File : //proc/1857783/root/var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/repeater/script.min.js

/*! For license information please see script.js.LICENSE.txt */
!function(){var e={7708:function(e,t,n){var r;function o(e){return o="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},o(e)}!function(){"use strict";var i=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)i(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty,r=/\s+/;function i(e,i){if(i){var a=o(i);"string"===a?function(e,t){for(var n=t.split(r),o=n.length,i=0;i<o;++i)e[n[i]]=!0}(e,i):Array.isArray(i)?t(e,i):"object"===a?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,i):"number"===a&&function(e,t){e[t]=!0}(e,i)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=new e;t(i,r);var a=[];for(var l in i)i[l]&&a.push(l);return a.join(" ")}}();e.exports?(i.default=i,e.exports=i):"object"===o(n.amdO)&&n.amdO?void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r):window.classNames=i}()},2456:function(e){"use strict";e.exports=function(e,t,n,r,o,i,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},9739:function(e,t,n){"use strict";var r=n(6669);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7329:function(e,t,n){e.exports=n(9739)()},6669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9807:function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){l(e,t,n[t])}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function d(e){return d="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},d(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}n.d(t,{Z:function(){return ke}});var v=React,b=ReactDOM,w=n(2456),x=n.n(w);var S=n(7329),O=n.n(S),C=function(){function e(){c(this,e),l(this,"refs",{})}return f(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(E)}}]),e}();function E(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function T(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var I={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},R=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function k(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function _(e,t){e.style["".concat(R,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function D(e,t){e.style["".concat(R,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function j(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function A(e,t,n){return Math.max(e,Math.min(n,t))}function N(e){return"px"===e.substr(-2)?parseFloat(e):0}function P(e){var t=window.getComputedStyle(e);return{bottom:N(t.marginBottom),left:N(t.marginLeft),right:N(t.marginRight),top:N(t.marginTop)}}function M(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function L(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function z(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function W(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:H(e.parentNode,t,r)}}function B(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function K(e){var t=e.lockOffset,n=e.width,r=e.height,o=t,i=t,a="px";if("string"==typeof t){var l=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);x()(null!==l,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),o=parseFloat(t),i=parseFloat(t),a=l[1]}return x()(isFinite(o)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(o=o*n/100,i=i*r/100),{x:o,y:i}}function G(e){var t=e.height,n=e.width,r=e.lockOffset,o=Array.isArray(r)?r:[r,r];x()(2===o.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var i=a(o,2),l=i[0],s=i[1];return[K({height:t,lockOffset:l,width:n}),K({height:t,lockOffset:s,width:n})]}function V(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:V(e.parentNode):null}function U(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:N(t.gridColumnGap),y:N(t.gridRowGap)}:{x:0,y:0}}var F="BUTTON",Y="INPUT",X="OPTION",q="TEXTAREA",$="SELECT";function J(e){var t,n="input, textarea, select, canvas, [contenteditable]",r=e.querySelectorAll(n),a=e.cloneNode(!0);return(t=a.querySelectorAll(n),function(e){if(Array.isArray(e))return o(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||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.")}()).forEach((function(e,t){"file"!==e.type&&(e.value=r[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),"CANVAS"===e.tagName&&r[t].width>0&&r[t].height>0&&e.getContext("2d").drawImage(r[t],0,0)})),a}function Z(e){return null!=e.sortableHandle}var Q=function(){function e(t,n){c(this,e),this.container=t,this.onScrollCallback=n}return f(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,l={x:0,y:0},s={x:1,y:1},c=this.container,u=c.scrollTop,f=c.scrollLeft,d=c.scrollHeight,h=c.scrollWidth,p=0===u,m=d-u-c.clientHeight==0,y=0===f,g=h-f-c.clientWidth==0;n.y>=o.y-a/2&&!m?(l.y=1,s.y=10*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!g?(l.x=1,s.x=10*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!p?(l.y=-1,s.y=10*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!y&&(l.x=-1,s.x=10*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===l.x&&0===l.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:s.x*l.x,top:s.y*l.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),ee={axis:O().oneOf(["x","y","xy"]),contentWindow:O().any,disableAutoscroll:O().bool,distance:O().number,getContainer:O().func,getHelperDimensions:O().func,helperClass:O().string,helperContainer:O().oneOfType([O().func,"undefined"==typeof HTMLElement?O().any:O().instanceOf(HTMLElement)]),hideSortableGhost:O().bool,keyboardSortingTransitionDuration:O().number,lockAxis:O().string,lockOffset:O().oneOfType([O().number,O().string,O().arrayOf(O().oneOfType([O().number,O().string]))]),lockToContainerEdges:O().bool,onSortEnd:O().func,onSortMove:O().func,onSortOver:O().func,onSortStart:O().func,pressDelay:O().number,pressThreshold:O().number,keyCodes:O().shape({lift:O().arrayOf(O().number),drop:O().arrayOf(O().number),cancel:O().arrayOf(O().number),up:O().arrayOf(O().number),down:O().arrayOf(O().number)}),shouldCancelStart:O().func,transitionDuration:O().number,updateBeforeSortStart:O().func,useDragHandle:O().bool,useWindowAsScrollContainer:O().bool},te={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},ne={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:te,shouldCancelStart:function(e){return-1!==[Y,q,$,X,F].indexOf(e.target.tagName)||!!j(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},re=Object.keys(ee);function oe(e){x()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function ie(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var ae=(0,v.createContext)({manager:{}}),le={index:O().number.isRequired,collection:O().oneOfType([O().number,O().string]),disabled:O().bool},se=Object.keys(le);function ce(e){return ce="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},ce(e)}function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},de(e,t)}function he(e,t){if(t&&("object"===ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function ye(){return ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(this,arguments)}var ge=wp.i18n.__,ve=wp.element.Component,be=wp.components,we=be.BaseControl,xe=be.Button,Se=be.Tooltip,Oe=be.ToggleControl,Ce=wp.compose.withInstanceId,Ee=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;c(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return l(h(h(t=p(this,(e=m(n)).call.apply(e,[this].concat(o))))),"wrappedInstance",(0,v.createRef)()),t}return g(n,t),f(n,[{key:"componentDidMount",value:function(){(0,b.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return x()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,v.createElement)(e,r({ref:t},this.props))}}]),n}(v.Component),l(t,"displayName",M("sortableHandle",e)),n}((function(){return wp.element.createElement(xe,{className:"lzb-gutenberg-repeater-btn-drag",onClick:function(e){e.stopPropagation()},role:"button"},wp.element.createElement("svg",{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"})))})),Te=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;c(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return l(h(h(t=p(this,(e=m(n)).call.apply(e,[this].concat(o))))),"wrappedInstance",(0,v.createRef)()),t}return g(n,t),f(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,o=(0,b.findDOMNode)(this);o.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=o,this.ref={node:o},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return x()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,v.createElement)(e,r({ref:t},T(this.props,se)))}}]),n}(v.Component),l(t,"displayName",M("sortableElement",e)),l(t,"contextType",ae),l(t,"propTypes",le),l(t,"defaultProps",{collection:0}),n}((function(e){return wp.element.createElement("div",{className:"lzb-gutenberg-repeater-item"},wp.element.createElement("button",{className:"lzb-gutenberg-repeater-btn".concat(e.active?" lzb-gutenberg-repeater-btn-active":""),onClick:e.onToggle},wp.element.createElement(Ee,null),e.title,wp.element.createElement("div",{className:"lzb-gutenberg-repeater-btn-arrow"},wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})))),!e.controlData.rows_min||e.count>e.controlData.rows_min?wp.element.createElement("button",{className:"lzb-gutenberg-repeater-btn-remove",onClick:e.onRemove},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"}))):"",e.active?e.renderContent():"")})),Ie=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;c(this,n),l(h(h(t=p(this,m(n).call(this,e)))),"state",{}),l(h(h(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=z(e);var i=j(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,l=i.sortableInfo,s=l.index,c=l.collection;if(l.disabled)return;if(a&&!j(e.target,Z))return;t.manager.active={collection:c,index:s},W(e)||"A"!==e.target.tagName||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),l(h(h(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),l(h(h(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=z(e),a={x:t.position.x-i.x,y:t.position.y-i.y},l=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(l>=o)?r&&l>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),l(h(h(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),l(h(h(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),l(h(h(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=h.sortableInfo.index,r=P(h),o=U(t.container),u=t.scrollContainer.getBoundingClientRect(),y=a({index:n,node:h,collection:p});if(t.node=h,t.margin=r,t.gridGap=o,t.width=y.width,t.height=y.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=u,t.index=n,t.newIndex=n,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=H(h,t.container),t.initialOffset=z(m?s({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(J(h)),k(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),m&&t.helper.focus(),c&&(t.sortableGhost=h,k(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},m){var g=d?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,v=g.top,b=g.left,w=g.width,x=v+g.height,S=b+w;t.axis.x&&(t.minTranslate.x=b-t.boundingClientRect.left,t.maxTranslate.x=S-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=v-t.boundingClientRect.top,t.maxTranslate.y=x-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(d?0:u.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(d?t.contentWindow.innerWidth:u.left+u.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(d?0:u.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(d?t.contentWindow.innerHeight:u.top+u.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,m?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(I.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),I.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),f&&f({node:h,index:n,collection:p,isKeySorting:m,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),m&&t.keyMove(0)},o=t.props,i=o.axis,a=o.getHelperDimensions,l=o.helperClass,c=o.hideSortableGhost,u=o.updateBeforeSortStart,f=o.onSortStart,d=o.useWindowAsScrollContainer,h=n.node,p=n.collection,m=t.manager.isKeySorting,y=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=ie((function(){var t=h.sortableInfo.index;return Promise.resolve(u({collection:p,index:t,node:h,isKeySorting:m},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return y&&y.then?y.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),l(h(h(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),l(h(h(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,l=i.isKeySorting,s=t.manager.getOrderedRefs();t.listenerNode&&(l?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(I.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),I.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&k(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=s.length;c<u;c++){var f=s[c],d=f.node;f.edgeOffset=null,f.boundingClientRect=null,_(d,null),D(d,null),f.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof o&&o({collection:a,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:l,nodes:s},e),t.touched=!1})),l(h(h(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var r=s({},t.translate),o=0,i=0;return t.axis.x&&(r.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),o=t.translate.x-r.x),t.axis.y&&(r.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),i=t.translate.y-r.y),t.translate=r,_(t.helper,t.translate),t.scrollContainer.scrollLeft+=o,void(t.scrollContainer.scrollTop+=i)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),l(h(h(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),l(h(h(t)),"handleKeyDown",(function(e){var n=e.keyCode,r=t.props,o=r.shouldCancelStart,i=r.keyCodes,a=s({},te,void 0===i?{}:i);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||a.lift.includes(n)&&!o(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),a.lift.includes(n)&&!t.manager.active?t.keyLift(e):a.drop.includes(n)&&t.manager.active?t.keyDrop(e):a.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):a.up.includes(n)?t.keyMove(-1):a.down.includes(n)&&t.keyMove(1))})),l(h(h(t)),"keyLift",(function(e){var n=e.target,r=j(n,(function(e){return null!=e.sortableInfo})).sortableInfo,o=r.index,i=r.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:o,collection:i},t.handlePress(e)})),l(h(h(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),r=n[n.length-1].node.sortableInfo.index,o=t.newIndex+e,i=t.newIndex;if(!(o<0||o>r)){t.prevIndex=i,t.newIndex=o;var a=B(t.newIndex,t.prevIndex,t.index),l=n.find((function(e){return e.node.sortableInfo.index===a})),s=l.node,c=t.containerScrollDelta,u=l.boundingClientRect||L(s,c),f=l.translate||{x:0,y:0},d=u.top+f.y-c.top,h=u.left+f.x-c.left,p=i<o,m=p&&t.axis.x?s.offsetWidth-t.width:0,y=p&&t.axis.y?s.offsetHeight-t.height:0;t.handleSortMove({pageX:h+m,pageY:d+y,ignoreTransition:0===e})}})),l(h(h(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),l(h(h(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),l(h(h(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,r=e.target,o=j(r,(function(e){return null!=e.sortableInfo}));return o&&o.sortableInfo&&!o.sortableInfo.disabled&&(n?Z(r):r.sortableInfo)}));var r=new C;return oe(e),t.manager=r,t.wrappedInstance=(0,v.createRef)(),t.sortableContextValue={manager:r},t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return g(n,t),f(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var r=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof r?r():r,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:V(e.container)||e.container,e.autoScroller=new Q(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return I[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return I[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,r=t.lockOffset,o=t.lockToContainerEdges,i=t.transitionDuration,l=t.keyboardSortingTransitionDuration,s=void 0===l?i:l,c=this.manager.isKeySorting,u=e.ignoreTransition,f=z(e),d={x:f.x-this.initialOffset.x,y:f.y-this.initialOffset.y};if(d.y-=window.pageYOffset-this.initialWindowScroll.top,d.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=d,o){var h=a(G({height:this.height,lockOffset:r,width:this.width}),2),p=h[0],m=h[1],y={x:this.width/2-p.x,y:this.height/2-p.y},g={x:this.width/2-m.x,y:this.height/2-m.y};d.x=A(this.minTranslate.x+y.x,this.maxTranslate.x-g.x,d.x),d.y=A(this.minTranslate.y+y.y,this.maxTranslate.y-g.y,d.y)}"x"===n?d.y=0:"y"===n&&(d.x=0),c&&s&&!u&&D(this.helper,s),_(this.helper,d)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,o=this.containerScrollDelta,i=this.windowScrollDelta,a=this.manager.getOrderedRefs(),l=this.offsetEdge.left+this.translate.x+o.left,s=this.offsetEdge.top+this.translate.y+o.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var f=0,d=a.length;f<d;f++){var h=a[f].node,p=h.sortableInfo.index,m=h.offsetWidth,y=h.offsetHeight,g={height:this.height>y?y/2:this.height/2,width:this.width>m?m/2:this.width/2},v=c&&p>this.index&&p<=u,b=c&&p<this.index&&p>=u,w={x:0,y:0},x=a[f].edgeOffset;x||(x=H(h,this.container),a[f].edgeOffset=x,c&&(a[f].boundingClientRect=L(h,o)));var S=f<a.length-1&&a[f+1],O=f>0&&a[f-1];S&&!S.edgeOffset&&(S.edgeOffset=H(S.node,this.container),c&&(S.boundingClientRect=L(S.node,o))),p!==this.index?(t&&D(h,t),this.axis.x?this.axis.y?b||p<this.index&&(l+i.left-g.width<=x.left&&s+i.top<=x.top+g.height||s+i.top+g.height<=x.top)?(w.x=this.width+this.marginOffset.x,x.left+w.x>this.containerBoundingRect.width-g.width&&S&&(w.x=S.edgeOffset.left-x.left,w.y=S.edgeOffset.top-x.top),null===this.newIndex&&(this.newIndex=p)):(v||p>this.index&&(l+i.left+g.width>=x.left&&s+i.top+g.height>=x.top||s+i.top+g.height>=x.top+y))&&(w.x=-(this.width+this.marginOffset.x),x.left+w.x<this.containerBoundingRect.left+g.width&&O&&(w.x=O.edgeOffset.left-x.left,w.y=O.edgeOffset.top-x.top),this.newIndex=p):v||p>this.index&&l+i.left+g.width>=x.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=p):(b||p<this.index&&l+i.left<=x.left+g.width)&&(w.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=p)):this.axis.y&&(v||p>this.index&&s+i.top+g.height>=x.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=p):(b||p<this.index&&s+i.top<=x.top+g.height)&&(w.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=p))),_(h,w),a[f].translate=w):n&&(this.sortableGhost=h,k(h,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var C=c?this.prevIndex:u;r&&this.newIndex!==C&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:C,isKeySorting:c,nodes:a,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return x()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?(0,b.findDOMNode)(this):e(o.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,v.createElement)(ae.Provider,{value:this.sortableContextValue},(0,v.createElement)(e,r({ref:t},T(this.props,re))))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(v.Component),l(t,"displayName",M("sortableList",e)),l(t,"defaultProps",ne),l(t,"propTypes",ee),n}((function(e){var t=e.items;return wp.element.createElement("div",{className:"lzb-gutenberg-repeater-items"},t.map((function(e,t){return wp.element.createElement(Te,ye({key:"repeater-item-".concat(t),index:t},e))})))})),Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&de(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=me(r);if(o){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return he(this,e)});function a(){var e;ue(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=(e=i.call.apply(i,[this].concat(n))).props.controlData;e.sortRef=wp.element.createRef();var l=-1;return("false"===o.rows_collapsible||"false"===o.rows_collapsed)&&(l=-2),e.state={activeItem:l},e.getRowTitle=e.getRowTitle.bind(pe(e)),e}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.count,n=void 0===t?0:t,r=e.controlData,o=e.addRow,i=void 0===o?function(){}:o;if(r.rows_min&&0<r.rows_min&&r.rows_min>n)for(var a=r.rows_min-n,l=0;l<a;l+=1)i()}},{key:"getRowTitle",value:function(e){var t=this.props,n=t.controlData,r=t.getInnerControls,o=void 0===r?function(){}:r,i=n.rows_label||ge("Row {{#}}","lazy-blocks");i=i.replace(/{{#}}/g,e+1);var a=o(e);return a&&Object.keys(a).forEach((function(e){var t=a[e].val||"",n=a[e].data;i=i.replace(new RegExp("{{".concat(n.name,"}}"),"g"),t)})),i}},{key:"render",value:function(){for(var e=this,t=this.props,n=t.label,r=t.count,o=void 0===r?0:r,i=t.controlData,a=t.renderRow,l=void 0===a?function(){}:a,s=t.addRow,c=void 0===s?function(){}:s,u=t.removeRow,f=void 0===u?function(){}:u,d=t.resortRow,h=void 0===d?function(){}:d,p=[],m=function(t){var n=-2===e.state.activeItem||e.state.activeItem===t;p.push({title:e.getRowTitle(t),active:n,count:o,controlData:i,onToggle:function(r){r.preventDefault(),r.stopPropagation(),"true"===i.rows_collapsible&&e.setState({activeItem:n?-1:t})},onRemove:function(e){e.preventDefault(),e.stopPropagation(),f(t)},renderContent:function(){return wp.element.createElement("div",{className:"lzb-gutenberg-repeater-item-content"},l(t))}})},y=0;y<o;y+=1)m(y);return wp.element.createElement(we,{label:n},wp.element.createElement("div",{className:"lzb-gutenberg-repeater"},p.length?wp.element.createElement(Ie,{ref:this.sortRef,items:p,onSortEnd:function(t){var n=t.oldIndex,r=t.newIndex;h(n,r),-1<e.state.activeItem&&e.setState({activeItem:r})},useDragHandle:!0,helperContainer:function(){return e.sortRef&&e.sortRef.current&&e.sortRef.current.container?e.sortRef.current.container:document.body}}):"",wp.element.createElement("div",{className:"lzb-gutenberg-repeater-options"},wp.element.createElement(xe,{isSecondary:!0,isSmall:!0,disabled:i.rows_max&&o>=i.rows_max,onClick:function(){c()}},i.rows_add_button_label||ge("+ Add Row","lazy-blocks")),"true"===i.rows_collapsible&&p.length&&1<p.length?wp.element.createElement(Se,{text:ge("Toggle all rows","lazy-blocks")},wp.element.createElement("div",null,wp.element.createElement(Oe,{checked:-2===this.state.activeItem,onChange:function(){e.setState((function(e){return{activeItem:e.activeItem?-1:-2}}))}}))):"")))}}])&&fe(t.prototype,n),a}(ve),ke=Ce(Re)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(n,r,o){return function(t,n,r){var o,i,a=n<0?t.length+n:n;if(a>=0&&a<t.length){var l=r<0?t.length+r:r,s=(o=t.splice(n,1),i=1,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(o,i)||e(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];t.splice(l,0,s)}}(n=function(e){if(Array.isArray(e))return t(e)}(i=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||e(i)||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.")}(),r,o),n;var i}var o=n(7708),i=n.n(o),a=n(9807);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e){return h="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},h(e)}var p=wp.i18n,m=p.__,y=p._n,g=p.sprintf,v=wp.element,b=v.Fragment,w=v.Component,x=wp.components,S=x.PanelBody,O=x.BaseControl,C=x.TextControl,E=x.ToggleControl,T=wp.hooks.addFilter;T("lzb.editor.control.repeater.render","lzb.editor",(function(e,t){var n=t.getValue()||[];return wp.element.createElement(a.Z,{controlData:t.data,label:t.data.label,count:n.length,getInnerControls:function(e){var n=t.getControls(t.uniqueId),r={};return Object.keys(n).forEach((function(o){var i=n[o];r[o]={data:i,val:t.getValue(i,e)}})),r},renderRow:function(e){return wp.element.createElement(b,null,t.renderControls(t.placement,t.uniqueId,e))},removeRow:function(e){-1<e&&(n.splice(e,1),t.onChange(n))},addRow:function(){n.push({}),t.onChange(n)},resortRow:function(e,o){var i=r(n,e,o);t.onChange(i)}})})),T("lzb.editor.control.repeater.getValue","lzb.editor",(function(e){if("string"==typeof e)try{e=JSON.parse(decodeURI(e))}catch(t){e=[]}return e})),T("lzb.editor.control.repeater.updateValue","lzb.editor",(function(e){return("object"===h(e)||Array.isArray(e))&&(e=encodeURI(JSON.stringify(e))),e}));var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,r,o,a=(r=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(o){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function h(){var e;l(this,h);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=a.call.apply(a,[this].concat(n))).state={collapsedChilds:!1},e.toggleCollapseChilds=e.toggleCollapseChilds.bind(f(e)),e}return t=h,(n=[{key:"toggleCollapseChilds",value:function(){this.setState((function(e){return{collapsedChilds:!e.collapsedChilds+1}}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.printControls,r=t.id,o=t.controls,a=this.state.collapsedChilds,l=0;Object.keys(o).forEach((function(e){o[e].child_of===r&&(l+=1)}));var s=m("Show Child Controls","lazy-blocks");return a?s=m("Hide Child Controls","lazy-blocks"):l&&(s=g(y("Show %d Child Control","Show %d Child Controls",l),l)),wp.element.createElement(b,null,wp.element.createElement("button",{className:i()("lzb-constructor-controls-item-repeater-toggle",a?"lzb-constructor-controls-item-repeater-toggle-collapsed":""),onClick:function(t){t.stopPropagation(),t.preventDefault(),e.toggleCollapseChilds()}},s,wp.element.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},wp.element.createElement("path",{fill:"currentColor",d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}))),a?wp.element.createElement("div",{className:"lzb-constructor-controls-item-childs"},n(r)):"")}}])&&s(t.prototype,n),h}(w);T("lzb.constructor.controls.repeater.item","lzb.constructor",(function(e,t){return wp.element.createElement(b,null,e,wp.element.createElement(I,t))})),T("lzb.constructor.control.repeater.settings","lzb.constructor",(function(e,t){var n=t.updateData,r=t.data;return wp.element.createElement(b,null,wp.element.createElement(S,null,wp.element.createElement(C,{label:m("Row Label","lazy-blocks"),placeholder:m("Row {{#}}","lazy-blocks"),help:m('Example: "My row number {{#}} with inner control {{control_name}}"',"lazy-blocks"),value:r.rows_label,onChange:function(e){return n({rows_label:e})}})),wp.element.createElement(S,null,wp.element.createElement(C,{label:m("Add Button Label","lazy-blocks"),placeholder:m("+ Add Row","lazy-blocks"),value:r.rows_add_button_label,onChange:function(e){return n({rows_add_button_label:e})}})),wp.element.createElement(S,null,wp.element.createElement(C,{type:"number",label:m("Minimum Rows","lazy-blocks"),placeholder:0,min:0,value:r.rows_min,onChange:function(e){return n({rows_min:e})}})),wp.element.createElement(S,null,wp.element.createElement(C,{type:"number",label:m("Maximum Rows","lazy-blocks"),placeholder:0,min:0,value:r.rows_max,onChange:function(e){return n({rows_max:e})}})),wp.element.createElement(S,null,wp.element.createElement(O,{label:m("Collapsible Rows","lazy-blocks")},wp.element.createElement(E,{label:m("Yes","lazy-blocks"),checked:"true"===r.rows_collapsible,onChange:function(e){return n({rows_collapsible:e?"true":"false"})}}),"true"===r.rows_collapsible?wp.element.createElement(E,{label:m("Collapsed by Default","lazy-blocks"),checked:"true"===r.rows_collapsed,onChange:function(e){return n({rows_collapsed:e?"true":"false"})}}):"")))}))}()}();

Zerion Mini Shell 1.0