var blocksyOptions;!function(){var e={1649:function(e){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a{const r=n<0?e.length+n:n,o=e.splice(t,1)[0];e.splice(r,0,o)},n=(e,n,r)=>(e=e.slice(),t(e,n,r),e);e.exports=n,e.exports.default=n,e.exports.mutate=t},3626:function(e,t){"use strict";t.T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}},7215:function(e,t){"use strict";function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1?t["color"===e.type?"default":e.type.split(":")[1]].color:e.extractValue?e.extractValue(t):t;r&&r.indexOf("CT_CSS_SKIP_RULE")>-1?n.style.removeProperty("--".concat(e.variable)):n.style.setProperty("--".concat(e.variable),"".concat(r||"").concat(e.unit||""))}))}(e,t())}))}}))}},5529:function(e,t,n){"use strict";n.d(t,{KY:function(){return l},Nj:function(){return u}});var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=Object.assign||function(e){for(var t=1;t1&&e.pop(),e},l=function(e){return e.all||e.any||(e={all:e}),e},u=function e(t,n){var l=Object.values(t)[0],u=function(e){return!(e.length>4)&&(0===e.indexOf("any")?"any":0===e.indexOf("all")&&"all")},p=Object.keys(l).map((function(t,p){var d=Object.values(l)[p];return"all"===u(t)||"any"===u(t)?e(r({},t,d),n):function(e,t,n){var l=function(e,t){var n=function(e){return c(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)};if(e.indexOf(":")>-1){var l=null;if(u=e.split(":"),p=function(e){var u=a(e),p=u[0],d=u.slice(1);if("visibility"===(d=d.join(":"))&&(l=n(p,o({},t,r({},s(p),c(s(p),t)[t.wp_customizer_current_view]?"yes":"no")))),"responsive"===d&&(l=n(p,o({},t,r({},s(p),c(s(p),t)[t.wp_customizer_current_view]||c(s(p),t))))),"truthy"===d&&(l=n(p)?"yes":"no"),d.indexOf("array-ids")>-1){var f=d.split(":"),m=i(f,4),h=m[0],g=m[1],v=m[2],b=m[3],y=void 0===b?"no":b,w=h.indexOf("array-ids-")>-1&&h.split("-")[2],O=n(p).filter((function(e){return e.id===g})).filter((function(e){return!w||w===c(v,e).toString()}));l=0===O.length?y:c(v,O[0])||"no"}if(d.indexOf("json:")>-1&&(l=n(p+"/"+d.split(":")[1]).toString()),"array_length"===d){var _=n(p);l=(_||[]).length.toString()}if(!l)throw new Error("Unknown matcher received. Please verify for typos. The received matcher: "+d+".")},p(u),l)return l;e=e.split(":")[0]}var u,p;var d=n(e);if(!d)return!1;if(d.desktop)return d;return d.toString()}(t,n);if(e&&e.toString()&&0===e.toString().indexOf("~")){var u=e.replace("~","");return l.desktop?l.desktop===u||l.tablet===u||l.mobile===u:l===u}if(l=l.toString(),e=e.toString(),!l)return!1;if(e.indexOf("|")>-1)return 0===e.indexOf("!")?-1===e.substring(1).split("|").map((function(e){return e.trim()})).includes(l.trim()):e.split("|").map((function(e){return e.trim()})).indexOf(l.trim())>-1;if(0===e.indexOf("!"))return l!==e.substring(1).trim();if(0===e.indexOf("*"))return l.indexOf(e.trim().substring(1).trim())>-1;return l===e.trim()}(d,t,n)}));return"all"===u(Object.keys(t)[0])?p.every((function(e){return!!e})):"any"===u(Object.keys(t)[0])?p.some((function(e){return!!e})):void 0}},3363:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(1381),o=n(7363);function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},c=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),c=0;c=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let b=function(){},y=function(){},w=function(e,t){e.disposeAriaHider=function(e){let t=[],n=[];return Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(r){if(r===e.parentNode)return;let o=r.getAttribute("aria-hidden");null!==o&&"false"!==o||(t.push(o),n.push(r),r.setAttribute("aria-hidden","true"))})),function(){n.forEach((function(e,n){let r=t[n];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(e.overlayNode),e.trap=f()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},O=function(e){let{refs:t}=e;t.trap.deactivate(),t.disposeAriaHider()},_=React.createContext(),E=React.forwardRef((function(e,t){let{container:n,isOpen:o=!0,onDismiss:i=b,initialFocusRef:a,onClick:c,onKeyDown:s}=e,d=v(e,m);return(0,r.createElement)(l,{didMount:y},o?(0,r.createElement)(u,{container:n,"data-reach-dialog-wrapper":!0},(0,r.createElement)(l,{refs:{overlayNode:null,contentNode:null},didMount:function(e){let{refs:t}=e;w(t,a)},willUnmount:O},(function(e){let{refs:n}=e;return(0,r.createElement)(_.Provider,{value:function(e){return n.contentNode=e}},(0,r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:p(c,(function(e){e.stopPropagation(),i()})),onKeyDown:p(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},d)))}))):null)}));E.propTypes={initialFocusRef:function(){}};let S=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){let{onClick:n,onKeyDown:o}=e,i=v(e,h);return(0,r.createElement)(_.Consumer,null,(function(e){return(0,r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:p(n,S),ref:function(n){e(n),t&&t(n)}},i))}))}));var x=n(4823);n(5652),n(4184);const j=function(e){return!!e};var C=function(e){let{items:t,isVisible:n=j,render:o,className:i,initialFocusRef:a,onDismiss:c,onCloseButtonClick:s}=e;return(0,r.createElement)(x.uT,{items:t,onStart:function(){return document.body.classList[n(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return n(e)&&function(t){return(0,r.createElement)(E,{style:{opacity:t.opacity},container:document.body,onDismiss:function(){return c()},initialFocusRef:a},(0,r.createElement)(P,{className:i,style:{transform:`translate3d(0px, ${t.y}px, 0px)`}},(0,r.createElement)("button",{className:"close-button",onClick:function(){return s?s():c()}},"×"),o(e,t)))}}))}},7086:function(e,t,n){"use strict";n.d(t,{Oi:function(){return d},S0:function(){return u},T:function(){return a.T},W:function(){return p}});var r=n(1381),o=n(4184),i=n.n(o),a=n(3626),c=n(5760);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=function(e,t){return function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},{ignoreHidden:n=!1}=t;return!(!(0,c.fg)(e).hiddenResponsive||n)||!!e.responsive},d=function(e){let{value:t,option:n,device:r}=e;return"tablet"===r&&"skip"===u(r,n.responsive)?t.mobile:t[r]};t.ZP=function(e){let{device:t,setDevice:n,responsiveDescriptor:o}=e;return(0,r.createElement)("div",{className:"ct-control-options"},(0,r.createElement)("ul",{className:"ct-responsive-controls ct-devices"},["desktop","tablet","mobile"].filter((function(e){return"skip"!==u(e,o)})).map((function(e){return(0,r.createElement)("li",{onClick:function(){return n(e)},className:i()({active:e===t,"ct-disabled":!u(e,o)},`ct-${e}`),key:e})}))))}},1429:function(e,t,n){"use strict";n.d(t,{$M:function(){return a},Id:function(){return c},Or:function(){return s},jd:function(){return l}});var r=n(1381);const o=(0,r.createContext)(),i=(0,r.createContext)(),a=function(){return(0,r.useContext)(o)||{currentView:"desktop"}},c=function(){return(0,r.useContext)(i)||{}},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{withTablet:t=!0}=e,[n,o]=(0,r.useState)(wp.customize&&wp.customize.previewedDevice?wp.customize.previewedDevice():"desktop"),i=function(){o(wp.customize&&wp.customize.previewedDevice?wp.customize.previewedDevice():"desktop")};return(0,r.useEffect)((function(){if(wp.customize)return setTimeout((function(){return wp.customize.previewedDevice.bind(i)}),1e3),function(){wp.customize&&wp.customize.previewedDevice.unbind(i)}}),[]),[t?n:"tablet"===n?"mobile":n,function(e){o(e),wp.customize&&wp.customize.previewedDevice.set(e)}]},l=function(e){let{children:t}=e;const[n,a]=s();return(0,r.createElement)(o.Provider,{value:{currentView:n}},(0,r.createElement)(i.Provider,{value:{setDevice:a}},t))}},9743:function(e,t,n){"use strict";n.d(t,{B:function(){return o},o:function(){return i}});var r=n(1381);const o=(0,r.createContext)({onChange:function(e,t){},values:{}}),i=function(){const{onChange:e,values:t}=(0,r.useContext)(o);return[t,e]}},2297:function(e,t,n){"use strict";n.d(t,{Z5:function(){return Q},ZP:function(){return te},ek:function(){return ee}});var r=n(1381),o=n(5652),i=n(4184),a=n.n(i),c=n(8269),s=n(488),l=n(8285),u=n(7691);const p=["items","draggableId","hasPointers","className","tagName","direction","group","options","propsForItem","displayWrapper"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const v=function(e,t,n){const r=ct_customizer_localizations.header_builder_data.header.find((function(t){let{id:n}=t;return n===(0,l.t_)(e)}));if(!r)return!0;let o=[];Array.isArray(r.config.allowed_in)?o=r.config.allowed_in:r.config.allowed_in[n]&&(o=r.config.allowed_in[n]);const i=!(o.length>0)||o.indexOf(t)>-1,a=!(r.config.excluded_from.length>0)||-1===r.config.excluded_from.indexOf(t);return i&&a},b=function(e){var t,n,o,i;let{item:c,index:s,panelType:p,onRemove:d,renderItem:f,onClick:m,className:h}=e;const g=ct_customizer_localizations.header_builder_data[p].find((function(e){let{id:t}=e;return t===(0,l.t_)(c)})),{builderValue:v}=(0,r.useContext)(Q);if(f)return f({item:c,itemData:g,index:s});const b=v.items.filter((function(e){let{id:t}=e;return t.indexOf((0,l.SU)())>-1})).map((function(e){let{id:t}=e;return t})),y=[(0,l.t_)(c),...b.filter((function(e){return(0,l.t_)(e)===(0,l.t_)(c)}))],w=(0,u.f)((0,l.t_)(c));return(0,r.createElement)("div",{"data-id":c,className:a()("ct-builder-item",h,{"ct-builder-item-not-registered":!g}),onClick:m},y.length>1?`${null!==(t=null==g||null===(n=g.config)||void 0===n?void 0:n.name)&&void 0!==t?t:w} ${y.indexOf(c)+1}`:null!==(o=null==g||null===(i=g.config)||void 0===i?void 0:i.name)&&void 0!==o?o:w,(0,r.createElement)("button",{className:"ct-btn-remove",onClick:function(e){e.preventDefault(),e.stopPropagation(),d()}},(0,r.createElement)("svg",{width:"7px",height:"7px",viewBox:"0 0 10 10",fill:"currentColor"},(0,r.createElement)("path",{d:"M10,1.4L6.4,5L10,8.6L8.6,10L5,6.4L1.4,10L0,8.6L3.6,5L0,1.4L1.4,0L5,3.6L8.6,0L10,1.4z"}))))};var y=function(e){let{items:t,draggableId:n,hasPointers:o=!0,className:i,tagName:l="div",direction:u="horizontal",group:f="header_sortables",options:h={},propsForItem:y=function(e){return{}},displayWrapper:w=!0}=e,O=g(e,p);const{currentView:_,isDragging:E,setIsDragging:S,onChange:P,setList:x}=(0,r.useContext)(Q),{panelsHelpers:j}=(0,r.useContext)(s.Q),C=t.map((function(e,o){return(0,r.createElement)(b,d({key:e,index:o,panelType:"header",item:e,className:j.isOpenFor(`builder_panel_${e}`)?"ct-customizing":"",onClick:function(t){t.stopPropagation(),t.preventDefault(),E||j.open(`builder_panel_${e}`)},onRemove:function(){j.close(),setTimeout((function(){x(m({[n]:t.filter((function(t){return t!==e}))},"desktop"===_&&"trigger"===e?{"offcanvas:start":[]}:{}))}))}},y(e)))}));return w?(0,r.createElement)(c.Z,d({options:m({delay:0,group:f,fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,filter:".ct-pointer, .ct-btn-remove",direction:u,touchStartThreshold:5,onStart:function(e){S(e.item.dataset.id);let t=wp.customize.previewedDevice();"tablet"===t&&(t="mobile"),v(e.item.dataset.id,"middle-row",t)&&document.body.classList.add("ct-builder-dragging"),e.from&&f&&"clone"!==f.pull&&e.to.classList.add("ct-is-over")},onEnd:function(){S(!1),document.body.classList.remove("ct-builder-dragging"),[...document.querySelectorAll(".ct-panel-builder .ct-is-over")].map((function(e){return e.classList.remove("ct-is-over")}))},onMove:function(e,t){let n=wp.customize.previewedDevice();if("tablet"===n&&(n="mobile"),e.from.closest("#ct-option-header-builder-items")&&Promise.resolve().then((function(){return[...e.from.querySelectorAll(`[data-id="${e.dragged.dataset.id}"]`)].map((function(e){e.classList.remove("ct-builder-item"),e.classList.add("ct-item-in-builder")}))})),[...document.querySelectorAll(".ct-panel-builder .ct-is-over")].map((function(e){return e.classList.remove("ct-is-over")})),e.to&&e.to.classList.add("ct-is-over"),!v(e.dragged.dataset.id,e.to.dataset.id.split(":")[0],n))return!1}},h),onChange:function(e,t,r){"available-items"!==n&&P({id:n,value:e.filter((function(e){return"__pointer__"!==e&&"__filler__"!==e}))})},tag:l,className:a()("ct-builder-items",i)},O,{"data-id":n}),["end","start-middle"].indexOf(n.split(":")[1])>-1&&(0,r.createElement)("div",{"data-id":"__filler__",className:"ct-filler"}),o&&E&&v(E,n.split(":")[0],_)&&(0,r.createElement)("div",{"data-id":"__pointer__",className:"ct-pointer"}),C):(0,r.createElement)(r.Fragment,null,C)};function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){if("start"===t){a=[i,n.placements.find((function(e){let{id:t}=e;return"start-middle"===t}))]}if("end"===t){a=[n.placements.find((function(e){let{id:t}=e;return"end-middle"===t})),i]}}}return(0,r.createElement)("li",w({className:[`ct-builder-column-${i.id}`]},"middle"===i.id?{"data-count":i.items.length}:{}),a.map((function(e){return(0,r.createElement)(y,{key:e.id,direction:o,className:"middle"===e.id?"":`ct-${e.id.indexOf("-")>-1?"secondary":"primary"}-column`,draggableId:`${n.id}:${e.id}`,items:e.items})})))};var _=function(e){let{bar:t,direction:n="horizontal"}=e;const{panelsHelpers:i}=(0,r.useContext)(s.Q);return(0,r.createElement)("li",{className:"builder-row"},(0,r.createElement)("div",{className:"ct-row-actions",onClick:function(){return i.open(`builder_panel_${t.id}`)}},{"top-row":(0,o.__)("Top Row","blocksy"),"middle-row":(0,o.__)("Main Row","blocksy"),"bottom-row":(0,o.__)("Bottom Row","blocksy"),offcanvas:(0,o.__)("Off Canvas Area","blocksy")}[t.id]),(0,r.createElement)("ul",{className:"row-inner"},["start","middle","end"].filter((function(e){return!!t.placements.find((function(t){let{id:n}=t;return n===e}))})).map((function(e){return(0,r.createElement)(O,{key:e,bar:t,placementName:e,direction:n})}))))};var E=function(e){let{inlinedItemsFromBuilder:t,view:n,builderValueWithView:o}=e,i="mobile"===n||t.indexOf("trigger")>-1&&o.find((function(e){let{id:t}=e;return"offcanvas"===t}));return(0,r.createElement)("div",{className:a()("placements-builder",{"ct-mobile":i})},i&&(0,r.createElement)("ul",{className:"offcanvas-container"},(0,r.createElement)(_,{direction:"vertical",bar:o.find((function(e){let{id:t}=e;return"offcanvas"===t}))})),(0,r.createElement)("ul",{className:"horizontal-rows"},["top-row","middle-row","bottom-row"].map((function(e){const t=o.find((function(t){let{id:n}=t;return n===e}));return t?(0,r.createElement)(_,{bar:t,key:e}):null}))))};var S=function(e){let{currentView:t,setCurrentView:n}=e;const[i,c]=(0,r.useState)(!1);return(0,r.useEffect)((function(){return function(){document.querySelector(".wp-full-overlay").classList.remove("ct-builder-collapsed")}}),[]),(0,r.createElement)("ul",{className:"ct-view-switch"},["desktop","mobile"].map((function(e){return(0,r.createElement)("li",{key:e,onClick:function(){return n("mobile"===e?"tablet":e)},className:a()({active:t===e})},{desktop:(0,o.__)("Desktop Header","blocksy"),mobile:(0,o.__)("Tablet / Mobile Header","blocksy")}[e])})),(0,r.createElement)("li",{className:"ct-builder-toggle",onClick:function(){c(!i),i?document.querySelector(".wp-full-overlay").classList.remove("ct-builder-collapsed"):document.querySelector(".wp-full-overlay").classList.add("ct-builder-collapsed")}},i?(0,o.__)("Show Builder","blocksy"):(0,o.__)("Hide Builder","blocksy")))},P=n(8441),x=n(9999),j=n(7686);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1})).map((function(e){let{id:t}=e;return t}));return(0,r.createElement)(y,{options:{sort:!1,filter:".ct-item-in-builder"},group:{name:"header_sortables",put:!1,pull:"clone"},draggableId:"available-items",items:[...f.map((function(e){let{id:t}=e;return t})),...h].filter((function(e){return m.some((function(t){let{id:n}=t;return n===(0,l.t_)(e)}))})).sort((function(e,t){const n=m.find((function(t){let{id:n}=t;return n===(0,l.t_)(e)})),r=m.find((function(e){let{id:n}=e;return n===(0,l.t_)(t)}));return n.config.name.localeCompare(r.config.name)})),hasPointers:!1,displayWrapper:i,propsForItem:function(e){return{renderItem:function(e){let{item:c,itemData:f,index:g}=e;const v=m.find((function(e){let{id:t}=e;return t===(0,l.t_)(c)})).options,b=[(0,l.t_)(c),...h.filter((function(e){return(0,l.t_)(e)===(0,l.t_)(c)}))],y=b.length>1?`${f.config.name} ${b.indexOf(c)+1}`:f.config.name,w={label:y,"inner-options":v},O=o.indexOf(c)>-1;let _="__none__";O&&(_=t[u].find((function(e){let{id:t,placements:n}=e;return(n||[]).reduce((function(e,t){let{id:n,items:r}=t;return[...e,...r]}),[]).find((function(e){return e===c}))})).id);const E=`builder_panel_${c}`,S=["mobile-menu","mobile-menu-secondary","offcanvas-logo"],k=i&&f.config.devices.includes(u)&&(!S.includes(c)||S.includes(c)&&("desktop"!==u||o.indexOf("trigger")>-1));f.config.name;return(0,r.createElement)(x.PanelMetaWrapper,C({id:E,option:w},s,{getActualOption:function(e){let{open:o}=e;return(0,r.createElement)(r.Fragment,null,d.indexOf(c)>-1&&(0,r.createElement)(x.default,{id:E,getValues:function(){let e=t.items.find((function(e){let{id:t}=e;return t===c}));return e&&Object.keys(e.values)>5?I({builderSettings:t.settings||{},row:_},e.values):I(I({},(0,j.n6)(v,e?e.values:{})),{},{row:_,builderSettings:t.settings||{}})},option:w,onChangeFor:function(e,r){const o=t.items.find((function(e){let{id:t}=e;return t===c}));n({type:"ITEM_VALUE_ON_CHANGE",payload:{id:c,optionId:e,optionValue:r,values:!o||o&&0===Object.keys(o.values).length?(0,j.n6)(v,{}):{}}})},view:"simple"}),k&&(0,r.createElement)("div",{"data-id":c,className:a()({"ct-item-in-builder":O,"ct-builder-item":!O}),onClick:function(e){p||O&&o()}},y,(0,r.createElement)(P.Slot,{name:`PlacementsBuilderSidebarItem_${g}`,fillProps:{item:c,itemInBuilder:O,itemData:f}})))}}))}}},direction:"vertical"})};function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t5?R({itemsCount:r,builderSettings:t.settings||{}},n.values):R(R({},(0,j.n6)(e.options,n?n.values:{})),{},{itemsCount:r,builderSettings:t.settings||{}})},option:o,onChangeFor:function(r,o){const i=t.items.find((function(t){let{id:n}=t;return n===e.id}));n({type:"ITEM_VALUE_ON_CHANGE",payload:{id:e.id,optionId:r,optionValue:o,values:!i||i&&0===Object.keys(i.values).length?(0,j.n6)(e.options,{}):{}}})},view:"simple"}))}}))})))};function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&s===e.id&&(0,r.createElement)(x.default,{id:u,getValues:function(){return e.settings||{}},option:d,onChangeFor:function(t,n){i({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:t,optionValue:n,values:(0,j.n6)(p,Array.isArray(e.settings)?{}:e.settings||{})}})},view:"simple"}),s===e.id&&(0,r.createElement)("li",{className:a()({active:s===e.id,"ct-global":"type-1"===s}),onClick:function(){Object.keys(p).length>0&&n()}},(0,r.createElement)("span",{className:"ct-panel-name"},l)))}}))})))};var z=function(e){let{allBuilderSections:t,builderValue:n,builderValueDispatch:i,inlinedItemsFromBuilder:c}=e;const[s,l]=(0,r.useState)("items"),{builderValueCollection:u}=(0,r.useContext)(Q);ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,ct_customizer_localizations.header_builder_data.header_data.header_options;return(0,r.createElement)("div",{className:"ct-available-items"},(0,r.createElement)("h3",{className:"ct-title",dangerouslySetInnerHTML:{__html:(0,o.sprintf)((0,o.__)("Customizing: %s","blocksy"),`${(u.sections.find((function(e){let{id:t}=e;return t===n.id}))||{}).name||{"type-1":(0,o.__)("Global Header","blocksy")}[n.id]||n.id}`)}}),(0,r.createElement)("div",{className:"ct-tabs"},(0,r.createElement)("ul",null,["items","panels"].map((function(e){return(0,r.createElement)("li",{key:e,onClick:function(t){t.preventDefault(),l(e)},className:a()({active:e===s})},{panels:(0,o.__)("Headers","blocksy"),items:(0,o.__)("Elements","blocksy")}[e])}))),(0,r.createElement)("div",{className:"ct-current-tab"},"panels"===s&&(0,r.createElement)(P.Slot,{name:"PlacementsBuilderPanelsManager"},(function(e){return 0===e.length?(0,r.createElement)(B,null):e})),(0,r.createElement)(N,{builderValue:n,builderValueDispatch:i,inlinedItemsFromBuilder:c,displayList:"items"===s}))),(0,r.createElement)(L,{builderValue:n,builderValueDispatch:i}))},V=n(1496),U=n.n(V);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t-1})),i=!1,a=!1,c=[];if("ITEM_VALUE_ON_CHANGE"===t.type){const{id:e,optionId:n,optionValue:r,values:i={}}=t.payload;a=`${e}:${n}`;let c=o.items;c.find((function(t){let{id:n}=t;return n===e}))||(c=[...c,{id:e,values:{}}]),o=W(W({},o),{},{items:c.map((function(t){return t.id===e?W(W({},t),{},{values:W(W({},t.values),{},{[n]:r})}):t}))})}if("PICK_BUILDER_SECTION"===t.type&&(i=!0,n={__forced_static_header__:t.payload.id}),"CLONE_ITEM"===t.type){const e=(0,l.t_)(t.payload.id);o=W(W({},o),{},{items:[...o.items,{id:`${e}${(0,l.SU)()}${U()()}`,values:o.items.find((function(t){let{id:n}=t;return n===e}))?o.items.find((function(t){let{id:n}=t;return n===e})).values:{}}]})}if("REMOVE_CLONED_ITEM"===t.type&&(o=W(W({},o),{},{items:o.items.filter((function(e){let{id:n}=e;return n!==t.payload.id}))})),"SET_LIST"===t.type){i=!0;const{currentView:e,lists:n}=t.payload;"desktop"===e&&Object.values(n).reduce((function(e,t){return[...e,...t]}),[]).indexOf("trigger")>-1&&!o.desktop.find((function(e){let{id:t}=e;return"offcanvas"===t}))&&(o=W(W({},o),{},{desktop:[...o.desktop,{id:"offcanvas",placements:[{id:"start",items:[]}]}]})),o=W(W({},o),{},{[e]:o[e].map((function(e){let{id:t,placements:r}=e;if(Object.keys(n).map((function(e){return e.split(":")[0]})).indexOf(t)>-1){let e={id:t,placements:r.map((function(e){let{id:r,items:o}=e;return n[`${t}:${r}`]?{id:r,items:n[`${t}:${r}`]}:{id:r,items:o}}))};if(e.placements.find((function(e){let{id:t}=e;return"middle"===t}))&&0===e.placements.find((function(e){let{id:t}=e;return"middle"===t})).items.length&&e.placements.find((function(e){let{id:t}=e;return"start-middle"===t}))&&(e.placements.find((function(e){let{id:t}=e;return"start-middle"===t})).items.length>0||e.placements.find((function(e){let{id:t}=e;return"end-middle"===t})).items.length>0)){let n={};n[`${t}:start`]=[...e.placements.find((function(e){let{id:t}=e;return"start"===t})).items,...e.placements.find((function(e){let{id:t}=e;return"start-middle"===t})).items],n[`${t}:end`]=[...e.placements.find((function(e){let{id:t}=e;return"end-middle"===t})).items,...e.placements.find((function(e){let{id:t}=e;return"end"===t})).items],n[`${t}:start-middle`]=[],n[`${t}:end-middle`]=[],e={id:t,placements:e.placements.map((function(e){let{id:r,items:o}=e;return n[`${t}:${r}`]?{id:r,items:n[`${t}:${r}`]}:{id:r,items:o}}))}}return e}return{id:t,placements:r}}))})}if("BUILDER_GLOBAL_SETTING_ON_CHANGE"===t.type){const{optionId:e,optionValue:n,values:r={}}=t.payload;o=W(W({},o),{},{settings:W(W(W({},o.settings),r),{},{[e]:n})})}if("CREATE_NEW_SECTION"===t.type){const{name:n,copy:o}=t.payload;r=[o?W(W({},e.sections.find((function(e){let{id:t}=e;return t===o}))||{}),{},{name:n,id:`ct-custom-${U()()}`}):{name:n,id:`ct-custom-${U()()}`,mode:"placements",items:[],settings:[],desktop:[{id:"top-row",placements:[{id:"start",items:[]},{id:"middle",items:[]},{id:"end",items:[]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]},{id:"middle-row",placements:[{id:"start",items:["logo"]},{id:"middle",items:[]},{id:"end",items:["menu"]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]},{id:"bottom-row",placements:[{id:"start",items:[]},{id:"middle",items:[]},{id:"end",items:[]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]}],mobile:[{id:"top-row",placements:[{id:"start",items:[]},{id:"middle",items:[]},{id:"end",items:[]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]},{id:"middle-row",placements:[{id:"start",items:["logo"]},{id:"middle",items:[]},{id:"end",items:["trigger"]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]},{id:"bottom-row",placements:[{id:"start",items:[]},{id:"middle",items:[]},{id:"end",items:[]},{id:"start-middle",items:[]},{id:"end-middle",items:[]}]},{id:"offcanvas",placements:[{id:"start",items:["mobile-menu"]}]}]}]}"REMOVE_BUILDER_SECTION"===t.type&&c.push(t.payload.id);const s=W(W(W({},e),n),{},{__should_refresh__:i,__should_refresh_item__:a,sections:[...e.sections.map((function(e){return e.id===o.id?o:e})),...r].filter((function(e){let{id:t}=e;return-1===c.indexOf(t)}))});return s.__forced_static_header__||(s.__forced_static_header__=s.id),s};var q=n(1429);n(2243);const Z=["__forced_static_header__","__should_refresh__"];function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Q=(0,r.createContext)({}),ee=function(){(e=wp.customize.previewer.container.find("iframe")[0]).document||e.contentDocument||e.contentWindow.document;var e;return wp.customize.previewer.container.find("iframe")[0].contentDocument.querySelector("header#header")?wp.customize.previewer.container.find("iframe")[0].contentDocument.querySelector("header#header").dataset.id:null};var te=function(e){let{value:t,option:n,onChange:o}=e;const i=(0,r.useRef)(null);null===i.current&&(i.current=(t.sections.find((function(e){let{id:t}=e;return t.indexOf(ee())>-1}))||t.sections[0]).id),(0,r.useEffect)((function(){return function(){const e=wp.customize("header_placements")(),{__forced_static_header__:t,__should_refresh__:n}=e,r=J(e,Z);t&&wp.customize("header_placements")(Y({__should_refresh__:!0,[Math.random()]:"update"},r))}}),[]);const[a,c]=(0,r.useState)(!1),[s,l]=(0,r.useReducer)(G,Y(Y({},t),i.current?{__forced_static_header__:i.current}:{})),u=(0,r.useMemo)((function(){return s.sections.find((function(e){let{id:t}=e;return t===s.__forced_static_header__}))||s.sections[0]}),[s]),[p,d]=(0,q.Or)({withTablet:!1}),f=(0,r.useMemo)((function(){return u[p].reduce((function(e,t){let{id:n,placements:r}=t;return[...e,...(r||[]).reduce((function(e,t){let{id:n,items:r}=t;return[...e,...r]}),[])]}),[])}),[u,p]),m=(0,r.useCallback)((function(e){let t=G(s,e);if("ITEM_VALUE_ON_CHANGE"===e.type){const{id:n,optionId:r,optionValue:o,values:i={}}=e.payload,a=t.sections.find((function(e){let{id:n}=e;return n===t.__forced_static_header__}))||t.sections[0];let c=a.items;"logo"===n&&"custom_logo"===r&&"type-1"===a.id&&wp.customize&&wp.customize("custom_logo")(o?o.desktop?o.desktop:o:""),wp.customize.previewer&&wp.customize.previewer.send("ct:header:receive-value-update",{itemId:n,optionId:r,optionValue:o,futureItems:a.items,values:Y(Y(Y({},(c.find((function(e){let{id:t}=e;return n===t}))||{values:{}}).values),i),{},{[r]:o})})}if("BUILDER_GLOBAL_SETTING_ON_CHANGE"===e.type){const{optionId:n,optionValue:r,values:o={}}=e.payload,i=t.sections.find((function(e){let{id:n}=e;return n===t.__forced_static_header__}))||t.sections[0];wp.customize.previewer&&wp.customize.previewer.send("ct:header:receive-value-update",{itemId:"global",optionId:n,optionValue:r,values:Y(Y(Y({},i.settings),o),{},{[n]:r})})}o(t),l(e)}),[l,o,s]),h=(0,r.useCallback)((function(e){return m({type:"SET_LIST",payload:{currentView:p,lists:e}})}),[m,p]);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Q.Provider,{value:{option:n,currentView:p,isDragging:a,setIsDragging:c,setList:h,builderValueDispatch:m,builderValue:u,onChange:function(e){let{id:t,value:n}=e;return h({[t]:n})},builderValueCollection:s}},(0,r.createElement)(z,{allBuilderSections:t,builderValue:u,inlinedItemsFromBuilder:f,builderValueDispatch:m}),(0,r.createPortal)((0,r.createElement)("div",{className:"ct-builder-header"},(0,r.createElement)(S,{currentView:p,setCurrentView:d}),(0,r.createElement)(E,{inlinedItemsFromBuilder:f,builderValueWithView:u[p],view:p})),document.querySelector(".ct-panel-builder"))))}},8269:function(e,t,n){"use strict";var r=n(1381),o=n(1389),i=n.n(o);const a=["tag","options","onChange"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={nextSibling:null,activeComponent:null};class d extends r.Component{constructor(){super(...arguments),u(this,"sortable",null)}componentDidMount(){var e=this;const t=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t * @author owenm * @license MIT */(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=function(){"use strict";var e="1.11.0";function r(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}const i=r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),a=r(/Edge/i),c=r(/firefox/i),s=r(/safari/i)&&!r(/chrome/i)&&!r(/android/i),l=r(/iP(ad|od|hone)/i),u=r(/chrome/i)&&r(/android/i),p={capture:!1,passive:!1};function d(e,t,n){e.addEventListener(t,n,!i&&p)}function f(e,t,n){e.removeEventListener(t,n,!i&&p)}function m(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function h(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function g(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&m(e,t):m(e,t))||r&&e===n)return e;if(e===n)break}while(e=h(e))}return null}const v=/\s+/g;function b(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{let r=(" "+e.className+" ").replace(v," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(v," ")}}function y(e,t,n){let r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function w(e,t){let n="";if("string"==typeof e)n=e;else do{let t=y(e,"transform");t&&"none"!==t&&(n=t+" "+n)}while(!t&&(e=e.parentNode));const r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){let r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o=t:o<=t,!e)return r;if(r===_())break;r=I(r,!1)}return!1}function P(e,t,n){let r=0,o=0,i=e.children;for(;o * @author owenm * @license MIT */let Z=function(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{evt:a}=i,c=n(i,t);G.pluginEvent.bind(Ue)(e,r,o({dragEl:Y,parentEl:X,ghostEl:J,rootEl:Q,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:re,dragStarted:ge,putSortable:le,activeSortable:Ue.active,originalEvent:a,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:ce,hideGhostForTarget:Fe,unhideGhostForTarget:Be,cloneNowHidden(){re=!0},cloneNowShown(){re=!1},dispatchSortableEvent(e){K({sortable:r,name:e,originalEvent:a})}},c))};function K(e){q(o({putSortable:le,cloneEl:ne,targetEl:Y,rootEl:Q,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:ce},e))}let Y,X,J,Q,ee,te,ne,re,oe,ie,ae,ce,se,le,ue,pe,de,fe,me,he,ge,ve,be,ye,we,Oe=!1,_e=!1,Ee=[],Se=!1,Pe=!1,xe=[],je=!1,Ce=[];const ke="undefined"!=typeof document,Ie=l,De=a||i?"cssFloat":"float",Ne=ke&&!u&&!l&&"draggable"in document.createElement("div"),Ae=function(){if(!ke)return;if(i)return!1;let e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),Te=function(e,t){let n=y(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=P(e,0,t),i=P(e,1,t),a=o&&y(o),c=i&&y(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+E(o).width,l=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+E(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){let e="left"===a.float?"left":"right";return!i||"both"!==c.clear&&c.clear!==e?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[De]||i&&"none"===n[De]&&s+l>r)?"vertical":"horizontal"},Re=function(e,t,n){let r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,c=n?t.right:t.bottom,s=n?t.width:t.height;return r===a||o===c||r+i/2===a+s/2},Me=function(e,t){let n;return Ee.some((function(r){if(x(r))return;let o=E(r),i=r[z].options.emptyInsertThreshold,a=e>=o.left-i&&e<=o.right+i,c=t>=o.top-i&&t<=o.bottom+i;return i&&a&&c?n=r:void 0})),n},Le=function(e){function t(e,n){return function(r,o,i,a){let c=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||c))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);{let t=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===t||e.join&&e.indexOf(t)>-1}}}let n={},r=e.group;r&&"object"==typeof r||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Fe=function(){!Ae&&J&&y(J,"display","none")},Be=function(){!Ae&&J&&y(J,"display","")};ke&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);let ze=function(e){if(Y){e=e.touches?e.touches[0]:e;let t=Me(e.clientX,e.clientY);if(t){let n={};for(let t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[z]._onDragOver(n)}}},Ve=function(e){Y&&Y.parentNode[z]._isOutsideThisEl(e.target)};function Ue(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=Object.assign({},t),e[z]=this;let n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Te(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ue.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};G.initializePlugins(this,e,n);for(let e in n)!(e in t)&&(t[e]=n[e]);Le(t);for(let e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));this.nativeDraggable=!t.forceFallback&&Ne,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?d(e,"pointerdown",this._onTapStart):(d(e,"mousedown",this._onTapStart),d(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(d(e,"dragover",this),d(e,"dragenter",this)),Ee.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Object.assign(this,V())}function He(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function We(e,t,n,r,o,c,s,l){let u,p,d=e[z],f=d.options.onMove;return!window.CustomEvent||i||a?(u=document.createEvent("Event"),u.initEvent("move",!0,!0)):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=t,u.from=e,u.dragged=n,u.draggedRect=r,u.related=o||t,u.relatedRect=c||E(t),u.willInsertAfter=l,u.originalEvent=s,e.dispatchEvent(u),f&&(p=f.call(d,u,s)),p}function $e(e){e.draggable=!1}function Ge(){je=!1}function qe(e,t,n){let r=E(x(n.el,n.options.draggable));const o=10;return t?e.clientX>r.right+o||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+o}function Ze(e,t,n,r,o,i,a,c){let s=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,p=r?n.bottom:n.right,d=!1;if(!a)if(c&&yeu+l*i/2:sp-ye)return-be}else if(s>u+l*(1-o)/2&&sp-l*i/2)?s>u+l/2?1:-1:0}function Ke(e){return j(Y)=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Y&&$e(Y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){let e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?d(document,"pointermove",this._onTouchMove):d(document,t?"touchmove":"mousemove",this._onTouchMove):(d(Y,"dragend",this),d(Q,"dragstart",this._onDragStart));try{document.selection?Je((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Oe=!1,Q&&Y){Z("dragStarted",this,{evt:t}),this.nativeDraggable&&d(document,"dragover",Ve);let n=this.options;!e&&b(Y,n.dragClass,!1),b(Y,n.ghostClass,!0),Ue.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Fe();let e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;for(;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY),e!==t);)t=e;if(Y.parentNode[z]._isOutsideThisEl(e),t)do{if(t[z]){let n;if(n=t[z]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Be()}},_onTouchMove:function(e){if(ue){let t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=J&&w(J,!0),a=J&&i&&i.a,c=J&&i&&i.d,s=Ie&&we&&C(we),l=(o.clientX-ue.clientX+r.x)/(a||1)+(s?s[0]-xe[0]:0)/(a||1),u=(o.clientY-ue.clientY+r.y)/(c||1)+(s?s[1]-xe[1]:0)/(c||1);if(!Ue.active&&!Oe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(K({rootEl:X,name:"add",toEl:X,fromEl:Q,originalEvent:e}),K({sortable:this,name:"remove",toEl:X,originalEvent:e}),K({rootEl:X,name:"sort",toEl:X,fromEl:Q,originalEvent:e}),K({sortable:this,name:"sort",toEl:X,originalEvent:e})),le&&le.save()):ie!==oe&&ie>=0&&(K({sortable:this,name:"update",toEl:X,originalEvent:e}),K({sortable:this,name:"sort",toEl:X,originalEvent:e})),Ue.active?(null!=ie&&-1!==ie||(ie=oe,ce=ae),K({sortable:this,name:"end",toEl:X,originalEvent:e}),this.save()):K({sortable:this,name:"end",toEl:X,originalEvent:e})))),this._nulling()},_nulling:function(){Z("nulling",this),Q=Y=X=J=ee=ne=te=re=ue=pe=ge=ie=ce=oe=ae=ve=be=le=se=Ue.dragged=Ue.ghost=Ue.clone=Ue.active=null,Ce.forEach((function(e){e.checked=!0})),Ce.length=de=fe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Y&&(this._onDragOver(e),He(e));break;case"selectstart":e.preventDefault()}},toArray:function(){let e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;for(;r1&&(Et.forEach((function(e){r.addAnimationState({target:e,rect:xt?E(e):o}),B(e),e.fromRect=o,t.removeAnimationState(e)})),xt=!1,kt(!this.options.removeCloneOnHide,n))},dragOverCompleted(e){let{sortable:t,isOwner:n,insertion:r,activeSortable:o,parentEl:i,putSortable:a}=e,c=this.options;if(r){if(n&&o._hideClone(),Pt=!1,c.animation&&Et.length>1&&(xt||!n&&!o.options.sort&&!a)){let e=E(wt,!1,!0,!0);Et.forEach((function(t){t!==wt&&(F(t,e),i.appendChild(t))})),xt=!0}if(!n)if(xt||Dt(),Et.length>1){let e=_t;o._showClone(t),o.options.animation&&!_t&&e&&St.forEach((function(e){o.addAnimationState({target:e,rect:Ot}),e.fromRect=Ot,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture(e){let{dragRect:t,isOwner:n,activeSortable:r}=e;if(Et.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){Ot=Object.assign({},t);let e=w(wt,!0);Ot.top-=e.f,Ot.left-=e.e}},dragOverAnimationComplete(){xt&&(xt=!1,Dt())},drop(e){let{originalEvent:t,rootEl:n,parentEl:r,sortable:o,dispatchSortableEvent:i,oldIndex:a,putSortable:c}=e,s=c||this.sortable;if(!t)return;let l=this.options,u=r.children;if(!jt)if(l.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),b(wt,l.selectedClass,!~Et.indexOf(wt)),~Et.indexOf(wt))Et.splice(Et.indexOf(wt),1),bt=null,q({sortable:o,rootEl:n,name:"deselect",targetEl:wt,originalEvt:t});else{if(Et.push(wt),q({sortable:o,rootEl:n,name:"select",targetEl:wt,originalEvt:t}),t.shiftKey&&bt&&o.el.contains(bt)){let e=j(bt),r=j(wt);if(~e&&~r&&e!==r){let i,a;for(r>e?(a=e,i=r):(a=r,i=e+1);a1){let e=E(wt),t=j(wt,":not(."+this.options.selectedClass+")");if(!Pt&&l.animation&&(wt.thisAnimationDuration=null),s.captureAnimationState(),!Pt&&(l.animation&&(wt.fromRect=e,Et.forEach((function(t){if(t.thisAnimationDuration=null,t!==wt){let n=xt?E(t):e;t.fromRect=n,s.addAnimationState({target:t,rect:n})}}))),Dt(),Et.forEach((function(e){u[t]?r.insertBefore(e,u[t]):r.appendChild(e),t++})),a===j(wt))){let e=!1;Et.forEach((function(t){t.sortableIndex===j(t)||(e=!0)})),e&&i("update")}Et.forEach((function(e){B(e)})),s.animateAll()}yt=s}(n===r||c&&"clone"!==c.lastPutMode)&&St.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},nullingGlobal(){this.isMultiDrag=jt=!1,St.length=0},destroyGlobal(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag(e){if(!(void 0!==jt&&jt||yt!==this.sortable||e&&g(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;Et.length;){let t=Et[0];b(t,this.options.selectedClass,!1),Et.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(e,{pluginName:"multiDrag",utils:{select(e){let t=e.parentNode[z];t&&t.options.multiDrag&&!~Et.indexOf(e)&&(yt&&yt!==t&&(yt.multiDrag._deselectMultiDrag(),yt=t),b(e,t.options.selectedClass,!0),Et.push(e))},deselect(e){let t=e.parentNode[z],n=Et.indexOf(e);t&&t.options.multiDrag&&~n&&(b(e,t.options.selectedClass,!1),Et.splice(n,1))}},eventProperties(){var e=this;const t=[],n=[];return Et.forEach((function(r){let o;t.push({multiDragElement:r,index:r.sortableIndex}),o=xt&&r!==wt?-1:xt?j(r,":not(."+e.options.selectedClass+")"):j(r),n.push({multiDragElement:r,index:o})})),{items:[...Et],clones:[...St],oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function kt(e,t){Et.forEach((function(n,r){let o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function It(e,t){St.forEach((function(n,r){let o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function Dt(){Et.forEach((function(e){e!==wt&&e.parentNode&&e.parentNode.removeChild(e)}))}return Ue.mount(new st),Ue.mount(mt,ft),Ue.mount(new gt),Ue.mount(new Ct),Ue}()},2565:function(e,t,n){"use strict";n.d(t,{E:function(){return c},o:function(){return a}});var r=n(2243),o=n.n(r);let i=null;const a=function(){return!!i&&i.split(":")[1]},c=function(){return i=null};wp.customize&&wp.customize.bind("ready",(function(){wp.customize.previewer.bind("ct-initiate-deep-link",(function(e){const[t,n]=e.split(":"),r=Object.values(wp.customize.section._value).find((function(e){return e.expanded()}));if(!r||r.id!==t)return i=e,void wp.customize.section(t).expand();o().trigger("ct-deep-link-start",e)}))}))},5026:function(e,t,n){n.p=ct_customizer_localizations.static_public_url+"bundle/"},5760:function(e,t,n){"use strict";n.d(t,{ZP:function(){return A},fg:function(){return D},y1:function(){return N}});var r=n(1381),o=n(8441),i=n(4184),a=n.n(i),c=n(7086),s=n(251),l=n.n(s),u=(n(5529),n(5652)),p=n(7691),d=n(2243),f=n.n(d);const m=["__changed"];function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(e=v({scalarValue:"__empty__",responsiveValue:"__empty__",device:"desktop",devices:["desktop","tablet","mobile"]},e),"__empty__"===e.scalarValue)throw new Error("Scalar value is required");if("__empty__"===e.responsiveValue)throw new Error("Responsive value is required");e.devices.includes(e.device)||(e.device=e.devices[e.devices.length-1]);const t=e.responsiveValue,{__changed:n=[]}=t,r=h(t,m);let o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=v({changedKeys:[],device:"desktop",devices:["desktop","tablet","mobile"]},e);const t=e.devices.slice(e.devices.indexOf(e.device));return t.map((function(n,r){let o=t[Math.max(...[t[0],...e.changedKeys].map((function(e){return t.indexOf(e)})).filter((function(e){return e<=r})))];return{device:n,leader:o}})).filter((function(t){let{leader:n}=t;return n===e.device})).map((function(e){let{device:t}=e;return t}))}({changedKeys:n,device:e.device,devices:e.devices}),i=v(v({},r),o.reduce((function(t,n){return v(v({},t),{},{[n]:e.scalarValue})}),{}));const a=[...n,...e.device!==e.devices[0]?[e.device]:[]];return a.length>0&&(i.__changed=[...new Set(a)]),i},w=["className"],O=["wrapperAttr"],_=["className"];function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1&&C.keys()[t]},I=function(e){let{option:t}=e;return(0,r.createElement)("div",null,"Unimplemented option: ",t.type)},D=function(e){const t={};return f().trigger("blocksy:options:register",t),k(e.type)?C(k(e.type)).default:t[e.type]?t[e.type]:I},N=function(e){let{option:t,value:n}=e;return void 0===n?t.value:n};var A=function(e){let{option:t,value:n,values:i,onChange:s,onChangeFor:d,hasRevertButton:m,id:h,purpose:g}=e;const[v,b]=(0,r.useState)(null);let P=null;const j=(0,r.useRef)(null);wp.data&&wp.data.useSelect&&(P=wp.data.useSelect((function(e){return e("core/edit-post")?e("core/edit-post").__experimentalGetPreviewDeviceType():null})));const C=function(){return wp.customize&&wp.customize.previewedDevice?wp.customize.previewedDevice():wp.data&&wp.data.select&&wp.data.select("core/edit-post")&&wp.data.select("core/edit-post").__experimentalGetPreviewDeviceType?wp.data.select("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase():"desktop"},[k,I]=(0,r.useState)(C()),A=function(){I(C())},T=function(e){let{device:t}=e;I(t)},R=function(e){f().trigger("ct:options:device:update",{device:e}),I(e),wp.customize&&wp.customize.previewedDevice.set(e),wp.data&&wp.data.dispatch&&wp.data.dispatch("core/edit-post")&&wp.data.dispatch("core/edit-post").__experimentalSetPreviewDeviceType&&wp.data.dispatch("core/edit-post").__experimentalSetPreviewDeviceType(e.replace(/\w/,(function(e){return e.toUpperCase()})))};(0,r.useEffect)((function(){P&&I(P.toLowerCase())}),[P]),(0,r.useEffect)((function(){if("ct-typography"===t.type||(0,c.W)(t)||t.markAsAutoFor)return wp.customize&&setTimeout((function(){return wp.customize.previewedDevice.bind(A)}),1e3),f().on("ct:options:device:update",T),I(C()),function(){("ct-typography"===t.type||(0,c.W)(t))&&(wp.customize&&wp.customize.previewedDevice.unbind(A),f().off("ct:options:device:update",T))}}),[]);let M=D(t),L={content:null,option:t};f().trigger("blocksy:options:before-option",L);const F=(0,c.T)(N({value:n,option:t}),(0,c.W)(t)),B=(0,c.W)(t,{ignoreHidden:!0})?(0,c.Oi)({option:t,value:F,device:k}):F,z=function(e){t.triggerRefreshOnChange&&wp.customize&&wp.customize.previewer&&wp.customize.previewer.refresh(),t.switchDeviceOnChange&&wp.customize&&wp.customize.previewedDevice()!==t.switchDeviceOnChange&&wp.customize.previewedDevice.set(t.switchDeviceOnChange),t.sync&&(Object.keys(t.sync).length>0||Array.isArray(t.sync))&&wp.customize&&wp.customize.previewer&&wp.customize.previewer.send("ct:sync:refresh_partial",{id:t.sync.id||t.id,option:t,shouldSkip:!!t.sync.shouldSkip}),s(e)},V=function(e){const r=(0,c.T)(N({value:n,option:t}),(0,c.W)(t));let o=e;if((0,c.W)(t,{ignoreHidden:!0})){const n="tablet"===k&&"skip"===(0,c.S0)("tablet",t.responsive);o=y(x({scalarValue:e,responsiveValue:r,device:k},n?{devices:["desktop","mobile"]}:{}))}z(o)};if(!M)return(0,r.createElement)("div",null,"Unimplemented option: ",t.type);let U={design:!0,label:!0,wrapperAttr:{}},H=function(){return null},W=null,$=function(){return null},G=function(){return{}};U=x(x({},U),M.renderingConfig||{}),t.design&&(U.design=t.design),"function"==typeof U.design&&(U.design=U.design({option:t,value:B})),M.LabelToolbar&&(H=M.LabelToolbar),M.ControlEnd&&($=M.ControlEnd),M.MetaWrapper&&(W=M.MetaWrapper),M.sectionClassName&&(G=M.sectionClassName);let q=["default"];M.supportedPurposes&&(q=M.supportedPurposes);let Z=g;t.purpose&&-1!==q.indexOf(t.purpose)&&(Z=t.purpose);let K=(0,p.m)({id:h,option:t,values:i,renderingConfig:U}),Y=(0,r.createElement)(r.Fragment,null,L&&L.content,(0,r.createElement)(M,S({key:h},x(x({},"ct-slider"===t.type?{ref:function(e){e&&(j.current=e)}}:{}),{},{liftedOptionStateDescriptor:{liftedOptionState:v,setLiftedOptionState:b},option:x(x({},t),{},{value:(0,c.W)(t,{ignoreHidden:!0})?(0,c.Oi)({device:k,option:t,value:(0,c.T)(t.value||"")}):(0,c.T)(t.value||"",(0,c.W)(t))}),value:B,id:h,values:i,onChangeFor:d,device:k,onChange:V,purpose:Z,maybeLabel:K}))));if(!U.design||"none"===U.design)return Y;const X=function(){let e=U.computeOptionValue;return e||(e=function(e){return e}),("ct-image-picker"!==t.type&&"ct-layers"!==t.type&&"ct-panel"!==t.type&&m&&!t.disableRevertButton||t.forcedRevertButton)&&(0,r.createElement)("button",{type:"button",disabled:l()(e(t.value),U.getValueForRevert?U.getValueForRevert({value:n,option:t,values:i,device:k}):N({value:n,option:t})),className:"ct-revert",onClick:function(){j&&j.current&&j.current.handleOptionRevert(),b(null),U.performRevert&&U.performRevert({onChangeFor:d}),z(t.value)}},(0,r.createElement)("svg",{fill:"currentColor",viewBox:"0 0 35 35"},(0,r.createElement)("path",{d:"M17.5,26L17.5,26C12.8,26,9,22.2,9,17.5v0C9,12.8,12.8,9,17.5,9h0c4.7,0,8.5,3.8,8.5,8.5v0C26,22.2,22.2,26,17.5,26z"}),(0,r.createElement)("polygon",{points:"34.5,30.2 21.7,17.5 34.5,4.8 30.2,0.5 17.5,13.3 4.8,0.5 0.5,4.8 13.3,17.5 0.5,30.2 4.8,34.5 17.5,21.7 30.2,34.5 "})))};let J=-1!==Object.keys(t).indexOf("desc")&&t.desc,Q=-1!==Object.keys(t).indexOf("link")&&(t.link||" ");const ee="boolean"==typeof U.design?"block":U.design;if("taxonomy"===g)return(0,r.createElement)("tr",{className:"form-field ct-term-screen-edit"},(0,r.createElement)("th",{scope:"row"},K&&(0,r.createElement)("label",null,K," ",(0,r.createElement)(X,null))),(0,r.createElement)("td",null,Y,J&&(0,r.createElement)("p",{className:"description"},J)));if("gutenberg"===g)return q.includes("gutenberg")&&"gutenberg"===Z?(0,r.createElement)(o.BaseControl,{__nextHasNoMarginBottom:!0,className:a()("ct-control-gutenberg",{[`ct-divider-${t.divider}`]:!!t.divider})},Y):(0,r.createElement)(o.BaseControl,{label:K,className:a()("ct-control-gutenberg",{[`ct-divider-${t.divider}`]:!!t.divider}),help:J?(0,r.createElement)(r.RawHTML,null,J):""},Y);if("compact"===U.design)return(0,r.createElement)("section",t.sectionAttr||{},K&&(0,r.createElement)("label",null,K),((0,c.W)(t)&&(0,c.S0)(k,t.responsive)||!(0,c.W)(t))&&Y,Q&&(0,r.createElement)("a",S({dangerouslySetInnerHTML:{__html:Q}},t.linkAttr||{})));const te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapperAttr:{className:n}={}}=e,o=E(e.wrapperAttr,w);E(e,O);const i=t.wrapperAttr||{},{className:s}=i,l=E(i,_);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",S({className:a()("ct-control",n,s,{}),"data-design":ee},t.divider?{"data-divider":t.divider}:{},x({},(0,c.W)(t)&&!(0,c.S0)(k,t.responsive)||"disabled"===t.state?{"data-state":"disabled"}:{}),x(x({},l),o)),(0,r.createElement)("header",null,K&&(0,r.createElement)("label",null,K),(0,r.createElement)(X,null),(0,r.createElement)(H,{option:t,value:B,id:h,onChange:V}),(0,c.W)(t,{ignoreHidden:!0})&&ee.indexOf("block")>-1&&!t.skipResponsiveControls&&(0,r.createElement)(c.ZP,{device:k,responsiveDescriptor:t.responsive,setDevice:R})),(0,c.W)(t)&&!(0,c.S0)(k,t.responsive)&&(0,r.createElement)("div",{className:"ct-disabled-notification"},t.disabledDeviceMessage||(0,u.__)("Option can't be edited for current device","blocksy")),((0,c.W)(t)&&(0,c.S0)(k,t.responsive)||!(0,c.W)(t))&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("section",S({},t.sectionAttr||{},{className:a()({"ct-responsive-container":(0,c.W)(t,{ignoreHidden:!0})&&"inline"===ee},G({design:ee,option:t}),(t.sectionAttr||{}).class||"")}),(0,c.W)(t,{ignoreHidden:!0})&&"inline"===ee&&(0,r.createElement)(c.ZP,{device:k,responsiveDescriptor:t.responsive,setDevice:R}),Y,Q&&(0,r.createElement)("a",S({dangerouslySetInnerHTML:{__html:Q}},t.linkAttr||{}))),(0,r.createElement)($,null),J&&(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:J},className:"ct-option-description"}))))};return W?(0,r.createElement)(W,{id:h,option:t,value:B,onChangeFor:d,values:i,getActualOption:te}):te()}},5234:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(1381),o=n(5760),i=n(5529),a=n(1429),c=n(7314);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(e){let{value:t,placeholder:n=(0,o.__)("Default","blocksy"),onChange:s,propertyToCheckAgainst:l="margin",shouldPropagateEmptyValue:u=!1,inputProps:p={}}=e,d=c(e,i);const f=(0,r.useRef)(),[m,h]=(0,r.useState)("__DEFAULT__"),{ref:g,actualInputProps:v={}}=p;return(0,r.useEffect)((function(){const e=m.indexOf("()");e>-1&&f.current.setSelectionRange(e+1,e+1)}),[m]),(0,r.createElement)("input",a({value:"__DEFAULT__"===m?t:m,type:"text",placeholder:n,onChange:function(e){let{target:{value:t}}=e;""===t&&u&&(h("__DEFAULT__"),s("")),h(t),CSS.supports(l,t)&&t.toString().length-t.toString().replaceAll("(","").length==t.toString().length-t.toString().replaceAll(")","").length&&(s(t),h("__DEFAULT__"))},ref:function(e){f.current=e,g&&"function"==typeof g&&g(e)}},v,d))}},488:function(e,t,n){"use strict";n.d(t,{Q:function(){return u}});var r=n(1381),o=n(2565),i=n(2243),a=n.n(i);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const s=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{__CT_KEYS_ORDER__:n}=e,o=c(e,r);return Object.keys(o).reduce((function(n,r){return e[r].type?e[r].options?i(i({},n),s(e[r].options,t)):e[r]["inner-options"]&&t?i(i({},n),{},{[r]:e[r]},s(e[r]["inner-options"],t)):i(i({},n),{},{[r]:e[r]}):i(i({},n),s(e[r],t))}),{})},l=function(e){return Object.keys(e).reduce((function(t,n){return i(i({},t),e[n].type?{[n]:e[n]}:"__CT_KEYS_ORDER__"===n?{[n]:e[n]}:l(e[n]))}),{})},u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=s(e,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]);return i(i({},t),Object.keys(r).reduce((function(e,o){let a=null;if(Object.keys(t).indexOf(o)>-1)("string"==typeof t[o]||function(e){return"number"==typeof e}(t[o]))&&(a=t[o]),function(e){return e instanceof Object}(t[o])&&!Array.isArray(t[o])&&(a=i({},t[o])),Array.isArray(t[o])&&(a=t[o]?t[o]:[...r[o].value||[]]);else{if(n)return i(i({},e),n(o,r[o]));a=Object.keys(r[o]).indexOf("value")>-1?r[o].value:""}return i(i({},e),{},{[o]:a})}),{}))}},1259:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});const r=function(e){let{value:t,onChange:n,blockDecimal:r=!1,handleHorizontal:o=!1}=e;return{onKeyDown:function(e){r&&("."!==e.key&&","!==e.key||e.preventDefault());let i=1;i=e.shiftKey?10*i:i,(38===e.keyCode||o&&39===e.keyCode)&&(e.preventDefault(),n(parseFloat(t)+i)),(40===e.keyCode||o&&37===e.keyCode)&&(e.preventDefault(),n(parseFloat(t)-i))}}}},4775:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});const r=function(e){return Array.isArray(e)?e:Object.keys(e).reduce((function(t,n){return[...t,{key:n,value:e[n]}]}),[])}},2932:function(e,t,n){"use strict";var r=n(1381);n(4184),n(5652);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};const a=(0,r.useRef)(),[c,s]=(0,r.useState)(null),l=function(){t&&s(Math.random())},u=function(t){if(!t.target||!t.target.classList||!t.target.classList.contains)return;let n=e||a;t.target.classList.contains("ct-modal-scroll")&&l(),n&&n.current&&!n.current.contains(t.target)&&l()};(0,r.useEffect)((function(){let t;return setTimeout((function(){l()}),500),window.addEventListener("resize",l),window.addEventListener("scroll",u,!0),n.current&&(t=new window.ResizeObserver(l),t.observe(n.current,{attributes:!0}),n.current.closest(".ct-tabs-scroll")&&t.observe(n.current.closest(".ct-tabs-scroll"),{attributes:!0}),n.current.closest(".ct-modal-scroll")&&t.observe(n.current.closest(".ct-modal-scroll"),{attributes:!0}),n.current.closest(".customize-pane-child")&&t.observe(n.current.closest(".customize-pane-child"),{attributes:!0})),(e?e.current:a.current)&&(t||(t=new window.ResizeObserver(l)),t.observe(e?e.current:a.current,{attributes:!0})),function(){window.removeEventListener("resize",l),window.removeEventListener("scroll",u,!0),t&&t.disconnect()}}),[t,a.current,e,n.current]);let{right:p,yOffset:d,position:f,otherStyles:m}=(0,r.useMemo)((function(){let r=0,i=0,c="bottom",s={};if(!t)return{yOffset:i,right:r,position:c};if(n.current){let t=n.current.getBoundingClientRect(),l=n.current.closest(".ct-select-input")?n.current.closest(".ct-select-input"):n.current,u=getComputedStyle(l,":before").content;if(i=t.top+t.height,r=window.innerWidth-t.right,document.body.classList.contains("rtl")&&(r=t.left),u.indexOf("ref-width")>-1){let e=t.width;if(u.indexOf("left")>-1&&l.previousElementSibling&&(e=document.body.classList.contains("rtl")?l.previousElementSibling.getBoundingClientRect().right-t.left:t.right-l.previousElementSibling.getBoundingClientRect().left),u.indexOf("right")>-1){let n=l.parentNode.getBoundingClientRect();document.body.classList.contains("rtl")?(r=n.left,e=t.right-n.left):(r=window.innerWidth-n.right,e=n.right-t.left)}s["--x-select-dropdown-width"]=`${e}px`}let p=e&&e.current||a.current?function(e){let{top:t,left:n,width:r,height:o}=e.getBoundingClientRect(),i=function(e){return window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map((function(e){return parseFloat(e)}))}(e);if(6==i.length){const e=i;let a=e[0]*e[3]-e[1]*e[2];return{width:r/e[0],height:o/e[3],left:(n*e[3]-t*e[2]+e[2]*e[5]-e[4]*e[3])/a,top:(-n*e[1]+t*e[0]+e[4]*e[1]-e[0]*e[5])/a}}return{top:t,left:n,width:r,height:o}}(e?e.current:a.current):{height:o};i+p.height>window.innerHeight&&t.top-15>p.height&&(c="top",i=window.innerHeight-t.bottom+t.height),i+p.height>window.innerHeight&&"bottom"===c&&(c="top",i=0)}return{yOffset:i,right:r,position:c,otherStyles:s}}),[c,t,n,n.current,e,a.current,o]);return{refreshPopover:l,styles:i({"--modal-y-offset":`${d}px`,"--modal-x-offset":`${p}px`},m),position:f,popoverProps:i({ref:e||a},f?{"data-position":f}:{})}}},6381:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(1381),o=n(5234),i=n(5652),a=n(4184),c=n.n(a),s=n(4855);function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var p=function(e){let{picker:t,currentPalette:n,onChange:o}=e;const[i,a]=(0,r.useState)("__DEFAULT__"),c=t.id,{id:s,[c]:p}=n,d=(l(n,["id",c].map(u)),"__DEFAULT__"===i?n[t.id].variable||t.variableName:i);return(0,r.createElement)("input",{type:"text",value:`var(--${d})`,onFocus:function(e){e.target.select()},readOnly:!0,onChange:function(e){}})};const d=["id"];function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t0:"number"==typeof e},u=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},p=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},d=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},f=function(e){return{r:p(e.r,0,255),g:p(e.g,0,255),b:p(e.b,0,255),a:p(e.a)}},m=function(e){return{r:u(e.r),g:u(e.g),b:u(e.b),a:u(e.a,3)}},h=/^#([0-9a-f]{3,8})$/i,g=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},v=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),c=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(c<0?c+6:c),s:i?a/i*100:0,v:i/255*100,a:o}},b=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),c=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),l=i%6;return{r:255*[r,c,a,a,s,r][l],g:255*[s,r,r,c,a,a][l],b:255*[a,a,s,r,r,c][l],a:o}},y=function(e){return{h:d(e.h),s:p(e.s,0,100),l:p(e.l,0,100),a:p(e.a)}},w=function(e){return{h:u(e.h),s:u(e.s),l:u(e.l),a:u(e.a,3)}},O=function(e){return b((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},_=function(e){return{h:(t=v(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},E=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,P=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,j={string:[[function(e){var t=h.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?u(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?u(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=P.exec(e)||x.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:f({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=E.exec(e)||S.exec(e);if(!t)return null;var n,r,o=y({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(s[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return O(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return l(t)&&l(n)&&l(r)?f({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!l(t)||!l(n)||!l(r))return null;var a=y({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return O(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!l(t)||!l(n)||!l(r))return null;var a=function(e){return{h:d(e.h),s:p(e.s,0,100),v:p(e.v,0,100),a:p(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return b(a)},"hsv"]]},C=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=m(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?g(u(255*o)):"","#"+g(t)+g(n)+g(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return m(this.rgba)},e.prototype.toRgbString=function(){return t=(e=m(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return w(_(this.rgba))},e.prototype.toHslString=function(){return t=(e=w(_(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=v(this.rgba),{h:u(e.h),s:u(e.s),v:u(e.v),a:u(e.a,3)};var e},e.prototype.invert=function(){return T({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),T(I(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),T(I(this.rgba,-e))},e.prototype.grayscale=function(){return T(I(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),T(N(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),T(N(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?T({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):u(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=_(this.rgba);return"number"==typeof e?T({h:e,s:t.s,l:t.l,a:t.a}):u(t.h)},e.prototype.isEqual=function(e){return this.toHex()===T(e).toHex()},e}(),T=function(e){return e instanceof A?e:new A(e)};const R=function(e){const t=T(e);return t.parsed?"#"===e[0]&&e.length<=7||1===t.rgba.a?e:t.toRgbString():e};var M=n(8519),L=n(4855);const F=function(e){if(-1===e.indexOf("var(--"))return e;const t=e.replace(/var\(/,"").replace(/\)/,"").trim(),n=getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim().replace(/\s/g,"");const r=document.querySelector("#customize-preview iframe");if(r&&r.contentDocument.querySelector("body")){const t=r.contentDocument.createElement("div");t.style.borderColor=e,r.contentDocument.querySelector("body").append(t);const n=r.contentWindow.getComputedStyle(t),o=n.getPropertyValue("border-color");if(o&&o!==n.getPropertyValue("color"))return t.remove(),o.trim().replace(/\s/g,"");t.remove()}return e},B=["color"];function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var W=function(e){let{option:t,picker:n,onChange:a,value:s,value:{color:l}}=e;H(e.value,B);const[u,p]=(0,r.useState)(!1),d=(0,r.useMemo)((function(){return F(l)}),[l]);return(0,r.createElement)("div",{className:"ct-gutenberg-color-picker"},(0,r.createElement)(o.ColorPicker,{color:d,enableAlpha:!0,onChange:function(e){a(V(V({},s),{},{color:R(e)}))}}),(0,r.createElement)("div",{className:"ct-option-color-value"},(0,r.createElement)(M.Z,{value:R(l),onChange:function(e){a(V(V({},s),{},{color:R(e)}))},propertyToCheckAgainst:"color"}),(0,r.createElement)(L.CopyToClipboard,{text:R(l),onCopy:function(){p(!0),setTimeout((function(){p(null)}),3e3)}},(0,r.createElement)("span",{className:c()("ct-copy-color",{copied:u}),"data-tooltip":"top"},(0,r.createElement)("svg",{width:"12",height:"12",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M20.7 7.6h-9.8c-1.8 0-3.3 1.5-3.3 3.3v9.8c0 1.8 1.5 3.3 3.3 3.3h9.8c1.8 0 3.3-1.5 3.3-3.3v-9.8c0-1.8-1.5-3.3-3.3-3.3zm1.1 13.1c0 .6-.5 1.1-1.1 1.1h-9.8c-.6 0-1.1-.5-1.1-1.1v-9.8c0-.6.5-1.1 1.1-1.1h9.8c.6 0 1.1.5 1.1 1.1v9.8zM5.5 15.3c0 .6-.5 1.1-1.1 1.1H3.3c-1.8 0-3.3-1.5-3.3-3.3V3.3C0 1.5 1.5 0 3.3 0h9.8c1.8 0 3.3 1.5 3.3 3.3v1.1c0 .6-.5 1.1-1.1 1.1-.6 0-1.1-.5-1.1-1.1V3.3c0-.6-.5-1.1-1.1-1.1H3.3c-.6 0-1.1.5-1.1 1.1v9.8c0 .6.5 1.1 1.1 1.1h1.1c.6 0 1.1.5 1.1 1.1z"})),(0,r.createElement)("i",{className:"ct-tooltip"},u?(0,i.__)("Copied","blocksy"):(0,i.__)("Copy","blocksy"))))),t.colorVariableName&&t.colorVariableName({picker:n}))},$=n(2932);function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1?{key:"",color:""}:(o.color||"").indexOf(Y(l))>-1&&a.inherit?{key:"picker"+m,color:F(m)}:(o.color||"").indexOf("var")>-1?{key:"var"+o.color,color:o.color}:{key:"color",color:o.color}}),[o,l,a,m]);let v=o.color;(o.color||"").indexOf(Y(l))>-1&&a.inherit&&(v=m);const b=(0,r.useMemo)((function(){return p.ref&&p.ref.current&&n&&function(e,t){if(!e)return;if(!t)return;let n=getComputedStyle(e),r=parseFloat(n.left);return{"--option-modal-arrow-position":(t=t.firstElementChild.getBoundingClientRect()).left+t.width/2-r-6+"px"}}(p.ref.current,n.current)}),[p.ref&&p.ref.current,n&&n.current]);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",G({tabIndex:"0",className:c()("ct-color-picker-modal",{"ct-option-modal":!d&&f},l.modalClassName),style:Z(Z({},b),u||{})},p),(0,r.createElement)(W,{onChange:function(e){return s(e)},option:l,picker:a,value:Z(Z({},o),{},{color:g.color})}),!l.predefined&&(0,r.createElement)("div",{className:"ct-color-picker-palette"},(h.current||[]).map((function(e){return(0,r.createElement)("span",{key:e,style:{background:`var(--${e})`},className:c()({active:v===`var(--${e})`}),"data-tooltip":"top",onClick:function(){return s(Z(Z({},o),{},{color:`var(--${e})`}))}},(0,r.createElement)("i",{className:"ct-tooltip"},(0,i.sprintf)((0,i.__)("Color %s","blocksy"),e.replace("theme-palette-color-",""))))})))))},J=n(4823),Q=n(3431),ee=n.n(Q),te=n(5529),ne=n(1511);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t-1){var o;const i=(t.responsive?n[t.id][r]:n[t.id])||t.value,a=e.inherit.split(":")[1];let c=(null===(o=i[a])||void 0===o?void 0:o.color)||"CT_CSS_SKIP_RULE";return c.indexOf("CT_CSS_SKIP_RULE")>-1&&(c=t.pickers.find((function(e){let{id:t}=e;return t===a})).inherit),{background:c||""}}return{background:e.inherit}}let i=Object.keys(e.inherit).reduce((function(t,r){return t||((0,te.Nj)((0,te.KY)(e.inherit[r]),"global"===e.inherit_source?Object.keys(e.inherit[r]).reduce((function(e,t){return oe(oe({},e),{},{[t]:wp.customize(t)()})}),{}):n)?r:t)}),null);return i?{background:i}:{}};var ce=function(e){let{option:t,value:n,onChange:o,picker:a,onPickingChange:s,stopTransitioning:l,onOutsideClick:u,innerRef:p,containerRef:d,modalRef:f,isTransitioning:m,isPicking:h,values:g,device:v}=e;const b=(0,r.useRef)(),{appendToBody:y=!0}=t,{refreshPopover:w,styles:O,popoverProps:_}=(0,$.Z)({contentRef:f,ref:b||{},defaultHeight:379,shouldCalculate:!t.inline_modal||y});if(t.inline_modal)return(0,r.createElement)(X,{containerRef:d,option:t,onChange:o,picker:a,value:n,inline_modal:!!t.inline_modal});let E=null;return m!==a.id&&(h||"").split(":")[0]!==a.id||(E=(0,r.createPortal)((0,r.createElement)(J.uT,{items:h,onRest:function(){return l()},config:{duration:100,easing:ee()(.25,.1,.25,1)},from:-1===(h||"").indexOf(":")?{transform:"scale3d(0.95, 0.95, 1)",opacity:0}:{opacity:1},enter:-1===(h||"").indexOf(":")?{transform:"scale3d(1, 1, 1)",opacity:1}:{opacity:1},leave:-1===(h||"").indexOf(":")?{transform:"scale3d(0.95, 0.95, 1)",opacity:0}:{opacity:1}},(function(e){return(e||"").split(":")[0]===a.id&&function(e){return(0,r.createElement)(X,{style:oe(oe({},e),y?O:{}),option:t,onChange:o,picker:a,value:n,el:b,inheritValue:a.inherit?ae(a,t,g,v).background:"",wrapperProps:y?_:{ref:f},appendToBody:y})}})),y?document.body:b.current.closest("section").parentNode)),(0,r.createElement)(ne.default,{useCapture:!1,display:"inline-block",disabled:!h,wrapperProps:{ref:function(e){b.current=e,p&&(p.current=e)}},additionalRefs:[f],onOutsideClick:function(e){b.current.closest(".ct-color-picker-container")===e.target.closest(".ct-color-picker-container")&&(e.target.closest(".ct-color-picker-single")||e.target.matches(".ct-color-picker-single"))||b.current.closest(".ct-modal-tabs-content")===e.target||u(e)},className:c()("ct-color-picker-single",{})},(0,r.createElement)("span",{tabIndex:"0"},(0,r.createElement)("span",{tabIndex:"0",className:c()({"ct-no-color":(n||{}).color===Y(t),"ct-color-inherit":(n||{color:""}).color.indexOf("INHERIT")>-1}),onClick:function(e){if(t.skipModal)return;e.stopPropagation(),w();let n=h?h.split(":")[0]===a.id?null:`${a.id}:${h.split(":")[0]}`:a.id;s(n)},"data-tooltip":"top",style:-1===((n||{}).color||"").indexOf(Y(t))?{background:F((n||{}).color)}:oe({},a.inherit&&(n||{}).color!==Y(t)?ae(a,t,g,v):{})},(0,r.createElement)("i",{className:"ct-tooltip"},function(e){let{picker:t,value:n,values:r}=e;return(n||{color:""}).color.indexOf("INHERIT")>-1?(0,i.__)("Inherited","blocksy"):t.title!==t.title.toString()?Object.keys(t.title).reduce((function(e,n){return e||((0,te.Nj)((0,te.KY)(t.title[n]),r)?n:e)}),null)||Object.keys(t.title)[0]:t.title}({picker:a,value:n,values:g})),(n||{color:""}).color.indexOf("INHERIT")>-1&&(0,r.createElement)("svg",{width:"25",height:"25",viewBox:"0 0 30 30"},(0,r.createElement)("path",{d:"M15 3c-3 0-5.7 1.1-7.8 2.9-.4.3-.5.9-.2 1.4.3.4 1 .5 1.4.2h.1C10.3 5.9 12.5 5 15 5c5.2 0 9.5 3.9 10 9h-3l4 6 4-6h-3.1C26.4 7.9 21.3 3 15 3zM4 10l-4 6h3.1c.5 6.1 5.6 11 11.9 11 3 0 5.7-1.1 7.8-2.9.4-.3.5-1 .2-1.4-.3-.4-1-.5-1.4-.2h-.1c-1.7 1.5-4 2.4-6.5 2.4-5.2 0-9.5-3.9-10-9h3L4 10z"})))),t.afterPill&&t.afterPill({picker:a}),E)}},9231:function(e,t,n){"use strict";n.r(t),n.d(t,{LayersContext:function(){return ye},default:function(){return Pe}});var r=n(1381),o=n(4184),i=n.n(o),a=n(7462);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(I)}}]),e}();function I(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function D(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var N={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},A=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 T(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function R(e,t){e.style["".concat(A,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function M(e,t){e.style["".concat(A,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function L(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function F(e,t,n){return Math.max(e,Math.min(n,t))}function B(e){return"px"===e.substr(-2)?parseFloat(e):0}function z(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function V(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function U(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 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 W(e){var t=e.lockOffset,n=e.width,r=e.height,o=t,i=t,a="px";if("string"==typeof t){var c=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);j()(null!==c,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),o=parseFloat(t),i=parseFloat(t),a=c[1]}return j()(isFinite(o)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(o=o*n/100,i=i*r/100),{x:o,y:i}}function $(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:$(e.parentNode):null}var G=27,q=32,Z=37,K=38,Y=39,X=40,J={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Q(e){return null!=e.sortableHandle}var ee=function(){function e(t,n){d(this,e),this.container=t,this.onScrollCallback=n}return h(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,c={x:0,y:0},s={x:1,y:1},l=10,u=10,p=this.container,d=p.scrollTop,f=p.scrollLeft,m=p.scrollHeight,h=p.scrollWidth,g=0===d,v=m-d-p.clientHeight==0,b=0===f,y=h-f-p.clientWidth==0;n.y>=o.y-a/2&&!v?(c.y=1,s.y=u*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!y?(c.x=1,s.x=l*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!g?(c.y=-1,s.y=u*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!b&&(c.x=-1,s.x=l*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===c.x&&0===c.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:s.x*c.x,top:s.y*c.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var te={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},ne={lift:[q],drop:[q],cancel:[G],up:[K,Z],down:[X,Y]},re={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:ne,shouldCancelStart:function(e){return-1!==[J.Input,J.Textarea,J.Select,J.Option,J.Button].indexOf(e.target.tagName)||!!L(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},oe=Object.keys(te);var ie={index:S().number.isRequired,collection:S().oneOfType([S().number,S().string]),disabled:S().bool},ae=Object.keys(ie);var ce=n(454),se=n.n(ce),le=n(5652),ue=n(5234),pe=n(7686),de=n(1496),fe=n.n(de);function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return d(this,n),b(this,y(n).apply(this,arguments))}return O(n,t),h(n,[{key:"componentDidMount",value:function(){(0,P.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return j()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return(0,_.createElement)(e,(0,a.default)({ref:t},this.props))}}]),n}(_.Component),(0,u.Z)(t,"displayName",z("sortableHandle",e)),n}((function(e){let{items:t,onChange:n,value:o}=e;const{removeForId:i,addForId:a,option:c,toggleOptionsPanel:s}=(0,r.useContext)(ye);return(0,r.createElement)("div",{className:"ct-layer-controls"},(0,r.createElement)("button",{type:"button",className:"ct-visibility",onClick:function(e){e.stopPropagation(),n(t.map((function(e){return e.__id===o.__id?he(he({},e),{},{enabled:!he({enabled:!0},e).enabled}):e})))}},(0,r.createElement)("svg",{width:"13px",height:"13px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{className:"ct-seen",d:"m.9 13.5 1 .5s.1-.1.1-.2c.1-.2.2-.4.5-.7.4-.6 1-1.4 1.9-2.2C6 9.2 8.5 7.6 12 7.6s6 1.6 7.7 3.2c.8.8 1.5 1.6 1.9 2.2.2.3.4.5.5.7 0 .1.1.1.1.2l.9-.5.9-.5v-.1c0-.1-.1-.1-.1-.2-.1-.2-.3-.5-.5-.8-.5-.7-1.2-1.6-2.2-2.5-1.9-1.9-5-3.7-9.1-3.7S4.9 7.5 3 9.3c-1 .9-1.7 1.9-2.2 2.5-.2.3-.4.6-.5.8-.1.1-.1.2-.1.2L0 13c0 .1 0 .1.9.5zM12 17.7c2.7 0 4.8-2.2 4.8-4.8S14.7 8 12 8s-4.8 2.2-4.8 4.8 2.1 4.9 4.8 4.9z"}),(0,r.createElement)("path",{className:"ct-unseen",d:"M16.8 12.8c0 2.7-2.2 4.8-4.8 4.8-.6 0-1.2-.1-1.8-.4L15.1 9c1 1 1.7 2.3 1.7 3.8zm7.2.3c0-.1 0-.1 0 0-.1-.2-.1-.2-.2-.3-.1-.2-.3-.5-.5-.8-.5-.7-1.2-1.6-2.2-2.5-1.1-1.1-2.6-2.1-4.5-2.9l-1.1 1.8c1.7.6 3.1 1.6 4.1 2.6.8.8 1.5 1.6 1.9 2.2.2.3.4.5.5.7 0 .1.1.1.1.2l.9-.5 1-.5zM16.2 1.4l-2.5 4.3c-.5-.1-1.1-.1-1.7-.1-4.1 0-7.2 1.9-9.1 3.7-1 .9-1.7 1.9-2.2 2.5-.2.3-.4.6-.5.8-.1.1-.1.2-.1.2L0 13l.9.5 1 .5s.1-.1.1-.2c.1-.2.2-.4.5-.7.4-.6 1-1.4 1.9-2.2C6 9.2 8.5 7.6 12 7.6h.5l-.2.4H12c-2.7 0-4.8 2.2-4.8 4.8 0 .9.3 1.8.7 2.6l-3.2 5.4 1.3.7L17.5 2.1l-1.3-.7z"}))),(0,r.createElement)("div",{className:"ct-layer-label"},(0,r.createElement)("span",null,window._.template(c["preview-template"])(o))),(0,r.createElement)("button",{type:"button",className:"ct-clone","data-tooltip":"top",onClick:function(){return a(o)}},(0,r.createElement)("svg",{width:"10px",height:"10px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M23,24H7.7c-0.6,0-1-0.4-1-1V7.7c0-0.6,0.4-1,1-1H23c0.6,0,1,0.4,1,1V23C24,23.6,23.6,24,23,24z M8.7,22H22V8.7 H8.7V22z"}),(0,r.createElement)("path",{d:"M17.3,16.3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1h15.3c0.6,0,1,0.4,1,1V16.3z"})),(0,r.createElement)("i",{className:"ct-tooltip"},(0,le.__)("Clone Item","blocksy"))),(0,r.createElement)("button",{type:"button",className:"ct-remove",onClick:function(){return i(o.__id)}},(0,r.createElement)("svg",{width:"8px",height:"8px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"m12 14.7 9.3 9.3 2.7-2.7-9.3-9.3L24 2.7 21.3 0 12 9.3 2.7 0 0 2.7 9.3 12 0 21.3 2.7 24l9.3-9.3z"}))),c["inner-options"]&&(0,r.createElement)("button",{type:"button",className:"ct-toggle",onMouseDown:function(e){e.stopPropagation()},onClick:function(e){e.stopPropagation(),s(o.__id)}},(0,r.createElement)("svg",{width:"9px",height:"9px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{className:"ct-arrow-down",d:"M12 21.7 0 10.8l2.3-2.5 9.7 8.9 9.7-8.9 2.3 2.5z"}),(0,r.createElement)("path",{className:"ct-arrow-up",d:"M12 5.3 0 16.2l2.3 2.5L12 9.8l9.7 8.9 2.3-2.5z"}))))})),be=function(e){return e.map((function(e){return he(he({},e),e.__id?{}:{__id:fe()()})}))},ye=(0,r.createContext)({currentlyPickedItem:null,isDragging:!1,isOpen:!1}),{Provider:we,Consumer:Oe}=ye;class _e extends r.Component{constructor(){super(...arguments),ge(this,"state",{isOpen:!1})}render(){const{value:e,items:t,onChange:n}=this.props;return(0,r.createElement)(Oe,null,(function(o){let{option:a,isDragging:c,isOpen:s,parentValue:l}=o;return(0,r.createElement)("li",{className:i()("ct-layer",a.itemClass,{"ct-disabled":!he({enabled:!0},e).enabled,"ct-active":s===e.__id&&(!c||c&&c!==s)})},(0,r.createElement)(ve,{items:t,onChange:n,value:e}),s===e.__id&&(!c||c&&c!==s)&&(0,r.createElement)("div",{className:"ct-layer-content"},(0,r.createElement)(ue.Z,{hasRevertButton:!1,parentValue:l,onChange:function(r,o){n(t.map((function(t){return t.__id===e.__id?he(he({},t),{},{[r]:o}):t})))},value:(0,pe.n6)(a["inner-options"],he(he({},a.value.filter((function(t){let{id:n}=t;return n===e.id})).length>1?a.value.filter((function(t){let{id:n}=t;return e.id===n}))[t.filter((function(t){let{id:n}=t;return n===e.id})).map((function(e){let{__id:t}=e;return t})).indexOf(e.__id)]:{}),e)),options:a["inner-options"]})))}))}}const Ee=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return d(this,n),b(this,y(n).apply(this,arguments))}return O(n,t),h(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,o=(0,P.findDOMNode)(this);o.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=o,this.ref={node:o},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return j()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return(0,_.createElement)(e,(0,a.default)({ref:t},D(this.props,ae)))}}]),n}(_.Component),(0,u.Z)(t,"displayName",z("sortableElement",e)),(0,u.Z)(t,"contextTypes",{manager:S().object.isRequired}),(0,u.Z)(t,"propTypes",ie),(0,u.Z)(t,"defaultProps",{collection:0}),n}(_e),Se=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return d(this,n),t=b(this,y(n).call(this,e)),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"state",{}),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=U(e);var i=L(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,c=i.sortableInfo,s=c.index,l=c.collection;if(c.disabled)return;if(a&&!L(e.target,Q))return;t.manager.active={collection:l,index:s},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==J.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=U(e),a={x:t.position.x-i.x,y:t.position.y-i.y},c=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(c>=o)?r&&c>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,o,l,g,v,b=f.sortableInfo.index,y=(n=f,{bottom:B((r=window.getComputedStyle(n)).marginBottom),left:B(r.marginLeft),right:B(r.marginRight),top:B(r.marginTop)}),w=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:B(t.gridColumnGap),y:B(t.gridRowGap)}:{x:0,y:0}}(t.container),O=t.scrollContainer.getBoundingClientRect(),_=a({index:b,node:f,collection:m});if(t.node=f,t.margin=y,t.gridGap=w,t.width=_.width,t.height=_.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=O,t.index=b,t.newIndex=b,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=H(f,t.container),t.initialOffset=U(h?p({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild((l="input, textarea, select, canvas, [contenteditable]",g=(o=f).querySelectorAll(l),C((v=o.cloneNode(!0)).querySelectorAll(l)).forEach((function(e,t){"file"!==e.type&&(e.value=g[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===J.Canvas&&g[t].width>0&&g[t].height>0&&e.getContext("2d").drawImage(g[t],0,0)})),v)),T(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-y.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-y.top,"px"),width:"".concat(t.width,"px")}),h&&t.helper.focus(),s&&(t.sortableGhost=f,T(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},h){var E=d?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,S=E.top,P=E.left,x=E.width,j=S+E.height,k=P+x;t.axis.x&&(t.minTranslate.x=P-t.boundingClientRect.left,t.maxTranslate.x=k-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=S-t.boundingClientRect.top,t.maxTranslate.y=j-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(d?0:O.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(d?t.contentWindow.innerWidth:O.left+O.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(d?0:O.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(d?t.contentWindow.innerHeight:O.top+O.height)-t.boundingClientRect.top-t.height/2);c&&c.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?f:t.contentWindow,h?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(N.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),N.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:b}),u&&u({node:f,index:b,collection:m,isKeySorting:h,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),h&&t.keyMove(0)},o=t.props,i=o.axis,a=o.getHelperDimensions,c=o.helperClass,s=o.hideSortableGhost,l=o.updateBeforeSortStart,u=o.onSortStart,d=o.useWindowAsScrollContainer,f=n.node,m=n.collection,h=t.manager.isKeySorting,g=function(){if("function"==typeof l){t._awaitingUpdateBeforeSortStart=!0;var n=function(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)}((function(){var t=f.sortableInfo.index;return Promise.resolve(l({collection:m,index:t,node:f,isKeySorting:h},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return g&&g.then?g.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),(0,u.Z)((0,v.Z)((0,v.Z)(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,c=i.isKeySorting,s=t.manager.getOrderedRefs();t.listenerNode&&(c?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(N.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),N.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&T(t.sortableGhost,{opacity:"",visibility:""});for(var l=0,u=s.length;lr)){t.prevIndex=i,t.newIndex=o;var a=function(e,t,n){return et?e-1:e>n&&eg?g/2:this.height/2,width:this.width>h?h/2:this.width/2},b=l&&m>this.index&&m<=u,y=l&&m=u,w={x:0,y:0},O=a[p].edgeOffset;O||(O=H(f,this.container),a[p].edgeOffset=O,l&&(a[p].boundingClientRect=V(f,o)));var _=p0&&a[p-1];_&&!_.edgeOffset&&(_.edgeOffset=H(_.node,this.container),l&&(_.boundingClientRect=V(_.node,o))),m!==this.index?(t&&M(f,t),this.axis.x?this.axis.y?y||mthis.containerBoundingRect.width-v.width&&_&&(w.x=_.edgeOffset.left-O.left,w.y=_.edgeOffset.top-O.top),null===this.newIndex&&(this.newIndex=m)):(b||m>this.index&&(c+i.left+v.width>=O.left&&s+i.top+v.height>=O.top||s+i.top+v.height>=O.top+g))&&(w.x=-(this.width+this.marginOffset.x),O.left+w.xthis.index&&c+i.left+v.width>=O.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=m):(y||mthis.index&&s+i.top+v.height>=O.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=m):(y||m0&&void 0!==arguments[0]?arguments[0]:{};s([...t||[],he(he(he({enabled:!0},(0,pe.n6)(n["inner-options"]||{},{})),e),{},{__id:fe()()})])},u=be(t);return(0,r.createElement)(we,{value:he(he({},a),{},{parentValue:i,addForId:l,option:n,removeForId:function(e){return s(be(t).filter((function(t){let{__id:n}=t;return n!==e})))},toggleOptionsPanel:function(e){t.length>0&&!t[0].__id&&s(u),c((function(t){return he(he({},t),{},{isOpen:t.isOpen!==e&&e})}))}})},(0,r.createElement)(Se,{useDragHandle:!0,distance:3,lockAxis:"y",items:u,onChange:function(e){s(e)},helperContainer:function(){return document.querySelector("#customize-theme-controls")||document.body},onSortEnd:function(e){let{oldIndex:t,newIndex:n}=e;s(se()(u,t,n)),c((function(e){return he(he({},e),{},{isDragging:!1})}))},updateBeforeSortStart:function(e){let{index:n}=e;new Promise((function(e){t.length>0&&!t[0].__id&&(wp.customize&&wp.customize.previewer&&wp.customize.previewer.send("ct:sync:refresh_partial",{shouldSkip:!0}),s(u)),c((function(e){return he(he({},e),{},{isDragging:u[n].__id})})),e()}))}}),(0,r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),l()}},(0,le.__)("Add New Item","blocksy")))}},8219:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return D}});var r=n(1381),o=n(4184),i=n.n(o),a=n(5652),c=n(5760);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t\n\t\t\t\t\t\t\t${(0,a.__)("Repeat","blocksy")}`,"repeat-y":`\n\t\t\t\t\t\t\t${(0,a.__)("Repeat Y","blocksy")}`,"repeat-x":`\n\t\t\t\t\t\t\t${(0,a.__)("Repeat X","blocksy")}`,"no-repeat":`\n\t\t\t\t\t\t\t${(0,a.__)("No Repeat","blocksy")}`}},hasRevertButton:!1,onChange:function(e){return o(m(m({},n),{},{background_repeat:e}))}}),(0,r.createElement)(c.ZP,{value:n.background_size,values:n,option:{id:"background_size",label:(0,a.__)("Background Size","blocksy"),type:"ct-radio",view:"text",design:"block",value:t.value.background_size,choices:{auto:(0,a.__)("Auto","blocksy"),cover:(0,a.__)("Cover","blocksy"),contain:(0,a.__)("Contain","blocksy")}},hasRevertButton:!1,onChange:function(e){return o(m(m({},n),{},{background_size:e}))}}),(0,r.createElement)(c.ZP,{value:n.background_attachment,values:n,option:{id:"background_size",label:(0,a.__)("Background Attachment","blocksy"),type:"ct-radio",view:"text",design:"block",value:t.value.background_attachment,choices:{scroll:(0,a.__)("Scroll","blocksy"),fixed:(0,a.__)("Fixed","blocksy"),inherit:(0,a.__)("Inherit","blocksy")}},hasRevertButton:!1,onChange:function(e){return o(m(m({},n),{},{background_attachment:e}))}}),n.background_image.url&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.ZP,{value:n.overlayColor&&-1===n.overlayColor.default.color.indexOf("CT_CSS_SKIP_RULE")?"yes":"no",values:{},option:{id:"has_overlay",label:(0,a.__)("Image Overlay","blocksy"),type:"ct-radio",view:"text",design:"block",value:"no",choices:{no:(0,a.__)("Disabled","blocksy"),yes:(0,a.__)("Enabled","blocksy")}},hasRevertButton:!1,onChange:function(e){let t=-1===n.overlayColor.default.color.indexOf("CT_CSS_SKIP_RULE");o(m(m({},n),{},{overlayColor:{default:{color:t?"CT_CSS_SKIP_RULE":"rgba(0, 0, 0, 0.2)"}}}))}}),n.overlayColor&&-1===n.overlayColor.default.color.indexOf("CT_CSS_SKIP_RULE")&&(0,r.createElement)(c.ZP,{value:n.overlayColor,values:n,option:{id:"overlayColor",label:(0,a.__)("Image Overlay Color","blocksy"),type:"ct-color-picker",design:"inline",value:t.value.overlayColor,pickers:[{title:(0,a.__)("Initial","blocksy"),id:"default"}],skipArrow:!0,appendToBody:!1},hasRevertButton:!1,onChange:function(e){return o(m(m({},n),{},{overlayColor:e}))}})))},v=n(8441);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t-1?{}:{backgroundColor:n.backgroundColor.default.color}),{},{"--background-position":`${Math.round(100*parseFloat(n.background_image.x))}% ${Math.round(100*parseFloat(n.background_image.y))}%`,"--pattern-mask":"pattern"===n.background_type?`url(${v=n.background_pattern,(window.ct_localizations||ct_customizer_localizations).static_public_url+`images/${p.find((function(e){return e.id===v})).src}`})`:"","--background-image":"gradient"===n.background_type?n.gradient:n.background_image.url?`${n.overlayColor&&-1===n.overlayColor.default.color.indexOf("CT_CSS_SKIP_RULE")?`linear-gradient(${n.overlayColor.default.color}, ${n.overlayColor.default.color}), `:""}url(${n.background_image.url})`:"none","--pattern-color":n.patternColor.default.color})},(0,r.createElement)("i",{className:"ct-tooltip"},{inherit:(0,a.__)("Inherited","blocksy"),no_color:(0,a.__)("No Color","blocksy"),pattern:(0,a.__)("Pattern","blocksy"),gradient:(0,a.__)("Gradient","blocksy"),color:(0,a.__)("Color","blocksy"),image:(0,a.__)("Image","blocksy")}[m?"no_color":f?"inherit":n.background_type]),f&&(0,r.createElement)("svg",{width:"25",height:"25",viewBox:"0 0 30 30"},(0,r.createElement)("path",{d:"M15 3c-3 0-5.7 1.1-7.8 2.9-.4.3-.5.9-.2 1.4.3.4 1 .5 1.4.2h.1C10.3 5.9 12.5 5 15 5c5.2 0 9.5 3.9 10 9h-3l4 6 4-6h-3.1C26.4 7.9 21.3 3 15 3zM4 10l-4 6h3.1c.5 6.1 5.6 11 11.9 11 3 0 5.7-1.1 7.8-2.9.4-.3.5-1 .2-1.4-.3-.4-1-.5-1.4-.2h-.1c-1.7 1.5-4 2.4-6.5 2.4-5.2 0-9.5-3.9-10-9h3L4 10z"}))),d&&d.current&&(0,r.createPortal)((0,r.createElement)(x.default,{useCapture:!1,display:"block",disabled:!c||l,onOutsideClick:function(e){e.target.closest(".components-popover")||setTimeout((function(){return s(!1)}))},wrapperProps:k(k({style:h},g),{},{className:i()("ct-option-modal ct-background-modal",{active:c})})},(0,r.createElement)(P,{onChange:o,value:n,option:t,isOpen:c,setOutsideClickFreezed:u})),document.body));var v}},9847:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(1511),i=n(4184),a=n.n(i),c=n(4910),s=n(5652);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t-1?{inherit:!1}:{})),p(!1)},"data-style":e},"none"===e?(0,s.__)("None","blocksy"):null)})))),"none"!==t.style&&!t.inherit&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.default,{onChange:function(e){return i(u(u({},t),{},{color:e.default}))},option:{pickers:[{id:"default",title:(0,s.__)("Initial","blocksy")}]},value:{default:t.color}}),n.secondColor&&(0,r.createElement)(c.default,{onChange:function(e){return i(u(u({},t),{},{secondColor:e.default}))},option:{pickers:[{id:"default",title:(0,s.__)("Hover","blocksy")}]},value:{default:t.secondColor||n.value.secondColor}})))}},2076:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var r=n(1381),o=n(1511),i=n(4184),a=n.n(i),c=n(9154),s=n(5652),l=n(4823),u=n(3431),p=n.n(u),d=n(5760),f=n(7809),m=n(2932);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){let{option:t,value:n,values:a,onChange:s}=e;(0,r.useRef)();const{palettes:u,current_palette:p}=n,d=(l(n,i),Object.keys(a.colorPalette).reduce((function(e,t){return c(c({},e),0===t.indexOf("color")?{[t]:n[t]?n[t]:a.colorPalette[t]}:{})}),{}));return(0,r.createElement)("div",{className:"ct-color-palette-preview"},(0,r.createElement)(o.Z,{currentPalette:d,option:t,onChange:function(e,t){s(t)}}))}},9727:function(e,t,n){"use strict";n.r(t),n.d(t,{ColorPalettesContext:function(){return P},default:function(){return j}});var r=n(1381),o=(n(5234),n(5652)),i=n(4184),a=n.n(i),c=n(6381);const s=["id"];function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=function(e){let{setIsEditingPalettes:t,option:n,onChange:i,value:a}=e;return(0,r.createElement)("div",{className:"ct-color-palettes-container"},n.palettes.map((function(e,u){const{id:p}=e,d=l(e,s),f=Object.keys(d).every((function(e){return d[e].color===a[e].color}));return(0,r.createElement)(c.Z,{key:e.id,option:n,currentPalette:e,isActive:f,renderBefore:function(){return(0,r.createElement)("label",null,(0,o.sprintf)((0,o.__)("Palette #%s","blocksy"),u+1))},onClick:function(){t(!1),i(d)}})})))};const p=["id"];function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=function(e){let{setIsEditingPalettes:t,option:n,onChange:i}=e;const{customPalettes:a,setCustomPalettes:s}=(0,r.useContext)(P);return(0,r.createElement)("div",{className:"ct-color-palettes-container"},(a||[]).map((function(e,l){const{id:u}=e,f=d(e,p);return(0,r.createElement)(c.Z,{key:l,option:n,currentPalette:e,hasColorRemove:!1,onClick:function(){i(f),t(!1)},renderBefore:function(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("label",null,(0,o.sprintf)((0,o.__)("Custom Palette #%s","blocksy"),l+1),(0,r.createElement)("span",{"data-tooltip":"top",onClick:function(e){e.preventDefault(),e.stopPropagation(),s(a.filter((function(e,t){return t!==l})))}},(0,r.createElement)("svg",{width:"14",height:"14",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M21.8 4.4h-4.4V3.3C17.5 1.5 16 0 14.2 0H9.8C8 0 6.5 1.5 6.5 3.3v1.1H2.2c-.6 0-1.1.5-1.1 1.1s.5 1.1 1.1 1.1h1.1v14.2c0 1.8 1.5 3.3 3.3 3.3h10.9c1.8 0 3.3-1.5 3.3-3.3V6.5h1.1c.6 0 1.1-.5 1.1-1.1s-.6-1-1.2-1zM8.7 3.3c0-.6.5-1.1 1.1-1.1h4.4c.6 0 1.1.5 1.1 1.1v1.1H8.7V3.3zm9.8 17.4c0 .6-.5 1.1-1.1 1.1H6.5c-.6 0-1.1-.5-1.1-1.1V6.5h13.1v14.2z"})),(0,r.createElement)("i",{className:"ct-tooltip"},(0,o.__)("Remove","blocksy")))))}})})),0===(a||[]).length&&(0,r.createElement)("div",{className:"ct-no-custom-palettes"},(0,o.__)("No custom palettes yet.","blocksy")))};function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&(0,r.createElement)("ul",null,[{id:"predefined",title:(0,o.__)("Predefined","blocksy")},{id:"custom",title:(0,o.__)("Custom","blocksy")}].map((function(e){let{id:t,title:n}=e;return(0,r.createElement)("li",{className:a()({active:h===t}),onClick:function(){return p(t)}},n)}))),(0,r.createElement)("div",{className:"ct-current-tab"},"predefined"===h&&(0,r.createElement)(u,{setIsEditingPalettes:t,option:n,onChange:c,value:i}),"custom"===h&&(0,r.createElement)(f,{setIsEditingPalettes:t,option:n,onChange:c,value:i})))))},g=(n(2932),n(1511),n(2329),n(3431),n(3363)),v=n(8441);const b=["palettes","current_palette"],y=["palettes","current_palette"],w=["palettes","current_palette"];function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const P=(0,r.createContext)({isEditingPalettes:!1}),x=function(e){let{option:t,value:n,onChange:o}=e;const{isEditingPalettes:i,setIsEditingPalettes:s,customPalettes:l}=(0,r.useContext)(P),{palettes:u,current_palette:p}=((0,r.useRef)(),n),d=S(n,b);return(0,r.createElement)("div",{className:"ct-color-palette-preview"},(0,r.createElement)(c.Z,{currentPalette:d,option:t,onChange:function(e,t){o(t)}}),(0,r.createElement)(g.Z,{items:i,className:a()("ct-admin-modal ct-color-palettes-modal",{"ct-no-tabs":0===(l||[]).length,"ct-has-tabs":(l||[]).length>0}),onDismiss:function(){return s(!1)},render:function(){return(0,r.createElement)(h,{onChange:function(e){o(e)},setIsEditingPalettes:s,value:d,option:t})}}))};x.MetaWrapper=function(e){let{getActualOption:t}=e;const[n,o]=(0,r.useState)(!1),[i,a]=(0,r.useState)([]);return(0,r.useEffect)((function(){fetch(`${window.ajaxurl}?action=blocksy_get_custom_palettes`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({})}).then((function(e){return e.json()})).then((function(e){e.data.palettes&&a(e.data.palettes)}))}),[]),(0,r.createElement)(P.Provider,{value:{customPalettes:i,setCustomPalettes:function(e){a(e),fetch(`${window.ajaxurl}?action=blocksy_sync_custom_palettes`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({palettes:e})}).then((function(e){return e.json()})).then((function(e){}))},isEditingPalettes:n,setIsEditingPalettes:o}},t())},x.LabelToolbar=function(e){let{option:t,value:n,onChange:i}=e;const{setIsEditingPalettes:a,customPalettes:c,setCustomPalettes:s}=(0,r.useContext)(P),l=![...t.palettes,...c||[]].find((function(e){const t=Object.keys(n).reduce((function(e,t){return _(_({},e),0===t.indexOf("color")?{[t]:n[t].color}:{})}),{}),r=Object.keys(e).reduce((function(t,n){return _(_({},t),0===n.indexOf("color")?{[n]:e[n].color}:{})}),{});return Object.keys(t).length===Object.keys(r).length&&Object.keys(t).every((function(e){return t[e]===r[e]}))}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(v.Dropdown,{contentClassName:"ct-options-popover",popoverProps:{placement:"bottom-start",offset:3},renderToggle:function(e){let{isOpen:t,onToggle:n}=e;return(0,r.createElement)("span",{className:"ct-more-options-trigger","data-tooltip":"top"},(0,r.createElement)("button",{className:"components-button components-dropdown-menu__toggle is-small has-icon",onClick:function(e){e.preventDefault(),n()}},(0,r.createElement)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},(0,r.createElement)("path",{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))),(0,r.createElement)("i",{className:"ct-tooltip"},(0,o.__)("Advanced","blocksy")))},renderContent:function(e){let{onClose:t}=e;return(0,r.createElement)("div",{className:"components-dropdown-menu__menu"},(0,r.createElement)("div",{className:"components-menu-group"},(0,r.createElement)("button",{className:"components-button components-menu-item__button",onClick:function(e){e.preventDefault(),a(!0),t()}},(0,r.createElement)("span",{className:"components-menu-item__item"},(0,o.__)("Color Palettes","blocksy"))),(0,r.createElement)("button",{className:"components-button components-menu-item__button",disabled:!l,onClick:function(e){e.preventDefault(),t();const{palettes:r,current_palette:o}=n,i=S(n,y);s([...c,i])}},(0,r.createElement)("span",{className:"components-menu-item__item"},(0,o.__)("Save Palette","blocksy")))),(0,r.createElement)("div",{className:"components-menu-group"},(0,r.createElement)("button",{className:"components-button components-menu-item__button",onClick:function(e){e.preventDefault(),t();const{palettes:r,current_palette:o}=n,a=S(n,w),c=Object.keys(a).filter((function(e){return e.indexOf("color")>-1})).map((function(e){return parseFloat(e.replace("color",""))})).sort((function(e,t){return e-t}));i(_(_({},a),{},{[`color${c[c.length-1]+1}`]:{color:"CT_CSS_SKIP_RULE"}}))}},(0,r.createElement)("span",{className:"components-menu-item__item"},(0,o.__)("Add New Color","blocksy")))))}}))};var j=x},4910:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(9154),i=n(5529);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t')}),[]),!document.querySelector(".customize-control-ct-options .ct-options-container"))return setTimeout((function(){b()}),100),null;const E=document.querySelector(".customize-control-ct-options .ct-options-container").closest("ul").querySelector(".ct-customize-section-title-actions");return E?(0,r.createPortal)((0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"ct-more-options-trigger","data-tooltip":"left"},(0,r.createElement)("button",{className:"components-button components-dropdown-menu__toggle is-small has-icon",onClick:function(e){e.preventDefault(),f(!0)}},(0,r.createElement)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},(0,r.createElement)("path",{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))),(0,r.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Advanced","blocksy"))),(0,r.createElement)(i.Z,{items:d,className:"ct-admin-modal ct-copy-options-modal",onDismiss:function(){f(!1)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content"},(0,r.createElement)("h2",{className:"ct-modal-title"},(0,a.sprintf)((0,a.__)("Copy Options","blocksy"))),(0,r.createElement)("p",null,(0,a.__)("1. Choose what set of options you want to copy:","blocksy")),(0,r.createElement)("div",{className:"ct-checkboxes-container","data-type":"grid:bordered"},O.map((function(e){let{title:t,options:n}=e;return(0,r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){v(t)},key:t},(0,r.createElement)("span",{className:u()("ct-checkbox",{active:g===t})},(0,r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),t)}))),(0,r.createElement)("p",null,(0,a.__)("2. Choose options source:","blocksy")),(0,r.createElement)(s.default,{option:{disabled:!g||!_.length,choices:_.filter((function(e){let{key:t}=e;return t!==l})).map((function(e){let{key:t,label:n,group:r}=e;return{key:t,value:n,group:r}})),search:!0,defaultToFirstItem:!1},value:m,onChange:function(e){h(e)}}),(0,r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,r.createElement)("button",{className:"button",onClick:function(e){f(!1),e.preventDefault(),h(!1)}},(0,a.__)("Cancel","blocksy")),(0,r.createElement)("button",{className:u()("button button-primary",{disabled:!m||!g}),onClick:function(){const e=O.find((function(e){let{title:t}=e;return t===g}));if(!e.options){Object.keys(wp.customize._value).filter((function(e){return 0===e.indexOf(m)})).map((function(e){const t=e.replace(m,l);wp.customize(e)&&p(t,wp.customize(e)())}))}if(e.options){Object.keys((0,c.JS)(e.options)).map((function(e){const t=e.replace(l,m);wp.customize(t)&&p(e,wp.customize(t)())}))}wp.customize&&wp.customize.previewer&&wp.customize.previewer.refresh(),f(!1),h(!1),v(!1)}},(0,a.__)("Copy","blocksy"))))}})),E):(setTimeout((function(){b()}),100),null)};p.renderingConfig={design:"none"},t.default=p},7941:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(3363),i=n(5652);t.default=function(e){let{value:t,option:n,onChange:a}=e;const[c,s]=(0,r.useState)(!1);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0)}},(0,i.__)("Reset Options","blocksy")),(0,r.createElement)(o.Z,{items:c,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return s(!1)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content"},(0,r.createElement)("h2",{className:"ct-modal-title"},(0,i.__)("Reset Settings","blocksy")),(0,r.createElement)("p",null,(0,i.__)("You are about to reset all settings to their default values, are you sure you want to continue?","blocksy")),(0,r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),s(!1)},className:"button"},(0,i.__)("Cancel","blocksy")),(0,r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),jQuery.post(ajaxurl,{wp_customize:"on",action:"ct_customizer_reset",nonce:ct_customizer_localizations.customizer_reset_none},(function(){wp.customize.state("saved").set(!0),location.reload()}))}},(0,i.__)("Confirm","blocksy"))))}}))}},5457:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(4184),i=n.n(o);const a=["class"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const l=function(e){let{option:{attr:{class:t}={}}}=e,n=s(e.option.attr,a);return(0,r.createElement)("div",c({className:i()("ct-divider",t)},n))};l.renderingConfig={design:"none"},t.default=l},5186:function(e,t,n){"use strict";n.r(t),n.d(t,{DragDropContext:function(){return Z},default:function(){return X},fetchCurrentFooter:function(){return K}});var r=n(1381),o=n(5652),i=n(4184),a=n.n(i),c=n(8269),s=n(488),l=n(8285);const u=["items","draggableId","hasPointers","className","tagName","direction","group","options","propsForItem","panelType","displayWrapper"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const g=function(e){let{item:t,index:n,panelType:o,onRemove:i,renderItem:c,onClick:s,className:u}=e;const p=ct_customizer_localizations.header_builder_data[o].find((function(e){let{id:n}=e;return n===(0,l.t_)(t)})),{builderValue:d}=(0,r.useContext)(Z);if(c)return c({item:t,itemData:p,index:n});const f=Object.keys(d.items).filter((function(e){return e.indexOf((0,l.SU)())>-1})),m=[(0,l.t_)(t),...f.filter((function(e){return(0,l.t_)(e)===(0,l.t_)(t)}))];return(0,r.createElement)("div",{"data-id":t,className:a()("ct-builder-item",u,{"ct-builder-item-not-registered":!p}),onClick:s},p&&p.config?m.length>1?`${p.config.name} ${m.indexOf(t)+1}`:p.config.name:t,(0,r.createElement)("button",{className:"ct-btn-remove",onClick:function(e){e.preventDefault(),e.stopPropagation(),i()}},(0,r.createElement)("svg",{width:"7px",height:"7px",viewBox:"0 0 10 10",fill:"currentColor"},(0,r.createElement)("path",{d:"M10,1.4L6.4,5L10,8.6L8.6,10L5,6.4L1.4,10L0,8.6L3.6,5L0,1.4L1.4,0L5,3.6L8.6,0L10,1.4z"}))))};var v=function(e){let{items:t,draggableId:n,hasPointers:o=!0,className:i,tagName:l="div",direction:p="horizontal",group:f="header_sortables",options:v={},propsForItem:b=function(e){return{}},panelType:y="footer",displayWrapper:w=!0}=e,O=h(e,u);const{isDragging:_,setIsDragging:E,onChange:S,setList:P}=(0,r.useContext)(Z),{panelsHelpers:x}=(0,r.useContext)(s.Q),j=t.map((function(e,o){return(0,r.createElement)(g,m({key:e,index:o,panelType:y,item:e,className:x.isOpenFor(`builder_panel_${e}`)?"ct-customizing":"",onClick:function(t){t.stopPropagation(),t.preventDefault(),x.open(`builder_panel_${e}`)},onRemove:function(){x.close(),P({[n]:t.filter((function(t){return t!==e}))})}},b(e)))}));return w?(0,r.createElement)(c.Z,m({options:d({delay:0,group:f,fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,filter:".ct-pointer, .ct-btn-remove",direction:p,touchStartThreshold:5,onStart:function(e){E(e.item.dataset.id),document.body.classList.add("ct-builder-dragging"),e.from&&f&&"clone"!==f.pull&&e.to.classList.add("ct-is-over")},onEnd:function(){E(!1),document.body.classList.remove("ct-builder-dragging"),[...document.querySelectorAll(".ct-panel-builder .ct-is-over")].map((function(e){return e.classList.remove("ct-is-over")}))},onMove:function(e,t){if(e.from.closest("#ct-option-header-builder-items")&&Promise.resolve().then((function(){return[...e.from.querySelectorAll(`[data-id="${e.dragged.dataset.id}"]`)].map((function(e){e.classList.remove("ct-builder-item"),e.classList.add("ct-item-in-builder")}))})),e.to){if(e.to.children&&Array.from(e.to.children).filter((function(e){return"__pointer__"!==e.dataset.id&&"__filler__"!==e.dataset.id})).length>0)return!1;[...document.querySelectorAll(".ct-panel-builder .ct-is-over")].map((function(e){return e.classList.remove("ct-is-over")})),e.to.classList.add("ct-is-over")}}},v),onChange:function(e,t,r){"available-items"!==n&&S({id:n,value:e.filter((function(e){return"__pointer__"!==e&&"__filler__"!==e}))})},tag:l,className:a()("ct-builder-items",i)},O,{"data-id":n}),"available-items"!==n&&_&&(0,r.createElement)("div",{"data-id":"__filler__",className:"ct-filler"}),o&&_&&(0,r.createElement)("div",{"data-id":"__pointer__",className:"ct-pointer"}),j):j};const b=function(e){let{bar:t,builderValue:n,direction:i="horizontal"}=e;const{panelsHelpers:a}=(0,r.useContext)(s.Q),c=n.items[t.id],l=(ct_customizer_localizations.header_builder_data.footer.find((function(e){let{id:n}=e;return n===t.id})),c?c.values:{});let u="initial";return 2===t.columns.length&&(u=l["2_columns_layout"]||{desktop:"repeat(2, 1fr)",tablet:"initial",mobile:"initial"}),3===t.columns.length&&(u=l["3_columns_layout"]||{desktop:"repeat(3, 1fr)",tablet:"initial",mobile:"initial"}),4===t.columns.length&&(u=l["4_columns_layout"]||{desktop:"repeat(4, 1fr)",tablet:"initial",mobile:"initial"}),5===t.columns.length&&(u=l["5_columns_layout"]||{desktop:"repeat(5, 1fr)",tablet:"initial",mobile:"initial"}),6===t.columns.length&&(u=l["6_columns_layout"]||{desktop:"repeat(6, 1fr)",tablet:"initial",mobile:"initial"}),u&&u.desktop&&(u=u.desktop),(0,r.createElement)("li",{className:"builder-row"},(0,r.createElement)("div",{className:"ct-row-actions",onClick:function(){return a.open(`builder_panel_${t.id}`)}},{"top-row":(0,o.__)("Top Row","blocksy"),"middle-row":(0,o.__)("Middle Row","blocksy"),"bottom-row":(0,o.__)("Bottom Row","blocksy")}[t.id]),(0,r.createElement)("ul",{className:"row-inner",style:{"--gridTemplateColummns":u}},t.columns.map((function(e,n){return(0,r.createElement)("li",{className:"builder-column",key:n},(0,r.createElement)(v,{draggableId:`${t.id}:${n}`,items:e}))}))))},y=function(e,t){for(let n in t)if(t[n]!==e[n])return!1;return!0};const w=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y,o={};return function(i){return void 0!==t&&n(o,i)||(o=i,t=(0,r.createElement)(e,Object.assign({},i))),t}}((function(e){let{builderValue:t}=e;return(0,r.createElement)("div",{className:a()("placements-builder")},(0,r.createElement)("ul",{className:"horizontal-rows"},["top-row","middle-row","bottom-row"].map((function(e){return(0,r.createElement)(b,{builderValue:t,bar:t.rows.find((function(t){let{id:n}=t;return n===e})),key:e})}))))}));var O=w,_=n(9999),E=(n(5234),n(8441)),S=n(7686);function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}));return(0,r.createElement)(v,{options:{sort:!1,filter:".ct-item-in-builder"},group:{name:"header_sortables",put:!1,pull:"clone"},draggableId:"available-items",items:[...f.map((function(e){let{id:t}=e;return t})),...h].filter((function(e){return m.some((function(t){let{id:n}=t;return n===(0,l.t_)(e)}))})).sort((function(e,t){const n=ct_customizer_localizations.header_builder_data.footer.find((function(t){let{id:n}=t;return n===(0,l.t_)(e)})),r=ct_customizer_localizations.header_builder_data.footer.find((function(e){let{id:n}=e;return n===(0,l.t_)(t)}));return n.config.name.localeCompare(r.config.name)})),hasPointers:!1,panelType:"footer",displayWrapper:i,propsForItem:function(e){return{renderItem:function(e){let{item:c,itemData:u,index:f}=e;const g=m.find((function(e){let{id:t}=e;return t===(0,l.t_)(c)})).options,v=[(0,l.t_)(c),...h.filter((function(e){return(0,l.t_)(e)===(0,l.t_)(c)}))],b=v.length>1?`${u.config.name} ${v.indexOf(c)+1}`:u.config.name,y={label:b,"inner-options":g},w=o.indexOf(c)>-1,O=`builder_panel_${c}`;return(0,r.createElement)(_.PanelMetaWrapper,P({id:O,option:y},s,{getActualOption:function(e){let{open:o,container:s}=e;return(0,r.createElement)(r.Fragment,null,d.indexOf(c)>-1&&(0,r.createElement)(_.default,{id:O,getValues:function(){let e=t.items[c];return e&&Object.keys(e.values)>5?e.values:(0,S.n6)(g,e?e.values:{})},option:y,onChangeFor:function(e,r){const o=t.items[c];n({type:"ITEM_VALUE_ON_CHANGE",payload:{id:c,optionId:e,optionValue:r,values:!o||o&&0===Object.keys(o.values).length?(0,S.n6)(g,{}):{}}})},view:"simple"}),i&&(0,r.createElement)("div",{ref:s,"data-id":c,className:a()({"ct-item-in-builder":w,"ct-builder-item":!w}),onClick:function(){p||w&&o()}},b,(0,r.createElement)(E.Slot,{name:`ColumnsBuilderSidebarItem_${f}`,fillProps:{item:c,itemInBuilder:w,itemData:u}})))}}))}}},direction:"vertical"})};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1&&(o=!0),n&&Object.keys(n.values)>5?k(k({},n.values),r?{items_per_row:r.columns.length.toString(),has_widget_areas:o?"yes":"no"}:{}):k(k({},(0,S.n6)(e.options,n?n.values:{})),r?{items_per_row:r.columns.length.toString(),has_widget_areas:o?"yes":"no"}:{})},option:o,onChangeFor:function(r,o){const i=t.items[e.id];n({type:"ITEM_VALUE_ON_CHANGE",payload:{id:e.id,optionId:r,optionValue:o,values:!i||i&&0===Object.keys(i.values).length?(0,S.n6)(e.options,{}):{}}})},view:"simple"}))}}))})))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t${(n.sections.find((function(e){let{id:n}=e;return n===t.id}))||{}).name||{"type-1":(0,o.__)("Global Footer","blocksy")}[t.id]||t.id}`)}}),(0,r.createElement)("div",{className:"ct-tabs"},(0,r.createElement)("ul",null,["items","panels"].map((function(e){return(0,r.createElement)("li",{key:e,onClick:function(t){t.preventDefault(),l(e)},className:a()({active:e===s})},{panels:(0,o.__)("Footers","blocksy"),items:(0,o.__)("Elements","blocksy")}[e])}))),(0,r.createElement)("div",{className:"ct-current-tab"},"panels"===s&&(0,r.createElement)(E.Slot,{name:"ColumnsBuilderPanelsManager"},(function(e){return 0===e.length?(0,r.createElement)(A,null):e})),(0,r.createElement)(x,{builderValue:t,builderValueDispatch:i,inlinedItemsFromBuilder:c,displayList:"items"===s}))),(0,r.createElement)(D,{builderValue:t,builderValueDispatch:i}))},R=n(1496),M=n.n(R);function L(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t-1})),i=!1,a=!1,c=[];if("BUILDER_GLOBAL_SETTING_ON_CHANGE"===t.type){const{optionId:e,optionValue:n,values:r={}}=t.payload;o=B(B({},o),{},{settings:B(B({},o.settings),{},{[e]:n})})}if("ITEM_VALUE_ON_CHANGE"===t.type){const{id:e,optionId:n,optionValue:r,values:i={}}=t.payload;a=`${e}:${n}`;let c=o.items;"top-row"!==e&&"middle-row"!==e&&"bottom-row"!==e||"items_per_row"!==n?(c[e]||(c[e]={id:e,values:{}}),o=B(B({},o),{},{items:B(B({},Array.isArray(c)?{}:c),{},{[e]:{id:e,values:B(B({},c[e].values),{},{[n]:r})}})})):o=B(B({},o),{},{rows:o.rows.map((function(t){return t.id===e?B(B({},t),{},{columns:(n=t.columns,o=parseInt(r,10),n=n.filter((function(e){return e.length>0})),Array.from(Array(o)).map((function(e,t){return Array.isArray(n[t])?n[t]:[]})))}):t;var n,o}))})}if("REMOVE_CLONED_ITEM"===t.type){let e=o.items,n=t.payload.id,{[n]:r}=e,i=L(e,[n].map(V));o=B(B({},o),{},{items:i})}if("CLONE_ITEM"===t.type){const e=(0,l.t_)(t.payload.id);let n=`${e}${(0,l.SU)()}${M()()}`;o=B(B({},o),{},{items:B(B({},o.items),{},{[n]:{id:n,values:o.items[e]&&o.items[e].values||{}}})})}if("PICK_BUILDER_SECTION"===t.type&&(i=!0,n={__forced_static_footer__:t.payload.id}),"MARK_FOOTER_AS_GLOBAL"===t.type&&(i=!0,n={__forced_static_footer__:t.payload.id,current_section:t.payload.id}),"MARK_SPECIFIC_FOOTER_AS_GLOBAL"===t.type&&(n={current_section:t.payload.id}),"SET_LIST"===t.type){i=!0;const{lists:e}=t.payload;o=B(B({},o),{},{rows:o.rows.map((function(t){let{id:n,columns:r}=t;return Object.keys(e).map((function(e){return e.split(":")[0]})).indexOf(n)>-1?{id:n,columns:r.map((function(t,r){return e[`${n}:${r}`]?e[`${n}:${r}`]:t}))}:{id:n,columns:r}}))})}if("CREATE_NEW_SECTION"===t.type){const{name:n,copy:o}=t.payload;r=[o?B(B({},e.sections.find((function(e){let{id:t}=e;return t===o}))||{}),{},{name:n,id:`ct-custom-${M()()}`}):{name:n,id:`ct-custom-${M()()}`,mode:"columns",rows:[{id:"top-row",columns:[[],[]]},{id:"middle-row",columns:[[],[],[]]},{id:"bottom-row",columns:[["copyright"]]}],items:[],settings:[]}]}"REMOVE_BUILDER_SECTION"===t.type&&c.push(t.payload.id);const s=B(B(B({},e),n),{},{__should_refresh__:i,__should_refresh_item__:a,sections:[...e.sections.map((function(e){return e.id===o.id?o:e})),...r].filter((function(e){let{id:t}=e;return-1===c.indexOf(t)}))});return s.__forced_static_header__||(s.__forced_static_header__=s.id),s},H=["__forced_static_footer__"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Z=(0,r.createContext)({}),K=function(){(e=wp.customize.previewer.container.find("iframe")[0]).document||e.contentDocument||e.contentWindow.document;var e;return wp.customize.previewer.container.find("iframe")[0].contentDocument.querySelector("footer.ct-footer")?wp.customize.previewer.container.find("iframe")[0].contentDocument.querySelector("footer.ct-footer").dataset.id:null},Y=function(e){let{value:t,option:n,onChange:i}=e;const a=(0,r.useRef)(null);null===a.current&&(a.current=(t.sections.find((function(e){let{id:t}=e;return t.indexOf(K())>-1}))||t.sections[0]).id),(0,r.useEffect)((function(){return function(){const e=wp.customize("footer_placements")(),{__forced_static_footer__:t}=e,n=q(e,H);t&&wp.customize("footer_placements")($({__should_refresh__:!0,[Math.random()]:"update"},n))}}),[]);const[c,s]=(0,r.useReducer)(U,$($({},t),a.current?{__forced_static_footer__:a.current}:{})),[l,u]=(0,r.useState)(!1),p=(0,r.useMemo)((function(){return c.sections.find((function(e){let{id:t}=e;return t===c.__forced_static_footer__}))||c.sections[0]}),[c]),[d,f]=(0,r.useState)(!1),m=p.rows.reduce((function(e,t){let{columns:n}=t;return[...e,...(n||[]).reduce((function(e,t){return[...e,...t]}),[])]}),[]),h=(0,r.useCallback)((function(e){let t=U(c,e);if("BUILDER_GLOBAL_SETTING_ON_CHANGE"===e.type&&wp.customize.previewer){const n=t.sections.find((function(e){let{id:n}=e;return n===t.__forced_static_footer__}))||t.sections[0],{optionId:r,optionValue:o,values:i={}}=e.payload;wp.customize.previewer.send("ct:footer:receive-value-update",{itemId:"global",optionId:r,optionValue:o,values:$($({},n.settings),{},{[r]:o})})}if("ITEM_VALUE_ON_CHANGE"===e.type&&wp.customize.previewer){const{id:n,optionId:r,optionValue:o,values:i={}}=e.payload,a=t.sections.find((function(e){let{id:n}=e;return n===t.__forced_static_footer__}))||t.sections[0];const c=a.items[n]||{values:{}};wp.customize.previewer.send("ct:footer:receive-value-update",{itemId:n,optionId:r,optionValue:o,values:$($($($($({},c.values),i),"top-row"===n||"middle-row"===n||"bottom-row"===n?{items_per_row:a.rows.find((function(e){let{id:t}=e;return n===t})).columns.length}:{}),"top-row"!==n&&"middle-row"!==n&&"bottom-row"!==n||"items_per_row"!==r?{}:{items_per_row:parseInt(o,10)}),{},{[r]:o})})}i(t),s(e)}),[s,i,c]),g=function(e){return h({type:"SET_LIST",onBuilderValueChange:i,payload:{lists:e}})};return(0,r.useEffect)((function(){return function(){document.querySelector(".wp-full-overlay").classList.remove("ct-builder-collapsed")}}),[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Z.Provider,{value:{isDragging:d,setIsDragging:f,setList:g,builderValueDispatch:h,builderValueCollection:c,builderValue:p,onChange:function(e){let{id:t,value:n}=e;return g({[t]:n})}}},(0,r.createElement)(T,{builderValue:p,inlinedItemsFromBuilder:m,builderValueDispatch:h,builderValueCollection:c}),(0,r.createPortal)((0,r.createElement)("div",{className:"ct-builder-footer"},(0,r.createElement)("ul",{className:"ct-view-switch"},(0,r.createElement)("li",{className:"ct-builder-toggle",onClick:function(){u(!l),l?document.querySelector(".wp-full-overlay").classList.remove("ct-builder-collapsed"):document.querySelector(".wp-full-overlay").classList.add("ct-builder-collapsed")}},l?(0,o.__)("Show Builder","blocksy"):(0,o.__)("Hide Builder","blocksy"))),(0,r.createElement)(O,{builderValue:p})),document.querySelector(".ct-panel-builder"))))};Y.renderingConfig={design:"none"};var X=Y},3962:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(2297);const i=function(e){return(0,r.createElement)(o.ZP,e)};i.renderingConfig={design:"none"},t.default=i},1650:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(4184),i=n.n(o),a=n(5529);const c=["className"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){let{option:{choices:t,tabletChoices:n,mobileChoices:o},option:l,device:p,value:f,values:m,onChange:h}=e;const g=u({},l.attr||{}),{className:v}=g,b=d(g,c);let y=l.choices;"tablet"===p&&n&&(y=n),"mobile"===p&&o&&(y=o);let w=(Array.isArray(y)?y:Object.keys(y).map((function(e){return u({key:e},y[e])}))).filter((function(e){let{key:t}=e;return!l.conditions||(!l.conditions[t]||(0,a.Nj)((0,a.KY)(l.conditions[t]),m))})),O=w.map((function(e){let{key:t}=e;return t})).includes(f)?f:l.value;return(0,r.createElement)("ul",s({},b,{className:i()("ct-image-picker",v)},(l.title,{})),w.map((function(e){return(0,r.createElement)("li",{className:i()({active:e.key===O}),"data-tooltip":"top",onClick:function(){return h(e.key)},key:e.key},-1===e.src.indexOf("1&&void 0!==arguments[1]?arguments[1]:null;return e.props.onChange(e.props.option.inline_value?t||"":d(d({},e.props.value),{},{url:e.getUrlFor(n),attachment_id:t}))})),f(this,"getAttachmentId",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.props;return t.option.inline_value?t.value:t.value.attachment_id})),f(this,"onSelect",(function(){var t=e.frame.state().get("selection").first().toJSON();(e.props.option.logo||{}).width===t.width&&(e.props.option.logo||{}).height===t.height&&!(e.props.option.logo||{}).flex_width&&!(e.props.option.logo||{}).flex_height||e.props.option.skipCrop,e.setImageFromAttachment(t),e.frame.close()})),f(this,"onCropped",(function(t){e.setImageFromAttachment(t)})),f(this,"onSkippedCrop",(function(){var t=e.frame.state().get("selection").first().toJSON();e.setImageFromAttachment(t)})),f(this,"updateAttachmentInfo",(function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.getAttachmentId();n&&(!wp.media.attachment(n).get("url")||t?wp.media.attachment(n).fetch().then((function(){return e.setState({attachment_info:JSON.parse(JSON.stringify(wp.media.attachment(n).toJSON()))})})):e.setState({attachment_info:JSON.parse(JSON.stringify(wp.media.attachment(n).toJSON()))}),e.detachListener(),wp.media.attachment(n).on("change",e.updateAttachmentInfo))}))}initFrame(){var e=this;this.frame=wp.media({button:{text:"Select",close:!1},states:[new wp.media.controller.Library({title:this.props.option.label||(0,c.__)("Select logo","blocksy"),library:wp.media.query({type:this.props.option.mediaType||"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:(this.props.option.logo||{}).width,suggestedHeight:(this.props.option.logo||{}).height}),...(this.props.option.skipCrop,[])]}),this.frame.on("select",this.onSelect,this),this.frame.on("close",(function(){e.props.option.onFrameClose&&e.props.option.onFrameClose()})),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)}openFrame(){this.initFrame(),this.frame.setState("library").open(),this.props.option.onFrameOpen&&this.props.option.onFrameOpen()}calculateImageSelectOptions(e,t){var n,r,o,i=t.get("control"),a=!!parseInt((i.props.option.logo||{}).flex_width,10),c=!!parseInt((i.props.option.logo||{}).flex_height,10),s=e.get("width"),l=e.get("height"),u=parseInt((i.props.option.logo||{}).width,10),p=parseInt((i.props.option.logo||{}).height,10),d=u/p,f=u,m=p;return s/l>d?u=(p=l)*d:p=(u=s)/d,o={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:s,imageHeight:l,minWidth:f>u?u:f,minHeight:m>p?p:m,x1:n=(s-u)/2,y1:r=(l-p)/2,x2:u+n,y2:p+r},!1===c&&!1===a&&(o.aspectRatio=u+":"+p),!0===c&&(delete o.minHeight,o.maxWidth=s),!0===a&&(delete o.minWidth,o.maxHeight=l),o}mustBeCropped(e,t,n,r,o,i){return(!0!==e||!0!==t)&&((!0!==e||r!==i)&&((!0!==t||n!==o)&&((n!==o||r!==i)&&!(o<=n))))}setImageFromAttachment(e){this.onChange(e.id,JSON.parse(JSON.stringify(wp.media.attachment(e.id).toJSON()))),this.updateAttachmentInfo()}detachListener(){this.getAttachmentId()&&wp.media.attachment(this.getAttachmentId()).off("change",this.updateAttachmentInfo)}componentDidUpdate(e){this.getAttachmentId()!==this.getAttachmentId(e)&&(wp.media.attachment(this.getAttachmentId(e)).off("change",this.updateAttachmentInfo),this.updateAttachmentInfo())}componentDidMount(){this.updateAttachmentInfo()}componentWillUnmount(){this.detachListener()}render(){var e,t,n=this;return(0,r.createElement)("div",u({className:a()("attachment-media-view ct-attachment",{landscape:this.getAttachmentId()&&this.state.attachment_info,"attachment-media-view-image":this.getAttachmentId()&&this.state.attachment_info})},this.props.option.attr||{}),this.getAttachmentId()&&this.state.attachment_info?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"thumbnail thumbnail-image",onClick:function(){return!n.props.option.has_position_picker&&n.openFrame()}},!this.props.option.has_position_picker&&(0,r.createElement)(React.Fragment,null,!this.props.option.mediaType||null!==(e=this.props.option)&&void 0!==e&&null!==(t=e.mediaType)&&void 0!==t&&t.includes("image")?(0,r.createElement)("img",{className:"attachment-thumb",src:this.getUrlFor(this.state.attachment_info),draggable:"false",alt:""}):(0,r.createElement)("p",null,this.getUrlFor(this.state.attachment_info))),this.props.option.has_position_picker&&(0,r.createElement)(o.FocalPointPicker,{url:this.getUrlFor(this.state.attachment_info),dimensions:{width:400,height:100},value:this.props.value,onChange:function(e){n.props.onChange(d(d({},n.props.value),e))}}),(0,r.createElement)("ul",{className:"actions"},(0,r.createElement)("li",null,(0,r.createElement)("button",{type:"button",className:"button edit-button control-focus",title:(0,c.__)("Edit","blocksy"),onClick:function(e){e.stopPropagation(),n.openFrame()},id:"customize-media-control-button-35"})),(0,r.createElement)("li",null,(0,r.createElement)("button",{onClick:function(e){e.stopPropagation(),n.setState({attachment_info:null}),n.onChange(null)},title:(0,c.__)("Remove","blocksy"),type:"button",className:"button remove-button"}))))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{type:"button",onClick:function(){return n.openFrame()},className:"ct-upload-button",id:"customize-media-control-button-50"},this.props.option.emptyLabel||(0,c.__)("Select logo","blocksy"))))}}},532:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(5234),i=n(9984),a=n(543),c=n(1496),s=n.n(c),l=n(7686);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t1||!p.settings[i.id])&&(0,r.createElement)("button",{type:"button",className:"ct-remove",onClick:function(){return l(i.__id)}},(0,r.createElement)("svg",{width:"8px",height:"8px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"m12 14.7 9.3 9.3 2.7-2.7-9.3-9.3L24 2.7 21.3 0 12 9.3 2.7 0 0 2.7 9.3 12 0 21.3 2.7 24l9.3-9.3z"}))),f&&(0,r.createElement)("button",{type:"button",className:"ct-toggle",onMouseDown:function(e){e.stopPropagation()},onClick:function(e){e.stopPropagation(),d(i.__id)}},(0,r.createElement)("svg",{width:"9px",height:"9px",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{className:"ct-arrow-down",d:"M12 21.7 0 10.8l2.3-2.5 9.7 8.9 9.7-8.9 2.3 2.5z"}),(0,r.createElement)("path",{className:"ct-arrow-up",d:"M12 5.3 0 16.2l2.3 2.5L12 9.8l9.7 8.9 2.3-2.5z"}))))},O=n(5234);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&g===t.__id&&(!h||h&&h!==g);return(0,r.createElement)("li",_({className:i()("ct-layer",m.itemClass,u,{"ct-disabled":!S({enabled:!0},t).enabled,"ct-active":y}),ref:s.innerRef},b),(0,r.createElement)(w,{items:n,onChange:o,value:t,parentValue:v,itemIndex:f,provided:s}),y&&(0,r.createElement)("div",{className:"ct-layer-content"},(0,r.createElement)(O.Z,{parentValue:v,onChange:function(e,r){if(m.settings[t.id].sync&&m.settings[t.id].clone){let e=n.filter((function(e){let{id:n}=e;return n===t.id})).length,r=`${m.settings[t.id].sync.id}_first`;e>1&&n.filter((function(e){let{id:n}=e;return n===t.id})).map((function(e){let{__id:t}=e;return t})).indexOf(t.__id)>0&&(r=`${m.settings[t.id].sync.id}_second`),wp.customize&&wp.customize.previewer&&wp.customize.previewer.send("ct:sync:refresh_partial",{id:r})}o(n.map((function(n){return n.__id===t.__id?S(S({},n),{},{[e]:r}):n})))},value:(0,c.n6)(m.settings[t.id].options,S(S(S({},m.value.filter((function(e){let{id:n}=e;return n===t.id})).length>1?m.value.filter((function(e){let{id:n}=e;return t.id===n}))[n.filter((function(e){let{id:n}=e;return n===t.id})).map((function(e){let{__id:t}=e;return t})).indexOf(t.__id)]:{}),t),{},{itemIndex:f})),options:m.settings[t.id].options})))},j=n(9984);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};o([...t||[],I(I(I({id:e,enabled:!0},(0,c.n6)(n.settings[e].options||{},{})),r),{},{__id:l()()})])},d=(n.manageable||n.grouped?A(t):[...A(t),...n.value.filter((function(e){let{id:n}=e;return-1===t.map((function(e){let{id:t}=e;return t})).indexOf(n)})).map((function(e){return I(I({},e),{},{__id:l()(),enabled:(null==e?void 0:e.enabled)||!1})}))]).filter((function(e){return!!n.settings[e.id]}));let f=(0,r.createElement)(M,{value:I(I({},s),{},{parentValue:i,addCurrentlySelectedItem:function(){const e=s.currentlyPickedItem||T(A(t),n)[0];u((function(e){return I(I({},e),{},{currentlyPickedItem:null})})),p(e)},addForId:function(e,t){return p(e,t)},option:n,setCurrentItem:function(e){return u((function(t){return I(I({},t),{},{currentlyPickedItem:e})}))},removeForId:function(e){return o(A(t).filter((function(t){let{__id:n}=t;return n!==e})))},toggleOptionsPanel:function(e){const r=[...t,...n.value.filter((function(e){let{id:n}=e;return-1===t.map((function(e){let{id:t}=e;return t})).indexOf(n)}))];t.length>0&&r.find((function(e){return!e.__id}))&&(wp.customize&&wp.customize.previewer&&wp.customize.previewer.send("ct:sync:refresh_partial",{shouldSkip:!0}),o(d)),u((function(t){return I(I({},t),{},{isOpen:t.isOpen!==e&&e})}))}})},n.manageable&&(0,r.createElement)(m,{value:d,option:n}),(0,r.createElement)(j.bK,{droppableId:n.id},(function(e,t){return(0,r.createElement)("ul",C({className:"ct-layers"},e.droppableProps,{ref:e.innerRef}),d.map((function(e,t){return(0,r.createElement)(j._l,{key:e.__id,draggableId:e.__id,isDragDisabled:!!n.disableDrag,index:t},(function(t,c){return(0,r.createElement)(x,{onChange:o,value:e,items:d,provided:t,snapshot:c,className:n.settings[e.id].condition&&!(0,a.Nj)((0,a.KY)(n.settings[e.id].condition),i)?"ct-hidden":""})}))})),e.placeholder)})));return n.grouped?f:(0,r.createElement)(j.Z5,{onDragEnd:function(e){e.destination&&o(N(d,e.source.index,e.destination.index))}},f)}},7454:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var r=n(1381),o=n(4184),i=n.n(o),a=n(5652),c=n(6715),s=n.n(c),l=n(5224);const u=["url","attachment_id"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=["image"];class v extends r.Component{constructor(){super(...arguments),h(this,"params",{height:250,width:250,flex_width:!0,flex_height:!0}),h(this,"state",{attachment_info:[]}),h(this,"getUrlFor",(function(e){return e?(e.width<700?e.sizes.full:s().max(s().values(1===s().keys(e.sizes).length?e.sizes:s().omit(e.sizes,"full")),(function(e){let{width:t}=e;return t}))).url||e.url:null}))}render(){var e=this;const t=(0,l.applyFilters)("blocksy.options.ct-multi-image-uploader.actions",[function(e){let{props:t,attachment:{attachment_id:n}}=e;return(0,r.createElement)("button",{title:"Remove",type:"button",className:"button remove-button",onClick:function(e){e.stopPropagation(),t.onChange(t.value.filter((function(e){return e.attachment_id!==n})))}})}]);return(0,r.createElement)("div",p({className:i()("ct-attachment-multi",{})},this.props.option.attr||{}),(0,r.createElement)(wp.mediaUtils.MediaUpload,{onSelect:function(t){const n=t.map((function(t){return{url:e.getUrlFor(t),attachment_id:t.id}}));e.props.onChange(n)},gallery:!0,allowedTypes:g,value:this.props.value.map((function(e){let{attachment_id:t}=e;return t})),multiple:!0,render:function(n){let{open:o}=n;return(0,r.createElement)(r.Fragment,null,Array.isArray(e.props.value)&&e.props.value.length>0&&(0,r.createElement)("div",{className:"ct-thumbnails-list"},e.props.value.map((function(n){let{url:i,attachment_id:a}=n,c=m(n,u);return(0,r.createElement)("div",{key:a,className:"thumbnail thumbnail-image",onClick:function(){o()}},(0,r.createElement)("img",{className:"attachment-thumb",src:i,draggable:"false",alt:""}),(0,r.createElement)("ul",{className:"actions"},t.map((function(t,n){return(0,r.createElement)("li",{key:n},t({props:e.props,attachment:f(f({},c),{},{url:i,attachment_id:a})}))}))))}))),(0,r.createElement)("button",{type:"button",className:"button edit-button control-focus",title:"Edit",onClick:function(){return o()}},(0,a.__)("Add/Edit Gallery","blocksy")))}}))}}},3570:function(e,t,n){"use strict";n.r(t);var r=n(1381);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1?"auto":t,w=n.min||0===n.min?n.min:-1/0,O=n.max||0===n.max?n.max:1/0;return(0,r.createElement)("div",u({className:c()("ct-option-number",{"ct-reached-limits":parseFloat(y)===parseInt(w)||parseFloat(y)===parseInt(O)})},o||{}),(0,r.createElement)("a",{className:c()("ct-minus",{"ct-disabled":parseFloat(y)===parseInt(w)}),onClick:function(){return h((0,s.round)((0,s.clamp)(w,O,parseFloat(y)-parseFloat(a)),d))}}),(0,r.createElement)("a",{className:c()("ct-plus",{"ct-disabled":parseFloat(y)===parseInt(O)}),onClick:function(){return h((0,s.round)((0,s.clamp)(w,O,parseFloat(y)+parseFloat(a)),d))}}),(0,r.createElement)("input",u({type:"number",value:v&&v.isEmptyInput?"":y,onBlur:function(){b({isEmptyInput:!1}),parseFloat(y)&&h((0,s.round)((0,s.clamp)(w,O,y),d))},onChange:function(e){let{target:{value:t}}=e;""!==t.toString().trim()?(b({isEmptyInput:!1}),i().isNumber(parseFloat(t))?h((0,s.round)(t,d)):parseFloat(t)?h((0,s.round)(Math.min(parseFloat(t),O),d)):h((0,s.round)(t,d))):b({isEmptyInput:!0})}},(0,l.Y)({blockDecimal:p,value:y,onChange:function(e){h((0,s.round)((0,s.clamp)(w,O,e),d))}}))))},d=n(8441);var f=function(e){let{value:t,option:n,option:{step:o=1,markAsAutoFor:a},device:c,onChange:l}=e;const u=a&&a.indexOf(c)>-1?"auto":t,p=n.min||0===n.min?n.min:-1/0,f=n.max||0===n.max?n.max:-1/0;return(0,r.createElement)(d.__experimentalNumberControl,{label:n.label,labelPosition:"top",max:f,min:p,value:u,step:o,onBlur:function(){return parseFloat(u)?l((0,s.round)((0,s.clamp)(p,f,u))):[]},onChange:function(e,t){return t&&i().isNumber(parseFloat(e))?l((0,s.round)((0,s.clamp)(p,f,e))):parseFloat(e)?l((0,s.round)(Math.min(parseFloat(e),f))):l((0,s.round)(e))}})};const m=function(e){const{purpose:t}=e;return"gutenberg"===t?(0,r.createElement)(f,e):(0,r.createElement)(p,e)};m.supportedPurposes=["default","gutenberg"];var h=m},9999:function(e,t,n){"use strict";n.r(t),n.d(t,{PanelMetaWrapper:function(){return d}});var r=n(1381),o=n(4184),i=n.n(o),a=n(3431),c=n.n(a),s=n(5234),l=n(7809),u=n(488),p=n(2329);const d=function(e){let{id:t,option:n,getActualOption:o,value:i}=e;const{panelsState:a,panelsHelpers:c,panelsDispatch:s,containerRef:l}=(0,r.useContext)(u.Q),p=t;(0,r.useEffect)((function(){if(!a.previousPanel&&c.isTransitioningFor(t))if(c.isOpenFor(t)){if(!c.getWrapperParent().querySelector(".ct-tmp-panel-wrapper")){const e=document.createElement("div");e.classList.add("ct-tmp-panel-wrapper"),c.getWrapperParent().appendChild(e)}c.getParentOptionsWrapper()&&c.getParentOptionsWrapper().classList.add("ct-panel-open");const e=l.current.closest("ul")&&l.current.closest("ul").querySelector(".customize-section-description-container h3");s({type:"PANEL_RECEIVE_TITLE",payload:{titlePrefix:e?`${e.querySelector("span").innerText} ▸ ${e.innerText.split("\n")[e.innerText.split("\n").length-1]}`:""}})}else!l.current.closest(".accordion-section-content")||l.current.closest(".accordion-section-content").classList.contains("ct-panel-open"),c.getParentOptionsWrapper()&&c.getParentOptionsWrapper().classList.remove("ct-panel-open")}),[a.previousPanel,t,c.isOpenFor(t)]),(0,r.useEffect)((function(){return function(){[...document.querySelectorAll(".ct-panel-open:not(.open)")].map((function(e){return e.classList.remove("ct-panel-open")}))}}),[]);const d="yes"===i||!0===i;return o({open:function(){return c.open(t)},wrapperAttr:{className:(n.switch?d?"ct-click-allowed":"":"ct-click-allowed")+" ct-panel",onClick:function(e){let{target:t}=e;n.switch&&!d||t.closest(".ct-tmp-panel-wrapper")||c.open(p)}}})},f=function(e){let{option:t,id:n,onChange:o,getValues:a,onChangeFor:l}=e,d=-1===Object.keys(t).indexOf("label")?(n||"").replace(/./,(function(e){return e.toUpperCase()})).replace(/\_|\-/g," "):t.label;const{panelsState:{titlePrefix:f,previousPanel:m},panelsState:h,panelsHelpers:g,containerRef:v}=(0,r.useContext)(u.Q);return v.current&&g.getWrapperParent().querySelector(".ct-tmp-panel-wrapper")?(0,r.createPortal)((0,r.createElement)(p.uT,{items:g.isOpenFor(n),from:{transform:"translateX(100%)"},enter:{transform:"translateX(0%)"},leave:m===n?{transform:"translateX(-100%)"}:{transform:"translateX(100%)"},config:function(e,t){return{duration:180,easing:c()(.645,.045,.355,1)}},onRest:function(e){g.stopTransitioning(),e?[...g.getWrapperParent().querySelectorAll(".ct-tmp-panel-wrapper")].map((function(e){setTimeout((function(){e.firstElementChild&&e.firstElementChild.removeAttribute("style")}))})):m||[...g.getWrapperParent().querySelectorAll(".ct-tmp-panel-wrapper")].map((function(e){return e.parentNode.removeChild(e)}))}},(function(e,n){return n&&(0,r.createElement)(p.q.div,{style:e,className:i()("ct-customizer-panel ct-options-container",{"ct-panel-second-level":2===h.currentLevel})},(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"customize-panel-actions"},(0,r.createElement)("button",{onClick:function(e){e.stopPropagation(),g.close()},type:"button",className:"customize-section-back"}),(0,r.createElement)("h3",null,(0,r.createElement)("span",null,f),d)),(0,r.createElement)("div",{className:"customizer-panel-content"},(0,r.createElement)(s.Z,{purpose:"customizer",onChange:function(e,t){return l(e,t)},options:t["inner-options"],value:a()}))),(2===h.currentLevel||h.secondLevelTitleLabel)&&(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"customize-panel-actions"},(0,r.createElement)("button",{onClick:function(e){e.stopPropagation(),g.close()},type:"button",className:"customize-section-back"}),(0,r.createElement)("h3",null,(0,r.createElement)("span",null,h.titlePrefix+" ▸ "+d),h.secondLevelTitleLabel)),(0,r.createElement)("div",{className:"customizer-panel-content"})))})),g.getWrapperParent().querySelector(".ct-tmp-panel-wrapper")):null},m=function(e){let{id:t,getValues:n,values:o,onChangeFor:a,option:c,value:s,view:p="normal",onChange:d}=e;const{panelsState:{isOpen:m,isTransitioning:h},panelsHelpers:g}=(0,r.useContext)(u.Q);return"simple"===p?g.isTransitioningFor(t)||g.isOpenFor(t)?(0,r.createElement)(f,{id:t,getValues:function(){return n?n():o},onChangeFor:a,option:c}):null:(0,r.createElement)("div",{className:"ct-customizer-panel-container"},(0,r.createElement)("div",{className:i()("ct-customizer-panel-option")},c.switch&&(0,r.createElement)(l.default,{value:s,onChange:d,onClick:function(e){return e.stopPropagation()},option:{behavior:c.switchBehavior||"words"}}),(0,r.createElement)("button",{type:"button"})),(g.isTransitioningFor(t)||g.isOpenFor(t))&&(0,r.createElement)(f,{id:t,getValues:function(){return n?n():o},onChangeFor:a,option:c}))};m.renderingConfig={design:"inline"},m.MetaWrapper=d,t.default=m},3781:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var r=n(1381),o=n(4184),i=n.n(o),a=n(5529);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1)&&(b.indexOf(n)>-1||u);let S="original"===n?"original":-1===n.indexOf("/")?"custom":"predefined";n.indexOf("/");const P=(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ct-ratio-content"},(0,r.createElement)("div",{className:i()("ct-ratio-picker",{reversed:E})},(0,r.createElement)("ul",{className:"ct-radio-option ct-buttons-group"},m&&(0,r.createElement)("li",{className:i()({active:"original"===S}),onClick:function(){"original"!==n&&o("original")}},(0,a.__)("Original","blocksy")),(0,r.createElement)("li",{className:i()({active:"predefined"===S}),onClick:function(){-1!==n.indexOf("/")&&"original"!==n||o("original"===t.value?"1/1":t.value)}},(0,a.__)("Predefined","blocksy")),(0,r.createElement)("li",{className:i()({active:"custom"===S}),onClick:function(){if(-1!==n.indexOf("/")||"original"===n){let[e,r]=("original"===n?"original"===t.value?"1/1":t.value:n).split("/");o(`${e}:${r}`)}}},(0,a.__)("Custom","blocksy"))),"predefined"===S&&(0,r.createElement)("div",{className:"ct-ratio-predefined"},(0,r.createElement)("ul",{className:"ct-buttons-group"},["1/1",...E?b:v].map((function(e){return(0,r.createElement)("li",{key:e,className:i()({active:e===n}),onClick:function(){return o(e)}},e)}))),(0,r.createElement)("button",{"data-tooltip":"top",onClick:function(e){if(e.preventDefault(),"1/1"===n)return void f(!E);let[t,r]=n.split("/");f(+t<+r),o(n.split("/").reverse().join("/"))}},(0,r.createElement)("span",null),(0,r.createElement)("i",{className:"ct-tooltip"},"Reverse"))),"custom"===S&&(0,r.createElement)("div",{className:"ct-ratio-custom"},(0,r.createElement)("div",{className:"ct-option-input"},(0,r.createElement)("input",{type:"text",value:n.split(":")[0],onChange:function(e){let{target:{value:t}}=e;o(`${t}:${n.split(":")[1]}`)}})),(0,r.createElement)("span",null,":"),(0,r.createElement)("div",{className:"ct-option-input"},(0,r.createElement)("input",{type:"text",value:n.split(":")[1],onChange:function(e){let{target:{value:t}}=e;o(`${n.split(":")[0]}:${t}`)}})),(0,r.createElement)("div",{className:"ct-notification",dangerouslySetInnerHTML:{__html:(0,a.sprintf)((0,a.__)("Use %sthis tool%s for calculating a custom image ratio based on your image size.","blocksy"),'',"")}})),"original"===S&&(0,r.createElement)("div",{className:"ct-ratio-original"},(0,r.createElement)("div",{className:"ct-notification"},(0,a.__)("Displays the image using the aspect ratio in which they were uploaded.","blocksy")))),t["inner-options"]&&(0,r.createElement)(d.Z,{onChange:function(e,t){s(e,t)},options:t["inner-options"],value:l})));return"inline"===h?P:(0,r.createElement)("div",{ref:y,className:i()("ct-ratio-picker-container",{})},(0,r.createElement)(c.default,{useCapture:!1,disabled:!w,className:"ct-ratio-preview",onOutsideClick:function(){w&&_({isTransitioning:!1,isPicking:!1})},wrapperProps:{onClick:function(e){e.preventDefault(),_({isTransitioning:!0,isPicking:!w})}}},n.indexOf(":")>-1&&(0,r.createElement)("span",{className:"ct-ratio-key"},(0,a.__)("Custom","blocksy")),n.indexOf("/")>-1&&(0,r.createElement)("span",{className:"ct-ratio-key"},(0,a.__)("Predefined","blocksy")),"original"===n?(0,a.__)("Original Ratio","blocksy"):n.replace("/",":"),g&&(0,r.createElement)("span",{className:"ct-width-key"},l[g])),(0,r.createElement)(p,{el:y,value:n,onChange:o,option:t,isPicking:w,isTransitioning:O,onPickingChange:function(e){_({isTransitioning:!0,isPicking:e})},stopTransitioning:function(){return _({isPicking:w,isTransitioning:!1})},renderContent:function(){return P}}))};f.ControlEnd=function(){return(0,r.createElement)("div",{className:"ct-color-modal-wrapper",onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()}})};var m=f},2425:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return te}});var r=n(1381),o=n(4184),i=n.n(o),a=n(5652),c=n(2932),s=n(4775),l=n(5697),u=n.n(l),p=n(7363);n(1726);function d(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function f(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function m(e,t){if(e.clientHeightt||i>e&&a=t&&c>=n?i-e-r:a>t&&cn?a-t+o:0}var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&j>=0&&x<=b&&P<=v&&S>=M&&x<=F&&j>=B&&P<=L)return I;var z=getComputedStyle(N),V=parseInt(z.borderLeftWidth,10),U=parseInt(z.borderTopWidth,10),H=parseInt(z.borderRightWidth,10),W=parseInt(z.borderBottomWidth,10),$=0,G=0,q="offsetWidth"in N?N.offsetWidth-N.clientWidth-V-H:0,Z="offsetHeight"in N?N.offsetHeight-N.clientHeight-U-W:0,K="offsetWidth"in N?0===N.offsetWidth?0:R/N.offsetWidth:0,Y="offsetHeight"in N?0===N.offsetHeight?0:T/N.offsetHeight:0;if(p===N)$="start"===o?C:"end"===o?C-b:"nearest"===o?h(w,w+b,b,U,W,w+C,w+C+_,_):C-b/2,G="start"===i?k:"center"===i?k-v/2:"end"===i?k-v:h(y,y+v,v,V,H,y+k,y+k+E,E),$=Math.max(0,$+w),G=Math.max(0,G+y);else{$="start"===o?C-M-U:"end"===o?C-F+W+Z:"nearest"===o?h(M,F,T,U,W+Z,C,C+_,_):C-(M+T/2)+Z/2,G="start"===i?k-B-V:"center"===i?k-(B+R/2)+q/2:"end"===i?k-L+H+q:h(B,L,R,V,H+q,k,k+E,E);var X=N.scrollLeft,J=N.scrollTop;C+=J-($=Math.max(0,Math.min(J+$/Y,N.scrollHeight-T/Y+Z))),k+=X-(G=Math.max(0,Math.min(X+G/K,N.scrollWidth-R/K+q)))}I.push({el:N,top:$,left:G})}return I}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function O(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function _(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a{n=null,e(...i)}),t)}return o.cancel=r,o}function E(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function S(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function P(){return String(v++)}function x(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function j(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function C(e){return"string"==typeof e.type}function k(e){return e.props}const I=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function D(e){void 0===e&&(e={});const t={};return I.forEach((n=>{e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function N(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=A(t,r)?t[r]:e[r],n)),{})}function A(e,t){return void 0!==e[t]}function T(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function R(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const c=M(e,a,n,r,o);return-1===c?t>=n?-1:t:c}function M(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?M(1,0,n,r,!1):M(-1,n-1,n,r,!1):-1}function L(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(O(t,e,n)||r&&O(t,n.document.activeElement,n))))}const F=_((e=>{z(e).textContent=""}),500);function B(e,t){const n=z(t);e&&(n.textContent=e,F(t))}function z(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var V=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16});const U=(()=>{class e extends p.Component{constructor(e){var t;super(e),t=this,this.id=this.props.id||`downshift-${P()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(e=>`${this.id}-item-${e}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(e,t)=>{const n=setTimeout((()=>{this.timeoutIds=this.timeoutIds.filter((e=>e!==n)),e()}),t);this.timeoutIds.push(n)},this.setItemCount=e=>{this.itemCount=e},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(e,n){void 0===e&&(e=t.props.defaultHighlightedIndex),void 0===n&&(n={}),n=D(n),t.internalSetState({highlightedIndex:e,...n})},this.clearSelection=e=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},e)},this.selectItem=(e,t,n)=>{t=D(t),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:e,inputValue:this.props.itemToString(e),...t},n)},this.selectItemAtIndex=(e,t,n)=>{const r=this.items[e];null!=r&&this.selectItem(r,t,n)},this.selectHighlightedItem=(e,t)=>this.selectItemAtIndex(this.getState().highlightedIndex,e,t),this.internalSetState=(e,t)=>{let n,r;const o={},i="function"==typeof e;return!i&&e.hasOwnProperty("inputValue")&&this.props.onInputValueChange(e.inputValue,{...this.getStateAndHelpers(),...e}),this.setState((t=>{t=this.getState(t);let a=i?e(t):e;a=this.props.stateReducer(t,a),n=a.hasOwnProperty("selectedItem");const c={};return n&&a.selectedItem!==t.selectedItem&&(r=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((e=>{t[e]!==a[e]&&(o[e]=a[e]),"type"!==e&&(a[e],A(this.props,e)||(c[e]=a[e]))})),i&&a.hasOwnProperty("inputValue")&&this.props.onInputValueChange(a.inputValue,{...this.getStateAndHelpers(),...a}),c}),(()=>{b(t)();Object.keys(o).length>1&&this.props.onStateChange(o,this.getStateAndHelpers()),n&&this.props.onSelect(e.selectedItem,this.getStateAndHelpers()),void 0!==r&&this.props.onChange(r,this.getStateAndHelpers()),this.props.onUserAction(o,this.getStateAndHelpers())}))},this.rootRef=e=>this._rootNode=e,this.getRootProps=function(e,n){let{refKey:r="ref",ref:o,...i}=void 0===e?{}:e,{suppressRefError:a=!1}=void 0===n?{}:n;t.getRootProps.called=!0,t.getRootProps.refKey=r,t.getRootProps.suppressRefError=a;const{isOpen:c}=t.getState();return{[r]:S(o,t.rootRef),role:"combobox","aria-expanded":c,"aria-haspopup":"listbox","aria-owns":c?t.menuId:null,"aria-labelledby":t.labelId,...i}},this.keyDownHandlers={ArrowDown(e){if(e.preventDefault(),this.getState().isOpen){const t=e.shiftKey?5:1;this.moveHighlightedIndex(t,{type:4})}else this.internalSetState({isOpen:!0,type:4},(()=>{const e=this.getItemCount();if(e>0){const{highlightedIndex:t}=this.getState(),n=R(1,t,e,(e=>this.getItemNodeFromIndex(e)));this.setHighlightedIndex(n,{type:4})}}))},ArrowUp(e){if(e.preventDefault(),this.getState().isOpen){const t=e.shiftKey?-5:-1;this.moveHighlightedIndex(t,{type:3})}else this.internalSetState({isOpen:!0,type:3},(()=>{const e=this.getItemCount();if(e>0){const{highlightedIndex:t}=this.getState(),n=R(-1,t,e,(e=>this.getItemNodeFromIndex(e)));this.setHighlightedIndex(n,{type:3})}}))},Enter(e){if(229===e.which)return;const{isOpen:t,highlightedIndex:n}=this.getState();if(t&&null!=n){e.preventDefault();const t=this.items[n],r=this.getItemNodeFromIndex(n);if(null==t||r&&r.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape(e){e.preventDefault(),this.reset({type:5,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(e){e.preventDefault(),this.toggleMenu({type:12})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(e){const{isOpen:t}=this.getState();if(!t)return;e.preventDefault();const n=this.getItemCount();if(n<=0||!t)return;const r=M(1,0,n,(e=>this.getItemNodeFromIndex(e)),!1);this.setHighlightedIndex(r,{type:7})},End(e){const{isOpen:t}=this.getState();if(!t)return;e.preventDefault();const n=this.getItemCount();if(n<=0||!t)return;const r=M(-1,n-1,n,(e=>this.getItemNodeFromIndex(e)),!1);this.setHighlightedIndex(r,{type:8})}},this.getToggleButtonProps=function(e){let{onClick:n,onPress:r,onKeyDown:o,onKeyUp:i,onBlur:a,...c}=void 0===e?{}:e;const{isOpen:s}=t.getState(),l={onClick:E(n,t.buttonHandleClick),onKeyDown:E(o,t.buttonHandleKeyDown),onKeyUp:E(i,t.buttonHandleKeyUp),onBlur:E(a,t.buttonHandleBlur)};return{type:"button",role:"button","aria-label":s?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...c.disabled?{}:l,...c}},this.buttonHandleKeyUp=e=>{e.preventDefault()},this.buttonHandleKeyDown=e=>{const t=T(e);this.buttonKeyDownHandlers[t]&&this.buttonKeyDownHandlers[t].call(this,e)},this.buttonHandleClick=e=>{e.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&e.target.focus(),this.internalSetTimeout((()=>this.toggleMenu({type:13})))},this.buttonHandleBlur=e=>{const t=e.target;this.internalSetTimeout((()=>{this.isMouseDown||null!=this.props.environment.document.activeElement&&this.props.environment.document.activeElement.id===this.inputId||this.props.environment.document.activeElement===t||this.reset({type:14})}))},this.getLabelProps=e=>({htmlFor:this.inputId,id:this.labelId,...e}),this.getInputProps=function(e){let n,{onKeyDown:r,onBlur:o,onChange:i,onInput:a,onChangeText:c,...s}=void 0===e?{}:e,l={};n="onChange";const{inputValue:u,isOpen:p,highlightedIndex:d}=t.getState();return s.disabled||(l={onChange:E(i,a,t.inputHandleChange),onKeyDown:E(r,t.inputHandleKeyDown),onBlur:E(o,t.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof d&&d>=0?t.getItemId(d):null,"aria-controls":p?t.menuId:null,"aria-labelledby":t.labelId,autoComplete:"off",value:u,id:t.inputId,...l,...s}},this.inputHandleKeyDown=e=>{const t=T(e);t&&this.inputKeyDownHandlers[t]&&this.inputKeyDownHandlers[t].call(this,e)},this.inputHandleChange=e=>{this.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout((()=>{const e=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);this.isMouseDown||e||this.reset({type:10})}))},this.menuRef=e=>{this._menuNode=e},this.getMenuProps=function(e,n){let{refKey:r="ref",ref:o,...i}=void 0===e?{}:e,{suppressRefError:a=!1}=void 0===n?{}:n;return t.getMenuProps.called=!0,t.getMenuProps.refKey=r,t.getMenuProps.suppressRefError=a,{[r]:S(o,t.menuRef),role:"listbox","aria-labelledby":i&&i["aria-label"]?null:t.labelId,id:t.menuId,...i}},this.getItemProps=function(e){let{onMouseMove:n,onMouseDown:r,onClick:o,onPress:i,index:a,item:c,...s}=void 0===e?{}:e;void 0===a?(t.items.push(c),a=t.items.indexOf(c)):t.items[a]=c;const l=o,u={onMouseMove:E(n,(()=>{a!==t.getState().highlightedIndex&&(t.setHighlightedIndex(a,{type:2}),t.avoidScrolling=!0,t.internalSetTimeout((()=>t.avoidScrolling=!1),250))})),onMouseDown:E(r,(e=>{e.preventDefault()})),onClick:E(l,(()=>{t.selectItemAtIndex(a,{type:9})}))},p=s.disabled?{onMouseDown:u.onMouseDown}:u;return{id:t.getItemId(a),role:"option","aria-selected":t.getState().highlightedIndex===a,...p,...s}},this.clearItems=()=>{this.items=[]},this.reset=function(e,n){void 0===e&&(e={}),e=D(e),t.internalSetState((n=>{let{selectedItem:r}=n;return{isOpen:t.props.defaultIsOpen,highlightedIndex:t.props.defaultHighlightedIndex,inputValue:t.props.itemToString(r),...e}}),n)},this.toggleMenu=function(e,n){void 0===e&&(e={}),e=D(e),t.internalSetState((n=>{let{isOpen:r}=n;return{isOpen:!r,...r&&{highlightedIndex:t.props.defaultHighlightedIndex},...e}}),(()=>{const{isOpen:r,highlightedIndex:o}=t.getState();r&&t.getItemCount()>0&&"number"==typeof o&&t.setHighlightedIndex(o,e),b(n)()}))},this.openMenu=e=>{this.internalSetState({isOpen:!0},e)},this.closeMenu=e=>{this.internalSetState({isOpen:!1},e)},this.updateStatus=_((()=>{const e=this.getState(),t=this.items[e.highlightedIndex],n=this.getItemCount(),r=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:n,highlightedItem:t,...e});this.previousResultCount=n,B(r,this.props.environment.document)}),200);const{defaultHighlightedIndex:n,initialHighlightedIndex:r=n,defaultIsOpen:o,initialIsOpen:i=o,initialInputValue:a="",initialSelectedItem:c=null}=this.props,s=this.getState({highlightedIndex:r,isOpen:i,inputValue:a,selectedItem:c});null!=s.selectedItem&&void 0===this.props.initialInputValue&&(s.inputValue=this.props.itemToString(s.selectedItem)),this.state=s}internalClearTimeouts(){this.timeoutIds.forEach((e=>{clearTimeout(e)})),this.timeoutIds=[]}getState(e){return void 0===e&&(e=this.state),N(e,this.props)}getItemCount(){let e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e}getItemNodeFromIndex(e){return this.props.environment.document.getElementById(this.getItemId(e))}scrollHighlightedItemIntoView(){{const e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)}}moveHighlightedIndex(e,t){const n=this.getItemCount(),{highlightedIndex:r}=this.getState();if(n>0){const o=R(e,r,n,(e=>this.getItemNodeFromIndex(e)));this.setHighlightedIndex(o,t)}}getStateAndHelpers(){const{highlightedIndex:e,inputValue:t,selectedItem:n,isOpen:r}=this.getState(),{itemToString:o}=this.props,{id:i}=this,{getRootProps:a,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:u,getItemProps:p,openMenu:d,closeMenu:f,toggleMenu:m,selectItem:h,selectItemAtIndex:g,selectHighlightedItem:v,setHighlightedIndex:b,clearSelection:y,clearItems:w,reset:O,setItemCount:_,unsetItemCount:E,internalSetState:S}=this;return{getRootProps:a,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:u,getItemProps:p,reset:O,openMenu:d,closeMenu:f,toggleMenu:m,selectItem:h,selectItemAtIndex:g,selectHighlightedItem:v,setHighlightedIndex:b,clearSelection:y,clearItems:w,setItemCount:_,unsetItemCount:E,setState:S,itemToString:o,id:i,highlightedIndex:e,inputValue:t,isOpen:r,selectedItem:n}}componentDidMount(){{const e=()=>{this.isMouseDown=!0},t=e=>{this.isMouseDown=!1;!L(e.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:1},(()=>this.props.onOuterClick(this.getStateAndHelpers())))},n=()=>{this.isTouchMove=!1},r=()=>{this.isTouchMove=!0},o=e=>{const t=L(e.target,[this._rootNode,this._menuNode],this.props.environment,!1);this.isTouchMove||t||!this.getState().isOpen||this.reset({type:16},(()=>this.props.onOuterClick(this.getStateAndHelpers())))},{environment:i}=this.props;i.addEventListener("mousedown",e),i.addEventListener("mouseup",t),i.addEventListener("touchstart",n),i.addEventListener("touchmove",r),i.addEventListener("touchend",o),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),i.removeEventListener("mousedown",e),i.removeEventListener("mouseup",t),i.removeEventListener("touchstart",n),i.removeEventListener("touchmove",r),i.removeEventListener("touchend",o)}}}shouldScroll(e,t){const{highlightedIndex:n}=void 0===this.props.highlightedIndex?this.getState():this.props,{highlightedIndex:r}=void 0===t.highlightedIndex?e:t;return n&&this.getState().isOpen&&!e.isOpen||n!==r}componentDidUpdate(e,t){A(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const e=j(this.props.children,y);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const t=j(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:C(t)?(0,p.cloneElement)(t,this.getRootProps(k(t))):void 0:null}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:x,itemToString:e=>null==e?"":String(e),onStateChange:y,onInputValueChange:y,onUserAction:y,onChange:y,onSelect:y,onOuterClick:y,selectedItemChanged:(e,t)=>e!==t,environment:"undefined"==typeof window?{}:window,stateReducer:(e,t)=>t,suppressRefError:!1,scrollIntoView:w},e.stateChangeTypes=V,e})();var H=U;_(((e,t)=>{B(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?p.useLayoutEffect:p.useEffect;const W={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:w,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};u().array.isRequired,u().func,u().func,u().func,u().bool,u().number,u().number,u().number,u().bool,u().bool,u().bool,u().any,u().any,u().any,u().string,u().string,u().string,u().func,u().string,u().func,u().func,u().func,u().func,u().func,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});g(g({},W),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}});u().array.isRequired,u().func,u().func,u().func,u().bool,u().number,u().number,u().number,u().bool,u().bool,u().bool,u().any,u().any,u().any,u().string,u().string,u().string,u().string,u().string,u().string,u().func,u().string,u().string,u().func,u().func,u().func,u().func,u().func,u().func,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});u().array,u().array,u().array,u().func,u().func,u().func,u().number,u().number,u().number,u().func,u().func,u().string,u().string,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t .ct-select-dropdown.ct-fixed .ct-select-dropdown-item.selected"):E.current.closest(".ct-select-input").querySelector(".ct-select-dropdown .ct-select-dropdown-item.selected"),e){let t=e.parentNode.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.parentNode.scrollTop=n-t}})),setTimeout((function(){P(Math.round())}),50),h&&_({inputValue:""})},ref:E,disabled:!!o.disabled}),{placeholder:h&&l?f||(0,a.__)("Type to search...","blocksy"):d||(0,a.__)("Select value...","blocksy"),readOnly:!h||!l})),S)}))},K=n(8441);function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:1;const n=Math.pow(10,t);return Math.round(e*n+Number.EPSILON)/n};const b=function(e){let{option:t,value:n,onChange:o,is_open:i,toggleOpen:a,currentUnit:c,getNumericValue:u,forced_current_unit:p,setForcedCurrentUnit:d}=e;let f=t.units.find((function(e){let{unit:t}=e;return t===c}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{onClick:function(){return a()},className:"ct-current-value","data-unit":c||(f&&"custom"===f.type?(0,l.__)("custom","blocksy"):"")},c||(f&&"custom"===f.type?(0,l.__)("Custom","blocksy"):"―")),(0,r.createElement)(s.default,{className:"ct-units-list",onOutsideClick:function(){i&&a()}},t.units.filter((function(e){let{unit:t}=e;return t!==c})).map((function(e){let{unit:n,type:i}=e;return(0,r.createElement)("span",{key:n,"data-unit":"custom"===i?"custom":n,onClick:function(){!function(e){const n=u();let r=t.units.find((function(t){let{unit:n}=t;return n===e}));Object.keys(r).includes("min")?o(`${g(t.units.find((function(t){let{unit:n}=t;return n===e})).min,t.units.find((function(t){let{unit:n}=t;return n===e})).max,""===n?-1/0:n)}${e}`):o(`${n}${c}`),""===r.unit&&"custom"===r.type?d(""):d("__DEFAULT__")}(n),a()}},n||("custom"===i?(0,l.__)("Custom","blocksy"):"―"))}))))};class y extends r.Component{constructor(){var e;super(...arguments),e=this,h(this,"state",{is_dragging:!1,is_open:!1,is_empty_input:!1,forced_current_unit:"__DEFAULT__"}),h(this,"el",(0,r.createRef)()),h(this,"hasUnitsList",(function(){return e.props.option.units&&e.props.option.units.length>1})),h(this,"withDefault",(function(t,n){return e.props.option.units&&e.props.option.units.find((function(e){let{unit:n}=e;return n===t}))?t:t||n})),h(this,"getCurrentUnit",(function(){if("__DEFAULT__"!==e.state.forced_current_unit)return e.state.forced_current_unit;if(!e.props.option.units)return"";let t=e.props.option.units?e.props.option.units[0].unit:"";if("NaN"===e.props.value||""===e.props.value||"CT_CSS_SKIP_RULE"===e.props.value)return t;let n=e.props.value.toString().replace(/[0-9]/g,"").replace(/\-/g,"").replace(/\./g,"").replace("CT_CSS_SKIP_RULE",""),r=e.props.option.units.find((function(e){let{unit:t}=e;return t===n}));return""!==n||e.props.value.toString()!==parseFloat(e.props.value).toString()||e.props.option.units.find((function(e){let{unit:t,type:n}=e;return""===t&&!n}))?r?n:"":t})),h(this,"getMax",(function(){var t;return e.props.option.units?(null===(t=e.props.option.units.find((function(t){let{unit:n}=t;return n===e.getCurrentUnit()})))||void 0===t?void 0:t.max)||0:e.props.option.max})),h(this,"getMin",(function(){var t;return e.props.option.units?(null===(t=e.props.option.units.find((function(t){let{unit:n}=t;return n===e.getCurrentUnit()})))||void 0===t?void 0:t.min)||0:e.props.option.min})),h(this,"getNumericValue",(function(){let{forPosition:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=parseFloat(e.props.value,10);if(0===n)return n;if(!n){if(t){if(e.props.option.defaultPosition&&"center"===e.props.option.defaultPosition){let t=parseFloat(e.getMin(),10);return(parseFloat(e.getMax(),10)-t)/2+t}return parseFloat(e.getMin(),10)}return""}return n})),h(this,"handleMove",(function(t){e.state.is_dragging&&e.computeAndSendNewValue(t)})),h(this,"handleUp",(function(){e.setState({is_dragging:!1}),e.detachEvents()})),h(this,"handleFocus",(function(){e.isCustomValueInput()&&e.setState({forced_current_unit:e.getCurrentUnit()})})),h(this,"handleOptionRevert",(function(){e.setState({forced_current_unit:"__DEFAULT__"})})),h(this,"handleBlur",(function(){if(e.setState({is_empty_input:!1}),"CT_CSS_SKIP_RULE"===e.props.option.value){if("CT_CSS_SKIP_RULE"===e.props.value)return;if(""===e.getNumericValue())return void e.props.onChange("CT_CSS_SKIP_RULE")}""!==e.props.value.toString().trim()?e.props.onChange(`${g(parseFloat(e.getMin(),10),parseFloat(e.getMax(),10),parseFloat(e.getNumericValue(),10))}${e.getCurrentUnit()}`):e.props.onChange(e.props.option.value)})),h(this,"handleChange",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"CT_CSS_SKIP_RULE"!==e.props.option.value||""!==t.toString().trim()?e.isCustomValueInput()?e.props.onChange(t):""===e.props.option.value||""!==t.toString().trim()?(e.setState({is_empty_input:!1}),e.props.onChange(`${n?g(parseFloat(e.getMin(),10),parseFloat(e.getMax(),10),t):t}${e.getCurrentUnit()}`)):e.setState({is_empty_input:!0}):e.props.onChange("CT_CSS_SKIP_RULE")}))}computeAndSendNewValue(e){let{pageX:t,shiftKey:n}=e,{top:r,left:o,right:i,width:a}=this.el.current.getBoundingClientRect(),s=t-o-pageXOffset;var l,u;this.props.onChange(`${l=c()([0,a],[parseFloat(this.getMin(),10),parseFloat(this.getMax(),10)],!0)(document.body.classList.contains("rtl")?a-s:s),u=n?10:1,l=parseFloat(l),u?Math.round(l/u)*u:l}${this.getCurrentUnit()}`)}attachEvents(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)}detachEvents(){document.documentElement.removeEventListener("mousemove",this.handleMove,!0),document.documentElement.removeEventListener("mouseup",this.handleUp,!0)}getLeftValue(){return`${c()([parseFloat(this.getMin(),10),parseFloat(this.getMax(),10)],[0,100])(g(parseFloat(this.getMin(),10),parseFloat(this.getMax(),10),0===parseFloat(this.getNumericValue({forPosition:!0}),10)?0:parseFloat(this.getNumericValue({forPosition:!0}),10)?parseFloat(this.getNumericValue({forPosition:!0}),10):parseFloat(this.getMin(),10)))}`}isCustomValueInput(){if(!this.hasUnitsList())return!1;let e=this.props.option.units.find((function(e){let{unit:t}=e;return""===t}));return!!e&&(""===this.getCurrentUnit()&&""===e.unit&&"custom"===e.type)}render(){var e=this;return(0,r.createElement)("div",{className:"ct-option-slider"},this.props.beforeOption&&this.props.beforeOption(),this.isCustomValueInput()?(0,r.createElement)(u.Z,{value:this.state.is_empty_input||"NaN"===this.props.value||(this.props.value||"").toString().indexOf("CT_CSS_SKIP_RULE")>-1?"":this.props.value,inputProps:m({},this.props.option.ref?{ref:this.props.option.ref}:{}),onFocus:function(){return e.handleFocus()},onChange:function(t){e.handleChange(t)}}):(0,r.createElement)("div",d({onMouseDown:function(t){let{pageX:n,pageY:r}=t;e.attachEvents(),e.setState({is_dragging:!0})},onClick:function(t){return e.computeAndSendNewValue(t)},ref:this.el,className:"ct-slider"},this.props.option.steps?{"data-steps":""}:{}),(0,r.createElement)("div",{style:{width:`${this.getLeftValue()}%`}}),(0,r.createElement)("span",d({tabIndex:"0"},(0,p.Y)({handleHorizontal:!0,value:this.state.is_empty_input?0:this.getNumericValue({forPosition:!0}),onChange:function(t){e.props.onChange(`${g(parseFloat(e.getMin(),10),parseFloat(e.getMax(),10),t)}${e.getCurrentUnit()}`)}}),{style:{"--position":`${this.getLeftValue()}%`}})),this.props.option.steps&&(0,r.createElement)("section",{className:this.props.option.steps},(0,r.createElement)("i",{className:"minus"}),(0,r.createElement)("i",{className:"zero"}),(0,r.createElement)("i",{className:"plus"}))),!this.props.option.skipInput&&(0,r.createElement)("div",{className:i()("ct-slider-input",{"ct-value-changer":!0,"no-unit-list":!this.hasUnitsList(),active:this.state.is_open})},!this.isCustomValueInput()&&(0,r.createElement)("input",d({type:"number"},this.props.option.ref?{ref:this.props.option.ref}:{},{step:1,value:this.state.is_empty_input?"":this.getNumericValue(),onFocus:function(){return e.handleFocus()},onBlur:function(){return e.handleBlur()},onChange:function(t){let{target:{value:n}}=t;e.handleChange(n,!1)}},(0,p.Y)({value:this.state.is_empty_input?0:this.getNumericValue({forPosition:!0}),onChange:function(t){e.handleChange(t)}}))),!this.hasUnitsList()&&(0,r.createElement)("span",{className:"ct-current-value"},this.withDefault(this.getCurrentUnit(),this.props.option.defaultUnit||"px")),this.hasUnitsList()&&(0,r.createElement)(b,{option:this.props.option,value:this.props.value,onChange:this.props.onChange,is_open:this.state.is_open,forced_current_unit:this.state.forced_current_unit,setForcedCurrentUnit:function(t){e.setState({forced_current_unit:t})},toggleOpen:function(){return e.setState({is_open:!e.state.is_open})},currentUnit:this.getCurrentUnit(),getNumericValue:this.getNumericValue})))}}},3480:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(4184),i=n.n(o);const a=["class"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const l=function(e){let{option:{height:t=10,attr:{class:n}={}}}=e,o=s(e.option.attr,a);return(0,r.createElement)("div",c({className:i()("ct-spacer",n)},o,{style:{height:`${t}px`}}))};l.renderingConfig={design:"none"},t.default=l},5954:function(e,t,n){"use strict";n.r(t),n.d(t,{SPACING_STATE_CUSTOM:function(){return w},SPACING_STATE_INDEPENDENT:function(){return y},SPACING_STATE_LINKED:function(){return b},default:function(){return _}});var r=n(1381),o=n(5652),i=n(4184),a=n.n(i),c=n(1511),s=n(8519),l=n(1259);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}))},l=function(e){return{n1:(0,a.__)("Thin 100","blocksy"),i1:(0,a.__)("Thin 100 Italic","blocksy"),n2:(0,a.__)("Extra-Light 200","blocksy"),i2:(0,a.__)("Extra-Light 200 Italic","blocksy"),n3:(0,a.__)("Light 300","blocksy"),i3:(0,a.__)("Light 300 Italic","blocksy"),n4:(0,a.__)("Regular 400","blocksy"),i4:(0,a.__)("Regular 400 Italic","blocksy"),n5:(0,a.__)("Medium 500","blocksy"),i5:(0,a.__)("Medium 500 Italic","blocksy"),n6:(0,a.__)("Semi-Bold 600","blocksy"),i6:(0,a.__)("Semi-Bold 600 Italic","blocksy"),n7:(0,a.__)("Bold 700","blocksy"),i7:(0,a.__)("Bold 700 Italic","blocksy"),n8:(0,a.__)("Extra-Bold 800","blocksy"),i8:(0,a.__)("Extra-Bold 800 Italic","blocksy"),n9:(0,a.__)("Ultra-Bold 900","blocksy"),i9:(0,a.__)("Ultra-Bold 900 Italic","blocksy"),Default:(0,a.__)("Default Weight","blocksy")}[e]},u=function(e){return 0===e.indexOf("ct_font")?e.replace("ct_font_","").replace("__","_").split("_").map((function(e){return e.replace(/^[a-z]/,(function(e){return e.toUpperCase()}))})).join(" "):0===e.indexOf("ct_typekit")?e.replace("ct_typekit_","").replace(/([-_][a-z])/gi,(function(e){return e.toUpperCase().replace("-"," ").replace("_"," ")})):"System Default"===e?(0,a.__)("System Default","blocksy"):"Default"===e?(0,a.__)("Default","blocksy"):e},p=function(e){return{system:(0,a.__)("System Font","blocksy"),"local-google-fonts":(0,a.__)("Local Google Font","blocksy"),typekit:(0,a.__)("Adobe Font","blocksy"),file:(0,a.__)("Custom Font","blocksy"),google:(0,a.__)("Google Font","blocksy")}[e]||e};var d=n(5311),f=n.n(d),m=n(3431),h=n.n(m),g=n(2329),v=n(7462),b=n(7326),y=n(4578),w=n(845),O=n(7363),_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function E(e){cancelAnimationFrame(e.id)}function S(e,t){var n=_();var r={id:requestAnimationFrame((function o(){_()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var P=-1;function x(e){if(void 0===e&&(e=!1),-1===P||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),P=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return P}var j=null;function C(e){if(void 0===e&&(e=!1),null===j||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?j="positive-descending":(t.scrollLeft=1,j=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),j}return j}var k=function(e,t){return e};function I(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,s=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=s(r.props,(0,b.Z)(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:(0,b.Z)(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=(0,w.Z)((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=(0,w.Z)((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,c=i.itemSize,s=i.layout,u=r._getItemStyleCache(l&&c,l&&s,l&&a);if(u.hasOwnProperty(e))t=u[e];else{var p=n(r.props,e,r._instanceProps),d=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===s,m="rtl"===a,h=f?p:0;u[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:p,height:f?"100%":d,width:f?d:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=(0,w.Z)((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(C()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffsets.clientWidth?x():0:s.scrollHeight>s.clientHeight?x():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,c))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(C()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,c=i.scrollWidth;i.scrollLeft=c-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&E(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,c=e.innerElementType,s=e.innerTagName,l=e.itemCount,u=e.itemData,p=e.itemKey,d=void 0===p?k:p,f=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,b=e.useIsScrolling,y=e.width,w=this.state.isScrolling,_="horizontal"===o||"horizontal"===f,E=_?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),P=S[0],x=S[1],j=[];if(l>0)for(var C=P;C<=x;C++)j.push((0,O.createElement)(t,{data:u,key:d(C,u),index:C,isScrolling:b?w:void 0,style:this._getItemStyle(C)}));var I=r(this.props,this._instanceProps);return(0,O.createElement)(m||h||"div",{className:n,onScroll:E,ref:this._outerRefSetter,style:(0,v.default)({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},(0,O.createElement)(c||s||"div",{children:j,ref:a,style:{height:_?"100%":I,pointerEvents:w?"none":void 0,width:_?I:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,c=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,c,s)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var l=a(this.props,s,this._instanceProps),u=c(this.props,l,s,this._instanceProps),p=o&&"backward"!==i?1:Math.max(1,n),d=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,l-p),Math.max(0,Math.min(t-1,u+d)),l,u]},t}(O.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var D=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},N=I({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,c=e.height,s=e.itemCount,l=e.itemSize,u=e.layout,p=e.width,d="horizontal"===a||"horizontal"===u?p:c,f=Math.max(0,s*l-d),m=Math.min(f,t*l),h=Math.max(0,t*l-d+l+i);switch("smart"===n&&(n=r>=h-d&&r<=m+d?"auto":"center"),n){case"start":return m;case"end":return h;case"center":var g=Math.round(h+(m-h)/2);return gf+Math.floor(d/2)?f:g;default:return r>=h&&r<=m?r:r-1}));(t.length>0||n.length>0)&&T().load(H(H(H({},t.length>0?{google:{families:t}}:{}),n.length>0?{typekit:{id:n[0].kit}}:{}),{},{classes:!1,text:"abcdefghijklmnopqrstuvwxyz"}))}([...Array(25)].map((function(e,n){return 25*(t-1)+n})).map((function(e){return a[e]})).filter((function(e){return!!e})).filter((function(e){let{source:t,family:n}=e;return-1===$.indexOf(n)&&("google"===t||"typekit"===t)})))}),100))};return(0,r.useEffect)((function(){d()}),[a]),(0,r.createElement)(N,{height:360,itemCount:a.length,itemSize:85,ref:l,onScroll:function(e){d()},itemData:{linearFontsList:a,onPickFamily:o,value:n},onItemsRendered:function(e){let{overscanStartIndex:t,overscanStopIndex:n}=e},className:"ct-typography-fonts"},G)};function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;tn)return!1;if(r===n)return e===t;e:for(var o=0,i=0;o-1?r.variation:t.all_variations.indexOf("n4")>-1?"n4":t.all_variations[0])}))};return(0,r.createElement)(g.q.div,oe({className:"ct-option-modal ct-typography-modal"},m),(0,r.createElement)("div",{className:"ct-typography-container"},(0,r.createElement)("ul",{className:i()("ct-typography-top",{"ct-switch-panel":"options"!==c,"ct-static":"_"===s})},(0,r.createElement)("li",{className:"ct-back",onClick:function(){return l("options")}},(0,r.createElement)("svg",{width:"10",height:"10",viewBox:"0 0 15 15"},(0,r.createElement)("path",{d:"M14.2,6.8H2.6l4-4c0.3-0.3,0.3-0.8,0-1.1c-0.3-0.3-0.8-0.3-1.1,0L0.2,7l0,0c0,0-0.1,0.1-0.1,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0.1c0,0,0,0.1,0,0.1c0,0,0,0,0,0.1c0,0,0,0.1,0,0.1l0,0c0,0,0,0,0,0c0,0,0,0.1,0,0.1c0,0,0,0,0,0.1c0,0,0,0.1,0,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0.1C0.2,8,0.2,8,0.2,8l5.3,5.3c0.3,0.3,0.8,0.3,1.1,0c0.3-0.3,0.3-0.8,0-1.1l-4-4h11.7c0.4,0,0.8-0.3,0.8-0.8S14.7,6.8,14.2,6.8z"}))),(0,r.createElement)("li",{className:i()("ct-font",{active:"search"===c||"fonts"===c}),onClick:function(){l("fonts"===c?"search":"fonts"),j("")}},"search"!==c&&(0,r.createElement)("span",null,u(n.family)),"search"===c&&(0,r.createElement)("input",{onClick:function(e){return e.stopPropagation()},ref:k,autoFocus:!0,value:x,onKeyUp:function(e){13==e.keyCode&&D.length>0&&(N(D[0]),l("options"),j(""))},onChange:function(e){let{target:{value:t}}=e;return j(t)}}),(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 15 15"},"search"===c&&(0,r.createElement)("path",{d:"M8.2,7.5L10.7,5c0.2-0.2,0.2-0.5,0-0.7c-0.2-0.2-0.5-0.2-0.7,0L7.5,6.8L5,4.3c-0.2-0.2-0.5-0.2-0.7,0C4.1,4.5,4.1,4.8,4.3,5l2.5,2.5L4.3,10c-0.2,0.2-0.2,0.5,0,0.7c0.2,0.2,0.5,0.2,0.7,0l2.5-2.5l2.5,2.5c0.2,0.2,0.5,0.2,0.7,0s0.2-0.5,0-0.7L8.2,7.5z"}),"search"!==c&&(0,r.createElement)("path",{d:"M11.3,11.5c-0.3,0.3-0.7,0.3-1.1,0l-1.3-1.3c-0.5,0.4-1.2,0.5-1.9,0.5c-2,0-3.5-1.5-3.5-3.5S5,3.7,7,3.7c1.9,0,3.5,1.5,3.5,3.5c0,0.7-0.2,1.3-0.5,1.9l1.3,1.3C11.6,10.7,11.6,11.2,11.3,11.5z M7,4.7c-1.4,0-2.5,1.1-2.5,2.5S5.6,9.7,7,9.7s2.5-1.1,2.5-2.5S8.4,4.7,7,4.7z"}))),(0,r.createElement)("li",{className:i()("ct-weight",{active:"variations"===c}),onClick:function(){return l("variations")}},(0,r.createElement)("span",{"data-variation":n.variation},(A=n.variation,{n1:"100",i1:"100",n2:"200",i2:"200",n3:"300",i3:"300",n4:"400",i4:"400",n5:"500",i5:"500",n6:"600",i6:"600",n7:"700",i7:"700",n8:"800",i8:"800",n9:"900",i9:"900",Default:(0,a.__)("Default","blocksy")}[A])))),(0,r.createElement)(g.uT,{items:c,immediate:"static"===C,config:function(e,t){return{duration:210,easing:h()(.455,.03,.515,.955)}},from:{transform:"left"===C?"translateX(100%)":"translateX(-100%)",position:"absolute"},enter:{transform:"translateX(0%)",position:"absolute"},leave:{position:"absolute",transform:"left"===C?"translateX(-100%)":"translateX(100%)"}},(function(e,o,i,a){return"options"===o?(0,r.createElement)(ne,{sizeRef:I,value:n,option:t,onChange:d,props:e,currentView:o}):"fonts"===o||"search"===o?(0,r.createElement)(g.q.div,{style:e,key:o},(0,r.createElement)(q,{typographyList:_,searchTerm:x,linearFontsList:D,currentView:`${o}:${s}`,onPickFamily:function(e){if("google"===e.source){if(!(window.ct_customizer_localizations?ct_customizer_localizations:ct_localizations).dismissed_google_fonts_notice)return void y(e)}N(e)},value:n})):"variations"===o?(0,r.createElement)(X,{currentView:o,props:e,typographyList:_,onChange:function(e){d(e)},value:n}):void 0}))),(0,r.createElement)(re.Z,{items:!!b,className:"ct-admin-modal ct-gdpr-fonts-notice",onDismiss:function(){},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content",ref:v,onClick:function(e){e.stopPropagation()}},(0,r.createElement)("i",null,(0,r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},(0,r.createElement)("path",{d:"M18.3,14.4c-0.1,0.3-0.4,0.6-0.8,0.6h-15c-0.4,0-0.7-0.2-0.8-0.6s0-0.7,0.3-0.9c0,0,2.1-1.6,2.1-6.8c0-3.2,2.6-5.8,5.8-5.8c3.2,0,5.8,2.6,5.8,5.8c0,5.2,2.1,6.8,2.1,6.8C18.3,13.7,18.4,14.1,18.3,14.4z M11.9,16.8c-0.4-0.2-0.9-0.1-1.1,0.3c-0.1,0.2-0.3,0.3-0.5,0.4c-0.2,0.1-0.4,0-0.6-0.1c-0.1-0.1-0.2-0.2-0.3-0.3c-0.2-0.4-0.7-0.5-1.1-0.3c-0.4,0.2-0.5,0.7-0.3,1.1c0.2,0.4,0.5,0.7,0.9,0.9c0.4,0.2,0.8,0.3,1.2,0.3c0.2,0,0.4,0,0.6-0.1c0.6-0.2,1.2-0.6,1.5-1.2C12.4,17.5,12.3,17,11.9,16.8z"}))),(0,r.createElement)("h2",{className:"ct-modal-title"},(0,a.__)("Looks like you've picked a Google Font","blocksy")),(0,r.createElement)("p",{dangerouslySetInnerHTML:{__html:sprintf((0,a.__)("By using external Google Fonts, your website might not comply with the privacy regulations in your country. As an alternative you can use a system font, our %sLocal Google Fonts%s extension, or this %splugin%s.","blocksy"),'',"",'',"")}}),(0,r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){O(!w)}},(0,r.createElement)("span",{className:i()("ct-checkbox",{active:w})},(0,r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2"}))),(0,a.__)("I understand, don't show this notification again.","blocksy")),(0,r.createElement)("button",{className:"button",onClick:function(){y(!1),O(!1)}},(0,a.__)("Cancel","blocksy")),(0,r.createElement)("button",{className:"button button-primary",disabled:!w,onClick:function(e){if(e.preventDefault(),N(b),y(!1),w){(window.ct_customizer_localizations?ct_customizer_localizations:ct_localizations).dismissed_google_fonts_notice="yes",f().post(ajaxurl,{wp_customize:"on",action:"blocksy_dismissed_google_fonts_notice_handler"},(function(){}))}}},(0,a.__)("Continue","blocksy"))))}}));var A},ue=n(1511),pe=n(7086),de=n(2932);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function me(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const d=function(e){let{value:t,onChange:n,onChangeFor:s,option:u,option:{croppingKey:d="woocommerce_archive_thumbnail_cropping",customWidthKey:f="woocommerce_archive_thumbnail_cropping_custom_width",customHeightKey:m="woocommerce_archive_thumbnail_cropping_custom_height"}}=e,h=p(e,a);const[g,v]=(0,i.o)();return(0,r.createElement)(o.default,c({onChange:function(e){let t=-1===e.indexOf("/"),[r,o]=e.split(t?":":"/");if("original"===e)return v(d,"uncropped"),void n("uncropped");n(t?"custom":"predefined"),v(d,"custom"),v(m,parseFloat(o||"0")||0),v(f,parseFloat(r||"0")||0)},value:"uncropped"===t?"original":"1:1"===t?"1/1":`${g[f]}${"custom"===t?":":"/"}${g[m]}`,option:l(l({},u),{},{value:"1/1"}),onChangeFor:v},h,{values:g}))};d.ControlEnd=function(){return(0,r.createElement)("div",{className:"ct-color-modal-wrapper",onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()}})},t.default=d},5502:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(1381),o=n(8441),i=window.wp.date;var a=function(e){let{value:t,onChange:n}=e;const a=(0,i.__experimentalGetSettings)(),c=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,r.createElement)("div",{className:"ct-date-time-picker"},(0,r.createElement)(o.DateTimePicker,{currentDate:t||new Date,onChange:function(e){n(e)},is12Hour:c}))}},2242:function(e,t,n){"use strict";n.r(t);var r=n(1381);const o=function(e){let{option:{text:t="",attr:n={}}}=e;return(0,r.createElement)(r.Fragment,null)};o.renderingConfig={design:"none"},o.MetaWrapper=function(){return null},t.default=o},2616:function(e,t,n){"use strict";n.r(t);var r=n(1381);t.default=function(e){const{option:t}=e;return(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:t.html||""}})}},5200:function(e,t,n){"use strict";n.r(t);n(1381);t.default=function(e){const{option:t}=e;return t.render?t.render(e):null}},1511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(1381),o=n(4184),i=n.n(o);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){let{value:t,option:n,onChange:a}=e,s=c({},n.attr||{}),{placeholder:u}=s,p=l(s,o);return(0,r.createElement)("div",i({className:"ct-option-textarea"},p),(0,r.createElement)("textarea",i({value:t},c(c({},n.field_attr?n.field_attr:{}),u?{placeholder:u}:{}),{onChange:function(e){let{target:{value:t}}=e;return a(t)}})))}},227:function(e,t,n){"use strict";n.r(t);var r=n(1381),o=n(2568),i=n.n(o);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=c(t,n,r);if(0===i)return t;t-=(a(t,n,r)-e)/i}return t}(n,s,e,o):0===u?s:function(e,t,n,r,o){var i,c,s=0;do{(i=a(c=t+(n-t)/2,r,o)-e)>0?n=c:t=c}while(Math.abs(i)>1e-7&&++s<10);return c}(n,r,r+t,e,o)}return function(e){return 0===e?0:1===e?1:a(p(e),r,i)}}},1924:function(e,t,n){"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},5559:function(e,t,n){"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(a,i),s=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=c(r,a,arguments);s&&l&&(s(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}));return t};var p=function(){return c(r,i,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r>>6-2*o);return n}},e.exports=n},251:function(e,t,n){var r=n(2215),o=n(2584),i=n(609),a=n(8420),c=n(2847),s=n(8923),l=Date.prototype.getTime;function u(e,t,n){var f=n||{};return!!(f.strict?i(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?f.strict?i(e,t):e==t:function(e,t,n){var i,f;if(typeof e!=typeof t)return!1;if(p(e)||p(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e)!==o(t))return!1;var m=a(e),h=a(t);if(m!==h)return!1;if(m||h)return e.source===t.source&&c(e)===c(t);if(s(e)&&s(t))return l.call(e)===l.call(t);var g=d(e),v=d(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(i=0;i=0;i--)if(b[i]!=y[i])return!1;for(i=b.length-1;i>=0;i--)if(!u(e[f=b[i]],t[f],n))return!1;return!0}(e,t,f))}function p(e){return null==e}function d(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=u},4289:function(e,t,n){"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,c=Object.defineProperty,s=n(1044)(),l=c&&s,u=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;l?c(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},p=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var c=0;c1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,j,(function(e,t,n,o){r[r.length]=n?S(o,C,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=k("%"+r+"%",t),c=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],E(n,_([0,1],p)));for(var d=1,f=!0;d=n.length){var b=s(l,m);l=(f=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[m]}else f=O(l,m),l=l[m];f&&!u&&(g[c]=l)}}return l}},1044:function(e,t,n){"use strict";var r=n(210)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8185:function(e){"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},1405:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6410:function(e,t,n){"use strict";var r=n(5419);e.exports=function(){return r()&&!!Symbol.toStringTag}},7642:function(e,t,n){"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},8679:function(e,t,n){"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function s(e){return r.isMemo(e)?a:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var a=u(n);p&&(a=a.concat(p(n)));for(var c=s(t),h=s(n),g=0;g=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},c=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=c?i:a},8738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},8923:function(e,t,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i=n(6410)();e.exports=function(e){return"object"==typeof e&&null!==e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.call(e))}},8420:function(e,t,n){"use strict";var r,o,i,a,c=n(1924),s=n(6410)();if(s){r=c("Object.prototype.hasOwnProperty"),o=c("RegExp.prototype.exec"),i={};var l=function(){throw i};a={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=l)}var u=c("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,a)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),o=n(401),i=n(7667),a=n(1327),c=n(1866);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(p=s,d=!1,t=new r(t));e:for(;++u0&&i(u)?n>1?e(u,n-1,i,a,c):r(c,u):a||(c[c.length]=u)}return c}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&no?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++ru))return!1;var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var m=-1,h=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++m-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},9250:function(e,t,n){var r=n(577),o=r&&new r;e.exports=o},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,c=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=c},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,c=o(i.length-t,0),s=Array(c);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),a=i&&i.isMap,c=a?o(a):r;e.exports=c},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),i=n(7005),a=Function.prototype,c=Object.prototype,s=a.toString,l=c.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),a=i&&i.isSet,c=a?o(a):r;e.exports=c},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,c=a?o(a):r;e.exports=c},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(1240);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(1240);e.exports=function(e){return i(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},308:function(e){e.exports=function(){}},7557:function(e,t,n){var r=n(9932),o=n(5990),i=n(7406),a=n(1811),c=n(8363),s=n(696),l=n(9021),u=n(6904),p=l((function(e,t){var n={};if(null==e)return n;var l=!1;t=r(t,(function(t){return t=a(t,e),l||(l=t.length>1),t})),c(e,u(e),n),l&&(n=o(n,7,s));for(var p=t.length;p--;)i(n,t[p]);return n}));e.exports=p},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2569:function(e,t,n){var r=n(731),o=n(5976),i=n(9246),a=o((function(e,t){return i(e)?r(e,t):[]}));e.exports=a},8111:function(e,t,n){var r=n(6425),o=n(7548),i=n(9435),a=n(1469),c=n(7005),s=n(1913),l=Object.prototype.hasOwnProperty;function u(e){if(c(e)&&!a(e)&&!(e instanceof r)){if(e instanceof o)return e;if(l.call(e,"__wrapped__"))return s(e)}return new o(e)}u.prototype=i.prototype,u.prototype.constructor=u,e.exports=u},2568:function(e,t,n){var r,o,i,a,c;r=n(1012),o=n(487).utf8,i=n(8738),a=n(487).bin,(c=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),s=8*e.length,l=1732584193,u=-271733879,p=-1732584194,d=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[s>>>5]|=128<>>9<<4)]=s;var m=c._ff,h=c._gg,g=c._hh,v=c._ii;for(f=0;f>>0,u=u+y>>>0,p=p+w>>>0,d=d+O>>>0}return r.endian([l,u,p,d])})._ff=function(e,t,n,r,o,i,a){var c=e+(t&n|~t&r)+(o>>>0)+a;return(c<>>32-i)+t},c._gg=function(e,t,n,r,o,i,a){var c=e+(t&r|n&~r)+(o>>>0)+a;return(c<>>32-i)+t},c._hh=function(e,t,n,r,o,i,a){var c=e+(t^n^r)+(o>>>0)+a;return(c<>>32-i)+t},c._ii=function(e,t,n,r,o,i,a){var c=e+(n^(t|~r))+(o>>>0)+a;return(c<>>32-i)+t},c._blocksize=16,c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(c(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},845:function(e,t){"use strict";var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function r(e,t){if(e.length!==t.length)return!1;for(var r=0;r2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var c=0;c0&&!o.call(e,0))for(var h=0;h0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},2703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}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:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9984:function(e,t,n){"use strict";n.d(t,{Z5:function(){return Ho},_l:function(){return Pi},bK:function(){return ki}});var r=n(7363),o=n.n(r),i=n(4578),a=n(7462),c=n(4942);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function te(e,t){return e===t}function ne(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?B:n,o=t.mapStateToPropsFactories,i=void 0===o?G:o,c=t.mapDispatchToPropsFactories,s=void 0===c?$:c,l=t.mergePropsFactories,u=void 0===l?Z:l,p=t.selectorFactory,d=void 0===p?J:p;return function(e,t,n,o){void 0===o&&(o={});var c=o,l=c.pure,p=void 0===l||l,f=c.areStatesEqual,m=void 0===f?te:f,h=c.areOwnPropsEqual,g=void 0===h?V:h,v=c.areStatePropsEqual,b=void 0===v?V:v,y=c.areMergedPropsEqual,w=void 0===y?V:y,O=(0,x.default)(c,Q),_=ee(e,i,"mapStateToProps"),E=ee(t,s,"mapDispatchToProps"),S=ee(n,u,"mergeProps");return r(d,(0,a.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:_,initMapDispatchToProps:E,initMergeProps:S,pure:p,areStatesEqual:m,areOwnPropsEqual:g,areStatePropsEqual:b,areMergedPropsEqual:w},O))}}var re=ne();var oe,ie=n(1533),ae=n.n(ie);function ce(e,t){var n=(0,r.useState)((function(){return{inputs:t,result:e()}}))[0],o=(0,r.useRef)(!0),i=(0,r.useRef)(n),a=o.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}(0,i.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Pe(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof Ce))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(o().Component),De=function(e){return e+1},Ne=function(e,t){var n=e.droppableId===t.droppableId,r=De(e.index),o=De(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+o+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},Ae=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},Te=function(e){return"\n The item has returned to its starting position\n of "+De(e.index)+"\n"},Re={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:function(e){return"\n You have lifted an item in position "+De(e.source.index)+"\n"},onDragUpdate:function(e){var t=e.destination;if(t)return Ne(e.source,t);var n=e.combine;return n?Ae(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+Te(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+Ne(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+Ae(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+Te(e.source)+"\n "}},Me={x:0,y:0},Le=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Fe=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Be=function(e,t){return e.x===t.x&&e.y===t.y},ze=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Ve=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Ue=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},He=function(e,t){return Math.min.apply(Math,t.map((function(t){return Ue(e,t)})))},We=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},$e=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Ge=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},qe=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=pe({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):pe(e)},Ze=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t){return t?$e(e,t.scroll.diff.displacement):e}(t.marginBox,o),c=function(e,t,n){var r;return n&&n.increasedBy?(0,a.default)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(i,r,n);return{page:t,withPlaceholder:n,active:qe(c,o)}},Ke=function(e,t){e.frame||ke(!1);var n=e.frame,r=Fe(t,n.scroll.initial),o=ze(r),i=(0,a.default)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),c=Ze({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return(0,a.default)({},e,{frame:i,subject:c})};function Ye(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function Xe(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,c=r.lefte.right;return!(!a||!c)||(a&&i||c&&o)}},mt=function(e){var t=dt(e.top,e.bottom),n=dt(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},ht={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},gt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},vt=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Me;return $e(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,i)&&function(e,t,n){return n(t)(e)}(a,r,i)},bt=function(e){return vt((0,a.default)({},e,{isVisibleThroughFrameFn:ft}))},yt=function(e){return vt((0,a.default)({},e,{isVisibleThroughFrameFn:mt}))},wt=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate};function Ot(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var c=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return pe(de(n,r))}(t,r),s=t.descriptor.id;if(e.all.push(s),!bt({target:c,destination:n,viewport:o,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var l={draggableId:s,shouldAnimate:wt(s,a,i)};return e.visible[s]=l,e}),{all:[],visible:{},invisible:{}})}function _t(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:ut,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function Et(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,c=e.index,s=e.forceShouldAnimate,l=st(t,r);if(null==c)return _t({insideDestination:n,inHomeList:l,displacedBy:i,destination:r});var u=Je(n,(function(e){return e.descriptor.index===c}));if(!u)return _t({insideDestination:n,inHomeList:l,displacedBy:i,destination:r});var p=ct(t,n),d=n.indexOf(u);return{displaced:Ot({afterDragging:p.slice(d),destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:s}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function St(e,t){return Boolean(t.effected[e])}var Pt=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,c=e.previousImpact,s=e.viewport,l=e.afterCritical,u=c.at;if(u||ke(!1),"REORDER"===u.type){var p=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,c=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return a(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==p?null:Et({draggable:r,insideDestination:a,destination:i,viewport:s,last:c.displaced,displacedBy:c.displacedBy,index:p})}var d=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var a=o.draggableId,c=r[a].descriptor.index;return St(a,i)?t?c:c-1:t?c+1:c}({isMovingForward:t,destination:i,displaced:c.displaced,draggables:o,combine:u.combine,afterCritical:l});return null==d?null:Et({draggable:r,insideDestination:a,destination:i,viewport:s,last:c.displaced,displacedBy:c.displacedBy,index:d})},xt=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=at(n);o||ke(!1);var i=o.draggableId,a=r[i].page.borderBox.center,c=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return St(r,n)?i?Me:ze(o.point):i?o.point:Me}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return Le(a,c)},jt=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Ct=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},kt=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Ve(t.line,n.marginBox[t.end]+jt(t,r),Ct(t,n.marginBox,r))},It=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Ve(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Ct(t,n.marginBox,r))},Dt=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=ot(o.descriptor.id,r),c=n.page,s=o.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Ve(t.line,n.contentBox[t.start]+jt(t,r),Ct(t,n.contentBox,r))}({axis:s,moveInto:o.page,isMoving:c});var l=t.displaced,u=t.displacedBy,p=l.all[0];if(p){var d=r[p];if(St(p,i))return It({axis:s,moveRelativeTo:d.page,isMoving:c});var f=ve(d.page,u.point);return It({axis:s,moveRelativeTo:f,isMoving:c})}var m=a[a.length-1];if(m.descriptor.id===n.descriptor.id)return c.borderBox.center;if(St(m.descriptor.id,i)){var h=ve(m.page,ze(i.displacedBy.point));return kt({axis:s,moveRelativeTo:h,isMoving:c})}return kt({axis:s,moveRelativeTo:m.page,isMoving:c})},Nt=function(e,t){var n=e.frame;return n?Le(t,n.scroll.diff.displacement):t},At=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,a=n.page.borderBox.center,c=t.at;return r&&c?"REORDER"===c.type?Dt({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):xt({impact:t,draggables:o,afterCritical:i}):a}(e),n=e.droppable;return n?Nt(n,t):t},Tt=function(e,t){var n=Fe(t,e.scroll.initial),r=ze(n);return{frame:pe({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Rt(e,t){return e.map((function(e){return t[e]}))}var Mt=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return Le(e.scroll.diff.displacement,t)}(e.viewport,t),o=Fe(r,n.page.borderBox.center);return Le(n.client.borderBox.center,o)},Lt=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,c=e.onlyOnMainAxis,s=void 0!==c&&c,l=Fe(r,t.page.borderBox.center),u={target:$e(t.page.borderBox,l),destination:n,withDroppableDisplacement:i,viewport:o};return s?function(e){return vt((0,a.default)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=dt(e.top,e.bottom),r=dt(e.left,e.right);return function(e){return t===ht?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):yt(u)},Ft=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,c=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var p=ot(r.descriptor.id,o),d=st(n,r),f=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!it(i))return null;function c(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,a.default)({},i,{at:t})}var s=i.displaced.all,l=s.length?s[0]:null;if(t)return l?c(l):null;var u=ct(n,o);if(!l)return u.length?c(u[u.length-1].descriptor.id):null;var p=Xe(u,(function(e){return e.descriptor.id===l}));-1===p&&ke(!1);var d=p-1;return d<0?null:c(u[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:p,previousImpact:i})||Pt({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:p,previousImpact:i,viewport:c,afterCritical:u});if(!f)return null;var m=At({impact:f,draggable:n,droppable:r,draggables:o,afterCritical:u});if(Lt({draggable:n,destination:r,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Mt({pageBorderBoxCenter:m,draggable:n,viewport:c}),impact:f,scrollJumpRequest:null};var h=Fe(m,s),g=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,c=Tt(n,Le(n.scroll.current,i)),s=r.frame?Ke(r,Le(r.frame.scroll.current,i)):r,l=t.displaced,u=Ot({afterDragging:Rt(l.all,o),destination:r,displacedBy:t.displacedBy,viewport:c.frame,last:l,forceShouldAnimate:!1}),p=Ot({afterDragging:Rt(l.all,o),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},f={},m=[l,u,p];return l.all.forEach((function(e){var t=function(e,t){for(var n=0;n1?u.sort((function(e,t){return Bt(e)[c.start]-Bt(t)[c.start]}))[0]:l.sort((function(e,t){var r=He(n,Ge(Bt(e))),o=He(n,Ge(Bt(t)));return r!==o?r-o:Bt(e)[c.start]-Bt(t)[c.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:c});if(!l)return null;var u=ot(l.descriptor.id,i),p=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter((function(e){return yt({target:Vt(e,i),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var o=Ue(t,Nt(r,zt(e,i))),a=Ue(t,Nt(r,zt(n,i)));return or.left&&n.topr.top))return!1;if(Kt(o)(t.center))return!0;var i=e.axis,a=o.center[i.crossAxisLine],c=t[i.crossAxisStart],s=t[i.crossAxisEnd],l=dt(o[i.crossAxisStart],o[i.crossAxisEnd]),u=l(c),p=l(s);return!u&&!p||(u?ca)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,o=n.page.borderBox.center,i=r.map((function(e){var n=e.axis,r=Ve(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Ue(o,r)}})).sort((function(e,t){return t.distance-e.distance}));return i[0]?i[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}var Xt=function(e,t){return pe($e(e,t))};function Jt(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var Qt=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,c=e.afterCritical,s=Xt(n.page.borderBox,t),l=Yt({pageBorderBox:s,draggable:n,droppables:o});if(!l)return pt;var u=o[l],p=ot(u.descriptor.id,r),d=function(e,t){var n=e.frame;return n?Xt(t,n.scroll.diff.value):t}(u,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var c=o.axis,s=Ut(o.axis,t.displaceBy),l=s.value,u=n[c.start],p=n[c.end],d=Je(ct(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[c.size]/4,i=St(t,a),s=Jt({displaced:r.displaced,id:t});return i?s?p>n[c.start]+o&&pn[c.start]-l+o&&un[c.start]+l+o&&pn[c.start]+o&&ut.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:Je(ct(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=St(t,c),o=Jt({displaced:i,id:t});return r?o?d<=n:p=1500)return Bn;var i=Fn+zn*(o/1500);return Number(("CANCEL"===r?.6*i:i).toFixed(2))}({current:o.current.client.offset,destination:v,reason:i});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:v,dropDuration:y,completed:b}))}else n(Cn({completed:b}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},Un=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Hn(e){var t=e.onWindowScroll;var n=_e((function(){t(Un())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=Se;function i(){return o!==Se}return{start:function(){i()&&ke(!1),o=Pe(window,[r])},stop:function(){i()||ke(!1),n.cancel(),o(),o=Se},isActive:i}}var Wn=function(e){var t=Hn({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},$n=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=Xe(e,(function(e){return e.timerId===t}));-1===n&&ke(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Gn=function(e,t){sn(),t(),ln()},qn=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Zn=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},Kn=function(e,t){var n=function(e,t){var n=$n(),r=null,o=function(n){r||ke(!1),r=null,Gn(0,(function(){return Zn(e().onDragEnd,n,t,Re.onDragEnd)}))};return{beforeCapture:function(t,n){r&&ke(!1),Gn(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&ke(!1),Gn(0,(function(){var r=e().onBeforeDragStart;r&&r(qn(t,n))}))},start:function(o,i){r&&ke(!1);var a=qn(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add((function(){Gn(0,(function(){return Zn(e().onDragStart,a,t,Re.onDragStart)}))}))},update:function(o,i){var c=it(i),s=at(i);r||ke(!1);var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(o,r.lastCritical);l&&(r.lastCritical=o);var u,p,d=(p=c,!(null==(u=r.lastLocation)&&null==p||null!=u&&null!=p&&u.droppableId===p.droppableId&&u.index===p.index));d&&(r.lastLocation=c);var f=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(r.lastCombine,s);if(f&&(r.lastCombine=s),l||d||f){var m=(0,a.default)({},qn(o,r.mode),{combine:s,destination:c});n.add((function(){Gn(0,(function(){return Zn(e().onDragUpdate,m,t,Re.onDragUpdate)}))}))}},flush:function(){r||ke(!1),n.flush()},drop:o,abort:function(){if(r){var e=(0,a.default)({},qn(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});o(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},Yn=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&ke(!1),e.dispatch(Cn({completed:r.completed}))}else t(n)}}},Xn=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=Pe(window,[i])}))}}}},Jn=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(kn({reason:r.reason})))}}}},Qn=b,er=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,a=e.announce,c=e.autoScroller;return h(hn,Qn(function(){for(var e=arguments.length,t=new Array(e),n=0;nt.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return hr;if(e===t.startScrollingFrom)return 1;var n=br({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=hr*gr(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=wr,o=Date.now()-n;if(o>=wr)return e;if(ot.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:l});return u?Be(u,Me)?null:u:null},Pr=We((function(e){return 0===e?0:e>0?1:-1})),xr=(ar=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,o=Le(t,r),i={x:ar(o.x,n.x),y:ar(o.y,n.y)};return Be(i,Me)?null:i}),jr=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=Pr(r),a=xr({max:o,current:n,change:i});return!a||(0!==i.x&&0===a.x||0!==i.y&&0===a.y)},Cr=function(e,t){return jr({current:e.scroll.current,max:e.scroll.max,change:t})},kr=function(e,t){var n=e.frame;return!!n&&jr({current:n.scroll.current,max:n.scroll.max,change:t})},Ir=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,c=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=Sr({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:i});return a&&Cr(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:c,center:a,shouldUseTimeDampening:r});if(s)return void o(s)}var l=dr({center:a,destination:Gt(t.impact),droppables:t.dimensions.droppables});if(l){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var c=Sr({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return c&&kr(t,c)?c:null}({dragStartTime:n,droppable:l,subject:c,center:a,shouldUseTimeDampening:r});u&&i(l.descriptor.id,u)}},Dr=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(e,t){if(!kr(e,t))return t;var r=function(e,t){var n=e.frame;return n&&kr(e,t)?xr({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=Fe(t,r);return n(e.descriptor.id,o),Fe(t,o)},i=function(e,t,n){if(!e)return n;if(!Cr(t,n))return n;var o=function(e,t){if(!Cr(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return xr({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=Fe(n,o);return r(i),Fe(n,i)};return function(e){var n=e.scrollJumpRequest;if(n){var r=Gt(e.impact);r||ke(!1);var a=o(e.dimensions.droppables[r],n);if(a){var c=e.viewport,s=i(e.isWindowScrollAllowed,c,a);s&&function(e,n){var r=Le(e.current.client.selection,n);t({client:r})}(e,s)}}}},Nr=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=_e(t),o=_e(n),i=null,a=function(e){i||ke(!1);var t=i,n=t.shouldUseTimeDampening,a=t.dragStartTime;Ir({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){sn(),i&&ke(!1);var t=Date.now(),n=!1,r=function(){n=!0};Ir({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),i={dragStartTime:t,shouldUseTimeDampening:n},ln(),n&&a(e)},stop:function(){i&&(r.cancel(),o.cancel(),i=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),i=Dr({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}},Ar="data-rbd",Tr={base:cr=Ar+"-drag-handle",draggableId:cr+"-draggable-id",contextId:cr+"-context-id"},Rr=function(){var e=Ar+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Mr=function(){var e=Ar+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Lr={contextId:Ar+"-scroll-container-context-id"},Fr=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Br=function(e){var t,n,r,o=(t=e,function(e){return"["+e+'="'+t+'"]'}),i=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:o(Tr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n transition: "+Rn.outOfTheWay+";\n ",{selector:o(Rr.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),i,{selector:o(Mr.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Fr(a,"always"),resting:Fr(a,"resting"),dragging:Fr(a,"dragging"),dropAnimating:Fr(a,"dropAnimating"),userCancel:Fr(a,"userCancel")}},zr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,Vr=function(){var e=document.querySelector("head");return e||ke(!1),e},Ur=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};var Hr=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Wr(e){return e instanceof Hr(e).HTMLElement}function $r(e,t){var n="["+Tr.contextId+'="'+e+'"]',r=Qe(document.querySelectorAll(n));if(!r.length)return null;var o=Je(r,(function(e){return e.getAttribute(Tr.draggableId)===t}));return o&&Wr(o)?o:null}function Gr(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||ke(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Ye(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||ke(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return Ye(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var qr=o().createContext(null),Zr=function(){var e=document.body;return e||ke(!1),e},Kr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Yr=function(e){return"rbd-announcement-"+e};var Xr=0,Jr={separator:"::"};function Qr(e,t){return void 0===t&&(t=Jr),se((function(){return""+e+t.separator+Xr++}),[t.separator,e])}var eo=o().createContext(null);function to(e){0}function no(e,t){to()}function ro(e){var t=(0,r.useRef)(e);return(0,r.useEffect)((function(){t.current=e})),t}var oo,io=27,ao=32,co=37,so=38,lo=39,uo=40,po=((oo={})[13]=!0,oo[9]=!0,oo),fo=function(e){po[e.keyCode]&&e.preventDefault()},mo=function(){var e="visibilitychange";return"undefined"==typeof document?e:Je([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),ho=0,go=5;var vo,bo={type:"IDLE"};function yo(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(t===ho){var a={x:n,y:i},c=r();if("DRAGGING"===c.type)return e.preventDefault(),void c.actions.move(a);"PENDING"!==c.type&&ke(!1);var s=c.point;if(l=s,u=a,Math.abs(u.x-l.x)>=go||Math.abs(u.y-l.y)>=go){var l,u;e.preventDefault();var p=c.actions.fluidLift(a);o({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return e.keyCode===io?(e.preventDefault(),void t()):void fo(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&ke(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:mo,fn:t}]}function wo(){}var Oo=((vo={})[34]=!0,vo[33]=!0,vo[36]=!0,vo[35]=!0,vo);function _o(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return r.keyCode===io?(r.preventDefault(),void n()):r.keyCode===ao?(r.preventDefault(),t(),void e.drop()):r.keyCode===uo?(r.preventDefault(),void e.moveDown()):r.keyCode===so?(r.preventDefault(),void e.moveUp()):r.keyCode===lo?(r.preventDefault(),void e.moveRight()):r.keyCode===co?(r.preventDefault(),void e.moveLeft()):void(Oo[r.keyCode]?r.preventDefault():fo(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:mo,fn:n}]}var Eo={type:"IDLE"},So=.15;var Po={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function xo(e,t){if(null==t)return!1;if(Boolean(Po[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&xo(e,t.parentElement)}function jo(e,t){var n=t.target;return!!Wr(n)&&xo(e,n)}var Co=function(e){return pe(e.getBoundingClientRect()).center};var ko=function(){var e="matches";return"undefined"==typeof document?e:Je([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function Io(e,t){return null==e?null:e[ko](t)?e:Io(e.parentElement,t)}function Do(e,t){return e.closest?e.closest(t):Io(e,t)}function No(e,t){var n,r=t.target;if(!((n=r)instanceof Hr(n).Element))return null;var o=function(e){return"["+Tr.contextId+'="'+e+'"]'}(e),i=Do(r,o);return i&&Wr(i)?i:null}function Ao(e){e.preventDefault()}function To(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Ro(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!!i&&(!!i.options.isEnabled&&!!lr(n.getState(),o))}function Mo(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,c=e.forceSensorStop,s=e.sourceEvent;if(!Ro({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var l=o.draggable.getById(i),u=function(e,t){var n="["+Rr.contextId+'="'+e+'"]',r=Je(Qe(document.querySelectorAll(n)),(function(e){return e.getAttribute(Rr.id)===t}));return r&&Wr(r)?r:null}(n,l.descriptor.id);if(!u)return null;if(s&&!l.options.canDragInteractiveElements&&jo(u,s))return null;var p=t.claim(c||Se),d="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function m(){return t.isActive(p)}var h=function(e,t){To({expected:e,phase:d,isLockActive:m,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function g(e){function n(){t.release(),d="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=Pe(window,[{eventName:"click",fn:Ao,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(kn({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&ke(!1)),r.dispatch(gn(e.liftActionArgs)),d="DRAGGING",(0,a.default)({isActive:function(){return To({expected:"DRAGGING",phase:d,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}return{isActive:function(){return To({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:function(e){var t=_e((function(e){h((function(){return _n({client:e})}))})),n=g({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,a.default)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return h(En)},moveRight:function(){return h(Pn)},moveDown:function(){return h(Sn)},moveLeft:function(){return h(xn)}};return g({liftActionArgs:{id:i,clientSelection:Co(u),movementMode:"SNAP"},cleanup:Se,actions:e})},abort:function(){To({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!0})&&t.release()}}}var Lo=[function(e){var t=(0,r.useRef)(bo),n=(0,r.useRef)(Se),o=se((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&t.button===ho&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,c,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),u(o,i)}}}}}}),[e]),i=se((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),a=le((function(){n.current=Pe(window,[i,o],{passive:!1,capture:!0})}),[i,o]),c=le((function(){"IDLE"!==t.current.type&&(t.current=bo,n.current(),a())}),[a]),s=le((function(){var e=t.current;c(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[c]),l=le((function(){var e=yo({cancel:s,completed:c,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Pe(window,e,{capture:!0,passive:!1})}),[s,c]),u=le((function(e,n){"IDLE"!==t.current.type&&ke(!1),t.current={type:"PENDING",point:n,actions:e},l()}),[l]);zr((function(){return a(),function(){n.current()}}),[a])},function(e){var t=(0,r.useRef)(wo),n=se((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&n.keyCode===ao){var r=e.findClosestDraggableId(n);if(r){var i=e.tryGetLock(r,s,{sourceEvent:n});if(i){n.preventDefault();var a=!0,c=i.snapLift();t.current(),t.current=Pe(window,_o(c,s),{capture:!0,passive:!1})}}}function s(){a||ke(!1),a=!1,t.current(),o()}}}}),[e]),o=le((function(){t.current=Pe(window,[n],{passive:!1,capture:!0})}),[n]);zr((function(){return o(),function(){t.current()}}),[o])},function(e){var t=(0,r.useRef)(Eo),n=(0,r.useRef)(Se),o=le((function(){return t.current}),[]),i=le((function(e){t.current=e}),[]),a=se((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,s,{sourceEvent:t});if(o){var i=t.touches[0],a={x:i.clientX,y:i.clientY};n.current(),d(o,a)}}}}}}),[e]),c=le((function(){n.current=Pe(window,[a],{capture:!0,passive:!1})}),[a]),s=le((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(Eo),n.current(),c())}),[c,i]),l=le((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),u=le((function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:o},r=Pe(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&ke(!1);var o=e.touches[0];if(o&&o.force>=So){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:mo,fn:t}]}(t),e),i=Pe(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(e.keyCode===io&&e.preventDefault(),t()):t()}},{eventName:mo,fn:t}]}(t),e);n.current=function(){r(),i()}}),[l,o,s]),p=le((function(){var e=o();"PENDING"!==e.type&&ke(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[o,i]),d=le((function(e,t){"IDLE"!==o().type&&ke(!1);var n=setTimeout(p,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,o,i,p]);zr((function(){return c(),function(){n.current();var e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(Eo))}}),[o,c,i]),zr((function(){return Pe(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Fo(e){var t=e.contextId,n=e.store,o=e.registry,i=e.customSensors,a=e.enableDefaultSensors,c=[].concat(a?Lo:[],i||[]),s=(0,r.useState)((function(){return function(){var e=null;function t(){e||ke(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&ke(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],l=le((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);zr((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();l(e,t),e=t}))}),[s,n,l]),zr((function(){return s.tryAbandon}),[s.tryAbandon]);var u=le((function(e){return Ro({lockAPI:s,registry:o,store:n,draggableId:e})}),[s,o,n]),p=le((function(e,r,i){return Mo({lockAPI:s,registry:o,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,s,o,n]),d=le((function(e){return function(e,t){var n=No(e,t);return n?n.getAttribute(Tr.draggableId):null}(t,e)}),[t]),f=le((function(e){var t=o.draggable.findById(e);return t?t.options:null}),[o.draggable]),m=le((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch(jn()))}),[s,n]),h=le(s.isClaimed,[s]),g=se((function(){return{canGetLock:u,tryGetLock:p,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:m,isLockClaimed:h}}),[u,p,d,f,m,h]);to();for(var v=0;v=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){for(var n=0;n"undefined"!=typeof window&&window.requestAnimationFrame(e),h=e=>"undefined"!=typeof window&&window.cancelAnimationFrame(e),g=()=>Date.now();const v=(e,t)=>l={fn:e,transform:t},b=e=>f=e,y=e=>s=e,w=e=>u=e,O=e=>p=e,_=e=>d=e;var E=Object.freeze({get bugfixes(){return s},get applyAnimatedValues(){return l},get colorNames(){return f},get requestFrame(){return m},get cancelFrame(){return h},get interpolation(){return u},get now(){return g},get defaultElement(){return p},get createAnimatedStyle(){return d},injectApplyAnimatedValues:v,injectColorNames:b,injectBugfixes:y,injectInterpolation:w,injectFrame:(e,t)=>{var n=[e,t];return m=n[0],h=n[1],n},injectNow:e=>g=e,injectDefaultElement:O,injectCreateAnimatedStyle:_});class S{attach(){}detach(){}getValue(){}getAnimatedValue(){return this.getValue()}addChild(e){}removeChild(e){}getChildren(){return[]}}const P=e=>Object.keys(e).map((t=>e[t]));class x extends S{constructor(){var e;super(...arguments),e=this,this.children=[],this.getChildren=()=>this.children,this.getPayload=function(t){return void 0===t&&(t=void 0),void 0!==t&&e.payload?e.payload[t]:e.payload||e}}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class j extends x{constructor(){super(...arguments),this.payload=[],this.getAnimatedValue=()=>this.getValue(),this.attach=()=>this.payload.forEach((e=>e instanceof S&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof S&&e.removeChild(this)))}}class C extends x{constructor(){super(...arguments),this.payload={},this.getAnimatedValue=()=>this.getValue(!0),this.attach=()=>P(this.payload).forEach((e=>e instanceof S&&e.addChild(this))),this.detach=()=>P(this.payload).forEach((e=>e instanceof S&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof S)&&(t[n]=r instanceof S?r[e?"getAnimatedValue":"getValue"]():r)}return t}}class k extends C{constructor(e){super(),!(e=e||{}).transform||e.transform instanceof S||(e=l.transform(e)),this.payload=e}}const I={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};class D{static create(e,t,n){if("function"==typeof e)return e;if(u&&e.output&&"string"==typeof e.output[0])return u(e);if(Array.isArray(e))return D.create({range:e,output:t,extrapolate:n||"extend"});let r=e.output,o=e.range||[0,1],i=e.easing||(e=>e),a="extend",c=e.map;void 0!==e.extrapolateLeft?a=e.extrapolateLeft:void 0!==e.extrapolate&&(a=e.extrapolate);let s="extend";return void 0!==e.extrapolateRight?s=e.extrapolateRight:void 0!==e.extrapolate&&(s=e.extrapolate),e=>{let t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,o);return function(e,t,n,r,o,i,a,c,s){let l=s?s(e):e;if(ln){if("identity"===c)return l;"clamp"===c&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=i(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,o[t],o[t+1],r[t],r[t+1],i,a,s,c)}}}const N="[-+]?\\d*\\.?\\d+",A=N+"%";function T(){return"\\(\\s*("+Array.prototype.slice.call(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}const R=new RegExp("rgb"+T(N,N,N)),M=new RegExp("rgba"+T(N,N,N,N)),L=new RegExp("hsl"+T(N,A,A)),F=new RegExp("hsla"+T(N,A,A,N)),B=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,V=/^#([0-9a-fA-F]{6})$/,U=/^#([0-9a-fA-F]{8})$/;function H(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function W(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=H(o,r,e+1/3),a=H(o,r,e),c=H(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function $(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function G(e){return(parseFloat(e)%360+360)%360/360}function q(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Z(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function K(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=V.exec(e))?parseInt(t[1]+"ff",16)>>>0:I.hasOwnProperty(e)?I[e]:(t=R.exec(e))?($(t[1])<<24|$(t[2])<<16|$(t[3])<<8|255)>>>0:(t=M.exec(e))?($(t[1])<<24|$(t[2])<<16|$(t[3])<<8|q(t[4]))>>>0:(t=B.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=U.exec(e))?parseInt(t[1],16)>>>0:(t=z.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=L.exec(e))?(255|W(G(t[1]),Z(t[2]),Z(t[3])))>>>0:(t=F.exec(e))?(W(G(t[1]),Z(t[2]),Z(t[3]))|q(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Y=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,X=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,J=new RegExp(`(${Object.keys(I).join("|")})`,"g");class Q extends j{constructor(e,t,n){super(),this.getValue=()=>this.calc(...this.payload.map((e=>e.getValue()))),this.updateConfig=(e,t)=>this.calc=D.create(e,t),this.interpolate=(e,t)=>new Q(this,e,t),this.payload=e instanceof j&&!e.updateConfig?e.payload:Array.isArray(e)?e:[e],this.calc=D.create(t,n)}}function ee(e,t){"function"==typeof e.update?t.add(e):e.getChildren().forEach((e=>ee(e,t)))}class te extends x{constructor(e){var t;super(),t=this,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.getValue=()=>this.value,this.updateStyles=()=>ee(this,this.animatedStyles),this.updateValue=e=>this.flush(this.value=e),this.interpolate=(e,t)=>new Q(this,e,t),this.value=e,this.animatedStyles=new Set,this.done=!1,this.startPosition=e,this.lastPosition=e,this.lastVelocity=void 0,this.lastTime=void 0,this.controller=void 0}flush(){0===this.animatedStyles.size&&this.updateStyles(),this.animatedStyles.forEach((e=>e.update()))}prepare(e){void 0===this.controller&&(this.controller=e),this.controller===e&&(this.startPosition=this.value,this.lastPosition=this.value,this.lastVelocity=e.isActive?this.lastVelocity:void 0,this.lastTime=e.isActive?this.lastTime:void 0,this.done=!1,this.animatedStyles.clear())}}class ne extends j{constructor(e){var t;super(),t=this,this.setValue=function(e,n){void 0===n&&(n=!0),Array.isArray(e)?e.length===t.payload.length&&e.forEach(((e,r)=>t.payload[r].setValue(e,n))):t.payload.forEach(((r,o)=>t.payload[o].setValue(e,n)))},this.getValue=()=>this.payload.map((e=>e.getValue())),this.interpolate=(e,t)=>new Q(this,e,t),this.payload=e.map((e=>new te(e)))}}function re(e,t){return null==e?t:e}function oe(e){return void 0!==e?Array.isArray(e)?e:[e]:[]}function ie(e,t){if(typeof e!=typeof t)return!1;if("string"==typeof e||"number"==typeof e)return e===t;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return void 0!==n||e===t}function ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re[t]))}function se(e){const t=function(e){return e.to,e.from,e.config,e.native,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.impl,e.inject,e.delay,e.attach,e.destroyed,e.interpolateTo,e.autoStart,e.ref,o(e,["to","from","config","native","onStart","onRest","onFrame","children","reset","reverse","force","immediate","impl","inject","delay","attach","destroyed","interpolateTo","autoStart","ref"])}(e),n=Object.keys(e).reduce(((n,r)=>void 0!==t[r]?n:i({},n,{[r]:e[r]})),{});return i({to:t},n)}function le(e,t){let n=t[0],r=t[1];return i({},e,{[n]:new(Array.isArray(r)?ne:te)(r)})}function ue(e){const t=e.from,n=e.to,r=e.native,o=Object.entries(i({},t,n));return r?o.reduce(le,{}):i({},t,n)}function pe(e,t){return t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e}const de=e=>"auto"===e;let fe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const me=["Webkit","Ms","Moz","O"];function he(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}fe=Object.keys(fe).reduce(((e,t)=>(me.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),fe);const ge={};_((e=>new k(e))),O("div"),w((function(e){const t=e.output.map((e=>e.replace(X,K))).map((e=>e.replace(J,K))),n=t[0].match(Y).map((()=>[]));t.forEach((e=>{e.match(Y).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Y).map(((t,r)=>D.create(i({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Y,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}})),b(I),y((function(e,t){const n=e.from,r=e.to,o=e.children;if(!ce(r).some(de)&&!ce(n).some(de))return;let s=o(ue(e));if(!s)return;Array.isArray(s)&&(s={type:"div",props:{children:s}});const l=s.props.style;return a.createElement(s.type,i({key:s.key?s.key:void 0},s.props,{style:i({},l,{position:"absolute",visibility:"hidden"}),ref:o=>{if(o){let a,s,l=c.findDOMNode(o),u=getComputedStyle(l);if("border-box"===u.boxSizing)a=l.offsetWidth,s=l.offsetHeight;else{const e=parseFloat(u.paddingLeft||0)+parseFloat(u.paddingRight||0),t=parseFloat(u.paddingTop||0)+parseFloat(u.paddingBottom||0),n=parseFloat(u.borderLeftWidth||0)+parseFloat(u.borderRightWidth||0),r=parseFloat(u.borderTopWidth||0)+parseFloat(u.borderBottomWidth||0);a=l.offsetWidth-e-n,s=l.offsetHeight-t-r}const p=((e,t)=>(n,r)=>{let o=r[0],a=r[1];return i({},n,{[o]:"auto"===a?~o.indexOf("height")?t:e:a})})(a,s);t(i({},e,{from:Object.entries(n).reduce(p,n),to:Object.entries(r).reduce(p,r)}))}}}))})),v(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const i=t.style,a=t.children,c=t.scrollTop,s=t.scrollLeft,l=o(t,["style","children","scrollTop","scrollLeft"]);void 0!==c&&(e.scrollTop=c),void 0!==s&&(e.scrollLeft=s),void 0!==a&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=he(t,i[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=ge[t]||(ge[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));let ve=!1;const be=new Set,ye=()=>{let e=g();for(let t of be){let n=!0,r=!0;for(let o=0;o=t.startTime+c.delay+c.duration;else if(c.decay)p=l+f/(1-.998)*(1-Math.exp(-(1-.998)*(e-t.startTime))),i=Math.abs(s.lastPosition-p)<.1,i&&(u=p);else{a=void 0!==s.lastTime?s.lastTime:e,f=void 0!==s.lastVelocity?s.lastVelocity:c.initialVelocity,e>a+64&&(a=e);let t=Math.floor(e-a);for(let e=0;eu:p{be.has(e)&&be.delete(e)};class Oe{constructor(e,t){void 0===t&&(t={native:!0,interpolateTo:!0,autoStart:!0}),this.getValues=()=>this.props.native?this.interpolations:this.animatedProps,this.dependents=new Set,this.isActive=!1,this.hasChanged=!1,this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[],this.frame=void 0,this.startTime=void 0,this.lastTime=void 0,this.update(i({},e,t))}update(e){this.props=i({},this.props,e);let t=this.props.interpolateTo?se(this.props):this.props,n=t.from,r=void 0===n?{}:n,o=t.to,a=void 0===o?{}:o,c=t.config,s=void 0===c?{}:c,l=t.delay,u=void 0===l?0:l,p=t.reverse,d=t.attach,m=t.reset,h=t.immediate,g=t.autoStart,v=t.ref;if(p){var b=[a,r];r=b[0],a=b[1]}this.hasChanged=!1;let y=d&&d(this),w=m?{}:this.merged;if(this.merged=i({},r,w,a),this.animations=Object.entries(this.merged).reduce(((e,t,n)=>{let o=t[0],a=t[1],c=!m&&e[o]||{};const l="number"==typeof a,p="string"==typeof a&&!a.startsWith("#")&&!/\d/.test(a)&&!f[a],d=!l&&!p&&Array.isArray(a);let g=void 0!==r[o]?r[o]:a,v=l||d||p?a:1,b=ae(s,o);if(y&&(v=y.animations[o].parent),void 0===b.decay&&ie(c.changes,a))return e;{let t,n;if(this.hasChanged=!0,l||p)t=n=c.parent||new te(g);else if(d)t=n=c.parent||new ne(g);else{const e=c.interpolation&&c.interpolation.calc(c.parent.value);c.parent?(t=c.parent,t.setValue(0,!1)):t=new te(0);const r={output:[void 0!==e?e:g,a]};c.interpolation?(n=c.interpolation,c.interpolation.updateConfig(r)):n=t.interpolate(r)}ae(h,o)&&t.setValue(a,!1);const r=oe(t.getPayload());return r.forEach((e=>e.prepare(this))),i({},e,{[o]:i({},c,{name:o,parent:t,interpolation:n,animatedValues:r,changes:a,fromValues:oe(t.getValue()),toValues:oe(y?v.getPayload():v),immediate:ae(h,o),delay:re(b.delay,u||0),initialVelocity:re(b.velocity,0),clamp:re(b.clamp,!1),precision:re(b.precision,.01),tension:re(b.tension,170),friction:re(b.friction,26),mass:re(b.mass,1),duration:b.duration,easing:re(b.easing,(e=>e)),decay:b.decay})})}}),this.animations),this.hasChanged){this.configs=ce(this.animations),this.animatedProps={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.animatedProps[e]=this.animations[e].interpolation.getValue()}for(var O=arguments.length,_=new Array(O>1?O-1:0),E=1;Ethis.resolve=e))}stop(e){void 0===e&&(e=!1),e&&ce(this.animations).forEach((e=>e.changes=void 0)),this.debouncedOnEnd({finished:e})}destroy(){we(this),this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[]}debouncedOnEnd(e){we(this),this.isActive=!1;const t=this.onEnd;this.onEnd=null,t&&t(e),this.resolve&&this.resolve(),this.resolve=null}}class _e extends C{constructor(e,t){super(),e.style&&(e=i({},e,{style:d(e.style)})),this.payload=e,this.update=t,this.attach()}}function Ee(e){class t extends a.Component{constructor(e){super(),this.callback=()=>{if(this.node){!1===l.fn(this.node,this.propsAnimated.getAnimatedValue(),this)&&this.forceUpdate()}},this.attachProps(e)}componentWillUnmount(){this.propsAnimated&&this.propsAnimated.detach()}setNativeProps(e){!1===l.fn(this.node,e,this)&&this.forceUpdate()}attachProps(e){e.forwardRef;let t=o(e,["forwardRef"]);const n=this.propsAnimated;this.propsAnimated=new _e(t,this.callback),n&&n.detach()}shouldComponentUpdate(e){const t=e.style,n=o(e,["style"]),r=this.props,i=r.style;return(!ie(o(r,["style"]),n)||!ie(i,t))&&(this.attachProps(e),!0)}render(){const t=this.propsAnimated.getValue(),n=(t.scrollTop,t.scrollLeft,o(t,["scrollTop","scrollLeft"]));return a.createElement(e,i({},n,{ref:e=>this.node=pe(e,this.props.forwardRef)}))}}return a.forwardRef(((e,n)=>a.createElement(t,i({},e,{forwardRef:n}))))}const Se={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};class Pe extends a.Component{constructor(){super(...arguments),this.state={lastProps:{from:{},to:{}},propsChanged:!1,internal:!1},this.controller=new Oe(null,null),this.didUpdate=!1,this.didInject=!1,this.finished=!0,this.start=()=>{this.finished=!1;let e=this.mounted;this.controller.start((t=>this.finish(i({},t,{wasMounted:e}))),this.update)},this.stop=()=>this.controller.stop(!0),this.update=()=>this.mounted&&this.setState({internal:!0}),this.finish=e=>{let t=e.finished,n=e.noChange,r=e.wasMounted;this.finished=!0,this.mounted&&t&&(!this.props.onRest||!r&&n||this.props.onRest(this.controller.merged),this.mounted&&this.didInject&&(this.afterInject=ue(this.props),this.setState({internal:!0})),this.mounted&&(this.didInject||this.props.after)&&this.setState({internal:!0}),this.didInject=!1)}}componentDidMount(){this.componentDidUpdate(),this.mounted=!0}componentWillUnmount(){this.mounted=!1,this.stop()}static getDerivedStateFromProps(e,t){let n=t.internal,r=t.lastProps;const o=e.from,i=e.to,a=e.reset,c=e.force;return{propsChanged:!ie(i,r.to)||!ie(o,r.from)||a&&!n||c&&!n,lastProps:e,internal:!1}}render(){const e=this.props.children,t=this.state.propsChanged;if(this.props.inject&&t&&!this.injectProps){const e=this.props.inject(this.props,(e=>{this.injectProps=e,this.setState({internal:!0})}));if(e)return e}(this.injectProps||t)&&(this.didInject=!1,this.injectProps?(this.controller.update(this.injectProps),this.didInject=!0):t&&this.controller.update(this.props),this.didUpdate=!0,this.afterInject=void 0,this.injectProps=void 0);let n=i({},this.controller.getValues(),this.afterInject);return this.finished&&(n=i({},n,this.props.after)),Object.keys(n).length?e(n):null}componentDidUpdate(){this.didUpdate&&this.start(),this.didUpdate=!1}}Pe.defaultProps={from:{},to:{},config:Se.default,native:!1,immediate:!1,reset:!1,force:!1,inject:s};class xe extends a.PureComponent{constructor(){super(...arguments),this.first=!0,this.instances=new Set,this.hook=(e,t,n,r)=>(this.instances.add(e),(r?t===n-1:0===t)?void 0:Array.from(this.instances)[r?t+1:t-1])}render(){const e=this.props,t=e.items,n=e.children,r=e.from,c=void 0===r?{}:r,s=e.initial,l=e.reverse,u=e.keys,p=e.delay,d=e.onRest,f=o(e,["items","children","from","initial","reverse","keys","delay","onRest"]),m=oe(t);return oe(m).map(((e,t)=>a.createElement(Pe,i({onRest:0===t?d:null,key:"function"==typeof u?u(e):oe(u)[t],from:this.first&&void 0!==s?s||{}:c},f,{delay:0===t&&p||void 0,attach:e=>this.hook(e,t,m.length,l),children:r=>{const o=n(e,t);return o?o(r):null}}))))}componentDidUpdate(e){this.first=!1,e.items!==this.props.items&&this.instances.clear()}}xe.defaultProps={keys:e=>e};const je="__default";class Ce extends a.PureComponent{constructor(){var e;super(...arguments),e=this,this.guid=0,this.state={props:{},resolve:()=>null,last:!0,index:0},this.next=function(t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=0),e.running=!0,new Promise((o=>{e.mounted&&e.setState((e=>({props:t,resolve:o,last:n,index:r})),(()=>e.running=!1))}))}}componentDidMount(){this.mounted=!0,this.componentDidUpdate({})}componentWillUnmount(){this.mounted=!1}componentDidUpdate(e){var t=this;const n=this.props,r=n.states,o=n.filter,i=n.state;if((e.state!==this.props.state||this.props.reset&&!this.running||!ie(r[i],e.states[e.state]))&&r&&i&&r[i]){const e=++this.guid,n=r[i];if(n)if(Array.isArray(n)){let t=Promise.resolve();for(let r=0;re===this.guid&&this.next(o(a),c,i)))}}else if("function"==typeof n){let r=0;n((function(n,i){return void 0===i&&(i=!1),e===t.guid&&t.next(o(n),i,r++)}),(()=>m((()=>this.instance&&this.instance.stop()))),this.props)}else this.next(o(r[i]))}}render(){const e=this.state,t=e.props,n=e.resolve,r=e.last,c=e.index;if(!t||0===Object.keys(t).length)return null;let s=this.props,l=(s.state,s.filter,s.states,s.config),u=s.primitive,p=s.onRest,d=s.forwardRef,f=o(s,["state","filter","states","config","primitive","onRest","forwardRef"]);return Array.isArray(l)&&(l=l[c]),a.createElement(u,i({ref:e=>this.instance=pe(e,d),config:l},f,t,{onRest:e=>{n(e),p&&r&&p(e)}}))}}Ce.defaultProps={state:je};const ke=a.forwardRef(((e,t)=>a.createElement(Ce,i({},e,{forwardRef:t}))));ke.create=e=>function(t,n){return void 0===n&&(n=e=>e),("function"==typeof t||Array.isArray(t))&&(t={[je]:t}),r=>a.createElement(Ce,i({primitive:e,states:t,filter:n},r))},ke.Spring=e=>ke.create(Pe)(e,se),ke.Trail=e=>ke.create(xe)(e,se);let Ie=0,De=e=>{let t=e.items,n=e.keys,r=o(e,["items","keys"]);return t=oe(void 0!==t?t:null),n="function"==typeof n?t.map(n):oe(n),i({items:t,keys:n.map((e=>String(e)))},r)};class Ne extends a.PureComponent{componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}constructor(e){super(e),this.destroyItem=(e,t,n)=>r=>{const o=this.props,i=o.onRest,a=o.onDestroyed;this.mounted&&(a&&a(e),this.setState((e=>({deleted:e.deleted.filter((e=>e.key!==t))}))),i&&i(e,n,r))},this.state={first:!0,transitions:[],current:{},deleted:[],prevProps:e}}static getDerivedStateFromProps(e,t){let n=t.first,r=t.prevProps,a=o(t,["first","prevProps"]),c=De(e),s=c.items,l=c.keys,u=c.initial,p=c.from,d=c.enter,f=c.leave,m=c.update,h=c.trail,g=void 0===h?0:h,v=c.unique,b=c.config,y=De(r),w=y.keys,O=y.items,_=i({},a.current),E=[...a.deleted],S=Object.keys(_),P=new Set(S),x=new Set(l),j=l.filter((e=>!P.has(e))),C=a.transitions.filter((e=>!e.destroyed&&!x.has(e.originalKey))).map((e=>e.originalKey)),k=l.filter((e=>P.has(e))),I=0;j.forEach((e=>{v&&E.find((t=>t.originalKey===e))&&(E=E.filter((t=>t.originalKey!==e)));const t=l.indexOf(e),r=s[t],o="enter";_[e]={state:o,originalKey:e,key:v?String(e):Ie++,item:r,trail:I+=g,config:ae(b,r,o),from:ae(n&&void 0!==u?u||{}:p,r),to:ae(d,r)}})),C.forEach((e=>{const t=w.indexOf(e),n=O[t],r="leave";E.push(i({},_[e],{state:r,destroyed:!0,left:w[Math.max(0,t-1)],right:w[Math.min(w.length,t+1)],trail:I+=g,config:ae(b,n,r),to:ae(f,n)})),delete _[e]})),k.forEach((e=>{const t=l.indexOf(e),n=s[t],r="update";_[e]=i({},_[e],{item:n,state:r,trail:I+=g,config:ae(b,n,r),to:ae(m,n)})}));let D=l.map((e=>_[e]));return E.forEach((e=>{let t,n=e.left,r=e.right,i=o(e,["left","right"]);-1!==(t=D.findIndex((e=>e.originalKey===n)))&&(t+=1),-1===t&&(t=D.findIndex((e=>e.originalKey===r))),-1===t&&(t=E.findIndex((e=>e.originalKey===n))),-1===t&&(t=E.findIndex((e=>e.originalKey===r))),t=Math.max(0,t),D=[...D.slice(0,t),i,...D.slice(t)]})),{first:n&&0===j.length,transitions:D,current:_,deleted:E,prevProps:e}}render(){const e=this.props,t=(e.initial,e.from,e.enter,e.leave,e.update,e.onDestroyed,e.keys,e.items,e.onFrame),n=e.onRest,r=e.onStart,c=(e.trail,e.config,e.children),s=(e.unique,e.reset),l=o(e,["initial","from","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","trail","config","children","unique","reset"]);return this.state.transitions.map(((e,o)=>{let u=e.state,p=e.key,d=e.item,f=e.from,m=e.to,h=e.trail,g=e.config,v=e.destroyed;return a.createElement(ke,i({reset:s&&"enter"===u,primitive:Pe,state:u,filter:se,states:{[u]:m},key:p,onRest:v?this.destroyItem(d,p,u):n&&(e=>n(d,u,e)),onStart:r&&(()=>r(d,u)),onFrame:t&&(e=>t(d,u,e)),delay:h,config:g},l,{from:f,children:e=>{const t=c(d,u,o);return t?t(e):null}}))}))}}Ne.defaultProps={keys:e=>e,unique:!1,reset:!1};const Ae=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(((e,t)=>(e[t]=Ee(t),e)),Ee);t.uT=Ne,t.q=Ae},3697:function(e,t,n){"use strict";var r=n(5972).functionsHaveConfigurableNames(),o=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},r&&Object.defineProperty&&Object.defineProperty(e.exports,"name",{value:"get flags"})},2847:function(e,t,n){"use strict";var r=n(4289),o=n(5559),i=n(3697),a=n(1721),c=n(2753),s=o(a());r(s,{getPolyfill:a,implementation:i,shim:c}),e.exports=s},1721:function(e,t,n){"use strict";var r=n(3697),o=n(4289).supportsDescriptors,i=Object.getOwnPropertyDescriptor;e.exports=function(){if(o&&"gim"===/a/gim.flags){var e=i(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),"dy"===t)return e.get}}return r}},2753:function(e,t,n){"use strict";var r=n(4289).supportsDescriptors,o=n(1721),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,c=TypeError,s=Object.getPrototypeOf,l=/a/;e.exports=function(){if(!r||!s)throw new c("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=o(),t=s(l),n=i(t,"flags");return n&&n.get===e||a(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},6399:function(e){e.exports=function(e,t,n){return function(r){if(e[0]===e[1]||t[0]===t[1])return t[0];var o=(t[1]-t[0])/(e[1]-e[0]),i=t[0]+o*(r-e[0]);return n?Math.min(t[1],Math.max(t[0],i)):i}}},8975:function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var n,r,a,c,s,l,u,p,d,f=1,m=e.length,h="";for(r=0;r=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(c.type)?h+=n:(!o.number.test(c.type)||p&&!c.sign?d="":(d=p?"+":"-",n=n.toString().replace(o.sign,"")),l=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",u=c.width-(d+n).length,s=c.width&&u>0?l.repeat(u):"",h+=c.align?d+n+s:"0"===l?d+s+n:s+d+n)}return h}(function(e){if(c[e])return c[e];var t,n=e,r=[],i=0;for(;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],s=t[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a.push(l[1]);else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}var c=Object.create(null);i,a,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},4760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var o,a,c,u=[],d=[],f=new p(e.ownerDocument||e),m=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(m=Array.prototype.slice.apply(m)).unshift(e),o=0;o=t.f?o():e.fonts.load(function(e){return P(e)+" "+e.f+"00 300px "+E(e.c)}(t.a),t.h).then((function(e){1<=e.length?r():setTimeout(i,25)}),(function(){o()}))}()})),o=null,i=new Promise((function(e,n){o=setTimeout(n,t.f)}));Promise.race([i,r]).then((function(){o&&(clearTimeout(o),o=null),t.g(t.a)}),(function(){t.j(t.a)}))};var M={D:"serif",C:"sans-serif"},L=null;function F(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function B(e,t,n){for(var r in M)if(M.hasOwnProperty(r)&&t===e.f[M[r]]&&n===e.f[M[r]])return!0;return!1}function z(e){var t,n=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(t=n===e.f.serif&&r===e.f["sans-serif"])||(t=F()&&B(e,n,r)),t?c()-e.A>=e.w?F()&&B(e,n,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?V(e,e.v):V(e,e.B):function(e){setTimeout(a((function(){z(this)}),e),50)}(e):V(e,e.v)}function V(e,t){setTimeout(a((function(){d(this.g.a),d(this.h.a),d(this.j.a),d(this.m.a),t(this.a)}),e),0)}function U(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}R.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=c(),z(this)};var H=null;function W(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&f(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),k(e,"active")):C(e.a))}function $(e){this.j=e,this.a=new I,this.h=0,this.f=this.g=!0}function G(e,t,n,r,o){var i=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=o||null,c=r||{};if(0===n.length&&i)C(t.a);else{t.f+=n.length,i&&(t.j=i);var s,l=[];for(s=0;s=0||(o[n]=e[n]);return o}n.r(t),n.d(t,{default:function(){return r}})},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(1002);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},2329:function(e,t,n){"use strict";n.d(t,{uT:function(){return wn},q:function(){return Bn}});var r=n(7363),o=Object.defineProperty,i={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(i,{assign:()=>F,colors:()=>R,createStringInterpolator:()=>D,skipAnimation:()=>M,to:()=>N,willAdvance:()=>L});var a=_(),c=e=>b(e,a),s=_();c.write=e=>b(e,s);var l=_();c.onStart=e=>b(e,l);var u=_();c.onFrame=e=>b(e,u);var p=_();c.onFinish=e=>b(e,p);var d=[];c.setTimeout=(e,t)=>{const n=c.now()+t,r=()=>{const e=d.findIndex((e=>e.cancel==r));~e&&d.splice(e,1),g-=~e?1:0},o={time:n,handler:e,cancel:r};return d.splice(f(n),0,o),g+=1,y(),o};var f=e=>~(~d.findIndex((t=>t.time>e))||~d.length);c.cancel=e=>{l.delete(e),u.delete(e),p.delete(e),a.delete(e),s.delete(e)},c.sync=e=>{v=!0,c.batchedUpdates(e),v=!1},c.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,c.onStart(n)}return r.handler=e,r.cancel=()=>{l.delete(n),t=null},r};var m="undefined"!=typeof window?window.requestAnimationFrame:()=>{};c.use=e=>m=e,c.now="undefined"!=typeof performance?()=>performance.now():Date.now,c.batchedUpdates=e=>e(),c.catch=console.error,c.frameLoop="always",c.advance=()=>{"demand"!==c.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):O()};var h=-1,g=0,v=!1;function b(e,t){v?(t.delete(e),e(0)):(t.add(e),y())}function y(){h<0&&(h=0,"demand"!==c.frameLoop&&m(w))}function w(){~h&&(m(w),c.batchedUpdates(O))}function O(){const e=h;h=c.now();const t=f(h);t&&(E(d.splice(0,t),(e=>e.handler())),g-=t),g?(l.flush(),a.flush(e?Math.min(64,h-e):16.667),u.flush(),s.flush(),p.flush()):h=-1}function _(){let e=new Set,t=e;return{add(n){g+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return g-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,g-=t.size,E(t,(t=>t(n)&&e.add(t))),g+=e.size,t=e)}}}function E(e,t){e.forEach((e=>{try{t(e)}catch(e){c.catch(e)}}))}function S(){}var P={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function x(e,t){if(P.arr(e)){if(!P.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function C(e,t,n){if(P.arr(e))for(let r=0;rP.und(e)?[]:P.arr(e)?e:[e];function I(e,t){if(e.size){const n=Array.from(e);e.clear(),j(n,t)}}var D,N,A=(e,...t)=>I(e,(e=>e(...t))),T=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),R=null,M=!1,L=S,F=e=>{e.to&&(N=e.to),e.now&&(c.now=e.now),void 0!==e.colors&&(R=e.colors),null!=e.skipAnimation&&(M=e.skipAnimation),e.createStringInterpolator&&(D=e.createStringInterpolator),e.requestAnimationFrame&&c.use(e.requestAnimationFrame),e.batchedUpdates&&(c.batchedUpdates=e.batchedUpdates),e.willAdvance&&(L=e.willAdvance),e.frameLoop&&(c.frameLoop=e.frameLoop)},B=new Set,z=[],V=[],U=0,H={get idle(){return!B.size&&!z.length},start(e){U>e.priority?(B.add(e),c.onStart(W)):($(e),c(q))},advance:q,sort(e){if(U)c.onFrame((()=>H.sort(e)));else{const t=z.indexOf(e);~t&&(z.splice(t,1),G(e))}},clear(){z=[],B.clear()}};function W(){B.forEach($),B.clear(),c(q)}function $(e){z.includes(e)||G(e)}function G(e){z.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(z,(t=>t.priority>e.priority)),0,e)}function q(e){const t=V;for(let n=0;n0}var Z="[-+]?\\d*\\.?\\d+",K=Z+"%";function Y(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var X=new RegExp("rgb"+Y(Z,Z,Z)),J=new RegExp("rgba"+Y(Z,Z,Z,Z)),Q=new RegExp("hsl"+Y(Z,K,K)),ee=new RegExp("hsla"+Y(Z,K,K,Z)),te=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ne=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,re=/^#([0-9a-fA-F]{6})$/,oe=/^#([0-9a-fA-F]{8})$/;function ie(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ae(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ie(o,r,e+1/3),a=ie(o,r,e),c=ie(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function ce(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function se(e){return(parseFloat(e)%360+360)%360/360}function le(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ue(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=re.exec(e))?parseInt(t[1]+"ff",16)>>>0:R&&void 0!==R[e]?R[e]:(t=X.exec(e))?(ce(t[1])<<24|ce(t[2])<<16|ce(t[3])<<8|255)>>>0:(t=J.exec(e))?(ce(t[1])<<24|ce(t[2])<<16|ce(t[3])<<8|le(t[4]))>>>0:(t=te.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=oe.exec(e))?parseInt(t[1],16)>>>0:(t=ne.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Q.exec(e))?(255|ae(se(t[1]),ue(t[2]),ue(t[3])))>>>0:(t=ee.exec(e))?(ae(se(t[1]),ue(t[2]),ue(t[3]))|le(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var de=(e,t,n)=>{if(P.fun(e))return e;if(P.arr(e))return de({range:e,output:t,extrapolate:n});if(P.str(e.output[0]))return D(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,c,s){let l=s?s(e):e;if(ln){if("identity"===c)return l;"clamp"===c&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=i(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,i[t],i[t+1],o[t],o[t+1],s,a,c,r.map)}};var fe=1.70158,me=1.525*fe,he=fe+1,ge=2*Math.PI/3,ve=2*Math.PI/4.5,be=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},ye={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>he*e*e*e-fe*e*e,easeOutBack:e=>1+he*Math.pow(e-1,3)+fe*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-me)/2:(Math.pow(2*e-2,2)*((me+1)*(2*e-2)+me)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ge),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ge)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ve)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ve)/2+1,easeInBounce:e=>1-be(1-e),easeOutBounce:be,easeInOutBounce:e=>e<.5?(1-be(1-2*e))/2:(1+be(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,o="end"===t?Math.floor(r):Math.ceil(r);return i=0,a=1,c=o/e,Math.min(Math.max(c,i),a);var i,a,c}},we=Symbol.for("FluidValue.get"),Oe=Symbol.for("FluidValue.observers"),_e=e=>Boolean(e&&e[we]),Ee=e=>e&&e[we]?e[we]():e,Se=e=>e[Oe]||null;function Pe(e,t){const n=e[Oe];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var xe=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");je(this,e)}},je=(e,t)=>De(e,we,t);function Ce(e,t){if(e[we]){let n=e[Oe];n||De(e,Oe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ke(e,t){const n=e[Oe];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Oe]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Ie,De=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ne=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ae=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Te=new RegExp(`(${Ne.source})(%|[a-z]+)`,"i"),Re=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Me=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Le=e=>{const[t,n]=Fe(e);if(!t||T())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Me.test(n)?Le(n):n||e},Fe=e=>{const t=Me.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Be=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,ze=e=>{Ie||(Ie=R?new RegExp(`(${Object.keys(R).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ee(e).replace(Me,Le).replace(Ae,pe).replace(Ie,pe))),n=t.map((e=>e.match(Ne).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>de({...e,output:t})));return e=>{const n=!Te.test(t[0])&&t.find((e=>Te.test(e)))?.replace(Ne,"");let o=0;return t[0].replace(Ne,(()=>`${r[o++](e)}${n||""}`)).replace(Re,Be)}},Ve="react-spring: ",Ue=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Ve}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},He=Ue(console.warn);var We=Ue(console.warn);function $e(e){return P.str(e)&&("#"==e[0]||/\d/.test(e)||!T()&&Me.test(e)||e in(R||{}))}var Ge=T()?r.useEffect:r.useLayoutEffect,qe=()=>{const e=(0,r.useRef)(!1);return Ge((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function Ze(){const e=(0,r.useState)()[1],t=qe();return()=>{t.current&&e(Math.random())}}var Ke=e=>(0,r.useEffect)(e,Ye),Ye=[];var Xe=Symbol.for("Animated:node"),Je=e=>e&&e[Xe],Qe=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Xe,t),et=e=>e&&e[Xe]&&e[Xe].getPayload(),tt=class{constructor(){Qe(this,this)}getPayload(){return this.payload||[]}},nt=class extends tt{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,P.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new nt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return P.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,P.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},rt=class extends nt{constructor(e){super(0),this._string=null,this._toString=de({output:[e,e]})}static create(e){return new rt(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(P.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=de({output:[this.getValue(),e]})),this._value=0,super.reset()}},ot={dependencies:null},it=class extends tt{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return C(this.source,((n,r)=>{(e=>!!e&&e[Xe]===e)(n)?t[r]=n.getValue(e):_e(n)?t[r]=Ee(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&j(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return C(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ot.dependencies&&_e(e)&&ot.dependencies.add(e);const t=et(e);t&&j(t,(e=>this.add(e)))}},at=class extends it{constructor(e){super(e)}static create(e){return new at(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ct)),!0)}};function ct(e){return($e(e)?rt:nt).create(e)}function st(e){const t=Je(e);return t?t.constructor:P.arr(e)?at:$e(e)?rt:nt}var lt=(e,t)=>{const n=!P.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,r.forwardRef)(((o,i)=>{const a=(0,r.useRef)(null),s=n&&(0,r.useCallback)((e=>{a.current=function(e,t){e&&(P.fun(e)?e(t):e.current=t);return t}(i,e)}),[i]),[l,u]=function(e,t){const n=new Set;ot.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new it(e),ot.dependencies=null,[e,n]}(o,t),p=Ze(),d=()=>{const e=a.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&p()},f=new ut(d,u),m=(0,r.useRef)();Ge((()=>(m.current=f,j(u,(e=>Ce(e,f))),()=>{m.current&&(j(m.current.deps,(e=>ke(e,m.current))),c.cancel(m.current.update))}))),(0,r.useEffect)(d,[]),Ke((()=>()=>{const e=m.current;j(e.deps,(t=>ke(t,e)))}));const h=t.getComponentProps(l.getValue());return r.createElement(e,{...h,ref:s})}))},ut=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&c.write(this.update)}};var pt=Symbol.for("AnimatedComponent"),dt=e=>P.str(e)?e:e&&P.str(e.displayName)?e.displayName:P.fun(e)&&e.name||null;function ft(e,...t){return P.fun(e)?e(...t):e}var mt=(e,t)=>!0===e||!!(t&&e&&(P.fun(e)?e(t):k(e).includes(t))),ht=(e,t)=>P.obj(e)?t&&e[t]:e,gt=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,vt=e=>e,bt=(e,t=vt)=>{let n=yt;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);P.und(n)||(r[o]=n)}return r},yt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],wt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ot(e){const t=function(e){const t={};let n=0;if(C(e,((e,r)=>{wt[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return C(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function _t(e){return e=Ee(e),P.arr(e)?e.map(_t):$e(e)?i.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Et(e){for(const t in e)return!0;return!1}function St(e){return P.fun(e)||P.arr(e)&&P.obj(e[0])}function Pt(e,t){e.ref?.delete(e),t?.delete(e)}function xt(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var jt={tension:170,friction:26,mass:1,damping:1,easing:ye.linear,clamp:!1};function Ct(e,t){if(P.und(t.decay)){const n=!P.und(t.tension)||!P.und(t.friction);!n&&P.und(t.frequency)&&P.und(t.damping)&&P.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var kt=[];function It(e,{key:t,props:n,defaultProps:r,state:o,actions:a}){return new Promise(((s,l)=>{let u,p,d=mt(n.cancel??r?.cancel,t);if(d)h();else{P.und(n.pause)||(o.paused=mt(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||mt(e,t)),u=ft(n.delay||0,t),e?(o.resumeQueue.add(m),a.pause()):(a.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(p),p.cancel(),u=p.time-c.now()}function m(){u>0&&!i.skipAnimation?(o.delayed=!0,p=c.setTimeout(h,u),o.pauseQueue.add(f),o.timeouts.add(p)):h()}function h(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(p),e<=(o.cancelId||0)&&(d=!0);try{a.start({...n,callId:e,cancel:d},s)}catch(e){l(e)}}}))}var Dt=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Tt(e.get()):t.every((e=>e.noop))?Nt(e.get()):At(e.get(),t.every((e=>e.finished))),Nt=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),At=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Tt=e=>({value:e,cancelled:!0,finished:!1});function Rt(e,t,n,r){const{callId:o,parentId:a,onRest:s}=t,{asyncTo:l,promise:u}=n;return a||e!==l||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const p=bt(t,((e,t)=>"onRest"===t?void 0:e));let d,f;const m=new Promise(((e,t)=>(d=e,f=t))),h=e=>{const t=o<=(n.cancelId||0)&&Tt(r)||o!==n.asyncId&&At(r,!1);if(t)throw e.result=t,f(e),e},g=(e,t)=>{const a=new Lt,c=new Ft;return(async()=>{if(i.skipAnimation)throw Mt(n),c.result=At(r,!1),f(c),c;h(a);const s=P.obj(e)?{...e}:{...t,to:e};s.parentId=o,C(p,((e,t)=>{P.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return h(a),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let v;if(i.skipAnimation)return Mt(n),At(r,!1);try{let t;t=P.arr(e)?(async e=>{for(const t of e)await g(t)})(e):Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([t.then(d),m]),v=At(r.get(),!0,!1)}catch(e){if(e instanceof Lt)v=e.result;else{if(!(e instanceof Ft))throw e;v=e.result}}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?l:void 0,n.promise=a?u:void 0)}return P.fun(s)&&c.batchedUpdates((()=>{s(v,r,r.item)})),v})():u}function Mt(e,t){I(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Lt=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Ft=class extends Error{constructor(){super("SkipAnimationSignal")}},Bt=e=>e instanceof Vt,zt=1,Vt=class extends xe{constructor(){super(...arguments),this.id=zt++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Je(this);return e&&e.getValue()}to(...e){return i.to(this,e)}interpolate(...e){return He(`${Ve}The "interpolate" function is deprecated in v9 (use "to" instead)`),i.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Pe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||H.sort(this),Pe(this,{type:"priority",parent:this,priority:e})}},Ut=Symbol.for("SpringPhase"),Ht=e=>(1&e[Ut])>0,Wt=e=>(2&e[Ut])>0,$t=e=>(4&e[Ut])>0,Gt=(e,t)=>t?e[Ut]|=3:e[Ut]&=-3,qt=(e,t)=>t?e[Ut]|=4:e[Ut]&=-5,Zt=class extends Vt{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=kt,this.toValues=null,this.fromValues=kt,this.config=new class{constructor(){this.velocity=0,Object.assign(this,jt)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!P.und(e)||!P.und(t)){const n=P.obj(e)?{...e}:{...t,from:e};P.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Wt(this)||this._state.asyncTo)||$t(this)}get goal(){return Ee(this.animation.to)}get velocity(){const e=Je(this);return e instanceof nt?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Ht(this)}get isAnimating(){return Wt(this)}get isPaused(){return $t(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=et(r.to);!a&&_e(r.to)&&(o=k(Ee(r.to))),r.values.forEach(((c,s)=>{if(c.done)return;const l=c.constructor==rt?1:a?a[s].lastPosition:o[s];let u=r.immediate,p=l;if(!u){if(p=c.lastPosition,i.tension<=0)return void(c.done=!0);let t=c.elapsedTime+=e;const n=r.fromValues[s],o=null!=c.v0?c.v0:c.v0=P.arr(i.velocity)?i.velocity[s]:i.velocity;let a;const d=i.precision||(n==l?.005:Math.min(1,.001*Math.abs(l-n)));if(P.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(c.lastPosition-p)<=d,a=o*r}else{a=null==c.lastVelocity?o:c.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!P.und(r),f=n==l?c.v0>0:nt,m||(u=Math.abs(l-p)<=d,!u));++e){s&&(h=p==l||p>l==f,h&&(a=-a*r,p=l));a+=(1e-6*-i.tension*(p-l)+.001*-i.friction*a)/i.mass*g,p+=a*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,c.durationProgress>0&&(c.elapsedTime=i.duration*c.durationProgress,t=c.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,c.durationProgress=r),p=n+i.easing(r)*(l-n),a=(p-c.lastPosition)/e,u=1==r}c.lastVelocity=a,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[s].done&&(u=!1),u?c.done=!0:t=!1,c.setValue(p,i.round)&&(n=!0)}));const c=Je(this),s=c.getValue();if(t){const e=Ee(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(c.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return c.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Wt(this)){const{to:e,config:t}=this.animation;c.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return P.und(e)?(n=this.queue||[],this.queue=[]):n=[P.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Dt(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Mt(this._state,e&&this._lastCallId),c.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=P.obj(n)?n[t]:n,(null==n||St(n))&&(n=void 0),r=P.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Ht(this)||(e.reverse&&([n,r]=[r,n]),r=Ee(r),P.und(r)?Je(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,bt(e,((e,t)=>/^on/.test(t)?ht(e,n):e))),en(this,e,"onProps"),tn(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return It(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{$t(this)||(qt(this,!0),A(i.pauseQueue),tn(this,"onPause",At(this,Kt(this,this.animation.to)),this))},resume:()=>{$t(this)&&(qt(this,!1),Wt(this)&&this._resume(),A(i.resumeQueue),tn(this,"onResume",At(this,Kt(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=Yt(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Tt(this));const r=!P.und(e.to),o=!P.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Tt(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:l,from:u}=s;let{to:p=l,from:d=u}=e;!o||r||t.default&&!P.und(p)||(p=d),t.reverse&&([p,d]=[d,p]);const f=!x(d,u);f&&(s.from=d),d=Ee(d);const m=!x(p,l);m&&this._focus(p);const h=St(t.to),{config:g}=s,{decay:v,velocity:b}=g;(r||o)&&(g.velocity=0),t.config&&!h&&function(e,t,n){n&&(Ct(n={...n},t),t={...n,...t}),Ct(e,t),Object.assign(e,t);for(const t in jt)null==e[t]&&(e[t]=jt[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;P.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(g,ft(t.config,i),t.config!==a.config?ft(a.config,i):void 0);let y=Je(this);if(!y||P.und(p))return n(At(this,!0));const w=P.und(t.reset)?o&&!t.default:!P.und(d)&&mt(t.reset,i),O=w?d:this.get(),_=_t(p),E=P.num(_)||P.arr(_)||$e(_),S=!h&&(!E||mt(a.immediate||t.immediate,i));if(m){const e=st(p);if(e!==y.constructor){if(!S)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(_)}}const C=y.constructor;let I=_e(p),D=!1;if(!I){const e=w||!Ht(this)&&f;(m||e)&&(D=x(_t(O),_),I=!D),(x(s.immediate,S)||S)&&x(g.decay,v)&&x(g.velocity,b)||(I=!0)}if(D&&Wt(this)&&(s.changed&&!w?I=!0:I||this._stop(l)),!h&&((I||_e(l))&&(s.values=y.getPayload(),s.toValues=_e(p)?null:C==rt?[1]:k(_)),s.immediate!=S&&(s.immediate=S,S||w||this._set(l)),I)){const{onRest:e}=s;j(Qt,(e=>en(this,t,e)));const r=At(this,Kt(this,l));A(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&c.batchedUpdates((()=>{s.changed=!w,e?.(r,this),w?ft(a.onRest,r):s.onStart?.(r,this)}))}w&&this._set(O),h?n(Rt(t.to,t,this._state,this)):I?this._start():Wt(this)&&!m?this._pendingCalls.add(n):n(Nt(O))}_focus(e){const t=this.animation;e!==t.to&&(Se(this)&&this._detach(),t.to=e,Se(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_e(t)&&(Ce(t,this),Bt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_e(e)&&ke(e,this)}_set(e,t=!0){const n=Ee(e);if(!P.und(n)){const e=Je(this);if(!e||!x(n,e.getValue())){const r=st(n);e&&e.constructor==r?e.setValue(n):Qe(this,r.create(n)),e&&c.batchedUpdates((()=>{this._onChange(n,t)}))}}return Je(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,tn(this,"onStart",At(this,Kt(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ft(this.animation.onChange,e,this)),ft(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Je(this).reset(Ee(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Wt(this)||(Gt(this,!0),$t(this)||this._resume())}_resume(){i.skipAnimation?this.finish():H.start(this)}_stop(e,t){if(Wt(this)){Gt(this,!1);const n=this.animation;j(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pe(this,{type:"idle",parent:this});const r=t?Tt(this.get()):At(this.get(),Kt(this,e??n.to));A(this._pendingCalls,r),n.changed&&(n.changed=!1,tn(this,"onRest",r,this))}}};function Kt(e,t){const n=_t(t);return x(_t(e.get()),n)}function Yt(e,t=e.loop,n=e.to){const r=ft(t);if(r){const o=!0!==r&&Ot(r),i=(o||e).reverse,a=!o||o.reset;return Xt({...e,loop:t,default:!1,pause:void 0,to:!i||St(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function Xt(e){const{to:t,from:n}=e=Ot(e),r=new Set;return P.obj(t)&&Jt(t,r),P.obj(n)&&Jt(n,r),e.keys=r.size?Array.from(r):null,e}function Jt(e,t){C(e,((e,n)=>null!=e&&t.add(n)))}var Qt=["onStart","onRest","onChange","onPause","onResume"];function en(e,t,n){e.animation[n]=t[n]!==gt(t,n)?ht(t[n],e.key):void 0}function tn(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var nn=["onStart","onChange","onRest"],rn=1,on=class{constructor(e,t){this.id=rn++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];P.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Xt(e)),this}start(e){let{queue:t}=this;return e?t=k(e).map(Xt):this.queue=[],this._flush?this._flush(this,t):(dn(this,t),an(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;j(k(t),(t=>n[t].stop(!!e)))}else Mt(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(P.und(e))this.start({pause:!0});else{const t=this.springs;j(k(e),(e=>t[e].pause()))}return this}resume(e){if(P.und(e))this.start({pause:!1});else{const t=this.springs;j(k(e),(e=>t[e].resume()))}return this}each(e){C(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,I(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&I(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),i&&(this._started=!1,I(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}c.onFrame(this._onFrame)}};function an(e,t){return Promise.all(t.map((t=>cn(e,t)))).then((t=>Dt(e,t)))}async function cn(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:l}=t,u=P.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const p=P.arr(o)||P.fun(o)?o:void 0;p?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):j(nn,(n=>{const r=t[n];if(P.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,A(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===gt(t,"cancel");(p||m&&d.asyncId)&&f.push(It(++e._lastAsyncId,{props:t,state:d,actions:{pause:S,resume:S,start(t,n){m?(Mt(d,e._lastAsyncId),n(Tt(e))):(t.onRest=s,n(Rt(p,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const h=Dt(e,await Promise.all(f));if(a&&h.finished&&(!n||!h.noop)){const n=Yt(t,a,o);if(n)return dn(e,[n]),cn(e,n,!0)}return l&&c.batchedUpdates((()=>l(h,e,e.item))),h}function sn(e,t){const n={...e.springs};return t&&j(k(t),(e=>{P.und(e.keys)&&(e=Xt(e)),P.obj(e.to)||(e={...e,to:void 0}),pn(n,e,(e=>un(e)))})),ln(e,n),n}function ln(e,t){C(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ce(t,e))}))}function un(e,t){const n=new Zt;return n.key=e,t&&Ce(n,t),n}function pn(e,t,n){t.keys&&j(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function dn(e,t){j(t,(t=>{pn(e.springs,t,(t=>un(t,e)))}))}var fn,mn,hn=({children:e,...t})=>{const n=(0,r.useContext)(gn),o=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,r.useState)((()=>({inputs:t,result:e()}))),o=(0,r.useRef)(),i=o.current;let a=i;a?Boolean(t&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=a,i==n&&(n.inputs=n.result=void 0)}),[a]),a.result}((()=>({pause:o,immediate:i})),[o,i]);const{Provider:a}=gn;return r.createElement(a,{value:t},e)},gn=(fn=hn,mn={},Object.assign(fn,r.createContext(mn)),fn.Provider._context=fn,fn.Consumer._context=fn,fn);hn.Provider=gn.Provider,hn.Consumer=gn.Consumer;var vn=()=>{const e=[],t=function(t){We(`${Ve}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return j(e,((e,o)=>{if(P.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return j(e,(e=>e.pause(...arguments))),this},t.resume=function(){return j(e,(e=>e.resume(...arguments))),this},t.set=function(t){j(e,((e,n)=>{const r=P.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return j(e,((e,r)=>{if(P.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return j(e,(e=>e.stop(...arguments))),this},t.update=function(t){return j(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return P.fun(e)?e(n,t):e};return t._getProps=n,t};function bn(e,t,n){const o=P.fun(t)&&t,{reset:i,sort:a,trail:c=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:p,config:d}=o?o():t,f=(0,r.useMemo)((()=>o||3==arguments.length?vn():void 0),[]),m=k(e),h=[],g=(0,r.useRef)(null),v=i?null:g.current;Ge((()=>{g.current=h})),Ke((()=>(j(h,(e=>{f?.add(e.ctrl),e.ctrl.ref=f})),()=>{j(g.current,(e=>{e.expired&&clearTimeout(e.expirationId),Pt(e.ctrl,f),e.ctrl.stop(!0)}))})));const b=function(e,{key:t,keys:n=t},r){if(null===n){const t=new Set;return e.map((e=>{const n=r&&r.find((n=>n.item===e&&"leave"!==n.phase&&!t.has(n)));return n?(t.add(n),n.key):yn++}))}return P.und(n)?e:P.fun(n)?e.map(n):k(n)}(m,o?o():t,v),y=i&&g.current||[];Ge((()=>j(y,(({ctrl:e,item:t,key:n})=>{Pt(e,f),ft(u,t,n)}))));const w=[];if(v&&j(v,((e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=w[t]=b.indexOf(e.key))&&(h[t]=e)})),j(m,((e,t)=>{h[t]||(h[t]={key:b[t],item:e,phase:"mount",ctrl:new on},h[t].ctrl.item=e)})),w.length){let e=-1;const{leave:n}=o?o():t;j(w,((t,r)=>{const o=v[r];~t?(e=h.indexOf(o),h[e]={...o,item:m[t]}):n&&h.splice(++e,0,o)}))}P.fun(a)&&h.sort(((e,t)=>a(e.item,t.item)));let O=-c;const _=Ze(),E=bt(t),S=new Map,x=(0,r.useRef)(new Map),C=(0,r.useRef)(!1);j(h,((e,n)=>{const r=e.key,i=e.phase,a=o?o():t;let u,f;const m=ft(a.delay||0,r);if("mount"==i)u=a.enter,f="enter";else{const e=b.indexOf(r)<0;if("leave"!=i)if(e)u=a.leave,f="leave";else{if(!(u=a.update))return;f="update"}else{if(e)return;u=a.enter,f="enter"}}if(u=ft(u,e.item,n),u=P.obj(u)?Ot(u):{to:u},!u.config){const t=d||E.config;u.config=ft(t,e.item,n,f)}O+=c;const h={...E,delay:m+O,ref:p,immediate:a.immediate,reset:!1,...u};if("enter"==f&&P.und(h.from)){const r=o?o():t,i=P.und(r.initial)||v?r.from:r.initial;h.from=ft(i,e.item,n)}const{onResolve:y}=h;h.onResolve=e=>{ft(y,e);const t=g.current,n=t.find((e=>e.key===r));if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){const e=t.every((e=>e.ctrl.idle));if("leave"==n.phase){const t=ft(s,n.item);if(!1!==t){const r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(_,r)))}}e&&t.some((e=>e.expired))&&(x.current.delete(n),l&&(C.current=!0),_())}};const w=sn(e.ctrl,h);"leave"===f&&l?x.current.set(e,{phase:f,springs:w,payload:h}):S.set(e,{phase:f,springs:w,payload:h})}));const I=(0,r.useContext)(hn),D=function(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e})),t.current}(I),N=I!==D&&Et(I);Ge((()=>{N&&j(h,(e=>{e.ctrl.start({default:I})}))}),[I]),j(S,((e,t)=>{if(x.current.size){const e=h.findIndex((e=>e.key===t.key));h.splice(e,1)}})),Ge((()=>{j(x.current.size?x.current:S,(({phase:e,payload:t},n)=>{const{ctrl:r}=n;n.phase=e,f?.add(r),N&&"enter"==e&&r.start({default:I}),t&&(xt(r,t.ref),!r.ref&&!f||C.current?(r.start(t),C.current&&(C.current=!1)):r.update(t))}))}),i?void 0:n);const A=e=>r.createElement(r.Fragment,null,h.map(((t,n)=>{const{springs:o}=S.get(t)||t.ctrl,i=e({...o},t.item,t,n);return i&&i.type?r.createElement(i.type,{...i.props,key:P.str(t.key)||P.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i})));return f?[A,f]:A}var yn=1;function wn({items:e,children:t,...n}){return bn(e,n)(t)}var On=class extends Vt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=de(...t);const n=this._get(),r=st(n);Qe(this,r.create(n))}advance(e){const t=this._get();x(t,this.get())||(Je(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&En(this._active)&&Sn(this)}_get(){const e=P.arr(this.source)?this.source.map(Ee):k(Ee(this.source));return this.calc(...e)}_start(){this.idle&&!En(this._active)&&(this.idle=!1,j(et(this),(e=>{e.done=!1})),i.skipAnimation?(c.batchedUpdates((()=>this.advance())),Sn(this)):H.start(this))}_attach(){let e=1;j(k(this.source),(t=>{_e(t)&&Ce(t,this),Bt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){j(k(this.source),(e=>{_e(e)&&ke(e,this)})),this._active.clear(),Sn(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=k(this.source).reduce(((e,t)=>Math.max(e,(Bt(t)?t.priority:0)+1)),0))}};function _n(e){return!1!==e.idle}function En(e){return!e.size||Array.from(e).every(_n)}function Sn(e){e.idle||(e.idle=!0,j(et(e),(e=>{e.done=!0})),Pe(e,{type:"idle",parent:e}))}i.assign({createStringInterpolator:ze,to:(e,t)=>new On(e,t)});H.advance;var Pn=n(1533),xn=/^--/;function jn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||xn.test(e)||kn.hasOwnProperty(e)&&kn[e]?(""+t).trim():t+"px"}var Cn={};var kn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},In=["Webkit","Ms","Moz","O"];kn=Object.keys(kn).reduce(((e,t)=>(In.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),kn);var Dn=/^(matrix|translate|scale|rotate|skew)/,Nn=/^(translate)/,An=/^(rotate|skew)/,Tn=(e,t)=>P.num(e)&&0!==e?e+t:e,Rn=(e,t)=>P.arr(e)?e.every((e=>Rn(e,t))):P.num(e)?e===t:parseFloat(e)===t,Mn=class extends it{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Tn(e,"px"))).join(",")})`,Rn(e,0)]))),C(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Dn.test(t)){if(delete r[t],P.und(e))return;const n=Nn.test(t)?"px":An.test(t)?"deg":"";o.push(k(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Tn(o,n)})`,Rn(o,0)]:e=>[`${t}(${e.map((e=>Tn(e,n))).join(",")})`,Rn(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Ln(o,i)),super(r)}},Ln=class extends xe{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return j(this.inputs,((n,r)=>{const o=Ee(n[0]),[i,a]=this.transforms[r](P.arr(o)?o:n.map(Ee));e+=" "+i,t=t&&a})),t?"none":e}observerAdded(e){1==e&&j(this.inputs,(e=>j(e,(e=>_e(e)&&Ce(e,this)))))}observerRemoved(e){0==e&&j(this.inputs,(e=>j(e,(e=>_e(e)&&ke(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Pe(this,e)}};i.assign({batchedUpdates:Pn.unstable_batchedUpdates,createStringInterpolator:ze,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Fn=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new it(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=dt(e)||"Anonymous";return(e=P.str(e)?i[e]||(i[e]=lt(e,o)):e[pt]||(e[pt]=lt(e,o))).displayName=`Animated(${t})`,e};return C(e,((t,n)=>{P.arr(e)&&(n=dt(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:c,...s}=t,l=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cn[t]||(Cn[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=jn(t,r[t]);xn.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,l[n])})),void 0!==i&&(e.scrollTop=i),void 0!==a&&(e.scrollLeft=a),void 0!==c&&e.setAttribute("viewBox",c)},createAnimatedStyle:e=>new Mn(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Bn=Fn.animated}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&!e;)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}();var r={};!function(){"use strict";n.r(r),n.d(r,{ColumnsDragDropContext:function(){return kn.DragDropContext},DateTimePicker:function(){return vn.default},DeviceManagerProvider:function(){return x.jd},ImageUploader:function(){return hn.default},OptionsPanel:function(){return g.Z},OutsideClickHandler:function(){return bn.default},Overlay:function(){return A.Z},Panel:function(){return fn.default},PanelLevel:function(){return P.Z},PanelMetaWrapper:function(){return fn.PanelMetaWrapper},PlacementsDragDropContext:function(){return Cn.Z5},Select:function(){return gn.default},Switch:function(){return mn.default},Transition:function(){return yn.uT},animated:function(){return yn.q},bezierEasing:function(){return On()},getAttributesFromOptions:function(){return En},getColorsDefaults:function(){return xn},getDefaultsFromOptions:function(){return Sn},getOptionsForBlock:function(){return Pn},getValueFromInput:function(){return O.n6},onDocumentLoaded:function(){return In},usePopoverMaker:function(){return _n.Z}});var e={};n.r(e),n.d(e,{disableComplementaryArea:function(){return ke},enableComplementaryArea:function(){return Ce},pinItem:function(){return De},setFeatureDefaults:function(){return Re},setFeatureValue:function(){return Te},toggleFeature:function(){return Ae},unpinItem:function(){return Ne}});var t={};n.r(t),n.d(t,{getActiveComplementaryArea:function(){return Me},isFeatureActive:function(){return Fe},isItemPinned:function(){return Le}});var o={};n.r(o),n.d(o,{__experimentalGetInsertionPoint:function(){return Je},isInserterOpened:function(){return Xe}});var i={};n.r(i),n.d(i,{setIsInserterOpened:function(){return Qe}});n(5026);var a=n(1381),c=n(4184),s=n.n(c);n(7086);n(2565);var l=n(7215);var u=n(2243),p=n.n(u),d=n(5311),f=n.n(d);const m=function(e){/comp|inter|loaded/.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",e,!1)};var h=n(5652);m((function(){const e=document.createElement("a");e.classList.add("ct-dark-mode-switch"),e.innerHTML='',e.addEventListener("click",(function(e){e.preventDefault(),wp.customize("customizer_color_scheme").set("yes"===wp.customize("customizer_color_scheme")()?"no":"yes")})),document.querySelector("#customize-footer-actions").appendChild(e)}));var g=n(5234);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t-1){const t=e.querySelector(".ct-options-panel"),n=e.querySelector("input.multi_number").value;t.innerHTML=t.innerHTML.replace(/__i__|%i%/g,n)}_()};var A=n(3363);var T=function(e){let{username:t}=e;const[n,r]=(0,a.useState)(!1);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("button",{onClick:function(e){e.preventDefault(),r(!0)},className:"button"},(0,h.__)("View Pro Features","blocksy")),(0,a.createElement)(A.Z,{items:n,className:"ct-admin-modal ct-onboarding-modal",onDismiss:function(){return r(!1)},render:function(){return(0,a.createElement)("div",{className:"ct-modal-content"},(0,a.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,a.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,a.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),(0,a.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),(0,a.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),(0,a.createElement)("h2",{className:"ct-modal-title"},(0,h.sprintf)((0,h.__)("Hello %s","blocksy"),t)),(0,a.createElement)("p",null,(0,h.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy")),(0,a.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,a.createElement)("a",{href:"https://creativethemes.com/blocksy/premium/",target:"_blank",className:"button"},(0,h.__)("View Pro Features","blocksy")),(0,a.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,h.__)("Upgrade Now","blocksy"))))}}))};var R=function(e){let{value:t,option:n,option:{sidebarId:r="ct-footer-sidebar-1"},onChange:o}=e;const i=(0,a.useRef)();return(0,a.useEffect)((function(){const e=`widgetAreaSection-${r}`,t=Object.keys(wp.customize.control._value).filter((function(e){return 0===e.indexOf("widget_")&&wp.customize.control(e).section()===`sidebar-widgets-${r}`})),n=wp.customize.Section.extend({containerParent:jQuery(i.current),collapse:function(){},embed:function(){var e=this;e.containerParent=wp.customize.ensure(e.containerParent);wp.customize.ensure(e.containerPaneParent);e.contentContainer.parent().is(e.headContainer)||(e.containerParent.append(e.contentContainer),e.contentContainer[0].classList.add("open"),e.contentContainer[0].querySelector(".customize-section-description-container").remove()),e.deferred.embedded.resolve(),setTimeout((function(){t.map((function(e){wp.customize.control(e).embedWidgetControl()}))}))}}),o=new n(e,{});wp.customize.section.add(o);new wp.customize.controlConstructor.sidebar_widgets("checkcheck",{params:{sidebar_id:r,priority:999,section:o.id,setting:`sidebars_widgets[${r}]`,content:''}});return t.map((function(t){wp.customize.control(t).prevSection=`sidebar-widgets-${r}`,wp.customize.control(t).section(e)})),setTimeout((function(){i.currentEl&&jQuery(i.current.firstElementChild).sortable("option","containment","parent")}),1e3),function(){Object.keys(wp.customize.control._value).filter((function(t){return 0===t.indexOf("widget_")&&(wp.customize.control(t).section()===`sidebar-widgets-${r}`||wp.customize.control(t).section()===e)})).map((function(e){if(wp.customize.control(e)&&wp.customize.control(e).container[0].matches('[id*="widget_text"]')){let t=wp.customize.control(e).container[0],n=(t.querySelector("textarea"),t.querySelector(".widget-id").value);wp.textWidgets.widgetControls[n]&&wp.textWidgets.widgetControls[n].remove(),wp.textWidgets.widgetControls[n]=null,wp.customize.control(e).collapse()}wp.customize.control(e)&&wp.customize.control(e).section(wp.customize.control(e).prevSection||`sidebar-widgets-${r}`)})),[...document.querySelectorAll(`.customize-pane-parent [id="accordion-section-${e}"]`)].map((function(e){return e.remove()})),wp.customize.section.remove(o.id)}}),[]),(0,a.createElement)("div",{className:"ct-option-widget-area",ref:i})},M=n(8441),L=n(5224),F=(window.wp.blockLibrary,window.wp.widgets),B=window.wp.blocks,z=window.wp.data,V=window.wp.keyboardShortcuts,U=n(1649),H=n.n(U);n(8975),H()(console.error);var W,$,G,q,Z=n(4942);W={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},$=["(","?"],G={")":["("],":":["?","?:"]},q=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var K={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Y(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(q);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(G[n]){if(G[n][0]===o){n=G[n][1]||n;break}}else if($.indexOf(o)>=0||W[o]1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=ee(ee(ee({},te),r.data[t]),e),r.data[t][""]=ee(ee({},te[""]),r.data[t][""])},c=function(e,t){a(e,t),i()},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,o,i)},l=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},u=function(e,t,r){var o=s(r,t,e);return n?(o=n.applyFilters("i18n.gettext_with_context",o,e,t,r),n.applyFilters("i18n.gettext_with_context_"+l(r),o,e,t,r)):o};if(e&&c(e,t),n){var p=function(e){ne.test(e)&&i()};n.addAction("hookAdded","core/i18n",p),n.addAction("hookRemoved","core/i18n",p)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:c,resetLocaleData:function(e,t){r.data={},r.pluralForms={},c(e,t)},subscribe:function(e){return o.add(e),function(){return o.delete(e)}},__:function(e,t){var r=s(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+l(t),r,e,t)):r},_x:u,_n:function(e,t,r,o){var i=s(o,void 0,e,t,r);return n?(i=n.applyFilters("i18n.ngettext",i,e,t,r,o),n.applyFilters("i18n.ngettext_"+l(o),i,e,t,r,o)):i},_nx:function(e,t,r,o,i){var a=s(i,o,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,o,i),n.applyFilters("i18n.ngettext_with_context_"+l(i),a,e,t,r,o,i)):a},isRTL:function(){return"rtl"===u("ltr","text direction")},hasTranslation:function(e,t,o){var i,a,c=t?t+""+e:e,s=!(null===(i=r.data)||void 0===i||null===(a=i[null!=o?o:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,o),s=n.applyFilters("i18n.has_translation_"+l(o),s,e,t,o)),s}}}(void 0,void 0,L.defaultHooks),oe=(re.getLocaleData.bind(re),re.setLocaleData.bind(re),re.resetLocaleData.bind(re),re.subscribe.bind(re),re.__.bind(re)),ie=re._x.bind(re),ae=(re._n.bind(re),re._nx.bind(re),re.isRTL.bind(re)),ce=(re.hasTranslation.bind(re),window.wp.blockEditor),se=window.wp.compose;function le(e){let{text:t,children:n}=e;const r=(0,se.useCopyToClipboard)(t);return(0,a.createElement)(M.Button,{variant:"secondary",ref:r},n)}class ue extends a.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}render(){const{error:e}=this.state;return e?(0,a.createElement)(ce.Warning,{className:"customize-widgets-error-boundary",actions:[(0,a.createElement)(le,{key:"copy-error",text:e.stack},oe("Copy Error"))]},oe("The editor has encountered an unexpected error.")):this.props.children}}var pe=n(6692),de=n.n(pe),fe=window.wp.coreData,me=window.wp.mediaUtils,he=n(7361),ge=n.n(he),ve=n(9242),be=n.n(ve);function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return we(we({},e),{},{[n]:we(we({},e[n]),r)})}return e}}),Ee=be()([z.combineReducers])({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:r,value:o}=t;return we(we({},e),{},{[n]:we(we({},e[n]),{},{[r]:o})})}return e}}),Se=(0,z.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:o}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&n&&r?we(we({},e),{},{[n]:we(we({},e[n]),{},{[r]:o||null})}):e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:o,isEnable:i}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!r||!o||ge()(e,[n,r,o])===i)return e;const a=e[n]||{},c=a[r]||{};return we(we({},e),{},{[n]:we(we({},a),{},{[r]:we(we({},c),{},{[o]:i||!1})})})}});var Pe=(0,z.combineReducers)({enableItems:Se,preferenceDefaults:_e,preferences:Ee});const xe="blocksy/core/interface";function je(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function Ce(e,t){return je("complementaryArea",e,t)}function ke(e){return je("complementaryArea",e,void 0)}function Ie(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function De(e,t){return Ie("pinnedItems",e,t,!0)}function Ne(e,t){return Ie("pinnedItems",e,t,!1)}function*Ae(e,t){const n=yield z.controls.select(xe,"isFeatureActive",e,t);yield z.controls.dispatch(xe,"setFeatureValue",e,t,!n)}function Te(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function Re(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function Me(e,t){return function(e,t,n){return ge()(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function Le(e,t,n){return!1!==function(e,t,n,r){return ge()(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}function Fe(e,t,n){var r,o;const i=null===(r=e.preferences.features[t])||void 0===r?void 0:r[n];return!!(void 0!==i?i:null===(o=e.preferenceDefaults.features[t])||void 0===o?void 0:o[n])}const Be=(0,z.createReduxStore)(xe,{reducer:Pe,actions:e,selectors:t,persist:["enableItems","preferences"]});(0,z.registerStore)(xe,{reducer:Pe,actions:e,selectors:t,persist:["enableItems","preferences"]});const ze=["closeMenu"];function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var He=function(e){let{closeMenu:t}=e,n=Ue(e,ze);const{panelsHelpers:r}=(0,a.useContext)(P.Q);return(0,a.createElement)(M.MenuItem,Ve({onClick:function(){r.openSecondLevel(),t()}},n),(0,h.__)("Show more settings","blocksy"))},We=window.wp.keycodes,$e=window.wp.primitives;var Ge=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));var qe=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));var Ze=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var Ke=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var Ye=(0,z.combineReducers)({blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_IS_INSERTER_OPENED"===t.type?t.value:e}});function Xe(e){return!!e.blockInserterPanel}function Je(e){const{rootClientId:t,insertionIndex:n}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n}}function Qe(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}const et={reducer:Ye,selectors:o,actions:i},tt=(0,z.createReduxStore)("blocksy/core/customize-widgets",et);(0,z.register)(tt);var nt=function e(t){let{setIsOpened:n}=t;const r=(0,se.useInstanceId)(e,"customize-widget-layout__inserter-panel-title"),o=(0,z.useSelect)((function(e){return e(tt).__experimentalGetInsertionPoint()}),[]);return(0,a.createElement)("div",{className:"customize-widgets-layout__inserter-panel","aria-labelledby":r},(0,a.createElement)("div",{className:"customize-widgets-layout__inserter-panel-header"},(0,a.createElement)("h2",{id:r,className:"customize-widgets-layout__inserter-panel-header-title"},oe("Add a block")),(0,a.createElement)(M.Button,{className:"customize-widgets-layout__inserter-panel-header-close-button",icon:Ke,onClick:function(){return n(!1)},"aria-label":oe("Close inserter")})),(0,a.createElement)("div",{className:"customize-widgets-layout__inserter-panel-content"},(0,a.createElement)(ce.__experimentalLibrary,{rootClientId:o.rootClientId,__experimentalInsertionIndex:o.insertionIndex,showInserterHelpPanel:!0,onSelect:function(){return n(!1)}})))};var rt=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));var ot=(0,a.createElement)($e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)($e.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ft(e){const t=e.match(/^widget_(.+)(?:\[(\d+)\])$/);if(t){return`${t[1]}-${parseInt(t[2],10)}`}return e}function Bt(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("core/legacy-widget"===e.name&&(e.attributes.id||e.attributes.instance))if(e.attributes.id)t={id:e.attributes.id};else{const r=e.attributes.instance,{encoded:o,hash:i,raw:a}=r,c=Lt(r,Nt);t={idBase:e.attributes.idBase,instance:Rt(Rt({},null==n?void 0:n.instance),{},{is_widget_customizer_js_value:!0,encoded_serialized_instance:o,instance_hash_key:i,raw_instance:a},c)}}else{t={idBase:"block",widgetClass:"WP_Widget_Block",instance:{raw_instance:{content:(0,B.serialize)(e)}}}}return Rt(Rt({},Dt()(n,["form","rendered"])),t)}function zt(e){let t,{id:n,idBase:r,number:o,instance:i}=e;const{encoded_serialized_instance:a,instance_hash_key:c,raw_instance:s}=i,l=Lt(i,At);if("block"===r){const e=(0,B.parse)(s.content);t=e.length?e[0]:(0,B.createBlock)("core/paragraph",{})}else t=o?(0,B.createBlock)("core/legacy-widget",{idBase:r,instance:Rt({encoded:a,hash:c,raw:s},l)}):(0,B.createBlock)("core/legacy-widget",{id:n});return(0,F.addWidgetIdToBlock)(t,n)}function Vt(e){const[t,n]=(0,a.useState)((function(){return e.getWidgets().map((function(e){return zt(e)}))}));(0,a.useEffect)((function(){return e.subscribe((function(e,t){n((function(n){const r=new Map(e.map((function(e){return[e.id,e]}))),o=new Map(n.map((function(e){return[(0,F.getWidgetIdFromBlock)(e),e]}))),i=t.map((function(e){const t=r.get(e.id);return t&&t===e?o.get(e.id):zt(e)}));return kt(n,i)?n:i}))}))}),[e]);const r=(0,a.useCallback)((function(t){n((function(n){if(kt(n,t))return n;const r=new Map(n.map((function(e){return[(0,F.getWidgetIdFromBlock)(e),e]}))),o=t.map((function(t){const n=(0,F.getWidgetIdFromBlock)(t);if(n&&r.has(n)){const o=r.get(n),i=e.getWidget(n);return Ct()(t,o)&&i?i:Bt(t,i)}return Bt(t)}));if(kt(e.getWidgets(),o))return n;const i=e.setWidgets(o);return t.reduce((function(e,n,r){const o=i[r];return null!==o&&(e===t&&(e=t.slice()),e[r]=(0,F.addWidgetIdToBlock)(n,o)),e}),t)}))}),[e]);return[t,r,r]}function Ut(e){let{sidebar:t,settings:n,children:r}=e;const[o,i,c]=Vt(t);return(0,a.createElement)(ce.BlockEditorProvider,{value:o,onInput:i,onChange:c,settings:n,useSubRegistry:!1},r)}function Ht(e){let{sidebar:t}=e;const{toggleFeature:n}=(0,z.useDispatch)(Be),r=t.getWidgets().every((function(e){return e.id.startsWith("block-")}));return(0,a.createElement)("div",{className:"customize-widgets-welcome-guide"},(0,a.createElement)("div",{className:"customize-widgets-welcome-guide__image__wrapper"},(0,a.createElement)("picture",null,(0,a.createElement)("source",{srcSet:"https://s.w.org/images/block-editor/welcome-editor.svg",media:"(prefers-reduced-motion: reduce)"}),(0,a.createElement)("img",{className:"customize-widgets-welcome-guide__image",src:"https://s.w.org/images/block-editor/welcome-editor.gif",width:"312",height:"240",alt:""}))),(0,a.createElement)("h1",{className:"customize-widgets-welcome-guide__heading"},oe("Welcome to block Widgets")),(0,a.createElement)("p",{className:"customize-widgets-welcome-guide__text"},oe(r?"Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.":"You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.")),(0,a.createElement)(M.Button,{className:"customize-widgets-welcome-guide__button",variant:"primary",onClick:function(){return n("core/customize-widgets","welcomeGuide")}},oe("Got it")),(0,a.createElement)("hr",{className:"customize-widgets-welcome-guide__separator"}),!r&&(0,a.createElement)("p",{className:"customize-widgets-welcome-guide__more-info"},oe("Want to stick with the old widgets?"),(0,a.createElement)("br",null),(0,a.createElement)(M.ExternalLink,{href:oe("https://wordpress.org/plugins/classic-widgets/")},oe("Get the Classic Widgets plugin."))),(0,a.createElement)("p",{className:"customize-widgets-welcome-guide__more-info"},oe("New to the block editor?"),(0,a.createElement)("br",null),(0,a.createElement)(M.ExternalLink,{href:oe("https://wordpress.org/support/article/wordpress-editor/")},oe("Here's a detailed guide."))))}function Wt(e){let{undo:t,redo:n,save:r}=e;return(0,V.useShortcut)("core/customize-widgets/undo",(function(e){t(),e.preventDefault()})),(0,V.useShortcut)("core/customize-widgets/redo",(function(e){n(),e.preventDefault()})),(0,V.useShortcut)("core/customize-widgets/save",(function(e){e.preventDefault(),r()})),null}Wt.Register=function(){const{registerShortcut:e,unregisterShortcut:t}=(0,z.useDispatch)(V.store);return(0,a.useEffect)((function(){return e({name:"core/customize-widgets/undo",category:"global",description:(0,h.__)("Undo your last changes.","blocksy"),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/customize-widgets/redo",category:"global",description:(0,h.__)("Redo your last undo.","blocksy"),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/customize-widgets/save",category:"global",description:(0,h.__)("Save your changes.","blocksy"),keyCombination:{modifier:"primary",character:"s"}}),function(){t("core/customize-widgets/undo"),t("core/customize-widgets/redo"),t("core/customize-widgets/save")}}),[e]),null};var $t=Wt;const Gt=["onError"];function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xt(e){let{blockEditorSettings:t,sidebar:n,inserter:r,inspector:o}=e;const[i,c]=function(e){const t=(0,z.useSelect)((function(e){return e(tt).isInserterOpened()}),[]),{setIsInserterOpened:n}=(0,z.useDispatch)(tt);return(0,a.useEffect)((function(){t?e.open():e.close()}),[e,t]),[t,(0,a.useCallback)((function(e){let t=e;"function"==typeof e&&(t=e((0,z.select)(tt).isInserterOpened())),n(t)}),[n])]}(r),{hasUploadPermissions:s,isFixedToolbarActive:l,keepCaretInsideBlock:u,isWelcomeGuideActive:p}=(0,z.useSelect)((function(e){const{isFeatureActive:t}=e(Be);return{hasUploadPermissions:de()(e(fe.store).canUser("create","media"),!0),isFixedToolbarActive:t("core/customize-widgets","fixedToolbar"),keepCaretInsideBlock:t("core/customize-widgets","keepCaretInsideBlock"),isWelcomeGuideActive:t("core/customize-widgets","welcomeGuide")}}),[]),d=(0,a.useMemo)((function(){let e;return s&&(e=function(e){let{onError:n}=e,r=Yt(e,Gt);(0,me.uploadMedia)(Zt({wpAllowedMimeTypes:t.allowedMimeTypes,onError:function(e){let{message:t}=e;return n(t)}},r))}),Zt(Zt({},t),{},{__experimentalSetIsInserterOpened:function(e){return c(e)},mediaUpload:e,hasFixedToolbar:l,keepCaretInsideBlock:u,__unstableHasCustomAppender:!0})}),[s,t,l,u,c]);return p?(0,a.createElement)(Ht,{sidebar:n}):(0,a.createElement)(React.Fragment,null,(0,a.createElement)(ce.BlockEditorKeyboardShortcuts.Register,null),(0,a.createElement)($t.Register,null),(0,a.createElement)(Ut,{sidebar:n,settings:d},(0,a.createElement)($t,{undo:n.undo,redo:n.redo,save:n.save}),(0,a.createElement)(xt,{sidebar:n,inserter:r,isInserterOpened:i,setIsInserterOpened:c,isFixedToolbarActive:l}),(0,a.createElement)(ce.CopyHandler,null,(0,a.createElement)(ce.BlockTools,null,(0,a.createElement)(ce.__unstableEditorStyles,{styles:d.styles,scope:".editor-styles-wrapper"}),(0,a.createElement)(ce.BlockSelectionClearer,null,(0,a.createElement)(ce.WritingFlow,{className:"editor-styles-wrapper"},(0,a.createElement)(ce.ObserveTyping,null,(0,a.createElement)(ce.BlockList,{renderAppender:ce.ButtonBlockAppender})))))),(0,a.createPortal)((0,a.createElement)("form",{onSubmit:function(e){return e.preventDefault()}},(0,a.createElement)(ce.BlockInspector,null)),document.querySelector(".ct-tmp-panel-wrapper .ct-customizer-panel").lastElementChild.querySelector(".customizer-panel-content"))),(0,a.createElement)(ce.__unstableBlockSettingsMenuFirstItem,null,(function(e){let{onClose:t}=e;return(0,a.createElement)(He,{inspector:o,closeMenu:t})})))}(0,a.createContext)();const Jt=(0,a.createContext)();function Qt(e){let{sidebarControls:t,activeSidebarControl:n,children:r}=e;const o=(0,a.useMemo)((function(){return{sidebarControls:t,activeSidebarControl:n}}),[t,n]);return(0,a.createElement)(Jt.Provider,{value:o},r)}const{wp:en}=window;function tn(e){const t=e.match(/^(.+)-(\d+)$/);return t?{idBase:t[1],number:parseInt(t[2],10)}:{idBase:e}}function nn(e){const{idBase:t,number:n}=tn(e);return n?`widget_${t}[${n}]`:`widget_${t}`}class rn{constructor(e,t){var n=this;this.setting=e,this.api=en.customize,this.locked=!1,this.widgetsCache=new WeakMap,this.subscribers=new Set,this.history=[this._getWidgetIds().map((function(e){return n.getWidget(e)}))],this.historyIndex=0,this.historySubscribers=new Set,this._debounceSetHistory=function(e,t,n){let r,o=!1;function i(){for(var i=arguments.length,a=new Array(i),c=0;c0}hasRedo(){return this.historyIndex1,c=t.name,s=t.clientId,l=(0,z.useSelect)((function(e){return e(ce.store).canInsertBlockType(c,"")}),[c]),u=(0,z.useSelect)((function(e){return e(ce.store).getBlock(s)}),[s]),{removeBlock:p}=(0,z.useDispatch)(ce.store);return(0,a.createElement)(React.Fragment,null,(0,a.createElement)(e,t),i&&l&&(0,a.createElement)(ce.BlockControls,null,(0,a.createElement)(F.MoveToWidgetArea,{widgetAreas:r.map((function(e){return{id:e.id,name:e.params.label,description:e.params.description}})),currentWidgetAreaId:null==o?void 0:o.id,onSelect:function(e){const t=r.find((function(t){return t.id===e}));if(n){const e=o.setting,r=t.setting;e(sn()(e(),n)),r([...r(),n])}else{const e=t.sidebarAdapter;p(s);const r=e.setWidgets([...e.getWidgets(),Bt(u)]);n=r.reverse().find((function(e){return!!e}))}}})))}}),"withMoveToSidebarToolbarItem");var ln=function(e){let{option:{sidebarId:t="ct-footer-sidebar-1"}}=e;window.blocksyWidgetsBlockEditorSettings;const{panelsState:n,panelsDispatch:r}=(0,a.useContext)(P.Q),[o,i]=(0,a.useState)(null),c=(0,a.useRef)();(0,a.useRef)();(0,a.useEffect)((function(){return(0,L.removeFilter)("editor.BlockEdit","core/customize-widgets/block-edit"),function(){document.body.classList.remove("outer-section-open")}}),[]);!function(e,t){const{hasSelectedBlock:n,hasMultiSelection:r}=(0,z.useSelect)(ce.store),{clearSelectedBlock:o}=(0,z.useDispatch)(ce.store);(0,a.useEffect)((function(){function i(i){t.current&&e&&(!n()&&!r()||!i||!document.contains(i)||t.current.contains(i)||i.closest('[role="dialog"]')||i.closest('[role="toolbar"]')||i.closest(".components-popover__content")||i.closest(".ct-panel-second-level")||i.closest(".wp-block-legacy-widget__edit-form")||o())}function a(e){i(e.target)}function c(){i(document.activeElement)}return document.addEventListener("mousedown",a),window.addEventListener("blur",c),function(){document.removeEventListener("mousedown",a),window.removeEventListener("blur",c)}}),[t,e,n,r,o])}(wp.customize.control(`sidebars_widgets[${t}]`),c),(0,a.useEffect)((function(){r({type:"PANEL_RECEIVE_META",payload:{secondLevelTitleLabel:(0,h.__)("Block Settings","blocksy")}}),setTimeout((function(){i(!0)}),1e3)}),[]),document.querySelector(".ct-tmp-panel-actions")||document.body.insertAdjacentHTML("beforeend",'
');const s=(0,a.createPortal)((0,a.createElement)("div",{className:"customize-widgets-popover",ref:c},(0,a.createElement)(M.Popover.Slot,null)),document.querySelector(".ct-tmp-panel-actions"));return o?(0,a.createElement)(M.SlotFillProvider,null,(0,a.createElement)("div",{className:"customize-control-sidebar_block_editor ct-option-widget-area"},(0,a.createElement)(an,{sidebarId:t,key:t}),s)):(0,a.createElement)("div",{className:"ct-option-widget-area ct-loading"},(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100",className:"ct-loader"},(0,a.createElement)("g",{transform:"translate(50,50)"},(0,a.createElement)("g",{transform:"scale(1)"},(0,a.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,a.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,a.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))))};function un(){return un=Object.assign?Object.assign.bind():function(e){for(var t=1;t