diff --git a/js/block-editor.asset.php b/js/block-editor.asset.php index f1b6599e6..af8fe4117 100644 --- a/js/block-editor.asset.php +++ b/js/block-editor.asset.php @@ -1 +1 @@ - array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '558667256f0d3fc475cd'); + array('wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '58afb0a9ee7fa6faecd7'); diff --git a/js/block-editor.js b/js/block-editor.js index 9fecfea2d..73852db5f 100644 --- a/js/block-editor.js +++ b/js/block-editor.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={6087(e){e.exports=window.wp.element}};const t={};function r(o){const a=t[o];if(void 0!==a)return a.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;oObject.hasOwn(e,t);const o=window.wp.apiFetch;var a=r.n(o);const i=window.wp.i18n,n=window.wp.data,s=window.wp.components;var l=r(6087);const d={_init(){"undefined"!=typeof CLD_VIDEO_PLAYER&&wp.hooks.addFilter("blocks.registerBlockType","Cloudinary/Media/Video",function(e,t){return"core/video"===t&&("off"!==CLD_VIDEO_PLAYER.video_autoplay_mode&&(e.attributes.autoplay.default=!0),"on"===CLD_VIDEO_PLAYER.video_loop&&(e.attributes.loop.default=!0),"off"===CLD_VIDEO_PLAYER.video_controls&&(e.attributes.controls.default=!1)),e})}};d._init();wp.hooks.addFilter("blocks.registerBlockType","cloudinary/addAttributes",function(e,t){return"core/image"!==t&&"core/video"!==t||(e.attributes||(e.attributes={}),e.attributes.overwrite_transformations={type:"boolean"},e.attributes.transformations={type:"boolean"}),e});const c=e=>{const{attributes:{overwrite_transformations:t},setAttributes:r}=e;return l.createElement(s.PanelBody,{title:(0,i.__)("Transformations","cloudinary")},l.createElement(s.ToggleControl,{label:(0,i.__)("Overwrite Global Transformations","cloudinary"),checked:t,onChange:e=>{r({overwrite_transformations:e})},__nextHasNoMarginBottom:!0}))};let u=e=>{const{setAttributes:t,media:r}=e,{InspectorControls:o}=wp.editor;return r&&r.transformations&&t({transformations:!0}),l.createElement(o,null,l.createElement(c,e))};u=(0,n.withSelect)((e,t)=>({...t,media:t.attributes.id?e("core").getMedia(t.attributes.id):null}))(u);wp.hooks.addFilter("editor.BlockEdit","cloudinary/filterEdit",e=>t=>{const{name:r}=t,o="core/image"===r||"core/video"===r;return l.createElement(l.Fragment,null,o?l.createElement(u,t):null,l.createElement(e,t))},20);var m=r(6087);let p=e=>m.createElement(m.Fragment,null,e.modalClass&&m.createElement(s.ToggleControl,{label:(0,i.__)("Overwrite Cloudinary Global Transformations","cloudinary"),checked:e.overwrite_featured_transformations,onChange:t=>e.setOverwrite(t),className:"cloudinary-overwrite-transformations",__nextHasNoMarginBottom:!0}));p=(0,n.withSelect)(e=>({overwrite_featured_transformations:e("core/editor")?.getEditedPostAttribute("meta")._cloudinary_featured_overwrite??!1}))(p),p=(0,n.withDispatch)(e=>({setOverwrite:t=>{e("core/editor").editPost({meta:{_cloudinary_featured_overwrite:t}})}}))(p);const h=e=>class extends e{render(){return m.createElement(m.Fragment,null,super.render(),!!this.props.value&&m.createElement(p,this.props))}},f={_init(){wp.hooks.addFilter("editor.MediaUpload","cloudinary/filter-featured-image",h)}};f._init();const _={wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},taxonomies:null,fetchWait:null,_init(){if(this.wrapper=document.getElementById("cld-tax-items"),!this.wrapper)return;const{getTaxonomies:e}=(0,n.select)("core");this.fetchWait=setInterval(()=>{this.taxonomies=e(),this.taxonomies&&(clearInterval(this.fetchWait),this._init_listeners())},1e3)},_init_listeners(){this.taxonomies.forEach(e=>{e.rest_base&&e.visibility.public&&(0,n.subscribe)(()=>{const t=e.slug,r=e.hierarchical,{isResolving:o}=(0,n.select)("core/data"),a=["taxonomy",t,this.query];this.available[t]=null,r&&(this.available[t]=(0,n.select)("core").getEntityRecords("taxonomy",t,this.query)),o("core","getEntityRecords",a)||this.event(e)})})},event(e){const t=(0,n.select)("core/editor").getEditedPostAttribute(e.rest_base);if(!t)return;const r=[...t],o=Array.from(this.wrapper.querySelectorAll(`[data-item*="${e.slug}"]`));[...r].forEach(t=>{const r=this.wrapper.querySelector(`[data-item="${e.slug}:${t}"]`);o.splice(o.indexOf(r),1),null===r&&this.createItem(this.getItem(e,t))}),o.forEach(e=>{e.parentNode.removeChild(e)})},createItem(e){if(!e||!e.id)return;const t=document.createElement("li"),r=document.createElement("span"),o=document.createElement("input"),a=document.createTextNode(e.name);t.classList.add("cld-tax-order-list-item"),t.dataset.item=`${e.taxonomy}:${e.id}`,o.classList.add("cld-tax-order-list-item-input"),o.type="hidden",o.name="cld_tax_order[]",o.value=`${e.taxonomy}:${e.id}`,r.className="dashicons dashicons-menu cld-tax-order-list-item-handle",t.appendChild(r),t.appendChild(o),t.appendChild(a),this.wrapper.appendChild(t)},getItem(e,t){let r={};if(null===this.available[e.slug])r=(0,n.select)("core").getEntityRecord("taxonomy",e.slug,t);else for(const o of this.available[e.slug])if(o.id===t){r=o,r.taxonomy=e.slug;break}return r}};window.addEventListener("load",()=>_._init());window.$=window.jQuery,a().use((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-cld-fetch-from-editor"]="true",t(e)})})(); +(()=>{"use strict";var e={6087(e){e.exports=window.wp.element}};const t={};function r(o){const i=t[o];if(void 0!==i)return i.exports;const a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;oObject.hasOwn(e,t);const o=window.wp.apiFetch;var i=r.n(o);const a=window.wp.i18n,n=window.wp.data;var s=r(6087);const l=window.wp.components,d=window.wp.hooks,c=window.wp.blockEditor;var u=r(6087);const m={_init(){"undefined"!=typeof CLD_VIDEO_PLAYER&&(0,d.addFilter)("blocks.registerBlockType","Cloudinary/Media/Video",function(e,t){return"core/video"===t&&("off"!==CLD_VIDEO_PLAYER.video_autoplay_mode&&(e.attributes.autoplay.default=!0),"on"===CLD_VIDEO_PLAYER.video_loop&&(e.attributes.loop.default=!0),"off"===CLD_VIDEO_PLAYER.video_controls&&(e.attributes.controls.default=!1)),e})}};m._init();(0,d.addFilter)("blocks.registerBlockType","cloudinary/addAttributes",function(e,t){return"core/image"!==t&&"core/video"!==t||(e.attributes||(e.attributes={}),e.attributes.overwrite_transformations={type:"boolean"},e.attributes.transformations={type:"boolean"}),e});const p=e=>{const{attributes:{overwrite_transformations:t},setAttributes:r}=e;return u.createElement(l.PanelBody,{title:(0,a.__)("Transformations","cloudinary")},u.createElement(l.ToggleControl,{label:(0,a.__)("Overwrite Global Transformations","cloudinary"),checked:t,onChange:e=>{r({overwrite_transformations:e})},__nextHasNoMarginBottom:!0}))};let f=e=>{const{setAttributes:t,media:r}=e;return(0,s.useEffect)(()=>{r&&r.transformations&&t({transformations:!0})},[r,t]),u.createElement(c.InspectorControls,null,u.createElement(p,e))};f=(0,n.withSelect)((e,t)=>({...t,media:t.attributes.id?e("core").getMedia(t.attributes.id):null}))(f);(0,d.addFilter)("editor.BlockEdit","cloudinary/filterEdit",e=>t=>{const{name:r}=t,o="core/image"===r||"core/video"===r;return u.createElement(u.Fragment,null,o?u.createElement(f,t):null,u.createElement(e,t))},20);var h=r(6087);let _=e=>h.createElement(h.Fragment,null,e.modalClass&&h.createElement(l.ToggleControl,{label:(0,a.__)("Overwrite Cloudinary Global Transformations","cloudinary"),checked:e.overwrite_featured_transformations,onChange:t=>e.setOverwrite(t),className:"cloudinary-overwrite-transformations",__nextHasNoMarginBottom:!0}));_=(0,n.withSelect)(e=>({overwrite_featured_transformations:e("core/editor")?.getEditedPostAttribute("meta")._cloudinary_featured_overwrite??!1}))(_),_=(0,n.withDispatch)(e=>({setOverwrite:t=>{e("core/editor").editPost({meta:{_cloudinary_featured_overwrite:t}})}}))(_);const w=e=>class extends e{render(){return h.createElement(h.Fragment,null,super.render(),!!this.props.value&&h.createElement(_,this.props))}},y={_init(){(0,d.addFilter)("editor.MediaUpload","cloudinary/filter-featured-image",w)}};y._init();const b={wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},taxonomies:null,fetchWait:null,_init(){if(this.wrapper=document.getElementById("cld-tax-items"),!this.wrapper)return;const{getTaxonomies:e}=(0,n.select)("core");this.fetchWait=setInterval(()=>{this.taxonomies=e(),this.taxonomies&&(clearInterval(this.fetchWait),this._init_listeners())},1e3)},_init_listeners(){this.taxonomies.forEach(e=>{e.rest_base&&e.visibility.public&&(0,n.subscribe)(()=>{const t=e.slug,r=e.hierarchical,{isResolving:o}=(0,n.select)("core/data"),i=["taxonomy",t,this.query];this.available[t]=null,r&&(this.available[t]=(0,n.select)("core").getEntityRecords("taxonomy",t,this.query)),o("core","getEntityRecords",i)||this.event(e)})})},event(e){const t=(0,n.select)("core/editor").getEditedPostAttribute(e.rest_base);if(!t)return;const r=[...t],o=Array.from(this.wrapper.querySelectorAll(`[data-item*="${e.slug}"]`));[...r].forEach(t=>{const r=this.wrapper.querySelector(`[data-item="${e.slug}:${t}"]`);o.splice(o.indexOf(r),1),null===r&&this.createItem(this.getItem(e,t))}),o.forEach(e=>{e.parentNode.removeChild(e)})},createItem(e){if(!e||!e.id)return;const t=document.createElement("li"),r=document.createElement("span"),o=document.createElement("input"),i=document.createTextNode(e.name);t.classList.add("cld-tax-order-list-item"),t.dataset.item=`${e.taxonomy}:${e.id}`,o.classList.add("cld-tax-order-list-item-input"),o.type="hidden",o.name="cld_tax_order[]",o.value=`${e.taxonomy}:${e.id}`,r.className="dashicons dashicons-menu cld-tax-order-list-item-handle",t.appendChild(r),t.appendChild(o),t.appendChild(i),this.wrapper.appendChild(t)},getItem(e,t){let r={};if(null===this.available[e.slug])r=(0,n.select)("core").getEntityRecord("taxonomy",e.slug,t);else for(const o of this.available[e.slug])if(o.id===t){r=o,r.taxonomy=e.slug;break}return r}};window.addEventListener("load",()=>b._init());window.$=window.jQuery,i().use((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-cld-fetch-from-editor"]="true",t(e)})})(); //# sourceMappingURL=block-editor.js.map \ No newline at end of file diff --git a/js/gallery-block.asset.php b/js/gallery-block.asset.php index 6ca6069dc..adacfc98a 100644 --- a/js/gallery-block.asset.php +++ b/js/gallery-block.asset.php @@ -1 +1 @@ - array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b1a6274664dedd209b5d'); + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c2bfb5ad5742b3b9b98f'); diff --git a/js/gallery-block.js b/js/gallery-block.js index 858b39dc2..46a798bc5 100644 --- a/js/gallery-block.js +++ b/js/gallery-block.js @@ -1,2 +1,2 @@ -(()=>{var e={776(e,t,r){"use strict";const n=window.wp.i18n,o=window.wp.blocks;var a=r.cjs(function(e,t){function r(e,t){var r,n;if("function"==typeof t)void 0!==(n=t(e))&&(e=n);else if(Array.isArray(t))for(r=0;r=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t);if(r.filter(l).length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var u=Object.prototype.hasOwnProperty;function p(e,t,r,n){if(!(this instanceof p))return new p(e,t,r,n);void 0===t&&(t=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var d=new p(".",!1,!0,!0);function f(e){return function(){return d[e].apply(d,arguments)}}p.prototype._fill=function(e,t,n,o){var s=e.shift();if(e.length>0){if(t[s]=t[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[s])){if(!this.override){if(!a(n)||!i(n))throw new Error("Trying to redefine `"+s+"` which is a "+typeof t[s]);return}t[s]={}}this._fill(e,t[s],n,o)}else{if(!this.override&&a(t[s])&&!i(t[s])){if(!a(n)||!i(n))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}t[s]=r(n,o)}},p.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(o){var a=void 0===t?null:t[o],i=c(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)}),e},p.prototype.str=function(e,t,n,o){var a=c(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},p.prototype.pick=function(e,t,r,o){var a,i,s,l,u;for(i=c(e,this.separator),a=0;am.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-round"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})))),h=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"ratio-square"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})))),y=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-radius"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})))),b=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-none"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})))),g=[{value:{type:"expanded",columns:1},icon:()=>m.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-modern"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})))),label:(0,n.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>m.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-grid-2-column"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})))),label:(0,n.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>m.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-grid-3-column"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},m.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})))),label:(0,n.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>m.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-classic"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},m.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})))),label:(0,n.__)("Classic","cloudinary")}],_=["image"],x=[{label:(0,n.__)("1:1","cloudinary"),value:"1:1"},{label:(0,n.__)("3:4","cloudinary"),value:"3:4"},{label:(0,n.__)("4:3","cloudinary"),value:"4:3"},{label:(0,n.__)("4:6","cloudinary"),value:"4:6"},{label:(0,n.__)("6:4","cloudinary"),value:"6:4"},{label:(0,n.__)("5:7","cloudinary"),value:"5:7"},{label:(0,n.__)("7:5","cloudinary"),value:"7:5"},{label:(0,n.__)("8:5","cloudinary"),value:"8:5"},{label:(0,n.__)("5:8","cloudinary"),value:"5:8"},{label:(0,n.__)("9:16","cloudinary"),value:"9:16"},{label:(0,n.__)("16:9","cloudinary"),value:"16:9"}],w=[{label:(0,n.__)("None","cloudinary"),value:"none"},{label:(0,n.__)("Fade","cloudinary"),value:"fade"},{label:(0,n.__)("Slide","cloudinary"),value:"slide"}],L=[{label:(0,n.__)("Always","cloudinary"),value:"always"},{label:(0,n.__)("None","cloudinary"),value:"none"},{label:(0,n.__)("MouseOver","cloudinary"),value:"mouseover"}],E=[{label:(0,n.__)("Inline","cloudinary"),value:"inline"},{label:(0,n.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,n.__)("Popup","cloudinary"),value:"popup"}],O=[{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"}],j=[{label:(0,n.__)("Click","cloudinary"),value:"click"},{label:(0,n.__)("Hover","cloudinary"),value:"hover"}],A=[{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"},{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"}],P=[{label:(0,n.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,n.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,n.__)("None","cloudinary"),value:"none"}],k=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"none",icon:b,label:(0,n.__)("None","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")},{value:"rectangle",icon:()=>m.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"ratio-9-16"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},m.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})))),label:(0,n.__)("Rectangle","cloudinary")}],S=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")}],C=[{label:(0,n.__)("All","cloudinary"),value:"all"},{label:(0,n.__)("Border","cloudinary"),value:"border"},{label:(0,n.__)("Gradient","cloudinary"),value:"gradient"}],M=[{label:(0,n.__)("All","cloudinary"),value:"all"},{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,n.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"}],T=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"none",icon:b,label:(0,n.__)("None","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")}],B=[{label:(0,n.__)("Pad","cloudinary"),value:"pad"},{label:(0,n.__)("Fill","cloudinary"),value:"fill"}],D=[{label:(0,n.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,n.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,n.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,n.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var N=r(6942),R=r.n(N),Z=r(6087);const z=({value:e,children:t,icon:r,onChange:n,current:o})=>{const a="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return Z.createElement("button",{type:"button",onClick:()=>n(e),className:R()("radio-select",{"radio-select--active":a})},Z.createElement(r,null),Z.createElement("div",{className:"radio-select__label"},t))};r.dn(z);const F=window.wp.data,I=e=>e<10?"0"+String(e):e.toString(16),W=e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,I).join("")},H=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e};function V(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function U(e){return e instanceof V(e).Element||e instanceof Element}function q(e){return e instanceof V(e).HTMLElement||e instanceof HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof V(e).ShadowRoot||e instanceof ShadowRoot)}var G=Math.max,X=Math.min,J=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function K(){return!/^((?!chrome|android).)*safari/i.test(Y())}function Q(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&q(e)&&(o=e.offsetWidth>0&&J(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&J(n.height)/e.offsetHeight||1);var i=(U(e)?V(e):window).visualViewport,s=!K()&&r,l=(n.left+(s&&i?i.offsetLeft:0))/o,c=(n.top+(s&&i?i.offsetTop:0))/a,u=n.width/o,p=n.height/a;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l,x:l,y:c}}function ee(e){var t=V(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function te(e){return e?(e.nodeName||"").toLowerCase():null}function re(e){return((U(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return Q(re(e)).left+ee(e).scrollLeft}function oe(e){return V(e).getComputedStyle(e)}function ae(e){var t=oe(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ie(e,t,r){void 0===r&&(r=!1);var n,o,a=q(t),i=q(t)&&function(e){var t=e.getBoundingClientRect(),r=J(t.width)/e.offsetWidth||1,n=J(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=re(t),l=Q(e,i,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!r)&&(("body"!==te(t)||ae(s))&&(c=(n=t)!==V(n)&&q(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:ee(n)),q(t)?((u=Q(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=ne(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function se(e){var t=Q(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function le(e){return"html"===te(e)?e:e.assignedSlot||e.parentNode||($(e)?e.host:null)||re(e)}function ce(e){return["html","body","#document"].indexOf(te(e))>=0?e.ownerDocument.body:q(e)&&ae(e)?e:ce(le(e))}function ue(e,t){var r;void 0===t&&(t=[]);var n=ce(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=V(n),i=o?[a].concat(a.visualViewport||[],ae(n)?n:[]):n,s=t.concat(i);return o?s:s.concat(ue(le(i)))}function pe(e){return["table","td","th"].indexOf(te(e))>=0}function de(e){return q(e)&&"fixed"!==oe(e).position?e.offsetParent:null}function fe(e){for(var t=V(e),r=de(e);r&&pe(r)&&"static"===oe(r).position;)r=de(r);return r&&("html"===te(r)||"body"===te(r)&&"static"===oe(r).position)?t:r||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&q(e)&&"fixed"===oe(e).position)return null;var r=le(e);for($(r)&&(r=r.host);q(r)&&["html","body"].indexOf(te(r))<0;){var n=oe(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var me="top",ve="bottom",he="right",ye="left",be="auto",ge=[me,ve,he,ye],_e="start",xe="end",we="viewport",Le="popper",Ee=ge.reduce(function(e,t){return e.concat([t+"-"+_e,t+"-"+xe])},[]),Oe=[].concat(ge,[be]).reduce(function(e,t){return e.concat([t,t+"-"+_e,t+"-"+xe])},[]),je=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ae(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function ke(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function De(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?Me(o):null,i=o?Te(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(a){case me:t={x:s,y:r.y-n.height};break;case ve:t={x:s,y:r.y+r.height};break;case he:t={x:r.x+r.width,y:l};break;case ye:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=a?Be(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case _e:t[c]=t[c]-(r[u]/2-n[u]/2);break;case xe:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Re(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=i.x,f=void 0===d?0:d,m=i.y,v=void 0===m?0:m,h="function"==typeof u?u({x:f,y:v}):{x:f,y:v};f=h.x,v=h.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),g=ye,_=me,x=window;if(c){var w=fe(r),L="clientHeight",E="clientWidth";if(w===V(r)&&"static"!==oe(w=re(r)).position&&"absolute"===s&&(L="scrollHeight",E="scrollWidth"),o===me||(o===ye||o===he)&&a===xe)_=ve,v-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[L])-n.height,v*=l?1:-1;if(o===ye||(o===me||o===ve)&&a===xe)g=he,f-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-n.width,f*=l?1:-1}var O,j=Object.assign({position:s},c&&Ne),A=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:J(r*o)/o||0,y:J(n*o)/o||0}}({x:f,y:v},V(r)):{x:f,y:v};return f=A.x,v=A.y,l?Object.assign({},j,((O={})[_]=b?"0":"",O[g]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",O)):Object.assign({},j,((t={})[_]=b?v+"px":"",t[g]=y?f+"px":"",t.transform="",t))}const Ze={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];q(o)&&te(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});q(n)&&te(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};const ze={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=Oe.reduce(function(e,r){return e[r]=function(e,t,r){var n=Me(e),o=[ye,me].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[ye,he].indexOf(n)>=0?{x:s,y:i}:{x:i,y:s}}(r,t.rects,a),e},{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var Fe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ie(e){return e.replace(/left|right|bottom|top/g,function(e){return Fe[e]})}var We={start:"end",end:"start"};function He(e){return e.replace(/start|end/g,function(e){return We[e]})}function Ve(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&$(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qe(e,t,r){return t===we?Ue(function(e,t){var r=V(e),n=re(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var c=K();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+ne(e),y:l}}(e,r)):U(t)?function(e,t){var r=Q(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Ue(function(e){var t,r=re(e),n=ee(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=G(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=G(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+ne(e),l=-n.scrollTop;return"rtl"===oe(o||r).direction&&(s+=G(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(re(e)))}function $e(e,t,r,n){var o="clippingParents"===t?function(e){var t=ue(le(e)),r=["absolute","fixed"].indexOf(oe(e).position)>=0&&q(e)?fe(e):e;return U(r)?t.filter(function(e){return U(e)&&Ve(e,r)&&"body"!==te(e)}):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],s=a.reduce(function(t,r){var o=qe(e,r,n);return t.top=G(o.top,t.top),t.right=X(o.right,t.right),t.bottom=X(o.bottom,t.bottom),t.left=G(o.left,t.left),t},qe(e,i,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ge(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Xe(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function Je(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?we:c,p=r.elementContext,d=void 0===p?Le:p,f=r.altBoundary,m=void 0!==f&&f,v=r.padding,h=void 0===v?0:v,y=Ge("number"!=typeof h?h:Xe(h,ge)),b=d===Le?"reference":Le,g=e.rects.popper,_=e.elements[m?b:d],x=$e(U(_)?_:_.contextElement||re(e.elements.popper),l,u,i),w=Q(e.elements.reference),L=De({reference:w,element:g,strategy:"absolute",placement:o}),E=Ue(Object.assign({},g,L)),O=d===Le?E:w,j={top:x.top-O.top+y.top,bottom:O.bottom-x.bottom+y.bottom,left:x.left-O.left+y.left,right:O.right-x.right+y.right},A=e.modifiersData.offset;if(d===Le&&A){var P=A[o];Object.keys(j).forEach(function(e){var t=[he,ve].indexOf(e)>=0?1:-1,r=[me,ve].indexOf(e)>=0?"y":"x";j[e]+=P[r]*t})}return j}function Ye(e,t,r){return G(e,X(t,r))}const Ke={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0!==i&&i,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,p=r.padding,d=r.tether,f=void 0===d||d,m=r.tetherOffset,v=void 0===m?0:m,h=Je(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),y=Me(t.placement),b=Te(t.placement),g=!b,_=Be(y),x="x"===_?"y":"x",w=t.modifiersData.popperOffsets,L=t.rects.reference,E=t.rects.popper,O="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,j="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(w){if(a){var k,S="y"===_?me:ye,C="y"===_?ve:he,M="y"===_?"height":"width",T=w[_],B=T+h[S],D=T-h[C],N=f?-E[M]/2:0,R=b===_e?L[M]:E[M],Z=b===_e?-E[M]:-L[M],z=t.elements.arrow,F=f&&z?se(z):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=I[S],H=I[C],V=Ye(0,L[M],F[M]),U=g?L[M]/2-N-V-W-j.mainAxis:R-V-W-j.mainAxis,q=g?-L[M]/2+N+V+H+j.mainAxis:Z+V+H+j.mainAxis,$=t.elements.arrow&&fe(t.elements.arrow),J=$?"y"===_?$.clientTop||0:$.clientLeft||0:0,Y=null!=(k=null==A?void 0:A[_])?k:0,K=T+q-Y,Q=Ye(f?X(B,T+U-Y-J):B,T,f?G(D,K):D);w[_]=Q,P[_]=Q-T}if(s){var ee,te="x"===_?me:ye,re="x"===_?ve:he,ne=w[x],oe="y"===x?"height":"width",ae=ne+h[te],ie=ne-h[re],le=-1!==[me,ye].indexOf(y),ce=null!=(ee=null==A?void 0:A[x])?ee:0,ue=le?ae:ne-L[oe]-E[oe]-ce+j.altAxis,pe=le?ne+L[oe]+E[oe]-ce-j.altAxis:ie,de=f&&le?function(e,t,r){var n=Ye(e,t,r);return n>r?r:n}(ue,ne,pe):Ye(f?ue:ae,ne,f?pe:ie);w[x]=de,P[x]=de-ne}t.modifiersData[n]=P}},requiresIfExists:["offset"]};const Qe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,s=Me(r.placement),l=Be(s),c=[ye,he].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return Ge("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Xe(e,ge))}(o.padding,r),p=se(a),d="y"===l?me:ye,f="y"===l?ve:he,m=r.rects.reference[c]+r.rects.reference[l]-i[l]-r.rects.popper[c],v=i[l]-r.rects.reference[l],h=fe(a),y=h?"y"===l?h.clientHeight||0:h.clientWidth||0:0,b=m/2-v/2,g=u[d],_=y-p[c]-u[f],x=y/2-p[c]/2+b,w=Ye(g,x,_),L=l;r.modifiersData[n]=((t={})[L]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Ve(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function et(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function tt(e){return[me,he,ve,ye].some(function(t){return e[t]>=0})}var rt=Se({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,s=void 0===i||i,l=V(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,Ce)}),s&&l.addEventListener("resize",r.update,Ce),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,Ce)}),s&&l.removeEventListener("resize",r.update,Ce)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=De({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,s=r.roundOffsets,l=void 0===s||s,c={placement:Me(t.placement),variation:Te(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ze,ze,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0===i||i,l=r.fallbackPlacements,c=r.padding,u=r.boundary,p=r.rootBoundary,d=r.altBoundary,f=r.flipVariations,m=void 0===f||f,v=r.allowedAutoPlacements,h=t.options.placement,y=Me(h),b=l||(y===h||!m?[Ie(h)]:function(e){if(Me(e)===be)return[];var t=Ie(e);return[He(e),t,He(t)]}(h)),g=[h].concat(b).reduce(function(e,r){return e.concat(Me(r)===be?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?Oe:l,u=Te(n),p=u?s?Ee:Ee.filter(function(e){return Te(e)===u}):ge,d=p.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=p);var f=d.reduce(function(t,r){return t[r]=Je(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[Me(r)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:r,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:v}):r)},[]),_=t.rects.reference,x=t.rects.popper,w=new Map,L=!0,E=g[0],O=0;O=0,S=k?"width":"height",C=Je(t,{placement:j,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),M=k?P?he:ye:P?ve:me;_[S]>x[S]&&(M=Ie(M));var T=Ie(M),B=[];if(a&&B.push(C[A]<=0),s&&B.push(C[M]<=0,C[T]<=0),B.every(function(e){return e})){E=j,L=!1;break}w.set(j,B)}if(L)for(var D=function(e){var t=g.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},N=m?3:1;N>0;N--){if("break"===D(N))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ke,Qe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Je(t,{elementContext:"reference"}),s=Je(t,{altBoundary:!0}),l=et(i,n),c=et(s,o,a),u=tt(l),p=tt(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),nt="tippy-content",ot="tippy-backdrop",at="tippy-arrow",it="tippy-svg-arrow",st={passive:!0,capture:!0},lt=function(){return document.body};function ct(e,t,r){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(r)?r[t]:r)}return e}function ut(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function pt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function dt(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function ft(e){return[].concat(e)}function mt(e,t){-1===e.indexOf(t)&&e.push(t)}function vt(e){return e.split("-")[0]}function ht(e){return[].slice.call(e)}function yt(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function bt(){return document.createElement("div")}function gt(e){return["Element","Fragment"].some(function(t){return ut(e,t)})}function _t(e){return ut(e,"MouseEvent")}function xt(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function wt(e){return gt(e)?[e]:function(e){return ut(e,"NodeList")}(e)?ht(e):Array.isArray(e)?e:ht(document.querySelectorAll(e))}function Lt(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Et(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Ot(e){var t,r=ft(e)[0];return null!=r&&null!=(t=r.ownerDocument)&&t.body?r.ownerDocument:document}function jt(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function At(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var Pt={isTouch:!1},kt=0;function St(){Pt.isTouch||(Pt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ct))}function Ct(){var e=performance.now();e-kt<20&&(Pt.isTouch=!1,document.removeEventListener("mousemove",Ct)),kt=e}function Mt(){var e=document.activeElement;if(xt(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Tt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Bt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Dt=Object.assign({appendTo:lt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Bt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Nt=Object.keys(Dt);function Rt(e){var t=(e.plugins||[]).reduce(function(t,r){var n,o=r.name,a=r.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Dt[o])?n:a);return t},{});return Object.assign({},e,t)}function Zt(e,t){var r=Object.assign({},t,{content:pt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Rt(Object.assign({},Dt,{plugins:t}))):Nt).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},Dt.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function zt(e,t){e.innerHTML=t}function Ft(e){var t=bt();return!0===e?t.className=at:(t.className=it,gt(e)?t.appendChild(e):zt(t,e)),t}function It(e,t){gt(t.content)?(zt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zt(e,t.content):e.textContent=t.content)}function Wt(e){var t=e.firstElementChild,r=ht(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(nt)}),arrow:r.find(function(e){return e.classList.contains(at)||e.classList.contains(it)}),backdrop:r.find(function(e){return e.classList.contains(ot)})}}function Ht(e){var t=bt(),r=bt();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=bt();function o(r,n){var o=Wt(t),a=o.box,i=o.content,s=o.arrow;n.theme?a.setAttribute("data-theme",n.theme):a.removeAttribute("data-theme"),"string"==typeof n.animation?a.setAttribute("data-animation",n.animation):a.removeAttribute("data-animation"),n.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||It(i,e.props),n.arrow?s?r.arrow!==n.arrow&&(a.removeChild(s),a.appendChild(Ft(n.arrow))):a.appendChild(Ft(n.arrow)):s&&a.removeChild(s)}return n.className=nt,n.setAttribute("data-state","hidden"),It(n,e.props),t.appendChild(r),r.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}Ht.$$tippy=!0;var Vt=1,Ut=[],qt=[];function $t(e,t){var r,n,o,a,i,s,l,c,u=Zt(e,Object.assign({},Dt,Rt(yt(t)))),p=!1,d=!1,f=!1,m=!1,v=[],h=dt($,u.interactiveDebounce),y=Vt++,b=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),g={id:y,reference:e,popper:bt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){0;if(g.state.isDestroyed)return;T("onBeforeUpdate",[g,t]),U();var r=g.props,n=Zt(e,Object.assign({},r,yt(t),{ignoreAttributes:!0}));g.props=n,V(),r.interactiveDebounce!==n.interactiveDebounce&&(N(),h=dt($,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?ft(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(r,n);g.popperInstance&&(Y(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));T("onAfterUpdate",[g,t])},setContent:function(e){g.setProps({content:e})},show:function(){0;var e=g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=Pt.isTouch&&!g.props.touch,o=ct(g.props.duration,0,Dt.duration);if(e||t||r||n)return;if(P().hasAttribute("disabled"))return;if(T("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,A()&&(x.style.visibility="visible");M(),F(),g.state.isMounted||(x.style.transition="none");if(A()){var a=S();Lt([a.box,a.content],0)}s=function(){var e;if(g.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=g.props.moveTransition,A()&&g.props.animation){var t=S(),r=t.box,n=t.content;Lt([r,n],o),Et([r,n],"visible")}B(),D(),mt(qt,g),null==(e=g.popperInstance)||e.forceUpdate(),T("onMount",[g]),g.props.animation&&A()&&function(e,t){W(e,t)}(o,function(){g.state.isShown=!0,T("onShown",[g])})}},function(){var e,t=g.props.appendTo,r=P();e=g.props.interactive&&t===lt||"parent"===t?r.parentNode:pt(t,[r]);e.contains(x)||e.appendChild(x);g.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=ct(g.props.duration,1,Dt.duration);if(e||t||r)return;if(T("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,m=!1,p=!1,A()&&(x.style.visibility="hidden");if(N(),I(),M(!0),A()){var o=S(),a=o.box,i=o.content;g.props.animation&&(Lt([a,i],n),Et([a,i],"hidden"))}B(),D(),g.props.animation?A()&&function(e,t){W(e,function(){!g.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}(n,g.unmount):g.unmount()},hideWithInteractivity:function(e){0;k().addEventListener("mousemove",h),mt(Ut,h),h(e)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){0;g.state.isVisible&&g.hide();if(!g.state.isMounted)return;K(),Q().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x);qt=qt.filter(function(e){return e!==g}),g.state.isMounted=!1,T("onHidden",[g])},destroy:function(){0;if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),U(),delete e._tippy,g.state.isDestroyed=!0,T("onDestroy",[g])}};if(!u.render)return g;var _=u.render(g),x=_.popper,w=_.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+g.id,g.popper=x,e._tippy=g,x._tippy=g;var L=b.map(function(e){return e.fn(g)}),E=e.hasAttribute("aria-expanded");return V(),D(),M(),T("onCreate",[g]),u.showOnCreate&&ee(),x.addEventListener("mouseenter",function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",h)}),g;function O(){var e=g.props.touch;return Array.isArray(e)?e:[e,0]}function j(){return"hold"===O()[0]}function A(){var e;return!(null==(e=g.props.render)||!e.$$tippy)}function P(){return l||e}function k(){var e=P().parentNode;return e?Ot(e):document}function S(){return Wt(x)}function C(e){return g.state.isMounted&&!g.state.isVisible||Pt.isTouch||a&&"focus"===a.type?0:ct(g.props.delay,e?0:1,Dt.delay)}function M(e){void 0===e&&(e=!1),x.style.pointerEvents=g.props.interactive&&!e?"":"none",x.style.zIndex=""+g.props.zIndex}function T(e,t,r){var n;(void 0===r&&(r=!0),L.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=g.props)[e].apply(n,t)}function B(){var t=g.props.aria;if(t.content){var r="aria-"+t.content,n=x.id;ft(g.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(g.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(r,o):e.removeAttribute(r)}})}}function D(){!E&&g.props.aria.expanded&&ft(g.props.triggerTarget||e).forEach(function(e){g.props.interactive?e.setAttribute("aria-expanded",g.state.isVisible&&e===P()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){k().removeEventListener("mousemove",h),Ut=Ut.filter(function(e){return e!==h})}function R(t){if(!Pt.isTouch||!f&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!g.props.interactive||!At(x,r)){if(ft(g.props.triggerTarget||e).some(function(e){return At(e,r)})){if(Pt.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else T("onClickOutside",[g,t]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),d=!0,setTimeout(function(){d=!1}),g.state.isMounted||I())}}}function Z(){f=!0}function z(){f=!1}function F(){var e=k();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,st),e.addEventListener("touchstart",z,st),e.addEventListener("touchmove",Z,st)}function I(){var e=k();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,st),e.removeEventListener("touchstart",z,st),e.removeEventListener("touchmove",Z,st)}function W(e,t){var r=S().box;function n(e){e.target===r&&(jt(r,"remove",n),t())}if(0===e)return t();jt(r,"remove",i),jt(r,"add",n),i=n}function H(t,r,n){void 0===n&&(n=!1),ft(g.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),v.push({node:e,eventType:t,handler:r,options:n})})}function V(){var e;j()&&(H("touchstart",q,{passive:!0}),H("touchend",G,{passive:!0})),(e=g.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(H(e,q),e){case"mouseenter":H("mouseleave",G);break;case"focus":H(Tt?"focusout":"blur",X);break;case"focusin":H("focusout",X)}})}function U(){v.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,o=e.options;t.removeEventListener(r,n,o)}),v=[]}function q(e){var t,r=!1;if(g.state.isEnabled&&!J(e)&&!d){var n="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,D(),!g.state.isVisible&&_t(e)&&Ut.forEach(function(t){return t(e)}),"click"===e.type&&(g.props.trigger.indexOf("mouseenter")<0||p)&&!1!==g.props.hideOnClick&&g.state.isVisible?r=!0:ee(e),"click"===e.type&&(p=!r),r&&!n&&te(e)}}function $(e){var t=e.target,r=P().contains(t)||x.contains(t);if("mousemove"!==e.type||!r){var n=Q().concat(x).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=vt(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,u="right"===i?s.left.x:0,p="left"===i?s.right.x:0,d=t.top-n+l>a,f=n-t.bottom-c>a,m=t.left-r+u>a,v=r-t.right-p>a;return d||f||m||v})})(n,e)&&(N(),te(e))}}function G(e){J(e)||g.props.trigger.indexOf("click")>=0&&p||(g.props.interactive?g.hideWithInteractivity(e):te(e))}function X(e){g.props.trigger.indexOf("focusin")<0&&e.target!==P()||g.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function J(e){return!!Pt.isTouch&&j()!==e.type.indexOf("touch")>=0}function Y(){K();var t=g.props,r=t.popperOptions,n=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=A()?Wt(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||P()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];A()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==r?void 0:r.modifiers)||[]),g.popperInstance=rt(c,x,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:p}))}function K(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function Q(){return ht(x.querySelectorAll("[data-tippy-root]"))}function ee(e){g.clearDelayTimeouts(),e&&T("onTrigger",[g,e]),F();var t=C(!0),n=O(),o=n[0],a=n[1];Pt.isTouch&&"hold"===o&&a&&(t=a),t?r=setTimeout(function(){g.show()},t):g.show()}function te(e){if(g.clearDelayTimeouts(),T("onUntrigger",[g,e]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=C(!1);t?n=setTimeout(function(){g.state.isVisible&&g.hide()},t):o=requestAnimationFrame(function(){g.hide()})}}else I()}}function Gt(e,t){void 0===t&&(t={});var r=Dt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",St,st),window.addEventListener("blur",Mt);var n=Object.assign({},t,{plugins:r}),o=wt(e).reduce(function(e,t){var r=t&&$t(t,n);return r&&e.push(r),e},[]);return gt(e)?o[0]:o}Gt.defaultProps=Dt,Gt.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Dt[t]=e[t]})},Gt.currentInput=Pt;Object.assign({},Ze,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});Gt.setDefaultProps({render:Ht});const Xt=Gt;var Jt=r(6087);const Yt=({children:e,value:t})=>Jt.createElement("div",{className:"colorpalette-color-label"},Jt.createElement("span",null,e),Jt.createElement("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})),Kt=new(i())("_"),Qt=({attributes:e,setAttributes:t,colors:r})=>{const o=f()(e),a=Kt.object(o),[i,s]=(0,u.useState)(a.customSettings);e.transformation_crop||(e.transformation_crop="pad",e.transformation_background="rgb:FFFFFF"),"fill"===e.transformation_crop&&delete e.transformation_background;const l=(e,r)=>{const n={[r]:H(e)};t(n)},d=(e=>{const[t,r]=(0,u.useState)(null),n=(0,u.useCallback)(e=>r(e),[]);return(0,u.useEffect)(()=>{if(!t)return;const r=Xt(t,{content:e});return()=>{r?.destroy()}},[t,e]),n})((0,n.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary"));return Jt.createElement(Jt.Fragment,null,Jt.createElement(c.PanelBody,{title:(0,n.__)("Layout","cloudinary")},g.map(r=>Jt.createElement(z,{key:`${r.value.type}-${r.value.columns}-layout`,value:r.value,onChange:e=>{t({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:r.icon,current:{type:e.displayProps_mode,columns:e.displayProps_columns||1}},r.label))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Color Palette","cloudinary"),initialOpen:!1},Jt.createElement(Yt,{value:e.themeProps_primary},(0,n.__)("Primary","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_primary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_primary")}),Jt.createElement(Yt,{value:e.themeProps_onPrimary},(0,n.__)("On Primary","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_onPrimary")}),Jt.createElement(Yt,{value:e.themeProps_active},(0,n.__)("Active","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_active,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_active")})),"classic"===e.displayProps_mode&&Jt.createElement(c.PanelBody,{title:(0,n.__)("Fade Transition","cloudinary"),initialOpen:!1},Jt.createElement(c.SelectControl,{value:e.transition,options:w,onChange:e=>t({transition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),Jt.createElement(c.PanelBody,{title:(0,n.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},Jt.createElement(c.SelectControl,{label:(0,n.__)("Aspect Ratio","cloudinary"),value:e.aspectRatio,options:x,onChange:e=>t({aspectRatio:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,Jt.createElement("div",{className:"cld-ui-title"},(0,n.__)("Resize/Crop Mode","cloudinary"),Jt.createElement("span",{className:"dashicons dashicons-info cld-tooltip",ref:d})),Jt.createElement(c.ButtonGroup,null,B.map(r=>Jt.createElement(c.Button,{key:r.value+"-look-and-feel",variant:"secondary",isSecondary:!0,isPressed:r.value===e.transformation_crop,onClick:()=>t({transformation_crop:r.value,transformation_background:null})},r.label)))),"pad"===e.transformation_crop&&Jt.createElement(c.SelectControl,{label:(0,n.__)("Pad style","cloudinary"),value:e.transformation_background,options:D,onChange:e=>{t({transformation_background:e})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Navigation","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,L.map(r=>Jt.createElement(c.Button,{key:r.value+"-navigation",variant:"secondary",isSecondary:!0,isPressed:r.value===e.navigation,onClick:()=>t({navigation:r.value})},r.label)))),Jt.createElement("div",{style:{marginTop:"30px"}},Jt.createElement(c.ToggleControl,{label:(0,n.__)("Show Zoom","cloudinary"),checked:e.zoom,onChange:()=>t({zoom:!e.zoom}),__nextHasNoMarginBottom:!0}),e.zoom&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Zoom Type","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,E.map(r=>Jt.createElement(c.Button,{key:r.value+"-zoom-type",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_type,onClick:()=>t({zoomProps_type:r.value})},r.label)))),"flyout"===e.zoomProps_type&&Jt.createElement(c.SelectControl,{label:(0,n.__)("Zoom Viewer Position","cloudinary"),value:e.zoomProps_viewerPosition,options:O,onChange:e=>t({zoomProps_viewerPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"popup"!==e.zoomProps_type&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Zoom Trigger","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,j.map(r=>Jt.createElement(c.Button,{key:r.value+"-zoom-trigger",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_trigger,onClick:()=>t({zoomProps_trigger:r.value})},r.label)))))))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Carousel Parameters","cloudinary"),initialOpen:!1},Jt.createElement("p",null,(0,n.__)("Carousel Location","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,A.map(r=>Jt.createElement(c.Button,{key:r.value+"-carousel-location",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselLocation,onClick:()=>t({carouselLocation:r.value})},r.label)))),Jt.createElement(c.RangeControl,{label:(0,n.__)("Carousel Offset","cloudinary"),value:e.carouselOffset,onChange:e=>t({carouselOffset:e}),min:0,max:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Carousel Style","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,P.map(r=>Jt.createElement(c.Button,{key:r.value+"-carousel-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselStyle,onClick:()=>t({carouselStyle:r.value})},r.label)))),"thumbnails"===e.carouselStyle&&Jt.createElement(Jt.Fragment,null,Jt.createElement(c.RangeControl,{label:(0,n.__)("Width","cloudinary"),value:e.thumbnailProps_width,onChange:e=>t({thumbnailProps_width:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement(c.RangeControl,{label:(0,n.__)("Height","cloudinary"),value:e.thumbnailProps_height,onChange:e=>t({thumbnailProps_height:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Navigation Button Shape","cloudinary")),k.map(r=>Jt.createElement(z,{key:r.value+"-navigation-button-shape",value:r.value,onChange:e=>t({thumbnailProps_navigationShape:e}),icon:r.icon,current:e.thumbnailProps_navigationShape},r.label)),Jt.createElement("p",null,(0,n.__)("Selected Style","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,C.map(r=>Jt.createElement(c.Button,{key:r.value+"-selected-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.thumbnailProps_selectedStyle,onClick:()=>t({thumbnailProps_selectedStyle:r.value})},r.label)))),Jt.createElement(c.SelectControl,{label:(0,n.__)("Selected Border Position","cloudinary"),value:e.thumbnailProps_selectedBorderPosition,options:M,onChange:e=>t({thumbnailProps_selectedBorderPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement(c.RangeControl,{label:(0,n.__)("Selected Border Width","cloudinary"),value:e.thumbnailProps_selectedBorderWidth,onChange:e=>t({thumbnailProps_selectedBorderWidth:e}),min:0,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Media Shape Icon","cloudinary")),T.map(r=>Jt.createElement(z,{key:r.value+"-media",value:r.value,onChange:e=>t({thumbnailProps_mediaSymbolShape:e}),icon:r.icon,current:e.thumbnailProps_mediaSymbolShape},r.label))),"indicators"===e.carouselStyle&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Indicators Shape","cloudinary")),S.map(r=>Jt.createElement(z,{key:r.value+"-indicator",value:r.value,onChange:e=>t({indicatorProps_shape:e}),icon:r.icon,current:e.indicatorProps_shape},r.label)))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Additional Settings","cloudinary"),initialOpen:!1},Jt.createElement(c.TextareaControl,{label:(0,n.__)("Custom Settings","cloudinary"),help:(0,n.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:i,onChange:e=>{let r={};s(e);try{r=JSON.parse(e)}catch(e){}if("object"==typeof r){const e={...a};e.customSettings=r,t({...a,...e})}},__nextHasNoMarginBottom:!0})))};var er=r(6087);const tr=new(i())("_"),rr=(0,n.__)("Drag images, upload new ones or select files from your library.","cloudinary"),nr=(e,t)=>({...e,container:"."+t,zoom:!1}),or=({setAttributes:e,attributes:t,className:r,isSelected:o})=>{const[a,s]=(0,u.useState)(null),[d,m]=(0,u.useState)(!1),v=(0,u.useMemo)(()=>{if(0!==t.selectedImages.length)return t;const e={},{container:r,...n}=tr.dot(CLD_GALLERY_CONFIG);return Object.keys(n).forEach(r=>{t[r]||(e[r]=n[r])}),{...t,...e}},[t]),h=(0,u.useMemo)(()=>t.selectedImages.length?t.selectedImages.map(({attachmentId:e})=>({id:e})):[],[t]);(0,u.useEffect)(()=>{if(a&&((({status:e,message:t,options:r={}})=>{(0,F.dispatch)("core/notices").createNotice(e,t,{isDismissible:!0,...r})})({status:"error",message:a}),s(null)),t.selectedImages.length){let e;const{customSettings:r,...n}=(e=>{const t=new(i())("_"),r=f()(e),{selectedImages:n,...o}=t.object(r,{});return o.mediaAssets=n,"classic"!==o?.displayProps?.mode?delete o.transition:delete o.displayProps.columns,"pad"!==o?.transformation_crop&&delete o.transformation_background,"pad"!==o?.transformation?.crop&&delete o.transformation.background,o?.themeProps?.primary&&(o.themeProps.primary=H(o?.themeProps?.primary)),o?.themeProps?.onPrimary&&(o.themeProps.onPrimary=H(o?.themeProps?.onPrimary)),o?.themeProps?.active&&(o.themeProps.active=H(o?.themeProps?.active)),o})(t);try{e=cloudinary.galleryWidget(nr({...n,...r},t.container))}catch{e=cloudinary.galleryWidget(nr(n,t.container))}return e.render(),m(!1),()=>e.destroy()}},[a,t,e,r]);const y=!!t.selectedImages.length;return t.container||e({container:`${r}${W(15)}`}),e(v),er.createElement(er.Fragment,null,er.createElement(er.Fragment,null,er.createElement("div",{className:t.container||r}),er.createElement("div",{className:"wp-block-cloudinary-gallery"},er.createElement(p.MediaPlaceholder,{labels:{title:!y&&(0,n.__)("Cloudinary Gallery","cloudinary"),instructions:!y&&rr},icon:"format-gallery",disableMediaButtons:y&&!o,allowedTypes:_,addToGallery:y,isAppender:y,onSelect:t=>(async t=>{m(!0);try{const r=await l()({path:CLD_REST_ENDPOINT+"/image_data",method:"POST",data:{images:t}});e({selectedImages:r})}catch{m(!1),s((0,n.__)("Could not load selected images. Please try again.","cloudinary"))}})(t),value:h,multiple:!0},d&&er.createElement("div",{className:"loading-spinner-container"},er.createElement(c.Spinner,null))))),er.createElement(p.InspectorControls,null,er.createElement(Qt,{attributes:t,setAttributes:e})))};var ar=r(6087);const ir=({attributes:e})=>ar.createElement("div",{className:e.container}),sr=JSON.parse('{"aspectRatio":{"type":"string"},"navigation":{"type":"string"},"zoom":{"type":"boolean"},"carouselLocation":{"type":"string"},"carouselOffset":{"type":"number"},"carouselStyle":{"type":"string"},"displayProps_mode":{"type":"string"},"displayProps_columns":{"type":"number"},"indicatorProps_shape":{"type":"string"},"themeProps_primary":{"type":"string"},"themeProps_onPrimary":{"type":"string"},"themeProps_active":{"type":"string"},"zoomProps_type":{"type":"string"},"zoomProps_viewerPosition":{"type":"string"},"zoomProps_trigger":{"type":"string"},"thumbnailProps_width":{"type":"number"},"thumbnailProps_height":{"type":"number"},"thumbnailProps_navigationShape":{"type":"string"},"thumbnailProps_selectedStyle":{"type":"string"},"thumbnailProps_selectedBorderPosition":{"type":"string"},"thumbnailProps_selectedBorderWidth":{"type":"number"},"thumbnailProps_mediaSymbolShape":{"type":"string"},"cloudName":{"type":"string"},"container":{"type":"string"},"selectedImages":{"type":"array","default":[]},"transformation_crop":{"type":"string","default":"pad"},"transformation_background":{"type":"string"},"customSettings":{"type":"string"}}');(0,o.registerBlockType)("cloudinary/gallery",{title:(0,n.__)("Cloudinary Gallery","cloudinary"),description:(0,n.__)("Add a gallery powered by the Cloudinary Gallery Widget to your post.","cloudinary"),category:"widgets",icon:"format-gallery",attributes:sr,edit:or,save:ir})},5580(e,t,r){var n=r(6110)(r(9325),"DataView");e.exports=n},1549(e,t,r){var n=r(2032),o=r(3862),a=r(6721),i=r(2749),s=r(5749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1}},1175(e,t,r){var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040(e,t,r){var n=r(1549),o=r(79),a=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},7670(e,t,r){var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949(e,t,r){var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},1042(e,t,r){var n=r(6110)(Object,"create");e.exports=n},3650(e,t,r){var n=r(4335)(Object.keys,Object);e.exports=n},181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009(e,t,r){e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},9325(e,t,r){var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},1420(e,t,r){var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,r){var n=r(79),o=r(8223),a=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,r){var n=r(9999);e.exports=function(e){return n(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428(e,t,r){var n=r(7534),o=r(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,r){var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),o=r(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,r){var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,r){var n=r(9172),o=r(7301),a=r(6009),i=a&&a.isMap,s=i?o(i):n;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440(e,t,r){var n=r(6038),o=r(7301),a=r(6009),i=a&&a.isSet,s=i?o(i):n;e.exports=s},7167(e,t,r){var n=r(4901),o=r(7301),a=r(6009),i=a&&a.isTypedArray,s=i?o(i):n;e.exports=s},5950(e,t,r){var n=r(695),o=r(8984),a=r(4894);e.exports=function(e){return a(e)?n(e):o(e)}},7241(e,t,r){var n=r(695),o=r(2903),a=r(4894);e.exports=function(e){return a(e)?n(e,!0):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},6087(e){"use strict";e.exports=window.wp.element},6942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;nObject.hasOwn(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};r(776)})(); +(()=>{var e={776(e,t,r){"use strict";const n=window.wp.i18n,o=window.wp.blocks;var a=r.cjs(function(e,t){function r(e,t){var r,n;if("function"==typeof t)void 0!==(n=t(e))&&(e=n);else if(Array.isArray(t))for(r=0;r=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t);if(r.filter(l).length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var u=Object.prototype.hasOwnProperty;function p(e,t,r,n){if(!(this instanceof p))return new p(e,t,r,n);void 0===t&&(t=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var d=new p(".",!1,!0,!0);function f(e){return function(){return d[e].apply(d,arguments)}}p.prototype._fill=function(e,t,n,o){var s=e.shift();if(e.length>0){if(t[s]=t[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[s])){if(!this.override){if(!a(n)||!i(n))throw new Error("Trying to redefine `"+s+"` which is a "+typeof t[s]);return}t[s]={}}this._fill(e,t[s],n,o)}else{if(!this.override&&a(t[s])&&!i(t[s])){if(!a(n)||!i(n))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}t[s]=r(n,o)}},p.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(o){var a=void 0===t?null:t[o],i=c(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)}),e},p.prototype.str=function(e,t,n,o){var a=c(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},p.prototype.pick=function(e,t,r,o){var a,i,s,l,u;for(i=c(e,this.separator),a=0;am.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-round"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})))),h=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"ratio-square"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})))),y=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-radius"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})))),b=()=>m.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"shape-none"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})))),g=[{value:{type:"expanded",columns:1},icon:()=>m.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-modern"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})))),label:(0,n.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>m.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-grid-2-column"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})))),label:(0,n.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>m.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-grid-3-column"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},m.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})))),label:(0,n.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>m.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"layout-classic"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},m.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})))),label:(0,n.__)("Classic","cloudinary")}],_=["image"],x=[{label:(0,n.__)("1:1","cloudinary"),value:"1:1"},{label:(0,n.__)("3:4","cloudinary"),value:"3:4"},{label:(0,n.__)("4:3","cloudinary"),value:"4:3"},{label:(0,n.__)("4:6","cloudinary"),value:"4:6"},{label:(0,n.__)("6:4","cloudinary"),value:"6:4"},{label:(0,n.__)("5:7","cloudinary"),value:"5:7"},{label:(0,n.__)("7:5","cloudinary"),value:"7:5"},{label:(0,n.__)("8:5","cloudinary"),value:"8:5"},{label:(0,n.__)("5:8","cloudinary"),value:"5:8"},{label:(0,n.__)("9:16","cloudinary"),value:"9:16"},{label:(0,n.__)("16:9","cloudinary"),value:"16:9"}],w=[{label:(0,n.__)("None","cloudinary"),value:"none"},{label:(0,n.__)("Fade","cloudinary"),value:"fade"},{label:(0,n.__)("Slide","cloudinary"),value:"slide"}],L=[{label:(0,n.__)("Always","cloudinary"),value:"always"},{label:(0,n.__)("None","cloudinary"),value:"none"},{label:(0,n.__)("MouseOver","cloudinary"),value:"mouseover"}],E=[{label:(0,n.__)("Inline","cloudinary"),value:"inline"},{label:(0,n.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,n.__)("Popup","cloudinary"),value:"popup"}],O=[{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"}],j=[{label:(0,n.__)("Click","cloudinary"),value:"click"},{label:(0,n.__)("Hover","cloudinary"),value:"hover"}],A=[{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"},{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"}],P=[{label:(0,n.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,n.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,n.__)("None","cloudinary"),value:"none"}],k=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"none",icon:b,label:(0,n.__)("None","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")},{value:"rectangle",icon:()=>m.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.createElement("title",null,"ratio-9-16"),m.createElement("desc",null,"Created with Sketch."),m.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},m.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})))),label:(0,n.__)("Rectangle","cloudinary")}],S=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")}],C=[{label:(0,n.__)("All","cloudinary"),value:"all"},{label:(0,n.__)("Border","cloudinary"),value:"border"},{label:(0,n.__)("Gradient","cloudinary"),value:"gradient"}],M=[{label:(0,n.__)("All","cloudinary"),value:"all"},{label:(0,n.__)("Top","cloudinary"),value:"top"},{label:(0,n.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,n.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,n.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,n.__)("Left","cloudinary"),value:"left"},{label:(0,n.__)("Right","cloudinary"),value:"right"}],B=[{value:"round",icon:v,label:(0,n.__)("Round","cloudinary")},{value:"radius",icon:y,label:(0,n.__)("Radius","cloudinary")},{value:"none",icon:b,label:(0,n.__)("None","cloudinary")},{value:"square",icon:h,label:(0,n.__)("Square","cloudinary")}],T=[{label:(0,n.__)("Pad","cloudinary"),value:"pad"},{label:(0,n.__)("Fill","cloudinary"),value:"fill"}],D=[{label:(0,n.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,n.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,n.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,n.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var N=r(6942),R=r.n(N),Z=r(6087);const z=({value:e,children:t,icon:r,onChange:n,current:o})=>{const a="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return Z.createElement("button",{type:"button",onClick:()=>n(e),className:R()("radio-select",{"radio-select--active":a})},Z.createElement(r,null),Z.createElement("div",{className:"radio-select__label"},t))};r.dn(z);const I=window.wp.data,F=e=>e<10?"0"+String(e):e.toString(16),W=e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,F).join("")},H=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e};function V(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function U(e){return e instanceof V(e).Element||e instanceof Element}function q(e){return e instanceof V(e).HTMLElement||e instanceof HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof V(e).ShadowRoot||e instanceof ShadowRoot)}var G=Math.max,X=Math.min,J=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function K(){return!/^((?!chrome|android).)*safari/i.test(Y())}function Q(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&q(e)&&(o=e.offsetWidth>0&&J(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&J(n.height)/e.offsetHeight||1);var i=(U(e)?V(e):window).visualViewport,s=!K()&&r,l=(n.left+(s&&i?i.offsetLeft:0))/o,c=(n.top+(s&&i?i.offsetTop:0))/a,u=n.width/o,p=n.height/a;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l,x:l,y:c}}function ee(e){var t=V(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function te(e){return e?(e.nodeName||"").toLowerCase():null}function re(e){return((U(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return Q(re(e)).left+ee(e).scrollLeft}function oe(e){return V(e).getComputedStyle(e)}function ae(e){var t=oe(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ie(e,t,r){void 0===r&&(r=!1);var n,o,a=q(t),i=q(t)&&function(e){var t=e.getBoundingClientRect(),r=J(t.width)/e.offsetWidth||1,n=J(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=re(t),l=Q(e,i,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!r)&&(("body"!==te(t)||ae(s))&&(c=(n=t)!==V(n)&&q(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:ee(n)),q(t)?((u=Q(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=ne(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function se(e){var t=Q(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function le(e){return"html"===te(e)?e:e.assignedSlot||e.parentNode||($(e)?e.host:null)||re(e)}function ce(e){return["html","body","#document"].indexOf(te(e))>=0?e.ownerDocument.body:q(e)&&ae(e)?e:ce(le(e))}function ue(e,t){var r;void 0===t&&(t=[]);var n=ce(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=V(n),i=o?[a].concat(a.visualViewport||[],ae(n)?n:[]):n,s=t.concat(i);return o?s:s.concat(ue(le(i)))}function pe(e){return["table","td","th"].indexOf(te(e))>=0}function de(e){return q(e)&&"fixed"!==oe(e).position?e.offsetParent:null}function fe(e){for(var t=V(e),r=de(e);r&&pe(r)&&"static"===oe(r).position;)r=de(r);return r&&("html"===te(r)||"body"===te(r)&&"static"===oe(r).position)?t:r||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&q(e)&&"fixed"===oe(e).position)return null;var r=le(e);for($(r)&&(r=r.host);q(r)&&["html","body"].indexOf(te(r))<0;){var n=oe(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var me="top",ve="bottom",he="right",ye="left",be="auto",ge=[me,ve,he,ye],_e="start",xe="end",we="viewport",Le="popper",Ee=ge.reduce(function(e,t){return e.concat([t+"-"+_e,t+"-"+xe])},[]),Oe=[].concat(ge,[be]).reduce(function(e,t){return e.concat([t,t+"-"+_e,t+"-"+xe])},[]),je=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ae(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function ke(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function De(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?Me(o):null,i=o?Be(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(a){case me:t={x:s,y:r.y-n.height};break;case ve:t={x:s,y:r.y+r.height};break;case he:t={x:r.x+r.width,y:l};break;case ye:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=a?Te(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case _e:t[c]=t[c]-(r[u]/2-n[u]/2);break;case xe:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Re(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=i.x,f=void 0===d?0:d,m=i.y,v=void 0===m?0:m,h="function"==typeof u?u({x:f,y:v}):{x:f,y:v};f=h.x,v=h.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),g=ye,_=me,x=window;if(c){var w=fe(r),L="clientHeight",E="clientWidth";if(w===V(r)&&"static"!==oe(w=re(r)).position&&"absolute"===s&&(L="scrollHeight",E="scrollWidth"),o===me||(o===ye||o===he)&&a===xe)_=ve,v-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[L])-n.height,v*=l?1:-1;if(o===ye||(o===me||o===ve)&&a===xe)g=he,f-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-n.width,f*=l?1:-1}var O,j=Object.assign({position:s},c&&Ne),A=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:J(r*o)/o||0,y:J(n*o)/o||0}}({x:f,y:v},V(r)):{x:f,y:v};return f=A.x,v=A.y,l?Object.assign({},j,((O={})[_]=b?"0":"",O[g]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",O)):Object.assign({},j,((t={})[_]=b?v+"px":"",t[g]=y?f+"px":"",t.transform="",t))}const Ze={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];q(o)&&te(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});q(n)&&te(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};const ze={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=Oe.reduce(function(e,r){return e[r]=function(e,t,r){var n=Me(e),o=[ye,me].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[ye,he].indexOf(n)>=0?{x:s,y:i}:{x:i,y:s}}(r,t.rects,a),e},{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var Ie={left:"right",right:"left",bottom:"top",top:"bottom"};function Fe(e){return e.replace(/left|right|bottom|top/g,function(e){return Ie[e]})}var We={start:"end",end:"start"};function He(e){return e.replace(/start|end/g,function(e){return We[e]})}function Ve(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&$(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qe(e,t,r){return t===we?Ue(function(e,t){var r=V(e),n=re(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var c=K();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+ne(e),y:l}}(e,r)):U(t)?function(e,t){var r=Q(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Ue(function(e){var t,r=re(e),n=ee(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=G(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=G(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+ne(e),l=-n.scrollTop;return"rtl"===oe(o||r).direction&&(s+=G(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(re(e)))}function $e(e,t,r,n){var o="clippingParents"===t?function(e){var t=ue(le(e)),r=["absolute","fixed"].indexOf(oe(e).position)>=0&&q(e)?fe(e):e;return U(r)?t.filter(function(e){return U(e)&&Ve(e,r)&&"body"!==te(e)}):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],s=a.reduce(function(t,r){var o=qe(e,r,n);return t.top=G(o.top,t.top),t.right=X(o.right,t.right),t.bottom=X(o.bottom,t.bottom),t.left=G(o.left,t.left),t},qe(e,i,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ge(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Xe(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function Je(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?we:c,p=r.elementContext,d=void 0===p?Le:p,f=r.altBoundary,m=void 0!==f&&f,v=r.padding,h=void 0===v?0:v,y=Ge("number"!=typeof h?h:Xe(h,ge)),b=d===Le?"reference":Le,g=e.rects.popper,_=e.elements[m?b:d],x=$e(U(_)?_:_.contextElement||re(e.elements.popper),l,u,i),w=Q(e.elements.reference),L=De({reference:w,element:g,strategy:"absolute",placement:o}),E=Ue(Object.assign({},g,L)),O=d===Le?E:w,j={top:x.top-O.top+y.top,bottom:O.bottom-x.bottom+y.bottom,left:x.left-O.left+y.left,right:O.right-x.right+y.right},A=e.modifiersData.offset;if(d===Le&&A){var P=A[o];Object.keys(j).forEach(function(e){var t=[he,ve].indexOf(e)>=0?1:-1,r=[me,ve].indexOf(e)>=0?"y":"x";j[e]+=P[r]*t})}return j}function Ye(e,t,r){return G(e,X(t,r))}const Ke={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0!==i&&i,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,p=r.padding,d=r.tether,f=void 0===d||d,m=r.tetherOffset,v=void 0===m?0:m,h=Je(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),y=Me(t.placement),b=Be(t.placement),g=!b,_=Te(y),x="x"===_?"y":"x",w=t.modifiersData.popperOffsets,L=t.rects.reference,E=t.rects.popper,O="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,j="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(w){if(a){var k,S="y"===_?me:ye,C="y"===_?ve:he,M="y"===_?"height":"width",B=w[_],T=B+h[S],D=B-h[C],N=f?-E[M]/2:0,R=b===_e?L[M]:E[M],Z=b===_e?-E[M]:-L[M],z=t.elements.arrow,I=f&&z?se(z):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=F[S],H=F[C],V=Ye(0,L[M],I[M]),U=g?L[M]/2-N-V-W-j.mainAxis:R-V-W-j.mainAxis,q=g?-L[M]/2+N+V+H+j.mainAxis:Z+V+H+j.mainAxis,$=t.elements.arrow&&fe(t.elements.arrow),J=$?"y"===_?$.clientTop||0:$.clientLeft||0:0,Y=null!=(k=null==A?void 0:A[_])?k:0,K=B+q-Y,Q=Ye(f?X(T,B+U-Y-J):T,B,f?G(D,K):D);w[_]=Q,P[_]=Q-B}if(s){var ee,te="x"===_?me:ye,re="x"===_?ve:he,ne=w[x],oe="y"===x?"height":"width",ae=ne+h[te],ie=ne-h[re],le=-1!==[me,ye].indexOf(y),ce=null!=(ee=null==A?void 0:A[x])?ee:0,ue=le?ae:ne-L[oe]-E[oe]-ce+j.altAxis,pe=le?ne+L[oe]+E[oe]-ce-j.altAxis:ie,de=f&&le?function(e,t,r){var n=Ye(e,t,r);return n>r?r:n}(ue,ne,pe):Ye(f?ue:ae,ne,f?pe:ie);w[x]=de,P[x]=de-ne}t.modifiersData[n]=P}},requiresIfExists:["offset"]};const Qe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,s=Me(r.placement),l=Te(s),c=[ye,he].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return Ge("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Xe(e,ge))}(o.padding,r),p=se(a),d="y"===l?me:ye,f="y"===l?ve:he,m=r.rects.reference[c]+r.rects.reference[l]-i[l]-r.rects.popper[c],v=i[l]-r.rects.reference[l],h=fe(a),y=h?"y"===l?h.clientHeight||0:h.clientWidth||0:0,b=m/2-v/2,g=u[d],_=y-p[c]-u[f],x=y/2-p[c]/2+b,w=Ye(g,x,_),L=l;r.modifiersData[n]=((t={})[L]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Ve(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function et(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function tt(e){return[me,he,ve,ye].some(function(t){return e[t]>=0})}var rt=Se({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,s=void 0===i||i,l=V(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,Ce)}),s&&l.addEventListener("resize",r.update,Ce),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,Ce)}),s&&l.removeEventListener("resize",r.update,Ce)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=De({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,s=r.roundOffsets,l=void 0===s||s,c={placement:Me(t.placement),variation:Be(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ze,ze,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0===i||i,l=r.fallbackPlacements,c=r.padding,u=r.boundary,p=r.rootBoundary,d=r.altBoundary,f=r.flipVariations,m=void 0===f||f,v=r.allowedAutoPlacements,h=t.options.placement,y=Me(h),b=l||(y===h||!m?[Fe(h)]:function(e){if(Me(e)===be)return[];var t=Fe(e);return[He(e),t,He(t)]}(h)),g=[h].concat(b).reduce(function(e,r){return e.concat(Me(r)===be?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?Oe:l,u=Be(n),p=u?s?Ee:Ee.filter(function(e){return Be(e)===u}):ge,d=p.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=p);var f=d.reduce(function(t,r){return t[r]=Je(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[Me(r)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:r,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:v}):r)},[]),_=t.rects.reference,x=t.rects.popper,w=new Map,L=!0,E=g[0],O=0;O=0,S=k?"width":"height",C=Je(t,{placement:j,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),M=k?P?he:ye:P?ve:me;_[S]>x[S]&&(M=Fe(M));var B=Fe(M),T=[];if(a&&T.push(C[A]<=0),s&&T.push(C[M]<=0,C[B]<=0),T.every(function(e){return e})){E=j,L=!1;break}w.set(j,T)}if(L)for(var D=function(e){var t=g.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},N=m?3:1;N>0;N--){if("break"===D(N))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ke,Qe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Je(t,{elementContext:"reference"}),s=Je(t,{altBoundary:!0}),l=et(i,n),c=et(s,o,a),u=tt(l),p=tt(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),nt="tippy-content",ot="tippy-backdrop",at="tippy-arrow",it="tippy-svg-arrow",st={passive:!0,capture:!0},lt=function(){return document.body};function ct(e,t,r){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(r)?r[t]:r)}return e}function ut(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function pt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function dt(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function ft(e){return[].concat(e)}function mt(e,t){-1===e.indexOf(t)&&e.push(t)}function vt(e){return e.split("-")[0]}function ht(e){return[].slice.call(e)}function yt(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function bt(){return document.createElement("div")}function gt(e){return["Element","Fragment"].some(function(t){return ut(e,t)})}function _t(e){return ut(e,"MouseEvent")}function xt(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function wt(e){return gt(e)?[e]:function(e){return ut(e,"NodeList")}(e)?ht(e):Array.isArray(e)?e:ht(document.querySelectorAll(e))}function Lt(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Et(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Ot(e){var t,r=ft(e)[0];return null!=r&&null!=(t=r.ownerDocument)&&t.body?r.ownerDocument:document}function jt(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function At(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var Pt={isTouch:!1},kt=0;function St(){Pt.isTouch||(Pt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ct))}function Ct(){var e=performance.now();e-kt<20&&(Pt.isTouch=!1,document.removeEventListener("mousemove",Ct)),kt=e}function Mt(){var e=document.activeElement;if(xt(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Bt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Tt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Dt=Object.assign({appendTo:lt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Tt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Nt=Object.keys(Dt);function Rt(e){var t=(e.plugins||[]).reduce(function(t,r){var n,o=r.name,a=r.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Dt[o])?n:a);return t},{});return Object.assign({},e,t)}function Zt(e,t){var r=Object.assign({},t,{content:pt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Rt(Object.assign({},Dt,{plugins:t}))):Nt).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},Dt.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function zt(e,t){e.innerHTML=t}function It(e){var t=bt();return!0===e?t.className=at:(t.className=it,gt(e)?t.appendChild(e):zt(t,e)),t}function Ft(e,t){gt(t.content)?(zt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zt(e,t.content):e.textContent=t.content)}function Wt(e){var t=e.firstElementChild,r=ht(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(nt)}),arrow:r.find(function(e){return e.classList.contains(at)||e.classList.contains(it)}),backdrop:r.find(function(e){return e.classList.contains(ot)})}}function Ht(e){var t=bt(),r=bt();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=bt();function o(r,n){var o=Wt(t),a=o.box,i=o.content,s=o.arrow;n.theme?a.setAttribute("data-theme",n.theme):a.removeAttribute("data-theme"),"string"==typeof n.animation?a.setAttribute("data-animation",n.animation):a.removeAttribute("data-animation"),n.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||Ft(i,e.props),n.arrow?s?r.arrow!==n.arrow&&(a.removeChild(s),a.appendChild(It(n.arrow))):a.appendChild(It(n.arrow)):s&&a.removeChild(s)}return n.className=nt,n.setAttribute("data-state","hidden"),Ft(n,e.props),t.appendChild(r),r.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}Ht.$$tippy=!0;var Vt=1,Ut=[],qt=[];function $t(e,t){var r,n,o,a,i,s,l,c,u=Zt(e,Object.assign({},Dt,Rt(yt(t)))),p=!1,d=!1,f=!1,m=!1,v=[],h=dt($,u.interactiveDebounce),y=Vt++,b=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),g={id:y,reference:e,popper:bt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){0;if(g.state.isDestroyed)return;B("onBeforeUpdate",[g,t]),U();var r=g.props,n=Zt(e,Object.assign({},r,yt(t),{ignoreAttributes:!0}));g.props=n,V(),r.interactiveDebounce!==n.interactiveDebounce&&(N(),h=dt($,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?ft(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(r,n);g.popperInstance&&(Y(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));B("onAfterUpdate",[g,t])},setContent:function(e){g.setProps({content:e})},show:function(){0;var e=g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=Pt.isTouch&&!g.props.touch,o=ct(g.props.duration,0,Dt.duration);if(e||t||r||n)return;if(P().hasAttribute("disabled"))return;if(B("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,A()&&(x.style.visibility="visible");M(),I(),g.state.isMounted||(x.style.transition="none");if(A()){var a=S();Lt([a.box,a.content],0)}s=function(){var e;if(g.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=g.props.moveTransition,A()&&g.props.animation){var t=S(),r=t.box,n=t.content;Lt([r,n],o),Et([r,n],"visible")}T(),D(),mt(qt,g),null==(e=g.popperInstance)||e.forceUpdate(),B("onMount",[g]),g.props.animation&&A()&&function(e,t){W(e,t)}(o,function(){g.state.isShown=!0,B("onShown",[g])})}},function(){var e,t=g.props.appendTo,r=P();e=g.props.interactive&&t===lt||"parent"===t?r.parentNode:pt(t,[r]);e.contains(x)||e.appendChild(x);g.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=ct(g.props.duration,1,Dt.duration);if(e||t||r)return;if(B("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,m=!1,p=!1,A()&&(x.style.visibility="hidden");if(N(),F(),M(!0),A()){var o=S(),a=o.box,i=o.content;g.props.animation&&(Lt([a,i],n),Et([a,i],"hidden"))}T(),D(),g.props.animation?A()&&function(e,t){W(e,function(){!g.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}(n,g.unmount):g.unmount()},hideWithInteractivity:function(e){0;k().addEventListener("mousemove",h),mt(Ut,h),h(e)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){0;g.state.isVisible&&g.hide();if(!g.state.isMounted)return;K(),Q().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x);qt=qt.filter(function(e){return e!==g}),g.state.isMounted=!1,B("onHidden",[g])},destroy:function(){0;if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),U(),delete e._tippy,g.state.isDestroyed=!0,B("onDestroy",[g])}};if(!u.render)return g;var _=u.render(g),x=_.popper,w=_.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+g.id,g.popper=x,e._tippy=g,x._tippy=g;var L=b.map(function(e){return e.fn(g)}),E=e.hasAttribute("aria-expanded");return V(),D(),M(),B("onCreate",[g]),u.showOnCreate&&ee(),x.addEventListener("mouseenter",function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",h)}),g;function O(){var e=g.props.touch;return Array.isArray(e)?e:[e,0]}function j(){return"hold"===O()[0]}function A(){var e;return!(null==(e=g.props.render)||!e.$$tippy)}function P(){return l||e}function k(){var e=P().parentNode;return e?Ot(e):document}function S(){return Wt(x)}function C(e){return g.state.isMounted&&!g.state.isVisible||Pt.isTouch||a&&"focus"===a.type?0:ct(g.props.delay,e?0:1,Dt.delay)}function M(e){void 0===e&&(e=!1),x.style.pointerEvents=g.props.interactive&&!e?"":"none",x.style.zIndex=""+g.props.zIndex}function B(e,t,r){var n;(void 0===r&&(r=!0),L.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=g.props)[e].apply(n,t)}function T(){var t=g.props.aria;if(t.content){var r="aria-"+t.content,n=x.id;ft(g.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(g.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(r,o):e.removeAttribute(r)}})}}function D(){!E&&g.props.aria.expanded&&ft(g.props.triggerTarget||e).forEach(function(e){g.props.interactive?e.setAttribute("aria-expanded",g.state.isVisible&&e===P()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){k().removeEventListener("mousemove",h),Ut=Ut.filter(function(e){return e!==h})}function R(t){if(!Pt.isTouch||!f&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!g.props.interactive||!At(x,r)){if(ft(g.props.triggerTarget||e).some(function(e){return At(e,r)})){if(Pt.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else B("onClickOutside",[g,t]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),d=!0,setTimeout(function(){d=!1}),g.state.isMounted||F())}}}function Z(){f=!0}function z(){f=!1}function I(){var e=k();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,st),e.addEventListener("touchstart",z,st),e.addEventListener("touchmove",Z,st)}function F(){var e=k();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,st),e.removeEventListener("touchstart",z,st),e.removeEventListener("touchmove",Z,st)}function W(e,t){var r=S().box;function n(e){e.target===r&&(jt(r,"remove",n),t())}if(0===e)return t();jt(r,"remove",i),jt(r,"add",n),i=n}function H(t,r,n){void 0===n&&(n=!1),ft(g.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),v.push({node:e,eventType:t,handler:r,options:n})})}function V(){var e;j()&&(H("touchstart",q,{passive:!0}),H("touchend",G,{passive:!0})),(e=g.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(H(e,q),e){case"mouseenter":H("mouseleave",G);break;case"focus":H(Bt?"focusout":"blur",X);break;case"focusin":H("focusout",X)}})}function U(){v.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,o=e.options;t.removeEventListener(r,n,o)}),v=[]}function q(e){var t,r=!1;if(g.state.isEnabled&&!J(e)&&!d){var n="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,D(),!g.state.isVisible&&_t(e)&&Ut.forEach(function(t){return t(e)}),"click"===e.type&&(g.props.trigger.indexOf("mouseenter")<0||p)&&!1!==g.props.hideOnClick&&g.state.isVisible?r=!0:ee(e),"click"===e.type&&(p=!r),r&&!n&&te(e)}}function $(e){var t=e.target,r=P().contains(t)||x.contains(t);if("mousemove"!==e.type||!r){var n=Q().concat(x).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=vt(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,u="right"===i?s.left.x:0,p="left"===i?s.right.x:0,d=t.top-n+l>a,f=n-t.bottom-c>a,m=t.left-r+u>a,v=r-t.right-p>a;return d||f||m||v})})(n,e)&&(N(),te(e))}}function G(e){J(e)||g.props.trigger.indexOf("click")>=0&&p||(g.props.interactive?g.hideWithInteractivity(e):te(e))}function X(e){g.props.trigger.indexOf("focusin")<0&&e.target!==P()||g.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function J(e){return!!Pt.isTouch&&j()!==e.type.indexOf("touch")>=0}function Y(){K();var t=g.props,r=t.popperOptions,n=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=A()?Wt(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||P()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];A()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==r?void 0:r.modifiers)||[]),g.popperInstance=rt(c,x,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:p}))}function K(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function Q(){return ht(x.querySelectorAll("[data-tippy-root]"))}function ee(e){g.clearDelayTimeouts(),e&&B("onTrigger",[g,e]),I();var t=C(!0),n=O(),o=n[0],a=n[1];Pt.isTouch&&"hold"===o&&a&&(t=a),t?r=setTimeout(function(){g.show()},t):g.show()}function te(e){if(g.clearDelayTimeouts(),B("onUntrigger",[g,e]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=C(!1);t?n=setTimeout(function(){g.state.isVisible&&g.hide()},t):o=requestAnimationFrame(function(){g.hide()})}}else F()}}function Gt(e,t){void 0===t&&(t={});var r=Dt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",St,st),window.addEventListener("blur",Mt);var n=Object.assign({},t,{plugins:r}),o=wt(e).reduce(function(e,t){var r=t&&$t(t,n);return r&&e.push(r),e},[]);return gt(e)?o[0]:o}Gt.defaultProps=Dt,Gt.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Dt[t]=e[t]})},Gt.currentInput=Pt;Object.assign({},Ze,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});Gt.setDefaultProps({render:Ht});const Xt=Gt;var Jt=r(6087);const Yt=({children:e,value:t})=>Jt.createElement("div",{className:"colorpalette-color-label"},Jt.createElement("span",null,e),Jt.createElement("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})),Kt=new(i())("_"),Qt=({attributes:e,setAttributes:t,colors:r})=>{const o=f()(e),a=Kt.object(o),[i,s]=(0,u.useState)(a.customSettings);e.transformation_crop||(e.transformation_crop="pad",e.transformation_background="rgb:FFFFFF"),"fill"===e.transformation_crop&&delete e.transformation_background;const l=(e,r)=>{const n={[r]:H(e)};t(n)},d=(e=>{const[t,r]=(0,u.useState)(null),n=(0,u.useCallback)(e=>r(e),[]);return(0,u.useEffect)(()=>{if(!t)return;const r=Xt(t,{content:e});return()=>{r?.destroy()}},[t,e]),n})((0,n.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary"));return Jt.createElement(Jt.Fragment,null,Jt.createElement(c.PanelBody,{title:(0,n.__)("Layout","cloudinary")},g.map(r=>Jt.createElement(z,{key:`${r.value.type}-${r.value.columns}-layout`,value:r.value,onChange:e=>{t({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:r.icon,current:{type:e.displayProps_mode,columns:e.displayProps_columns||1}},r.label))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Color Palette","cloudinary"),initialOpen:!1},Jt.createElement(Yt,{value:e.themeProps_primary},(0,n.__)("Primary","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_primary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_primary")}),Jt.createElement(Yt,{value:e.themeProps_onPrimary},(0,n.__)("On Primary","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_onPrimary")}),Jt.createElement(Yt,{value:e.themeProps_active},(0,n.__)("Active","cloudinary")),Jt.createElement(p.ColorPalette,{value:e.themeProps_active,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_active")})),"classic"===e.displayProps_mode&&Jt.createElement(c.PanelBody,{title:(0,n.__)("Fade Transition","cloudinary"),initialOpen:!1},Jt.createElement(c.SelectControl,{value:e.transition,options:w,onChange:e=>t({transition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),Jt.createElement(c.PanelBody,{title:(0,n.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},Jt.createElement(c.SelectControl,{label:(0,n.__)("Aspect Ratio","cloudinary"),value:e.aspectRatio,options:x,onChange:e=>t({aspectRatio:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,Jt.createElement("div",{className:"cld-ui-title"},(0,n.__)("Resize/Crop Mode","cloudinary"),Jt.createElement("span",{className:"dashicons dashicons-info cld-tooltip",ref:d})),Jt.createElement(c.ButtonGroup,null,T.map(r=>Jt.createElement(c.Button,{key:r.value+"-look-and-feel",variant:"secondary",isSecondary:!0,isPressed:r.value===e.transformation_crop,onClick:()=>t({transformation_crop:r.value,transformation_background:null})},r.label)))),"pad"===e.transformation_crop&&Jt.createElement(c.SelectControl,{label:(0,n.__)("Pad style","cloudinary"),value:e.transformation_background,options:D,onChange:e=>{t({transformation_background:e})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Navigation","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,L.map(r=>Jt.createElement(c.Button,{key:r.value+"-navigation",variant:"secondary",isSecondary:!0,isPressed:r.value===e.navigation,onClick:()=>t({navigation:r.value})},r.label)))),Jt.createElement("div",{style:{marginTop:"30px"}},Jt.createElement(c.ToggleControl,{label:(0,n.__)("Show Zoom","cloudinary"),checked:e.zoom,onChange:()=>t({zoom:!e.zoom}),__nextHasNoMarginBottom:!0}),e.zoom&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Zoom Type","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,E.map(r=>Jt.createElement(c.Button,{key:r.value+"-zoom-type",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_type,onClick:()=>t({zoomProps_type:r.value})},r.label)))),"flyout"===e.zoomProps_type&&Jt.createElement(c.SelectControl,{label:(0,n.__)("Zoom Viewer Position","cloudinary"),value:e.zoomProps_viewerPosition,options:O,onChange:e=>t({zoomProps_viewerPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"popup"!==e.zoomProps_type&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Zoom Trigger","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,j.map(r=>Jt.createElement(c.Button,{key:r.value+"-zoom-trigger",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_trigger,onClick:()=>t({zoomProps_trigger:r.value})},r.label)))))))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Carousel Parameters","cloudinary"),initialOpen:!1},Jt.createElement("p",null,(0,n.__)("Carousel Location","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,A.map(r=>Jt.createElement(c.Button,{key:r.value+"-carousel-location",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselLocation,onClick:()=>t({carouselLocation:r.value})},r.label)))),Jt.createElement(c.RangeControl,{label:(0,n.__)("Carousel Offset","cloudinary"),value:e.carouselOffset,onChange:e=>t({carouselOffset:e}),min:0,max:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Carousel Style","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,P.map(r=>Jt.createElement(c.Button,{key:r.value+"-carousel-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselStyle,onClick:()=>t({carouselStyle:r.value})},r.label)))),"thumbnails"===e.carouselStyle&&Jt.createElement(Jt.Fragment,null,Jt.createElement(c.RangeControl,{label:(0,n.__)("Width","cloudinary"),value:e.thumbnailProps_width,onChange:e=>t({thumbnailProps_width:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement(c.RangeControl,{label:(0,n.__)("Height","cloudinary"),value:e.thumbnailProps_height,onChange:e=>t({thumbnailProps_height:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Navigation Button Shape","cloudinary")),k.map(r=>Jt.createElement(z,{key:r.value+"-navigation-button-shape",value:r.value,onChange:e=>t({thumbnailProps_navigationShape:e}),icon:r.icon,current:e.thumbnailProps_navigationShape},r.label)),Jt.createElement("p",null,(0,n.__)("Selected Style","cloudinary")),Jt.createElement("p",null,Jt.createElement(c.ButtonGroup,null,C.map(r=>Jt.createElement(c.Button,{key:r.value+"-selected-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.thumbnailProps_selectedStyle,onClick:()=>t({thumbnailProps_selectedStyle:r.value})},r.label)))),Jt.createElement(c.SelectControl,{label:(0,n.__)("Selected Border Position","cloudinary"),value:e.thumbnailProps_selectedBorderPosition,options:M,onChange:e=>t({thumbnailProps_selectedBorderPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement(c.RangeControl,{label:(0,n.__)("Selected Border Width","cloudinary"),value:e.thumbnailProps_selectedBorderWidth,onChange:e=>t({thumbnailProps_selectedBorderWidth:e}),min:0,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Jt.createElement("p",null,(0,n.__)("Media Shape Icon","cloudinary")),B.map(r=>Jt.createElement(z,{key:r.value+"-media",value:r.value,onChange:e=>t({thumbnailProps_mediaSymbolShape:e}),icon:r.icon,current:e.thumbnailProps_mediaSymbolShape},r.label))),"indicators"===e.carouselStyle&&Jt.createElement(Jt.Fragment,null,Jt.createElement("p",null,(0,n.__)("Indicators Shape","cloudinary")),S.map(r=>Jt.createElement(z,{key:r.value+"-indicator",value:r.value,onChange:e=>t({indicatorProps_shape:e}),icon:r.icon,current:e.indicatorProps_shape},r.label)))),Jt.createElement(c.PanelBody,{title:(0,n.__)("Additional Settings","cloudinary"),initialOpen:!1},Jt.createElement(c.TextareaControl,{label:(0,n.__)("Custom Settings","cloudinary"),help:(0,n.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:i,onChange:e=>{let r={};s(e);try{r=JSON.parse(e)}catch(e){}if("object"==typeof r){const e={...a};e.customSettings=r,t({...a,...e})}},__nextHasNoMarginBottom:!0})))};var er=r(6087);const tr=new(i())("_"),rr=(0,n.__)("Drag images, upload new ones or select files from your library.","cloudinary"),nr=(e,t)=>({...e,container:"."+t,zoom:!1}),or=({setAttributes:e,attributes:t,isSelected:r})=>{const[o,a]=(0,u.useState)(null),[s,d]=(0,u.useState)(!1),m=(0,u.useMemo)(()=>{if(0!==t.selectedImages.length)return t;const e={},{container:r,...n}=tr.dot(CLD_GALLERY_CONFIG);return Object.keys(n).forEach(r=>{t[r]||(e[r]=n[r])}),{...t,...e}},[t]),v=(0,u.useMemo)(()=>t.selectedImages.length?t.selectedImages.map(({attachmentId:e})=>({id:e})):[],[t]);(0,u.useEffect)(()=>{if(o&&((({status:e,message:t,options:r={}})=>{(0,I.dispatch)("core/notices").createNotice(e,t,{isDismissible:!0,...r})})({status:"error",message:o}),a(null)),t.selectedImages.length){let e;const{customSettings:r,...n}=(e=>{const t=new(i())("_"),r=f()(e),{selectedImages:n,...o}=t.object(r,{});return o.mediaAssets=n,"classic"!==o?.displayProps?.mode?delete o.transition:delete o.displayProps.columns,"pad"!==o?.transformation_crop&&delete o.transformation_background,"pad"!==o?.transformation?.crop&&delete o.transformation.background,o?.themeProps?.primary&&(o.themeProps.primary=H(o?.themeProps?.primary)),o?.themeProps?.onPrimary&&(o.themeProps.onPrimary=H(o?.themeProps?.onPrimary)),o?.themeProps?.active&&(o.themeProps.active=H(o?.themeProps?.active)),o})(t);try{e=cloudinary.galleryWidget(nr({...n,...r},t.container))}catch{e=cloudinary.galleryWidget(nr(n,t.container))}return e.render(),d(!1),()=>e.destroy()}},[o,t,e]);const h=!!t.selectedImages.length;(0,u.useEffect)(()=>{t.container||e({container:`cld-gallery-${W(15)}`})},[t.container,e]),(0,u.useEffect)(()=>{e(m)},[m,e]);const y=(0,p.useBlockProps)();return er.createElement("div",y,er.createElement(er.Fragment,null,er.createElement("div",{className:t.container}),er.createElement("div",{className:"wp-block-cloudinary-gallery"},er.createElement(p.MediaPlaceholder,{labels:{title:!h&&(0,n.__)("Cloudinary Gallery","cloudinary"),instructions:!h&&rr},icon:"format-gallery",disableMediaButtons:h&&!r,allowedTypes:_,addToGallery:h,isAppender:h,onSelect:t=>(async t=>{d(!0);try{const r=await l()({path:CLD_REST_ENDPOINT+"/image_data",method:"POST",data:{images:t}});e({selectedImages:r})}catch{d(!1),a((0,n.__)("Could not load selected images. Please try again.","cloudinary"))}})(t),value:v,multiple:!0},s&&er.createElement("div",{className:"loading-spinner-container"},er.createElement(c.Spinner,null))))),er.createElement(p.InspectorControls,null,er.createElement(Qt,{attributes:t,setAttributes:e})))};var ar=r(6087);const ir=({attributes:e})=>ar.createElement("div",{className:e.container}),sr=JSON.parse('{"aspectRatio":{"type":"string"},"navigation":{"type":"string"},"zoom":{"type":"boolean"},"carouselLocation":{"type":"string"},"carouselOffset":{"type":"number"},"carouselStyle":{"type":"string"},"displayProps_mode":{"type":"string"},"displayProps_columns":{"type":"number"},"indicatorProps_shape":{"type":"string"},"themeProps_primary":{"type":"string"},"themeProps_onPrimary":{"type":"string"},"themeProps_active":{"type":"string"},"zoomProps_type":{"type":"string"},"zoomProps_viewerPosition":{"type":"string"},"zoomProps_trigger":{"type":"string"},"thumbnailProps_width":{"type":"number"},"thumbnailProps_height":{"type":"number"},"thumbnailProps_navigationShape":{"type":"string"},"thumbnailProps_selectedStyle":{"type":"string"},"thumbnailProps_selectedBorderPosition":{"type":"string"},"thumbnailProps_selectedBorderWidth":{"type":"number"},"thumbnailProps_mediaSymbolShape":{"type":"string"},"cloudName":{"type":"string"},"container":{"type":"string"},"selectedImages":{"type":"array","default":[]},"transformation_crop":{"type":"string","default":"pad"},"transformation_background":{"type":"string"},"customSettings":{"type":"string"}}');(0,o.registerBlockType)("cloudinary/gallery",{apiVersion:2,title:(0,n.__)("Cloudinary Gallery","cloudinary"),description:(0,n.__)("Add a gallery powered by the Cloudinary Gallery Widget to your post.","cloudinary"),category:"widgets",icon:"format-gallery",attributes:sr,edit:or,save:ir})},5580(e,t,r){var n=r(6110)(r(9325),"DataView");e.exports=n},1549(e,t,r){var n=r(2032),o=r(3862),a=r(6721),i=r(2749),s=r(5749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1}},1175(e,t,r){var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040(e,t,r){var n=r(1549),o=r(79),a=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},7670(e,t,r){var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949(e,t,r){var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},1042(e,t,r){var n=r(6110)(Object,"create");e.exports=n},3650(e,t,r){var n=r(4335)(Object.keys,Object);e.exports=n},181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009(e,t,r){e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},9325(e,t,r){var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},1420(e,t,r){var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,r){var n=r(79),o=r(8223),a=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,r){var n=r(9999);e.exports=function(e){return n(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428(e,t,r){var n=r(7534),o=r(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,r){var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),o=r(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,r){var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,r){var n=r(9172),o=r(7301),a=r(6009),i=a&&a.isMap,s=i?o(i):n;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440(e,t,r){var n=r(6038),o=r(7301),a=r(6009),i=a&&a.isSet,s=i?o(i):n;e.exports=s},7167(e,t,r){var n=r(4901),o=r(7301),a=r(6009),i=a&&a.isTypedArray,s=i?o(i):n;e.exports=s},5950(e,t,r){var n=r(695),o=r(8984),a=r(4894);e.exports=function(e){return a(e)?n(e):o(e)}},7241(e,t,r){var n=r(695),o=r(2903),a=r(4894);e.exports=function(e){return a(e)?n(e,!0):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},6087(e){"use strict";e.exports=window.wp.element},6942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;nObject.hasOwn(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};r(776)})(); //# sourceMappingURL=gallery-block.js.map \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d4457953a..d0eb2da8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@wordpress/element": "^6.34.0", "@wordpress/env": "^10.12.0", "@wordpress/eslint-plugin": "^25.7.0", + "@wordpress/hooks": "^4.52.0", "@wordpress/i18n": "^6.7.0", "@wordpress/scripts": "^33.0.0", "copy-webpack-plugin": "^14.0.0", @@ -10800,9 +10801,9 @@ } }, "node_modules/@wordpress/hooks": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.51.0.tgz", - "integrity": "sha512-pTVZRT9mjEdrNNt7TyKw5hQhFUqntfTXVs/fboEDpmAi+PFWXoD8rPs3oZyRCVr/MDyE6OCv1mwEibI6AsRk3Q==", + "version": "4.52.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.52.0.tgz", + "integrity": "sha512-EbV/nJTerhqwNW3DLvvGutJfNyXcmBHXuWyJpv1NypzT80k21jPGP79HBE5Z0A2oAI2kIBp6Klaa4O8uEjq/sw==", "dev": true, "license": "GPL-2.0-or-later", "engines": { diff --git a/package.json b/package.json index 4ba2d1d04..4ee0d98ff 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "@wordpress/element": "^6.34.0", "@wordpress/env": "^10.12.0", "@wordpress/eslint-plugin": "^25.7.0", + "@wordpress/hooks": "^4.52.0", "@wordpress/i18n": "^6.7.0", "@wordpress/scripts": "^33.0.0", "copy-webpack-plugin": "^14.0.0", diff --git a/php/media/class-gallery.php b/php/media/class-gallery.php index ba9df9d22..f16d9a024 100644 --- a/php/media/class-gallery.php +++ b/php/media/class-gallery.php @@ -240,10 +240,12 @@ public function enqueue_admin_scripts() { /** * Retrieve asset dependencies. * + * @param string $script The script slug to get the generated asset file for. + * * @return array */ - private function get_asset() { - $asset = require $this->plugin->dir_path . 'js/gallery.asset.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable + private function get_asset( $script = 'gallery' ) { + $asset = require $this->plugin->dir_path . 'js/' . $script . '.asset.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable $asset['dependencies'] = array_filter( $asset['dependencies'], @@ -261,24 +263,40 @@ static function ( $dependency ) { public function block_editor_scripts_styles() { $this->enqueue_gallery_library(); - wp_enqueue_style( - 'cloudinary-gallery-block-css', - $this->plugin->dir_url . 'css/gallery-block.css', - array(), - $this->plugin->version - ); + $asset = $this->get_asset( 'gallery-block' ); wp_enqueue_script( 'cloudinary-gallery-block-js', $this->plugin->dir_url . 'js/gallery-block.js', - array( 'wp-blocks', 'wp-editor', 'wp-element', self::GALLERY_LIBRARY_HANDLE ), - $this->plugin->version, + array_merge( $asset['dependencies'], array( self::GALLERY_LIBRARY_HANDLE ) ), + $asset['version'], true ); wp_add_inline_script( 'cloudinary-gallery-block-js', 'var CLD_REST_ENDPOINT = "/' . REST_API::BASE . '";', 'before' ); } + /** + * Enqueue the gallery block editor styles. + * + * Registered on `enqueue_block_assets` so the styles are injected into the + * iframed block editor correctly. As of WordPress 7.1 the post editor is + * always iframed, and styles added via `enqueue_block_editor_assets` are + * flagged as being added to the iframe incorrectly. + */ + public function block_editor_styles() { + if ( ! is_admin() ) { + return; + } + + wp_enqueue_style( + 'cloudinary-gallery-block-css', + $this->plugin->dir_url . 'css/gallery-block.css', + array(), + $this->plugin->version + ); + } + /** * Fetches image public id and transformations. * @@ -410,13 +428,13 @@ public function register_settings( $pages ) { ); } + // The `js/gallery.js` app script is enqueued in `enqueue_admin_scripts()` + // with its generated asset dependencies. Adding a `script` here would + // enqueue the same file under a second handle, executing the bundle twice + // and calling `createRoot()` twice on the same container. $panel[] = array( - 'type' => 'react', - 'slug' => 'gallery_config', - 'script' => array( - 'slug' => 'gallery-widget', - 'src' => $this->plugin->dir_url . 'js/gallery.js', - ), + 'type' => 'react', + 'slug' => 'gallery_config', ); $panel[] = array( @@ -688,6 +706,7 @@ public function inject_glb_metadata( $metadata, $attachment_id ) { public function setup_hooks() { add_filter( 'cloudinary_api_rest_endpoints', array( $this, 'rest_endpoints' ) ); add_action( 'enqueue_block_editor_assets', array( $this, 'block_editor_scripts_styles' ) ); + add_action( 'enqueue_block_assets', array( $this, 'block_editor_styles' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_gallery_library' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); add_filter( 'render_block', array( $this, 'prepare_block_render' ), 10, 2 ); diff --git a/php/media/class-video.php b/php/media/class-video.php index 918134cbd..a1e8ea553 100644 --- a/php/media/class-video.php +++ b/php/media/class-video.php @@ -153,7 +153,15 @@ public function filter_video_shortcode( $html, $attr ) { * Enqueue BLock Assets */ public function enqueue_block_assets() { - wp_enqueue_script( 'cloudinary-block', $this->media->plugin->dir_url . 'js/block-editor.js', array(), $this->media->plugin->version, true ); + $asset = require $this->media->plugin->dir_path . 'js/block-editor.asset.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable + + wp_enqueue_script( + 'cloudinary-block', + $this->media->plugin->dir_url . 'js/block-editor.js', + $asset['dependencies'], + $asset['version'], + true + ); wp_add_inline_script( 'cloudinary-block', 'var CLD_VIDEO_PLAYER = ' . wp_json_encode( $this->config ), 'before' ); } diff --git a/src/js/components/featured-image.js b/src/js/components/featured-image.js index 61058c93d..ff985ac5d 100644 --- a/src/js/components/featured-image.js +++ b/src/js/components/featured-image.js @@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n'; import { ToggleControl } from '@wordpress/components'; import { withDispatch, withSelect } from '@wordpress/data'; +import { addFilter } from '@wordpress/hooks'; // Set our component. let FeaturedTransformationsToggle = ( props ) => { @@ -72,7 +73,7 @@ const Featured = { // the media object, to determine if an asset has transformations. // Also adds deeper support for other image types within Guttenberg. // @todo: find other locations (i.e Video poster). - wp.hooks.addFilter( + addFilter( 'editor.MediaUpload', 'cloudinary/filter-featured-image', cldFilterFeatured diff --git a/src/js/components/video.js b/src/js/components/video.js index 7aecaa677..737d8d8b6 100644 --- a/src/js/components/video.js +++ b/src/js/components/video.js @@ -2,7 +2,10 @@ import { __ } from '@wordpress/i18n'; import { withSelect } from '@wordpress/data'; +import { useEffect } from '@wordpress/element'; import { PanelBody, ToggleControl } from '@wordpress/components'; +import { addFilter } from '@wordpress/hooks'; +import { InspectorControls } from '@wordpress/block-editor'; const Video = { _init() { @@ -11,7 +14,7 @@ const Video = { } // Gutenberg Video Settings - wp.hooks.addFilter( + addFilter( 'blocks.registerBlockType', 'Cloudinary/Media/Video', function ( settings, name ) { @@ -57,7 +60,7 @@ const cldAddToggle = function ( settings, name ) { return settings; }; -wp.hooks.addFilter( +addFilter( 'blocks.registerBlockType', 'cloudinary/addAttributes', cldAddToggle @@ -87,11 +90,16 @@ const TransformationsToggle = ( props ) => { let ImageInspectorControls = ( props ) => { const { setAttributes, media } = props; - const { InspectorControls } = wp.editor; - if ( media && media.transformations ) { - setAttributes( { transformations: true } ); - } + // Flag the block as having transformations after render. Calling + // setAttributes during render triggers a React "Cannot update a component + // while rendering a different component" warning under React 19 + // (WordPress 7.1). + useEffect( () => { + if ( media && media.transformations ) { + setAttributes( { transformations: true } ); + } + }, [ media, setAttributes ] ); return ( @@ -124,7 +132,7 @@ const cldFilterBlocksEdit = ( BlockEdit ) => { }; }; -wp.hooks.addFilter( +addFilter( 'editor.BlockEdit', 'cloudinary/filterEdit', cldFilterBlocksEdit, diff --git a/src/js/gallery-block/edit.js b/src/js/gallery-block/edit.js index 0b7ee5403..eaf4882a3 100644 --- a/src/js/gallery-block/edit.js +++ b/src/js/gallery-block/edit.js @@ -13,7 +13,11 @@ import apiFetch from '@wordpress/api-fetch'; import { Spinner } from '@wordpress/components'; import '@wordpress/components/build-style/style.css'; import { useEffect, useMemo, useState } from '@wordpress/element'; -import { InspectorControls, MediaPlaceholder } from '@wordpress/block-editor'; +import { + InspectorControls, + MediaPlaceholder, + useBlockProps, +} from '@wordpress/block-editor'; /** * Internal dependencies @@ -36,7 +40,13 @@ const galleryWidgetConfig = ( config, container ) => ( { zoom: false, } ); -const Edit = ( { setAttributes, attributes, className, isSelected } ) => { +// Prefix for the generated gallery container class. A literal prefix keeps +// the value a valid, unique CSS selector. Prior to the Block API v2 upgrade +// the block's `className` prop was used, but that prop is no longer passed to +// `Edit` in API v2, which produced containers named "undefined". +const CONTAINER_PREFIX = 'cld-gallery-'; + +const Edit = ( { setAttributes, attributes, isSelected } ) => { const [ errorMessage, setErrorMessage ] = useState( null ); const [ loading, setLoading ] = useState( false ); @@ -122,22 +132,32 @@ const Edit = ( { setAttributes, attributes, className, isSelected } ) => { return () => gallery.destroy(); } - }, [ errorMessage, attributes, setAttributes, className ] ); + }, [ errorMessage, attributes, setAttributes ] ); const hasImages = !! attributes.selectedImages.length; - if ( ! attributes.container ) { - setAttributes( { - container: `${ className }${ generateId( 15 ) }`, - } ); - } + // Persist the generated container id and prepared defaults after render. + // Calling setAttributes during render triggers a React "Cannot update a + // component while rendering a different component" warning under React 19 + // (WordPress 7.1). + useEffect( () => { + if ( ! attributes.container ) { + setAttributes( { + container: `${ CONTAINER_PREFIX }${ generateId( 15 ) }`, + } ); + } + }, [ attributes.container, setAttributes ] ); + + useEffect( () => { + setAttributes( preparedAttributes ); + }, [ preparedAttributes, setAttributes ] ); - setAttributes( preparedAttributes ); + const blockProps = useBlockProps(); return ( - <> +
<> -
+
{ setAttributes={ setAttributes } /> - +
); }; diff --git a/src/js/gallery-block/index.js b/src/js/gallery-block/index.js index d3ff0f894..3f6eac01e 100644 --- a/src/js/gallery-block/index.js +++ b/src/js/gallery-block/index.js @@ -12,6 +12,7 @@ import save from './save'; import attributes from './attributes.json'; registerBlockType( 'cloudinary/gallery', { + apiVersion: 2, title: __( 'Cloudinary Gallery', 'cloudinary' ), description: __( 'Add a gallery powered by the Cloudinary Gallery Widget to your post.',