!function(){var e={151(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&o.rotl(e,8)|4278255360&o.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,n=0;o>>5]|=e[o]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o>>6*(3-l)&63)):o.push("=");return o.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],n=0,r=0;n>>6-2*r);return o}},e.exports=o},413(e,t){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(o=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===o.Tag||e.type===o.Script||e.type===o.Style},t.Root=o.Root,t.Text=o.Text,t.Directive=o.Directive,t.Comment=o.Comment,t.Script=o.Script,t.Style=o.Style,t.Tag=o.Tag,t.CDATA=o.CDATA,t.Doctype=o.Doctype},141(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var l=o(413),a=o(957);r(o(957),t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,o){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(o=t,t=i),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:i,this.elementCB=null!=o?o:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var o=this.options.xmlMode?l.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===l.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var o=new a.Text(e);this.addNode(o),this.lastNode=o}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===l.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var o=new a.ProcessingInstruction(e,t);this.addNode(o)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],o=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),o&&(e.prev=o,o.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},957(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=this&&this.__assign||function(){return l=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(i);t.NodeWithChildren=d;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var h=function(e){function t(t,o,n,r){void 0===n&&(n=[]),void 0===r&&(r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var l=e.call(this,n)||this;return l.name=t,l.attribs=o,l.type=r,l}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var o,n;return{name:t,value:e.attribs[t],namespace:null===(o=e["x-attribsNamespace"])||void 0===o?void 0:o[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}})},enumerable:!1,configurable:!0}),t}(d);function _(e){return(0,a.isTag)(e)}function b(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function g(e){return e.type===a.ElementType.Comment}function v(e){return e.type===a.ElementType.Directive}function k(e){return e.type===a.ElementType.Root}function C(e,t){var o;if(void 0===t&&(t=!1),y(e))o=new c(e.data);else if(g(e))o=new u(e.data);else if(_(e)){var n=t?x(e.children):[],r=new h(e.name,l({},e.attribs),n);n.forEach(function(e){return e.parent=r}),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=l({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=l({},e["x-attribsPrefix"])),o=r}else if(b(e)){n=t?x(e.children):[];var a=new m(n);n.forEach(function(e){return e.parent=a}),o=a}else if(k(e)){n=t?x(e.children):[];var i=new f(n);n.forEach(function(e){return e.parent=i}),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),o=i}else{if(!v(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new p(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),o=s}return o.startIndex=e.startIndex,o.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(o.sourceCodeLocation=e.sourceCodeLocation),o}function x(e){for(var t=e.map(function(e){return C(e,!0)}),o=1;o/i,c=//i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},p=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},d="object"==typeof window&&window.DOMParser;if("function"==typeof d){var m=new d;u=p=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),m.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var o=f.documentElement.querySelector(t);return o&&(o.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var h,_="object"==typeof document&&document.createElement("template");_&&_.content&&(h=function(e){return _.innerHTML=e,_.content.childNodes})},471(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),o=t?t[1]:void 0;return(0,l.formatDOM)((0,r.default)(e),null,o)};var r=n(o(496)),l=o(731),a=/<(![a-zA-Z\s]+)>/},731(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=l,t.escapeSpecialCharacters=function(e){return e.replace(r.CARRIAGE_RETURN_REGEX,r.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=i,t.formatDOM=function e(t,o,r){void 0===o&&(o=null);for(var s,c=[],u=0,p=t.length;u1&&(b=p(b,{key:b.key||h})),n.push(c(b,_,h));continue}}if("text"!==_.type){var y=_,g={};s(y)?((0,a.setStyleProp)(y.attribs.style,y.attribs),g=y.attribs):y.attribs&&(g=(0,l.default)(y.attribs,y.name));var v=void 0;switch(_.type){case"script":case"style":_.children[0]&&(g.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":"textarea"===_.name&&_.children[0]?g.defaultValue=_.children[0].data:_.children&&_.children.length&&(v=e(_.children,o));break;default:continue}f>1&&(g.key=h),n.push(c(d(_.name,g,v),_,h))}else{var k=!_.data.trim().length;if(k&&_.parent&&!(0,a.canTextBeChildOfNode)(_.parent))continue;if(o.trim&&k)continue;n.push(c(_.data,_,h))}}return 1===n.length?n[0]:n};var r=o(486),l=n(o(840)),a=o(958),i={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}},442(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,a.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t)};var r=n(o(471));t.htmlToDOM=r.default;var l=n(o(840));t.attributesToProps=l.default;var a=n(o(308));t.domToReact=a.default;var i=o(141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return i.Text}});var s={lowerCaseAttributeNames:!1}},958(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"==typeof t.is);if(a.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!=typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,l.default)(e,i)}catch(e){t.style={}}};var r=o(486),l=n(o(229)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var i={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}},77(e){"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var p=1,d=1;function m(e){var t=e.match(o);t&&(p+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function f(){var e={line:p,column:d};return function(t){return t.position=new h(e),y(),t}}function h(e){this.start=e,this.end={line:p,column:d},this.source=s.source}function _(t){var o=new Error(s.source+":"+p+":"+d+": "+t);if(o.reason=t,o.filename=s.source,o.line=p,o.column=d,o.source=e,!s.silent)throw o}function b(t){var o=t.exec(e);if(o){var n=o[0];return m(n),e=e.slice(n.length),o}}function y(){b(n)}function g(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;c!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,c===e.charAt(o-1))return _("End of comment missing");var n=e.slice(2,o-2);return d+=2,m(n),e=e.slice(o),d+=2,t({type:"comment",comment:n})}}function k(){var e=f(),o=b(r);if(o){if(v(),!b(l))return _("property missing ':'");var n=b(a),s=e({type:"declaration",property:u(o[0].replace(t,c)),value:n?u(n[0].replace(t,c)):c});return b(i),s}}return h.prototype.content=e,y(),function(){var e,t=[];for(g(t);e=k();)!1!==e&&(t.push(e),g(t));return t}()}},206(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},503(e,t,o){var n,r,l,a,i;n=o(939),r=o(151).utf8,l=o(206),a=o(151).bin,(i=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):r.stringToBytes(e):l(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=n.bytesToWords(e),s=8*e.length,c=1732584193,u=-271733879,p=-1732584194,d=271733878,m=0;m>>24)|4278255360&(o[m]<<24|o[m]>>>8);o[s>>>5]|=128<>>9<<4)]=s;var f=i._ff,h=i._gg,_=i._hh,b=i._ii;for(m=0;m>>0,u=u+g>>>0,p=p+v>>>0,d=d+k>>>0}return n.endian([c,u,p,d])})._ff=function(e,t,o,n,r,l,a){var i=e+(t&o|~t&n)+(r>>>0)+a;return(i<>>32-l)+t},i._gg=function(e,t,o,n,r,l,a){var i=e+(t&n|o&~n)+(r>>>0)+a;return(i<>>32-l)+t},i._hh=function(e,t,o,n,r,l,a){var i=e+(t^o^n)+(r>>>0)+a;return(i<>>32-l)+t},i._ii=function(e,t,o,n,r,l,a){var i=e+(o^(t|~n))+(r>>>0)+a;return(i<>>32-l)+t},i._blocksize=16,i._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=n.wordsToBytes(i(e,t));return t&&t.asBytes?o:t&&t.asString?a.bytesToString(o):n.bytesToHex(o)}},210(e,t,o){"use strict";function n(e,t,o,n,r,l,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{r[e]=new n(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{r[e]=new n(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{r[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{r[e]=new n(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{r[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{r[e]=new n(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{r[e]=new n(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{r[e]=new n(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{r[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)});const l=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)});r.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:i,SAME:s,possibleStandardNames:c}=o(811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce((e,t)=>{const o=c[t];return o===s?e[t]=t:o===i?e[t.toLowerCase()]=t:e[t]=o,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},811(e,t){t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},112(e){var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function l(e){return t[e]}var a=function(e){return e.replace(n,l)};e.exports=a,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=a},604(e,t,o){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(e){return function(e,t){var o,n,a,i,s,c,u,p,d,m=1,f=e.length,h="";for(n=0;n=0),i.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,i.width?parseInt(i.width):0);break;case"e":o=i.precision?parseFloat(o).toExponential(i.precision):parseFloat(o).toExponential();break;case"f":o=i.precision?parseFloat(o).toFixed(i.precision):parseFloat(o);break;case"g":o=i.precision?String(Number(o.toPrecision(i.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=i.precision?o.substring(0,i.precision):o;break;case"t":o=String(!!o),o=i.precision?o.substring(0,i.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=i.precision?o.substring(0,i.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=i.precision?o.substring(0,i.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}r.json.test(i.type)?h+=o:(!r.number.test(i.type)||p&&!i.sign?d="":(d=p?"+":"-",o=o.toString().replace(r.sign,"")),c=i.pad_char?"0"===i.pad_char?"0":i.pad_char.charAt(1):" ",u=i.width-(d+o).length,s=i.width&&u>0?c.repeat(u):"",h+=i.align?d+o+s:"0"===c?d+s+o:s+d+o)}return h}(function(e){if(i[e])return i[e];var t,o=e,n=[],l=0;for(;o;){if(null!==(t=r.text.exec(o)))n.push(t[0]);else if(null!==(t=r.modulo.exec(o)))n.push("%");else{if(null===(t=r.placeholder.exec(o)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){l|=1;var a=[],s=t[2],c=[];if(null===(c=r.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=r.key_access.exec(s)))a.push(c[1]);else{if(null===(c=r.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}o=o.substring(t[0].length)}return i[e]=n}(e),arguments)}function a(e,t){return l.apply(null,[e].concat(t||[]))}var i=Object.create(null);"undefined"!=typeof window&&(window.sprintf=l,window.vsprintf=a,void 0===(n=function(){return{sprintf:l,vsprintf:a}}.call(t,o,t,e))||(e.exports=n))}()},229(e,t,o){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(o(133)),r=o(917);function l(e,t){var o={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(o[(0,r.camelCase)(e,t)]=n)}),o):o}l.default=l,e.exports=l},917(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var o=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,s):e.replace(l,s)).replace(n,i))}},133(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let o=null;if(!e||"string"!=typeof e)return o;const n=(0,r.default)(e),l="function"==typeof t;return n.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:r}=e;l?t(n,r,e):r&&(o=o||{},o[n]=r)}),o};const r=n(o(77))},486(e){"use strict";e.exports=window.React},942(e,t){var o; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t/g,"\n")).trim().replace(/\n\n+/g,"\n\n")}var f=function({breadcrumbs:t,postId:o,postType:n}){if(!t||!t.render)return(0,e.createElement)(l.Spinner,null);const[r=""]=(0,a.useEntityProp)("postType",n,"title",o);return(0,e.createElement)("span",{dangerouslySetInnerHTML:{__html:t.render.replace("__BLOCKSY_BREADCRUMBS_POST_TITLE__",m(r))}})};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&h[e]?h[e]:h&&h.length>0&&!h[e]?h[0]:null},arrowsDescritor:{left:{onClick:function(e){e.preventDefault(),a&&a.sliderArrows.navigate("left")}},right:{onClick:function(e){e.preventDefault(),a&&a.sliderArrows.navigate("right")}}}}};const O=function(t,o=[]){let n="";const r=((e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[e]];return t})(),l={cacheId:r,initialStyleTagsDescriptor:[{readStyles:function(){return""},persistStyles:function(e){n=e}}]};R.syncHelpers.getStyleTagsWithAst(l);t.map(function(e){let t=R.syncHelpers.getUpdateAstsForStyleDescriptor({variableDescriptor:e.variables,value:e.value,fullValue:{},...l});R.syncHelpers.persistNewAsts(r,t)});let a=n?(0,e.createElement)("style",null,n):null;return o=[(window.ct_localizations||window.ct_customizer_localizations).backend_dynamic_styles_urls.flexy],(0,e.createElement)(e.Fragment,null,a,o.map(function(t){return(0,e.createElement)("link",{key:t,rel:"stylesheet",href:t})}))};var M=o(942),F=o.n(M),V=o(442),L=V.default||V;var j=function({attributes:o,postId:n,uniqueId:r}){const{blockData:a}=D({attributes:o,previewedPostId:n}),i="yes"===o.has_slideshow,s=z({isSlideshow:i,attributes:o,toWatch:a?a.customizer_preview:{}}),c=O([]);return a?a.customizer_preview?(0,e.createElement)(React.Fragment,null,function({isSlideshow:t,sliderDescriptor:o,blockData:n}){if(!t)return(0,e.createElement)(e.RawHTML,null,n.customizer_preview);const r={replace:function({attribs:t,children:n,name:l},a){if(t&&t.class&&t.class.includes("flexy-container"))return(0,e.createElement)("div",h({},(0,V.attributesToProps)(t),o.flexyContainerAttr),(0,V.domToReact)(n,r));if(t&&t.class&&t.class.includes("flexy-arrow-")){const a=l,i=t.class.includes("flexy-arrow-next")?o.arrowsDescritor.right:o.arrowsDescritor.left;return(0,e.createElement)(a,h({},(0,V.attributesToProps)(t),i),(0,V.domToReact)(n,r))}if((t&&t.class?t.class.split(" "):[]).includes("flexy-item")){let l=o.elementDescriptorForIndex(a);l&&(l=l.attr);let{className:i,...s}=(0,V.attributesToProps)(t);if(l){const{className:e,...t}=l;i=F()(i,e),s={...s,...t}}return(0,e.createElement)("div",h({className:F()(i)},s),(0,V.domToReact)(n,r))}}};return L(n.customizer_preview,r)}({isSlideshow:i,sliderDescriptor:s,blockData:a}),c):(0,e.createElement)("p",null,(0,t.__)("No results found.","blocksy-companion")):(0,e.createElement)(l.Spinner,null)};const $=function(e){return e.split("-")[0]};const U=function({attributes:t,clientId:o,setAttributes:n,blockType:r}){(0,e.useEffect)(function(){t.uniqueId&&!function({attributes:e,blockType:t}){const o=document.querySelectorAll("iframe");return[document,...Array.from(o).filter(function(e){return!e.closest(".block-editor-block-preview__container")}).map(function(e){return e.contentDocument}).filter(function(e){return e})].flatMap(function(o){return[...o.querySelectorAll(`[data-id="${e.uniqueId}"][data-type="${t}"]`)]}).length>1}({attributes:t,clientId:o,blockType:r})||n({uniqueId:$(o)})},[o]);let l=t.uniqueId||$(o);return{uniqueId:l,props:{"data-id":l}}};var q=function({clientId:o,setAttributes:l,setIsPatternSelectionModalOpen:a}){const{replaceInnerBlocks:i}=(0,b.useDispatch)(r.store);return(0,e.createElement)("div",{className:"components-placeholder is-large"},(0,e.createElement)("div",{className:"components-placeholder__label"},(0,e.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,t.__)("Advanced Posts","blocksy-companion")),(0,e.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,e.createElement)("legend",{className:"components-placeholder__instructions"},(0,t.__)("Inherit the Customizer layout, start with a pattern or create a custom layout","blocksy-companion")),(0,e.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),l({design:"default"})}},(0,t.__)("Inherit From Customizer","blocksy-companion")),(0,e.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),a(!0)}},(0,t.__)("Choose Pattern","blocksy-companion")),(0,e.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),i(o,(0,n.createBlocksFromInnerBlocksTemplate)([["blocksy/post-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:date"}],["blocksy/dynamic-data",{field:"wp:excerpt"}]]]]),!1)}},(0,t.__)("Create Custom Layout","blocksy-companion"))))},G=o(486),W=window.wp.primitives;var Z=(0,G.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,G.createElement)(W.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}));var X=(0,G.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,G.createElement)(W.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var K=(0,G.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,G.createElement)(W.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),J=window.wp.a11y;var Y=function({items:o,selectedItems:n,onItemClick:r,label:a,resetAll:i}){const s=n.length>0;return(0,e.createElement)(l.__experimentalHStack,null,(0,e.createElement)(l.__experimentalHeading,{style:{margin:0},level:2},a),(0,e.createElement)(l.DropdownMenu,{icon:0===n.length?Z:X,label:(0,t.__)("Parameters options","blocksy-companion"),toggleProps:{isSmall:!0,describedBy:0===n.length?(0,t.__)("All options are currently hidden","blocksy-companion"):void 0}},function(){return(0,e.createElement)(React.Fragment,null,o.map(function(t,o){return(0,e.createElement)(l.MenuGroup,{key:o,label:t.label},t.items.map(function(t,o){const a=n.includes(t.label);return(0,e.createElement)(l.MenuItem,{key:o,icon:a?K:null,isSelected:a,onClick:function(){return r(t.label)}},t.label)}))}),(0,e.createElement)(l.MenuGroup,null,(0,e.createElement)(l.MenuItem,{"aria-disabled":!s,variant:"tertiary",onClick:function(){s&&(i(),(0,J.speak)((0,t.__)("All options reset","blocksy-companion"),"assertive"))}},(0,t.__)("Reset all","blocksy-companion"))))}))};var Q=function({className:t,attributes:o,setAttributes:n,resetAll:r,items:l,label:a}){const i=l.reduce(function(e,t){return[...e,...t.items.filter(function(e){return e.hasValue()}).map(function(e){return e.label})]},[]),[s,c]=(0,e.useState)([]),u=[...new Set([...s,...i])];return(0,e.createElement)("div",{className:F()("ct-tools-panel",t)},(0,e.createElement)(Y,{label:a,resetAll:function(){c([]),r()},items:l,selectedItems:u,attributes:o,setAttributes:n,onItemClick:function(e){if(!u.includes(e))return void c([...s,e]);const t=l.reduce(function(e,t){return[...e,...t.items]},[]).find(function(t){return t.label===e});c(s.filter(function(t){return t!==e})),t.reset()}}),(0,e.createElement)("div",{className:"ct-tools-panel-items"},l.reduce(function(e,t){return[...e,...t.items]},[]).filter(function(e){return u.includes(e.label)}).map(function(e){return e.render()})))};const ee=["wp_pattern_category","nav_menu"],te=function(e,t){const o=e.map(function(e){return(0,n.cloneBlock)(e)}),r=[],l=[...o];for(;l.length>0;){const e=l.shift();"blocksy/query"===e.name&&(e.attributes.uniqueId="",r.push(e.clientId)),e.innerBlocks?.forEach(function(e){l.push(e)})}return{newBlocks:o,queryClientIds:r}};const oe=function(e){return(0,b.useSelect)(function(t){const{getTaxonomies:o}=t(a.store);return(o({type:e,per_page:-1,context:"view"})||[]).filter(function({slug:e}){return!ee.includes(e)})},[e])};var ne=window.wp.compose;const re=[],le={order:"asc",_fields:"id,name,slug",context:"view"},ae=function(e,t){const o=t?.slug||e?.find(function(e){return e.name===t})?.slug;if(o)return o;const n=t.toLocaleLowerCase();return e?.find(function(e){return e.name.toLocaleLowerCase()===n})?.slug};function ie({taxonomy:o,termIds:n,onChange:r,label:i=!1}){const[s,c]=(0,e.useState)(""),[u,p]=(0,e.useState)(re),[d,m]=(0,e.useState)(re),f=(0,ne.useDebounce)(c,250),{searchResults:h,searchHasResolved:_}=(0,b.useSelect)(function(e){if(!s)return{searchResults:re,searchHasResolved:!0};const{getEntityRecords:t,hasFinishedResolution:n}=e(a.store),r=["taxonomy",o.slug,{...le,search:s,orderby:"name",per_page:20}];return{searchResults:t(...r),searchHasResolved:n("getEntityRecords",r)}},[s,n]),y=(0,b.useSelect)(function(e){if(!n?.length)return re;const{getEntityRecords:t}=e(a.store);return t("taxonomy",o.slug,{...le,slug:n,per_page:n.length})},[n]);(0,e.useEffect)(function(){if(n?.length||p(re),!y?.length)return;const e=n.reduce(function(e,t){const o=y.find(function(e){return e.slug===t});return o&&e.push({id:t,slug:t,value:o.name}),e},[]);p(e)},[n,y]),(0,e.useEffect)(function(){_&&m(h.map(function(e){return e.name}))},[h,_]);return(0,e.createElement)(l.FormTokenField,{label:i,value:u,onInputChange:f,suggestions:d,onChange:function(e){const t=new Set;for(const o of e){const e=ae(h,o);e&&t.add(e)}m(re),r(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,placeholder:(0,t.__)("Search for a term","blocksy-companion")})}const se=function({taxonomy:o,attributes:n,setAttributes:r,previewedPostMatchesType:a}){return{label:(0,t.sprintf)((0,t.__)("Include %s","blocksy-companion"),o.name),hasValue:function(){return n.include_term_ids[o.slug]},reset:function(){const{[o.slug]:e,...t}=n.include_term_ids||{};r({include_term_ids:t})},render:function(){const i=n.include_term_ids[o.slug]||{strategy:"all",terms:[]};return(0,e.createElement)("div",null,(0,e.createElement)(l.__experimentalToggleGroupControl,{label:(0,t.sprintf)((0,t.__)("Include %s","blocksy-companion"),o.name),value:i.strategy,isBlock:!0,onChange:function(e){r({include_term_ids:{...n.include_term_ids,[o.slug]:{...i,strategy:e}}})}},(0,e.createElement)(l.__experimentalToggleGroupControlOption,{value:"all",label:(0,t.__)("All","blocksy-companion")}),(0,e.createElement)(l.__experimentalToggleGroupControlOption,{value:"specific",label:(0,t.__)("Specific","blocksy-companion")}),a&&(0,e.createElement)(l.__experimentalToggleGroupControlOption,{value:"related",label:(0,t.__)("Related","blocksy-companion")})),"specific"===i.strategy&&(0,e.createElement)(ie,{taxonomy:o,termIds:i.terms,onChange:function(e){r({include_term_ids:{...n.include_term_ids,[o.slug]:{...i,terms:e}}})}}))}}},ce=function({taxonomy:o,attributes:n,setAttributes:r}){return{label:(0,t.sprintf)((0,t.__)("Exclude %s","blocksy-companion"),o.name),hasValue:function(){return n.exclude_term_ids[o.slug]},reset:function(){const{[o.slug]:e,...t}=n.exclude_term_ids||{};r({exclude_term_ids:t})},render:function(){const l=n.exclude_term_ids[o.slug]||{strategy:"specific",terms:[]};return(0,e.createElement)(ie,{label:(0,t.sprintf)((0,t.__)("Exclude %s","blocksy-companion"),o.name),taxonomy:o,termIds:l.terms,onChange:function(e){r({exclude_term_ids:{...n.exclude_term_ids,[o.slug]:{...l,terms:e}}})}})}}},ue=function({attributes:e,attributes:{taxonomy:o},setAttributes:n}){const r=function(e){return(0,b.useSelect)(function(t){const{getTaxonomy:o}=t(a.store);return o(e)},[e])}(o);if(!r)return{taxonomiesGroup:null};const l=[se({taxonomy:r,attributes:e,setAttributes:n}),ce({taxonomy:r,attributes:e,setAttributes:n})];return{taxonomiesGroup:l.length>0?{label:(0,t.__)("Taxonomies","blocksy-companion"),items:l}:null}};var pe=function({context:o,attributes:n,attributes:{post_type:l},setAttributes:a}){const{taxonomiesGroup:i}=function({attributes:e,attributes:{post_type:o},previewedPostMatchesType:n,setAttributes:r}){const l=oe(o);let a=[];return l&&l.length>0&&(a=[...l.map(function(t){return se({taxonomy:t,attributes:e,setAttributes:r,previewedPostMatchesType:n})}),...l.map(function(t){return ce({taxonomy:t,attributes:e,setAttributes:r})})]),{taxonomiesGroup:a.length>0?{label:(0,t.__)("Taxonomies","blocksy-companion"),items:a}:null}}({attributes:n,setAttributes:a,previewedPostMatchesType:n.post_type===o.postType});return(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(Q,{className:"ct-query-parameters-component",attributes:n,setAttributes:a,resetAll:function(){a({offset:0,sticky_posts:"include",orderby:"post_date",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,t.__)("General","blocksy-companion"),items:[{label:(0,t.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==n.offset},reset:function(){a({offset:0})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){a({[e]:t})},options:{offset:{type:"ct-number",label:(0,t.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Order by","blocksy-companion"),hasValue:function(){return"post_date"!==n.orderby},reset:function(){a({orderby:"post_date"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){a({[e]:t})},options:{orderby:{type:"ct-select",label:(0,t.__)("Order by","blocksy-companion"),value:"",choices:[{key:"title",value:(0,t.__)("Title","blocksy-companion")},{key:"post_date",value:(0,t.__)("Publish Date","blocksy-companion")},{key:"modified",value:(0,t.__)("Modified Date","blocksy-companion")},{key:"comment_count",value:(0,t.__)("Most commented","blocksy-companion")},{key:"author",value:(0,t.__)("Author","blocksy-companion")},{key:"rand",value:(0,t.__)("Random","blocksy-companion")},{key:"menu_order",value:(0,t.__)("Menu Order","blocksy-companion")}]}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==n.order},reset:function(){a({order:"desc"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){a({[e]:t})},options:{order:{type:"ct-select",label:(0,t.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,t.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,t.__)("Ascending","blocksy-companion")}]}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Sticky Posts","blocksy-companion"),hasValue:function(){return"include"!==n.sticky_posts},reset:function(){a({sticky_posts:"include"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){a({[e]:t})},options:{sticky_posts:{type:"ct-select",label:(0,t.__)("Sticky Posts","blocksy-companion"),value:"include",choices:[{key:"include",value:(0,t.__)("Include","blocksy-companion")},{key:"exclude",value:(0,t.__)("Exclude","blocksy-companion")},{key:"only",value:(0,t.__)("Only","blocksy-companion")}]}},value:n,hasRevertButton:!1})}}]},...i?[i]:[]],label:(0,t.__)("Parameters","blocksy-companion")}))};let de=null,me=new AbortController;var fe=o(112),he=o.n(fe);function _e(e=""){return e=(e=he()(e)).trim().toLowerCase()}function be(e,t){const o=_e(t),n=_e(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every(function(e){return n.includes(e)})&&(r+=10)}return r}function ye(e=[],t=""){if(!t)return e;const o=e.map(function(e){return[e,be(e,t)]}).filter(function([,e]){return e>0});return o.sort(function([,e],[,t]){return t-e}),o.map(function([e]){return e})}var ge=function({clientId:o,attributes:a,setIsPatternSelectionModalOpen:i,postType:s}){const[c,u]=(0,e.useState)(""),{replaceBlock:p,selectBlock:d}=(0,b.useDispatch)(r.store),[m,f]=(0,e.useState)([]);(0,e.useEffect)(function(){new Promise(function(e){de?e(de):fetch(`${wp.ajax.settings.url}?action=blocksy_get_posts_block_patterns`,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:me.signal}).then(function(e){return e.json()}).then(function({success:t,data:o}){t&&(de=o.patterns.map(function(e){return{...e,blocks:(0,n.parse)(e.content,{__unstableSkipMigrationLogs:!0})}}),e(de))})}).then(function(e){f(e)})},[]);const h=(0,e.useMemo)(function(){return{previewPostType:s}},[s]),_=(0,e.useMemo)(function(){return ye(m,c)},[m,c]),y=(0,ne.useAsyncList)(_);return(0,e.createElement)(l.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,t.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return i(!1)},isFullScreen:!0},(0,e.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,e.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,e.createElement)(l.SearchControl,{__nextHasNoMarginBottom:!0,onChange:u,value:c,label:(0,t.__)("Search for patterns","blocksy-companion"),placeholder:(0,t.__)("Search","blocksy-companion")})),(0,e.createElement)(r.BlockContextProvider,{value:h},(0,e.createElement)(r.__experimentalBlockPatternsList,{blockPatterns:_,shownPatterns:y,onClickPattern:function(e,t){const{newBlocks:n,queryClientIds:r}=te(t);p(o,n),r[0]&&d(r[0])}}))))};var ve=function({clientId:o,className:n,attributes:i,setAttributes:s,context:c}){const u=(0,r.useInnerBlocksProps)({},{}),p=(0,b.useSelect)(function(e){return!!e(r.store).getBlocks(o).length},[o]),d=!p&&"default"!==i.design,{postTypesSelectOptions:m}=function(t={}){let{hasPages:o=!1}=t;const n=(0,b.useSelect)(function(e){const{getPostTypes:t}=e(a.store),n=["attachment","product",...o?[]:["page"]],r=t({per_page:-1})?.filter(function({viewable:e,slug:t}){return e&&!n.includes(t)&&!t.includes("ct_")&&!t.includes("blc-")});return r},[o]);return{postTypesTaxonomiesMap:(0,e.useMemo)(function(){if(n?.length)return n.reduce(function(e,t){return e[t.slug]=t.taxonomies,e},{})},[n]),postTypesSelectOptions:(0,e.useMemo)(function(){return(n||[]).reduce(function(e,t){return{...e,[t.slug]:t.labels.singular_name}},{})},[n])}}({hasPages:p}),{uniqueId:f,props:_}=U({attributes:i,setAttributes:s,clientId:o,blockType:"blocksy/query"}),{postId:y,postType:g}=c,v=(0,e.useRef)(),[k,C]=(0,e.useState)(null),x=(0,r.__experimentalUseBorderProps)(i),w=(0,r.useBlockProps)({ref:v,className:n,style:{...x.style}}),[E,S]=(0,e.useState)(!1);return(0,e.createElement)(React.Fragment,null,E&&(0,e.createElement)(ge,{clientId:o,attributes:i,setIsPatternSelectionModalOpen:S,postType:i.post_type}),d?(0,e.createElement)("div",h({},w,_),(0,e.createElement)(q,{setIsPatternSelectionModalOpen:S,attributes:i,setAttributes:s,clientId:o})):(0,e.createElement)("div",h({},w,_),"default"===i.design&&(0,e.createElement)(j,{uniqueId:f,attributes:i,postId:y}),p&&(0,e.createElement)("div",u)),(0,e.createElement)(r.BlockControls,null,(0,e.createElement)(l.ToolbarGroup,null,(0,e.createElement)(l.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,t.__)("Reset layout","blocksy-companion"),disabled:d,onClick:function(){p?(0,b.dispatch)("core/block-editor").replaceInnerBlocks(o,[],!1):(0,b.dispatch)("core/block-editor").updateBlockAttributes(o,{design:""})}}))),!d&&(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t,..."post_type"===e?{include_term_ids:{},exclude_term_ids:{},include_post_ids:{ids:[],current_post:!1},exclude_post_ids:{ids:[],current_post:!1}}:{}})},options:{post_type:{type:"ct-select",label:(0,t.__)("Post Type","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:m,purpose:"default"},limit:{type:"ct-number",label:(0,t.__)("Limit","blocksy-companion"),value:"",min:1,max:100},has_slideshow:{type:"ct-switch",label:(0,t.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,t.__)("Navigation Arrows","blocksy-companion"),value:""},has_slideshow_pills:{type:"ct-switch",label:(0,t.__)("Navigation Pills","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,t.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,t.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}},has_pagination_condition:{type:"ct-condition",condition:{has_slideshow:"no"},options:{has_pagination:{type:"ct-switch",label:(0,t.__)("Pagination","blocksy-companion"),value:""}}}},value:i,hasRevertButton:!1}))),(0,e.createElement)(pe,{attributes:i,setAttributes:s,context:c})),(0,e.createElement)(r.InspectorControls,{group:"advanced"},(0,e.createElement)(l.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,t.__)("Block ID","blocksy-companion"),value:f,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,t.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))};var ke=function(t){const o=r.useBlockProps.save(),n=r.useInnerBlocksProps.save(o);return(0,e.createElement)("div",n)},Ce=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"type":{"type":"string","default":"post"},"post_type":{"type":"string","default":"post"},"limit":{"type":"number","default":5},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"include_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"exclude_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"post_date"},"orderby_custom":{"type":"string","default":""},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"has_pagination":{"type":"string","default":"no"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"sticky_posts":{"type":"string","default":"include"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_pills":{"type":"string","default":"no"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","post_type":"post_type","limit":"limit","order":"order","orderby":"orderby","sticky_posts":"sticky_posts","orderby_custom":"orderby_custom","offset":"offset","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_pills":"has_slideshow_pills","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed","has_pagination":"has_pagination","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids"}}');(0,n.registerBlockType)("blocksy/query",{...Ce,title:(0,t.__)("Advanced Posts","blocksy-companion"),description:(0,t.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(t){return(0,e.createElement)(ve,t)},save:function(){return(0,e.createElement)(ke,null)}});const xe=function({attributes:t}){const[o,n]=(0,e.useState)(null);return(0,e.useEffect)(function(){const e=new URLSearchParams(window.location.search);B(`${wp.ajax.settings.url}?action=blocksy_get_tax_block_data${e.get("lang")?"&lang="+e.get("lang"):""}`,{attributes:t},{fetcherName:`tax-block-data-${t.uniqueId}`,headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then(function(e){return e.json()}).then(function({success:e,data:t}){e&&n(t)}).catch(function(e){})},[t]),{blockData:o}};var we=function({attributes:t}){const{blockData:o}=xe({attributes:t});if(!o||!o.block)return(0,e.createElement)(l.Spinner,null);const n="yes"===t.has_slideshow;return(0,e.createElement)(React.Fragment,null,(0,e.createElement)(e.RawHTML,null,o.block),o&&o.dynamic_styles&&(0,e.createElement)("style",null,o.dynamic_styles),o&&"yes"===t.has_pagination&&!n&&o.pagination_output&&(0,e.createElement)(e.RawHTML,null,o.pagination_output))};var Ee=function({clientId:o,setAttributes:l,setIsPatternSelectionModalOpen:a}){const{replaceInnerBlocks:i}=(0,b.useDispatch)(r.store);return(0,e.createElement)("div",{className:"components-placeholder is-large"},(0,e.createElement)("div",{className:"components-placeholder__label"},(0,e.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,t.__)("Advanced Taxonomies","blocksy-companion")),(0,e.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,e.createElement)("legend",{className:"components-placeholder__instructions"},(0,t.__)("Start with a pattern or create a custom layout","blocksy-companion")),(0,e.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),a(!0)}},(0,t.__)("Choose Pattern","blocksy-companion")),(0,e.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),i(o,(0,n.createBlocksFromInnerBlocksTemplate)([["blocksy/tax-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:term_title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:term_description"}]]]]),!1)}},(0,t.__)("Create Custom Layout","blocksy-companion"))))};let Se=null,Ie=new AbortController;var Te=function({clientId:o,attributes:a,setIsPatternSelectionModalOpen:i,postType:s}){const[c,u]=(0,e.useState)(""),{replaceBlock:p,selectBlock:d}=(0,b.useDispatch)(r.store),[m,f]=(0,e.useState)([]);(0,e.useEffect)(function(){new Promise(function(e){Se?e(Se):fetch(`${wp.ajax.settings.url}?action=blocksy_get_terms_block_patterns`,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:Ie.signal}).then(function(e){return e.json()}).then(function({success:t,data:o}){t&&(Se=o.patterns.map(function(e){return{...e,blocks:(0,n.parse)(e.content,{__unstableSkipMigrationLogs:!0})}}),e(Se))})}).then(function(e){f(e)})},[]);const h=(0,e.useMemo)(function(){return{previewPostType:s}},[s]),_=(0,e.useMemo)(function(){return ye(m,c)},[m,c]),y=(0,ne.useAsyncList)(_);return(0,e.createElement)(l.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,t.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return i(!1)},isFullScreen:!0},(0,e.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,e.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,e.createElement)(l.SearchControl,{__nextHasNoMarginBottom:!0,onChange:u,value:c,label:(0,t.__)("Search for patterns","blocksy-companion"),placeholder:(0,t.__)("Search","blocksy-companion")})),(0,e.createElement)(r.BlockContextProvider,{value:h},(0,e.createElement)(r.__experimentalBlockPatternsList,{blockPatterns:_,shownPatterns:y,onClickPattern:function(e,t){const{newBlocks:n,queryClientIds:r}=te(t);p(o,n),r[0]&&d(r[0])}}))))};var Ae=function({context:o,attributes:n,attributes:{post_type:a},setAttributes:i}){const{taxonomiesGroup:s}=ue({attributes:n,setAttributes:i});return(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(Q,{className:"ct-query-parameters-component",attributes:n,setAttributes:i,resetAll:function(){i({level:"all",hide_empty:"yes",offset:0,orderby:"none",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,t.__)("General","blocksy-companion"),items:[{label:(0,t.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==n.offset},reset:function(){i({offset:0})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:{offset:{type:"ct-number",label:(0,t.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Order by","blocksy-companion"),hasValue:function(){return"none"!==n.orderby},reset:function(){i({orderby:"none"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:{orderby:{type:"ct-select",label:(0,t.__)("Order by","blocksy-companion"),value:"",choices:[{key:"id",value:(0,t.__)("ID","blocksy-companion")},{key:"name",value:(0,t.__)("Name","blocksy-companion")},{key:"count",value:(0,t.__)("Count","blocksy-companion")},{key:"rand",value:(0,t.__)("Random","blocksy-companion")}]}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==n.order},reset:function(){i({order:"desc"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:{order:{type:"ct-select",label:(0,t.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,t.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,t.__)("Ascending","blocksy-companion")}]}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Level","blocksy-companion"),hasValue:function(){return"all"!==n.level},reset:function(){i({level:"all"})},render:function(){return(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:{level:{type:"ct-select",label:(0,t.__)("Level","blocksy-companion"),value:"",choices:[{key:"all",value:(0,t.__)("All Taxonomies","blocksy-companion")},{key:"parent",value:(0,t.__)("Only Parent Taxonomies","blocksy-companion")},{key:"relevant",value:(0,t.__)("Relevant Taxonomies","blocksy-companion")}]}},value:n,hasRevertButton:!1})}},{label:(0,t.__)("Taxonomies Visibility","blocksy-companion"),hasValue:function(){return"no"===n.hide_empty},reset:function(){i({hide_empty:"yes"})},render:function(){return(0,e.createElement)(l.__experimentalToggleGroupControl,{label:(0,t.__)("Hide Empty Taxonomies","blocksy-companion"),value:n.hide_empty,isBlock:!0,onChange:function(e){i({hide_empty:e})}},(0,e.createElement)(l.__experimentalToggleGroupControlOption,{value:"no",label:(0,t.__)("No","blocksy-companion")}),(0,e.createElement)(l.__experimentalToggleGroupControlOption,{value:"yes",label:(0,t.__)("Yes","blocksy-companion")}))}}]},...s?[s]:[]],label:(0,t.__)("Parameters","blocksy-companion")}))};var Be=function({clientId:o,className:n,attributes:a,setAttributes:i,context:s}){const c=(0,r.useInnerBlocksProps)({},{}),u=(0,b.useSelect)(function(e){return!!e(r.store).getBlocks(o).length},[o]),p=!u&&"default"!==a.design,d=(oe()||[]).reduce(function(e,t){return e[t.slug]=t.name,e},{}),{uniqueId:m,props:f}=U({attributes:a,setAttributes:i,clientId:o,blockType:"blocksy/tax-query"}),{postId:_}=s,y=(0,e.useRef)(),g=(0,r.__experimentalUseBorderProps)(a),v=(0,r.useBlockProps)({ref:y,className:n,style:{...g.style}}),[k,C]=(0,e.useState)(!1);return(0,e.createElement)(React.Fragment,null,k&&(0,e.createElement)(Te,{clientId:o,attributes:a,setIsPatternSelectionModalOpen:C,postType:a.taxonomy}),p?(0,e.createElement)("div",h({},v,f),(0,e.createElement)(Ee,{setIsPatternSelectionModalOpen:C,attributes:a,setAttributes:i,clientId:o})):(0,e.createElement)("div",h({},v,f),"default"===a.design&&(0,e.createElement)(we,{uniqueId:m,attributes:a,postId:_}),u&&(0,e.createElement)("div",c)),(0,e.createElement)(r.BlockControls,null,(0,e.createElement)(l.ToolbarGroup,null,(0,e.createElement)(l.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,t.__)("Reset layout","blocksy-companion"),disabled:p,onClick:function(){u?(0,b.dispatch)("core/block-editor").replaceInnerBlocks(o,[],!1):(0,b.dispatch)("core/block-editor").updateBlockAttributes(o,{design:""})}}))),!p&&(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:{taxonomy:{type:"ct-select",label:(0,t.__)("Taxonomy","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:d,purpose:"default"},limit:{type:"ct-number",label:(0,t.__)("Limit","blocksy-companion"),value:"",min:1,max:200},has_slideshow:{type:"ct-switch",label:(0,t.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,t.__)("Navigation Arrows","blocksy-companion"),value:""},has_slideshow_pills:{type:"ct-switch",label:(0,t.__)("Navigation Pills","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,t.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,t.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}},has_pagination_condition:{type:"ct-condition",condition:{has_slideshow:"no"},options:{has_pagination:{type:"ct-switch",label:(0,t.__)("Pagination","blocksy-companion"),value:""}}}},value:a,hasRevertButton:!1}))),(0,e.createElement)(Ae,{attributes:a,setAttributes:i,context:s})),(0,e.createElement)(r.InspectorControls,{group:"advanced"},(0,e.createElement)(l.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,t.__)("Block ID","blocksy-companion"),value:m,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,t.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))};var Pe=function(t){const o=r.useBlockProps.save(),n=r.useInnerBlocksProps.save(o);return(0,e.createElement)("div",n)},He=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"taxonomy":{"type":"string","default":"category"},"level":{"type":"string","default":"all"},"limit":{"type":"number","default":5},"hide_empty":{"type":"string","default":"yes"},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"none"},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_pills":{"type":"string","default":"no"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3},"has_pagination":{"type":"string","default":"no"}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","taxonomy":"taxonomy","level":"level","limit":"limit","hide_empty":"hide_empty","order":"order","orderby":"orderby","offset":"offset","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_pills":"has_slideshow_pills","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed","has_pagination":"has_pagination"}}');(0,n.registerBlockType)("blocksy/tax-query",{...He,title:(0,t.__)("Advanced Taxonomies","blocksy-companion"),description:(0,t.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(t){return(0,e.createElement)(Be,t)},save:function(){return(0,e.createElement)(Pe,null)},deprecated:[{isEligible:function({taxonomy:e}){return"product_brands"===e},migrate:function(){return{taxonomy:"product_brand"}}}]});var Ne=(0,G.createElement)(W.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,G.createElement)(W.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"}));var De=(0,G.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,G.createElement)(W.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"}));var Re=function({label:t,onChange:o,value:n}){return(0,e.createElement)(l.BaseControl,{label:t},(0,e.createElement)(l.Flex,{gap:4},(0,e.createElement)(l.FlexItem,{isBlock:!0},(0,e.createElement)(l.__experimentalNumberControl,{size:"__unstable-large",onChange:function(e){return o(+e)},value:n,min:1,label:t,hideLabelFromVision:!0})),(0,e.createElement)(l.FlexItem,{isBlock:!0},(0,e.createElement)(l.RangeControl,{value:parseInt(n,10),onChange:function(e){return o(+e)},min:1,max:6,withInputField:!1,label:t,hideLabelFromVision:!0}))))};const ze=[];function Oe({isSlideshow:t,elementDescriptor:o}){const n=(0,r.useInnerBlocksProps)({className:"wp-block-post is-layout-flow"},{template:ze,__unstableDisableLayoutClassNames:!0});if(t){const{className:t,...r}=o?.attr||{};return(0,e.createElement)("div",h({className:F()("flexy-item",t)},r),(0,e.createElement)("article",n))}return(0,e.createElement)("article",n)}const Me=(0,e.memo)(function({blocks:t,blockContextId:o,isHidden:n,isSlideshow:l,elementDescriptor:a,setActiveBlockContextId:i}){const s=(0,r.__experimentalUseBlockPreview)({blocks:t,props:{className:"wp-block-post is-layout-flow"}}),c=function(){i(o)};if(n)return null;if(l){const{className:t,...o}=a?.attr||{};return(0,e.createElement)("div",h({className:F()("flexy-item",t)},o),(0,e.createElement)("article",h({tabIndex:0},s,{role:"button",onClick:c,onKeyPress:c})))}return(0,e.createElement)("article",h({},s,{tabIndex:0,role:"button",onClick:c,onKeyPress:c}))}),Fe=function({has_slideshow_arrows:t,sliderDescriptor:o}){return t?(0,e.createElement)(React.Fragment,null,(0,e.createElement)("span",h({class:"flexy-arrow-prev"},o.arrowsDescritor.left),(0,e.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,e.createElement)("path",{d:"M15.3 4.3h-13l2.8-3c.3-.3.3-.7 0-1-.3-.3-.6-.3-.9 0l-4 4.2-.2.2v.6c0 .1.1.2.2.2l4 4.2c.3.4.6.4.9 0 .3-.3.3-.7 0-1l-2.8-3h13c.2 0 .4-.1.5-.2s.2-.3.2-.5-.1-.4-.2-.5c-.1-.1-.3-.2-.5-.2z"}))),(0,e.createElement)("span",h({class:"flexy-arrow-next"},o.arrowsDescritor.right),(0,e.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,e.createElement)("path",{d:"M.2 4.5c-.1.1-.2.3-.2.5s.1.4.2.5c.1.1.3.2.5.2h13l-2.8 3c-.3.3-.3.7 0 1 .3.3.6.3.9 0l4-4.2.2-.2V5v-.3c0-.1-.1-.2-.2-.2l-4-4.2c-.3-.4-.6-.4-.9 0-.3.3-.3.7 0 1l2.8 3H.7c-.2 0-.4.1-.5.2z"})))):null},Ve=function({has_slideshow_pills:t,sliderDescriptor:o,pillsCount:n}){return t?(0,e.createElement)("div",{class:"flexy-pills","data-type":"circle"},(0,e.createElement)("ol",h({"data-flexy":n<=5?"no:paused":"no"},o.pillsContainerAttr),Array.from({length:n},function(t,o){return(0,e.createElement)("li",{className:0===o?"active":"",key:o})}))):null};var Le=function({clientId:o,className:n,attributes:a,attributes:{layout:i,verticalAlignment:s},setAttributes:c,context:u,__unstableLayoutClassNames:p}){const{postId:d,has_slideshow:m,has_slideshow_arrows:f,has_slideshow_pills:_,uniqueId:y}=u,[g,v]=(0,e.useState)(),{type:k,columnCount:C=3}=i||{},x="grid"===k,w=null!==C,E="yes"===m,S=O(function({attributes:e,context:t}){const{style:o,layout:n,verticalAlignment:l}=e,{has_slideshow:a,uniqueId:i}=t,{type:s,columnCount:c=3}=n||{},u="grid"===s,p=null!==c,d="yes"===a;let m="";o&&o.spacing&&o.spacing.blockGap&&(m=(0,r.getSpacingPresetCssVar)(o.spacing.blockGap)),m||(m="CT_CSS_SKIP_RULE");let f=[],h={desktop:1,tablet:1,mobile:1};if(u&&l&&f.push({variables:{selector:`[data-id='${i}']`,variable:"align-items"},value:"top"===l?"flex-start":"bottom"===l?"flex-end":"center"}),u&&l&&f.push({variables:{selector:`[data-id='${i}']`,variable:"align-items"},value:"top"===l?"flex-start":"bottom"===l?"flex-end":"center"}),u&&p){h={desktop:c,tablet:e.tabletColumns,mobile:e.mobileColumns},f.push({variables:{selector:`[data-id='${i}']`,variable:"grid-columns-gap",unit:""},value:m});let t={desktop:c,tablet:e.tabletColumns,mobile:e.mobileColumns};d&&(t={desktop:`${(100/c).toFixed(2)}%`,tablet:`${(100/e.tabletColumns).toFixed(2)}%`,mobile:`${(100/e.mobileColumns).toFixed(2)}%`}),f.push({variables:{selector:`[data-id='${i}']`,variable:"grid-columns-width",unit:"",responsive:!0},value:t})}else d||f.push({variables:{selector:`[data-id='${i}'] :where(.wp-block-post)`,variableType:"property",variable:"margin-block-end",unit:"",responsive:!0},value:m});if(d){const e={desktop:"",tablet:"",mobile:""};Object.keys(e).forEach(function(t){e[t]=[`[data-id='${i}']`,'[data-flexy="no"]',`.flexy-item:nth-child(n + ${parseFloat(h[t])+1})`].join(" ")}),f.push({variables:{selector:e,variable:"height",responsive:!0},value:"1px"})}return f}({attributes:a,context:u})),I=(0,r.useBlockProps)({className:F()(p,{"ct-query-template-grid":x&&!E,"ct-query-template-default":!x&&!E,"is-layout-flow":!x&&!E,"ct-query-template":E,"is-layout-slider":E}),"data-id":y}),{blockData:T}=D({attributes:u,previewedPostId:d}),A=z({isSlideshow:E,hasSlideshowPills:"yes"===_,context:u,attributes:a,toWatch:T?T.all_posts:{}}),{blocks:B}=(0,b.useSelect)(function(e){const{getBlocks:t}=e(r.store);return{blocks:t(o)}},[o]);if(!T)return(0,e.createElement)("p",I,(0,e.createElement)(l.Spinner,null));let P=T.all_posts.map(function(e){return{postId:e.ID,postType:e.post_type}});const H=[{icon:Ne,title:(0,t.__)("List view"),onClick:function(){c({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!x},{icon:De,title:(0,t.__)("Grid view"),onClick:function(){c({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:x}],N=function({isSlideshow:o,elementDescriptorForIndex:n}){return(0,e.createElement)(React.Fragment,null,0===P.length&&(0,e.createElement)("p",null,(0,t.__)("No results found.","blocksy-companion")),P.length>0&&P.map(function(t,l){return(0,e.createElement)(r.BlockContextProvider,{key:t.postId,value:t},t.postId===(g||P[0]?.postId)?(0,e.createElement)(Oe,{isSlideshow:o,elementDescriptor:n?n(l):null}):null,(0,e.createElement)(Me,{blocks:B,blockContextId:t.postId,setActiveBlockContextId:v,isSlideshow:o,elementDescriptor:n?n(l):null,isHidden:t.postId===(g||P[0]?.postId)}))}))};return(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.BlockControls,null,(0,e.createElement)(l.ToolbarGroup,{controls:H}),x?(0,e.createElement)(r.BlockVerticalAlignmentToolbar,{onChange:function(e){c({verticalAlignment:e})},value:s}):null),(0,e.createElement)(r.InspectorControls,null,x&&w?(0,e.createElement)(l.PanelBody,{title:(0,t.__)("Layout","blocksy-companion"),initialOpen:!0},(0,e.createElement)(Re,{label:(0,t.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return c({layout:{...i,columnCount:e}})},value:C}),(0,e.createElement)(Re,{label:(0,t.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return c({tabletColumns:e})},value:a?.tabletColumns}),(0,e.createElement)(Re,{label:(0,t.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return c({mobileColumns:e})},value:a?.mobileColumns})):null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){c({[e]:t})},options:{has_item_link:{type:"ct-switch",label:(0,t.__)("Link to post","blocksy-companion"),value:""}},value:a,hasRevertButton:!1}))),(0,e.createElement)("div",I,E?(0,e.createElement)("div",h({class:"flexy-container","data-flexy":"no"},A.flexyContainerAttr),(0,e.createElement)("div",{class:"flexy"},(0,e.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,e.createElement)("div",{class:"flexy-items"},N({isSlideshow:E,elementDescriptorForIndex:A.elementDescriptorForIndex}))),(0,e.createElement)(Fe,{has_slideshow_arrows:"yes"===f,sliderDescriptor:A})),(0,e.createElement)(Ve,{has_slideshow_pills:"yes"===_,sliderDescriptor:A,pillsCount:P.length})):N({isSlideshow:E})),T&&"yes"===u.has_pagination&&!E&&(0,e.createElement)(e.RawHTML,null,T.pagination_output),S||null)};var je=function(){return(0,e.createElement)(r.InnerBlocks.Content,null)},$e=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/post-template","parent":["blocksy/query"],"title":"Post Template","category":"theme","description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"},"has_item_link":{"type":"string","default":"no"}},"usesContext":["uniqueId","post_type","limit","order","orderby","orderby_custom","offset","postId","postType","has_slideshow","has_slideshow_arrows","has_slideshow_pills","has_slideshow_autoplay","has_slideshow_autoplay_speed","has_pagination","include_term_ids","exclude_term_ids","sticky_posts"],"providesContext":{"has_item_link":"has_item_link"}}');(0,n.registerBlockType)("blocksy/post-template",{...$e,title:(0,t.__)("Post Template","blocksy-companion"),description:(0,t.__)("Post Template","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(t){return(0,e.createElement)(Le,t)},save:je});const Ue=[];function qe({isSlideshow:t,termId:o,elementDescriptor:n}){const l=(0,r.useInnerBlocksProps)({className:F()("wp-block-term is-layout-flow",[])},{template:Ue,__unstableDisableLayoutClassNames:!0});if(t){const{className:t,...o}=n?.attr||{};return(0,e.createElement)("div",h({className:F()("flexy-item",t)},o),(0,e.createElement)("article",l))}return(0,e.createElement)("div",l)}const Ge=(0,e.memo)(function({blocks:t,blockContextId:o,isHidden:n,isSlideshow:l,elementDescriptor:a,setActiveBlockContextId:i,termId:s}){const c=(0,r.__experimentalUseBlockPreview)({blocks:t,props:{className:F()("wp-block-term is-layout-flow",[])}}),u=function(){i(o)};if(n)return null;if(l){const{className:t,...o}=a?.attr||{};return(0,e.createElement)("div",h({className:F()("flexy-item",t)},o),(0,e.createElement)("div",h({tabIndex:0},c,{role:"button",onClick:u,onKeyPress:u})))}return(0,e.createElement)("div",h({},c,{tabIndex:0,role:"button",onClick:u,onKeyPress:u}))});var We=function({clientId:o,attributes:{layout:n,verticalAlignment:a,style:i},attributes:s,setAttributes:c,context:u,__unstableLayoutClassNames:p}){const{postId:d,has_slideshow:m,has_slideshow_arrows:f,has_slideshow_pills:_,uniqueId:y}=u,[g,v]=(0,e.useState)(),{type:k,columnCount:C=3}=n||{},x="grid"===k,w="yes"===m,E=O(function({attributes:e,context:t}){const{style:o,layout:n}=e,{has_slideshow:l,uniqueId:a}=t,{type:i,columnCount:s=3}=n||{},c="grid"===i,u=null!==s,p="yes"===l;let d="";o&&o.spacing&&o.spacing.blockGap&&(d=(0,r.getSpacingPresetCssVar)(o.spacing.blockGap)),d||(d="CT_CSS_SKIP_RULE");let m=[],f={desktop:1,tablet:1,mobile:1};if(c&&u){f={desktop:s,tablet:e.tabletColumns,mobile:e.mobileColumns},m.push({variables:{selector:`[data-id='${a}']`,variable:"grid-columns-gap",unit:""},value:d});let t={desktop:s,tablet:e.tabletColumns,mobile:e.mobileColumns};p&&(t={desktop:`${(100/s).toFixed(2)}%`,tablet:`${(100/e.tabletColumns).toFixed(2)}%`,mobile:`${(100/e.mobileColumns).toFixed(2)}%`}),m.push({variables:{selector:`[data-id='${a}']`,variable:"grid-columns-width",unit:"",responsive:!0},value:t})}else p||m.push({variables:{selector:`[data-id='${a}'] :where(.wp-block-term)`,variableType:"property",variable:"margin-block-end",unit:""},value:d});if(p){const e={desktop:"",tablet:"",mobile:""};Object.keys(e).forEach(function(t){e[t]=[`[data-id='${a}']`,'[data-flexy="no"]',`.flexy-item:nth-child(n + ${parseFloat(f[t])+1})`].join(" ")}),m.push({variables:{selector:e,variable:"height",responsive:!0},value:"1px"})}return m}({attributes:s,context:u})),S=(0,r.useBlockProps)({className:F()(p,{"ct-query-template-grid":x&&!w,"ct-query-template-default":!x&&!w,"is-layout-flow":!x&&!w,"ct-query-template":w,"is-layout-slider":w}),"data-id":y}),{blockData:I}=xe({attributes:u,previewedPostId:d}),T=z({isSlideshow:w,hasSlideshowPills:"yes"===_,attributes:s,context:u,toWatch:I?I.all_terms:{}}),{blocks:A}=(0,b.useSelect)(function(e){const{getBlocks:t}=e(r.store);return{blocks:t(o)}},[o]);if(!I)return(0,e.createElement)("p",S,(0,e.createElement)(l.Spinner,null));let B=I.all_terms.map(function(e){return{termId:e.term_id,termIcon:e?.icon,termImage:e?.image}});const P=[{icon:Ne,title:(0,t.__)("List view"),onClick:function(){c({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!x},{icon:De,title:(0,t.__)("Grid view"),onClick:function(){c({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:x}],H=function({isSlideshow:o,elementDescriptorForIndex:n}){return(0,e.createElement)(React.Fragment,null,0===B.length&&(0,e.createElement)("p",null,(0,t.__)("No results found.","blocksy-companion")),B.length>0&&B.map(function(t,l){return(0,e.createElement)(r.BlockContextProvider,{key:t.termId,value:t},t.termId===(g||B[0]?.termId)?(0,e.createElement)(qe,{isSlideshow:o,termId:t.termId,elementDescriptor:n?n(l):null}):null,(0,e.createElement)(Ge,{blocks:A,blockContextId:t.termId,setActiveBlockContextId:v,isSlideshow:o,termId:t.termId,elementDescriptor:n?n(l):null,isHidden:t.termId===(g||B[0]?.termId)}))}))};return(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.BlockControls,null,(0,e.createElement)(l.ToolbarGroup,{controls:P}),x?(0,e.createElement)(r.BlockVerticalAlignmentToolbar,{onChange:function(e){c({verticalAlignment:e})},value:a}):null),(0,e.createElement)(r.InspectorControls,null,x?(0,e.createElement)(l.PanelBody,{title:"Layout",initialOpen:!0},(0,e.createElement)(Re,{label:(0,t.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return c({layout:{...n,columnCount:e}})},value:C}),(0,e.createElement)(Re,{label:(0,t.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return c({tabletColumns:e})},value:s?.tabletColumns}),(0,e.createElement)(Re,{label:(0,t.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return c({mobileColumns:e})},value:s?.mobileColumns})):null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){c({[e]:t})},options:{has_item_link:{type:"ct-switch",label:(0,t.__)("Link to archive page","blocksy-companion"),value:""}},value:s,hasRevertButton:!1}))),(0,e.createElement)("div",S,w?(0,e.createElement)("div",h({class:"flexy-container","data-flexy":"no"},T.flexyContainerAttr),(0,e.createElement)("div",{class:"flexy"},(0,e.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,e.createElement)("div",{class:"flexy-items"},H({isSlideshow:w,elementDescriptorForIndex:T.elementDescriptorForIndex}))),(0,e.createElement)(Fe,{has_slideshow_arrows:"yes"===f,sliderDescriptor:T})),(0,e.createElement)(Ve,{has_slideshow_pills:"yes"===_,sliderDescriptor:T,pillsCount:B.length})):H({isSlideshow:w})),I&&"yes"===u.has_pagination&&!w&&(0,e.createElement)(e.RawHTML,null,I.pagination_output),E||null)};var Ze=function(){return(0,e.createElement)(r.InnerBlocks.Content,null)},Xe=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-template","parent":["blocksy/tax-query"],"title":"Tax Template","category":"theme","description":"Contains the block elements used to render a taxonomy, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"},"has_item_link":{"type":"string","default":"no"}},"usesContext":["uniqueId","taxonomy","level","limit","hide_empty","order","orderby","offset","include_term_ids","exclude_term_ids","has_slideshow","has_slideshow_arrows","has_slideshow_pills","has_slideshow_autoplay","has_slideshow_autoplay_speed","has_pagination"],"providesContext":{"has_item_link":"has_item_link"}}');(0,n.registerBlockType)("blocksy/tax-template",{...Xe,title:(0,t.__)("Taxonomy Template","blocksy-companion"),description:(0,t.__)("Taxonomy Template","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(t){return(0,e.createElement)(We,t)},save:Ze});const Ke={};var Je=function(t,o,n){const[r,l]=(0,e.useState)([]),[a,i]=(0,e.useState)([]),s=(0,e.useCallback)(async function(){const e=new FormData,a=JSON.stringify(o);e.append("action","blocksy_get_dynamic_block_view"),e.append("block",t),e.append("attributes",a),Ke[a]?(l(n(Ke[a])),i(!1)):(r||i(!0),fetch((window.ct_localizations||ct_customizer_localizations)?.ajax_url||wp.ajax.settings.url,{method:"POST",body:e}).then(function(e){return e.json()}).then(function({data:{content:e}}){l(n(e)),i(!1),Ke[a]=e}))},[o,r]);return(0,e.useEffect)(function(){s()},[o]),{isLoading:a,preview:r}};const Ye=function(e){return Object.keys(e).reduce(function(t,o){return t[o]={type:"string",default:e[o]},t},{})},Qe={textColor:"",customTextColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},et=Ye(Qe),tt={about_alignment:"center",avatar_shape:"round",about_avatar_size:"small",post_widget_thumb_size:"default",about_social_type:"rounded",about_social_icons_fill:"outline",about_social_icons_color:"official",about_text:"Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua tincidunt tortor aliquam.",about_name:"John Doe",about_items_spacing:"",about_social_icons_size:"",...Qe};var ot=function({attributes:t,setAttributes:o}){const n=(0,e.useRef)({image:"",socials:""}),{about_name:a,about_text:i,about_source:s,about_alignment:c,avatar_shape:u,about_avatar_size:p,about_social_type:d,about_social_icons_fill:m,about_items_spacing:f,about_social_icons_size:h,about_social_icons_color:_}=t,b=(0,e.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector(".ct-about-me-block");if(o){o.querySelector("div").dataset.alignment=c;const e=o.querySelector(".ct-media-container");e&&(e.dataset.shape=u,e.dataset.size=p);const t=o.querySelector(".ct-social-box");t&&(t.dataset.iconsType="simple"===d?d:`${d}:${m}`,t.dataset.color=_),"custom"===s&&(n.current={image:o.querySelector(".ct-media-container")?.outerHTML||"",socials:t?.outerHTML||""})}return o.innerHTML},[c,u,s,p,d,m,h,f,_]),{isLoading:y,preview:g}=Je("about-me",{...t,...tt},b);return y?(0,e.createElement)(l.Spinner,null):"from_wp"===s?(0,e.createElement)(e.RawHTML,null,g):(0,e.createElement)("div",{"data-alignment":c},(0,e.createElement)(e.RawHTML,null,n.current.image),(0,e.createElement)("div",{className:"ct-about-me-name"},(0,e.createElement)(r.RichText,{tagName:"span",value:a,placeholder:"User Name",onChange:function(e){return o({about_name:e})}})),(0,e.createElement)(r.RichText,{tagName:"div",className:"ct-about-me-text",value:i,placeholder:"User Description",onChange:function(e){return o({about_text:e})}}),(0,e.createElement)(e.RawHTML,null,n.current.socials))};var nt=function({attributes:t,setAttributes:o,options:n}){return(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o({[e]:t})},options:n,value:t,hasRevertButton:!1})))};var rt=(0,r.withColors)({textColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:o,setAttributes:n,clientId:l,className:a,textColor:i,setTextColor:s,textHoverColor:c,setTextHoverColor:u,iconsColor:p,setIconsColor:d,iconsHoverColor:m,setIconsHoverColor:f,backgroundColor:h,setBackgroundColor:b,backgroundHoverColor:y,setBackgroundHoverColor:g,borderColor:v,setBorderColor:k,borderHoverColor:C,setBorderHoverColor:x}){const{about_alignment:w="center",about_items_spacing:E="",about_social_icons_size:S="",about_social_type:I="simple",about_social_icons_fill:T="outline",about_social_icons_color:A="default"}=o,B=(0,e.useRef)(),P=(0,r.useBlockProps)({ref:B,className:{"ct-about-me-block":!0,className:a},"data-alignment":w,style:{"--theme-block-text-color":i?.color,"--theme-link-hover-color":i?.color,"--theme-icon-color":p?.color,"--theme-icon-hover-color":m?.color,"--background-color":"solid"===T?h?.color:v?.color,"--background-hover-color":"solid"===T?y?.color:C?.color,...S?{"--theme-icon-size":`${S}px`}:{},...E?{"--items-spacing":`${E}px`}:{}}});return(0,e.createElement)("div",P,(0,e.createElement)(ot,{attributes:o,setAttributes:n}),(0,e.createElement)(nt,{attributes:o,setAttributes:n,options:lt}),(0,e.createElement)(r.InspectorControls,{group:"styles"},(0,e.createElement)(_,{label:(0,t.__)("Text Color","blocksy-companion"),resetAll:function(){s(Qe.textColor),u(Qe.textHoverColor)},panelId:l,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||Qe.textColor)}},{colorValue:c.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||Qe.textHoverColor)}}]}),"default"===A?(0,e.createElement)(_,{label:(0,t.__)("Icons Color","blocksy-companion"),resetAll:function(){d(Qe.iconsColor),f(Qe.iconsHoverColor)},panelId:l,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||Qe.iconsColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||Qe.iconsHoverColor)}}]}):null,"simple"!==I&&"default"===A&&("solid"===T?(0,e.createElement)(_,{label:(0,t.__)("Icons Background Color","blocksy-companion"),resetAll:function(){b(Qe.backgroundColor),g(Qe.backgroundHoverColor)},panelId:l,settings:[{colorValue:h.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return b(e||Qe.backgroundColor)}},{colorValue:y.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||Qe.backgroundHoverColor)}}]}):(0,e.createElement)(_,{label:(0,t.__)("Icons Border Color","blocksy-companion"),resetAll:function(){k(Qe.borderColor),x(Qe.borderHoverColor)},panelId:l,settings:[{colorValue:v.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return k(e||Qe.borderColor)}},{colorValue:C.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return x(e||Qe.borderHoverColor)}}]}))))});const lt=(0,R.getOptionsForBlock)("about_me"),at=(0,R.getAttributesFromOptions)(lt);(0,n.registerBlockType)("blocksy/about-me",{apiVersion:3,title:(0,t.__)("About Me Controls","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:{...at,...et},edit:function(t){return(0,e.createElement)(rt,t)},save:function(){return(0,e.createElement)("div",null,"Blocksy: About Me")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-about-me",title:(0,t.__)("About Me","blocksy-companion"),description:(0,t.__)("Showcase your personal information across your website.","blocksy-companion"),attributes:{heading:(0,t.__)("About Me","blocksy-companion"),block:"blocksy/about-me"},isDefault:!0,isActive:function(e){return"blocksy/about-me"===e.block},icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))}});const it={textColor:"",customTextColor:"",textInitialColor:"",customTextInitialColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},st=Ye(it),ct={contacts_icons_size:20,contacts_items_spacing:"",contacts_icon_shape:"rounded",contacts_icon_fill_type:"outline",contact_link_target:"no",contact_text:"",contacts_items_direction:"column",link_icons:"no",...it};var ut=function({attributes:t}){const{contacts_icons_size:o=20,contacts_items_spacing:n="",contacts_icon_shape:r="rounded",contacts_icon_fill_type:a="outline",contact_link_target:i="no",contacts_items_direction:s="column"}=t,c=(0,e.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector(".ct-contact-info-block ul"),n=t.querySelectorAll("a");return n&&n.forEach(function(e){e.target="yes"===i?"_blank":"_self"}),o.innerHTML},[o,r,a,i,s,n]),{isLoading:u,preview:p}=Je("contact-info",{...t,...ct},c);return u?(0,e.createElement)(l.Spinner,null):(0,e.createElement)("ul",{"data-icons-type":"simple"===r?r:`${r}:${a}`,dangerouslySetInnerHTML:{__html:p}})};var pt=(0,r.withColors)({textColor:"color"},{textInitialColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:o,setAttributes:n,clientId:l,className:a,textColor:i,setTextColor:s,textInitialColor:c,setTextInitialColor:u,textHoverColor:p,setTextHoverColor:d,iconsColor:m,setIconsColor:f,iconsHoverColor:h,setIconsHoverColor:b,backgroundColor:y,setBackgroundColor:g,backgroundHoverColor:v,setBackgroundHoverColor:k,borderColor:C,setBorderColor:x,borderHoverColor:w,setBorderHoverColor:E}){const{contacts_items_direction:S="column",contacts_icons_size:I=20,contacts_items_spacing:T="",contacts_icon_shape:A="rounded",contacts_icon_fill_type:B="outline"}=o,P=(0,e.useRef)(),H=(0,r.useBlockProps)({ref:P,className:{"ct-contact-info-block":!0,className:a},style:{"--theme-block-text-color":i?.color,"--theme-link-initial-color":c?.color,"--theme-link-hover-color":p?.color,"--theme-icon-color":m?.color,"--theme-icon-hover-color":h?.color,"--background-color":"solid"===B?y?.color:C?.color,"--background-hover-color":"solid"===B?v?.color:w?.color,...I?{"--theme-icon-size":`${I}px`}:{},...T?{"--items-spacing":`${T}px`}:{},..."column"===S?{"--items-direction":S}:{}}});return(0,e.createElement)("div",H,(0,e.createElement)(ut,{attributes:o,setAttributes:n}),(0,e.createElement)(nt,{attributes:o,setAttributes:n,options:dt}),(0,e.createElement)(r.InspectorControls,{group:"styles"},(0,e.createElement)(_,{label:(0,t.__)("Text Color","blocksy-companion"),resetAll:function(){s(it.textColor),u(it.textInitialColor),d(it.textHoverColor)},panelId:l,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,t.__)("Text","blocksy-companion"),onColorChange:function(e){return s(e||it.textColor)}},{colorValue:c.color,enableAlpha:!0,label:(0,t.__)("Link Initial","blocksy-companion"),onColorChange:function(e){return u(e||it.textInitialColor)}},{colorValue:p.color,enableAlpha:!0,label:(0,t.__)("Link Hover","blocksy-companion"),onColorChange:function(e){return d(e||it.textHoverColor)}}]}),(0,e.createElement)(_,{label:(0,t.__)("Icons Color","blocksy-companion"),resetAll:function(){f(it.iconsColor),b(it.iconsHoverColor)},panelId:l,settings:[{colorValue:m.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return f(e||it.iconsColor)}},{colorValue:h.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return b(e||it.iconsHoverColor)}}]}),"simple"!==A&&("solid"===B?(0,e.createElement)(_,{label:(0,t.__)("Icons Background Color","blocksy-companion"),resetAll:function(){g(it.backgroundColor),k(it.backgroundHoverColor)},panelId:l,settings:[{colorValue:y.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return g(e||it.backgroundColor)}},{colorValue:v.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return k(e||it.backgroundHoverColor)}}]}):(0,e.createElement)(_,{label:(0,t.__)("Icons Border Color","blocksy-companion"),resetAll:function(){x(it.borderColor),E(it.borderHoverColor)},panelId:l,settings:[{colorValue:C.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return x(e||it.borderColor)}},{colorValue:w.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return E(e||it.borderHoverColor)}}]}))))});const dt=(0,R.getOptionsForBlock)("contact_info"),mt=(0,R.getAttributesFromOptions)(dt);(0,n.registerBlockType)("blocksy/contact-info",{apiVersion:3,title:(0,t.__)("Contact Info Controls","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))},supports:{html:!1,inserter:!1,lock:!1,typography:{fontSize:!0}},parent:["blocksy/widgets-wrapper"],attributes:{...mt,...st},edit:function(t){return(0,e.createElement)(pt,t)},save:function(){return(0,e.createElement)("div",null,"Blocksy: Contact Info")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-contact-info",title:(0,t.__)("Contact Info","blocksy-companion"),description:(0,t.__)("Display essential contact details to your visitors.","blocksy-companion"),attributes:{heading:(0,t.__)("Contact Info","blocksy-companion"),block:"blocksy/contact-info",hasDescription:!0,description:mt?.contact_text?.default||""},isActive:function(e){return"blocksy/contact-info"===e.block},icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))}});const ft={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},ht=Ye(ft),_t={link_nofollow:"no",link_target:"no",social_icons_color:"official",social_icons_fill:"outline",social_icons_size:"",items_spacing:"",social_type:"simple",...ft},bt={left:"flex-start",center:"center",right:"flex-end","space-between":"space-between"};var yt=function({attributes:t}){const{justifyContent:o,social_icons_color:n,social_icons_size:r,social_type:a,social_icons_fill:i,items_spacing:s}=t,c=(0,e.useCallback)(function(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-social-box").innerHTML},[n,r,a,i,s]),{isLoading:u,preview:p}=Je("socials",{...t,..._t},c);return u?(0,e.createElement)(l.Spinner,null):(0,e.createElement)(e.RawHTML,{className:"ct-social-box",style:{..."left"!==o?{justifyContent:bt[o]}:{}},"data-icons-type":"simple"===a?a:`${a}:${i}`,"data-color":n},p)};const gt=(0,R.getOptionsForBlock)("socials");var vt=(0,r.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:o,setAttributes:n,clientId:l,className:a,initialColor:i,setInitialColor:s,hoverColor:c,setHoverColor:u,backgroundColor:p,setBackgroundColor:d,backgroundHoverColor:m,setBackgroundHoverColor:f,borderColor:h,setBorderColor:b,borderHoverColor:y,setBorderHoverColor:g}){const{items_spacing:v="",social_icons_size:k="",social_type:C="simple",social_icons_fill:x="outline",social_icons_color:w="default"}=o,E=(0,e.useRef)(),S=(0,r.useBlockProps)({ref:E,className:{"ct-socials-block":!0,className:a},style:{"--theme-icon-color":i?.color,"--theme-icon-hover-color":c?.color,"--background-color":"solid"===x?p?.color:h?.color,"--background-hover-color":"solid"===x?m?.color:y?.color,...k?{"--theme-icon-size":`${k}px`}:{},...v?{"--items-spacing":`${v}px`}:{}}});return(0,e.createElement)("div",S,(0,e.createElement)(r.BlockControls,{group:"block"},(0,e.createElement)(r.JustifyContentControl,{label:(0,t.__)("Alignment","blocksy-companion"),value:o.justifyContent,onChange:function(e){return n({justifyContent:e})}})),(0,e.createElement)(yt,{attributes:o,setAttributes:n}),(0,e.createElement)(nt,{attributes:o,setAttributes:n,options:gt}),"default"===w?(0,e.createElement)(r.InspectorControls,{group:"styles"},(0,e.createElement)(_,{label:(0,t.__)("Icon Color","blocksy-companion"),resetAll:function(){s(ft.initialColor),u(ft.hoverColor)},panelId:l,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||ft.initialColor)}},{colorValue:c.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||ft.hoverColor)}}]}),"simple"!==C&&("solid"===x?(0,e.createElement)(_,{label:(0,t.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){d(ft.backgroundColor),f(ft.backgroundHoverColor)},panelId:l,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||ft.backgroundColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||ft.backgroundHoverColor)}}]}):(0,e.createElement)(_,{label:(0,t.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){b(ft.borderColor),g(ft.borderHoverColor)},panelId:l,settings:[{colorValue:h.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return b(e||ft.borderColor)}},{colorValue:y.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||ft.borderHoverColor)}}]}))):null)});const kt=(0,R.getOptionsForBlock)("socials"),Ct=(0,R.getAttributesFromOptions)(kt);(0,n.registerBlockType)("blocksy/socials",{apiVersion:3,title:(0,t.__)("Socials Controls","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:{justifyContent:{type:"string",default:"left"},...Ct,...ht},edit:function(t){return(0,e.createElement)(vt,t)},save:function(){return(0,e.createElement)("div",null,"Blocksy: Socials")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-socials",title:(0,t.__)("Socials","blocksy-companion"),description:(0,t.__)("Display your social media profiles and boost the site engagement.","blocksy-companion"),attributes:{heading:(0,t.__)("Socials","blocksy-companion"),block:"blocksy/socials"},isActive:function(e){return"blocksy/socials"===e.block},icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))}});const xt={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},wt=Ye(xt),Et={link_nofollow:"no",share_icons_size:"",items_spacing:"",...xt};var St=function({attributes:t}){const{share_icons_color:o,share_icons_size:n,share_type:r,share_icons_fill:a,items_spacing:i}=t,s=(0,e.useCallback)(function(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-share-box").innerHTML},[o,n,r,a,i]),{isLoading:c,preview:u}=Je("share-box",{...t,...Et},s);return c?(0,e.createElement)(l.Spinner,null):(0,e.createElement)(e.RawHTML,{className:"ct-share-box","data-type":"type-3"},u)};const It=(0,R.getOptionsForBlock)("share_box");var Tt=(0,r.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:o,setAttributes:n,clientId:l,className:a,initialColor:i,setInitialColor:s,hoverColor:c,setHoverColor:u,backgroundColor:p,setBackgroundColor:d,backgroundHoverColor:m,setBackgroundHoverColor:f,borderColor:h,setBorderColor:b,borderHoverColor:y,setBorderHoverColor:g}){const{items_spacing:v="",share_icons_size:k="",share_type:C="simple",share_icons_fill:x="outline",share_icons_color:w="default"}=o,E=(0,e.useRef)(),S=(0,r.useBlockProps)({ref:E,className:{"ct-shares-block":!0,className:a},style:{"--theme-icon-color":i?.color,"--theme-icon-hover-color":c?.color,"--background-color":"solid"===x?p?.color:h?.color,"--background-hover-color":"solid"===x?m?.color:y?.color,...k?{"--theme-icon-size":`${k}px`}:{},...v?{"--items-spacing":`${v}px`}:{}}});return(0,e.createElement)("div",S,(0,e.createElement)(St,{attributes:o,setAttributes:n}),(0,e.createElement)(nt,{attributes:o,setAttributes:n,options:It}),"default"===w?(0,e.createElement)(r.InspectorControls,{group:"styles"},(0,e.createElement)(_,{label:(0,t.__)("Icon Color","blocksy-companion"),resetAll:function(){s(xt.initialColor),u(xt.hoverColor)},panelId:l,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||xt.initialColor)}},{colorValue:c.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||xt.hoverColor)}}]}),"simple"!==C&&("solid"===x?(0,e.createElement)(_,{label:(0,t.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){d(xt.backgroundColor),f(xt.backgroundHoverColor)},panelId:l,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||xt.backgroundColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||xt.backgroundHoverColor)}}]}):(0,e.createElement)(_,{label:(0,t.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){b(xt.borderColor),g(xt.borderHoverColor)},panelId:l,settings:[{colorValue:h.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return b(e||xt.borderColor)}},{colorValue:y.color,enableAlpha:!0,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||xt.borderHoverColor)}}]}))):null)});const At=["facebook","twitter","pinterest","linkedin"],Bt=["facebook","twitter","pinterest","linkedin","reddit","hacker_news","vk","ok","telegram","viber","whatsapp","flipboard","line","email","clipboard"];var Pt=[{apiVersion:3,isEligible:function(e){return!e.share_networks},migrate:function(e){const t=Bt.reduce(function(t,o){return e[`share_${o}`]?("yes"===e[`share_${o}`]&&t.push({id:o,enabled:!0}),t):(At.includes(o)&&t.push({id:o,enabled:!0}),t)},[]);return{...Object.keys(e).reduce(function(t,o){return Bt.includes(o.replace("share_",""))||(t[o]=e[o]),t},{}),share_networks:t}},attributes:{title:{type:"string",default:"Share Icons"},share_facebook:{type:"string",default:"yes"},share_twitter:{type:"string",default:"yes"},share_pinterest:{type:"string",default:"yes"},share_linkedin:{type:"string",default:"yes"},share_reddit:{type:"string",default:"no"},share_hacker_news:{type:"string",default:"no"},share_vk:{type:"string",default:"no"},share_ok:{type:"string",default:"no"},share_telegram:{type:"string",default:"no"},share_viber:{type:"string",default:"no"},share_whatsapp:{type:"string",default:"no"},share_flipboard:{type:"string",default:"no"},share_line:{type:"string",default:"no"},share_email:{type:"string",default:"no"},share_clipboard:{type:"string",default:"no"},share_item_tooltip:{type:"string",default:"no"},link_nofollow:{type:"string",default:"no"},share_icons_size:{type:"string",default:""},items_spacing:{type:"string",default:""},share_icons_color:{type:"string",default:"default"},share_type:{type:"string",default:"simple"},share_icons_fill:{type:"string",default:"outline"},initialColor:{type:"string",default:""},customInitialColor:{type:"string",default:""},hoverColor:{type:"string",default:""},customHoverColor:{type:"string",default:""},borderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBorderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},borderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBorderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},backgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBackgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},backgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBackgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"}},save:function(t){return(0,e.createElement)("div",null,"Blocksy: Share Box")}}];const Ht=(0,R.getOptionsForBlock)("share_box"),Nt=(0,R.getAttributesFromOptions)(Ht);(0,n.registerBlockType)("blocksy/share-box",{apiVersion:3,title:(0,t.__)("Share Box Controls","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:{...Nt,...wt},edit:function(t){return(0,e.createElement)(Tt,t)},save:function(){return(0,e.createElement)("div",null,"Blocksy: Share Box")},deprecated:Pt}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-share-box",title:(0,t.__)("Share Box","blocksy-companion"),description:(0,t.__)("Share content on social media, boosting visibility & engagement.","blocksy-companion"),attributes:{heading:(0,t.__)("Share Box","blocksy-companion"),block:"blocksy/share-box"},isActive:function(e){return"blocksy/share-box"===e.block},icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))}});var Dt=function({attributes:{has_field_link:t,has_field_link_wrap_content:o},postId:n,postType:r}){const[l="",i,s]=(0,a.useEntityProp)("postType",r,"title",n);return n?l?"yes"===t&&"no"===o?(0,e.createElement)("a",{href:"#",rel:"noopener noreferrer"},m(l)):m(l):null:"Title"};const Rt=function(e){if(!e)return"";const t=(new window.DOMParser).parseFromString(e,"text/html");return t.body.textContent||t.body.innerText||""};var zt=function({attributes:{excerpt_length:t},postId:o,postType:n,fallback:r}){const[l,i,{rendered:s,protected:c}={}]=(0,a.useEntityProp)("postType",n,"excerpt",o),[u,p,{rendered:d}={}]=(0,a.useEntityProp)("postType",n,"content",o),m=(l||Rt(s)||Rt(d)).trim();let f=l?m:m.split(" ",t).join(" ");const h=f!==m?"...":"";return o?f?(0,e.createElement)(e.RawHTML,null,f,h):r:"Excerpt"},Ot=window.wp.date;var Mt=function({postId:t,postType:o,attributes:{date_type:n,default_format:r,date_format:l,custom_date_format:i,has_field_link:s,has_field_link_wrap_content:c}}){const[u]=(0,a.useEntityProp)("postType",o,"published"===n?"date":"modified",t),p="yes"===r?(0,Ot.getSettings)().formats.date:"custom"!==l?l:i;let d=(0,e.createElement)("span",null,(0,Ot.format)(p,u));return t?("yes"===s&&"no"===c&&(d=(0,e.createElement)("a",{href:"#"},d)),d):"Date"},Ft=window.wp.apiFetch,Vt=o.n(Ft),Lt=window.wp.url;const jt={};var $t=function({postId:t}){const[o,n]=(0,e.useState)(null);return(0,e.useEffect)(function(){jt[t]&&n(jt[t]),jt[t]||Vt()({path:(0,Lt.addQueryArgs)("/wp/v2/comments",{post:t,_fields:"id"}),method:"HEAD",parse:!1}).then(function(e){const o={total:parseInt(e.headers.get("X-WP-Total"))};n(o),jt[t]=o})},[t]),{commentsData:o}};var Ut=function({postId:t,postType:o,attributes:{has_field_link:n,has_field_link_wrap_content:r,zero_text:l,single_text:a,multiple_text:i}}){const{commentsData:s}=$t({postId:t}),c=s&&s.total?s.total:0,u=0===c?l:1===c?a:i;return"yes"===n&&"no"===r?(0,e.createElement)("a",{href:"#",rel:"noopener noreferrer"},u.replace("%",c)):u.replace("%",c)};const qt=function(e,t){switch(t){case"email":return e?.email||"";case"nicename":return e?.nickname||"";case"display_name":return e?.name||"";case"first_name":return e?.first_name||"";case"last_name":return e?.last_name||"";case"description":return e?.description||"";case"user_url":return e?.url||""}};var Gt=function({postId:t,postType:o,attributes:{has_field_link:n,author_field:r},fallback:l,fieldsDescriptor:i}){const{authorId:s,authorDetails:c}=(0,b.useSelect)(function(e){const{getEditedEntityRecord:n,getUser:r,getUsers:l}=e(a.store),i=n("postType",o,t)?.author;return{authorId:i,authorDetails:i?r(i):null}},[o,t]);return t?c?"yes"===n?(0,e.createElement)("a",{href:"#",rel:"noopener noreferrer"},qt(c,r)||l):qt(c,r)||l:null:`Author: ${r}`};var Wt=function({postId:t,postType:o,fallback:n,attributes:r,attributes:{has_field_link:l,taxonomy:a,separator:i},fieldsDescriptor:s}){const c=oe(o),{terms:u}=(0,b.useSelect)(function(e){return{terms:e("core").getEntityRecords("taxonomy",a||(c&&c.length>0?c[0].slug:""),{per_page:-1,post:t})||[]}}),p=c.find(function(e){return e.slug===a})?.name||"Category";if(!t)return`${p}`;if(0===u.length)return n||`${p}`;let d="span",m={};return"yes"===l&&(d="a",m.href="#",m.rel="noopener noreferrer"),u.map(function(t,o){return(0,e.createElement)(React.Fragment,null,(0,e.createElement)(d,h({},m,{className:F()({[`ct-term-${t.id}`]:"yes"===r.termAccentColor},r.termClass),dangerouslySetInnerHTML:{__html:t.name}})),o!==u.length-1?i.replace(/ /g," "):"")})};const Zt={x:.5,y:.5};function Xt({x:e,y:t}=Zt){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}var Kt=function({attributes:t,url:o}){const{hasParallax:n,focalPoint:r,alt:l}=t,a=o?`url(${o})`:void 0,i=Xt(r);return o?n?(0,e.createElement)("div",{role:l?"img":void 0,"aria-label":l||void 0,className:F()("wp-block-cover__image-background",{"has-parallax":n}),style:{backgroundImage:a,backgroundPosition:i}}):(0,e.createElement)("img",{alt:l,className:F()("wp-block-cover__image-background",{"has-parallax":n}),src:o,style:{objectPosition:r?Xt(r):void 0}}):(0,e.createElement)("div",{className:F()("ct-dynamic-data-placeholder",{})},(0,e.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))};var Jt=function(){return Jt=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0?e.join(""):void 0},[a,i,o])}}(s,o,t,n);if("text"===t){let{backgroundColor:e,textColor:t}=o;const n=io("background-color",e),r=io("color",t),l=e||s?.color?.background;return{className:F()(r,c.className,{[n]:!!n,"has-background":l,"has-text-color":t||s?.color?.text,"has-link-color":s?.elements?.link?.color}),style:co(s),css:c.styles}}return{className:F()(c.className,{}),style:"",css:c.styles}},fo=function(){return(0,e.createElement)("span",{className:"ct-video-indicator"},(0,e.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"#fff"},(0,e.createElement)("path",{className:"ct-play-path",d:"M20,0C8.9,0,0,8.9,0,20s8.9,20,20,20s20-9,20-20S31,0,20,0z M16,29V11l12,9L16,29z"})))};var ho=function({media:t,url:o,caption:n,attributes:l,attributes:{aspectRatio:a,imageFit:i,width:s,height:c,imageAlign:u,image_hover_effect:p,videoThumbnail:m,has_image_caption:f,minimumHeight:_,contentPosition:b,viewType:y,hasParallax:g,gradient:v,customGradient:k}}){const C=(0,r.__experimentalUseBorderProps)(l),[x]=(0,r.useSettings)("color.gradients","color.customGradient"),w=k||(0,r.getGradientValueBySlug)(x,v),E=(0,r.__experimentalGetGradientClass)(v),S=(0,r.useBlockProps)({className:F()("ct-dynamic-media",{[`align${u}`]:u,"wp-block-cover":"cover"===y,"has-parallax":"cover"===y&&g,[d(b)]:"cover"===y&&b,"has-custom-content-position":"cover"===y&&b}),style:{width:s,height:c}}),I=S.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),T=mo({fieldType:"image",attributes:l,uniqueClass:I}),A={height:a?"100%":c,width:!!a&&"100%",objectFit:i,aspectRatio:a},{allowCustomContentAndWideSize:B,contentSize:P,wideSize:H}=l,N=(0,r.useInnerBlocksProps)({className:F()("wp-block-cover__inner-container",{"is-layout-constrained":B,"wp-block-cover-is-layout-constrained":B,"is-layout-flow":!B,"wp-block-cover-is-layout-flow":!B})},{template:[["core/paragraph",{align:"center",placeholder:"Add text…"}]],templateInsertUpdatesSelection:!1}),D=t?.has_video&&"yes"===m||"none"!==p,R=function(e=""){return e.replace(/<\/?p[^>]*>/g,"")}(n||t?.caption?.rendered);if("cover"===y)return(0,e.createElement)("div",h({},S,{style:{...S.style||{},...C.style||{},..."auto"!==a?{aspectRatio:a}:{},minHeight:_||("auto"!==a?"unset":void 0)},className:F()(S.className,C.className,T.className)}),(0,e.createElement)("style",null,`\n\t\t\t\t\t\t\t${P?`#${S.id} > .wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {\n\t\t\t\t\t\t\t\t\t\tmax-width: ${P};\n\t\t\t\t\t\t\t\t\t}`:""}\n\n\t\t\t\t\t\t\t${H?`#${S.id} > .wp-block-cover__inner-container > .alignwide {\n\t\t\t\t\t\t\t\t\t\t\tmax-width: ${H};\n\t\t\t\t\t\t\t\t\t\t}`:""}\n\t\t\t\t\t\t`,T.css),(0,e.createElement)(Kt,{attributes:l,url:o}),(0,e.createElement)("span",{"aria-hidden":"true",className:F()("wp-block-cover__background",{"wp-block-cover__gradient-background":!!w,"has-background-gradient":!!w,[E]:!!E}),style:{background:w}}),(0,e.createElement)("div",N));let z=(0,e.createElement)("img",{className:D?"":C.className,style:{...D?{}:C.style,...A},src:o,loading:"lazy"});return o||(z=(0,e.createElement)("div",{className:F()("ct-dynamic-data-placeholder",{[C.className]:!D}),style:{...D?{}:C.style,...A}},(0,e.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))),D&&(z=(0,e.createElement)("span",{"data-hover":p,className:`ct-dynamic-media-inner ${C.className}`,style:{...C.style}},z,t?.has_video&&"yes"===m?(0,e.createElement)(fo,null):null)),(0,e.createElement)("figure",S,z,t?.has_video&&"yes"===m?(0,e.createElement)(fo,null):null,"yes"===f&&R?(0,e.createElement)("figcaption",{className:"wp-element-caption",dangerouslySetInnerHTML:{__html:R}}):null)};o(604);!function(e,t){var o,n,r=0;function l(){var l,a,i=o,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},bo=["(","?"],yo={")":["("],":":["?","?:"]},go=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var vo={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,o){if(e)throw t;return o}};function ko(e){var t=function(e){for(var t,o,n,r,l=[],a=[];t=e.match(go);){for(o=t[0],(n=e.substr(0,t.index).trim())&&l.push(n);r=a.pop();){if(yo[o]){if(yo[o][0]===r){o=yo[o][1]||o;break}}else if(bo.indexOf(r)>=0||_o[r]<_o[o]){a.push(r);break}l.push(r)}yo[o]||a.push(o),e=e.substr(t.index+o.length)}return(e=e.trim())&&l.push(e),l.concat(a.reverse())}(e);return function(e){return function(e,t){var o,n,r,l,a,i,s=[];for(o=0;o1===e?0:1},Eo=/^i18n\.(n?gettext|has_translation)(_|$)/;const So=((e,t,o)=>{const n=new xo({}),r=new Set,l=()=>{r.forEach(e=>e())},a=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...wo,...n.data[t]?.[""]},delete n.pluralForms[t]},i=(e,t)=>{a(e,t),l()},s=(e="default",t,o,r,l)=>(n.data[e]||a(void 0,e),n.dcnpgettext(e,t,o,r,l)),c=(e="default")=>e,u=(e,t,n)=>{let r=s(n,t,e);return o?(r=o.applyFilters("i18n.gettext_with_context",r,e,t,n),o.applyFilters("i18n.gettext_with_context_"+c(n),r,e,t,n)):r};if(e&&i(e,t),o){const e=e=>{Eo.test(e)&&l()};o.addAction("hookAdded","core/i18n",e),o.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:i,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...wo,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],l()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},i(e,t)},subscribe:e=>(r.add(e),()=>r.delete(e)),__:(e,t)=>{let n=s(t,void 0,e);return o?(n=o.applyFilters("i18n.gettext",n,e,t),o.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:(e,t,n,r)=>{let l=s(r,void 0,e,t,n);return o?(l=o.applyFilters("i18n.ngettext",l,e,t,n,r),o.applyFilters("i18n.ngettext_"+c(r),l,e,t,n,r)):l},_nx:(e,t,n,r,l)=>{let a=s(l,r,e,t,n);return o?(a=o.applyFilters("i18n.ngettext_with_context",a,e,t,n,r,l),o.applyFilters("i18n.ngettext_with_context_"+c(l),a,e,t,n,r,l)):a},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,r)=>{const l=t?t+""+e:e;let a=!!n.data?.[null!=r?r:"default"]?.[l];return o&&(a=o.applyFilters("i18n.has_translation",a,e,t,r),a=o.applyFilters("i18n.has_translation_"+c(r),a,e,t,r)),a}}})(void 0,void 0,window.wp.hooks.defaultHooks);So.getLocaleData.bind(So),So.setLocaleData.bind(So),So.resetLocaleData.bind(So),So.subscribe.bind(So);const Io=So.__.bind(So);So._x.bind(So),So._n.bind(So),So._nx.bind(So),So.isRTL.bind(So),So.hasTranslation.bind(So);function To({postId:e,postType:t}){const{authorDetails:o}=(0,b.useSelect)(function(o){const{getEditedEntityRecord:n,getUser:r}=o(a.store),l=n("postType",t,e)?.author;return{authorDetails:l?r(l):null}},[t,e]),n=o?.avatar_urls?Object.values(o.avatar_urls):null,l=(o?.avatar_urls&&Object.keys(o.avatar_urls),function(){const{avatarURL:e}=(0,b.useSelect)(function(e){const{getSettings:t}=e(r.store),{__experimentalDiscussionSettings:o}=t();return o});return e}());return{src:n?n[n.length-1]:l}}var Ao=function({postId:t,postType:o,attributes:n,attributes:{avatar_size:l,imageAlign:a,has_field_link:i}}){const s=(0,r.useBlockProps)({className:F()("ct-dynamic-media",{[`align${a}`]:a}),style:{}}),c=(0,r.__experimentalUseBorderProps)(n),u=To({postId:t,postType:o});const p=(0,Lt.addQueryArgs)((0,Lt.removeQueryArgs)(u.src,["s"]),{s:2*l}),d={...c.style};let m=(0,e.createElement)("img",{style:{...d,width:`${l}px`,height:`${l}px`},src:p,className:F()("avatar","avatar-"+l,"photo",c.className)});return i&&(m=(0,e.createElement)("a",{href:"#"},m)),(0,e.createElement)("figure",s,m)};const Bo={"wp:term_title":(0,t.__)("Term Title","blocksy-companion"),"wp:term_description":(0,t.__)("Term Description","blocksy-companion"),"wp:term_count":(0,t.__)("Term Count","blocksy-companion")},Po={"wp:term_title":"name","wp:term_description":"description","wp:term_count":"count"};var Ho=function({termId:t,taxonomy:o,attributes:n,attributes:{has_field_link:r,has_field_link_wrap_content:l},fieldsDescriptor:a}){const{terms:i}=(0,b.useSelect)(function(e){return{terms:e("core").getEntityRecords("taxonomy",o,{per_page:1,include:[t]})||[]}});if(!i.length)return Bo[n.field]||Bo["wp:term_title"];let s="span",c={};"yes"===r&&"no"===l&&(s="a",c.href="#",c.rel="noopener noreferrer");const u=i[0][Po[n.field]];return(0,e.createElement)(s,h({},c,{className:F()({[`ct-term-${i[0].id}`]:"yes"===n.termAccentColor},n.termClass),dangerouslySetInnerHTML:{__html:u}}))};var No=function({termImage:t,termIcon:o,attributes:n,attributes:{sizeSlug:r,imageSource:l}}){const i="icon"===l?o?.attachment_id:t?.attachment_id,{media:s}=(0,b.useSelect)(function(e){const{getMedia:t}=e(a.store);return{media:i&&t(i,{context:"view"})}},[i]),c=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(s,r);return(0,e.createElement)(ho,{attributes:n,url:c,media:s})};var Do=function({postType:t,postId:o,attributes:n,attributes:{sizeSlug:r}}){const[l,i]=(0,a.useEntityProp)("postType",t,"featured_media",o),{media:s}=(0,b.useSelect)(function(e){const{getMedia:t}=e(a.store);return{media:l&&t(l,{context:"view"})}},[l]),c=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(s,r);return(0,e.createElement)(ho,{attributes:n,url:c,media:s})};var Ro=function({tagName:t,children:o,before:n,after:r,withLink:l,...a}){const[i,s]=(0,e.useState)(null),c=n||"",u=r||"",p=(0,e.useRef)(null),d=-1!==c.indexOf("<")||-1!==u.indexOf("<");return(0,e.useEffect)(function(){d&&s(Math.random())},[n,r]),d?l?(0,e.createElement)("a",{href:"#",rel:"noopener noreferrer"},(0,e.createElement)("span",h({ref:p,dangerouslySetInnerHTML:{__html:`${n}${r}`}},a)),p.current&&p.current.querySelector("span")&&(0,e.createPortal)(o,p.current.querySelector("span"))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",h({ref:p,dangerouslySetInnerHTML:{__html:`${n}${r}`}},a)),p.current&&p.current.querySelector("span")&&(0,e.createPortal)(o,p.current.querySelector("span"))):l?(0,e.createElement)("a",{href:"#",rel:"noopener noreferrer"},c,o,u):(0,e.createElement)(e.Fragment,null,c,o,u)};const zo=function({fieldDescriptor:o,fieldsDescriptor:n,attributes:l,attributes:{align:a,tagName:i,before:s,after:c,fallback:u,has_field_link:p,has_field_link_wrap_content:d},postId:m,postType:f,termId:_,taxonomy:b}){const[y,g]=(0,e.useState)(!1),v=(0,e.useRef)(null),k=((0,e.useRef)(null),(0,r.useBlockProps)({className:F()("ct-dynamic-data",{[`has-text-align-${a}`]:a}),ref:v})),C=k.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),x=mo({fieldType:"text",attributes:l,uniqueClass:C}),w=(0,r.__experimentalUseBorderProps)(l);let E=null;"archive_title"===o.id&&(E=function(){return(0,t.__)("Archive Title","blocksy-companion")}),"archive_description"===o.id&&(E=function(){return(0,t.__)("Archive Description","blocksy-companion")}),"term_title"!==o.id&&"term_description"!==o.id&&"term_count"!==o.id||(E=Ho),"title"===o.id&&(E=Dt),"excerpt"===o.id&&(E=zt),"date"===o.id&&(E=Mt),"comments"===o.id&&(E=Ut),"terms"===o.id&&(E=Wt),"author"===o.id&&(E=Gt);let S="";return n&&n.dynamic_styles&&(S=n.dynamic_styles),x.css&&(S+=x.css),E?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i,h({},k,w,{style:{...k.style||{},...w.style||{},...x.style||{}},className:F()(k.className,w.className,x.className)}),S&&(0,e.createElement)("style",null,S),(0,e.createElement)(Ro,{before:s,after:c,withLink:"yes"===p&&"yes"===d},(0,e.createElement)(E,{attributes:l,postId:m,postType:f,termId:_,taxonomy:b,fallback:u,fieldsDescriptor:n})))):null};var Oo=function(t){const{fieldDescriptor:o}=t;return"featured_image"===o.id?(0,e.createElement)(Do,t):"author_avatar"===o.id?(0,e.createElement)(Ao,t):"term_image"===o.id?(0,e.createElement)(No,t):"archive_image"===o.id?(0,e.createElement)(ho,t):(0,e.createElement)(zo,t)};var Mo=function({fieldsContext:t,fieldDescriptor:o}){const[n,r]=(0,e.useState)({}),{type:l,post_type:a,post_id:i}=t,{provider:s,id:c,attributes:u,...p}=o,d=(0,e.useMemo)(function(){const e=`${wp.ajax.settings.url}?action=blocksy_dynamic_data_block_custom_field_data`,t={context:{type:l,post_type:a,post_id:i},field_provider:s,field_id:c,attributes:u};return{url:e,body:t,cacheKey:x({...t,url:e})}},[l,a,i,s,c,u]);(0,e.useEffect)(function(){B(d.url,d.body).then(function(e){return e.json()}).then(function({success:e,data:t}){e&&r(function(e){return{...e,[d.cacheKey]:t.field_data}})})},[d]);let m=null;return n[d.cacheKey]&&(m=n[d.cacheKey]),{fieldData:m}};var Fo=function({fieldDescriptor:t,attributes:o,attributes:{align:n,tagName:l,before:a,after:i,fallback:s,has_field_link:c,has_field_link_wrap_content:u},fieldData:p}){const d=(0,r.useBlockProps)({className:F()("ct-dynamic-data",{[`has-text-align-${n}`]:n})}),m=d.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),f=mo({fieldType:"text",attributes:o,uniqueClass:m}),_=(0,r.__experimentalUseBorderProps)(o);let b=!1,y=p||"";"yes"===c&&"no"===u&&(y=`${y}`),y||(b=!0,y=s||`Dynamic data: ${t?.label}`),!b&&y&&"string"==typeof y&&(y=a+y+i),"yes"===c&&"yes"===u&&(y=`${y}`);let g="";return f.css&&(g+=f.css),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,h({},d,_,{style:{...d.style||{},..._.style||{},...f.style||{}},className:F()(d.className,_.className,f.className),dangerouslySetInnerHTML:{__html:y}})),g&&(0,e.createElement)("style",null,g))};var Vo=function({fieldData:t,attributes:o,attributes:{sizeSlug:n}}){let r=t?.url;return t?.full_url&&(r=t.full_url),t?.sizes?.[n]&&(r="string"==typeof t.sizes[n]?t.sizes[n]:t.sizes[n].url),(0,e.createElement)(ho,{attributes:o,url:r,caption:t?.caption})};var Lo=function({fieldDescriptor:t,fieldsContext:o,attributes:n}){const{fieldData:r}=Mo({fieldDescriptor:t,fieldsContext:o});return"image"===t.type?(0,e.createElement)(Vo,{fieldData:r,fieldDescriptor:t,attributes:n}):(0,e.createElement)(Fo,{fieldData:r,fieldDescriptor:t,attributes:n})};var jo=function({product:t}){return(0,e.createElement)(e.RawHTML,null,t?.price_html)};var $o=function({product:e}){return e?.is_in_stock?(0,t.__)("In Stock","blocksy-companion"):(0,t.__)("Out of Stock","blocksy-companion")};var Uo=function({product:o}){const n=parseFloat(o?.average_rating)/5*100+"%";return(0,e.createElement)("div",{className:"star-rating",role:"img","aria-label":"Rated 2.15 out of 5"},(0,e.createElement)("span",{style:{width:n}},(0,t.sprintf)((0,t.__)("Rated %s out of 5","blocksy-companion"),o?.average_rating)))};var qo=function({product:e}){return e?.sku||""};var Go=function({postId:t,attributes:o}){const{fieldData:n}=Mo({fieldsContext:{type:"post",post_type:"product",post_id:t},fieldDescriptor:{provider:"woo",id:"brands"}});return(0,e.createElement)("div",{className:"ct-product-brands",style:{"--product-brand-logo-size":`${o.brands_size}px`,"--product-brands-gap":`${o.brands_gap}px`}},n&&n.map(function(t){return t.image&&t.image.url?(0,e.createElement)("span",{key:t.slug,className:"ct-media-container"},(0,e.createElement)("img",{src:t.image.url,alt:t.name})):(0,e.createElement)("span",{key:t.slug,dangerouslySetInnerHTML:{__html:t.name}})}))};var Wo=function({postId:t,fallback:o,attributes:n,attributes:{attribute:r,separator:l},fieldsDescriptor:a}){const{fieldData:i}=Mo({fieldsContext:{type:"post",post_type:"product",post_id:t},fieldDescriptor:{provider:"woo",id:"attributes",attributes:n}}),s=`Attributes: ${r}`;if(!t||!i)return`${s}`;if(0===i.length)return o||`${s}`;return i.map(function(t,o){return(0,e.createElement)(React.Fragment,null,(0,e.createElement)("span",{className:F()({[`ct-term-${t.term_id}`]:"yes"===n.termAccentColor},n.termClass),dangerouslySetInnerHTML:{__html:t.name}}),o!==i.length-1?l.replace(/ /g," "):"")})};const Zo=function({fieldDescriptor:t,fieldsDescriptor:o,attributes:n,attributes:{align:a,tagName:i,before:s,after:c,fallback:u},postId:p,postType:d,termId:m,taxonomy:f,colors:_}){const b=(0,e.useRef)(null),{product:y,isLoading:g}=((0,e.useRef)(null),wc.wcBlocksSharedContext.useProductDataContext()),v=(0,r.useBlockProps)({className:F()("ct-dynamic-data",{[`has-text-align-${a}`]:a}),ref:b}),k=v.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),C=mo({fieldType:"text",attributes:n,uniqueClass:k}),x=(0,r.__experimentalUseBorderProps)(n);if(g)return(0,e.createElement)(l.Spinner,null);let w=null;"price"===t.id&&(w=jo),"stock_status"===t.id&&(w=$o),"brands"===t.id&&(w=Go),"rating"===t.id&&(w=Uo),"sku"===t.id&&(w=qo),"attributes"===t.id&&(w=Wo);let E="";return C.css&&(E+=C.css),w?(0,e.createElement)(i,h({},v,x,{style:{...v.style||{},...x.style||{},...C.style||{}},className:F()(v.className,x.className,C.className)}),E&&(0,e.createElement)("style",null,E),(0,e.createElement)(Ro,{before:s,after:c},(0,e.createElement)(w,{attributes:n,postId:p,postType:d,termId:m,taxonomy:f,fallback:u,fieldsDescriptor:o,product:y}))):null};var Xo=function(e){const{fieldDescriptor:t,postId:o}=e,{withProductDataContext:n}=wc.wcBlocksSharedHocs;return n(Zo)({...e,productId:o})};var Ko=function({fieldDescriptor:o,fieldsDescriptor:n,isFieldMissing:l,postId:a,postType:i,termId:s,taxonomy:c,fieldsContext:u,termIcon:p,termImage:d,attributes:m,attributes:{tagName:f,align:h,field:_,before:b,after:y,fallback:g},colors:v}){if(l){const o=(0,r.useBlockProps)({className:"ct-block-notice components-notice is-warning"});return(0,e.createElement)("div",o,(0,t.__)("Field not found","blocksy-companion"))}return o?"woo"===o.provider?(0,e.createElement)(Xo,{fieldDescriptor:o,attributes:m,postId:a,postType:i,colors:v}):"wp"===o.provider?(0,e.createElement)(Oo,{fieldsDescriptor:n,fieldDescriptor:o,attributes:m,postId:a,postType:i,termId:s,taxonomy:c,termImage:d,termIcon:p,colors:v}):(0,e.createElement)(Lo,{fieldDescriptor:o,fieldsContext:u,attributes:m}):null};function Jo({level:t,isPressed:o=!1}){const n={h1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",h2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",h3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",h4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",h5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",h6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",p:"M6.2 15V5h3.2c1.2 0 2 .1 2.4.2.6.2 1 .5 1.4 1 .4.5.6 1.1.6 1.9 0 .6-.1 1.1-.3 1.6-.2.4-.5.8-.9 1-.3.2-.7.4-1 .5-.5.1-1.2.1-2.1.1H8.2V15h-2zm2-8.3v2.8h1.1c.8 0 1.3 0 1.6-.2.3-.1.5-.3.6-.5.2-.2.2-.5.2-.8 0-.4-.1-.7-.3-.9-.2-.2-.5-.4-.8-.4-.2 0-.7-.1-1.5-.1.1.1-.9.1-.9.1z",span:"M8.2 12c.2 1 .9 1.4 2 1.4s1.6-.4 1.6-1.2c0-.8-.5-1.1-2.1-1.5-2.7-.6-3.3-1.5-3.3-2.9C6.4 6.2 7.6 5 9.9 5c2.6 0 3.6 1.4 3.7 2.8h-2.1c-.1-.6-.4-1.2-1.7-1.2-.9 0-1.4.4-1.4 1 0 .7.4.9 2 1.3 2.9.7 3.6 1.7 3.6 3.1 0 1.8-1.3 3-3.9 3-2.5 0-3.8-1.2-4-3h2.1z",div:"M5.8 5h3.7c.8 0 1.5.1 1.9.2.6.2 1.1.5 1.5.9.4.4.7 1 1 1.6.2.6.3 1.4.3 2.4 0 .8-.1 1.5-.3 2.1-.3.7-.6 1.3-1.1 1.8-.3.3-.8.6-1.4.8-.4.1-1 .2-1.8.2H5.8V5zm2 1.7v6.6h1.5c.6 0 1 0 1.2-.1.3-.1.6-.2.8-.4.2-.2.4-.5.5-1 .1-.4.2-1.1.2-1.8 0-.8-.1-1.4-.2-1.8-.1-.4-.3-.7-.6-1-.2-.2-.6-.4-.9-.5-.3-.1-.8-.1-1.6-.1l-.9.1z"};return n.hasOwnProperty(t)?(0,e.createElement)(l.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:o},(0,e.createElement)(l.Path,{d:n[t]})):null}function Yo({tagName:o,onChange:n}){return(0,e.createElement)(l.ToolbarDropdownMenu,{popoverProps:{className:"block-library-heading-level-dropdown"},icon:(0,e.createElement)(Jo,{level:o}),label:(0,t.__)("Change heading level","blocksy-companion"),controls:["h1","h2","h3","h4","h5","h6","p","span","div"].map(function(r){{const l=r===o;return{icon:(0,e.createElement)(Jo,{level:r,isPressed:l}),label:r,title:{h1:(0,t.__)("Heading 1","blocksy-companion"),h2:(0,t.__)("Heading 2","blocksy-companion"),h3:(0,t.__)("Heading 3","blocksy-companion"),h4:(0,t.__)("Heading 4","blocksy-companion"),h5:(0,t.__)("Heading 5","blocksy-companion"),h6:(0,t.__)("Heading 6","blocksy-companion"),p:(0,t.__)("Paragraph","blocksy-companion"),span:(0,t.__)("Span","blocksy-companion"),div:(0,t.__)("Div","blocksy-companion")}[r],isActive:l,onClick(){n(r)},role:"menuitemradio"}}})})}var Qo=function({fieldDescriptor:t,attributes:o,attributes:{name:n,style:l,align:a,imageAlign:i,contentPosition:s,minimumHeight:u,viewType:p},setAttributes:d}){const[m,f]=(0,e.useState)(""),_="100vh"===u,b=lo(),y=[...b.color.duotone?.custom??[],...b.color.duotone?.theme??[],...b.color.duotone?.default??[]],g=(b.color.palette,b.color.palette,b.color.palette,l?.color?.duotone);Array.isArray(g)||function(e,t){if(!e)return;const o=t?.find(function({slug:t}){return e===`var:preset|duotone|${t}`});o&&o.colors}(g,y);return(0,e.createElement)(r.BlockControls,{group:"block"},c(t)?(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.BlockAlignmentControl,h({},"wp"===t.provider&&"author_avatar"===t.id?{controls:["none","left","center","right"]}:{},{value:i,onChange:function(e){return d({imageAlign:e})}})),null,"cover"===p?(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.__experimentalBlockAlignmentMatrixControl,{label:Io("Change content position"),value:s,onChange:function(e){return d({contentPosition:e})}}),(0,e.createElement)(r.__experimentalBlockFullHeightAligmentControl,{isActive:_,onToggle:function(){_?d({minimumHeight:m}):(f(u),d({minimumHeight:"100vh",aspectRatio:"auto"}))}})):null):(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.AlignmentControl,{value:a,onChange:function(e){return d({align:e})}}),(0,e.createElement)(Yo,{tagName:o.tagName,onChange:function(e){return d({tagName:e})}})))};const en=function({termId:t,postId:o,postType:n}){return(0,e.useMemo)(function(){return function({termId:e,postId:t,postType:o}){const n=["ct_thank_you_page","ct_content_block","ct_product_tab","ct_size_guide"];let r={type:"all"};t&&(r={type:"post",post_id:t,post_type:o});const l=([...document.body.classList].find(function(e){return e.startsWith("post-type-")})||"").replace("post-type-","");l&&n.includes(l)&&o===l&&(r={type:"all"},"ct_product_tab"!==o&&"ct_size_guide"!==o||(r={type:"post_type",post_type:"product"}));return e&&(r={type:"term",term_id:e}),r}({termId:t,postId:o,postType:n})},[t,o,n])},tn=(0,R.getOptionsForBlock)("dynamic-data"),on=function(e={}){const{fieldsContext:o}=e;let n=[];return"term"===o.type&&(n=[{id:"term_title",label:(0,t.__)("Term Title","blocksy-companion")},{id:"term_description",label:(0,t.__)("Term Description","blocksy-companion")},{id:"term_image",label:(0,t.__)("Term Image","blocksy-companion")},{id:"term_count",label:(0,t.__)("Term Count","blocksy-companion")}]),"all"!==o.type&&"post"!==o.type||(n=[{id:"title",label:(0,t.__)("Title","blocksy-companion")},{id:"excerpt",label:(0,t.__)("Excerpt","blocksy-companion")},{id:"date",label:(0,t.__)("Post Date","blocksy-companion")},{id:"comments",label:(0,t.__)("Comments","blocksy-companion")},{id:"terms",label:(0,t.__)("Terms","blocksy-companion")},{id:"author",label:(0,t.__)("Author","blocksy-companion")},{id:"featured_image",label:(0,t.__)("Featured Image","blocksy-companion")},{id:"author_avatar",label:(0,t.__)("Author Avatar","blocksy-companion")}]),"all"===o.type&&(n=[...n,{id:"archive_title",label:(0,t.__)("Archive Title","blocksy-companion")},{id:"archive_description",label:(0,t.__)("Archive Description","blocksy-companion")},{id:"archive_image",label:(0,t.__)("Archive Image","blocksy-companion")}]),{provider:"wp",provider_label:"WordPress",fields:n}};var nn=function({postId:o,postType:n,termId:r,taxonomy:l}){const[a,i]=(0,e.useState)([]),[s,c]=(0,e.useState)(!1),u=en({postId:o,postType:n,termId:r});let p=n;"post_type"===u.type&&u.post_type&&(p=u.post_type),"post"===u.type&&u.post_type&&(p=u.post_type);const d=oe(p);(0,e.useEffect)(function(){B(`${wp.ajax.settings.url}?action=blocksy_blocks_retrieve_dynamic_data_descriptor`,{context:u}).then(function(e){return e.json()}).then(function({success:e,data:t}){i(t.fields),c(!0)})},[u]);const m={fields:[on({fieldsContext:u})]},f=function({fieldsContext:e,taxonomies:o=[]}){if(void 0===window.wc)return null;if(!("post"===e.type&&"product"===e.post_type||"post_type"===e.type&&"product"===e.post_type))return null;const n=(o||[]).find(function({slug:e}){return"product_brand"===e});return{provider:"woo",provider_label:"WooCommerce",fields:[{id:"price",label:(0,t.__)("Price","blocksy-companion")},{id:"rating",label:(0,t.__)("Rating","blocksy-companion")},{id:"stock_status",label:(0,t.__)("Stock Status","blocksy-companion")},{id:"sku",label:(0,t.__)("SKU","blocksy-companion")},{id:"attributes",label:(0,t.__)("Attributes","blocksy-companion")},...n?[{id:"brands",label:(0,t.__)("Brands","blocksy-companion")}]:[]]}}({fieldsContext:u,taxonomies:d});f&&m.fields.push(f),a.length>0&&(m.fields=[...m.fields,...a]);return{fullDescriptorLoaded:s,fieldsDescriptor:m,linkFieldsChoices:a.flatMap(function(e){return e.fields.filter(function(e){return"text"===e.type}).map(function(t){return{group:e.provider_label,key:`${e.provider}:${t.id}`,value:t.label}})}),options:tn,fieldsChoices:m.fields.reduce(function(e,t){return[...e,...t.fields.filter(function(e){return"wp"!==t.provider||"terms"!==e.id||d&&d.length>0}).map(function(e){return{group:t.provider_label,key:`${t.provider}:${e.id}`,value:e.label}})]},[])}};var rn=function({sizeSlug:o,onChange:n,clientId:a}){const i=(0,b.useSelect)(function(e){return e(r.store).getSettings().imageSizes},[]).map(function({name:e,slug:t}){return{value:t,label:e}});return i.length?(0,e.createElement)(l.__experimentalToolsPanelItem,{hasValue:function(){return!!o},label:(0,t.__)("Resolution","blocksy-companion"),onDeselect:function(){return n(void 0)},resetAllFilter:function(){return{sizeSlug:void 0}},isShownByDefault:!1,key:a},(0,e.createElement)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Resolution","blocksy-companion"),value:o||"full",options:i,onChange:function(e){return n(e)},help:(0,t.__)("Select the size of the source image.","blocksy-companion")})):null};var ln=function({clientId:o,attributes:{aspectRatio:n,imageFit:a,width:i,height:s,sizeSlug:c,viewType:u,minimumHeight:p},setAttributes:d}){const m=(0,l.__experimentalUseCustomUnits)({availableUnits:(0,r.useSetting)("spacing.units")||["px","%","vw","em","rem"]}),f=function(e,t){const o=parseFloat(t);isNaN(o)&&t||d({[e]:o<0?"0":t})};return(0,e.createElement)(l.__experimentalToolsPanel,{label:"cover"===u?(0,t.__)("Block Settings","blocksy-companion"):(0,t.__)("Image Settings","blocksy-companion"),resetAll:function(){d({aspectRatio:"auto",width:void 0,height:void 0,sizeSlug:void 0,minimumHeight:void 0})}},(0,e.createElement)(l.__experimentalToolsPanelItem,{hasValue:function(){return!!n},label:(0,t.__)("Aspect Ratio","blocksy-companion"),onDeselect:function(){return d({aspectRatio:void 0})},resetAllFilter:function(){return{aspectRatio:"auto"}},isShownByDefault:!0,key:o},(0,e.createElement)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Aspect Ratio","blocksy-companion"),value:n,options:[{label:(0,t.__)("Original","blocksy-companion"),value:"auto"},{label:(0,t.__)("Square","blocksy-companion"),value:"1"},{label:(0,t.__)("16:9","blocksy-companion"),value:"16/9"},{label:(0,t.__)("4:3","blocksy-companion"),value:"4/3"},{label:(0,t.__)("3:2","blocksy-companion"),value:"3/2"},{label:(0,t.__)("9:16","blocksy-companion"),value:"9/16"},{label:(0,t.__)("3:4","blocksy-companion"),value:"3/4"},{label:(0,t.__)("2:3","blocksy-companion"),value:"2/3"}],onChange:function(e){return d({aspectRatio:e,minimumHeight:void 0})}})),"cover"!==u?(0,e.createElement)(React.Fragment,null,(0,e.createElement)(l.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!i},label:(0,t.__)("Width","blocksy-companion"),onDeselect:function(){return d({width:void 0})},resetAllFilter:function(){return{width:void 0}},isShownByDefault:!0,key:o},(0,e.createElement)(l.__experimentalUnitControl,{label:(0,t.__)("Width","blocksy-companion"),labelPosition:"top",value:i||"",min:0,onChange:function(e){return f("width",e)},units:m})),(0,e.createElement)(l.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!s},label:(0,t.__)("Height","blocksy-companion"),onDeselect:function(){return d({height:void 0})},resetAllFilter:function(){return{height:void 0}},isShownByDefault:!0,key:o},(0,e.createElement)(l.__experimentalUnitControl,{label:(0,t.__)("Height","blocksy-companion"),labelPosition:"top",value:s||"",min:0,onChange:function(e){return f("height",e)},units:m})),(0,e.createElement)(l.__experimentalToolsPanelItem,{hasValue:function(){return!!a},label:(0,t.__)("Scale","blocksy-companion"),onDeselect:function(){return d({imageFit:void 0})},resetAllFilter:function(){return{imageFit:"cover"}},isShownByDefault:!0,key:o},(0,e.createElement)(l.__experimentalToggleGroupControl,{label:(0,t.__)("Scale","blocksy-companion"),value:a,isBlock:!0,onChange:function(e){return d({imageFit:e})}},(0,e.createElement)(l.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,t.__)("Cover","blocksy-companion")}),(0,e.createElement)(l.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,t.__)("Contain","blocksy-companion")})))):null,"cover"===u?(0,e.createElement)(l.__experimentalToolsPanelItem,{hasValue:function(){return!!p},label:(0,t.__)("Minimum height"),onDeselect:function(){return d({minimumHeight:void 0})},isShownByDefault:!0},(0,e.createElement)(l.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,t.__)("Minimum height"),labelPosition:"top",value:p||"",onChange:function(e){e=0>parseFloat(e)?"0":e,d({minimumHeight:e,aspectRatio:"auto"})},units:m})):(0,e.createElement)(rn,{sizeSlug:c,onChange:function(e){return d({sizeSlug:e})},clientId:o}))};const an=function(){return(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"}))},sn=function(){return(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},cn=function({clientId:t,postType:o,postId:n,attributes:i,setAttributes:s}){const{focalPoint:c,hasParallax:u,isRepeated:p,sizeSlug:d,allowCustomContentAndWideSize:m,contentSize:f,wideSize:h}=i,[_,y]=(0,a.useEntityProp)("postType",o,"featured_media",n),{media:g}=(0,b.useSelect)(function(e){const{getMedia:t}=e(a.store);return{media:_&&t(_,{context:"view"})}},[_]),v=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(g,d),k=!u,C=(0,l.__experimentalUseCustomUnits)({availableUnits:(0,r.useSetting)("spacing.units")||["px","%","vw","em","rem"]});return"cover"!==i.viewType?null:(0,e.createElement)(React.Fragment,null,(0,e.createElement)(l.__experimentalToolsPanel,{label:Io("Layout"),resetAll:function(){s({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},(0,e.createElement)(l.__experimentalToolsPanelItem,{label:Io("Layout"),isShownByDefault:!0,hasValue:function(){return!m},onDeselect:function(){return s({allowCustomContentAndWideSize:!0,contentSize:void 0,wideSize:void 0})}},(0,e.createElement)(l.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained"},(0,e.createElement)(l.ToggleControl,{label:Io("Inner blocks use content width"),checked:m,onChange:function(){s({allowCustomContentAndWideSize:!m})},help:Io(m?"Nested blocks use content width with options for full and wide widths.":"Nested blocks will fill the width of this container. Toggle to constrain.")}),m&&(0,e.createElement)(React.Fragment,null,(0,e.createElement)(l.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:Io("Content width"),labelPosition:"top",value:f||h||"",onChange:function(e){e=0>parseFloat(e)?"0":e,s({contentSize:e})},units:C,prefix:(0,e.createElement)(l.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,e.createElement)(an,null))}),(0,e.createElement)(l.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:Io("Wide width"),labelPosition:"top",value:h||f||"",onChange:function(e){e=0>parseFloat(e)?"0":e,s({wideSize:e})},units:C,prefix:(0,e.createElement)(l.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,e.createElement)(sn,null))}),(0,e.createElement)("p",{className:"block-editor-hooks__layout-constrained-helptext"},Io("Customize the width for all elements that are assigned to the center or wide columns.")))))),(0,e.createElement)(l.__experimentalToolsPanel,{label:Io("Image Settings","blocksy-companion"),resetAll:function(){s({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},k&&(0,e.createElement)(l.__experimentalToolsPanelItem,{label:Io("Focal point"),isShownByDefault:!0,hasValue:function(){return!!c},onDeselect:function(){return s({focalPoint:void 0})}},(0,e.createElement)(l.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:Io("Focal point"),url:v,value:c,onDragStart:function(e){return s({focalPoint:e})},onDrag:function(e){return s({focalPoint:e})},onChange:function(e){return s({focalPoint:e})}})),(0,e.createElement)(l.__experimentalToolsPanelItem,{label:Io("Fixed background"),isShownByDefault:!0,hasValue:function(){return u},onDeselect:function(){return s({hasParallax:!1,focalPoint:void 0})}},(0,e.createElement)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:Io("Fixed background"),checked:u,onChange:function(){s({hasParallax:!u,...u?{}:{focalPoint:void 0}})}})),(0,e.createElement)(l.__experimentalToolsPanelItem,{label:Io("Repeated background"),isShownByDefault:!0,hasValue:function(){return p},onDeselect:function(){return s({isRepeated:!1})}},(0,e.createElement)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:Io("Repeated background"),checked:p,onChange:function(){s({isRepeated:!p})}})),(0,e.createElement)(rn,{sizeSlug:d,onChange:function(e){return s({sizeSlug:e})},clientId:t})))};o(252);function un(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:o,rootSizeValue:n,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=r?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),i=e.match(a);if(!i||i.length<3)return null;let[,s,c]=i,u=parseFloat(s);return"px"!==o||"em"!==c&&"rem"!==c||(u*=n,c=o),"px"!==c||"em"!==o&&"rem"!==o||(u/=n,c=o),"em"!==o&&"rem"!==o||"em"!==c&&"rem"!==c||(c=o),{value:pn(u,3),unit:c}}function pn(e,t=3){const o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}function dn(e,t){const{size:o}=e;if(!o||"0"===o||!1===e?.fluid)return o;if(!mn(t?.typography)&&!mn(e))return o;let n=function(e){const t=e?.typography,o=e?.layout,n=un(o?.wideSize)?o?.wideSize:null;return mn(t)&&n?{fluid:{maxViewportWidth:n,...t.fluid}}:{fluid:t?.fluid}}(t);n="object"==typeof n?.fluid?n?.fluid:{};const r=function({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:n="320px",maximumViewportWidth:r="1600px",scaleFactor:l=1,minimumFontSizeLimit:a}){if(a=un(a)?a:"14px",o){const n=un(o);if(!n?.unit)return null;const r=un(a,{coerceTo:n.unit});if(r?.value&&!e&&!t&&n?.value<=r?.value)return null;if(t||(t=`${n.value}${n.unit}`),!e){const t="px"===n.unit?n.value:16*n.value,o=Math.min(Math.max(1-.075*Math.log2(t),.25),.75),l=pn(n.value*o,3);e=r?.value&&l0}const fn=(e,t,o)=>{const n=Array.isArray(t)?t:t.split(".");let r=e;return n.forEach(e=>{r=r?.[e]}),r??o};const hn=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>dn(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}];function _n(e,t,o,n,r){const l=[fn(e,["blocks",t,...o]),fn(e,o)];for(const a of l)if(a){const l=["custom","theme","default"];for(const i of l){const l=a[i];if(l){const a=l.find(e=>e[n]===r);if(a){if("slug"===n)return a;return _n(e,t,o,"slug",a.slug)[n]===a[n]?a:void 0}}}}}function bn(e,t,o){if(!o||"string"!=typeof o){if("string"!=typeof o?.ref)return o;if(!(o=fn(e,o.ref))||o?.ref)return o}const n="var:",r="var(--wp--";let l;if(o.startsWith(n))l=o.slice(4).split("|");else{if(!o.startsWith(r)||!o.endsWith(")"))return o;l=o.slice(10,-1).split("--")}const[a,...i]=l;return"preset"===a?function(e,t,o,[n,r]){const l=hn.find(e=>e.cssVarInfix===n);if(!l)return o;const a=_n(e.settings,t,l.path,"slug",r);if(a){const{valueKey:o}=l;return bn(e,t,a[o])}return o}(e,t,o,i):"custom"===a?function(e,t,o,n){const r=fn(e.settings,["blocks",t,"custom",...n])??fn(e.settings,["custom",...n]);return r?bn(e,t,r):o}(e,t,o,i):o}function yn(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const n=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[n]=o,e}var gn=function({fieldDescriptor:o,fieldsDescriptor:n,linkFieldsChoices:a,attributes:i,setAttributes:s,options:p,fieldsChoices:d,clientId:m,name:f,__unstableParentLayout:h,taxonomies:y,postId:g,postType:v}){const{replaceInnerBlocks:k}=(0,b.useDispatch)("core/block-editor"),C=function(e){return function(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}({style:e.style,textColor:e.textColor})}(i),x=lo(0,h),w=function(e){return bn({settings:x},"",e)},E=function(o){const n=o?.color?.palette?.custom,r=o?.color?.palette?.theme,l=o?.color?.palette?.default,a=o?.color?.defaultPalette;return(0,e.useMemo)(function(){const e=[];return r&&r.length&&e.push({name:(0,t._x)("Theme","Indicates this palette comes from the theme."),colors:r}),a&&l&&l.length&&e.push({name:(0,t._x)("Default","Indicates this palette comes from WordPress."),colors:l}),n&&n.length&&e.push({name:(0,t._x)("Custom","Indicates this palette is created by the user."),colors:n}),e},[n,r,l,a])}(x),S=function(o){const n=o?.color?.gradients?.custom,r=o?.color?.gradients?.theme,l=o?.color?.gradients?.default,a=o?.color?.defaultGradients;return(0,e.useMemo)(function(){const e=[];return r&&r.length&&e.push({name:(0,t._x)("Theme","Indicates this palette comes from the theme."),gradients:r}),a&&l&&l.length&&e.push({name:(0,t._x)("Default","Indicates this palette comes from WordPress."),gradients:l}),n&&n.length&&e.push({name:(0,t._x)("Custom","Indicates this palette is created by the user."),gradients:n}),e},[n,r,l,a])}(x),I=function(e){const t=E.flatMap(function({colors:e}){return e}).find(function({color:t}){return t===e});return t?"var:preset|color|"+t.slug:e},T=function(e){const t=S.flatMap(function({gradients:e}){return e}).find(function({gradient:t}){return t===e});return t?"var:preset|gradient|"+t.slug:e},A=function(e){s(function(e){const t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,n=e?.color?.background,r=n?.startsWith("var:preset|color|")?n.substring(17):void 0,l=e?.color?.gradient,a=l?.startsWith("var:preset|gradient|")?l.substring(20):void 0,i={...e};return i.color={...i.color,text:o?void 0:t,background:r?void 0:n,gradient:a?void 0:l},{style:so(i),textColor:o,backgroundColor:r,gradient:a}}(e))},B=w(C?.elements?.link?.color?.text),P=w(C?.elements?.link?.[":hover"]?.color?.text),H=w(i?.style?.elements?.overlay?.color?.background),N=w(i?.style?.elements?.overlay?.color?.gradient);let D=null;const z=function(e){if(D||(D="color"),"gradient"===D)return void(D=null);let t=yn(C,["elements","overlay","color","background"],I(e));e&&(t=yn(t,["elements","overlay","color","gradient"],T(void 0))),A(t)},O=w(C?.color?.text),M=function(e){let t=yn(C,["color","text"],I(e));O===B&&(t=yn(t,["elements","link","color","text"],I(e))),A(t)},F=function(e){A(yn(C,["elements","link","color","text"],I(e)))},V=function(e){A(yn(C,["elements","link",":hover","color","text"],I(e)))},L="default"!==i.viewType&&c(o)?[{colorValue:N?void 0:H,gradientValue:N,label:(0,t.__)("Overlay","blocksy-companion"),enableAlpha:!0,onColorChange:z,onGradientChange:function(e){!function(e){if(D||(D="gradient"),"color"===D)return;let t=yn(C,["elements","overlay","color","gradient"],T(e));e&&(t=yn(t,["elements","overlay","color","background"],I(void 0))),A(t)}(e)},isShownByDefault:!0,clearable:!0}]:[..."yes"===i.has_field_link?[{colorValue:B,label:(0,t.__)("Link","blocksy-companion"),enableAlpha:!0,onColorChange:F},{colorValue:P,label:(0,t.__)("Link Hover","blocksy-companion"),enableAlpha:!0,onColorChange:V}]:[{colorValue:O,label:(0,t.__)("Text","blocksy-companion"),enableAlpha:!0,onColorChange:M}]];return o?(0,e.createElement)(React.Fragment,null,(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t}),"viewType"!==e||H||setTimeout(function(){z("#000000")},50),"viewType"!==e&&("field"!==e||c(t)&&"wp:author_avatar"!==i.field)||k(m,[],!1)},options:{field:{type:"ct-select",label:(0,t.__)("Content Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,t.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:d,purpose:"default"},..."wp:archive_title"===i.field?{has_archive_prefix:{type:"ct-switch",label:(0,t.__)("Show archive label","blocksy-companion"),value:"no"}}:{},...u(o)?{has_field_link:{type:"ct-switch",label:(0,t.__)("Enable field link","blocksy-companion"),value:"no"},..."yes"===i.has_field_link?{link_source:{type:"ct-select",label:(0,t.__)("Link Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,t.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:a,purpose:"default"},...i?.link_source&&""!==i.link_source?{has_field_link_new_tab:{type:"ct-switch",label:(0,t.__)("Open in new tab","blocksy-companion"),value:"no"},has_field_link_rel:{type:"text",label:(0,t.__)("Link Rel","blocksy-companion"),value:""}}:{}}:{}}:{},..."wp:author_avatar"!==i.field&&c(o)?{viewType:{type:"ct-radio",label:(0,t.__)("View Type","blocksy-companion"),value:i.viewType,design:"inline",purpose:"gutenberg",divider:"bottom:full",choices:{default:(0,t.__)("Image","blocksy-companion"),cover:(0,t.__)("Cover","blocksy-companion")}}}:{},..."wp:terms"===i.field&&y&&y.length>0?{taxonomy:{type:"ct-select",label:(0,t.__)("Taxonomy","blocksy-companion"),value:"",design:"inline",purpose:"default",choices:y.map(function({name:e,slug:t}){return{key:t,value:e}})}}:{},..."wp:term_image"===i.field?{imageSource:{type:"ct-radio",label:(0,t.__)("Image Source","blocksy-companion"),value:i.imageSource,design:"inline",purpose:"gutenberg",divider:"bottom",choices:{featured:(0,t.__)("Image","blocksy-companion"),icon:(0,t.__)("Icon/Logo","blocksy-companion")}}}:{},...p},value:{...i,...n&&n.has_taxonomies_customization?{has_taxonomies_customization:"yes"}:{}},hasRevertButton:!1}),c(o)&&"wp:author_avatar"!==i.field&&"wp:archive_image"!==i.field&&"default"===i.viewType&&(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t})},options:{lightbox_condition:{type:"ct-condition",condition:{has_field_link:"no"},options:{lightbox:{type:"ct-switch",label:(0,t.__)("Expand on click","blocksy-companion"),value:"no"}}},..."wp:featured_image"===i.field?{videoThumbnail:{type:"ct-switch",label:(0,t.__)("Video thumbnail","blocksy-companion"),value:"no"}}:{},has_image_caption:{type:"ct-switch",label:(0,t.__)("Show Caption","blocksy-companion"),value:"no"},image_hover_effect:{label:(0,t.__)("Image Hover Effect","blocksy-companion"),type:"ct-select",value:"none",view:"text",design:"inline",divider:"top:full",choices:{none:(0,t.__)("None","blocksy-companion"),"zoom-in":(0,t.__)("Zoom In","blocksy-companion"),"zoom-out":(0,t.__)("Zoom Out","blocksy-companion")}}},value:i,hasRevertButton:!1})),c(o)&&"wp:author_avatar"!==i.field&&(0,e.createElement)(React.Fragment,null,(0,e.createElement)(cn,{attributes:i,setAttributes:s,postId:g,postType:v}),(0,e.createElement)(ln,{clientId:m,attributes:i,setAttributes:s})),"wp:author_avatar"===i.field&&(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(l.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,t.__)("Image size","blocksy-companion"),onChange:function(e){return s({avatar_size:e})},min:5,max:500,initialPosition:i?.avatar_size,value:i?.avatar_size})),"woo:brands"===i.field&&(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(l.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,t.__)("Logo Size","blocksy-companion"),onChange:function(e){return s({brands_size:e})},min:5,max:500,initialPosition:i?.brands_size,value:i?.brands_size}),(0,e.createElement)(l.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,t.__)("Logo Gap","blocksy-companion"),onChange:function(e){return s({brands_gap:e})},min:5,max:500,initialPosition:i?.brands_gap,value:i?.brands_gap})),!c(o)&&"woo:brands"!==i.field&&(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t})},options:{before:{type:"text",label:(0,t.__)("Before","blocksy-companion"),value:""},after:{type:"text",label:(0,t.__)("After","blocksy-companion"),value:""},..."wp"!==o.provider||"wp"===o.provider&&("excerpt"===o.id||"terms"===o.id||"author"===o.id)?{fallback:{type:"text",label:(0,t.__)("Fallback","blocksy-companion"),value:(0,t.__)("Custom field fallback","blocksy-companion")}}:{},has_field_link_wrap_content_condition:{type:"ct-condition",condition:{has_field_link:"yes"},options:{has_field_link_wrap_content:{type:"ct-switch",label:(0,t.__)("Include Before/After in link","blocksy-companion"),value:"no"}}}},value:i,hasRevertButton:!1}))),(0,e.createElement)(r.InspectorControls,{group:"color",resetAllFilter:function(){const e=c(o)?"image":"text";"text"===e&&(M(),F(),V(),setTimeout(function(){const{link:e,...t}=i?.style?.elements,o={...i.style,elements:t};s({textColor:void 0,style:o})})),"image"===e&&setTimeout(function(){z("#000000")},50)}},(0,e.createElement)(_,{label:(0,t.__)("Colors","blocksy-companion"),panelId:m,settings:L,skipToolsPanel:!0,containerProps:{"data-field-type":c(o)?`image:${i.viewType}`:"text"}}),c(o)&&"default"!==i.viewType?(0,e.createElement)(l.__experimentalToolsPanelItem,{hasValue:function(){return void 0!==i.dimRatio&&50!==i.dimRatio},label:(0,t.__)("Overlay opacity"),onDeselect:function(){return s({dimRatio:50})},resetAllFilter:function(){return{dimRatio:50}},isShownByDefault:!0,panelId:m},(0,e.createElement)(l.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Overlay opacity"),value:i.dimRatio,onChange:function(e){return s({dimRatio:e})},min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})):null),"wp:terms"===i.field&&(0,e.createElement)(r.InspectorControls,{group:"advanced"},(0,e.createElement)(l.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,t.__)("Term additional class","blocksy-companion"),value:i.termClass,onChange:function(e){s({termClass:e})},help:(0,t.__)("Additional class for term items. Useful for styling.","blocksy-companion")}))):(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(R.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t}),"viewType"!==e||H||setTimeout(function(){z("#000000")},50),"viewType"!==e&&("field"!==e||c(t)&&"wp:author_avatar"!==i.field)||k(m,[],!1)},options:{field:{type:"ct-select",label:(0,t.__)("Content Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,t.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:d,purpose:"default"}},value:{...i},hasRevertButton:!1})))};var vn=function({clientId:t,attributes:o,setAttributes:n,context:r,name:l,__unstableParentLayout:a}){const{postType:i,taxonomy:s}=r,{fieldsDescriptor:c,linkFieldsChoices:u,options:p,fieldsChoices:d,fullDescriptorLoaded:m}=nn(r),f=oe(i),_=(0,e.useMemo)(function(){if(!o.field||!c)return null;const[e,t]=o.field.split(":"),n=c.fields.find(function({provider:t}){return t===e});if(!n)return null;const r=n.fields.find(function({id:e}){return e===t});return r?{...r,provider:n.provider}:null},[o.field,c]),b=(0,e.useMemo)(function(){if(!o.field||!c)return!1;const[e,t]=o.field.split(":");let n=c.fields.find(function({provider:t}){return t===e});if(n){return!n.fields.find(function({id:e}){return e===t})}if(!m)return!1;if(n=c.fields.find(function({provider:t}){return t===e}),!n)return!0;return!n.fields.find(function({id:e}){return e===t})},[o.field,_,m]);b&&console.warn("Field is missing:",o.field),(0,e.useEffect)(function(){"wp:title"===o.field&&s&&n({field:"wp:term_title"})},[s,o.field]);const y=en(r);return(0,e.createElement)(React.Fragment,null,(0,e.createElement)(Qo,{fieldDescriptor:_,attributes:o,setAttributes:n}),(0,e.createElement)(Ko,h({attributes:o,fieldsDescriptor:c,isFieldMissing:b,fieldDescriptor:_,fieldsContext:y},r)),(0,e.createElement)(gn,h({options:p,fieldDescriptor:_,attributes:o,setAttributes:n,fieldsChoices:d,clientId:t,fieldsDescriptor:c,linkFieldsChoices:u,taxonomies:f},r,{name:l,__unstableParentLayout:a})))},kn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/dynamic-data","category":"blocksy-blocks","attributes":{"tagName":{"type":"string","default":"div"},"field":{"type":"string","default":"wp:title"},"has_archive_prefix":{"type":"string","default":"no"},"has_field_link":{"type":"string","default":"no"},"has_field_link_wrap_content":{"type":"string","default":"no"},"link_source":{"type":"string","default":""},"before":{"type":"string","default":""},"after":{"type":"string","default":""},"fallback":{"type":"string","default":""},"align":{"type":"string"},"imageAlign":{"type":"string"},"aspectRatio":{"type":"string","default":"auto"},"imageFit":{"type":"string","default":"cover"},"width":{"type":"string"},"height":{"type":"string"},"sizeSlug":{"type":"string"},"alt_text":{"type":"string","default":""},"avatar_size":{"type":"number","default":96},"avatarIsLink":{"type":"boolean","default":false},"avatarLinkTarget":{"type":"string","default":"_self"},"featuredIsLink":{"type":"boolean","default":false},"featuredLinkTarget":{"type":"string","default":"_self"},"taxonomy":{"type":"string","default":""},"attribute":{"type":"string","default":""},"lightbox":{"type":"string","default":"no"},"videoThumbnail":{"type":"string","default":"no"},"has_image_caption":{"type":"string","default":"no"},"image_hover_effect":{"type":"string","default":"none"},"termClass":{"type":"string","default":""},"termAccentColor":{"type":"string","default":"yes"},"brands_size":{"type":"number","default":100},"brands_gap":{"type":"number","default":10},"imageSource":{"type":"string","default":"featured"},"viewType":{"type":"string","default":"default"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"dimRatio":{"type":"number","default":50},"style":{"type":"object","default":{"elements":{"overlay":{"color":{"background":"#000000"}}}}}},"supports":{"color":{"text":false,"background":false,"__experimentalSkipSerialization":["link","heading","button","gradients"]},"className":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}},"usesContext":["postId","postType","queryId","taxonomy","termId","termIcon","termImage","has_item_link"]}'),Cn=JSON.parse('{"u":{"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"allowedBlocks":{"type":"array"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"allowCustomContentAndWideSize":{"type":"boolean","default":true},"contentSize":{"type":"string","default":""},"wideSize":{"type":"string","default":""},"minimumHeight":{"type":"string","default":""}}}');const xn=(0,R.getColorsDefaults)({textColor:"",customTextColor:"",backgroundColor:"",customBackgroundColor:"",linkColor:"",customLinkColor:"",linkHoverColor:"",customLinkHoverColor:"",overlayColor:"",customOverlayColor:"#000000"}),wn=(0,R.getOptionsForBlock)("dynamic-data"),En=(0,R.getAttributesFromOptions)(wn);(0,n.registerBlockType)("blocksy/dynamic-data",{...kn,title:(0,t.__)("Dynamic Data","blocksy-companion"),description:(0,t.__)("Fetch and display content from various sources.","blocksy-companion"),attributes:{...kn.attributes,...Cn.u,...En,...xn},icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M17.9 10.5c-.1-.3-.4-.4-.7-.4h-3.7V4.6c0-.4-.2-.7-.6-.8h-.2c-.3 0-.5.1-.7.4l-5.7 8.6c-.2.3-.2.6 0 .8 0 .2.3.4.6.4h3.7v5.5c0 .4.2.7.6.8h.2c.3 0 .5-.1.7-.4l5.7-8.6c.2-.2.2-.6.1-.8zm-5.9 7v-4.4c0-.3-.3-.6-.6-.6H7.9l4.1-6v4.4c0 .3.3.6.6.6h3.5l-4.1 6z"}))},edit:function(t){return(0,e.createElement)(vn,t)},save:function(){return(0,e.createElement)(r.InnerBlocks.Content,null)},__experimentalLabel:function(e){return"wp:title"===e.field?(0,t.__)("Dynamic Title","blocksy-companion"):"wp:excerpt"===e.field?(0,t.__)("Dynamic Excerpt","blocksy-companion"):"wp:date"===e.field?(0,t.__)("Dynamic Post Date","blocksy-companion"):"wp:comments"===e.field?(0,t.__)("Dynamic Comments","blocksy-companion"):"wp:terms"===e.field?(0,t.__)("Dynamic Terms","blocksy-companion"):"wp:author"===e.field?(0,t.__)("Dynamic Author","blocksy-companion"):"wp:featured_image"===e.field?(0,t.__)("Dynamic Featured Image","blocksy-companion"):"wp:author_avatar"===e.field?(0,t.__)("Dynamic Author Avatar","blocksy-companion"):"woo:price"===e.field?(0,t.__)("Dynamic Price","blocksy-companion"):"woo:stock_status"===e.field?(0,t.__)("Dynamic Stock Status","blocksy-companion"):"woo:attributes"===e.field?(0,t.__)("Dynamic Attributes","blocksy-companion"):"woo:brands"===e.field?(0,t.__)("Dynamic Brands","blocksy-companion"):"woo:sku"===e.field?(0,t.__)("Dynamic SKU","blocksy-companion"):"woo:rating"===e.field?(0,t.__)("Dynamic Rating","blocksy-companion"):"wp:term_title"===e.field?(0,t.__)("Dynamic Term Title","blocksy-companion"):"wp:term_description"===e.field?(0,t.__)("Dynamic Term Description","blocksy-companion"):"wp:term_count"===e.field?(0,t.__)("Dynamic Term Count","blocksy-companion"):"wp:term_image"===e.field?(0,t.__)("Dynamic Term Image","blocksy-companion"):"wp:archive_image"===e.field?(0,t.__)("Dynamic Archive Image","blocksy-companion"):"wp:archive_title"===e.field?(0,t.__)("Dynamic Archive Title","blocksy-companion"):"wp:archive_description"===e.field?(0,t.__)("Dynamic Archive Description","blocksy-companion"):(0,t.__)("Dynamic Data","blocksy-companion")}});const Sn={inputFontColor:"",customInputFontColor:"",inputFontColorFocus:"",customInputFontColorFocus:"",inputIconColor:"",customInputIconColor:"",inputIconColorFocus:"",customInputIconColorFocus:"",inputBorderColor:"",customInputBorderColor:"",inputBorderColorFocus:"",customInputBorderColorFocus:"",inputBackgroundColor:"",customInputBackgroundColor:"",inputBackgroundColorFocus:"",customInputBackgroundColorFocus:"",buttonBackgroundColor:"",customButtonBackgroundColor:"",buttonBackgroundColorHover:"",customButtonBackgroundColorHover:"",dropdownTextInitialColor:"",customDropdownTextInitialColor:"",dropdownTextHoverColor:"",customDropdownTextHoverColor:"",dropdownBackgroundColor:"",customDropdownBackgroundColor:"",shadowColor:"",customShadowColor:""},In=Ye(Sn),Tn={enable_live_results:"no",live_results_images:"yes",searchBoxHeight:"",searchProductPrice:"no",searchProductStatus:"no",search_box_placeholder:(0,t.__)("Search","blocksy-companion"),taxonomy_filter_label:(0,t.__)("Select category","blocksy-companion"),search_through:{post:!0,page:!0,product:!0,custom:!0},taxonomy_filter_visibility:{desktop:!0,tablet:!0,mobile:!1},...Sn},An=function(e){e&&e.style.removeProperty("white-space")};var Bn=function({attributes:t,setAttributes:o,buttonStyles:n}){const{search_box_button_text:a,search_box_placeholder:i,taxonomy_filter_label:s,buttonPosition:c,has_taxonomy_filter:u,buttonUseText:p,taxonomy_filter_visibility:d}=t,m="yes"===u,f="outside"===c&&m,h="yes"===p?"text":"inside"===c?"minimal:icon":"icon",_=(0,e.createElement)("input",{type:"search",value:i,onChange:function(e){o({search_box_placeholder:e.target.value})},placeholder:"Search",name:"s",autoComplete:"off",title:"Search for...","aria-label":"Search for..."}),b=m?(0,e.createElement)("div",{className:F()("ct-fake-select","ct-select-taxonomy",{"ct-hidden-lg":!d.desktop,"ct-hidden-md":!d.tablet,"ct-hidden-sm":!d.mobile})},(0,e.createElement)(r.RichText,{tagName:"span",ref:An,value:s,placeholder:"Select Category",allowedFormats:[],onChange:function(e){return o({taxonomy_filter_label:e})}})):null,y=(0,e.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector('[type="search"]');o&&o.setAttribute("placeholder",i);return t.querySelector(".ct-search-box").style="",t.innerHTML},[i,c,n]),{isLoading:g}=Je("search",{...t,...Tn},y);return g?(0,e.createElement)(l.Spinner,null):(0,e.createElement)("form",{role:"search",method:"get",onSubmit:function(e){e.preventDefault()},className:"ct-search-form","data-form-controls":c,"data-taxonomy-filter":"yes"===u?"true":"false","data-submit-button":h},(0,e.createElement)("div",{className:F()("ct-search-form-inner",{"ct-pseudo-input":"inside"===c})},f?(0,e.createElement)("div",{className:"ct-pseudo-input"},_,b):(0,e.createElement)(React.Fragment,null,_,b),(0,e.createElement)("div",{className:"wp-element-button","aria-label":"Search button",style:n},"yes"===p?(0,e.createElement)(r.RichText,{tagName:"span",identifier:"search_box_button_text",ref:An,value:a,placeholder:"Search",disableLineBreaks:!0,allowedFormats:[],onChange:function(e){return o({search_box_button_text:e})}}):(0,e.createElement)("svg",{className:"ct-icon ct-search-button-content","aria-hidden":"true",width:"15",height:"15",viewBox:"0 0 15 15"},(0,e.createElement)("path",{d:"M14.8,13.7L12,11c0.9-1.2,1.5-2.6,1.5-4.2c0-3.7-3-6.8-6.8-6.8S0,3,0,6.8s3,6.8,6.8,6.8c1.6,0,3.1-0.6,4.2-1.5l2.8,2.8c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2C15.1,14.5,15.1,14,14.8,13.7z M1.5,6.8c0-2.9,2.4-5.2,5.2-5.2S12,3.9,12,6.8S9.6,12,6.8,12S1.5,9.6,1.5,6.8z"})),(0,e.createElement)("span",{className:"ct-ajax-loader"},(0,e.createElement)("svg",{viewBox:"0 0 24 24"},(0,e.createElement)("circle",{cx:"12",cy:"12",r:"10",opacity:"0.2",fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"}),(0,e.createElement)("path",{d:"m12,2c5.52,0,10,4.48,10,10",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2"},(0,e.createElement)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"0.6s",from:"0 12 12",to:"360 12 12",repeatCount:"indefinite"})))))))};const Pn=(0,e.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(l.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,e.createElement)(l.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),Hn=(0,e.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(l.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,e.createElement)(l.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"})),Nn=function(e){if(!e)return"";if("string"==typeof e)return e;const t=e.topLeft||"0px",o=e.topRight||"0px",n=e.bottomRight||"0px",r=e.bottomLeft||"0px";return t===o&&t===n&&t===r?t:`${t} ${o} ${n} ${r}`};var Dn=(0,r.withColors)({textColor:"color"},{inputFontColor:"color"},{inputFontColorFocus:"color"},{inputIconColor:"color"},{inputIconColorFocus:"color"},{inputBorderColor:"color"},{inputBorderColorFocus:"color"},{inputBackgroundColor:"color"},{inputBackgroundColorFocus:"color"},{buttonBackgroundColor:"color"},{buttonBackgroundColorHover:"color"},{dropdownTextInitialColor:"color"},{dropdownTextHoverColor:"color"},{dropdownBackgroundColor:"color"},{shadowColor:"color"})(function({attributes:o,setAttributes:n,clientId:a,className:i,inputFontColor:s,setInputFontColor:c,inputFontColorFocus:u,setInputFontColorFocus:p,inputIconColor:d,setInputIconColor:m,inputIconColorFocus:f,setInputIconColorFocus:h,inputBorderColor:b,setInputBorderColor:y,inputBorderColorFocus:g,setInputBorderColorFocus:v,inputBackgroundColor:k,setInputBackgroundColor:C,inputBackgroundColorFocus:x,setInputBackgroundColorFocus:w,buttonBackgroundColor:E,setButtonBackgroundColor:S,buttonBackgroundColorHover:I,setButtonBackgroundColorHover:T,dropdownTextInitialColor:A,setDropdownTextInitialColor:B,dropdownTextHoverColor:P,setDropdownTextHoverColor:H,dropdownBackgroundColor:N,setDropdownBackgroundColor:D,shadowColor:R,setShadowColor:z}){const{buttonUseText:O="no",buttonPosition:M,enable_live_results:F}=o,V=o?.style?.border?.radius,L=(0,e.useRef)(),j=(0,r.useBlockProps)({ref:L,className:{"ct-search-box":!0,className:i},style:{"--theme-form-text-initial-color":s?.color,"--theme-form-text-focus-color":u?.color,"--theme-form-field-border-initial-color":b?.color,"--theme-form-field-border-focus-color":g?.color,"--theme-form-field-background-initial-color":k?.color,"--theme-form-field-background-focus-color":x?.color,...V?{"--theme-form-field-border-radius":Nn(V)}:{},...o?.searchBoxHeight?{"--theme-form-field-height":`${o.searchBoxHeight}px`}:{},..."yes"===F?{"--theme-link-initial-color":A?.color,"--theme-link-hover-color":P?.color,"--search-dropdown-background":N?.color,"--search-dropdown-box-shadow-color":R?.color}:{}}});return(0,e.createElement)("div",j,(0,e.createElement)(Bn,{blockProps:j,attributes:o,setAttributes:n,buttonStyles:{...d?.color?{"--theme-button-text-initial-color":d.color}:{},...f?.color?{"--theme-button-text-hover-color":f.color}:{},..."inside"!==M||"yes"===O?{...E?.color?{"--theme-button-background-initial-color":E.color}:{},...I?.color?{"--theme-button-background-hover-color":I.color}:{}}:{}}}),(0,e.createElement)(nt,{attributes:o,setAttributes:n,options:Rn}),(0,e.createElement)(r.BlockControls,null,(0,e.createElement)(l.ToolbarGroup,null,(0,e.createElement)(l.ToolbarButton,{title:(0,t.__)("Button Outside"),icon:Pn,onClick:function(){n({buttonPosition:"outside"===M?"inside":"outside"})},className:"outside"===M?"is-pressed":void 0}),(0,e.createElement)(l.ToolbarButton,{title:(0,t.__)("Use button with text"),icon:Hn,onClick:function(){n({buttonUseText:"no"===O?"yes":"no"})},className:"yes"===O?"is-pressed":void 0}))),(0,e.createElement)(r.InspectorControls,{group:"styles"},(0,e.createElement)("div",{className:"blocksy-options-hide-border-unlink"}),(0,e.createElement)(_,{label:(0,t.__)("Input Font Color","blocksy-companion"),resetAll:function(){c(Sn.inputFontColor),p(Sn.inputFontColorFocus)},panelId:a,settings:[{colorValue:s.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return c(e||Sn.inputFontColor)}},{colorValue:u.color,label:(0,t.__)("Focus","blocksy-companion"),onColorChange:function(e){return p(e||Sn.inputFontColorFocus)}}]}),(0,e.createElement)(_,{label:(0,t.__)("Input Border Color","blocksy-companion"),resetAll:function(){y(Sn.inputBorderColor),v(Sn.inputBorderColorFocus)},panelId:a,settings:[{colorValue:b.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return y(e||Sn.inputBorderColor)}},{colorValue:g.color,label:(0,t.__)("Focus","blocksy-companion"),onColorChange:function(e){return v(e||Sn.inputBorderColorFocus)}}]}),(0,e.createElement)(_,{label:(0,t.__)("Input Background Color","blocksy-companion"),resetAll:function(){C(Sn.inputBackgroundColor),w(Sn.inputBackgroundColorFocus)},panelId:a,settings:[{colorValue:k.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return C(e||Sn.inputBackgroundColor)}},{colorValue:x.color,label:(0,t.__)("Focus","blocksy-companion"),onColorChange:function(e){return w(e||Sn.inputBackgroundColorFocus)}}]}),(0,e.createElement)(_,{label:"yes"===O?(0,t.__)("Button Text Color","blocksy-companion"):(0,t.__)("Button Icon Color","blocksy-companion"),resetAll:function(){m(Sn.inputIconColor),h(Sn.inputIconColorFocus)},panelId:a,settings:[{colorValue:d.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return m(e||Sn.inputIconColor)}},{colorValue:f.color,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return h(e||Sn.inputIconColorFocus)}}]}),"inside"!==M||"yes"===O?(0,e.createElement)(_,{label:(0,t.__)("Button Background Color","blocksy-companion"),resetAll:function(){S(Sn.buttonBackgroundColor),T(Sn.buttonBackgroundColorHover)},panelId:a,settings:[{colorValue:E.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return S(e||Sn.buttonBackgroundColor)}},{colorValue:I.color,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return T(e||Sn.buttonBackgroundColorHover)}}]}):null,"yes"===F?(0,e.createElement)(React.Fragment,null,(0,e.createElement)(_,{label:(0,t.__)("Dropdown Text Color","blocksy-companion"),resetAll:function(){B(Sn.dropdownTextInitialColor),H(Sn.dropdownTextHoverColor)},panelId:a,settings:[{colorValue:A.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return B(e||Sn.dropdownTextInitialColor)}},{colorValue:P.color,label:(0,t.__)("Hover","blocksy-companion"),onColorChange:function(e){return H(e||Sn.dropdownTextHoverColor)}}]}),(0,e.createElement)(_,{label:(0,t.__)("Dropdown Background Color","blocksy-companion"),resetAll:function(){D(Sn.dropdownBackgroundColor)},panelId:a,settings:[{colorValue:N.color,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return D(e||Sn.dropdownBackgroundColor)}}]}),(0,e.createElement)(_,{label:(0,t.__)("Dropdown Shadow Color","blocksy-companion"),resetAll:function(){z(Sn.shadowColor)},panelId:a,settings:[{colorValue:R.color,enableAlpha:!0,label:(0,t.__)("Initial","blocksy-companion"),onColorChange:function(e){return z(e||Sn.shadowColor)}}]})):null))});const Rn=(0,R.getOptionsForBlock)("search"),zn=(0,R.getAttributesFromOptions)(Rn);(0,n.registerBlockType)("blocksy/search",{apiVersion:3,title:(0,t.__)("Advanced Search","blocksy-companion"),description:(0,t.__)("Quickly find specific content on your site.","blocksy-companion"),icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,e.createElement)("path",{d:"m19.7 18.5-3-2.9c1-1.3 1.6-2.8 1.6-4.5 0-3.9-3.2-7.2-7.2-7.2S4 7.2 4 11.2s3.2 7.2 7.2 7.2c1.7 0 3.3-.6 4.5-1.6l3 3c.1.1.3.2.5.2s.4-.1.5-.2c.3-.4.3-1 0-1.3zM5.6 11.2c0-3.1 2.5-5.5 5.5-5.5s5.6 2.4 5.6 5.5-2.5 5.5-5.5 5.5-5.6-2.5-5.6-5.5z"}))},category:"blocksy-blocks",attributes:{...zn,...In},supports:{spacing:{margin:!0,__experimentalDefaultControls:{margin:!0}},__experimentalBorder:{color:!1,radius:!0,width:!1,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!1,radius:!0,width:!1}}},edit:function(t){return(0,e.createElement)(Dn,t)},save:function(){return(0,e.createElement)("div",null,"Blocksy: Search Block")}})}()}();