Changeset 2938740
- Timestamp:
- 07/14/2023 12:55:03 PM (3 years ago)
- Location:
- bps-splide-slider-block/trunk
- Files:
-
- 8 edited
-
README.txt (modified) (2 diffs)
-
build/block.asset.php (modified) (1 diff)
-
build/block.js (modified) (1 diff)
-
build/frontend.asset.php (modified) (1 diff)
-
build/frontend.css (modified) (1 diff)
-
build/frontend.js (modified) (1 diff)
-
index.php (modified) (6 diffs)
-
languages/bps-slider-block.pot (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bps-splide-slider-block/trunk/README.txt
r2793667 r2938740 3 3 Tags: slider, splide, gutenberg, blocks 4 4 Requires at least: 5.7 5 Tested up to: 6.2 6 Stable tag: 1.1 5 Tested up to: 6.2.2 6 Stable tag: 1.1.1 7 7 License: GPLv3+ 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 33 33 * Customizable options in Block settings menu 34 34 * Accessible attributes for Custom Post Type Block Template 35 36 = 1.1.1 = 37 * Fix Block settings menu sliders not working by converting props to Number -
bps-splide-slider-block/trunk/build/block.asset.php
r2684849 r2938740 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-element'), 'version' => ' 29a70c36ec1b8bf0c2b05ab8ea51875d');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-element'), 'version' => 'fffb2bbc19aaa064bd4b9956e8ad0c43'); -
bps-splide-slider-block/trunk/build/block.js
r2793666 r2938740 1 !function(){var e={143:function(e){"use strict";e.exports=function(e,t,n,r,i,o,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,i,o,a,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},703:function(e,t,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,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,bigint: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:o,resetWarningCache:i};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=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,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=window.wp.element,r=window.React;function i(){return i=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},i.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 a(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 l(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,i,o=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(e){a=!0,i=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||a(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 s(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?Object(arguments[n]):{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach((function(n){e(t,n,r[n])}))}return t}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 d(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){return f="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},f(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"===f(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 g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function m(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}var v=window.ReactDOM,b=n(143),x=n.n(b);var w=n(697),S=n.n(w),O=function(){function t(){c(this,t),e(this,"refs",{})}return d(t,[{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(k)}}]),t}();function k(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function C(e,t,n){return(e=e.slice()).splice(n<0?e.length+n:n,0,e.splice(t,1)[0]),e}function E(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var T={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},I=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 R(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function D(e,t){e.style["".concat(I,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function A(e,t){e.style["".concat(I,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function P(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function N(e,t,n){return Math.max(e,Math.min(n,t))}function M(e){return"px"===e.substr(-2)?parseFloat(e):0}function j(e){var t=window.getComputedStyle(e);return{bottom:M(t.marginBottom),left:M(t.marginLeft),right:M(t.marginRight),top:M(t.marginTop)}}function W(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function _(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function L(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 K(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 G(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=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),i=parseFloat(t),o=parseFloat(t),a=l[1]}return x()(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===a&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function U(e){var t=e.height,n=e.width,r=e.lockOffset,i=Array.isArray(r)?r:[r,r];x()(2===i.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=l(i,2),a=o[0],s=o[1];return[G({height:t,lockOffset:a,width:n}),G({height:t,lockOffset:s,width:n})]}function F(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:F(e.parentNode):null}function X(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:M(t.gridColumnGap),y:M(t.gridRowGap)}:{x:0,y:0}}var Y="BUTTON",V="INPUT",q="OPTION",z="TEXTAREA",$="SELECT";function J(e){var t,n="input, textarea, select, canvas, [contenteditable]",r=e.querySelectorAll(n),i=e.cloneNode(!0);return(t=i.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)||a(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)})),i}function Q(e){return null!=e.sortableHandle}var Z=function(){function e(t,n){c(this,e),this.container=t,this.onScrollCallback=n}return d(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,i=e.maxTranslate,o=e.width,a=e.height,l={x:0,y:0},s={x:1,y:1},c=this.container,u=c.scrollTop,d=c.scrollLeft,f=c.scrollHeight,h=c.scrollWidth,p=0===u,g=f-u-c.clientHeight==0,y=0===d,m=h-d-c.clientWidth==0;n.y>=i.y-a/2&&!g?(l.y=1,s.y=10*Math.abs((i.y-a/2-n.y)/a)):n.x>=i.x-o/2&&!m?(l.x=1,s.x=10*Math.abs((i.x-o/2-n.x)/o)):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+o/2&&!y&&(l.x=-1,s.x=10*Math.abs((n.x-o/2-r.x)/o)),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:S().oneOf(["x","y","xy"]),contentWindow:S().any,disableAutoscroll:S().bool,distance:S().number,getContainer:S().func,getHelperDimensions:S().func,helperClass:S().string,helperContainer:S().oneOfType([S().func,"undefined"==typeof HTMLElement?S().any:S().instanceOf(HTMLElement)]),hideSortableGhost:S().bool,keyboardSortingTransitionDuration:S().number,lockAxis:S().string,lockOffset:S().oneOfType([S().number,S().string,S().arrayOf(S().oneOfType([S().number,S().string]))]),lockToContainerEdges:S().bool,onSortEnd:S().func,onSortMove:S().func,onSortOver:S().func,onSortStart:S().func,pressDelay:S().number,pressThreshold:S().number,keyCodes:S().shape({lift:S().arrayOf(S().number),drop:S().arrayOf(S().number),cancel:S().arrayOf(S().number),up:S().arrayOf(S().number),down:S().arrayOf(S().number)}),shouldCancelStart:S().func,transitionDuration:S().number,updateBeforeSortStart:S().func,useDragHandle:S().bool,useWindowAsScrollContainer:S().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!==[V,z,$,q,Y].indexOf(e.target.tagName)||!!P(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},re=Object.keys(ee);function ie(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 oe(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,r.createContext)({manager:{}}),le={index:S().number.isRequired,collection:S().oneOfType([S().number,S().string]),disabled:S().bool},se=Object.keys(le),ce=window.wp.components,ue=window.wp.blockEditor;const __=wp.i18n.__;wp.blocks.registerBlockType("bps-blocks/slider",{title:"Splide "+__("slider","bps-slider-block"),icon:"images-alt",category:"common",edit:function(n){let o=n.attributes.images.map((e=>e.id));const a=function(t){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return o=n=function(n){function o(){var t,n;c(this,o);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e(h(h(n=p(this,(t=g(o)).call.apply(t,[this].concat(a))))),"wrappedInstance",(0,r.createRef)()),n}return m(o,n),d(o,[{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,i=(0,v.findDOMNode)(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},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()(a.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 e=a.withRef?this.wrappedInstance:null;return(0,r.createElement)(t,i({ref:e},E(this.props,se)))}}]),o}(r.Component),e(n,"displayName",W("sortableElement",t)),e(n,"contextType",ae),e(n,"propTypes",le),e(n,"defaultProps",{collection:0}),o}((e=>{let{value:r}=e;const i=n.attributes.images.filter((e=>e.id==r))[0],o=n.attributes.images.map((e=>e.id)).indexOf(i.id);return(0,t.createElement)(ce.FlexItem,null,(0,t.createElement)("div",{className:"slider-edit-block-element"},(0,t.createElement)(ue.MediaUpload,{type:"image",value:i.id,onSelect:e=>{const t=n.attributes.images.concat([]);t[o].id=e.id,t[o].front_url=e.url,t[o].block_url=e.sizes.thumbnail.url,n.setAttributes({images:t})},render:e=>(0,t.createElement)("div",null,(0,t.createElement)(ce.Button,{onClick:e.open,style:{display:"inline-block"}},i.id?(0,t.createElement)("img",{src:i.block_url,onClick:e.open}):__("Select image","bps-slider-block")))}),(0,t.createElement)(ce.Button,{isDestructive:!0,onClick:()=>{n.setAttributes({images:n.attributes.images.filter(((e,t)=>o!==t))})}},__("Remove image","bps-slider-block"))))})),u=function(t){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return o=n=function(n){function o(t){var n;c(this,o),e(h(h(n=p(this,g(o).call(this,t)))),"state",{}),e(h(h(n)),"handleStart",(function(e){var t=n.props,r=t.distance,i=t.shouldCancelStart;if(2!==e.button&&!i(e)){n.touched=!0,n.position=L(e);var o=P(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&n.nodeIsChild(o)&&!n.state.sorting){var a=n.props.useDragHandle,l=o.sortableInfo,s=l.index,c=l.collection;if(l.disabled)return;if(a&&!P(e.target,Q))return;n.manager.active={collection:c,index:s},K(e)||"A"!==e.target.tagName||e.preventDefault(),r||(0===n.props.pressDelay?n.handlePress(e):n.pressTimer=setTimeout((function(){return n.handlePress(e)}),n.props.pressDelay))}}})),e(h(h(n)),"nodeIsChild",(function(e){return e.sortableInfo.manager===n.manager})),e(h(h(n)),"handleMove",(function(e){var t=n.props,r=t.distance,i=t.pressThreshold;if(!n.state.sorting&&n.touched&&!n._awaitingUpdateBeforeSortStart){var o=L(e),a={x:n.position.x-o.x,y:n.position.y-o.y},l=Math.abs(a.x)+Math.abs(a.y);n.delta=a,r||i&&!(l>=i)?r&&l>=r&&n.manager.isActive()&&n.handlePress(e):(clearTimeout(n.cancelTimer),n.cancelTimer=setTimeout(n.cancel,0))}})),e(h(h(n)),"handleEnd",(function(){n.touched=!1,n.cancel()})),e(h(h(n)),"cancel",(function(){var e=n.props.distance;n.state.sorting||(e||clearTimeout(n.pressTimer),n.manager.active=null)})),e(h(h(n)),"handlePress",(function(e){try{var t=n.manager.getActive(),r=function(){if(t){var r=function(){var t=h.sortableInfo.index,r=j(h),i=X(n.container),u=n.scrollContainer.getBoundingClientRect(),y=a({index:t,node:h,collection:p});if(n.node=h,n.margin=r,n.gridGap=i,n.width=y.width,n.height=y.height,n.marginOffset={x:n.margin.left+n.margin.right+n.gridGap.x,y:Math.max(n.margin.top,n.margin.bottom,n.gridGap.y)},n.boundingClientRect=h.getBoundingClientRect(),n.containerBoundingRect=u,n.index=t,n.newIndex=t,n.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},n.offsetEdge=H(h,n.container),n.initialOffset=L(g?s({},e,{pageX:n.boundingClientRect.left,pageY:n.boundingClientRect.top}):e),n.initialScroll={left:n.scrollContainer.scrollLeft,top:n.scrollContainer.scrollTop},n.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},n.helper=n.helperContainer.appendChild(J(h)),R(n.helper,{boxSizing:"border-box",height:"".concat(n.height,"px"),left:"".concat(n.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(n.boundingClientRect.top-r.top,"px"),width:"".concat(n.width,"px")}),g&&n.helper.focus(),c&&(n.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"})),n.minTranslate={},n.maxTranslate={},g){var m=f?{top:0,left:0,width:n.contentWindow.innerWidth,height:n.contentWindow.innerHeight}:n.containerBoundingRect,v=m.top,b=m.left,x=m.width,w=v+m.height,S=b+x;n.axis.x&&(n.minTranslate.x=b-n.boundingClientRect.left,n.maxTranslate.x=S-(n.boundingClientRect.left+n.width)),n.axis.y&&(n.minTranslate.y=v-n.boundingClientRect.top,n.maxTranslate.y=w-(n.boundingClientRect.top+n.height))}else n.axis.x&&(n.minTranslate.x=(f?0:u.left)-n.boundingClientRect.left-n.width/2,n.maxTranslate.x=(f?n.contentWindow.innerWidth:u.left+u.width)-n.boundingClientRect.left-n.width/2),n.axis.y&&(n.minTranslate.y=(f?0:u.top)-n.boundingClientRect.top-n.height/2,n.maxTranslate.y=(f?n.contentWindow.innerHeight:u.top+u.height)-n.boundingClientRect.top-n.height/2);l&&l.split(" ").forEach((function(e){return n.helper.classList.add(e)})),n.listenerNode=e.touches?e.target:n.contentWindow,g?(n.listenerNode.addEventListener("wheel",n.handleKeyEnd,!0),n.listenerNode.addEventListener("mousedown",n.handleKeyEnd,!0),n.listenerNode.addEventListener("keydown",n.handleKeyDown)):(T.move.forEach((function(e){return n.listenerNode.addEventListener(e,n.handleSortMove,!1)})),T.end.forEach((function(e){return n.listenerNode.addEventListener(e,n.handleSortEnd,!1)}))),n.setState({sorting:!0,sortingIndex:t}),d&&d({node:h,index:t,collection:p,isKeySorting:g,nodes:n.manager.getOrderedRefs(),helper:n.helper},e),g&&n.keyMove(0)},i=n.props,o=i.axis,a=i.getHelperDimensions,l=i.helperClass,c=i.hideSortableGhost,u=i.updateBeforeSortStart,d=i.onSortStart,f=i.useWindowAsScrollContainer,h=t.node,p=t.collection,g=n.manager.isKeySorting,y=function(){if("function"==typeof u){n._awaitingUpdateBeforeSortStart=!0;var t=oe((function(){var t=h.sortableInfo.index;return Promise.resolve(u({collection:p,index:t,node:h,isKeySorting:g},e)).then((function(){}))}),(function(e,t){if(n._awaitingUpdateBeforeSortStart=!1,e)throw t;return t}));if(t&&t.then)return t.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)}})),e(h(h(n)),"handleSortMove",(function(e){var t=n.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),n.updateHelperPosition(e),n.animateNodes(),n.autoscroll(),t&&t(e)})),e(h(h(n)),"handleSortEnd",(function(e){var t=n.props,r=t.hideSortableGhost,i=t.onSortEnd,o=n.manager,a=o.active.collection,l=o.isKeySorting,s=n.manager.getOrderedRefs();n.listenerNode&&(l?(n.listenerNode.removeEventListener("wheel",n.handleKeyEnd,!0),n.listenerNode.removeEventListener("mousedown",n.handleKeyEnd,!0),n.listenerNode.removeEventListener("keydown",n.handleKeyDown)):(T.move.forEach((function(e){return n.listenerNode.removeEventListener(e,n.handleSortMove)})),T.end.forEach((function(e){return n.listenerNode.removeEventListener(e,n.handleSortEnd)})))),n.helper.parentNode.removeChild(n.helper),r&&n.sortableGhost&&R(n.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=s.length;c<u;c++){var d=s[c],f=d.node;d.edgeOffset=null,d.boundingClientRect=null,D(f,null),A(f,null),d.translate=null}n.autoScroller.clear(),n.manager.active=null,n.manager.isKeySorting=!1,n.setState({sorting:!1,sortingIndex:null}),"function"==typeof i&&i({collection:a,newIndex:n.newIndex,oldIndex:n.index,isKeySorting:l,nodes:s},e),n.touched=!1})),e(h(h(n)),"autoscroll",(function(){var e=n.props.disableAutoscroll,t=n.manager.isKeySorting;if(e)n.autoScroller.clear();else{if(t){var r=s({},n.translate),i=0,o=0;return n.axis.x&&(r.x=Math.min(n.maxTranslate.x,Math.max(n.minTranslate.x,n.translate.x)),i=n.translate.x-r.x),n.axis.y&&(r.y=Math.min(n.maxTranslate.y,Math.max(n.minTranslate.y,n.translate.y)),o=n.translate.y-r.y),n.translate=r,D(n.helper,n.translate),n.scrollContainer.scrollLeft+=i,void(n.scrollContainer.scrollTop+=o)}n.autoScroller.update({height:n.height,maxTranslate:n.maxTranslate,minTranslate:n.minTranslate,translate:n.translate,width:n.width})}})),e(h(h(n)),"onAutoScroll",(function(e){n.translate.x+=e.left,n.translate.y+=e.top,n.animateNodes()})),e(h(h(n)),"handleKeyDown",(function(e){var t=e.keyCode,r=n.props,i=r.shouldCancelStart,o=r.keyCodes,a=s({},te,void 0===o?{}:o);n.manager.active&&!n.manager.isKeySorting||!(n.manager.active||a.lift.includes(t)&&!i(e)&&n.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),a.lift.includes(t)&&!n.manager.active?n.keyLift(e):a.drop.includes(t)&&n.manager.active?n.keyDrop(e):a.cancel.includes(t)?(n.newIndex=n.manager.active.index,n.keyDrop(e)):a.up.includes(t)?n.keyMove(-1):a.down.includes(t)&&n.keyMove(1))})),e(h(h(n)),"keyLift",(function(e){var t=e.target,r=P(t,(function(e){return null!=e.sortableInfo})).sortableInfo,i=r.index,o=r.collection;n.initialFocusedNode=t,n.manager.isKeySorting=!0,n.manager.active={index:i,collection:o},n.handlePress(e)})),e(h(h(n)),"keyMove",(function(e){var t=n.manager.getOrderedRefs(),r=t[t.length-1].node.sortableInfo.index,i=n.newIndex+e,o=n.newIndex;if(!(i<0||i>r)){n.prevIndex=o,n.newIndex=i;var a=B(n.newIndex,n.prevIndex,n.index),l=t.find((function(e){return e.node.sortableInfo.index===a})),s=l.node,c=n.containerScrollDelta,u=l.boundingClientRect||_(s,c),d=l.translate||{x:0,y:0},f=u.top+d.y-c.top,h=u.left+d.x-c.left,p=o<i,g=p&&n.axis.x?s.offsetWidth-n.width:0,y=p&&n.axis.y?s.offsetHeight-n.height:0;n.handleSortMove({pageX:h+g,pageY:f+y,ignoreTransition:0===e})}})),e(h(h(n)),"keyDrop",(function(e){n.handleSortEnd(e),n.initialFocusedNode&&n.initialFocusedNode.focus()})),e(h(h(n)),"handleKeyEnd",(function(e){n.manager.active&&n.keyDrop(e)})),e(h(h(n)),"isValidSortingTarget",(function(e){var t=n.props.useDragHandle,r=e.target,i=P(r,(function(e){return null!=e.sortableInfo}));return i&&i.sortableInfo&&!i.sortableInfo.disabled&&(t?Q(r):r.sortableInfo)}));var i=new O;return ie(t),n.manager=i,n.wrappedInstance=(0,r.createRef)(),n.sortableContextValue={manager:i},n.events={end:n.handleEnd,move:n.handleMove,start:n.handleStart},n}return m(o,n),d(o,[{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:F(e.container)||e.container,e.autoScroller=new Z(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return T[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 T[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,i=t.lockToContainerEdges,o=t.transitionDuration,a=t.keyboardSortingTransitionDuration,s=void 0===a?o:a,c=this.manager.isKeySorting,u=e.ignoreTransition,d=L(e),f={x:d.x-this.initialOffset.x,y:d.y-this.initialOffset.y};if(f.y-=window.pageYOffset-this.initialWindowScroll.top,f.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=f,i){var h=l(U({height:this.height,lockOffset:r,width:this.width}),2),p=h[0],g=h[1],y={x:this.width/2-p.x,y:this.height/2-p.y},m={x:this.width/2-g.x,y:this.height/2-g.y};f.x=N(this.minTranslate.x+y.x,this.maxTranslate.x-m.x,f.x),f.y=N(this.minTranslate.y+y.y,this.maxTranslate.y-m.y,f.y)}"x"===n?f.y=0:"y"===n&&(f.x=0),c&&s&&!u&&A(this.helper,s),D(this.helper,f)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,i=this.containerScrollDelta,o=this.windowScrollDelta,a=this.manager.getOrderedRefs(),l=this.offsetEdge.left+this.translate.x+i.left,s=this.offsetEdge.top+this.translate.y+i.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var d=0,f=a.length;d<f;d++){var h=a[d].node,p=h.sortableInfo.index,g=h.offsetWidth,y=h.offsetHeight,m={height:this.height>y?y/2:this.height/2,width:this.width>g?g/2:this.width/2},v=c&&p>this.index&&p<=u,b=c&&p<this.index&&p>=u,x={x:0,y:0},w=a[d].edgeOffset;w||(w=H(h,this.container),a[d].edgeOffset=w,c&&(a[d].boundingClientRect=_(h,i)));var S=d<a.length-1&&a[d+1],O=d>0&&a[d-1];S&&!S.edgeOffset&&(S.edgeOffset=H(S.node,this.container),c&&(S.boundingClientRect=_(S.node,i))),p!==this.index?(t&&A(h,t),this.axis.x?this.axis.y?b||p<this.index&&(l+o.left-m.width<=w.left&&s+o.top<=w.top+m.height||s+o.top+m.height<=w.top)?(x.x=this.width+this.marginOffset.x,w.left+x.x>this.containerBoundingRect.width-m.width&&S&&(x.x=S.edgeOffset.left-w.left,x.y=S.edgeOffset.top-w.top),null===this.newIndex&&(this.newIndex=p)):(v||p>this.index&&(l+o.left+m.width>=w.left&&s+o.top+m.height>=w.top||s+o.top+m.height>=w.top+y))&&(x.x=-(this.width+this.marginOffset.x),w.left+x.x<this.containerBoundingRect.left+m.width&&O&&(x.x=O.edgeOffset.left-w.left,x.y=O.edgeOffset.top-w.top),this.newIndex=p):v||p>this.index&&l+o.left+m.width>=w.left?(x.x=-(this.width+this.marginOffset.x),this.newIndex=p):(b||p<this.index&&l+o.left<=w.left+m.width)&&(x.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=p)):this.axis.y&&(v||p>this.index&&s+o.top+m.height>=w.top?(x.y=-(this.height+this.marginOffset.y),this.newIndex=p):(b||p<this.index&&s+o.top<=w.top+m.height)&&(x.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=p))),D(h,x),a[d].translate=x):n&&(this.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var k=c?this.prevIndex:u;r&&this.newIndex!==k&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:k,isKeySorting:c,nodes:a,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return x()(a.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,v.findDOMNode)(this):e(a.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var e=a.withRef?this.wrappedInstance:null;return(0,r.createElement)(ae.Provider,{value:this.sortableContextValue},(0,r.createElement)(t,i({ref:e},E(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}}}]),o}(r.Component),e(n,"displayName",W("sortableList",t)),e(n,"defaultProps",ne),e(n,"propTypes",ee),o}((e=>{let{items:r}=e;return(0,t.createElement)("div",{className:"slider-edit-block"},(0,t.createElement)("h4",null,__("Slider images","bps-slider-block"),":"),(0,t.createElement)(ce.Flex,{justify:"flex-start",wrap:"true"},r.map(((e,n)=>(0,t.createElement)(a,{key:`item-${e}`,index:n,value:e})))),(0,t.createElement)(ce.Button,{isPrimary:!0,onClick:()=>{n.setAttributes({images:n.attributes.images.concat([{}])})}},__("Add image","bps-slider-block")))}));class f extends r.Component{constructor(){super(...arguments),e(this,"state",{items:o}),e(this,"onSortEnd",(e=>{let{oldIndex:t,newIndex:r}=e;const i=C(o,t,r);this.setState((e=>{let{items:n}=e;return{items:C(n,t,r)}}));const a=n.attributes.images.concat([]);a.sort((function(e,t){return i.indexOf(e.id)-i.indexOf(t.id)})),n.setAttributes({images:a})}))}render(){return(0,t.createElement)(u,{items:this.state.items,onSortEnd:this.onSortEnd,axis:"xy"})}}class y extends r.Component{render(){return(0,t.createElement)(ue.InspectorControls,null,(0,t.createElement)(ce.PanelBody,{title:__("Slider settings","bps-slider-block"),initialOpen:!0},(0,t.createElement)(ce.RangeControl,{label:__("Height ratio","bps-slider-block"),value:n.attributes.height_ratio,onChange:e=>n.setAttributes({height_ratio:e.toString()}),initialPosition:n.attributes.height_ratio,min:.4,max:1,step:.1}),(0,t.createElement)(ce.RangeControl,{label:__("Gap in px","bps-slider-block"),value:n.attributes.gap,onChange:e=>n.setAttributes({gap:e.toString()}),initialPosition:n.attributes.gap,min:0,max:100,step:5}),(0,t.createElement)(ce.RangeControl,{label:__("Padding in %","bps-slider-block"),value:n.attributes.padding,onChange:e=>n.setAttributes({padding:e.toString()}),initialPosition:n.attributes.padding,min:0,max:30,step:2})))}}return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(y,null),(0,t.createElement)(f,null))},save:function(e){return null}})}()}();1 !function(){var e={143:function(e){"use strict";e.exports=function(e,t,n,r,i,o,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,i,o,a,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},703:function(e,t,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,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,bigint: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:o,resetWarningCache:i};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=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,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t=window.wp.element,r=window.React;function i(){return i=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},i.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 a(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 l(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,i,o=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(e){a=!0,i=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||a(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 s(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?Object(arguments[n]):{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach((function(n){e(t,n,r[n])}))}return t}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 d(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){return f="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},f(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"===f(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 g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function y(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}var v=window.ReactDOM,b=n(143),x=n.n(b);var w=n(697),S=n.n(w),O=function(){function t(){c(this,t),e(this,"refs",{})}return d(t,[{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(k)}}]),t}();function k(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function C(e,t,n){return(e=e.slice()).splice(n<0?e.length+n:n,0,e.splice(t,1)[0]),e}function E(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var T={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},I=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 R(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function D(e,t){e.style["".concat(I,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function A(e,t){e.style["".concat(I,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function N(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function P(e,t,n){return Math.max(e,Math.min(n,t))}function M(e){return"px"===e.substr(-2)?parseFloat(e):0}function j(e){var t=window.getComputedStyle(e);return{bottom:M(t.marginBottom),left:M(t.marginLeft),right:M(t.marginRight),top:M(t.marginTop)}}function W(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function _(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function L(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 K(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 G(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=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),i=parseFloat(t),o=parseFloat(t),a=l[1]}return x()(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===a&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function U(e){var t=e.height,n=e.width,r=e.lockOffset,i=Array.isArray(r)?r:[r,r];x()(2===i.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var o=l(i,2),a=o[0],s=o[1];return[G({height:t,lockOffset:a,width:n}),G({height:t,lockOffset:s,width:n})]}function F(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:F(e.parentNode):null}function X(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:M(t.gridColumnGap),y:M(t.gridRowGap)}:{x:0,y:0}}var Y="BUTTON",V="INPUT",q="OPTION",z="TEXTAREA",$="SELECT";function J(e){var t,n="input, textarea, select, canvas, [contenteditable]",r=e.querySelectorAll(n),i=e.cloneNode(!0);return(t=i.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)||a(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)})),i}function Q(e){return null!=e.sortableHandle}var Z=function(){function e(t,n){c(this,e),this.container=t,this.onScrollCallback=n}return d(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,i=e.maxTranslate,o=e.width,a=e.height,l={x:0,y:0},s={x:1,y:1},c=this.container,u=c.scrollTop,d=c.scrollLeft,f=c.scrollHeight,h=c.scrollWidth,p=0===u,g=f-u-c.clientHeight==0,m=0===d,y=h-d-c.clientWidth==0;n.y>=i.y-a/2&&!g?(l.y=1,s.y=10*Math.abs((i.y-a/2-n.y)/a)):n.x>=i.x-o/2&&!y?(l.x=1,s.x=10*Math.abs((i.x-o/2-n.x)/o)):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+o/2&&!m&&(l.x=-1,s.x=10*Math.abs((n.x-o/2-r.x)/o)),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:S().oneOf(["x","y","xy"]),contentWindow:S().any,disableAutoscroll:S().bool,distance:S().number,getContainer:S().func,getHelperDimensions:S().func,helperClass:S().string,helperContainer:S().oneOfType([S().func,"undefined"==typeof HTMLElement?S().any:S().instanceOf(HTMLElement)]),hideSortableGhost:S().bool,keyboardSortingTransitionDuration:S().number,lockAxis:S().string,lockOffset:S().oneOfType([S().number,S().string,S().arrayOf(S().oneOfType([S().number,S().string]))]),lockToContainerEdges:S().bool,onSortEnd:S().func,onSortMove:S().func,onSortOver:S().func,onSortStart:S().func,pressDelay:S().number,pressThreshold:S().number,keyCodes:S().shape({lift:S().arrayOf(S().number),drop:S().arrayOf(S().number),cancel:S().arrayOf(S().number),up:S().arrayOf(S().number),down:S().arrayOf(S().number)}),shouldCancelStart:S().func,transitionDuration:S().number,updateBeforeSortStart:S().func,useDragHandle:S().bool,useWindowAsScrollContainer:S().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!==[V,z,$,q,Y].indexOf(e.target.tagName)||!!N(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},re=Object.keys(ee);function ie(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 oe(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,r.createContext)({manager:{}}),le={index:S().number.isRequired,collection:S().oneOfType([S().number,S().string]),disabled:S().bool},se=Object.keys(le),ce=window.wp.components,ue=window.wp.blockEditor;const __=wp.i18n.__;wp.blocks.registerBlockType("bps-blocks/slider",{title:"Splide "+__("slider","bps-slider-block"),icon:"images-alt",category:"common",edit:function(n){console.log(n);let o=n.attributes.images.map((e=>e.id));const a=function(t){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return o=n=function(n){function o(){var t,n;c(this,o);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e(h(h(n=p(this,(t=g(o)).call.apply(t,[this].concat(a))))),"wrappedInstance",(0,r.createRef)()),n}return y(o,n),d(o,[{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,i=(0,v.findDOMNode)(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},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()(a.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 e=a.withRef?this.wrappedInstance:null;return(0,r.createElement)(t,i({ref:e},E(this.props,se)))}}]),o}(r.Component),e(n,"displayName",W("sortableElement",t)),e(n,"contextType",ae),e(n,"propTypes",le),e(n,"defaultProps",{collection:0}),o}((e=>{let{value:r}=e;const i=n.attributes.images.filter((e=>e.id==r))[0],o=n.attributes.images.map((e=>e.id)).indexOf(i.id);return(0,t.createElement)(ce.FlexItem,null,(0,t.createElement)("div",{className:"slider-edit-block-element"},(0,t.createElement)(ue.MediaUpload,{type:"image",value:i.id,onSelect:e=>{const t=n.attributes.images.concat([]);t[o].id=e.id,t[o].front_url=e.url,t[o].block_url=e.sizes.thumbnail.url,n.setAttributes({images:t})},render:e=>(0,t.createElement)("div",null,(0,t.createElement)(ce.Button,{onClick:e.open,style:{display:"inline-block"}},i.id?(0,t.createElement)("img",{src:i.block_url,onClick:e.open}):__("Select image","bps-slider-block")))}),(0,t.createElement)(ce.Button,{isDestructive:!0,onClick:()=>{n.setAttributes({images:n.attributes.images.filter(((e,t)=>o!==t))})}},__("Remove image","bps-slider-block"))))})),u=function(t){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return o=n=function(n){function o(t){var n;c(this,o),e(h(h(n=p(this,g(o).call(this,t)))),"state",{}),e(h(h(n)),"handleStart",(function(e){var t=n.props,r=t.distance,i=t.shouldCancelStart;if(2!==e.button&&!i(e)){n.touched=!0,n.position=L(e);var o=N(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&n.nodeIsChild(o)&&!n.state.sorting){var a=n.props.useDragHandle,l=o.sortableInfo,s=l.index,c=l.collection;if(l.disabled)return;if(a&&!N(e.target,Q))return;n.manager.active={collection:c,index:s},K(e)||"A"!==e.target.tagName||e.preventDefault(),r||(0===n.props.pressDelay?n.handlePress(e):n.pressTimer=setTimeout((function(){return n.handlePress(e)}),n.props.pressDelay))}}})),e(h(h(n)),"nodeIsChild",(function(e){return e.sortableInfo.manager===n.manager})),e(h(h(n)),"handleMove",(function(e){var t=n.props,r=t.distance,i=t.pressThreshold;if(!n.state.sorting&&n.touched&&!n._awaitingUpdateBeforeSortStart){var o=L(e),a={x:n.position.x-o.x,y:n.position.y-o.y},l=Math.abs(a.x)+Math.abs(a.y);n.delta=a,r||i&&!(l>=i)?r&&l>=r&&n.manager.isActive()&&n.handlePress(e):(clearTimeout(n.cancelTimer),n.cancelTimer=setTimeout(n.cancel,0))}})),e(h(h(n)),"handleEnd",(function(){n.touched=!1,n.cancel()})),e(h(h(n)),"cancel",(function(){var e=n.props.distance;n.state.sorting||(e||clearTimeout(n.pressTimer),n.manager.active=null)})),e(h(h(n)),"handlePress",(function(e){try{var t=n.manager.getActive(),r=function(){if(t){var r=function(){var t=h.sortableInfo.index,r=j(h),i=X(n.container),u=n.scrollContainer.getBoundingClientRect(),m=a({index:t,node:h,collection:p});if(n.node=h,n.margin=r,n.gridGap=i,n.width=m.width,n.height=m.height,n.marginOffset={x:n.margin.left+n.margin.right+n.gridGap.x,y:Math.max(n.margin.top,n.margin.bottom,n.gridGap.y)},n.boundingClientRect=h.getBoundingClientRect(),n.containerBoundingRect=u,n.index=t,n.newIndex=t,n.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},n.offsetEdge=H(h,n.container),n.initialOffset=L(g?s({},e,{pageX:n.boundingClientRect.left,pageY:n.boundingClientRect.top}):e),n.initialScroll={left:n.scrollContainer.scrollLeft,top:n.scrollContainer.scrollTop},n.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},n.helper=n.helperContainer.appendChild(J(h)),R(n.helper,{boxSizing:"border-box",height:"".concat(n.height,"px"),left:"".concat(n.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(n.boundingClientRect.top-r.top,"px"),width:"".concat(n.width,"px")}),g&&n.helper.focus(),c&&(n.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"})),n.minTranslate={},n.maxTranslate={},g){var y=f?{top:0,left:0,width:n.contentWindow.innerWidth,height:n.contentWindow.innerHeight}:n.containerBoundingRect,v=y.top,b=y.left,x=y.width,w=v+y.height,S=b+x;n.axis.x&&(n.minTranslate.x=b-n.boundingClientRect.left,n.maxTranslate.x=S-(n.boundingClientRect.left+n.width)),n.axis.y&&(n.minTranslate.y=v-n.boundingClientRect.top,n.maxTranslate.y=w-(n.boundingClientRect.top+n.height))}else n.axis.x&&(n.minTranslate.x=(f?0:u.left)-n.boundingClientRect.left-n.width/2,n.maxTranslate.x=(f?n.contentWindow.innerWidth:u.left+u.width)-n.boundingClientRect.left-n.width/2),n.axis.y&&(n.minTranslate.y=(f?0:u.top)-n.boundingClientRect.top-n.height/2,n.maxTranslate.y=(f?n.contentWindow.innerHeight:u.top+u.height)-n.boundingClientRect.top-n.height/2);l&&l.split(" ").forEach((function(e){return n.helper.classList.add(e)})),n.listenerNode=e.touches?e.target:n.contentWindow,g?(n.listenerNode.addEventListener("wheel",n.handleKeyEnd,!0),n.listenerNode.addEventListener("mousedown",n.handleKeyEnd,!0),n.listenerNode.addEventListener("keydown",n.handleKeyDown)):(T.move.forEach((function(e){return n.listenerNode.addEventListener(e,n.handleSortMove,!1)})),T.end.forEach((function(e){return n.listenerNode.addEventListener(e,n.handleSortEnd,!1)}))),n.setState({sorting:!0,sortingIndex:t}),d&&d({node:h,index:t,collection:p,isKeySorting:g,nodes:n.manager.getOrderedRefs(),helper:n.helper},e),g&&n.keyMove(0)},i=n.props,o=i.axis,a=i.getHelperDimensions,l=i.helperClass,c=i.hideSortableGhost,u=i.updateBeforeSortStart,d=i.onSortStart,f=i.useWindowAsScrollContainer,h=t.node,p=t.collection,g=n.manager.isKeySorting,m=function(){if("function"==typeof u){n._awaitingUpdateBeforeSortStart=!0;var t=oe((function(){var t=h.sortableInfo.index;return Promise.resolve(u({collection:p,index:t,node:h,isKeySorting:g},e)).then((function(){}))}),(function(e,t){if(n._awaitingUpdateBeforeSortStart=!1,e)throw t;return t}));if(t&&t.then)return t.then((function(){}))}}();return m&&m.then?m.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),e(h(h(n)),"handleSortMove",(function(e){var t=n.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),n.updateHelperPosition(e),n.animateNodes(),n.autoscroll(),t&&t(e)})),e(h(h(n)),"handleSortEnd",(function(e){var t=n.props,r=t.hideSortableGhost,i=t.onSortEnd,o=n.manager,a=o.active.collection,l=o.isKeySorting,s=n.manager.getOrderedRefs();n.listenerNode&&(l?(n.listenerNode.removeEventListener("wheel",n.handleKeyEnd,!0),n.listenerNode.removeEventListener("mousedown",n.handleKeyEnd,!0),n.listenerNode.removeEventListener("keydown",n.handleKeyDown)):(T.move.forEach((function(e){return n.listenerNode.removeEventListener(e,n.handleSortMove)})),T.end.forEach((function(e){return n.listenerNode.removeEventListener(e,n.handleSortEnd)})))),n.helper.parentNode.removeChild(n.helper),r&&n.sortableGhost&&R(n.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=s.length;c<u;c++){var d=s[c],f=d.node;d.edgeOffset=null,d.boundingClientRect=null,D(f,null),A(f,null),d.translate=null}n.autoScroller.clear(),n.manager.active=null,n.manager.isKeySorting=!1,n.setState({sorting:!1,sortingIndex:null}),"function"==typeof i&&i({collection:a,newIndex:n.newIndex,oldIndex:n.index,isKeySorting:l,nodes:s},e),n.touched=!1})),e(h(h(n)),"autoscroll",(function(){var e=n.props.disableAutoscroll,t=n.manager.isKeySorting;if(e)n.autoScroller.clear();else{if(t){var r=s({},n.translate),i=0,o=0;return n.axis.x&&(r.x=Math.min(n.maxTranslate.x,Math.max(n.minTranslate.x,n.translate.x)),i=n.translate.x-r.x),n.axis.y&&(r.y=Math.min(n.maxTranslate.y,Math.max(n.minTranslate.y,n.translate.y)),o=n.translate.y-r.y),n.translate=r,D(n.helper,n.translate),n.scrollContainer.scrollLeft+=i,void(n.scrollContainer.scrollTop+=o)}n.autoScroller.update({height:n.height,maxTranslate:n.maxTranslate,minTranslate:n.minTranslate,translate:n.translate,width:n.width})}})),e(h(h(n)),"onAutoScroll",(function(e){n.translate.x+=e.left,n.translate.y+=e.top,n.animateNodes()})),e(h(h(n)),"handleKeyDown",(function(e){var t=e.keyCode,r=n.props,i=r.shouldCancelStart,o=r.keyCodes,a=s({},te,void 0===o?{}:o);n.manager.active&&!n.manager.isKeySorting||!(n.manager.active||a.lift.includes(t)&&!i(e)&&n.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),a.lift.includes(t)&&!n.manager.active?n.keyLift(e):a.drop.includes(t)&&n.manager.active?n.keyDrop(e):a.cancel.includes(t)?(n.newIndex=n.manager.active.index,n.keyDrop(e)):a.up.includes(t)?n.keyMove(-1):a.down.includes(t)&&n.keyMove(1))})),e(h(h(n)),"keyLift",(function(e){var t=e.target,r=N(t,(function(e){return null!=e.sortableInfo})).sortableInfo,i=r.index,o=r.collection;n.initialFocusedNode=t,n.manager.isKeySorting=!0,n.manager.active={index:i,collection:o},n.handlePress(e)})),e(h(h(n)),"keyMove",(function(e){var t=n.manager.getOrderedRefs(),r=t[t.length-1].node.sortableInfo.index,i=n.newIndex+e,o=n.newIndex;if(!(i<0||i>r)){n.prevIndex=o,n.newIndex=i;var a=B(n.newIndex,n.prevIndex,n.index),l=t.find((function(e){return e.node.sortableInfo.index===a})),s=l.node,c=n.containerScrollDelta,u=l.boundingClientRect||_(s,c),d=l.translate||{x:0,y:0},f=u.top+d.y-c.top,h=u.left+d.x-c.left,p=o<i,g=p&&n.axis.x?s.offsetWidth-n.width:0,m=p&&n.axis.y?s.offsetHeight-n.height:0;n.handleSortMove({pageX:h+g,pageY:f+m,ignoreTransition:0===e})}})),e(h(h(n)),"keyDrop",(function(e){n.handleSortEnd(e),n.initialFocusedNode&&n.initialFocusedNode.focus()})),e(h(h(n)),"handleKeyEnd",(function(e){n.manager.active&&n.keyDrop(e)})),e(h(h(n)),"isValidSortingTarget",(function(e){var t=n.props.useDragHandle,r=e.target,i=N(r,(function(e){return null!=e.sortableInfo}));return i&&i.sortableInfo&&!i.sortableInfo.disabled&&(t?Q(r):r.sortableInfo)}));var i=new O;return ie(t),n.manager=i,n.wrappedInstance=(0,r.createRef)(),n.sortableContextValue={manager:i},n.events={end:n.handleEnd,move:n.handleMove,start:n.handleStart},n}return y(o,n),d(o,[{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:F(e.container)||e.container,e.autoScroller=new Z(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return T[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 T[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,i=t.lockToContainerEdges,o=t.transitionDuration,a=t.keyboardSortingTransitionDuration,s=void 0===a?o:a,c=this.manager.isKeySorting,u=e.ignoreTransition,d=L(e),f={x:d.x-this.initialOffset.x,y:d.y-this.initialOffset.y};if(f.y-=window.pageYOffset-this.initialWindowScroll.top,f.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=f,i){var h=l(U({height:this.height,lockOffset:r,width:this.width}),2),p=h[0],g=h[1],m={x:this.width/2-p.x,y:this.height/2-p.y},y={x:this.width/2-g.x,y:this.height/2-g.y};f.x=P(this.minTranslate.x+m.x,this.maxTranslate.x-y.x,f.x),f.y=P(this.minTranslate.y+m.y,this.maxTranslate.y-y.y,f.y)}"x"===n?f.y=0:"y"===n&&(f.x=0),c&&s&&!u&&A(this.helper,s),D(this.helper,f)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,r=e.onSortOver,i=this.containerScrollDelta,o=this.windowScrollDelta,a=this.manager.getOrderedRefs(),l=this.offsetEdge.left+this.translate.x+i.left,s=this.offsetEdge.top+this.translate.y+i.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var d=0,f=a.length;d<f;d++){var h=a[d].node,p=h.sortableInfo.index,g=h.offsetWidth,m=h.offsetHeight,y={height:this.height>m?m/2:this.height/2,width:this.width>g?g/2:this.width/2},v=c&&p>this.index&&p<=u,b=c&&p<this.index&&p>=u,x={x:0,y:0},w=a[d].edgeOffset;w||(w=H(h,this.container),a[d].edgeOffset=w,c&&(a[d].boundingClientRect=_(h,i)));var S=d<a.length-1&&a[d+1],O=d>0&&a[d-1];S&&!S.edgeOffset&&(S.edgeOffset=H(S.node,this.container),c&&(S.boundingClientRect=_(S.node,i))),p!==this.index?(t&&A(h,t),this.axis.x?this.axis.y?b||p<this.index&&(l+o.left-y.width<=w.left&&s+o.top<=w.top+y.height||s+o.top+y.height<=w.top)?(x.x=this.width+this.marginOffset.x,w.left+x.x>this.containerBoundingRect.width-y.width&&S&&(x.x=S.edgeOffset.left-w.left,x.y=S.edgeOffset.top-w.top),null===this.newIndex&&(this.newIndex=p)):(v||p>this.index&&(l+o.left+y.width>=w.left&&s+o.top+y.height>=w.top||s+o.top+y.height>=w.top+m))&&(x.x=-(this.width+this.marginOffset.x),w.left+x.x<this.containerBoundingRect.left+y.width&&O&&(x.x=O.edgeOffset.left-w.left,x.y=O.edgeOffset.top-w.top),this.newIndex=p):v||p>this.index&&l+o.left+y.width>=w.left?(x.x=-(this.width+this.marginOffset.x),this.newIndex=p):(b||p<this.index&&l+o.left<=w.left+y.width)&&(x.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=p)):this.axis.y&&(v||p>this.index&&s+o.top+y.height>=w.top?(x.y=-(this.height+this.marginOffset.y),this.newIndex=p):(b||p<this.index&&s+o.top<=w.top+y.height)&&(x.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=p))),D(h,x),a[d].translate=x):n&&(this.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var k=c?this.prevIndex:u;r&&this.newIndex!==k&&r({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:k,isKeySorting:c,nodes:a,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return x()(a.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,v.findDOMNode)(this):e(a.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var e=a.withRef?this.wrappedInstance:null;return(0,r.createElement)(ae.Provider,{value:this.sortableContextValue},(0,r.createElement)(t,i({ref:e},E(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}}}]),o}(r.Component),e(n,"displayName",W("sortableList",t)),e(n,"defaultProps",ne),e(n,"propTypes",ee),o}((e=>{let{items:r}=e;return(0,t.createElement)("div",{className:"slider-edit-block"},(0,t.createElement)("h4",null,__("Slider images","bps-slider-block"),":"),(0,t.createElement)(ce.Flex,{justify:"flex-start",wrap:"true"},r.map(((e,n)=>(0,t.createElement)(a,{key:`item-${e}`,index:n,value:e})))),(0,t.createElement)(ce.Button,{isPrimary:!0,onClick:()=>{n.setAttributes({images:n.attributes.images.concat([{}])})}},__("Add image","bps-slider-block")))}));class f extends r.Component{constructor(){super(...arguments),e(this,"state",{items:o}),e(this,"onSortEnd",(e=>{let{oldIndex:t,newIndex:r}=e;const i=C(o,t,r);this.setState((e=>{let{items:n}=e;return{items:C(n,t,r)}}));const a=n.attributes.images.concat([]);a.sort((function(e,t){return i.indexOf(e.id)-i.indexOf(t.id)})),n.setAttributes({images:a})}))}render(){return(0,t.createElement)(u,{items:this.state.items,onSortEnd:this.onSortEnd,axis:"xy"})}}class m extends r.Component{render(){return(0,t.createElement)(ue.InspectorControls,null,(0,t.createElement)(ce.PanelBody,{title:__("Slider settings","bps-slider-block"),initialOpen:!0},(0,t.createElement)(ce.RangeControl,{label:__("Height ratio","bps-slider-block"),value:n.attributes.height_ratio,onChange:e=>n.setAttributes({height_ratio:e.toString()}),initialPosition:Number(n.attributes.height_ratio),min:.4,max:1,step:.1}),(0,t.createElement)(ce.RangeControl,{label:__("Gap in px","bps-slider-block"),value:n.attributes.gap,onChange:e=>n.setAttributes({gap:e.toString()}),initialPosition:Number(n.attributes.gap),min:0,max:100,step:5}),(0,t.createElement)(ce.RangeControl,{label:__("Padding in %","bps-slider-block"),value:n.attributes.padding,onChange:e=>n.setAttributes({padding:e.toString()}),initialPosition:Number(n.attributes.padding),min:0,max:30,step:2})))}}return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(m,null),(0,t.createElement)(f,null))},save:function(e){return null}})}()}(); -
bps-splide-slider-block/trunk/build/frontend.asset.php
r2684849 r2938740 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-element'), 'version' => ' 2497db1c79ecd50644a3a87a0c4ea679');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-element'), 'version' => '03956cb64da2518604643d053a0a0a07'); -
bps-splide-slider-block/trunk/build/frontend.css
r2793666 r2938740 1 1 .splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important;transform-style:preserve-3d}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{outline:none;position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;outline:none;position:relative}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide--draggable>.splide__slider>.splide__track,.splide--draggable>.splide__track{-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide--fade>.splide__slider>.splide__track>.splide__list,.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--fade>.splide__track>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide--ttb.is-active>.splide__slider>.splide__track>.splide__list,.splide--ttb.is-active>.splide__track>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover{opacity:.9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4)}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{background:#ccc;height:3px}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide:focus,.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{left:auto;right:1em}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{bottom:1em;top:auto}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination,.splide--ttb>.splide__slider>.splide__pagination{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0} 2 2 .splide__pagination{background:linear-gradient(180deg,transparent,rgba(0,0,0,.5));bottom:0!important;padding:15px!important} -
bps-splide-slider-block/trunk/build/frontend.js
r2793666 r2938740 1 !function(){"use strict";var t={n:function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},d:function(n,e){for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)}},n=window.wp.element,e=window.React,i=t.n(e),o=window.ReactDOM,s=t.n(o);function r(t){t.length=0}function c(t){return!d(t)&&"object"==typeof t}function u(t){return Array.isArray(t)}function l(t){return"string"==typeof t}function a(t){return void 0===t}function d(t){return null===t}function f(t){return t instanceof HTMLElement}function p(t){return u(t)?t:[t]}function h(t,n){p(t).forEach(n)}function g(t,n){return t.indexOf(n)>-1}function m(t,n){return t.push(...p(n)),t}var y=Array.prototype;function _(t,n,e){return y.slice.call(t,n,e)}function v(t,n,e){t&&h(n,(n=>{n&&t.classList[e?"add":"remove"](n)}))}function b(t,n){v(t,l(n)?n.split(" "):n,!0)}function w(t,n){h(n,t.appendChild.bind(t))}function E(t,n){h(t,(t=>{const e=n.parentNode;e&&e.insertBefore(t,n)}))}function x(t,n){return f(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function S(t,n){return t?_(t.children).filter((t=>x(t,n))):[]}function k(t,n){return n?S(t,n)[0]:t.firstElementChild}function P(t,n,e){if(t){let i=Object.keys(t);i=e?i.reverse():i;for(let e=0;e<i.length;e++){const o=i[e];if("__proto__"!==o&&!1===n(t[o],o))break}}return t}function A(t){return _(arguments,1).forEach((n=>{P(n,((e,i)=>{t[i]=n[i]}))})),t}function $(t,n){return P(n,((n,e)=>{u(n)?t[e]=n.slice():c(n)?t[e]=$(c(t[e])?t[e]:{},n):t[e]=n})),t}function L(t,n){t&&h(n,(n=>{t.removeAttribute(n)}))}function C(t,n,e){c(n)?P(n,((n,e)=>{C(t,e,n)})):d(e)?L(t,n):t.setAttribute(n,String(e))}function N(t,n,e){const i=document.createElement(t);return n&&(l(n)?b(i,n):C(i,n)),e&&w(e,i),i}function z(t,n,e){if(a(e))return getComputedStyle(t)[n];if(!d(e)){const{style:i}=t;e=`${e}`,i[n]!==e&&(i[n]=e)}}function D(t,n){z(t,"display",n)}function M(t,n){return t.getAttribute(n)}function R(t,n){return t&&t.classList.contains(n)}function O(t){return t.getBoundingClientRect()}function T(t){h(t,(t=>{t&&t.parentNode&&t.parentNode.removeChild(t)}))}function I(t){return k((new DOMParser).parseFromString(t,"text/html").body)}function j(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function F(t,n){return t&&t.querySelector(n)}function B(t,n){return _(t.querySelectorAll(n))}function W(t,n){v(t,n,!1)}function H(t){return l(t)?t:t?`${t}px`:""}function X(t,n=""){if(!t)throw new Error(`[splide] ${n}`)}function U(t){setTimeout(t)}var q=()=>{};function G(t){return requestAnimationFrame(t)}var{min:Y,max:J,floor:V,ceil:K,abs:Q}=Math;function Z(t,n,e,i){const o=Y(n,e),s=J(n,e);return i?o<t&&t<s:o<=t&&t<=s}function tt(t,n,e){const i=Y(n,e),o=J(n,e);return Y(J(i,t),o)}function nt(t){return+(t>0)-+(t<0)}function et(t,n){return h(n,(n=>{t=t.replace("%s",`${n}`)})),t}function it(t){return t<10?`0${t}`:`${t}`}var ot={},st="mounted",rt="ready",ct="move",ut="moved",lt="shifted",at="click",dt="active",ft="inactive",pt="visible",ht="hidden",gt="slide:keydown",mt="refresh",yt="updated",_t="resize",vt="resized",bt="repositioned",wt="drag",Et="dragging",xt="dragged",St="scroll",kt="scrolled",Pt="destroy",At="arrows:mounted",$t="arrows:updated",Lt="pagination:mounted",Ct="pagination:updated",Nt="navigation:mounted",zt="autoplay:play",Dt="autoplay:playing",Mt="autoplay:pause",Rt="lazyload:loaded";function Ot(t){const{event:n}=t,e={};let i=[];function o(t,n,e){s(t,n,((t,n)=>{i=i.filter((i=>!!(i[0]!==t||i[1]!==n||e&&i[2]!==e)||(t.removeEventListener(n,i[2],i[3]),!1)))}))}function s(t,n,e){h(t,(t=>{t&&n.split(" ").forEach(e.bind(null,t))}))}function r(){i=i.filter((t=>o(t[0],t[1]))),n.offBy(e)}return n.on(Pt,r,e),{on:function(t,i,o){n.on(t,i,e,o)},off:function(t){n.off(t,e)},emit:n.emit,bind:function(t,n,e,o){s(t,n,((t,n)=>{i.push([t,n,e,o]),t.addEventListener(n,e,o)}))},unbind:o,destroy:r}}function Tt(t,n,e,i){const{now:o}=Date;let s,r,c=0,u=!0,l=0;function a(){if(!u){const r=o()-s;if(r>=t?(c=1,s=o()):c=r/t,e&&e(c),1===c&&(n(),i&&++l>=i))return d();G(a)}}function d(){u=!0}function f(){cancelAnimationFrame(r),c=0,r=0,u=!0}return{start:function(n){!n&&f(),s=o()-(n?c*t:0),u=!1,G(a)},rewind:function(){s=o(),c=0,e&&e(c)},pause:d,cancel:f,set:function(n){t=n},isPaused:function(){return u}}}function It(t,n){let e;return function(){e||(e=Tt(n||0,(()=>{t.apply(this,arguments),e=null}),null,1),e.start())}}var jt="ttb",Ft={marginRight:["marginBottom","marginLeft"],autoWidth:["autoHeight"],fixedWidth:["fixedHeight"],paddingLeft:["paddingTop","paddingRight"],paddingRight:["paddingBottom","paddingLeft"],width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]},Bt="splide__slide--clone",Wt="is-active",Ht="is-prev",Xt="is-next",Ut="is-visible",qt="is-loading",Gt=[Wt,Ut,Ht,Xt,qt],Yt={slide:"splide__slide",clone:Bt,arrows:"splide__arrows",arrow:"splide__arrow",prev:"splide__arrow--prev",next:"splide__arrow--next",pagination:"splide__pagination",page:"splide__pagination__page",spinner:"splide__spinner"},Jt="role",Vt="aria-controls",Kt="aria-current",Qt="aria-label",Zt="aria-hidden",tn="tabindex",nn="aria-orientation",en=[Jt,Vt,Kt,Qt,Zt,nn,tn,"disabled"],on="slide",sn="loop",rn="fade";var cn={passive:!1,capture:!0},un="touchmove mousemove",ln="touchend touchcancel mouseup",an=["Left","Right","Up","Down"],dn="keydown",fn="data-splide-lazy",pn="data-splide-lazy-srcset",hn=[" ","Enter","Spacebar"],gn=Object.freeze({__proto__:null,Options:function(t,n,e){const i=It(u);let o,s,r;function c(t){t&&removeEventListener("resize",i)}function u(){const n=(i=t=>t[1].matches,_(s).filter(i)[0]||[]);var i;n[0]!==r&&function(n){const i=e.breakpoints[n]||o;i.destroy?(t.options=o,t.destroy("completely"===i.destroy)):(t.state.is(5)&&(c(!0),t.mount()),t.options=i)}(r=n[0])}return{setup:function(){try{$(e,JSON.parse(M(t.root,"data-splide")))}catch(t){X(!1,t.message)}o=$({},e);const{breakpoints:n}=e;if(n){const t="min"===e.mediaQuery;s=Object.keys(n).sort(((n,e)=>t?+e-+n:+n-+e)).map((n=>[n,matchMedia(`(${t?"min":"max"}-width:${n}px)`)])),u()}},mount:function(){s&&addEventListener("resize",i)},destroy:c}},Direction:function(t,n,e){return{resolve:function(t,n){const{direction:i}=e;return Ft[t]["rtl"!==i||n?i===jt?0:-1:1]||t},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){const{on:i}=Ot(t),{root:o}=t,s={},c=[];let u,l,a,d;function f(){!function(){l=k(o,".splide__slider"),a=F(o,".splide__track"),d=k(a,".splide__list"),X(a&&d,"A track/list element is missing."),m(c,S(d,`.splide__slide:not(.${Bt})`));const t=y(".splide__autoplay"),n=y(".splide__arrows");A(s,{root:o,slider:l,track:a,list:d,slides:c,arrows:n,autoplay:t,prev:F(n,".splide__arrow--prev"),next:F(n,".splide__arrow--next"),bar:F(y(".splide__progress"),".splide__progress__bar"),play:F(t,".splide__play"),pause:F(t,".splide__pause")})}(),function(){const t=o.id||("splide",`splide${it(ot.splide=(ot.splide||0)+1)}`);o.id=t,a.id=a.id||`${t}-track`,d.id=d.id||`${t}-list`}(),b(o,u=_())}function p(){[o,a,d].forEach((t=>{L(t,"style")})),r(c),W(o,u)}function h(){p(),f()}function g(){W(o,u),b(o,u=_())}function y(t){return k(o,t)||k(l,t)}function _(){return[`splide--${e.type}`,`splide--${e.direction}`,e.drag&&"splide--draggable",e.isNavigation&&"splide--nav",Wt]}return A(s,{setup:f,mount:function(){i(mt,h,8),i(yt,g)},destroy:p})},Slides:function(t,n,e){const{on:i,emit:o,bind:s}=Ot(t),{slides:c,list:u}=n.Elements,a=[];function d(){c.forEach(((t,n)=>{_(t,n,-1)}))}function m(){P((t=>{t.destroy()})),r(a)}function y(){m(),d()}function _(n,e,i){const o=function(t,n,e,i){const{on:o,emit:s,bind:r,destroy:c}=Ot(t),{Components:u,root:l,options:a}=t,{isNavigation:d,updateOnMove:f}=a,{resolve:p}=u.Direction,h=M(i,"style"),g=e>-1,m=k(i,".splide__slide__container"),y=a.focusableNodes&&B(i,a.focusableNodes);let _;function b(){const o=g?e:n,s=et(a.i18n.slideX,o+1),r=t.splides.map((t=>t.splide.root.id)).join(" ");C(i,Qt,s),C(i,Vt,r),C(i,Jt,"menuitem"),x(S())}function w(){_||E()}function E(){if(!_){const{index:e}=t;x(S()),function(t){const n=!t&&(!S()||g);C(i,Zt,n||null),C(i,tn,!n&&a.slideFocus?0:null),y&&y.forEach((t=>{C(t,tn,n?-1:null)})),t!==R(i,Ut)&&(v(i,Ut,t),s(t?pt:ht,P))}(function(){if(t.is(rn))return S();const n=O(u.Elements.track),e=O(i),o=p("left"),s=p("right");return V(n[o])<=K(e[o])&&V(e[s])<=K(n[s])}()),v(i,Ht,n===e-1),v(i,Xt,n===e+1)}}function x(t){t!==R(i,Wt)&&(v(i,Wt,t),d&&C(i,Kt,t||null),s(t?dt:ft,P))}function S(){const{index:i}=t;return i===n||a.cloneStatus&&i===e}const P={index:n,slideIndex:e,slide:i,container:m,isClone:g,mount:function(){g||(i.id=`${l.id}-slide${it(n+1)}`),r(i,"click keydown",(t=>{s("click"===t.type?at:gt,P,t)})),o([mt,bt,lt,ut,kt],E),o(Nt,b),f&&o(ct,w)},destroy:function(){_=!0,c(),W(i,Gt),L(i,en),C(i,"style",h)},update:E,style:function(t,n,e){z(e&&m||i,t,n)},isWithin:function(e,i){let o=Q(e-n);return g||!a.rewind&&!t.is(sn)||(o=Y(o,t.length-o)),o<=i}};return P}(t,e,i,n);o.mount(),a.push(o)}function S(t){return t?A((t=>!t.isClone)):a}function P(t,n){S(n).forEach(t)}function A(t){return a.filter("function"==typeof t?t:n=>l(t)?x(n.slide,t):g(p(t),n.index))}return{mount:function(){d(),i(mt,y),i([st,mt],(()=>{a.sort(((t,n)=>t.index-n.index))}))},destroy:m,update:function(){P((t=>{t.update()}))},register:_,get:S,getIn:function(t){const{Controller:i}=n,o=i.toIndex(t),s=i.hasFocus()?1:e.perPage;return A((t=>Z(t.index,o,o+s-1)))},getAt:function(t){return A(t)[0]},add:function(t,n){h(t,(t=>{if(l(t)&&(t=I(t)),f(t)){const i=c[n];i?E(t,i):w(u,t),b(t,e.classes.slide),function(t,n){const e=B(t,"img");let{length:i}=e;i?e.forEach((t=>{s(t,"load error",(()=>{--i||n()}))})):n()}(t,o.bind(null,_t))}})),o(mt)},remove:function(t){T(A(t).map((t=>t.slide))),o(mt)},forEach:P,filter:A,style:function(t,n,e){P((i=>{i.style(t,n,e)}))},getLength:function(t){return t?c.length:a.length},isEnough:function(){return a.length>e.perPage}}},Layout:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),{Slides:r}=n,{resolve:u}=n.Direction,{root:l,track:a,list:d}=n.Elements,{getAt:f}=r;let p,h;function g(){h=null,p=e.direction===jt,z(l,"maxWidth",H(e.width)),z(a,u("paddingLeft"),y(!1)),z(a,u("paddingRight"),y(!0)),m()}function m(){const t=O(l);h&&h.width===t.width&&h.height===t.height||(z(a,"height",function(){let t="";return p&&(t=_(),X(t,"height or heightRatio is missing."),t=`calc(${t} - ${y(!1)} - ${y(!0)})`),t}()),r.style(u("marginRight"),H(e.gap)),r.style("width",(e.autoWidth?"":H(e.fixedWidth)||(p?"":v()))||null),r.style("height",H(e.fixedHeight)||(p?e.autoHeight?"":v():_())||null,!0),h=t,s(vt))}function y(t){const{padding:n}=e,i=u(t?"right":"left");return n&&H(n[i]||(c(n)?0:n))||"0px"}function _(){return H(e.height||O(d).width*e.heightRatio)}function v(){const t=H(e.gap);return`calc((100%${t&&` + ${t}`})/${e.perPage||1}${t&&` - ${t}`})`}function b(t,n){const e=f(t);if(e){const t=O(e.slide)[u("right")],i=O(d)[u("left")];return Q(t-i)+(n?0:w())}return 0}function w(){const t=f(0);return t&&parseFloat(z(t.slide,u("marginRight")))||0}return{mount:function(){g(),o(window,"resize load",It(s.bind(this,_t))),i([yt,mt],g),i(_t,m)},listSize:function(){return O(d)[u("width")]},slideSize:function(t,n){const e=f(t||0);return e?O(e.slide)[u("width")]+(n?0:w()):0},sliderSize:function(){return b(t.length-1,!0)-b(-1,!0)},totalSize:b,getPadding:function(t){return parseFloat(z(a,u("padding"+(t?"Right":"Left"))))||0}}},Clones:function(t,n,e){const{on:i,emit:o}=Ot(t),{Elements:s,Slides:c}=n,{resolve:u}=n.Direction,a=[];let d;function f(){(d=y())&&(function(n){const i=c.get().slice(),{length:o}=i;if(o){for(;i.length<n;)m(i,i);m(i.slice(-n),i.slice(0,n)).forEach(((r,u)=>{const l=u<n,d=function(n,i){const o=n.cloneNode(!0);return b(o,e.classes.clone),o.id=`${t.root.id}-clone${it(i+1)}`,o}(r.slide,u);l?E(d,i[0].slide):w(s.list,d),m(a,d),c.register(d,u-n+(l?0:o),r.index)}))}}(d),o(_t))}function p(){T(a),r(a)}function h(){p(),f()}function g(){d<y()&&o(mt)}function y(){let{clones:n}=e;if(t.is(sn)){if(!n){const i=function(t,n){if(l(n)){const e=N("div",{style:`width: ${n}; position: absolute;`},t);n=O(e).width,T(e)}return n}(s.list,e[u("fixedWidth")]);n=(i&&K(O(s.track)[u("width")]/i)||e[u("autoWidth")]&&t.length||e.perPage)*(e.drag?(e.flickMaxPages||1)+1:2)}}else n=0;return n}return{mount:function(){f(),i(mt,h),i([yt,_t],g)},destroy:p}},Move:function(t,n,e){const{on:i,emit:o}=Ot(t),{slideSize:s,getPadding:r,totalSize:c,listSize:u,sliderSize:l}=n.Layout,{resolve:d,orient:f}=n.Direction,{list:p,track:h}=n.Elements;let g;function m(){x()||(n.Scroll.cancel(),y(t.index),o(bt))}function y(t){_(b(t,!0))}function _(n,e){if(!t.is(rn)){const i=e?n:function(n){if(t.is(sn)){const t=f(n-w()),e=S(!1,n)&&t<0,i=S(!0,n)&&t>0;(e||i)&&(n=v(n,i))}return n}(n);p.style.transform=`translate${d("X")}(${i}px)`,n!==i&&o(lt)}}function v(t,n){const e=t-E(n),i=l();return t-f(i*(K(Q(e)/i)||1))*(n?1:-1)}function b(n,i){const o=f(c(n-1)-function(t){const{focus:n}=e;return"center"===n?(u()-s(t,!0))/2:+n*s(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(on)&&(n=tt(n,0,f(l()-u()))),n}(o):o}function w(){const t=d("left");return O(p)[t]-O(h)[t]+f(r(!1))}function E(t){return b(t?n.Controller.getEnd():0,!!e.trimSpace)}function x(){return t.state.is(4)&&e.waitForTransition}function S(t,n){n=a(n)?w():n;const e=!0!==t&&f(n)<f(E(!1)),i=!1!==t&&f(n)>f(E(!0));return e||i}return{mount:function(){g=n.Transition,i([st,vt,yt,mt],m)},destroy:function(){L(p,"style")},move:function(i,s,r,c){if(!x()){const{set:u}=t.state,l=w();i!==s&&(g.cancel(),_(v(l,i>s),!0)),u(4),o(ct,s,r,i),g.start(s,(()=>{u(3),o(ut,s,r,i),"move"===e.trimSpace&&i!==r&&l===w()?n.Controller.go(i>r?">":"<",!1,c):c&&c()}))}},jump:y,translate:_,shift:v,cancel:function(){_(w()),g.cancel()},toIndex:function(t){const e=n.Slides.get();let i=0,o=1/0;for(let n=0;n<e.length;n++){const s=e[n].index,r=Q(b(s,!0)-t);if(!(r<=o))break;o=r,i=s}return i},toPosition:b,getPosition:w,getLimit:E,isBusy:x,exceededLimit:S}},Controller:function(t,n,e){const{on:i}=Ot(t),{Move:o}=n,{getPosition:s,getLimit:r}=o,{isEnough:c,getLength:u}=n.Slides,d=t.is(sn),f=t.is(on);let p,h,g,m=e.start||0,y=m;function _(){p=u(!0),h=e.perMove,g=e.perPage,m=tt(m,0,p-1)}function v(t,e,i,s,r){const c=e?t:$(t);n.Scroll.scroll(e||i?o.toPosition(c,!0):t,s,(()=>{L(o.toIndex(o.getPosition())),r&&r()}))}function b(t){return E(!1,t)}function w(t){return E(!0,t)}function E(t,n){const e=h||(C()?1:g),i=x(m+e*(t?-1:1),m);return-1!==i||!f||(o=s(),c=r(!t),1,Q(o-c)<1)?n?i:k(i):t?0:S();var o,c}function x(t,n,i){if(c()){const o=S();t<0||t>o?t=Z(0,t,n,!0)||Z(o,n,t,!0)?P(A(t)):d?h||C()?t:t<0?-(p%g||g):p:e.rewind?t<0?o:0:-1:i||t===n||(t=h?t:P(A(n)+(t<n?-1:1)))}else t=-1;return t}function S(){let t=p-g;return(C()||d&&h)&&(t=p-1),J(t,0)}function k(t){return d?c()?t%p+(t<0?p:0):-1:t}function P(t){return tt(C()?t:g*t,0,S())}function A(t){return C()||(t=Z(t,p-g,p-1)?p-1:t,t=V(t/g)),t}function $(t){const n=o.toIndex(t);return f?tt(n,0,S()):n}function L(t){t!==m&&(y=m,m=t)}function C(){return!a(e.focus)||e.isNavigation}return{mount:function(){_(),i([yt,mt],_,9)},go:function(t,n,i){const s=function(t){let n=m;if(l(t)){const[,e,i]=t.match(/([+\-<>])(\d+)?/)||[];"+"===e||"-"===e?n=x(m+ +`${e}${+i||1}`,m,!0):">"===e?n=i?P(+i):b(!0):"<"===e&&(n=w(!0))}else n=d?t:tt(t,0,S());return n}(t);if(e.useScroll)v(s,!0,!0,e.speed,i);else{const t=k(s);t>-1&&!o.isBusy()&&(n||t!==m)&&(L(t),o.move(s,t,y,i))}},scroll:v,getNext:b,getPrev:w,getAdjacent:E,getEnd:S,setIndex:L,getIndex:function(t){return t?y:m},toIndex:P,toPage:A,toDest:$,hasFocus:C}},Arrows:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),{classes:r,i18n:c}=e,{Elements:u,Controller:l}=n;let a,d=u.arrows,f=u.prev,p=u.next;const h={};function g(){if(e.arrows&&(f&&p||(d=N("div",r.arrows),f=m(!0),p=m(!1),a=!0,w(d,[f,p]),E(d,k("slider"===e.arrows&&u.slider||t.root)))),f&&p)if(h.prev)D(d,!1===e.arrows?"none":"");else{const{id:t}=u.track;C(f,Vt,t),C(p,Vt,t),h.prev=f,h.next=p,function(){const{go:t}=l;i([st,ut,yt,mt,kt],y),o(p,"click",(()=>{t(">",!0)})),o(f,"click",(()=>{t("<",!0)}))}(),s(At,f,p)}}function m(t){return I(`<button class="${r.arrow} ${t?r.prev:r.next}" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40"><path d="${e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"}" />`)}function y(){const n=t.index,e=l.getPrev(),i=l.getNext(),o=e>-1&&n<e?c.last:c.prev,r=i>-1&&n>i?c.first:c.next;f.disabled=e<0,p.disabled=i<0,C(f,Qt,o),C(p,Qt,r),s($t,f,p,e,i)}return{arrows:h,mount:function(){g(),i(yt,g)},destroy:function(){a?T(d):(L(f,en),L(p,en))}}},Autoplay:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),r=Tt(e.interval,t.go.bind(t,">"),(function(t){const{bar:n}=u;n&&z(n,"width",100*t+"%"),s(Dt,t)})),{isPaused:c}=r,{Elements:u}=n;let l,a,d;function f(t){const n=t?"pause":"play",i=u[n];i&&(C(i,Vt,u.track.id),C(i,Qt,e.i18n[n]),o(i,"click",t?h:p))}function p(){c()&&n.Slides.isEnough()&&(r.start(!e.resetProgress),a=l=d=!1,s(zt))}function h(t=!0){c()||(r.pause(),s(Mt)),d=t}function g(){d||(l||a?h(!1):p())}function m(){const i=n.Slides.getAt(t.index);r.set(i&&+M(i.slide,"data-splide-interval")||e.interval)}return{mount:function(){const{autoplay:t}=e;t&&(f(!0),f(!1),function(){const{root:t}=u;e.pauseOnHover&&o(t,"mouseenter mouseleave",(t=>{l="mouseenter"===t.type,g()})),e.pauseOnFocus&&o(t,"focusin focusout",(t=>{a="focusin"===t.type,g()})),i([ct,St,mt],r.rewind),i(ct,m)}(),"pause"!==t&&p())},destroy:r.cancel,play:p,pause:h,isPaused:c}},Cover:function(t,n,e){const{on:i}=Ot(t);function o(t){n.Slides.forEach((n=>{const e=k(n.container||n.slide,"img");e&&e.src&&s(t,e,n)}))}function s(t,n,e){e.style("background",t?`center/cover no-repeat url("${n.src}")`:"",!0),D(n,t?"none":"")}return{mount:function(){e.cover&&(i(Rt,((t,n)=>{s(!0,t,n)})),i([st,yt,mt],o.bind(null,!0)))},destroy:function(){o(!1)}}},Scroll:function(t,n,e){const{on:i,emit:o}=Ot(t),{Move:s}=n,{getPosition:r,getLimit:c,exceededLimit:u}=s;let l,a;function d(){const n=r(),e=s.toIndex(n);Z(e,0,t.length-1)||s.translate(s.shift(n,e>0),!0),a&&a(),o(kt)}function f(){l&&l.cancel()}function p(){l&&!l.isPaused()&&(f(),d())}return{mount:function(){i(ct,f),i([yt,mt],p)},destroy:f,scroll:function n(i,p,h,g){const m=r();let y=1;var _;p=p||(_=Q(i-m),J(_/1.5,800)),a=h,f(),l=Tt(p,d,(o=>{const l=r(),a=(m+(i-m)*function(t){const{easingFunc:n}=e;return n?n(t):1-Math.pow(1-t,4)}(o)-r())*y;var d;s.translate(l+a),t.is(on)&&!g&&u()&&(y*=.6,Q(a)<10&&(d=u(!1),n(c(!d),600,null,!0)))}),1),o(St),l.start()},cancel:p}},Drag:function(t,n,e){const{on:i,emit:o,bind:s,unbind:r}=Ot(t),{Move:u,Scroll:l,Controller:a}=n,{track:d}=n.Elements,{resolve:f,orient:p}=n.Direction,{getPosition:h,exceededLimit:g}=u;let m,y,_,v,b,w,E,S,k,P=!1;function A(){const{drag:t}=e;T(!t),b="free"===t}function $(t){if(!S){const{noDrag:n}=e,i=O(t),o=!n||!x(t.target,n);E=!1,!o||!i&&t.button||(u.isBusy()?j(t,!0):(k=i?d:window,_=null,v=null,s(k,un,L,cn),s(k,ln,C,cn),u.cancel(),l.cancel(),N(t)))}}function L(n){if(v||o(wt),v=n,n.cancelable){const i=M(n)-M(y);if(w){u.translate(m+function(n){return n/(P&&t.is(on)?5:1)}(i));const e=R(n)-R(y)>200,s=P!==(P=g());(e||s)&&N(n),o(Et),E=!0,j(n)}else{let{dragMinThreshold:t}=e;t=c(t)?t:{mouse:0,touch:+t||10},w=Q(i)>(O(n)?t.touch:t.mouse),D()&&j(n)}}}function C(i){r(k,un,L),r(k,ln,C);const{index:s}=t;if(v){if(w||i.cancelable&&D()){const o=function(n){if(t.is(sn)||!P){const t=y===v&&_||y,e=M(v)-M(t),i=R(n)-R(t),o=R(n)-R(v)<200;if(i&&o)return e/i}return 0}(i),r=function(t){return h()+nt(t)*Y(Q(t)*(e.flickPower||600),b?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(o);b?a.scroll(r):t.is(rn)?a.go(s+p(nt(o))):a.go(a.toDest(r),!0),j(i)}o(xt)}else b||h()===u.toPosition(s)||a.go(s,!0);w=!1}function N(t){_=y,y=t,m=h()}function z(t){!S&&E&&j(t,!0)}function D(){return Q(M(v)-M(y))>Q(M(v,!0)-M(y,!0))}function M(t,n){return(O(t)?t.touches[0]:t)[`page${f(n?"Y":"X")}`]}function R(t){return t.timeStamp}function O(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function T(t){S=t}return{mount:function(){s(d,un,q,cn),s(d,ln,q,cn),s(d,"touchstart mousedown",$,cn),s(d,"click",z,{capture:!0}),s(d,"dragstart",j),i([st,yt],A)},disable:T,isDragging:function(){return w}}},Keyboard:function(t,n,e){const{on:i,bind:o,unbind:s}=Ot(t),{root:r}=t,{resolve:c}=n.Direction;let u,l;function a(){const{keyboard:t}=e;t&&("focused"===t?(u=r,C(r,tn,0)):u=window,o(u,dn,m))}function d(){s(u,dn),f(u)&&L(u,tn)}function p(){const t=l;l=!0,U((()=>{l=t}))}function h(){d(),a()}function m(n){if(!l){const{key:e}=n,i=g(an,e)?`Arrow${e}`:e;i===c("ArrowLeft")?t.go("<"):i===c("ArrowRight")&&t.go(">")}}return{mount:function(){a(),i(yt,h),i(ct,p)},destroy:d,disable:function(t){l=t}}},LazyLoad:function(t,n,e){const{on:i,off:o,bind:s,emit:r}=Ot(t),c="sequential"===e.lazyLoad;let u=[],l=0;function a(){f(),d()}function d(){n.Slides.forEach((t=>{B(t.slide,"[data-splide-lazy], [data-splide-lazy-srcset]").forEach((n=>{const i=M(n,fn),o=M(n,pn);if(i!==n.src||o!==n.srcset){const s=e.classes.spinner,r=n.parentElement,c=k(r,`.${s}`)||N("span",s,r);C(c,Jt,"presentation"),u.push({_img:n,_Slide:t,src:i,srcset:o,_spinner:c}),!n.src&&D(n,"none")}}))})),c&&g()}function f(){l=0,u=[]}function p(){u=u.filter((n=>{const i=e.perPage*((e.preloadPages||1)+1)-1;return!n._Slide.isWithin(t.index,i)||h(n)})),u.length||o(ut)}function h(t){const{_img:n}=t;b(t._Slide.slide,qt),s(n,"load error",(n=>{!function(t,n){const{_Slide:e}=t;W(e.slide,qt),n||(T(t._spinner),D(t._img,""),r(Rt,t._img,e),r(_t)),c&&g()}(t,"error"===n.type)})),["srcset","src"].forEach((e=>{t[e]&&(C(n,e,t[e]),L(n,"src"===e?fn:pn))}))}function g(){l<u.length&&h(u[l++])}return{mount:function(){e.lazyLoad&&(d(),i(mt,a),c||i([st,mt,ut,kt],p))},destroy:f}},Pagination:function(t,n,e){const{on:i,emit:o,bind:s,unbind:c}=Ot(t),{Slides:u,Elements:l,Controller:a}=n,{hasFocus:d,getIndex:f}=a,p=[];let h;function g(){m(),e.pagination&&u.isEnough()&&(function(){const{length:n}=t,{classes:i,i18n:o,perPage:r}=e,c="slider"===e.pagination&&l.slider||l.root,a=d()?n:K(n/r);h=N("ul",i.pagination,c);for(let t=0;t<a;t++){const n=N("li",null,h),e=N("button",{class:i.page,type:"button"},n),c=u.getIn(t).map((t=>t.slide.id)),l=!d()&&r>1?o.pageX:o.slideX;s(e,"click",y.bind(null,t)),C(e,Vt,c.join(" ")),C(e,Qt,et(l,t+1)),p.push({li:n,button:e,page:t})}}(),o(Lt,{list:h,items:p},_(t.index)),v())}function m(){h&&(T(h),p.forEach((t=>{c(t.button,"click")})),r(p),h=null)}function y(t){a.go(`>${t}`,!0,(()=>{const n=u.getAt(a.toIndex(t));var e;n&&((e=n.slide).setActive&&e.setActive()||e.focus({preventScroll:!0}))}))}function _(t){return p[a.toPage(t)]}function v(){const t=_(f(!0)),n=_(f());t&&(W(t.button,Wt),L(t.button,Kt)),n&&(b(n.button,Wt),C(n.button,Kt,!0)),o(Ct,{list:h,items:p},t,n)}return{items:p,mount:function(){g(),i([yt,mt],g),i([ct,kt],v)},destroy:m,getAt:_,update:v}},Sync:function(t,n,e){const{list:i}=n.Elements,o=[];function s(){t.splides.forEach((n=>{var e;!n.isParent&&(e=n.splide,[t,e].forEach((n=>{const i=Ot(n),s=n===t?e:t;i.on(ct,((t,n,e)=>{s.go(s.is(sn)?e:t)})),o.push(i)})))})),e.isNavigation&&function(){const n=Ot(t),{on:e}=n;e(at,l),e(gt,a),e([st,yt],u),C(i,Jt,"menu"),o.push(n),n.emit(Nt,t.splides)}()}function c(){L(i,en),o.forEach((t=>{t.destroy()})),r(o)}function u(){C(i,nn,e.direction!==jt?"horizontal":null)}function l(n){t.go(n.index)}function a(t,n){g(hn,n.key)&&(l(t),j(n))}return{mount:s,destroy:c,remount:function(){c(),s()}}},Wheel:function(t,n,e){const{bind:i}=Ot(t);function o(i){if(i.cancelable){const{deltaY:o}=i;if(o){const s=o<0;t.go(s?"<":">"),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&j(i)}}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,cn)}}}}),mn={type:"slide",speed:400,waitForTransition:!0,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,keyboard:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",slideFocus:!0,trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",classes:Yt,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay"}};function yn(t,n,e){const{on:i}=Ot(t);return{mount:function(){i([st,mt],(()=>{U((()=>{n.Slides.style("transition",`opacity ${e.speed}ms ${e.easing}`)}))}))},start:function(t,e){const{track:i}=n.Elements;z(i,"height",H(O(i).height)),U((()=>{e(),z(i,"height","")}))},cancel:q}}function vn(t,n,e){const{bind:i}=Ot(t),{Move:o,Controller:s}=n,{list:r}=n.Elements;let c;function u(){l("")}function l(t){z(r,"transition",t)}return{mount:function(){i(r,"transitionend",(t=>{t.target===r&&c&&(u(),c())}))},start:function(n,i){const r=o.toPosition(n,!0),u=o.getPosition(),a=function(n){const{rewindSpeed:i}=e;if(t.is(on)&&i){const t=s.getIndex(!0),e=s.getEnd();if(0===t&&n>=e||t>=e&&0===n)return i}return e.speed}(n);Q(r-u)>=1&&a>=1?(l(`transform ${a}ms ${e.easing}`),o.translate(r,!0),c=i):(o.jump(n),i())},cancel:u}}var bn=class{constructor(t,n){this.event=function(){let t={};function n(n,i){e(n,((n,e)=>{const o=t[n];t[n]=o&&o.filter((t=>t._key?t._key!==i:i||t._namespace!==e))}))}function e(t,n){p(t).join(" ").split(" ").forEach((t=>{const e=t.split(".");n(e[0],e[1])}))}return{on:function(n,i,o,s=10){e(n,((n,e)=>{t[n]=t[n]||[],m(t[n],{_event:n,_callback:i,_namespace:e,_priority:s,_key:o}).sort(((t,n)=>t._priority-n._priority))}))},off:n,offBy:function(e){P(t,((t,i)=>{n(i,e)}))},emit:function(n){(t[n]||[]).forEach((t=>{t._callback.apply(t,_(arguments,1))}))},destroy:function(){t={}}}}(),this.Components={},this.state=function(t){let n=1;return{set:function(t){n=t},is:function(t){return g(p(t),n)}}}(),this.splides=[],this._options={},this._Extensions={};const e=l(t)?F(document,t):t;X(e,`${e} is invalid.`),this.root=e,$(mn,bn.defaults),$($(this._options,mn),n||{})}mount(t,n){const{state:e,Components:i}=this;return X(e.is([1,5]),"Already mounted!"),e.set(1),this._Components=i,this._Transition=n||this._Transition||(this.is(rn)?yn:vn),this._Extensions=t||this._Extensions,P(A({},gn,this._Extensions,{Transition:this._Transition}),((t,n)=>{const e=t(this,i,this._options);i[n]=e,e.setup&&e.setup()})),P(i,(t=>{t.mount&&t.mount()})),this.emit(st),b(this.root,"is-initialized"),e.set(3),this.emit(rt),this}sync(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._Components.Sync.remount(),t.Components.Sync.remount()),this}go(t){return this._Components.Controller.go(t),this}on(t,n){return this.event.on(t,n,null,20),this}off(t){return this.event.off(t),this}emit(t){return this.event.emit(t,..._(arguments,1)),this}add(t,n){return this._Components.Slides.add(t,n),this}remove(t){return this._Components.Slides.remove(t),this}is(t){return this._options.type===t}refresh(){return this.emit(mt),this}destroy(t=!0){const{event:n,state:e}=this;return e.is(1)?n.on(rt,this.destroy.bind(this,t),this):(P(this._Components,(n=>{n.destroy&&n.destroy(t)}),!0),n.emit(Pt),n.destroy(),t&&r(this.splides),e.set(5)),this}get options(){return this._options}set options(t){const{_options:n}=this;$(n,t),this.state.is(1)||this.emit(yt,n)}get length(){return this._Components.Slides.getLength(!0)}get index(){return this._Components.Controller.getIndex()}},wn=bn;wn.defaults={},wn.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,DESTROYED:5};var En=[[st,"onMounted"],[rt,"onReady"],[ct,"onMove"],[ut,"onMoved"],[at,"onClick"],[dt,"onActive"],[ft,"onInactive"],[pt,"onVisible"],[ht,"onHidden"],[mt,"onRefresh"],[yt,"onUpdated"],[_t,"onResize"],[vt,"onResized"],[wt,"onDrag"],[Et,"onDragging"],[xt,"onDragged"],[St,"onScroll"],[kt,"onScrolled"],[Pt,"onDestroy"],[At,"onArrowsMounted"],[$t,"onArrowsUpdated"],[Lt,"onPaginationMounted"],[Ct,"onPaginationUpdated"],[Nt,"onNavigationMounted"],[zt,"onAutoplayPlay"],[Dt,"onAutoplayPlaying"],[Mt,"onAutoplayPause"],[Rt,"onLazyLoadLoaded"]];function xn(...t){return t.filter(Boolean).join(" ")}function Sn(t){return null!==t&&"object"==typeof t}function kn(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some(((t,e)=>!kn(t,n[e])));if(Sn(t)&&Sn(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some((e=>!Object.prototype.hasOwnProperty.call(n,e)||!kn(t[e],n[e])))}return t===n}function Pn(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const o=e[i];if("__proto__"!==o&&!1===n(t[o],o))break}}}(n,((t,n)=>{Array.isArray(t)?e[n]=t.slice():Sn(t)?e[n]=Pn(Sn(e[n])?e[n]:{},t):e[n]=t})),e}var An=class extends i().Component{constructor(){super(...arguments),this.splideRef=i().createRef(),this.slides=[]}componentDidMount(){const{options:t,Extensions:n,Transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new wn(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=Pn({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!kn(this.options,t)&&(this.splide.options=t,this.options=Pn({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some(((t,n)=>t!==i[n])))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){En.forEach((([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,((...n)=>{i(t,...n)}))}))}renderTrack(){return i().createElement("div",{className:"splide__track"},i().createElement("ul",{className:"splide__list"},this.props.children))}render(){const{id:t,className:n,hasSliderWrapper:e,hasAutoplayProgress:o,hasAutoplayControls:s,playButtonLabel:r="Play",pauseButtonLabel:c="Pause",renderControls:u}=this.props;return i().createElement("div",{id:t,className:xn("splide",n),ref:this.splideRef},e?i().createElement("div",{className:"splide__slider"},this.renderTrack()):this.renderTrack(),o&&i().createElement("div",{className:"splide__progress"},i().createElement("div",{className:"splide__progress__bar"})),s&&i().createElement("div",{className:"splide__autoplay"},i().createElement("button",{className:"splide__play"},r),i().createElement("button",{className:"splide__pause"},c)),u&&u())}},$n=({children:t,className:n,...e})=>i().createElement("li",{className:xn("splide__slide",n),...e},t);function Ln(t){return t.images=t.images.filter((function(t){return t.id>0})),t.images.length>0?(0,n.createElement)(An,{options:{type:t.type,rewind:parseInt(t.rewind),heightRatio:t.height_ratio,gap:t.gap+"px",padding:t.padding+"%",breakpoints:""==t.breakpoint?"":{[t.breakpoint]:{type:t.type,rewind:parseInt(t.rewind),heightRatio:t.breakpoint_height_ratio,gap:t.breakpoint_gap+"px",padding:t.breakpoint_padding+"%"}}}},t.images.map((t=>(0,n.createElement)($n,null,(0,n.createElement)("a",{className:"foobox",rel:"gallery",href:t.front_url},(0,n.createElement)("img",{src:t.front_url,alt:""})))))):null}document.querySelectorAll(".splide_element").forEach((function(t){const e=JSON.parse(t.querySelector("pre").innerHTML);s().render((0,n.createElement)(Ln,e),t),t.classList.remove("splide_element")}))}();1 !function(){"use strict";var t={n:function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},d:function(n,e){for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)}},n=window.wp.element,e=window.React,i=t.n(e),o=window.ReactDOM,s=t.n(o);function r(t){t.length=0}function c(t){return!d(t)&&"object"==typeof t}function u(t){return Array.isArray(t)}function l(t){return"string"==typeof t}function a(t){return void 0===t}function d(t){return null===t}function f(t){return t instanceof HTMLElement}function p(t){return u(t)?t:[t]}function h(t,n){p(t).forEach(n)}function g(t,n){return t.indexOf(n)>-1}function m(t,n){return t.push(...p(n)),t}var y=Array.prototype;function _(t,n,e){return y.slice.call(t,n,e)}function v(t,n,e){t&&h(n,(n=>{n&&t.classList[e?"add":"remove"](n)}))}function b(t,n){v(t,l(n)?n.split(" "):n,!0)}function w(t,n){h(n,t.appendChild.bind(t))}function E(t,n){h(t,(t=>{const e=n.parentNode;e&&e.insertBefore(t,n)}))}function x(t,n){return f(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function S(t,n){return t?_(t.children).filter((t=>x(t,n))):[]}function k(t,n){return n?S(t,n)[0]:t.firstElementChild}function P(t,n,e){if(t){let i=Object.keys(t);i=e?i.reverse():i;for(let e=0;e<i.length;e++){const o=i[e];if("__proto__"!==o&&!1===n(t[o],o))break}}return t}function A(t){return _(arguments,1).forEach((n=>{P(n,((e,i)=>{t[i]=n[i]}))})),t}function $(t,n){return P(n,((n,e)=>{u(n)?t[e]=n.slice():c(n)?t[e]=$(c(t[e])?t[e]:{},n):t[e]=n})),t}function L(t,n){t&&h(n,(n=>{t.removeAttribute(n)}))}function C(t,n,e){c(n)?P(n,((n,e)=>{C(t,e,n)})):d(e)?L(t,n):t.setAttribute(n,String(e))}function N(t,n,e){const i=document.createElement(t);return n&&(l(n)?b(i,n):C(i,n)),e&&w(e,i),i}function z(t,n,e){if(a(e))return getComputedStyle(t)[n];if(!d(e)){const{style:i}=t;e=`${e}`,i[n]!==e&&(i[n]=e)}}function D(t,n){z(t,"display",n)}function M(t,n){return t.getAttribute(n)}function R(t,n){return t&&t.classList.contains(n)}function O(t){return t.getBoundingClientRect()}function T(t){h(t,(t=>{t&&t.parentNode&&t.parentNode.removeChild(t)}))}function I(t){return k((new DOMParser).parseFromString(t,"text/html").body)}function j(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function F(t,n){return t&&t.querySelector(n)}function B(t,n){return _(t.querySelectorAll(n))}function W(t,n){v(t,n,!1)}function H(t){return l(t)?t:t?`${t}px`:""}function X(t,n=""){if(!t)throw new Error(`[splide] ${n}`)}function U(t){setTimeout(t)}var q=()=>{};function G(t){return requestAnimationFrame(t)}var{min:Y,max:J,floor:V,ceil:K,abs:Q}=Math;function Z(t,n,e,i){const o=Y(n,e),s=J(n,e);return i?o<t&&t<s:o<=t&&t<=s}function tt(t,n,e){const i=Y(n,e),o=J(n,e);return Y(J(i,t),o)}function nt(t){return+(t>0)-+(t<0)}function et(t,n){return h(n,(n=>{t=t.replace("%s",`${n}`)})),t}function it(t){return t<10?`0${t}`:`${t}`}var ot={},st="mounted",rt="ready",ct="move",ut="moved",lt="shifted",at="click",dt="active",ft="inactive",pt="visible",ht="hidden",gt="slide:keydown",mt="refresh",yt="updated",_t="resize",vt="resized",bt="repositioned",wt="drag",Et="dragging",xt="dragged",St="scroll",kt="scrolled",Pt="destroy",At="arrows:mounted",$t="arrows:updated",Lt="pagination:mounted",Ct="pagination:updated",Nt="navigation:mounted",zt="autoplay:play",Dt="autoplay:playing",Mt="autoplay:pause",Rt="lazyload:loaded";function Ot(t){const{event:n}=t,e={};let i=[];function o(t,n,e){s(t,n,((t,n)=>{i=i.filter((i=>!!(i[0]!==t||i[1]!==n||e&&i[2]!==e)||(t.removeEventListener(n,i[2],i[3]),!1)))}))}function s(t,n,e){h(t,(t=>{t&&n.split(" ").forEach(e.bind(null,t))}))}function r(){i=i.filter((t=>o(t[0],t[1]))),n.offBy(e)}return n.on(Pt,r,e),{on:function(t,i,o){n.on(t,i,e,o)},off:function(t){n.off(t,e)},emit:n.emit,bind:function(t,n,e,o){s(t,n,((t,n)=>{i.push([t,n,e,o]),t.addEventListener(n,e,o)}))},unbind:o,destroy:r}}function Tt(t,n,e,i){const{now:o}=Date;let s,r,c=0,u=!0,l=0;function a(){if(!u){const r=o()-s;if(r>=t?(c=1,s=o()):c=r/t,e&&e(c),1===c&&(n(),i&&++l>=i))return d();G(a)}}function d(){u=!0}function f(){cancelAnimationFrame(r),c=0,r=0,u=!0}return{start:function(n){!n&&f(),s=o()-(n?c*t:0),u=!1,G(a)},rewind:function(){s=o(),c=0,e&&e(c)},pause:d,cancel:f,set:function(n){t=n},isPaused:function(){return u}}}function It(t,n){let e;return function(){e||(e=Tt(n||0,(()=>{t.apply(this,arguments),e=null}),null,1),e.start())}}var jt="ttb",Ft={marginRight:["marginBottom","marginLeft"],autoWidth:["autoHeight"],fixedWidth:["fixedHeight"],paddingLeft:["paddingTop","paddingRight"],paddingRight:["paddingBottom","paddingLeft"],width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]},Bt="splide__slide--clone",Wt="is-active",Ht="is-prev",Xt="is-next",Ut="is-visible",qt="is-loading",Gt=[Wt,Ut,Ht,Xt,qt],Yt={slide:"splide__slide",clone:Bt,arrows:"splide__arrows",arrow:"splide__arrow",prev:"splide__arrow--prev",next:"splide__arrow--next",pagination:"splide__pagination",page:"splide__pagination__page",spinner:"splide__spinner"},Jt="role",Vt="aria-controls",Kt="aria-current",Qt="aria-label",Zt="aria-hidden",tn="tabindex",nn="aria-orientation",en=[Jt,Vt,Kt,Qt,Zt,nn,tn,"disabled"],on="slide",sn="loop",rn="fade";var cn={passive:!1,capture:!0},un="touchmove mousemove",ln="touchend touchcancel mouseup",an=["Left","Right","Up","Down"],dn="keydown",fn="data-splide-lazy",pn="data-splide-lazy-srcset",hn=[" ","Enter","Spacebar"],gn=Object.freeze({__proto__:null,Options:function(t,n,e){const i=It(u);let o,s,r;function c(t){t&&removeEventListener("resize",i)}function u(){const n=(i=t=>t[1].matches,_(s).filter(i)[0]||[]);var i;n[0]!==r&&function(n){const i=e.breakpoints[n]||o;i.destroy?(t.options=o,t.destroy("completely"===i.destroy)):(t.state.is(5)&&(c(!0),t.mount()),t.options=i)}(r=n[0])}return{setup:function(){try{$(e,JSON.parse(M(t.root,"data-splide")))}catch(t){X(!1,t.message)}o=$({},e);const{breakpoints:n}=e;if(n){const t="min"===e.mediaQuery;s=Object.keys(n).sort(((n,e)=>t?+e-+n:+n-+e)).map((n=>[n,matchMedia(`(${t?"min":"max"}-width:${n}px)`)])),u()}},mount:function(){s&&addEventListener("resize",i)},destroy:c}},Direction:function(t,n,e){return{resolve:function(t,n){const{direction:i}=e;return Ft[t]["rtl"!==i||n?i===jt?0:-1:1]||t},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){const{on:i}=Ot(t),{root:o}=t,s={},c=[];let u,l,a,d;function f(){!function(){l=k(o,".splide__slider"),a=F(o,".splide__track"),d=k(a,".splide__list"),X(a&&d,"A track/list element is missing."),m(c,S(d,`.splide__slide:not(.${Bt})`));const t=y(".splide__autoplay"),n=y(".splide__arrows");A(s,{root:o,slider:l,track:a,list:d,slides:c,arrows:n,autoplay:t,prev:F(n,".splide__arrow--prev"),next:F(n,".splide__arrow--next"),bar:F(y(".splide__progress"),".splide__progress__bar"),play:F(t,".splide__play"),pause:F(t,".splide__pause")})}(),function(){const t=o.id||("splide",`splide${it(ot.splide=(ot.splide||0)+1)}`);o.id=t,a.id=a.id||`${t}-track`,d.id=d.id||`${t}-list`}(),b(o,u=_())}function p(){[o,a,d].forEach((t=>{L(t,"style")})),r(c),W(o,u)}function h(){p(),f()}function g(){W(o,u),b(o,u=_())}function y(t){return k(o,t)||k(l,t)}function _(){return[`splide--${e.type}`,`splide--${e.direction}`,e.drag&&"splide--draggable",e.isNavigation&&"splide--nav",Wt]}return A(s,{setup:f,mount:function(){i(mt,h,8),i(yt,g)},destroy:p})},Slides:function(t,n,e){const{on:i,emit:o,bind:s}=Ot(t),{slides:c,list:u}=n.Elements,a=[];function d(){c.forEach(((t,n)=>{_(t,n,-1)}))}function m(){P((t=>{t.destroy()})),r(a)}function y(){m(),d()}function _(n,e,i){const o=function(t,n,e,i){const{on:o,emit:s,bind:r,destroy:c}=Ot(t),{Components:u,root:l,options:a}=t,{isNavigation:d,updateOnMove:f}=a,{resolve:p}=u.Direction,h=M(i,"style"),g=e>-1,m=k(i,".splide__slide__container"),y=a.focusableNodes&&B(i,a.focusableNodes);let _;function b(){const o=g?e:n,s=et(a.i18n.slideX,o+1),r=t.splides.map((t=>t.splide.root.id)).join(" ");C(i,Qt,s),C(i,Vt,r),C(i,Jt,"menuitem"),x(S())}function w(){_||E()}function E(){if(!_){const{index:e}=t;x(S()),function(t){const n=!t&&(!S()||g);C(i,Zt,n||null),C(i,tn,!n&&a.slideFocus?0:null),y&&y.forEach((t=>{C(t,tn,n?-1:null)})),t!==R(i,Ut)&&(v(i,Ut,t),s(t?pt:ht,P))}(function(){if(t.is(rn))return S();const n=O(u.Elements.track),e=O(i),o=p("left"),s=p("right");return V(n[o])<=K(e[o])&&V(e[s])<=K(n[s])}()),v(i,Ht,n===e-1),v(i,Xt,n===e+1)}}function x(t){t!==R(i,Wt)&&(v(i,Wt,t),d&&C(i,Kt,t||null),s(t?dt:ft,P))}function S(){const{index:i}=t;return i===n||a.cloneStatus&&i===e}const P={index:n,slideIndex:e,slide:i,container:m,isClone:g,mount:function(){g||(i.id=`${l.id}-slide${it(n+1)}`),r(i,"click keydown",(t=>{s("click"===t.type?at:gt,P,t)})),o([mt,bt,lt,ut,kt],E),o(Nt,b),f&&o(ct,w)},destroy:function(){_=!0,c(),W(i,Gt),L(i,en),C(i,"style",h)},update:E,style:function(t,n,e){z(e&&m||i,t,n)},isWithin:function(e,i){let o=Q(e-n);return g||!a.rewind&&!t.is(sn)||(o=Y(o,t.length-o)),o<=i}};return P}(t,e,i,n);o.mount(),a.push(o)}function S(t){return t?A((t=>!t.isClone)):a}function P(t,n){S(n).forEach(t)}function A(t){return a.filter("function"==typeof t?t:n=>l(t)?x(n.slide,t):g(p(t),n.index))}return{mount:function(){d(),i(mt,y),i([st,mt],(()=>{a.sort(((t,n)=>t.index-n.index))}))},destroy:m,update:function(){P((t=>{t.update()}))},register:_,get:S,getIn:function(t){const{Controller:i}=n,o=i.toIndex(t),s=i.hasFocus()?1:e.perPage;return A((t=>Z(t.index,o,o+s-1)))},getAt:function(t){return A(t)[0]},add:function(t,n){h(t,(t=>{if(l(t)&&(t=I(t)),f(t)){const i=c[n];i?E(t,i):w(u,t),b(t,e.classes.slide),function(t,n){const e=B(t,"img");let{length:i}=e;i?e.forEach((t=>{s(t,"load error",(()=>{--i||n()}))})):n()}(t,o.bind(null,_t))}})),o(mt)},remove:function(t){T(A(t).map((t=>t.slide))),o(mt)},forEach:P,filter:A,style:function(t,n,e){P((i=>{i.style(t,n,e)}))},getLength:function(t){return t?c.length:a.length},isEnough:function(){return a.length>e.perPage}}},Layout:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),{Slides:r}=n,{resolve:u}=n.Direction,{root:l,track:a,list:d}=n.Elements,{getAt:f}=r;let p,h;function g(){h=null,p=e.direction===jt,z(l,"maxWidth",H(e.width)),z(a,u("paddingLeft"),y(!1)),z(a,u("paddingRight"),y(!0)),m()}function m(){const t=O(l);h&&h.width===t.width&&h.height===t.height||(z(a,"height",function(){let t="";return p&&(t=_(),X(t,"height or heightRatio is missing."),t=`calc(${t} - ${y(!1)} - ${y(!0)})`),t}()),r.style(u("marginRight"),H(e.gap)),r.style("width",(e.autoWidth?"":H(e.fixedWidth)||(p?"":v()))||null),r.style("height",H(e.fixedHeight)||(p?e.autoHeight?"":v():_())||null,!0),h=t,s(vt))}function y(t){const{padding:n}=e,i=u(t?"right":"left");return n&&H(n[i]||(c(n)?0:n))||"0px"}function _(){return H(e.height||O(d).width*e.heightRatio)}function v(){const t=H(e.gap);return`calc((100%${t&&` + ${t}`})/${e.perPage||1}${t&&` - ${t}`})`}function b(t,n){const e=f(t);if(e){const t=O(e.slide)[u("right")],i=O(d)[u("left")];return Q(t-i)+(n?0:w())}return 0}function w(){const t=f(0);return t&&parseFloat(z(t.slide,u("marginRight")))||0}return{mount:function(){g(),o(window,"resize load",It(s.bind(this,_t))),i([yt,mt],g),i(_t,m)},listSize:function(){return O(d)[u("width")]},slideSize:function(t,n){const e=f(t||0);return e?O(e.slide)[u("width")]+(n?0:w()):0},sliderSize:function(){return b(t.length-1,!0)-b(-1,!0)},totalSize:b,getPadding:function(t){return parseFloat(z(a,u("padding"+(t?"Right":"Left"))))||0}}},Clones:function(t,n,e){const{on:i,emit:o}=Ot(t),{Elements:s,Slides:c}=n,{resolve:u}=n.Direction,a=[];let d;function f(){(d=y())&&(function(n){const i=c.get().slice(),{length:o}=i;if(o){for(;i.length<n;)m(i,i);m(i.slice(-n),i.slice(0,n)).forEach(((r,u)=>{const l=u<n,d=function(n,i){const o=n.cloneNode(!0);return b(o,e.classes.clone),o.id=`${t.root.id}-clone${it(i+1)}`,o}(r.slide,u);l?E(d,i[0].slide):w(s.list,d),m(a,d),c.register(d,u-n+(l?0:o),r.index)}))}}(d),o(_t))}function p(){T(a),r(a)}function h(){p(),f()}function g(){d<y()&&o(mt)}function y(){let{clones:n}=e;if(t.is(sn)){if(!n){const i=function(t,n){if(l(n)){const e=N("div",{style:`width: ${n}; position: absolute;`},t);n=O(e).width,T(e)}return n}(s.list,e[u("fixedWidth")]);n=(i&&K(O(s.track)[u("width")]/i)||e[u("autoWidth")]&&t.length||e.perPage)*(e.drag?(e.flickMaxPages||1)+1:2)}}else n=0;return n}return{mount:function(){f(),i(mt,h),i([yt,_t],g)},destroy:p}},Move:function(t,n,e){const{on:i,emit:o}=Ot(t),{slideSize:s,getPadding:r,totalSize:c,listSize:u,sliderSize:l}=n.Layout,{resolve:d,orient:f}=n.Direction,{list:p,track:h}=n.Elements;let g;function m(){x()||(n.Scroll.cancel(),y(t.index),o(bt))}function y(t){_(b(t,!0))}function _(n,e){if(!t.is(rn)){const i=e?n:function(n){if(t.is(sn)){const t=f(n-w()),e=S(!1,n)&&t<0,i=S(!0,n)&&t>0;(e||i)&&(n=v(n,i))}return n}(n);p.style.transform=`translate${d("X")}(${i}px)`,n!==i&&o(lt)}}function v(t,n){const e=t-E(n),i=l();return t-f(i*(K(Q(e)/i)||1))*(n?1:-1)}function b(n,i){const o=f(c(n-1)-function(t){const{focus:n}=e;return"center"===n?(u()-s(t,!0))/2:+n*s(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(on)&&(n=tt(n,0,f(l()-u()))),n}(o):o}function w(){const t=d("left");return O(p)[t]-O(h)[t]+f(r(!1))}function E(t){return b(t?n.Controller.getEnd():0,!!e.trimSpace)}function x(){return t.state.is(4)&&e.waitForTransition}function S(t,n){n=a(n)?w():n;const e=!0!==t&&f(n)<f(E(!1)),i=!1!==t&&f(n)>f(E(!0));return e||i}return{mount:function(){g=n.Transition,i([st,vt,yt,mt],m)},destroy:function(){L(p,"style")},move:function(i,s,r,c){if(!x()){const{set:u}=t.state,l=w();i!==s&&(g.cancel(),_(v(l,i>s),!0)),u(4),o(ct,s,r,i),g.start(s,(()=>{u(3),o(ut,s,r,i),"move"===e.trimSpace&&i!==r&&l===w()?n.Controller.go(i>r?">":"<",!1,c):c&&c()}))}},jump:y,translate:_,shift:v,cancel:function(){_(w()),g.cancel()},toIndex:function(t){const e=n.Slides.get();let i=0,o=1/0;for(let n=0;n<e.length;n++){const s=e[n].index,r=Q(b(s,!0)-t);if(!(r<=o))break;o=r,i=s}return i},toPosition:b,getPosition:w,getLimit:E,isBusy:x,exceededLimit:S}},Controller:function(t,n,e){const{on:i}=Ot(t),{Move:o}=n,{getPosition:s,getLimit:r}=o,{isEnough:c,getLength:u}=n.Slides,d=t.is(sn),f=t.is(on);let p,h,g,m=e.start||0,y=m;function _(){p=u(!0),h=e.perMove,g=e.perPage,m=tt(m,0,p-1)}function v(t,e,i,s,r){const c=e?t:$(t);n.Scroll.scroll(e||i?o.toPosition(c,!0):t,s,(()=>{L(o.toIndex(o.getPosition())),r&&r()}))}function b(t){return E(!1,t)}function w(t){return E(!0,t)}function E(t,n){const e=h||(C()?1:g),i=x(m+e*(t?-1:1),m);return-1!==i||!f||(o=s(),c=r(!t),1,Q(o-c)<1)?n?i:k(i):t?0:S();var o,c}function x(t,n,i){if(c()){const o=S();t<0||t>o?t=Z(0,t,n,!0)||Z(o,n,t,!0)?P(A(t)):d?h||C()?t:t<0?-(p%g||g):p:e.rewind?t<0?o:0:-1:i||t===n||(t=h?t:P(A(n)+(t<n?-1:1)))}else t=-1;return t}function S(){let t=p-g;return(C()||d&&h)&&(t=p-1),J(t,0)}function k(t){return d?c()?t%p+(t<0?p:0):-1:t}function P(t){return tt(C()?t:g*t,0,S())}function A(t){return C()||(t=Z(t,p-g,p-1)?p-1:t,t=V(t/g)),t}function $(t){const n=o.toIndex(t);return f?tt(n,0,S()):n}function L(t){t!==m&&(y=m,m=t)}function C(){return!a(e.focus)||e.isNavigation}return{mount:function(){_(),i([yt,mt],_,9)},go:function(t,n,i){const s=function(t){let n=m;if(l(t)){const[,e,i]=t.match(/([+\-<>])(\d+)?/)||[];"+"===e||"-"===e?n=x(m+ +`${e}${+i||1}`,m,!0):">"===e?n=i?P(+i):b(!0):"<"===e&&(n=w(!0))}else n=d?t:tt(t,0,S());return n}(t);if(e.useScroll)v(s,!0,!0,e.speed,i);else{const t=k(s);t>-1&&!o.isBusy()&&(n||t!==m)&&(L(t),o.move(s,t,y,i))}},scroll:v,getNext:b,getPrev:w,getAdjacent:E,getEnd:S,setIndex:L,getIndex:function(t){return t?y:m},toIndex:P,toPage:A,toDest:$,hasFocus:C}},Arrows:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),{classes:r,i18n:c}=e,{Elements:u,Controller:l}=n;let a,d=u.arrows,f=u.prev,p=u.next;const h={};function g(){if(e.arrows&&(f&&p||(d=N("div",r.arrows),f=m(!0),p=m(!1),a=!0,w(d,[f,p]),E(d,k("slider"===e.arrows&&u.slider||t.root)))),f&&p)if(h.prev)D(d,!1===e.arrows?"none":"");else{const{id:t}=u.track;C(f,Vt,t),C(p,Vt,t),h.prev=f,h.next=p,function(){const{go:t}=l;i([st,ut,yt,mt,kt],y),o(p,"click",(()=>{t(">",!0)})),o(f,"click",(()=>{t("<",!0)}))}(),s(At,f,p)}}function m(t){return I(`<button class="${r.arrow} ${t?r.prev:r.next}" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40"><path d="${e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"}" />`)}function y(){const n=t.index,e=l.getPrev(),i=l.getNext(),o=e>-1&&n<e?c.last:c.prev,r=i>-1&&n>i?c.first:c.next;f.disabled=e<0,p.disabled=i<0,C(f,Qt,o),C(p,Qt,r),s($t,f,p,e,i)}return{arrows:h,mount:function(){g(),i(yt,g)},destroy:function(){a?T(d):(L(f,en),L(p,en))}}},Autoplay:function(t,n,e){const{on:i,bind:o,emit:s}=Ot(t),r=Tt(e.interval,t.go.bind(t,">"),(function(t){const{bar:n}=u;n&&z(n,"width",100*t+"%"),s(Dt,t)})),{isPaused:c}=r,{Elements:u}=n;let l,a,d;function f(t){const n=t?"pause":"play",i=u[n];i&&(C(i,Vt,u.track.id),C(i,Qt,e.i18n[n]),o(i,"click",t?h:p))}function p(){c()&&n.Slides.isEnough()&&(r.start(!e.resetProgress),a=l=d=!1,s(zt))}function h(t=!0){c()||(r.pause(),s(Mt)),d=t}function g(){d||(l||a?h(!1):p())}function m(){const i=n.Slides.getAt(t.index);r.set(i&&+M(i.slide,"data-splide-interval")||e.interval)}return{mount:function(){const{autoplay:t}=e;t&&(f(!0),f(!1),function(){const{root:t}=u;e.pauseOnHover&&o(t,"mouseenter mouseleave",(t=>{l="mouseenter"===t.type,g()})),e.pauseOnFocus&&o(t,"focusin focusout",(t=>{a="focusin"===t.type,g()})),i([ct,St,mt],r.rewind),i(ct,m)}(),"pause"!==t&&p())},destroy:r.cancel,play:p,pause:h,isPaused:c}},Cover:function(t,n,e){const{on:i}=Ot(t);function o(t){n.Slides.forEach((n=>{const e=k(n.container||n.slide,"img");e&&e.src&&s(t,e,n)}))}function s(t,n,e){e.style("background",t?`center/cover no-repeat url("${n.src}")`:"",!0),D(n,t?"none":"")}return{mount:function(){e.cover&&(i(Rt,((t,n)=>{s(!0,t,n)})),i([st,yt,mt],o.bind(null,!0)))},destroy:function(){o(!1)}}},Scroll:function(t,n,e){const{on:i,emit:o}=Ot(t),{Move:s}=n,{getPosition:r,getLimit:c,exceededLimit:u}=s;let l,a;function d(){const n=r(),e=s.toIndex(n);Z(e,0,t.length-1)||s.translate(s.shift(n,e>0),!0),a&&a(),o(kt)}function f(){l&&l.cancel()}function p(){l&&!l.isPaused()&&(f(),d())}return{mount:function(){i(ct,f),i([yt,mt],p)},destroy:f,scroll:function n(i,p,h,g){const m=r();let y=1;var _;p=p||(_=Q(i-m),J(_/1.5,800)),a=h,f(),l=Tt(p,d,(o=>{const l=r(),a=(m+(i-m)*function(t){const{easingFunc:n}=e;return n?n(t):1-Math.pow(1-t,4)}(o)-r())*y;var d;s.translate(l+a),t.is(on)&&!g&&u()&&(y*=.6,Q(a)<10&&(d=u(!1),n(c(!d),600,null,!0)))}),1),o(St),l.start()},cancel:p}},Drag:function(t,n,e){const{on:i,emit:o,bind:s,unbind:r}=Ot(t),{Move:u,Scroll:l,Controller:a}=n,{track:d}=n.Elements,{resolve:f,orient:p}=n.Direction,{getPosition:h,exceededLimit:g}=u;let m,y,_,v,b,w,E,S,k,P=!1;function A(){const{drag:t}=e;T(!t),b="free"===t}function $(t){if(!S){const{noDrag:n}=e,i=O(t),o=!n||!x(t.target,n);E=!1,!o||!i&&t.button||(u.isBusy()?j(t,!0):(k=i?d:window,_=null,v=null,s(k,un,L,cn),s(k,ln,C,cn),u.cancel(),l.cancel(),N(t)))}}function L(n){if(v||o(wt),v=n,n.cancelable){const i=M(n)-M(y);if(w){u.translate(m+function(n){return n/(P&&t.is(on)?5:1)}(i));const e=R(n)-R(y)>200,s=P!==(P=g());(e||s)&&N(n),o(Et),E=!0,j(n)}else{let{dragMinThreshold:t}=e;t=c(t)?t:{mouse:0,touch:+t||10},w=Q(i)>(O(n)?t.touch:t.mouse),D()&&j(n)}}}function C(i){r(k,un,L),r(k,ln,C);const{index:s}=t;if(v){if(w||i.cancelable&&D()){const o=function(n){if(t.is(sn)||!P){const t=y===v&&_||y,e=M(v)-M(t),i=R(n)-R(t),o=R(n)-R(v)<200;if(i&&o)return e/i}return 0}(i),r=function(t){return h()+nt(t)*Y(Q(t)*(e.flickPower||600),b?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(o);b?a.scroll(r):t.is(rn)?a.go(s+p(nt(o))):a.go(a.toDest(r),!0),j(i)}o(xt)}else b||h()===u.toPosition(s)||a.go(s,!0);w=!1}function N(t){_=y,y=t,m=h()}function z(t){!S&&E&&j(t,!0)}function D(){return Q(M(v)-M(y))>Q(M(v,!0)-M(y,!0))}function M(t,n){return(O(t)?t.touches[0]:t)[`page${f(n?"Y":"X")}`]}function R(t){return t.timeStamp}function O(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function T(t){S=t}return{mount:function(){s(d,un,q,cn),s(d,ln,q,cn),s(d,"touchstart mousedown",$,cn),s(d,"click",z,{capture:!0}),s(d,"dragstart",j),i([st,yt],A)},disable:T,isDragging:function(){return w}}},Keyboard:function(t,n,e){const{on:i,bind:o,unbind:s}=Ot(t),{root:r}=t,{resolve:c}=n.Direction;let u,l;function a(){const{keyboard:t}=e;t&&("focused"===t?(u=r,C(r,tn,0)):u=window,o(u,dn,m))}function d(){s(u,dn),f(u)&&L(u,tn)}function p(){const t=l;l=!0,U((()=>{l=t}))}function h(){d(),a()}function m(n){if(!l){const{key:e}=n,i=g(an,e)?`Arrow${e}`:e;i===c("ArrowLeft")?t.go("<"):i===c("ArrowRight")&&t.go(">")}}return{mount:function(){a(),i(yt,h),i(ct,p)},destroy:d,disable:function(t){l=t}}},LazyLoad:function(t,n,e){const{on:i,off:o,bind:s,emit:r}=Ot(t),c="sequential"===e.lazyLoad;let u=[],l=0;function a(){f(),d()}function d(){n.Slides.forEach((t=>{B(t.slide,"[data-splide-lazy], [data-splide-lazy-srcset]").forEach((n=>{const i=M(n,fn),o=M(n,pn);if(i!==n.src||o!==n.srcset){const s=e.classes.spinner,r=n.parentElement,c=k(r,`.${s}`)||N("span",s,r);C(c,Jt,"presentation"),u.push({_img:n,_Slide:t,src:i,srcset:o,_spinner:c}),!n.src&&D(n,"none")}}))})),c&&g()}function f(){l=0,u=[]}function p(){u=u.filter((n=>{const i=e.perPage*((e.preloadPages||1)+1)-1;return!n._Slide.isWithin(t.index,i)||h(n)})),u.length||o(ut)}function h(t){const{_img:n}=t;b(t._Slide.slide,qt),s(n,"load error",(n=>{!function(t,n){const{_Slide:e}=t;W(e.slide,qt),n||(T(t._spinner),D(t._img,""),r(Rt,t._img,e),r(_t)),c&&g()}(t,"error"===n.type)})),["srcset","src"].forEach((e=>{t[e]&&(C(n,e,t[e]),L(n,"src"===e?fn:pn))}))}function g(){l<u.length&&h(u[l++])}return{mount:function(){e.lazyLoad&&(d(),i(mt,a),c||i([st,mt,ut,kt],p))},destroy:f}},Pagination:function(t,n,e){const{on:i,emit:o,bind:s,unbind:c}=Ot(t),{Slides:u,Elements:l,Controller:a}=n,{hasFocus:d,getIndex:f}=a,p=[];let h;function g(){m(),e.pagination&&u.isEnough()&&(function(){const{length:n}=t,{classes:i,i18n:o,perPage:r}=e,c="slider"===e.pagination&&l.slider||l.root,a=d()?n:K(n/r);h=N("ul",i.pagination,c);for(let t=0;t<a;t++){const n=N("li",null,h),e=N("button",{class:i.page,type:"button"},n),c=u.getIn(t).map((t=>t.slide.id)),l=!d()&&r>1?o.pageX:o.slideX;s(e,"click",y.bind(null,t)),C(e,Vt,c.join(" ")),C(e,Qt,et(l,t+1)),p.push({li:n,button:e,page:t})}}(),o(Lt,{list:h,items:p},_(t.index)),v())}function m(){h&&(T(h),p.forEach((t=>{c(t.button,"click")})),r(p),h=null)}function y(t){a.go(`>${t}`,!0,(()=>{const n=u.getAt(a.toIndex(t));var e;n&&((e=n.slide).setActive&&e.setActive()||e.focus({preventScroll:!0}))}))}function _(t){return p[a.toPage(t)]}function v(){const t=_(f(!0)),n=_(f());t&&(W(t.button,Wt),L(t.button,Kt)),n&&(b(n.button,Wt),C(n.button,Kt,!0)),o(Ct,{list:h,items:p},t,n)}return{items:p,mount:function(){g(),i([yt,mt],g),i([ct,kt],v)},destroy:m,getAt:_,update:v}},Sync:function(t,n,e){const{list:i}=n.Elements,o=[];function s(){t.splides.forEach((n=>{var e;!n.isParent&&(e=n.splide,[t,e].forEach((n=>{const i=Ot(n),s=n===t?e:t;i.on(ct,((t,n,e)=>{s.go(s.is(sn)?e:t)})),o.push(i)})))})),e.isNavigation&&function(){const n=Ot(t),{on:e}=n;e(at,l),e(gt,a),e([st,yt],u),C(i,Jt,"menu"),o.push(n),n.emit(Nt,t.splides)}()}function c(){L(i,en),o.forEach((t=>{t.destroy()})),r(o)}function u(){C(i,nn,e.direction!==jt?"horizontal":null)}function l(n){t.go(n.index)}function a(t,n){g(hn,n.key)&&(l(t),j(n))}return{mount:s,destroy:c,remount:function(){c(),s()}}},Wheel:function(t,n,e){const{bind:i}=Ot(t);function o(i){if(i.cancelable){const{deltaY:o}=i;if(o){const s=o<0;t.go(s?"<":">"),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&j(i)}}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,cn)}}}}),mn={type:"slide",speed:400,waitForTransition:!0,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,keyboard:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",slideFocus:!0,trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",classes:Yt,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay"}};function yn(t,n,e){const{on:i}=Ot(t);return{mount:function(){i([st,mt],(()=>{U((()=>{n.Slides.style("transition",`opacity ${e.speed}ms ${e.easing}`)}))}))},start:function(t,e){const{track:i}=n.Elements;z(i,"height",H(O(i).height)),U((()=>{e(),z(i,"height","")}))},cancel:q}}function vn(t,n,e){const{bind:i}=Ot(t),{Move:o,Controller:s}=n,{list:r}=n.Elements;let c;function u(){l("")}function l(t){z(r,"transition",t)}return{mount:function(){i(r,"transitionend",(t=>{t.target===r&&c&&(u(),c())}))},start:function(n,i){const r=o.toPosition(n,!0),u=o.getPosition(),a=function(n){const{rewindSpeed:i}=e;if(t.is(on)&&i){const t=s.getIndex(!0),e=s.getEnd();if(0===t&&n>=e||t>=e&&0===n)return i}return e.speed}(n);Q(r-u)>=1&&a>=1?(l(`transform ${a}ms ${e.easing}`),o.translate(r,!0),c=i):(o.jump(n),i())},cancel:u}}var bn=class{constructor(t,n){this.event=function(){let t={};function n(n,i){e(n,((n,e)=>{const o=t[n];t[n]=o&&o.filter((t=>t._key?t._key!==i:i||t._namespace!==e))}))}function e(t,n){p(t).join(" ").split(" ").forEach((t=>{const e=t.split(".");n(e[0],e[1])}))}return{on:function(n,i,o,s=10){e(n,((n,e)=>{t[n]=t[n]||[],m(t[n],{_event:n,_callback:i,_namespace:e,_priority:s,_key:o}).sort(((t,n)=>t._priority-n._priority))}))},off:n,offBy:function(e){P(t,((t,i)=>{n(i,e)}))},emit:function(n){(t[n]||[]).forEach((t=>{t._callback.apply(t,_(arguments,1))}))},destroy:function(){t={}}}}(),this.Components={},this.state=function(t){let n=1;return{set:function(t){n=t},is:function(t){return g(p(t),n)}}}(),this.splides=[],this._options={},this._Extensions={};const e=l(t)?F(document,t):t;X(e,`${e} is invalid.`),this.root=e,$(mn,bn.defaults),$($(this._options,mn),n||{})}mount(t,n){const{state:e,Components:i}=this;return X(e.is([1,5]),"Already mounted!"),e.set(1),this._Components=i,this._Transition=n||this._Transition||(this.is(rn)?yn:vn),this._Extensions=t||this._Extensions,P(A({},gn,this._Extensions,{Transition:this._Transition}),((t,n)=>{const e=t(this,i,this._options);i[n]=e,e.setup&&e.setup()})),P(i,(t=>{t.mount&&t.mount()})),this.emit(st),b(this.root,"is-initialized"),e.set(3),this.emit(rt),this}sync(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._Components.Sync.remount(),t.Components.Sync.remount()),this}go(t){return this._Components.Controller.go(t),this}on(t,n){return this.event.on(t,n,null,20),this}off(t){return this.event.off(t),this}emit(t){return this.event.emit(t,..._(arguments,1)),this}add(t,n){return this._Components.Slides.add(t,n),this}remove(t){return this._Components.Slides.remove(t),this}is(t){return this._options.type===t}refresh(){return this.emit(mt),this}destroy(t=!0){const{event:n,state:e}=this;return e.is(1)?n.on(rt,this.destroy.bind(this,t),this):(P(this._Components,(n=>{n.destroy&&n.destroy(t)}),!0),n.emit(Pt),n.destroy(),t&&r(this.splides),e.set(5)),this}get options(){return this._options}set options(t){const{_options:n}=this;$(n,t),this.state.is(1)||this.emit(yt,n)}get length(){return this._Components.Slides.getLength(!0)}get index(){return this._Components.Controller.getIndex()}},wn=bn;wn.defaults={},wn.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,DESTROYED:5};var En=[[st,"onMounted"],[rt,"onReady"],[ct,"onMove"],[ut,"onMoved"],[at,"onClick"],[dt,"onActive"],[ft,"onInactive"],[pt,"onVisible"],[ht,"onHidden"],[mt,"onRefresh"],[yt,"onUpdated"],[_t,"onResize"],[vt,"onResized"],[wt,"onDrag"],[Et,"onDragging"],[xt,"onDragged"],[St,"onScroll"],[kt,"onScrolled"],[Pt,"onDestroy"],[At,"onArrowsMounted"],[$t,"onArrowsUpdated"],[Lt,"onPaginationMounted"],[Ct,"onPaginationUpdated"],[Nt,"onNavigationMounted"],[zt,"onAutoplayPlay"],[Dt,"onAutoplayPlaying"],[Mt,"onAutoplayPause"],[Rt,"onLazyLoadLoaded"]];function xn(...t){return t.filter(Boolean).join(" ")}function Sn(t){return null!==t&&"object"==typeof t}function kn(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some(((t,e)=>!kn(t,n[e])));if(Sn(t)&&Sn(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some((e=>!Object.prototype.hasOwnProperty.call(n,e)||!kn(t[e],n[e])))}return t===n}function Pn(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const o=e[i];if("__proto__"!==o&&!1===n(t[o],o))break}}}(n,((t,n)=>{Array.isArray(t)?e[n]=t.slice():Sn(t)?e[n]=Pn(Sn(e[n])?e[n]:{},t):e[n]=t})),e}var An=class extends i().Component{constructor(){super(...arguments),this.splideRef=i().createRef(),this.slides=[]}componentDidMount(){const{options:t,Extensions:n,Transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new wn(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=Pn({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!kn(this.options,t)&&(this.splide.options=t,this.options=Pn({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some(((t,n)=>t!==i[n])))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){En.forEach((([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,((...n)=>{i(t,...n)}))}))}renderTrack(){return i().createElement("div",{className:"splide__track"},i().createElement("ul",{className:"splide__list"},this.props.children))}render(){const{id:t,className:n,hasSliderWrapper:e,hasAutoplayProgress:o,hasAutoplayControls:s,playButtonLabel:r="Play",pauseButtonLabel:c="Pause",renderControls:u}=this.props;return i().createElement("div",{id:t,className:xn("splide",n),ref:this.splideRef},e?i().createElement("div",{className:"splide__slider"},this.renderTrack()):this.renderTrack(),o&&i().createElement("div",{className:"splide__progress"},i().createElement("div",{className:"splide__progress__bar"})),s&&i().createElement("div",{className:"splide__autoplay"},i().createElement("button",{className:"splide__play"},r),i().createElement("button",{className:"splide__pause"},c)),u&&u())}},$n=({children:t,className:n,...e})=>i().createElement("li",{className:xn("splide__slide",n),...e},t);function Ln(t){return console.log(t),t.images=t.images.filter((function(t){return t.id>0})),t.images.length>0?(0,n.createElement)(An,{options:{type:t.type,rewind:parseInt(t.rewind),heightRatio:t.height_ratio,gap:t.gap+"px",padding:t.padding+"%",breakpoints:""==t.breakpoint?"":{[t.breakpoint]:{type:t.type,rewind:parseInt(t.rewind),heightRatio:t.breakpoint_height_ratio,gap:t.breakpoint_gap+"px",padding:t.breakpoint_padding+"%"}}}},t.images.map((t=>(0,n.createElement)($n,null,(0,n.createElement)("a",{className:"foobox",rel:"gallery",href:t.front_url},(0,n.createElement)("img",{src:t.front_url,alt:""})))))):null}document.querySelectorAll(".splide_element").forEach((function(t){const e=JSON.parse(t.querySelector("pre").innerHTML);s().render((0,n.createElement)(Ln,e),t),t.classList.remove("splide_element")}))}(); -
bps-splide-slider-block/trunk/index.php
r2793668 r2938740 4 4 Plugin Name: BPS Slider Block Using Splide 5 5 Description: Custom block for Splide slider with customizable parameters 6 Version: 1.1 6 Version: 1.1.1 7 7 Author: BPS 8 8 Text Domain: bps-slider-block … … 54 54 // Attributes are loaded in following order: 55 55 // - Default values as specified in constructor 56 // - Values changed via Settings page56 // - Values changed via settings page 57 57 // - Values specified in custom post type block template 58 58 // - Values set for a specific block via block controls 59 // Last 2 are applied on save of post but reset by changes on settings page 59 60 'attributes' => array( 60 61 'images' => array( … … 129 130 130 131 ob_start() ?> 131 <div class="splide_element">132 <pre style="display: none;"><?php echo wp_json_encode($attributes) ?></pre>133 </div>134 <?php return ob_get_clean();132 <div class="splide_element"> 133 <pre style="display: none;"><?php echo wp_json_encode($attributes) ?></pre> 134 </div> 135 <?php return ob_get_clean(); 135 136 } 136 137 … … 184 185 185 186 function imageWidthHTML() { ?> 186 <input type="text" name="sbp_image_width" value="<?php echo esc_attr(get_option('sbp_image_width')) ?>">187 <?php }187 <input type="text" name="sbp_image_width" value="<?php echo esc_attr(get_option('sbp_image_width')) ?>"> 188 <?php } 188 189 189 190 function imageHeightHTML() { ?> 190 <input type="text" name="sbp_image_height" value="<?php echo esc_attr(get_option('sbp_image_height')) ?>">191 <?php }191 <input type="text" name="sbp_image_height" value="<?php echo esc_attr(get_option('sbp_image_height')) ?>"> 192 <?php } 192 193 193 194 function typeHTML() { ?> 194 <select name="sbp_type">195 <?php foreach ($this->splide_slider_type_options as $option) { ?>196 <option value="<?php echo $option ?>" <?php selected(get_option('sbp_type'), $option) ?>><?php echo $option ?></option>197 <?php } ?>198 </select>199 <?php }195 <select name="sbp_type"> 196 <?php foreach ($this->splide_slider_type_options as $option) { ?> 197 <option value="<?php echo $option ?>" <?php selected(get_option('sbp_type'), $option) ?>><?php echo $option ?></option> 198 <?php } ?> 199 </select> 200 <?php } 200 201 201 202 function rewindHTML() { ?> 202 <input type="checkbox" name="sbp_rewind" value="1" <?php checked(get_option('sbp_rewind', '1')) ?>>203 <?php }203 <input type="checkbox" name="sbp_rewind" value="1" <?php checked(get_option('sbp_rewind', '1')) ?>> 204 <?php } 204 205 205 206 function heightRatioHTML() { ?> 206 <input type="text" name="sbp_height_ratio" value="<?php echo esc_attr(get_option('sbp_height_ratio')) ?>">207 <?php }207 <input type="text" name="sbp_height_ratio" value="<?php echo esc_attr(get_option('sbp_height_ratio')) ?>"> 208 <?php } 208 209 209 210 function gapHTML() { ?> 210 <input type="text" name="sbp_gap" value="<?php echo esc_attr(get_option('sbp_gap')) ?>">211 <?php }211 <input type="text" name="sbp_gap" value="<?php echo esc_attr(get_option('sbp_gap')) ?>"> 212 <?php } 212 213 213 214 function paddingHTML() { ?> 214 <input type="text" name="sbp_padding" value="<?php echo esc_attr(get_option('sbp_padding')) ?>">215 <?php }215 <input type="text" name="sbp_padding" value="<?php echo esc_attr(get_option('sbp_padding')) ?>"> 216 <?php } 216 217 217 218 function sanitizeImageWidth($input) { … … 284 285 285 286 function breakpointHTML() { ?> 286 <input type="text" name="sbp_breakpoint" value="<?php echo esc_attr(get_option('sbp_breakpoint')) ?>">287 <?php }287 <input type="text" name="sbp_breakpoint" value="<?php echo esc_attr(get_option('sbp_breakpoint')) ?>"> 288 <?php } 288 289 289 290 function breakpointHeightRatioHTML() { ?> 290 <input type="text" name="sbp_breakpoint_height_ratio" value="<?php echo esc_attr(get_option('sbp_breakpoint_height_ratio')) ?>">291 <?php }291 <input type="text" name="sbp_breakpoint_height_ratio" value="<?php echo esc_attr(get_option('sbp_breakpoint_height_ratio')) ?>"> 292 <?php } 292 293 293 294 function breakpointGapHTML() { ?> 294 <input type="text" name="sbp_breakpoint_gap" value="<?php echo esc_attr(get_option('sbp_breakpoint_gap')) ?>">295 <?php }295 <input type="text" name="sbp_breakpoint_gap" value="<?php echo esc_attr(get_option('sbp_breakpoint_gap')) ?>"> 296 <?php } 296 297 297 298 function breakpointPaddingHTML() { ?> 298 <input type="text" name="sbp_breakpoint_padding" value="<?php echo esc_attr(get_option('sbp_breakpoint_padding')) ?>">299 <?php }299 <input type="text" name="sbp_breakpoint_padding" value="<?php echo esc_attr(get_option('sbp_breakpoint_padding')) ?>"> 300 <?php } 300 301 301 302 function sanitizeBreakpoint($input) { … … 338 339 339 340 function adminPageHTML() { ?> 340 <div class="wrap">341 <h1>Splide Slider Block <?php esc_html_e('Settings', 'bps-slider-block') ?></h1>342 <form action="options.php" method="post">343 <?php341 <div class="wrap"> 342 <h1>Splide Slider Block <?php esc_html_e('Settings', 'bps-slider-block') ?></h1> 343 <form action="options.php" method="post"> 344 <?php 344 345 settings_fields('splide_block_plugin'); 345 346 do_settings_sections('splide-settings'); 346 347 submit_button(); 347 348 ?> 348 </form>349 </div>349 </form> 350 </div> 350 351 <?php } 351 352 } -
bps-splide-slider-block/trunk/languages/bps-slider-block.pot
r2684849 r2938740 1 # Copyright (C) 2022 BPS2 # This file is distributed under the same license as the BPS Slider Block Using Splide plugin.3 1 msgid "" 4 2 msgstr "" 5 "Project-Id-Version: BPS Slider Block Using Splide 1.0\n"6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bps-splide-slider-block\n"3 "Project-Id-Version: \n" 4 "Report-Msgid-Bugs-To: \n" 7 5 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 8 6 "Language-Team: LANGUAGE <LL@li.org>\n" … … 10 8 "Content-Type: text/plain; charset=UTF-8\n" 11 9 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2022- 02-24T13:41:53+01:00\n"10 "POT-Creation-Date: 2022-10-03T21:09:59+02:00\n" 13 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 12 "X-Generator: WP-CLI 2.5.0\n" 15 "X-Domain: bps-slider-block\n" 16 17 #. Plugin Name of the plugin 18 msgid "BPS Slider Block Using Splide" 19 msgstr "" 20 21 #. Description of the plugin 22 msgid "Custom block for Splide slider with customizable parameters" 23 msgstr "" 24 25 #. Author of the plugin 26 msgid "BPS" 27 msgstr "" 28 29 #: index.php:96 30 #: index.php:299 31 msgid "Settings" 32 msgstr "" 33 34 #: index.php:104 35 msgid "Image width in px" 36 msgstr "" 37 38 #: index.php:107 39 msgid "Image height in px" 40 msgstr "" 41 42 #: index.php:110 43 msgid "Type" 44 msgstr "" 45 46 #: index.php:113 47 msgid "Rewind" 48 msgstr "" 49 50 #: index.php:116 51 #: index.php:131 52 msgid "Height ratio" 53 msgstr "" 54 55 #: index.php:119 56 #: index.php:134 57 msgid "Gap in px" 58 msgstr "" 59 60 #: index.php:122 61 #: index.php:137 62 msgid "Padding in %" 63 msgstr "" 64 65 #: index.php:126 66 msgid "Optional breakpoint settings" 67 msgstr "" 68 69 #: index.php:128 70 msgid "Breakpoint in px" 71 msgstr "" 72 73 #: index.php:178 74 msgid "Don't forget to regenerate thumbnails to apply the width change to existing images" 75 msgstr "" 76 77 #: index.php:182 78 msgid "Image width value must be a number between 100 and 1000" 79 msgstr "" 80 81 #: index.php:190 82 msgid "Don't forget to regenerate thumbnails to apply the height change to existing images" 83 msgstr "" 84 85 #: index.php:194 86 msgid "Image height value must be a number between 100 and 1000" 87 msgstr "" 88 89 #: index.php:201 90 msgid "Invalid type value" 91 msgstr "" 92 93 #: index.php:218 94 msgid "Height ratio value must be a number between 0 and 1" 95 msgstr "" 96 97 #: index.php:227 98 #: index.php:281 99 msgid "Gap value must be a number between 0 and 100" 100 msgstr "" 101 102 #: index.php:236 103 msgid "Padding value must be a number between 0 and 30" 104 msgstr "" 105 106 #: index.php:263 107 msgid "Breakpoint value must be a number between 100 and 1500 or leave the field empty if you don't want a breakpoint" 108 msgstr "" 109 110 #: index.php:272 111 msgid "Breakpoint height ratio value must be a number between 0 and 1" 112 msgstr "" 113 114 #: index.php:290 115 msgid "Breakpoint padding value must be a number between 0 and 30" 116 msgstr "" 117 118 #: build/block.js:3494 119 msgid "slider" 120 msgstr "" 121 122 #: build/block.js:3537 123 msgid "Select image" 124 msgstr "" 125 126 #: build/block.js:3545 127 msgid "Remove image" 128 msgstr "" 129 130 #: build/block.js:3563 131 msgid "Slider images" 132 msgstr "" 133 134 #: build/block.js:3577 135 msgid "Add image" 136 msgstr "" 13 "X-Domain: src\n"
Note: See TracChangeset
for help on using the changeset viewer.