From 672069cf762025ca1db437b000e2ad787d2db0e1 Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Sat, 29 Jul 2023 17:58:24 -0500 Subject: [PATCH] Fresh build. --- build/block.json | 16 +++++++++++++--- build/index.asset.php | 2 +- build/index.js | 12 ++++++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/build/block.json b/build/block.json index 16bba8b..5743c93 100644 --- a/build/block.json +++ b/build/block.json @@ -1,5 +1,5 @@ { - "apiVersion": 2, + "apiVersion": 3, "name": "outermost/icon-block", "title": "Icon", "category": "media", @@ -95,11 +95,21 @@ "style": true, "width": true, "__experimentalSelector": ".icon-container", - "__experimentalSkipSerialization": true + "__experimentalSkipSerialization": true, + "__experimentalDefaultControls": { + "color": false, + "radius": false, + "style": false, + "width": false + } }, "spacing": { "padding": true, - "margin": true + "margin": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } } }, "textdomain": "icon-block", diff --git a/build/index.asset.php b/build/index.asset.php index 7efc333..75f692c 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => 'b0d367dd132e0e033c0f'); + array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => '8f8d78f703c7d02e1222'); diff --git a/build/index.js b/build/index.js index 40e3022..ad312fe 100644 --- a/build/index.js +++ b/build/index.js @@ -1,11 +1,11 @@ -(()=>{var e={184:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;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},915:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var c=Object.getOwnPropertyDescriptor(t,o);c&&!("get"in c?!t.__esModule:c.writable||c.configurable)||(c={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,c)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),c=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(960),i=o(790);c(o(790),t);var r=/\s+/g,a={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,o){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(o=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=o?o:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.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 i.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,o=this.lastNode;if(o&&o.type===l.ElementType.Text)t?o.data=(o.data+e).replace(r," "):o.data+=e,this.options.withEndIndices&&(o.endIndex=this.parser.endIndex);else{t&&(e=e.replace(r," "));var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===l.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.NodeWithChildren(l.ElementType.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 i.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},790:function(e,t,o){"use strict";var n,c=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 __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),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}(a);t.NodeWithChildren=d;var w=function(e){function t(t){return e.call(this,i.ElementType.Root,t)||this}return c(t,e),t}(d);t.Document=w;var p=function(e){function t(t,o,n,c){void 0===n&&(n=[]),void 0===c&&(c="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var l=e.call(this,c,n)||this;return l.name=t,l.attribs=o,l}return c(t,e),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 g(e){return(0,i.isTag)(e)}function u(e){return e.type===i.ElementType.CDATA}function E(e){return e.type===i.ElementType.Text}function V(e){return e.type===i.ElementType.Comment}function b(e){return e.type===i.ElementType.Directive}function f(e){return e.type===i.ElementType.Root}function z(e,t){var o;if(void 0===t&&(t=!1),E(e))o=new m(e.data);else if(V(e))o=new h(e.data);else if(g(e)){var n=t?x(e.children):[],c=new p(e.name,l({},e.attribs),n);n.forEach((function(e){return e.parent=c})),null!=e.namespace&&(c.namespace=e.namespace),e["x-attribsNamespace"]&&(c["x-attribsNamespace"]=l({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(c["x-attribsPrefix"]=l({},e["x-attribsPrefix"])),o=c}else if(u(e)){n=t?x(e.children):[];var r=new d(i.ElementType.CDATA,n);n.forEach((function(e){return e.parent=r})),o=r}else if(f(e)){n=t?x(e.children):[];var a=new w(n);n.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),o=a}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new v(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 z(e,!0)})),o=1;o{e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},276:(e,t,o)=>{var n="html",c="head",l="body",i=/<([a-zA-Z]+[0-9]?)/,r=//i,a=//i,s=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},m=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var h=new window.DOMParser;s=m=function(e,t){return t&&(e="<"+t+">"+e+""),h.parseFromString(e,"text/html")}}if(document.implementation){var v=o(507).isIE,d=document.implementation.createHTMLDocument(v()?"html-dom-parser":void 0);s=function(e,t){return t?(d.documentElement.getElementsByTagName(t)[0].innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var w,p=document.createElement("template");p.content&&(w=function(e){return p.innerHTML=e,p.content.childNodes}),e.exports=function(e){var t,o,h,v,d=e.match(i);switch(d&&d[1]&&(t=d[1].toLowerCase()),t){case n:return o=m(e),r.test(e)||(h=o.getElementsByTagName(c)[0])&&h.parentNode.removeChild(h),a.test(e)||(h=o.getElementsByTagName(l)[0])&&h.parentNode.removeChild(h),o.getElementsByTagName(n);case c:case l:return v=s(e).getElementsByTagName(t),a.test(e)&&r.test(e)?v[0].parentNode.childNodes:v;default:return w?w(e):s(e,l).getElementsByTagName(l)[0].childNodes}}},152:(e,t,o)=>{var n=o(276),c=o(507).formatDOM,l=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,o=e.match(l);return o&&o[1]&&(t=o[1]),c(n(e),null,t)}},507:(e,t,o)=>{for(var n,c=o(885),l=o(790),i=c.CASE_SENSITIVE_TAG_NAMES,r=l.Comment,a=l.Element,s=l.ProcessingInstruction,m=l.Text,h={},v=0,d=i.length;v{var n=o(670),c=o(484),l=o(152);l="function"==typeof l.default?l.default:l;var i={lowerCaseAttributeNames:!1};function r(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(l(e,(t=t||{}).htmlparser2||i),t)}r.domToReact=n,r.htmlToDOM=l,r.attributesToProps=c,r.Element=o(915).Element,e.exports=r,e.exports.default=r},484:(e,t,o)=>{var n=o(726),c=o(606);function l(e){return n.possibleStandardNames[e]}e.exports=function(e){var t,o,i,r,a,s={},m=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(i=e[t],n.isCustomAttribute(t))s[t]=i;else if(r=l(o=t.toLowerCase()))switch(a=n.getPropertyInfo(r),"checked"!==r&&"value"!==r||m||(r=l("default"+o)),s[r]=i,a&&a.type){case n.BOOLEAN:s[r]=!0;break;case n.OVERLOADED_BOOLEAN:""===i&&(s[r]=!0)}else c.PRESERVE_CUSTOM_ATTRIBUTES&&(s[t]=i);return c.setStyleProp(e.style,s),s}},670:(e,t,o)=>{var n=o(196),c=o(484),l=o(606),i=l.setStyleProp,r=l.canTextBeChildOfNode;function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&l.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,o){for(var l,s,m,h,v,d=(o=o||{}).library||n,w=d.cloneElement,p=d.createElement,g=d.isValidElement,u=[],E="function"==typeof o.replace,V=o.trim,b=0,f=t.length;b1&&(m=w(m,{key:m.key||b})),u.push(m);else if("text"!==l.type){switch(h=l.attribs,a(l)?i(h.style,h):h&&(h=c(h)),v=null,l.type){case"script":case"style":l.children[0]&&(h.dangerouslySetInnerHTML={__html:l.children[0].data});break;case"tag":"textarea"===l.name&&l.children[0]?h.defaultValue=l.children[0].data:l.children&&l.children.length&&(v=e(l.children,o));break;default:continue}f>1&&(h.key=b),u.push(p(l.name,h,v))}else{if((s=!l.data.trim().length)&&l.parent&&!r(l.parent))continue;if(V&&s)continue;u.push(l.data)}return 1===u.length?u[0]:u}},606:(e,t,o)=>{var n=o(196),c=o(476).default,l={reactCompat:!0},i=n.version.split(".")[0]>=16,r=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:i,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var o,n,c="function"==typeof t,l={},i={};for(o in e)n=e[o],c&&(l=t(o,n))&&2===l.length?i[l[0]]=l[1]:"string"==typeof n&&(i[n]=o);return i},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=c(e,l)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!r.has(e.name)},elementsWithNoTextChildren:r}},139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,c=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,r=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function m(e){return e?e.replace(a,s):s}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var h=1,v=1;function d(e){var t=e.match(o);t&&(h+=t.length);var n=e.lastIndexOf("\n");v=~n?e.length-n:v+e.length}function w(){var e={line:h,column:v};return function(t){return t.position=new p(e),V(),t}}function p(e){this.start=e,this.end={line:h,column:v},this.source=a.source}p.prototype.content=e;var g=[];function u(t){var o=new Error(a.source+":"+h+":"+v+": "+t);if(o.reason=t,o.filename=a.source,o.line=h,o.column=v,o.source=e,!a.silent)throw o;g.push(o)}function E(t){var o=t.exec(e);if(o){var n=o[0];return d(n),e=e.slice(n.length),o}}function V(){E(n)}function b(e){var t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){var t=w();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;s!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,s===e.charAt(o-1))return u("End of comment missing");var n=e.slice(2,o-2);return v+=2,d(n),e=e.slice(o),v+=2,t({type:"comment",comment:n})}}function z(){var e=w(),o=E(c);if(o){if(f(),!E(l))return u("property missing ':'");var n=E(i),a=e({type:"declaration",property:m(o[0].replace(t,s)),value:n?m(n[0].replace(t,s)):s});return E(r),a}}return V(),function(){var e,t=[];for(b(t);e=z();)!1!==e&&(t.push(e),b(t));return t}()}},726:(e,t,o)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o{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}},476:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var c=n(o(848)),l=o(678);t.default=function(e,t){var o={};return e&&"string"==typeof e?((0,c.default)(e,(function(e,n){e&&n&&(o[(0,l.camelCase)(e,t)]=n)})),o):o}},678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var o=/^--[a-zA-Z0-9-]+$/,n=/-([a-z])/g,c=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,r=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||c.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,a):e.replace(l,a)).replace(n,r))}},848:(e,t,o)=>{var n=o(139);e.exports=function(e,t){var o,c=null;if(!e||"string"!=typeof e)return c;for(var l,i,r=n(e),a="function"==typeof t,s=0,m=r.length;s{"use strict";e.exports=window.React}},t={};function o(n){var c=t[n];if(void 0!==c)return c.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks;function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const o=e?.type,n=e?.icons;(0,i.isEmpty)(n)||(n.forEach((e=>{e.name.includes(o+"-")||(e.name=o+"-"+e.name),e.type=o})),n.sort((function(e,t){return e.name.localeCompare(t.name)})),t=t.concat(n))})),t}var Gi=o(488),Ti=Gi.domToReact,Ri=(Gi.htmlToDOM,Gi.attributesToProps);Gi.Element;const Ai=Gi;function Ni(e){const o=e.trim(),c={trim:!0,replace:e=>{let{attribs:o,children:l,name:i,parent:r,type:a}=e;if("tag"!==a||!r&&"svg"!==i||!i)return(0,n.createElement)(n.Fragment,null);const s=`${i}`;return(0,n.createElement)(s,t({},o,{style:Ii(o?.style)}),Ti(l,c))}};return Ai(o,c)}function Ii(e){let t={};return"string"==typeof e&&(t=e.split(";").reduce(((e,t)=>{const o=t.indexOf(":");if(-1===o)return e;const n=t.substr(0,o).trim().replace(/^-ms-/,"ms-").replace(/-./g,(e=>e.substr(1).toUpperCase())),c=t.substr(o+1).trim();return c?{...e,[n]:c}:e}),{})),t}const Fi={borderColor:void 0,borderRadius:void 0,borderStyle:void 0,borderWidth:void 0,borderBottomColor:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderBottomStyle:void 0,borderBottomWidth:void 0,borderLeftColor:void 0,borderLeftStyle:void 0,borderLeftWidth:void 0,borderRightColor:void 0,borderRightStyle:void 0,borderRightWidth:void 0,borderTopColor:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderTopStyle:void 0,borderTopWidth:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0,paddingBottom:void 0,paddingLeft:void 0,paddingRight:void 0,paddingTop:void 0},Oi={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},label:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:"number"},percentWidth:{type:"number"}},supports:{align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},spacing:{padding:!0,margin:!0}},save(e){var t,o,c,r,s,m;let{attributes:h}=e;const{borderColor:v,icon:d,iconName:w,style:p,iconBackgroundColor:g,iconBackgroundColorValue:u,iconColorValue:E,gradient:V,customGradient:b,itemsJustification:f,label:z,linkUrl:x,linkRel:_,linkTarget:k,rotate:C,flipHorizontal:M,flipVertical:y,width:H,percentWidth:S}=h;if(!d&&!w)return null;const L=Bi(Pi()).filter((e=>e.name===w));let P="";if(d&&(0,i.isEmpty)(L)?(P=Ni(d),(0,i.isEmpty)(P?.props)&&(P="")):(P=L[0]?.icon,"string"==typeof P&&(P=Ni(P))),!P)return null;z&&(P={...P,props:{...P.props,"aria-label":z}});const B=l()("icon-container",{"has-icon-color":E,"has-background-color":u||g||V||b,[`has-${g}-background-color`]:g,[`has-${V}-gradient-background`]:V,[`rotate-${C}`]:C,"flip-horizontal":M,"flip-vertical":y}),G=(0,i.isEmpty)(_)?void 0:_,T=(0,i.isEmpty)(k)?void 0:k;let R=H?`${H}px`:"48px";S&&(R=`${S}%`);let A=null!==(t=p?.spacing?.margin)&&void 0!==t?t:void 0,N=null!==(o=p?.spacing?.padding)&&void 0!==o?o:void 0;var I,F,O,D,Z,U,j,$;N&&(N=`${null!==(I=N?.top)&&void 0!==I?I:0} ${null!==(F=N?.right)&&void 0!==F?F:0} ${null!==(O=N?.bottom)&&void 0!==O?O:0} ${null!==(D=N?.left)&&void 0!==D?D:0}`),A&&(A=`${null!==(Z=A?.top)&&void 0!==Z?Z:0} ${null!==(U=A?.right)&&void 0!==U?U:0} ${null!==(j=A?.bottom)&&void 0!==j?j:0} ${null!==($=A?.left)&&void 0!==$?$:0}`);const q={background:V?void 0:b,backgroundColor:g?void 0:u,borderColor:v?`var(--wp--preset--color--${v})`:null!==(c=p?.border?.color)&&void 0!==c?c:void 0,borderRadius:null!==(r=p?.border?.radius)&&void 0!==r?r:void 0,borderStyle:null!==(s=p?.border?.style)&&void 0!==s?s:void 0,borderWidth:null!==(m=p?.border?.width)&&void 0!==m?m:void 0,color:E,padding:N,width:R},W=(0,n.createElement)(n.Fragment,null,x?(0,n.createElement)("a",{className:B,href:x,target:T,rel:G,style:q,"aria-label":z},P):(0,n.createElement)("div",{className:B,style:q},P));return(0,n.createElement)("div",a.useBlockProps.save({className:`items-justified-${f}`,style:{...Fi,margin:A}}),W)}},Di={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},hasNoIconFill:{type:"boolean"},label:{type:"string"},title:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:"number"},percentWidth:{type:"number"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSelector:".icon-container",__experimentalSkipSerialization:!0},spacing:{padding:!0,margin:!0}},save(e){let{attributes:o}=e;const{customGradient:c,flipHorizontal:r,flipVertical:s,gradient:m,hasNoIconFill:h,icon:v,iconBackgroundColor:d,iconBackgroundColorValue:w,iconColorValue:p,iconName:g,itemsJustification:u,label:E,linkRel:V,linkTarget:b,linkUrl:f,percentWidth:z,rotate:x,title:_,width:k}=o;if(!v&&!g)return null;const C=Bi(Pi()).filter((e=>e.name===g));let M="";if(v&&(0,i.isEmpty)(C)?(M=Ni(v),(0,i.isEmpty)(M?.props)&&(M="")):(M=C[0]?.icon,"string"==typeof M&&(M=Ni(M))),!M)return null;E&&(M={...M,props:{...M.props,"aria-label":E}});const y=a.useBlockProps.save(),H=(0,a.__experimentalGetBorderClassesAndStyles)(o),S=l()("icon-container",H?.className,{"has-icon-color":p,"has-icon-background-color":w||d||m||c,"has-no-icon-fill-color":h,[`has-${d}-background-color`]:d,[`has-${m}-gradient-background`]:m,[`rotate-${x}`]:x,"flip-horizontal":r,"flip-vertical":s});let L=k?`${k}px`:"48px";z&&(L=`${z}%`);const P={background:m?void 0:c,backgroundColor:d?void 0:w,color:p,width:L,...y.style,...H.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},B=a.useBlockProps.save()?.style,G={marginBottom:B?.marginBottom,marginLeft:B?.marginLeft,marginRight:B?.marginRight,marginTop:B?.marginTop},T=(0,i.isEmpty)(V)?void 0:V,R=(0,i.isEmpty)(b)?void 0:b,A=(0,n.createElement)(n.Fragment,null,f?(0,n.createElement)("a",{className:S,href:f,target:R,rel:T,style:P,"aria-label":E},M):(0,n.createElement)("div",{className:S,style:P},M));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:u&&`items-justified-${u}`,style:{...Fi,...G}}),{title:_}),A)}},Zi={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},hasNoIconFill:{type:"boolean"},label:{type:"string"},title:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:["string","number"]},height:{type:"string"},percentWidth:{type:"number"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSelector:".icon-container",__experimentalSkipSerialization:!0},spacing:{padding:!0,margin:!0}},save(e){let{attributes:o}=e;const{customGradient:c,flipHorizontal:s,flipVertical:m,gradient:h,hasNoIconFill:v,icon:d,iconBackgroundColor:w,iconBackgroundColorValue:p,iconColor:g,iconColorValue:u,iconName:E,itemsJustification:V,label:b,linkRel:f,linkTarget:z,linkUrl:x,rotate:_,title:k,width:C,height:M}=o;if(!d&&!E)return null;const y=Bi(Pi()).filter((e=>e.name===E));let H="";if(d&&(0,i.isEmpty)(y)?(H=Ni(d),(0,i.isEmpty)(H?.props)&&(H="")):(H=y[0]?.icon,"string"==typeof H&&(H=Ni(H))),!H)return null;b&&(H={...H,props:{...H.props,"aria-label":b}});const S=a.useBlockProps.save(),L=(0,a.__experimentalGetBorderClassesAndStyles)(o),P=l()("icon-container",L?.className,{"has-icon-color":u,"has-no-icon-fill-color":v,"has-icon-background-color":p||w||h||c,[`has-${w}-background-color`]:w,[`has-${g}-color`]:g,[`has-${h}-gradient-background`]:h,[`rotate-${_}`]:_,"flip-horizontal":s,"flip-vertical":m}),[B,G]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(C);let T=M?void 0:"48px";B&&(T=G?`${B}${G}`:`${B}px`);const R={background:h?void 0:c,backgroundColor:p,color:u,width:T,height:M||void 0,...S.style,...L.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},A=a.useBlockProps.save()?.style,N={marginBottom:A?.marginBottom,marginLeft:A?.marginLeft,marginRight:A?.marginRight,marginTop:A?.marginTop},I=(0,i.isEmpty)(f)?void 0:f,F=(0,i.isEmpty)(z)?void 0:z,O=(0,n.createElement)(n.Fragment,null,x?(0,n.createElement)("a",{className:P,href:x,target:F,rel:I,style:R,"aria-label":b},H):(0,n.createElement)("div",{className:P,style:R},H));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:V&&`items-justified-${V}`,style:{...Fi,...N}}),{title:k}),O)}},Ui=[Zi,Di,Oi],ji=window.wp.data,$i=window.wp.keycodes,qi=window.wp.a11y;function Wi(e){const{label:t,options:o,activeOptions:c,setAttributes:l,attributes:i}=e,a=o.filter((e=>e.isDefault));a.forEach((e=>{e.hasEdits=i.hasOwnProperty(e.attributeSlug)&&void 0!==i[e.attributeSlug]}));const m=o.filter((e=>!e.isDefault));function h(e,t){"reset"===t?l({[e.attributeSlug]:void 0}):e.isActive?l({[e.attributeSlug]:void 0}):l({[e.attributeSlug]:""})}const v=[...a,...m].some((e=>e.isActive&&!e.isDefault||e.isDefault&&e.hasEdits)),d=(0,n.createElement)(r.DropdownMenu,{className:"options-dropdown",icon:0===c.length?ic:Fn,label:(0,s.__)("Setting options","icon-block"),popoverProps:{className:"options-panel__option-popover",focusOnMount:"container"},toggleProps:{isSmall:!0}},(()=>(0,n.createElement)(n.Fragment,null,0!==a.length&&(0,n.createElement)(r.MenuGroup,{label:(0,s.__)("Defaults","icon-block")},a.map(((e,t)=>(0,n.createElement)(Ji,{key:t,option:e,toggleOptions:h})))),(0,n.createElement)(r.MenuGroup,{label:(0,s.__)("Options","icon-block")},m.map(((e,t)=>(0,n.createElement)(Qi,{key:t,option:e,toggleOptions:h})))),(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{"aria-disabled":!v,onClick:()=>{v&&o.forEach((e=>{l({[e.attributeSlug]:void 0})}))},variant:"tertiary"},(0,s.__)("Reset all","icon-block"))))));return(0,n.createElement)("div",{className:"options-panel-header"},(0,n.createElement)("h2",null,t),(0,n.createElement)("div",{className:"options-panel-header__dropdown-menus"},d))}function Qi(e){const{option:t,toggleOptions:o}=e;return(0,n.createElement)(r.MenuItem,{key:t.attributeSlug,icon:t.isActive&&ue,label:(0,s.sprintf)( +(()=>{var e={184:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;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},915:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var c=Object.getOwnPropertyDescriptor(t,o);c&&!("get"in c?!t.__esModule:c.writable||c.configurable)||(c={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,c)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),c=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(960),i=o(790);c(o(790),t);var r=/\s+/g,a={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,o){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(o=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=o?o:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.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 i.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,o=this.lastNode;if(o&&o.type===l.ElementType.Text)t?o.data=(o.data+e).replace(r," "):o.data+=e,this.options.withEndIndices&&(o.endIndex=this.parser.endIndex);else{t&&(e=e.replace(r," "));var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===l.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.NodeWithChildren(l.ElementType.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 i.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},790:function(e,t,o){"use strict";var n,c=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 __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),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}(a);t.NodeWithChildren=w;var d=function(e){function t(t){return e.call(this,i.ElementType.Root,t)||this}return c(t,e),t}(w);t.Document=d;var g=function(e){function t(t,o,n,c){void 0===n&&(n=[]),void 0===c&&(c="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var l=e.call(this,c,n)||this;return l.name=t,l.attribs=o,l}return c(t,e),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}(w);function p(e){return(0,i.isTag)(e)}function u(e){return e.type===i.ElementType.CDATA}function V(e){return e.type===i.ElementType.Text}function E(e){return e.type===i.ElementType.Comment}function b(e){return e.type===i.ElementType.Directive}function f(e){return e.type===i.ElementType.Root}function x(e,t){var o;if(void 0===t&&(t=!1),V(e))o=new m(e.data);else if(E(e))o=new h(e.data);else if(p(e)){var n=t?_(e.children):[],c=new g(e.name,l({},e.attribs),n);n.forEach((function(e){return e.parent=c})),null!=e.namespace&&(c.namespace=e.namespace),e["x-attribsNamespace"]&&(c["x-attribsNamespace"]=l({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(c["x-attribsPrefix"]=l({},e["x-attribsPrefix"])),o=c}else if(u(e)){n=t?_(e.children):[];var r=new w(i.ElementType.CDATA,n);n.forEach((function(e){return e.parent=r})),o=r}else if(f(e)){n=t?_(e.children):[];var a=new d(n);n.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),o=a}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new v(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 _(e){for(var t=e.map((function(e){return x(e,!0)})),o=1;o{e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},276:(e,t,o)=>{var n="html",c="head",l="body",i=/<([a-zA-Z]+[0-9]?)/,r=//i,a=//i,s=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},m=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var h=new window.DOMParser;s=m=function(e,t){return t&&(e="<"+t+">"+e+""),h.parseFromString(e,"text/html")}}if(document.implementation){var v=o(507).isIE,w=document.implementation.createHTMLDocument(v()?"html-dom-parser":void 0);s=function(e,t){return t?(w.documentElement.getElementsByTagName(t)[0].innerHTML=e,w):(w.documentElement.innerHTML=e,w)}}var d,g=document.createElement("template");g.content&&(d=function(e){return g.innerHTML=e,g.content.childNodes}),e.exports=function(e){var t,o,h,v,w=e.match(i);switch(w&&w[1]&&(t=w[1].toLowerCase()),t){case n:return o=m(e),r.test(e)||(h=o.getElementsByTagName(c)[0])&&h.parentNode.removeChild(h),a.test(e)||(h=o.getElementsByTagName(l)[0])&&h.parentNode.removeChild(h),o.getElementsByTagName(n);case c:case l:return v=s(e).getElementsByTagName(t),a.test(e)&&r.test(e)?v[0].parentNode.childNodes:v;default:return d?d(e):s(e,l).getElementsByTagName(l)[0].childNodes}}},152:(e,t,o)=>{var n=o(276),c=o(507).formatDOM,l=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,o=e.match(l);return o&&o[1]&&(t=o[1]),c(n(e),null,t)}},507:(e,t,o)=>{for(var n,c=o(885),l=o(790),i=c.CASE_SENSITIVE_TAG_NAMES,r=l.Comment,a=l.Element,s=l.ProcessingInstruction,m=l.Text,h={},v=0,w=i.length;v{var n=o(670),c=o(484),l=o(152);l="function"==typeof l.default?l.default:l;var i={lowerCaseAttributeNames:!1};function r(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(l(e,(t=t||{}).htmlparser2||i),t)}r.domToReact=n,r.htmlToDOM=l,r.attributesToProps=c,r.Element=o(915).Element,e.exports=r,e.exports.default=r},484:(e,t,o)=>{var n=o(726),c=o(606);function l(e){return n.possibleStandardNames[e]}e.exports=function(e){var t,o,i,r,a,s={},m=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(i=e[t],n.isCustomAttribute(t))s[t]=i;else if(r=l(o=t.toLowerCase()))switch(a=n.getPropertyInfo(r),"checked"!==r&&"value"!==r||m||(r=l("default"+o)),s[r]=i,a&&a.type){case n.BOOLEAN:s[r]=!0;break;case n.OVERLOADED_BOOLEAN:""===i&&(s[r]=!0)}else c.PRESERVE_CUSTOM_ATTRIBUTES&&(s[t]=i);return c.setStyleProp(e.style,s),s}},670:(e,t,o)=>{var n=o(196),c=o(484),l=o(606),i=l.setStyleProp,r=l.canTextBeChildOfNode;function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&l.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,o){for(var l,s,m,h,v,w=(o=o||{}).library||n,d=w.cloneElement,g=w.createElement,p=w.isValidElement,u=[],V="function"==typeof o.replace,E=o.trim,b=0,f=t.length;b1&&(m=d(m,{key:m.key||b})),u.push(m);else if("text"!==l.type){switch(h=l.attribs,a(l)?i(h.style,h):h&&(h=c(h)),v=null,l.type){case"script":case"style":l.children[0]&&(h.dangerouslySetInnerHTML={__html:l.children[0].data});break;case"tag":"textarea"===l.name&&l.children[0]?h.defaultValue=l.children[0].data:l.children&&l.children.length&&(v=e(l.children,o));break;default:continue}f>1&&(h.key=b),u.push(g(l.name,h,v))}else{if((s=!l.data.trim().length)&&l.parent&&!r(l.parent))continue;if(E&&s)continue;u.push(l.data)}return 1===u.length?u[0]:u}},606:(e,t,o)=>{var n=o(196),c=o(476).default,l={reactCompat:!0},i=n.version.split(".")[0]>=16,r=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:i,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var o,n,c="function"==typeof t,l={},i={};for(o in e)n=e[o],c&&(l=t(o,n))&&2===l.length?i[l[0]]=l[1]:"string"==typeof n&&(i[n]=o);return i},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=c(e,l)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!r.has(e.name)},elementsWithNoTextChildren:r}},139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,c=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,r=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function m(e){return e?e.replace(a,s):s}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var h=1,v=1;function w(e){var t=e.match(o);t&&(h+=t.length);var n=e.lastIndexOf("\n");v=~n?e.length-n:v+e.length}function d(){var e={line:h,column:v};return function(t){return t.position=new g(e),E(),t}}function g(e){this.start=e,this.end={line:h,column:v},this.source=a.source}g.prototype.content=e;var p=[];function u(t){var o=new Error(a.source+":"+h+":"+v+": "+t);if(o.reason=t,o.filename=a.source,o.line=h,o.column=v,o.source=e,!a.silent)throw o;p.push(o)}function V(t){var o=t.exec(e);if(o){var n=o[0];return w(n),e=e.slice(n.length),o}}function E(){V(n)}function b(e){var t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){var t=d();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;s!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,s===e.charAt(o-1))return u("End of comment missing");var n=e.slice(2,o-2);return v+=2,w(n),e=e.slice(o),v+=2,t({type:"comment",comment:n})}}function x(){var e=d(),o=V(c);if(o){if(f(),!V(l))return u("property missing ':'");var n=V(i),a=e({type:"declaration",property:m(o[0].replace(t,s)),value:n?m(n[0].replace(t,s)):s});return V(r),a}}return E(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()}},726:(e,t,o)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o{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}},476:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var c=n(o(848)),l=o(678);t.default=function(e,t){var o={};return e&&"string"==typeof e?((0,c.default)(e,(function(e,n){e&&n&&(o[(0,l.camelCase)(e,t)]=n)})),o):o}},678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var o=/^--[a-zA-Z0-9-]+$/,n=/-([a-z])/g,c=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,r=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||c.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,a):e.replace(l,a)).replace(n,r))}},848:(e,t,o)=>{var n=o(139);e.exports=function(e,t){var o,c=null;if(!e||"string"!=typeof e)return c;for(var l,i,r=n(e),a="function"==typeof t,s=0,m=r.length;s{"use strict";e.exports=window.React}},t={};function o(n){var c=t[n];if(void 0!==c)return c.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks;function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const o=e?.type,n=e?.icons;(0,i.isEmpty)(n)||(n.forEach((e=>{e.name.includes(o+"-")||(e.name=o+"-"+e.name),e.type=o})),n.sort((function(e,t){return e.name.localeCompare(t.name)})),t=t.concat(n))})),t}var br=o(488),fr=br.domToReact,xr=(br.htmlToDOM,br.attributesToProps);br.Element;const _r=br;function zr(e){const o=e.trim(),c={trim:!0,replace:e=>{let{attribs:o,children:l,name:i,parent:r,type:a}=e;if("tag"!==a||!r&&"svg"!==i||!i)return(0,n.createElement)(n.Fragment,null);const s=`${i}`;return(0,n.createElement)(s,t({},o,{style:Cr(o?.style)}),fr(l,c))}};return _r(o,c)}function Cr(e){let t={};return"string"==typeof e&&(t=e.split(";").reduce(((e,t)=>{const o=t.indexOf(":");if(-1===o)return e;const n=t.substr(0,o).trim().replace(/^-ms-/,"ms-").replace(/-./g,(e=>e.substr(1).toUpperCase())),c=t.substr(o+1).trim();return c?{...e,[n]:c}:e}),{})),t}const kr={borderColor:void 0,borderRadius:void 0,borderStyle:void 0,borderWidth:void 0,borderBottomColor:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderBottomStyle:void 0,borderBottomWidth:void 0,borderLeftColor:void 0,borderLeftStyle:void 0,borderLeftWidth:void 0,borderRightColor:void 0,borderRightStyle:void 0,borderRightWidth:void 0,borderTopColor:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderTopStyle:void 0,borderTopWidth:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0,paddingBottom:void 0,paddingLeft:void 0,paddingRight:void 0,paddingTop:void 0},Mr={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},label:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:"number"},percentWidth:{type:"number"}},supports:{align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},spacing:{padding:!0,margin:!0}},save(e){var t,o,c,r,s,m;let{attributes:h}=e;const{borderColor:v,icon:w,iconName:d,style:g,iconBackgroundColor:p,iconBackgroundColorValue:u,iconColorValue:V,gradient:E,customGradient:b,itemsJustification:f,label:x,linkUrl:_,linkRel:z,linkTarget:C,rotate:k,flipHorizontal:M,flipVertical:y,width:H,percentWidth:S}=h;if(!w&&!d)return null;const L=Er(Vr()).filter((e=>e.name===d));let P="";if(w&&(0,i.isEmpty)(L)?(P=zr(w),(0,i.isEmpty)(P?.props)&&(P="")):(P=L[0]?.icon,"string"==typeof P&&(P=zr(P))),!P)return null;x&&(P={...P,props:{...P.props,"aria-label":x}});const B=l()("icon-container",{"has-icon-color":V,"has-background-color":u||p||E||b,[`has-${p}-background-color`]:p,[`has-${E}-gradient-background`]:E,[`rotate-${k}`]:k,"flip-horizontal":M,"flip-vertical":y}),G=(0,i.isEmpty)(z)?void 0:z,T=(0,i.isEmpty)(C)?void 0:C;let R=H?`${H}px`:"48px";S&&(R=`${S}%`);let A=null!==(t=g?.spacing?.margin)&&void 0!==t?t:void 0,N=null!==(o=g?.spacing?.padding)&&void 0!==o?o:void 0;var Z,I,O,F,D,U,j,$;N&&(N=`${null!==(Z=N?.top)&&void 0!==Z?Z:0} ${null!==(I=N?.right)&&void 0!==I?I:0} ${null!==(O=N?.bottom)&&void 0!==O?O:0} ${null!==(F=N?.left)&&void 0!==F?F:0}`),A&&(A=`${null!==(D=A?.top)&&void 0!==D?D:0} ${null!==(U=A?.right)&&void 0!==U?U:0} ${null!==(j=A?.bottom)&&void 0!==j?j:0} ${null!==($=A?.left)&&void 0!==$?$:0}`);const q={background:E?void 0:b,backgroundColor:p?void 0:u,borderColor:v?`var(--wp--preset--color--${v})`:null!==(c=g?.border?.color)&&void 0!==c?c:void 0,borderRadius:null!==(r=g?.border?.radius)&&void 0!==r?r:void 0,borderStyle:null!==(s=g?.border?.style)&&void 0!==s?s:void 0,borderWidth:null!==(m=g?.border?.width)&&void 0!==m?m:void 0,color:V,padding:N,width:R},W=(0,n.createElement)(n.Fragment,null,_?(0,n.createElement)("a",{className:B,href:_,target:T,rel:G,style:q,"aria-label":x},P):(0,n.createElement)("div",{className:B,style:q},P));return(0,n.createElement)("div",a.useBlockProps.save({className:`items-justified-${f}`,style:{...kr,margin:A}}),W)}},yr={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},hasNoIconFill:{type:"boolean"},label:{type:"string"},title:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:"number"},percentWidth:{type:"number"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSelector:".icon-container",__experimentalSkipSerialization:!0},spacing:{padding:!0,margin:!0}},save(e){let{attributes:o}=e;const{customGradient:c,flipHorizontal:r,flipVertical:s,gradient:m,hasNoIconFill:h,icon:v,iconBackgroundColor:w,iconBackgroundColorValue:d,iconColorValue:g,iconName:p,itemsJustification:u,label:V,linkRel:E,linkTarget:b,linkUrl:f,percentWidth:x,rotate:_,title:z,width:C}=o;if(!v&&!p)return null;const k=Er(Vr()).filter((e=>e.name===p));let M="";if(v&&(0,i.isEmpty)(k)?(M=zr(v),(0,i.isEmpty)(M?.props)&&(M="")):(M=k[0]?.icon,"string"==typeof M&&(M=zr(M))),!M)return null;V&&(M={...M,props:{...M.props,"aria-label":V}});const y=a.useBlockProps.save(),H=(0,a.__experimentalGetBorderClassesAndStyles)(o),S=l()("icon-container",H?.className,{"has-icon-color":g,"has-icon-background-color":d||w||m||c,"has-no-icon-fill-color":h,[`has-${w}-background-color`]:w,[`has-${m}-gradient-background`]:m,[`rotate-${_}`]:_,"flip-horizontal":r,"flip-vertical":s});let L=C?`${C}px`:"48px";x&&(L=`${x}%`);const P={background:m?void 0:c,backgroundColor:w?void 0:d,color:g,width:L,...y.style,...H.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},B=a.useBlockProps.save()?.style,G={marginBottom:B?.marginBottom,marginLeft:B?.marginLeft,marginRight:B?.marginRight,marginTop:B?.marginTop},T=(0,i.isEmpty)(E)?void 0:E,R=(0,i.isEmpty)(b)?void 0:b,A=(0,n.createElement)(n.Fragment,null,f?(0,n.createElement)("a",{className:S,href:f,target:R,rel:T,style:P,"aria-label":V},M):(0,n.createElement)("div",{className:S,style:P},M));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:u&&`items-justified-${u}`,style:{...kr,...G}}),{title:z}),A)}},Hr={attributes:{icon:{type:"string",source:"html",selector:".icon-container",default:""},iconName:{type:"string"},itemsJustification:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},hasNoIconFill:{type:"boolean"},label:{type:"string"},title:{type:"string"},linkUrl:{type:"string"},linkRel:{type:"string"},linkTarget:{type:"string"},rotate:{type:"number"},flipHorizontal:{type:"boolean"},flipVertical:{type:"boolean"},width:{type:["string","number"]},height:{type:"string"},percentWidth:{type:"number"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSelector:".icon-container",__experimentalSkipSerialization:!0},spacing:{padding:!0,margin:!0}},save(e){let{attributes:o}=e;const{customGradient:c,flipHorizontal:s,flipVertical:m,gradient:h,hasNoIconFill:v,icon:w,iconBackgroundColor:d,iconBackgroundColorValue:g,iconColor:p,iconColorValue:u,iconName:V,itemsJustification:E,label:b,linkRel:f,linkTarget:x,linkUrl:_,rotate:z,title:C,width:k,height:M}=o;if(!w&&!V)return null;const y=Er(Vr()).filter((e=>e.name===V));let H="";if(w&&(0,i.isEmpty)(y)?(H=zr(w),(0,i.isEmpty)(H?.props)&&(H="")):(H=y[0]?.icon,"string"==typeof H&&(H=zr(H))),!H)return null;b&&(H={...H,props:{...H.props,"aria-label":b}});const S=a.useBlockProps.save(),L=(0,a.__experimentalGetBorderClassesAndStyles)(o),P=l()("icon-container",L?.className,{"has-icon-color":u,"has-no-icon-fill-color":v,"has-icon-background-color":g||d||h||c,[`has-${d}-background-color`]:d,[`has-${p}-color`]:p,[`has-${h}-gradient-background`]:h,[`rotate-${z}`]:z,"flip-horizontal":s,"flip-vertical":m}),[B,G]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(k);let T=M?void 0:"48px";B&&(T=G?`${B}${G}`:`${B}px`);const R={background:h?void 0:c,backgroundColor:g,color:u,width:T,height:M||void 0,...S.style,...L.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},A=a.useBlockProps.save()?.style,N={marginBottom:A?.marginBottom,marginLeft:A?.marginLeft,marginRight:A?.marginRight,marginTop:A?.marginTop},Z=(0,i.isEmpty)(f)?void 0:f,I=(0,i.isEmpty)(x)?void 0:x,O=(0,n.createElement)(n.Fragment,null,_?(0,n.createElement)("a",{className:P,href:_,target:I,rel:Z,style:R,"aria-label":b},H):(0,n.createElement)("div",{className:P,style:R},H));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:E&&`items-justified-${E}`,style:{...kr,...N}}),{title:C}),O)}},Sr=[Hr,yr,Mr],Lr=window.wp.data,Pr=window.wp.keycodes,Br=window.wp.a11y;function Gr(e){const{label:t,options:o,activeOptions:c,setAttributes:l,attributes:i}=e,a=o.filter((e=>e.isDefault));a.forEach((e=>{e.hasEdits=i.hasOwnProperty(e.attributeSlug)&&void 0!==i[e.attributeSlug]}));const m=o.filter((e=>!e.isDefault));function h(e,t){"reset"===t?l({[e.attributeSlug]:void 0}):e.isActive?l({[e.attributeSlug]:void 0}):l({[e.attributeSlug]:""})}const v=[...a,...m].some((e=>e.isActive&&!e.isDefault||e.isDefault&&e.hasEdits)),w=(0,n.createElement)(r.DropdownMenu,{className:"options-dropdown",icon:0===c.length?Oc:fc,label:(0,s.__)("Setting options","icon-block"),popoverProps:{className:"options-panel__option-popover",focusOnMount:"container"},toggleProps:{isSmall:!0}},(()=>(0,n.createElement)(n.Fragment,null,0!==a.length&&(0,n.createElement)(r.MenuGroup,{label:(0,s.__)("Defaults","icon-block")},a.map(((e,t)=>(0,n.createElement)(Rr,{key:t,option:e,toggleOptions:h})))),(0,n.createElement)(r.MenuGroup,{label:(0,s.__)("Options","icon-block")},m.map(((e,t)=>(0,n.createElement)(Tr,{key:t,option:e,toggleOptions:h})))),(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{"aria-disabled":!v,onClick:()=>{v&&o.forEach((e=>{l({[e.attributeSlug]:void 0})}))},variant:"tertiary"},(0,s.__)("Reset all","icon-block"))))));return(0,n.createElement)("div",{className:"options-panel-header"},(0,n.createElement)("h2",null,t),(0,n.createElement)("div",{className:"options-panel-header__dropdown-menus"},w))}function Tr(e){const{option:t,toggleOptions:o}=e;return(0,n.createElement)(r.MenuItem,{key:t.attributeSlug,icon:t.isActive&&fe,label:(0,s.sprintf)( // translators: %s: The name of the option being toggled e.g. "Label". -(0,s.__)("Toggle %s","icon-block"),t.label),onClick:()=>{o(t),(0,qi.speak)((0,s.sprintf)( +(0,s.__)("Toggle %s","icon-block"),t.label),onClick:()=>{o(t),(0,Br.speak)((0,s.sprintf)( // translators: %s: The name of the option being toggled e.g. "Label". -(0,s.__)("%s toggled","icon-block"),t.label),"assertive")}},t.label)}function Ji(e){const{option:t,toggleOptions:o}=e;return t.hasEdits?(0,n.createElement)(r.MenuItem,{key:t.attributeSlug,disabled:!t.hasEdits,className:"has-reset",label:(0,s.sprintf)( +(0,s.__)("%s toggled","icon-block"),t.label),"assertive")}},t.label)}function Rr(e){const{option:t,toggleOptions:o}=e;return t.hasEdits?(0,n.createElement)(r.MenuItem,{key:t.attributeSlug,disabled:!t.hasEdits,className:"has-reset",label:(0,s.sprintf)( // translators: %s: The name of the option being reset e.g. "Label". -(0,s.__)("Reset %s","icon-block"),t.label),onClick:()=>{o(t,"reset"),(0,qi.speak)((0,s.sprintf)( +(0,s.__)("Reset %s","icon-block"),t.label),onClick:()=>{o(t,"reset"),(0,Br.speak)((0,s.sprintf)( // translators: %s: The name of the option being reset e.g. "Label". -(0,s.__)("%s reset to default","icon-block"),t.label),"assertive")},role:"menuitem"},t.label,t.hasEdits&&(0,n.createElement)("span",{"aria-hidden":"true",className:"menu-item-reset"},(0,s.__)("Reset","icon-block"))):(0,n.createElement)(r.MenuItem,{"aria-disabled":!0,isSelected:!0,key:t.attributeSlug,role:"menuitemcheckbox"},t.label)}function Xi(e){const{className:o,label:c,attributes:i,options:r}=e;r.forEach((e=>{(e?.isDefault||i.hasOwnProperty(e.attributeSlug)&&void 0!==i[e.attributeSlug])&&(e.isActive=!0)}));const a=r.filter((e=>e.isActive));return(0,n.createElement)("div",{className:l()("options-panel",{[o]:o})},(0,n.createElement)(Wi,t({label:c,activeOptions:a,options:r},e)),0!==a.length&&(0,n.createElement)("div",{className:"options-panel-container"},e.children))}const Ki={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function Yi(e){var t,o;let{onChange:c,label:l,units:m,value:h}=e;const v=parseFloat(h),d=(0,a.useSetting)("spacing.units");let w;w=m&&d?(0,i.intersection)(m,d):m||d;const p=(0,r.__experimentalUseCustomUnits)({availableUnits:w||["%","px","em","rem","vh","vw"]}),g=(0,n.useMemo)((()=>(0,r.__experimentalParseQuantityAndUnitFromRawValue)(h)),[h])[1]||p[0]?.value||"px";return(0,n.createElement)("fieldset",{className:"components-dimension-control"},(0,n.createElement)(r.BaseControl.VisualLabel,{as:"legend"},l||(0,s.__)("Dimension","icon-block")),(0,n.createElement)(r.Flex,null,(0,n.createElement)(r.FlexItem,{isBlock:!0},(0,n.createElement)(r.__experimentalUnitControl,{value:h,units:p,onChange:e=>{const[t,o]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(e);t&&c(e)},onUnitChange:e=>{const[t,o]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(h);["em","rem"].includes(e)&&"px"===o?c((t/16).toFixed(2)+e):["em","rem"].includes(o)&&"px"===e?c(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&c(100+e)},min:0,size:"__unstable-large"})),(0,n.createElement)(r.FlexItem,{isBlock:!0},(0,n.createElement)(r.__experimentalSpacer,{marginX:2,marginBottom:0},(0,n.createElement)(r.RangeControl,{value:v,min:0,max:null!==(t=Ki[g]?.max)&&void 0!==t?t:100,step:null!==(o=Ki[g]?.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{c([e,g].join(""))},__nextHasNoMarginBottom:!0})))))}const er=function(e){let{icon:t,size:o=24,...c}=e;return(0,n.cloneElement)(t,{width:o,height:o,...c})},tr=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{d:"M5.123,13.547 L5.0737,13.634 C4.831,14.132 5.219,14.735 5.791,14.683 L10.2624715,14.270549 L9.82933866,21.7227919 C9.78597021,22.4686759 10.7447862,22.7937669 11.1544448,22.1720753 L18.8767932,10.4527553 L18.9263046,10.3660059 C19.1692295,9.86740676 18.7810449,9.2643915 18.2088152,9.31705918 L13.736563,9.72847448 L14.1706611,2.27720814 C14.2140292,1.5313296 13.2552248,1.20623489 12.8455606,1.82791614 L5.12321216,13.5468785 Z M12.5675925,4.88951961 L12.2425725,10.4921196 L12.2429925,10.5865822 C12.2702521,10.9894968 12.6214196,11.3022396 13.0308862,11.2645525 L16.8312941,10.9140428 L11.431442,19.1095038 L11.7574272,13.5078804 L11.7570075,13.4134218 C11.729751,13.0105235 11.3786124,12.697785 10.9691611,12.7354431 L7.16774032,13.0849806 L12.5675925,4.88951961 Z"})),or=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 80"},(0,n.createElement)("polygon",{strokeWidth:"1",fill:"none",points:"36.923 44.5 20 46 44.615 10 43.077 35.5 60 33.999 35.385 70"}));function nr(e){const o=e.trim(),c={trim:!0,replace:e=>{let{attribs:o,children:l,name:i,parent:r,type:a}=e;if("tag"!==a&&"style"!==a||!r&&"svg"!==i||!i)return(0,n.createElement)(n.Fragment,null);const s=`${i}`;return"style"===a&&"style"===i&&l?l[0]?.data?(0,n.createElement)(s,Ri(o),l[0].data):(0,n.createElement)(n.Fragment,null):(0,n.createElement)(s,t({},Ri(o),{style:cr(o?.style)}),Ti(l,c))}};return Ai(o,c)}function cr(e){let t={};return"string"==typeof e&&(t=e.split(";").reduce(((e,t)=>{const o=t.indexOf(":");if(-1===o)return e;const n=t.substr(0,o).trim().replace(/^-ms-/,"ms-").replace(/-./g,(e=>e.substr(1).toUpperCase())),c=t.substr(o+1).trim();return c?{...e,[n]:c}:e}),{})),t}function lr(e){const t={fileTypeUploadError:(0,s.__)("An error occured while uploading. The file does not appear to be an SVG.","icon-block"),fileTypeSelectError:(0,s.__)("An error occured while inserting the icon. The media selected is not an SVG.","icon-block"),fileTypeError:(0,s.__)("An error occured while inserting the icon. Check that the file is valid SVG.","icon-block")};(0,ji.dispatch)("core/notices").createNotice("snackbar-notice",e?t[e]:t.fileType,{type:"snackbar",isDismissible:!0})}function ir(e,t,o){const{width:n}=t;if(e.url?.endsWith(".svg"))return fetch(e.url).then((e=>e.text())).then((t=>{const c=rr(t);c?o({icon:c,iconName:"",width:n||e?.width}):lr("fileTypeError")})).catch((()=>lr("fileTypeError")));lr("fileTypeSelect")}function rr(e){const t=(new window.DOMParser).parseFromString(e,"image/svg+xml");let o="";return 1===t.childNodes.length&&"svg"===t.firstChild.nodeName&&(o=(new window.XMLSerializer).serializeToString(t.documentElement)),o}function ar(e){const{isCustomInserterOpen:t,setCustomInserterOpen:o,attributes:c,setAttributes:a}=e,{icon:m,iconName:h}=c,[v,d]=(0,n.useState)(h?"":m),[w,p]=(0,n.useState)(100);if((0,n.useEffect)((()=>d(m)),[m]),!t)return null;let g=nr(v);const u=!(0,i.isEmpty)(g?.props);return g=u?g:tr,(0,n.createElement)(r.Modal,{className:"wp-block-outermost-icon-custom-inserter__modal",title:(0,s.__)("Custom Icon","icon-block"),onRequestClose:()=>o(!1),isFullScreen:!0},(0,n.createElement)("div",{className:"icon-custom-inserter"},(0,n.createElement)("div",{className:"icon-custom-inserter__content"},(0,n.createElement)(r.TextareaControl,{label:(0,s.__)("Custom icon","icon-block"),hideLabelFromVision:!0,value:v,onChange:d,placeholder:(0,s.__)("Paste the SVG code for your custom icon.","icon-block")})),(0,n.createElement)("div",{className:"icon-custom-inserter__sidebar"},(0,n.createElement)("div",{className:"icon-preview"},(0,n.createElement)("div",{className:l()("icon-preview__window",{"is-default":!u})},(0,n.createElement)(er,{icon:g,size:w})),(0,n.createElement)("div",{className:"icon-controls"},(0,n.createElement)("div",{className:"icon-controls__size"},(0,n.createElement)("span",null,(0,s.__)("Preview size","icon-block")),(0,n.createElement)(r.RangeControl,{min:24,max:400,initialPosition:100,withInputField:!1,onChange:e=>p(e)}))),v&&!u&&(0,n.createElement)(r.Notice,{status:"error",isDismissible:!1},(0,s.__)("The custom icon does not appear to be in a valid SVG format or contains non-SVG elements.","icon-block"))),(0,n.createElement)("div",{className:"icon-insert-buttons"},(0,n.createElement)(r.Button,{label:(0,s.__)("Clear custom icon","icon-block"),isSecondary:!0,disabled:!v,onClick:()=>d("")},(0,s.__)("Clear","icon-block")),(0,n.createElement)(r.Button,{label:(0,s.__)("Insert custom icon","icon-block"),isPrimary:!0,disabled:!u||!v,onClick:function(){a({icon:v,iconName:""}),o(!1)}},(0,s.__)("Insert custom icon","icon-block"))))))}function sr(e){const{isInserterOpen:t,setInserterOpen:o,attributes:c,setAttributes:a}=e,m=Pi(),h=function(e){const t=[];return e.forEach((e=>{var o,n;const c=e?.type,l=null!==(o=e?.title)&&void 0!==o?o:e?.type,r=null!==(n=e?.isDefault)&&void 0!==n&&n;(0,i.isEmpty)(c)||t.push({type:c,title:l,isDefault:r})})),t}(m);let v=h.filter((e=>e.isDefault));v=0!==v.length?v:[h[0]];const[d,w]=(0,n.useState)(""),[p,g]=(0,n.useState)("all__"+v[0]?.type),[u,E]=(0,n.useState)(24);if(!t)return null;const V=Bi(m);let b=[];if(d&&(b=V.filter((e=>{const t=d.toLowerCase();if(e.title.toLowerCase().includes(t))return!0;if(e?.keywords&&!(0,i.isEmpty)(e?.keywords)){const o=e.keywords.filter((e=>e.includes(t)));return!(0,i.isEmpty)(o)}return!1}))),!d)if(p.startsWith("all__")){var f;const e=p.replace("all__","");b=null!==(f=m.filter((t=>t.type===e))[0]?.icons)&&void 0!==f?f:[]}else b=V.filter((e=>{var t;return!!(null!==(t=e?.categories)&&void 0!==t?t:[]).includes(p)}));const z=[];m.forEach((e=>{var t,o,n;const c=null!==(t=e?.title)&&void 0!==t?t:e.type,l=null!==(o=e?.categories)&&void 0!==o?o:[],i=function(e){const t=[];return e.forEach((e=>{e?.name&&t.push(e.name)})),t}(l),r="all__"+e.type,a=null!==(n=e?.icons)&&void 0!==n?n:[];i.includes(r)||(i.sort().unshift(r),l.unshift({name:r,title:(0,s.__)("All","icon-block")})),z.push({type:e.type,title:c,categoriesFull:l,categories:i,count:a.length})}));const x=(0,n.createElement)("div",{className:"icons-list"},b.map((e=>{var t;let i=e.icon;return"string"==typeof i&&(i=nr(i)),(0,n.createElement)(r.Button,{key:`icon-${e.name}`,className:l()("icons-list__item",{"is-active":e.name===c?.iconName,"has-no-icon-fill":e?.hasNoIconFill}),onClick:()=>{return t=e.name,n=e?.hasNoIconFill,a({icon:"",iconName:t,hasNoIconFill:n}),void o(!1);var t,n}},(0,n.createElement)("span",{className:"icons-list__item-icon"},(0,n.createElement)(er,{icon:i,size:u})),(0,n.createElement)("span",{className:"icons-list__item-title"},null!==(t=e?.title)&&void 0!==t?t:e.name))}))),_=(0,n.createElement)("div",{className:"block-editor-inserter__no-results"},(0,n.createElement)(er,{icon:j,className:"block-editor-inserter__no-results-icon"}),(0,n.createElement)("p",null,(0,s.__)("No results found.","block-icon")));return(0,n.createElement)(r.Modal,{className:"wp-block-outermost-icon-inserter__modal",title:(0,s.__)("Icon Library","icon-block"),onRequestClose:()=>o(!1),isFullScreen:!0},(0,n.createElement)("div",{className:l()("icon-inserter",{"is-searching":d})},(0,n.createElement)("div",{className:"icon-inserter__sidebar"},(0,n.createElement)("div",{className:"icon-inserter__sidebar__search"},(0,n.createElement)(r.SearchControl,{value:d,onChange:w})),z.map((e=>function(e){return(0,n.createElement)(r.MenuGroup,{className:"icon-inserter__sidebar__category-type",label:e.title},e.categories.map((t=>{var o;const c=p?t===p:t==="all__"+e.type,i=V.filter((o=>{var n;const c=null!==(n=o?.categories)&&void 0!==n?n:[];return o.type===e.type&&c.includes(t)})),a=null!==(o=e.categoriesFull.filter((e=>e.name===t))[0]?.title)&&void 0!==o?o:t;return(0,n.createElement)(r.MenuItem,{key:`category-${t}`,className:l()({"is-active":c}),onClick:()=>function(e){g(e)}(t),isPressed:c},a,(0,n.createElement)("span",null,t==="all__"+e.type?e.count:i.length))})))}(e)))),(0,n.createElement)("div",{className:"icon-inserter__content"},(0,n.createElement)("div",{className:"icon-inserter__content-header"},(0,n.createElement)("div",{className:"search-results"},d&&(0,s.sprintf)( +(0,s.__)("%s reset to default","icon-block"),t.label),"assertive")},role:"menuitem"},t.label,t.hasEdits&&(0,n.createElement)("span",{"aria-hidden":"true",className:"menu-item-reset"},(0,s.__)("Reset","icon-block"))):(0,n.createElement)(r.MenuItem,{"aria-disabled":!0,isSelected:!0,key:t.attributeSlug,role:"menuitemcheckbox"},t.label)}function Ar(e){const{className:o,label:c,attributes:i,options:r}=e;r.forEach((e=>{(e?.isDefault||i.hasOwnProperty(e.attributeSlug)&&void 0!==i[e.attributeSlug])&&(e.isActive=!0)}));const a=r.filter((e=>e.isActive));return(0,n.createElement)("div",{className:l()("options-panel",{[o]:o})},(0,n.createElement)(Gr,t({label:c,activeOptions:a,options:r},e)),0!==a.length&&(0,n.createElement)("div",{className:"options-panel-container"},e.children))}const Nr={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function Zr(e){var t,o;let{onChange:c,label:l,units:m,value:h}=e;const v=parseFloat(h),w=(0,a.useSetting)("spacing.units");let d;d=m&&w?(0,i.intersection)(m,w):m||w;const g=(0,r.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),p=(0,n.useMemo)((()=>(0,r.__experimentalParseQuantityAndUnitFromRawValue)(h)),[h])[1]||g[0]?.value||"px";return(0,n.createElement)("fieldset",{className:"components-dimension-control"},(0,n.createElement)(r.BaseControl.VisualLabel,{as:"legend"},l||(0,s.__)("Dimension","icon-block")),(0,n.createElement)(r.Flex,null,(0,n.createElement)(r.FlexItem,{isBlock:!0},(0,n.createElement)(r.__experimentalUnitControl,{value:h,units:g,onChange:e=>{const[t,o]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(e);t&&c(e)},onUnitChange:e=>{const[t,o]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(h);["em","rem"].includes(e)&&"px"===o?c((t/16).toFixed(2)+e):["em","rem"].includes(o)&&"px"===e?c(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&c(100+e)},min:0,size:"__unstable-large"})),(0,n.createElement)(r.FlexItem,{isBlock:!0},(0,n.createElement)(r.__experimentalSpacer,{marginX:2,marginBottom:0},(0,n.createElement)(r.RangeControl,{value:v,min:0,max:null!==(t=Nr[p]?.max)&&void 0!==t?t:100,step:null!==(o=Nr[p]?.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{c([e,p].join(""))},__nextHasNoMarginBottom:!0})))))}const Ir=function({icon:e,size:t=24,...o}){return(0,n.cloneElement)(e,{width:t,height:t,...o})},Or=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{d:"M5.123,13.547 L5.0737,13.634 C4.831,14.132 5.219,14.735 5.791,14.683 L10.2624715,14.270549 L9.82933866,21.7227919 C9.78597021,22.4686759 10.7447862,22.7937669 11.1544448,22.1720753 L18.8767932,10.4527553 L18.9263046,10.3660059 C19.1692295,9.86740676 18.7810449,9.2643915 18.2088152,9.31705918 L13.736563,9.72847448 L14.1706611,2.27720814 C14.2140292,1.5313296 13.2552248,1.20623489 12.8455606,1.82791614 L5.12321216,13.5468785 Z M12.5675925,4.88951961 L12.2425725,10.4921196 L12.2429925,10.5865822 C12.2702521,10.9894968 12.6214196,11.3022396 13.0308862,11.2645525 L16.8312941,10.9140428 L11.431442,19.1095038 L11.7574272,13.5078804 L11.7570075,13.4134218 C11.729751,13.0105235 11.3786124,12.697785 10.9691611,12.7354431 L7.16774032,13.0849806 L12.5675925,4.88951961 Z"})),Fr=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 80"},(0,n.createElement)("polygon",{strokeWidth:"1",fill:"none",points:"36.923 44.5 20 46 44.615 10 43.077 35.5 60 33.999 35.385 70"}));function Dr(e){const o=e.trim(),c={trim:!0,replace:e=>{let{attribs:o,children:l,name:i,parent:r,type:a}=e;if("tag"!==a&&"style"!==a||!r&&"svg"!==i||!i)return(0,n.createElement)(n.Fragment,null);const s=`${i}`;return"style"===a&&"style"===i&&l?l[0]?.data?(0,n.createElement)(s,xr(o),l[0].data):(0,n.createElement)(n.Fragment,null):(0,n.createElement)(s,t({},xr(o),{style:Ur(o?.style)}),fr(l,c))}};return _r(o,c)}function Ur(e){let t={};return"string"==typeof e&&(t=e.split(";").reduce(((e,t)=>{const o=t.indexOf(":");if(-1===o)return e;const n=t.substr(0,o).trim().replace(/^-ms-/,"ms-").replace(/-./g,(e=>e.substr(1).toUpperCase())),c=t.substr(o+1).trim();return c?{...e,[n]:c}:e}),{})),t}function jr(e){const t={fileTypeUploadError:(0,s.__)("An error occured while uploading. The file does not appear to be an SVG.","icon-block"),fileTypeSelectError:(0,s.__)("An error occured while inserting the icon. The media selected is not an SVG.","icon-block"),fileTypeError:(0,s.__)("An error occured while inserting the icon. Check that the file is valid SVG.","icon-block")};(0,Lr.dispatch)("core/notices").createNotice("snackbar-notice",e?t[e]:t.fileType,{type:"snackbar",isDismissible:!0})}function $r(e,t,o){const{width:n}=t;if(e.url?.endsWith(".svg"))return fetch(e.url).then((e=>e.text())).then((t=>{const c=qr(t);c?o({icon:c,iconName:"",width:n||e?.width}):jr("fileTypeError")})).catch((()=>jr("fileTypeError")));jr("fileTypeSelect")}function qr(e){const t=(new window.DOMParser).parseFromString(e,"image/svg+xml");let o="";return 1===t.childNodes.length&&"svg"===t.firstChild.nodeName&&(o=(new window.XMLSerializer).serializeToString(t.documentElement)),o}function Wr(e){const{isCustomInserterOpen:t,setCustomInserterOpen:o,attributes:c,setAttributes:a}=e,{icon:m,iconName:h}=c,[v,w]=(0,n.useState)(h?"":m),[d,g]=(0,n.useState)(100);if((0,n.useEffect)((()=>w(m)),[m]),!t)return null;let p=Dr(v);const u=!(0,i.isEmpty)(p?.props);return p=u?p:Or,(0,n.createElement)(r.Modal,{className:"wp-block-outermost-icon-custom-inserter__modal",title:(0,s.__)("Custom Icon","icon-block"),onRequestClose:()=>o(!1),isFullScreen:!0},(0,n.createElement)("div",{className:"icon-custom-inserter"},(0,n.createElement)("div",{className:"icon-custom-inserter__content"},(0,n.createElement)(r.TextareaControl,{label:(0,s.__)("Custom icon","icon-block"),hideLabelFromVision:!0,value:v,onChange:w,placeholder:(0,s.__)("Paste the SVG code for your custom icon.","icon-block")})),(0,n.createElement)("div",{className:"icon-custom-inserter__sidebar"},(0,n.createElement)("div",{className:"icon-preview"},(0,n.createElement)("div",{className:l()("icon-preview__window",{"is-default":!u})},(0,n.createElement)(Ir,{icon:p,size:d})),(0,n.createElement)("div",{className:"icon-controls"},(0,n.createElement)("div",{className:"icon-controls__size"},(0,n.createElement)("span",null,(0,s.__)("Preview size","icon-block")),(0,n.createElement)(r.RangeControl,{min:24,max:400,initialPosition:100,withInputField:!1,onChange:e=>g(e)}))),v&&!u&&(0,n.createElement)(r.Notice,{status:"error",isDismissible:!1},(0,s.__)("The custom icon does not appear to be in a valid SVG format or contains non-SVG elements.","icon-block"))),(0,n.createElement)("div",{className:"icon-insert-buttons"},(0,n.createElement)(r.Button,{label:(0,s.__)("Clear custom icon","icon-block"),isSecondary:!0,disabled:!v,onClick:()=>w("")},(0,s.__)("Clear","icon-block")),(0,n.createElement)(r.Button,{label:(0,s.__)("Insert custom icon","icon-block"),isPrimary:!0,disabled:!u||!v,onClick:function(){a({icon:v,iconName:""}),o(!1)}},(0,s.__)("Insert custom icon","icon-block"))))))}function Jr(e){const{isInserterOpen:t,setInserterOpen:o,attributes:c,setAttributes:a}=e,m=Vr(),h=function(e){const t=[];return e.forEach((e=>{var o,n;const c=e?.type,l=null!==(o=e?.title)&&void 0!==o?o:e?.type,r=null!==(n=e?.isDefault)&&void 0!==n&&n;(0,i.isEmpty)(c)||t.push({type:c,title:l,isDefault:r})})),t}(m);let v=h.filter((e=>e.isDefault));v=0!==v.length?v:[h[0]];const[w,d]=(0,n.useState)(""),[g,p]=(0,n.useState)("all__"+v[0]?.type),[u,V]=(0,n.useState)(24);if(!t)return null;const E=Er(m);let b=[];if(w&&(b=E.filter((e=>{const t=w.toLowerCase();if(e.title.toLowerCase().includes(t))return!0;if(e?.keywords&&!(0,i.isEmpty)(e?.keywords)){const o=e.keywords.filter((e=>e.includes(t)));return!(0,i.isEmpty)(o)}return!1}))),!w)if(g.startsWith("all__")){var f;const e=g.replace("all__","");b=null!==(f=m.filter((t=>t.type===e))[0]?.icons)&&void 0!==f?f:[]}else b=E.filter((e=>{var t;return!!(null!==(t=e?.categories)&&void 0!==t?t:[]).includes(g)}));const x=[];m.forEach((e=>{var t,o,n;const c=null!==(t=e?.title)&&void 0!==t?t:e.type,l=null!==(o=e?.categories)&&void 0!==o?o:[],i=function(e){const t=[];return e.forEach((e=>{e?.name&&t.push(e.name)})),t}(l),r="all__"+e.type,a=null!==(n=e?.icons)&&void 0!==n?n:[];i.includes(r)||(i.sort().unshift(r),l.unshift({name:r,title:(0,s.__)("All","icon-block")})),x.push({type:e.type,title:c,categoriesFull:l,categories:i,count:a.length})}));const _=(0,n.createElement)("div",{className:"icons-list"},b.map((e=>{var t;let i=e.icon;return"string"==typeof i&&(i=Dr(i)),(0,n.createElement)(r.Button,{key:`icon-${e.name}`,className:l()("icons-list__item",{"is-active":e.name===c?.iconName,"has-no-icon-fill":e?.hasNoIconFill}),onClick:()=>{return t=e.name,n=e?.hasNoIconFill,a({icon:"",iconName:t,hasNoIconFill:n}),void o(!1);var t,n}},(0,n.createElement)("span",{className:"icons-list__item-icon"},(0,n.createElement)(Ir,{icon:i,size:u})),(0,n.createElement)("span",{className:"icons-list__item-title"},null!==(t=e?.title)&&void 0!==t?t:e.name))}))),z=(0,n.createElement)("div",{className:"block-editor-inserter__no-results"},(0,n.createElement)(Ir,{icon:j,className:"block-editor-inserter__no-results-icon"}),(0,n.createElement)("p",null,(0,s.__)("No results found.","block-icon")));return(0,n.createElement)(r.Modal,{className:"wp-block-outermost-icon-inserter__modal",title:(0,s.__)("Icon Library","icon-block"),onRequestClose:()=>o(!1),isFullScreen:!0},(0,n.createElement)("div",{className:l()("icon-inserter",{"is-searching":w})},(0,n.createElement)("div",{className:"icon-inserter__sidebar"},(0,n.createElement)("div",{className:"icon-inserter__sidebar__search"},(0,n.createElement)(r.SearchControl,{value:w,onChange:d})),x.map((e=>function(e){return(0,n.createElement)(r.MenuGroup,{className:"icon-inserter__sidebar__category-type",label:e.title},e.categories.map((t=>{var o;const c=g?t===g:t==="all__"+e.type,i=E.filter((o=>{var n;const c=null!==(n=o?.categories)&&void 0!==n?n:[];return o.type===e.type&&c.includes(t)})),a=null!==(o=e.categoriesFull.filter((e=>e.name===t))[0]?.title)&&void 0!==o?o:t;return(0,n.createElement)(r.MenuItem,{key:`category-${t}`,className:l()({"is-active":c}),onClick:()=>function(e){p(e)}(t),isPressed:c},a,(0,n.createElement)("span",null,t==="all__"+e.type?e.count:i.length))})))}(e)))),(0,n.createElement)("div",{className:"icon-inserter__content"},(0,n.createElement)("div",{className:"icon-inserter__content-header"},(0,n.createElement)("div",{className:"search-results"},w&&(0,s.sprintf)( // translators: %1$s: Number of icons retruned from search, %2$s: the search input -(0,s._n)('%1$s search result for "%2$s"','%1$s search results for "%2$s"',b.length,"icon-block"),b.length,d)),(0,n.createElement)("div",{className:"icon-controls"},(0,n.createElement)("div",{className:"icon-controls__size"},(0,n.createElement)("span",null,(0,s.__)("Preview size","icon-block")),(0,n.createElement)(r.RangeControl,{min:24,max:72,initialPosition:24,withInputField:!1,onChange:e=>E(e)})))),(0,n.createElement)("div",{className:"icon-inserter__content-grid"},[(0,i.isEmpty)(b)&&_,!(0,i.isEmpty)(b)&&x]))))}function mr(e){var t;const[o,c]=(0,n.useState)(""),{setInserterOpen:a,isQuickInserterOpen:m,setQuickInserterOpen:h,setAttributes:v}=e;if(!m)return null;const d=Pi(),w=Bi(d),p=null!==(t=d.filter((e=>e.isDefault))[0]?.icons)&&void 0!==t?t:w;let g=[];if(o&&(g=w.filter((e=>{const t=o.toLowerCase();if(e.title.toLowerCase().includes(t))return!0;if(e?.keywords&&!(0,i.isEmpty)(e?.keywords)){const o=e.keywords.filter((e=>e.includes(t)));return!(0,i.isEmpty)(o)}return!1}))),!o){var u,E;const e=null!==(u=p.filter((e=>e.isDefault)))&&void 0!==u?u:[],t=null!==(E=p.filter((e=>!e.isDefault)))&&void 0!==E?E:[];g=g.concat(e,t)}g=g.slice(0,6);const V=(0,n.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,n.createElement)("div",{className:"icons-list"},g.map((e=>{let t=e.icon;return"string"==typeof t&&(t=nr(t)),(0,n.createElement)(r.Button,{key:`icon-${e.name}`,label:(0,s.__)("Insert Icon","icon-block"),className:l()("icons-list__item",{"has-no-icon-fill":e?.hasNoIconFill}),onClick:()=>{var t,o;t=e.name,o=e?.hasNoIconFill,v({icon:"",iconName:t,hasNoIconFill:o}),a(!1),h(!1),c("")}},(0,n.createElement)("span",{className:"icons-list__item-icon"},(0,n.createElement)(er,{icon:t})),(0,n.createElement)("span",{className:"icons-list__item-title"},e.title))})))),b=(0,n.createElement)("div",{className:"block-editor-inserter__no-results"},(0,n.createElement)(er,{icon:j,className:"block-editor-inserter__no-results-icon"}),(0,n.createElement)("p",null,(0,s.__)("No results found.","block-icon")));return(0,n.createElement)(r.Popover,{className:"wp-block-outermost-icon-inserter__quick-inserter block-editor-inserter__popover is-quick",onClose:()=>h(!1),position:"bottom center"},(0,n.createElement)("div",{className:"block-editor-inserter__quick-inserter"},(0,n.createElement)(r.SearchControl,{className:"block-editor-inserter__search",label:(0,s.__)("Search icons","icon-block"),hideLabelFromVision:!0,value:o,onChange:e=>c(e)}),(0,n.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},[(0,i.isEmpty)(g)&&b,!(0,i.isEmpty)(g)&&V]),(0,n.createElement)(r.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{a(!0),h(!1),c("")}},(0,s.__)("Browse all","icon-block"))))}function hr(e){const{setInserterOpen:t,isQuickInserterOpen:o,setQuickInserterOpen:c,setCustomInserterOpen:l,attributes:i,setAttributes:m,enableCustomIcons:h,isSVGUploadAllowed:v}=e;return(0,n.createElement)(r.Placeholder,{className:"has-illustration",icon:tr,label:(0,s.__)("Icon","icon-block"),instructions:(()=>{const e={default:(0,s.__)("Choose an icon from the library, pick one from your media library, or insert a custom SVG graphic.","icon-block"),noCustom:(0,s.__)("Choose an icon from the library or pick one from your media library.","icon-block"),noMediaLibrary:(0,s.__)("Choose an icon from the library or insert a custom SVG graphic.","icon-block"),noCustomNoMediaLibrary:(0,s.__)("Browse the icon library and choose one to insert.","icon-block")};return h||v?h?v?e.default:e.noMediaLibrary:e.noCustom:e.noCustomNoMediaLibrary})()},(0,n.createElement)(er,{className:"components-placeholder__illustration",icon:or}),(0,n.createElement)(r.Button,{isPrimary:!0,onClick:()=>c(!0)},(0,s.__)("Icon Library","icon-block")),v&&(0,n.createElement)(a.MediaUpload,{onSelect:e=>ir(e,i,m),allowedTypes:["image/svg+xml"],render:e=>{let{open:t}=e;return(0,n.createElement)(r.Button,{isTertiary:!0,onClick:t},(0,s.__)("Open Media Library","icon-block"))}}),h&&(0,n.createElement)(r.Button,{isTertiary:!0,onClick:()=>l(!0)},(0,s.__)("Insert custom SVG","icon-block")),(0,n.createElement)(mr,{setInserterOpen:t,isQuickInserterOpen:o,setQuickInserterOpen:c,setAttributes:m}))}const vr=window.wp.blob;function dr(e){const{attributes:t,setAttributes:o,mediaUpload:c,isSVGUploadAllowed:l}=e,i=l?(0,s.__)("Drop SVG file to upload","icon-block"):(0,s.__)("Drop SVG file to insert","icon-block");return(0,n.createElement)(r.DropZone,{label:i,onFilesDrop:function(e){if(l)c({allowedTypes:["image/svg+xml"],filesList:e,onFileChange(e){let[n]=e;(0,vr.isBlobURL)(n?.url)||ir(n,t,o)},onError(){lr("fileTypeUploadError")}});else{const t=new window.FileReader;t.readAsText(e[0]),t.onload=e=>{var t;!function(e,t){const o=rr(e);o?t({icon:o,iconName:""}):lr("fileTypeError")}(null!==(t=e?.target?.result)&&void 0!==t?t:"",o)}}}})}const wr="noreferrer noopener",pr=(0,a.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){var o;const{clientId:c,attributes:h,iconBackgroundColor:v,iconColor:d,setAttributes:w,setIconBackgroundColor:p,setIconColor:g}=e,{flipHorizontal:u,flipVertical:E,hasNoIconFill:V,icon:b,iconBackgroundColorValue:f,iconColorValue:z,iconName:x,itemsJustification:_,label:k,linkRel:C,linkTarget:M,linkUrl:y,rotate:H,title:S,width:L,height:P,percentWidth:B}=h;(0,n.useEffect)((()=>{B&&w({width:`${B}%`,percentWidth:void 0})}));const{allowedMimeTypes:G,mediaUpload:T}=(0,ji.useSelect)((e=>{const{getSettings:t}=e("core/block-editor"),{getEditorSettings:o}=e("core/editor");return{allowedMimeTypes:t().allowedMimeTypes?t().allowedMimeTypes:o().allowedMimeTypes,mediaUpload:t().mediaUpload}}),[]),R=!!G&&Object.values(G).includes("image/svg+xml"),{gradientClass:A,gradientValue:N,setGradient:I}=(0,a.__experimentalUseGradient)(),[F,O]=(0,n.useState)(!1),[D,Z]=(0,n.useState)(!1),[U,j]=(0,n.useState)(!1),[$,q]=(0,n.useState)(!1),W=(0,m.applyFilters)("iconBlock.enableCustomIcons",!0),Q=(0,n.useRef)(),J=(0,n.useRef)(),X=!!y,K="_blank"===M,Y=Bi(Pi()).filter((e=>e.name===x));let ee=tr;b&&(0,i.isEmpty)(Y)&&(ee=nr(b),(0,i.isEmpty)(ee?.props)&&(ee=tr));let te=(0,i.isEmpty)(Y)?ee:Y[0].icon;function oe(e){e.preventDefault(),q(!0)}function ne(){w({linkUrl:void 0,linkTarget:void 0,linkRel:void 0}),q(!1)}"string"==typeof te&&(te=nr(te));const ce=(0,n.createElement)(r.DropdownMenu,{icon:"",popoverProps:{className:"outermost-icon-block__replace-popover is-alternate"},text:(0,s.__)("Replace","icon-block")},(e=>{let{onClose:t}=e;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{onClick:()=>{O(!0),t(!0)},icon:tr},(0,s.__)("Browse icon library","icon-block")),R&&(0,n.createElement)(a.MediaUpload,{onSelect:e=>{ir(e,h,w),t(!0)},allowedTypes:["image/svg+xml"],render:e=>{let{open:t}=e;return(0,n.createElement)(r.MenuItem,{onClick:t,icon:Pn},(0,s.__)("Open Media Library","icon-block"))}}),W&&(0,n.createElement)(r.MenuItem,{onClick:()=>{j(!0),t(!0)},icon:Ie},(0,s.__)("Add/edit custom icon","icon-block"))),(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{onClick:()=>{w({icon:void 0,iconName:void 0}),t(!0)}},(0,s.__)("Clear icon","icon-block"))))})),le=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(a.JustifyToolbar,{allowedControls:["left","center","right"],value:_,onChange:e=>w({itemsJustification:e})})),(b||x)&&(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(r.ToolbarGroup,null,(0,n.createElement)(r.ToolbarButton,{name:"link",icon:gn,title:(0,s.__)("Link","icon-block"),shortcut:$i.displayShortcut.primary("k"),onClick:oe,isActive:X})),(0,n.createElement)(r.ToolbarGroup,null,(0,n.createElement)(r.ToolbarButton,{className:`outermost-icon-block__rotate-button-${H}`,icon:Nc,label:(0,s.__)("Rotate","icon-block"),onClick:()=>function(e){const t=(0,i.isNumber)(e)?e:0;let o=t+90;270===t&&(o=0),w({rotate:o})}(H),isPressed:H}),(0,n.createElement)(r.ToolbarButton,{icon:Pt,label:(0,s.__)("Flip Horizontal","icon-block"),onClick:()=>w({flipHorizontal:!u}),isPressed:u}),(0,n.createElement)(r.ToolbarButton,{icon:Gt,label:(0,s.__)("Flip Vertical","icon-block"),onClick:()=>w({flipVertical:!E}),isPressed:E})),(0,n.createElement)(r.ToolbarGroup,null,W||R?ce:(0,n.createElement)(r.ToolbarButton,{onClick:()=>{O(!0)}},(0,s.__)("Replace","icon-block")))),$&&(0,n.createElement)(r.Popover,{position:"bottom center",onClose:()=>{q(!1),J.current?.focus()},anchorRef:Q?.current,focusOnMount:!!$&&"firstElement"},(0,n.createElement)(a.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:y,opensInNewTab:K},onChange:e=>{let{url:t="",opensInNewTab:o}=e;w({linkUrl:t}),K!==o&&function(e){const t=e?"_blank":void 0;let o=C;t&&!C?o=wr:t||C!==wr||(o=void 0),w({linkTarget:t,linkRel:o})}(o)},onRemove:()=>{ne(),J.current?.focus()}}))),ie=[{colorLabel:(0,s.__)("Icon color","icon-block"),colorValue:d.color||z,onChange:e=>{g(e),w({iconColorValue:e})},resetAllFilter:()=>{g(void 0),w({iconColorValue:void 0})}},{colorLabel:(0,s.__)("Background color","icon-block"),colorValue:v.color||f,colorGradientValue:N,onChange:e=>{p(e),w({iconBackgroundColorValue:e})},onGradientChange:I,resetAllFilter:()=>{p(void 0),w({iconBackgroundColorValue:void 0})}}],re=(0,a.__experimentalUseMultipleOriginColorsAndGradients)(),ae=null===(o=re?.hasColorsOrGradients)||void 0===o||o,se=(b||x)&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.InspectorControls,{group:"settings"},(0,n.createElement)(Xi,t({className:"outermost-icon-block__main-settings",label:(0,s.__)("Settings","icon-block"),options:[{attributeSlug:"label",label:(0,s.__)("Label","icon-block"),isDefault:!0},{attributeSlug:"width",label:(0,s.__)("Width","icon-block"),isDefault:!0},{attributeSlug:"height",label:(0,s.__)("Height","icon-block")}]},e),(0,n.createElement)(r.TextControl,{label:(0,s.__)("Label","icon-block"),help:(0,s.__)("Briefly describe the icon to help screen reader users.","icon-block"),value:k||"",onChange:e=>w({label:e})}),(0,n.createElement)(Yi,{label:(0,s.__)("Width","icon-block"),value:L,onChange:e=>w({width:e})}),void 0!==P&&(0,n.createElement)(Yi,{label:(0,s.__)("Height","icon-block"),value:P,onChange:e=>w({height:e}),units:["px","em","rem","vh","vw"]}))),ae&&(0,n.createElement)(a.InspectorControls,{group:"color"},ie.map((e=>{let{colorLabel:o,colorValue:l,colorGradientValue:i,onChange:r,onGradientChange:s,resetAllFilter:m}=e;return(0,n.createElement)(a.__experimentalColorGradientSettingsDropdown,t({key:`icon-block-color-${k}`,__experimentalIsRenderedInSidebar:!0,settings:[{label:o,colorValue:l,gradientValue:i,onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:m,enableAlpha:!0}],panelId:c},re))})),(d.color||z)&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",{className:"outermost-icon-block__color-settings__help"},(0,s.__)("Any color or fill values in the SVG icon itself will take precedent over the chosen color.","icon-block")),(0,n.createElement)(r.ToggleControl,{className:"outermost-icon-block__color-settings__apply-fill",checked:!V,label:(0,s.__)("Apply icon color to fill","icon-block"),help:(0,s.__)("Set the SVG fill value to the chosen icon color. Disable as needed.","icon-block"),onChange:()=>w({hasNoIconFill:!V})})),(0,n.createElement)(a.ContrastChecker,{textColor:z,backgroundColor:f,isLargeText:!1})),(0,n.createElement)(a.InspectorControls,{__experimentalGroup:"advanced"},(0,n.createElement)(r.TextControl,{label:(0,s.__)("Link rel","icon-block"),value:C||"",onChange:e=>w({linkRel:e})}),(0,n.createElement)(r.TextControl,{label:(0,s.__)("Title attribute","icon-block"),className:"outermost-icon-block__title-control",value:S||"",onChange:e=>w({title:e}),help:(0,n.createElement)(n.Fragment,null,(0,s.__)("Describe the role of this icon on the page.","icon-block"),(0,n.createElement)(r.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,s.__)("Note: many devices and browsers do not display this text","icon-block")))}))),me=(0,a.useBlockProps)(),he=(0,a.__experimentalGetBorderClassesAndStyles)(h),ve=v?.slug||h.iconBackgroundColor,de=d?.slug||h.iconColor,we=l()("icon-container",he?.className,{"has-icon-color":d.color||z,"has-no-icon-fill-color":V,"has-icon-background-color":v.color||f||N,"has-background-gradient":N,[`has-${de}-color`]:de,[`has-${ve}-background-color`]:ve,[A]:A,[`items-justified-${_}`]:_,[`rotate-${H}`]:H,"flip-horizontal":u,"flip-vertical":E}),[pe,ge]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(L);let ue=P?void 0:"48px";pe&&(ue=ge?`${pe}${ge}`:`${pe}px`);const Ee={background:N,backgroundColor:f,...me.style,...he.style,color:z,width:ue,height:P||void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},Ve={marginBottom:me.style?.marginBottom,marginLeft:me.style?.marginLeft,marginRight:me.style?.marginRight,marginTop:me.style?.marginTop},be=(0,n.createElement)(n.Fragment,null,b||x?(0,n.createElement)("div",{ref:J,className:we,style:Ee},te):(0,n.createElement)(hr,{setInserterOpen:O,isQuickInserterOpen:D,setQuickInserterOpen:Z,isCustomInserterOpen:U,setCustomInserterOpen:j,attributes:h,setAttributes:w,enableCustomIcons:W,isSVGUploadAllowed:R}));return(0,n.createElement)(n.Fragment,null,le,se,(0,n.createElement)("div",t({},(0,a.useBlockProps)({className:_&&`items-justified-${_}`,ref:Q,onKeyDown:function(e){$i.isKeyboardEvent.primary(e,"k")?oe(e):$i.isKeyboardEvent.primaryShift(e,"k")&&(ne(),J.current?.focus())}}),{style:Ve}),be,(0,n.createElement)(dr,{attributes:h,setAttributes:w,mediaUpload:T,isSVGUploadAllowed:R})),(0,n.createElement)(sr,{isInserterOpen:F,setInserterOpen:O,attributes:h,setAttributes:w}),W&&(0,n.createElement)(ar,{isCustomInserterOpen:U,setCustomInserterOpen:j,attributes:h,setAttributes:w}))})),gr=JSON.parse('{"apiVersion":2,"name":"outermost/icon-block","title":"Icon","category":"media","description":"Insert an SVG icon or graphic.","keywords":["icon","svg"],"attributes":{"icon":{"type":"string","source":"html","selector":".icon-container","default":""},"iconName":{"type":"string"},"itemsJustification":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"gradient":{"type":"string"},"customGradient":{"type":"string"},"hasNoIconFill":{"type":"boolean"},"label":{"type":"string"},"title":{"type":"string"},"linkUrl":{"type":"string"},"linkRel":{"type":"string"},"linkTarget":{"type":"string"},"rotate":{"type":"number"},"flipHorizontal":{"type":"boolean"},"flipVertical":{"type":"boolean"},"width":{"type":["string","number"]},"height":{"type":"string"},"percentWidth":{"type":"number"}},"supports":{"anchor":true,"align":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSelector":".icon-container","__experimentalSkipSerialization":true},"spacing":{"padding":true,"margin":true}},"textdomain":"icon-block","editorScript":"file:./index.js","editorStyle":"file:./editor.css","style":"file:./style.css"}'),{name:ur}=gr,Er={icon:tr,example:{attributes:{icon:'',iconColorValue:"#ffffff",iconBackgroundColorValue:"#0F172A",itemsJustification:"center",width:"60px",style:{border:{radius:"50px"},spacing:{padding:{top:"10px",right:"10px",bottom:"10px",left:"10px"}}}}},edit:pr,save:function(e){const{customGradient:o,flipHorizontal:c,flipVertical:s,gradient:m,hasNoIconFill:h,icon:v,iconBackgroundColor:d,iconBackgroundColorValue:w,iconColor:p,iconColorValue:g,iconName:u,itemsJustification:E,label:V,linkRel:b,linkTarget:f,linkUrl:z,rotate:x,title:_,width:k,height:C}=e.attributes;if(!v&&!u)return null;const M=Bi(Pi()).filter((e=>e.name===u));let y="";if(v&&(0,i.isEmpty)(M)?(y=nr(v),(0,i.isEmpty)(y?.props)&&(y="")):(y=M[0]?.icon,"string"==typeof y&&(y=nr(y))),!y)return null;V&&(y={...y,props:{...y.props,"aria-label":V}});const H=a.useBlockProps.save(),S=(0,a.__experimentalGetBorderClassesAndStyles)(e.attributes),L=l()("icon-container",S?.className,{"has-icon-color":g,"has-no-icon-fill-color":h,"has-icon-background-color":w||d||m||o,[`has-${d}-background-color`]:d,[`has-${p}-color`]:p,[`has-${m}-gradient-background`]:m,[`rotate-${x}`]:x,"flip-horizontal":c,"flip-vertical":s}),[P,B]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(k);let G=C?void 0:"48px";P&&(G=B?`${P}${B}`:`${P}px`);const T={background:m?void 0:o,backgroundColor:w,color:g,width:G,height:C||void 0,...H.style,...S.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},R=a.useBlockProps.save()?.style,A={marginBottom:R?.marginBottom,marginLeft:R?.marginLeft,marginRight:R?.marginRight,marginTop:R?.marginTop},N=(0,i.isEmpty)(b)?void 0:b,I=(0,i.isEmpty)(f)?void 0:f,F=(0,n.createElement)(n.Fragment,null,z?(0,n.createElement)("a",{className:L,href:z,target:I,rel:N,style:T,"aria-label":V||null},y):(0,n.createElement)("div",{className:L,style:T},y));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:E&&`items-justified-${E}`}),{style:A,title:_}),F)},deprecated:Ui};(0,e.registerBlockType)({name:ur,...gr},Er)})()})(); \ No newline at end of file +(0,s._n)('%1$s search result for "%2$s"','%1$s search results for "%2$s"',b.length,"icon-block"),b.length,w)),(0,n.createElement)("div",{className:"icon-controls"},(0,n.createElement)("div",{className:"icon-controls__size"},(0,n.createElement)("span",null,(0,s.__)("Preview size","icon-block")),(0,n.createElement)(r.RangeControl,{min:24,max:72,initialPosition:24,withInputField:!1,onChange:e=>V(e)})))),(0,n.createElement)("div",{className:"icon-inserter__content-grid"},[(0,i.isEmpty)(b)&&z,!(0,i.isEmpty)(b)&&_]))))}function Qr(e){var t;const[o,c]=(0,n.useState)(""),{setInserterOpen:a,isQuickInserterOpen:m,setQuickInserterOpen:h,setAttributes:v}=e;if(!m)return null;const w=Vr(),d=Er(w),g=null!==(t=w.filter((e=>e.isDefault))[0]?.icons)&&void 0!==t?t:d;let p=[];if(o&&(p=d.filter((e=>{const t=o.toLowerCase();if(e.title.toLowerCase().includes(t))return!0;if(e?.keywords&&!(0,i.isEmpty)(e?.keywords)){const o=e.keywords.filter((e=>e.includes(t)));return!(0,i.isEmpty)(o)}return!1}))),!o){var u,V;const e=null!==(u=g.filter((e=>e.isDefault)))&&void 0!==u?u:[],t=null!==(V=g.filter((e=>!e.isDefault)))&&void 0!==V?V:[];p=p.concat(e,t)}p=p.slice(0,6);const E=(0,n.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,n.createElement)("div",{className:"icons-list"},p.map((e=>{let t=e.icon;return"string"==typeof t&&(t=Dr(t)),(0,n.createElement)(r.Button,{key:`icon-${e.name}`,label:(0,s.__)("Insert Icon","icon-block"),className:l()("icons-list__item",{"has-no-icon-fill":e?.hasNoIconFill}),onClick:()=>{var t,o;t=e.name,o=e?.hasNoIconFill,v({icon:"",iconName:t,hasNoIconFill:o}),a(!1),h(!1),c("")}},(0,n.createElement)("span",{className:"icons-list__item-icon"},(0,n.createElement)(Ir,{icon:t})),(0,n.createElement)("span",{className:"icons-list__item-title"},e.title))})))),b=(0,n.createElement)("div",{className:"block-editor-inserter__no-results"},(0,n.createElement)(Ir,{icon:j,className:"block-editor-inserter__no-results-icon"}),(0,n.createElement)("p",null,(0,s.__)("No results found.","block-icon")));return(0,n.createElement)(r.Popover,{className:"wp-block-outermost-icon-inserter__quick-inserter block-editor-inserter__popover is-quick",onClose:()=>h(!1),position:"bottom center"},(0,n.createElement)("div",{className:"block-editor-inserter__quick-inserter"},(0,n.createElement)(r.SearchControl,{className:"block-editor-inserter__search",label:(0,s.__)("Search icons","icon-block"),hideLabelFromVision:!0,value:o,onChange:e=>c(e)}),(0,n.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},[(0,i.isEmpty)(p)&&b,!(0,i.isEmpty)(p)&&E]),(0,n.createElement)(r.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{a(!0),h(!1),c("")}},(0,s.__)("Browse all","icon-block"))))}function Xr(e){const{setInserterOpen:t,isQuickInserterOpen:o,setQuickInserterOpen:c,setCustomInserterOpen:l,attributes:i,setAttributes:m,enableCustomIcons:h,isSVGUploadAllowed:v}=e;return(0,n.createElement)(r.Placeholder,{className:"has-illustration",icon:Or,label:(0,s.__)("Icon","icon-block"),instructions:(()=>{const e={default:(0,s.__)("Choose an icon from the library, pick one from your media library, or insert a custom SVG graphic.","icon-block"),noCustom:(0,s.__)("Choose an icon from the library or pick one from your media library.","icon-block"),noMediaLibrary:(0,s.__)("Choose an icon from the library or insert a custom SVG graphic.","icon-block"),noCustomNoMediaLibrary:(0,s.__)("Browse the icon library and choose one to insert.","icon-block")};return h||v?h?v?e.default:e.noMediaLibrary:e.noCustom:e.noCustomNoMediaLibrary})()},(0,n.createElement)(Ir,{className:"components-placeholder__illustration",icon:Fr}),(0,n.createElement)(r.Button,{isPrimary:!0,onClick:()=>c(!0)},(0,s.__)("Icon Library","icon-block")),v&&(0,n.createElement)(a.MediaUpload,{onSelect:e=>$r(e,i,m),allowedTypes:["image/svg+xml"],render:e=>{let{open:t}=e;return(0,n.createElement)(r.Button,{isTertiary:!0,onClick:t},(0,s.__)("Open Media Library","icon-block"))}}),h&&(0,n.createElement)(r.Button,{isTertiary:!0,onClick:()=>l(!0)},(0,s.__)("Insert custom SVG","icon-block")),(0,n.createElement)(Qr,{setInserterOpen:t,isQuickInserterOpen:o,setQuickInserterOpen:c,setAttributes:m}))}const Kr=window.wp.blob;function Yr(e){const{attributes:t,setAttributes:o,mediaUpload:c,isSVGUploadAllowed:l}=e,i=l?(0,s.__)("Drop SVG file to upload","icon-block"):(0,s.__)("Drop SVG file to insert","icon-block");return(0,n.createElement)(r.DropZone,{label:i,onFilesDrop:function(e){if(l)c({allowedTypes:["image/svg+xml"],filesList:e,onFileChange(e){let[n]=e;(0,Kr.isBlobURL)(n?.url)||$r(n,t,o)},onError(){jr("fileTypeUploadError")}});else{const t=new window.FileReader;t.readAsText(e[0]),t.onload=e=>{var t;!function(e,t){const o=qr(e);o?t({icon:o,iconName:""}):jr("fileTypeError")}(null!==(t=e?.target?.result)&&void 0!==t?t:"",o)}}}})}const ea="noreferrer noopener",ta=(0,a.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){var o;const{clientId:c,attributes:h,iconBackgroundColor:v,iconColor:w,setAttributes:d,setIconBackgroundColor:g,setIconColor:p}=e,{flipHorizontal:u,flipVertical:V,hasNoIconFill:E,icon:b,iconBackgroundColorValue:f,iconColorValue:x,iconName:_,itemsJustification:z,label:C,linkRel:k,linkTarget:M,linkUrl:y,rotate:H,title:S,width:L,height:P,percentWidth:B}=h;(0,n.useEffect)((()=>{B&&d({width:`${B}%`,percentWidth:void 0})}));const{allowedMimeTypes:G,mediaUpload:T}=(0,Lr.useSelect)((e=>{const{getSettings:t}=e("core/block-editor"),{getEditorSettings:o}=e("core/editor");return{allowedMimeTypes:t().allowedMimeTypes?t().allowedMimeTypes:o().allowedMimeTypes,mediaUpload:t().mediaUpload}}),[]),R=!!G&&Object.values(G).includes("image/svg+xml"),{gradientClass:A,gradientValue:N,setGradient:Z}=(0,a.__experimentalUseGradient)(),[I,O]=(0,n.useState)(!1),[F,D]=(0,n.useState)(!1),[U,j]=(0,n.useState)(!1),[$,q]=(0,n.useState)(!1),W=(0,m.applyFilters)("iconBlock.enableCustomIcons",!0),J=(0,n.useRef)(),Q=(0,n.useRef)(),X=!!y,K="_blank"===M,Y=Er(Vr()).filter((e=>e.name===_));let ee=Or;b&&(0,i.isEmpty)(Y)&&(ee=Dr(b),(0,i.isEmpty)(ee?.props)&&(ee=Or));let te=(0,i.isEmpty)(Y)?ee:Y[0].icon;function oe(e){e.preventDefault(),q(!0)}function ne(){d({linkUrl:void 0,linkTarget:void 0,linkRel:void 0}),q(!1)}"string"==typeof te&&(te=Dr(te));const ce=(0,n.createElement)(r.DropdownMenu,{icon:"",popoverProps:{className:"outermost-icon-block__replace-popover is-alternate"},text:(0,s.__)("Replace","icon-block")},(e=>{let{onClose:t}=e;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{onClick:()=>{O(!0),t(!0)},icon:Or},(0,s.__)("Browse icon library","icon-block")),R&&(0,n.createElement)(a.MediaUpload,{onSelect:e=>{$r(e,h,d),t(!0)},allowedTypes:["image/svg+xml"],render:e=>{let{open:t}=e;return(0,n.createElement)(r.MenuItem,{onClick:t,icon:sc},(0,s.__)("Open Media Library","icon-block"))}}),W&&(0,n.createElement)(r.MenuItem,{onClick:()=>{j(!0),t(!0)},icon:je},(0,s.__)("Add/edit custom icon","icon-block"))),(0,n.createElement)(r.MenuGroup,null,(0,n.createElement)(r.MenuItem,{onClick:()=>{d({icon:void 0,iconName:void 0}),t(!0)}},(0,s.__)("Clear icon","icon-block"))))})),le=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(a.JustifyToolbar,{allowedControls:["left","center","right"],value:z,onChange:e=>d({itemsJustification:e})})),(b||_)&&(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(r.ToolbarGroup,null,(0,n.createElement)(r.ToolbarButton,{name:"link",icon:On,title:(0,s.__)("Link","icon-block"),shortcut:Pr.displayShortcut.primary("k"),onClick:oe,isActive:X})),(0,n.createElement)(r.ToolbarGroup,null,(0,n.createElement)(r.ToolbarButton,{className:`outermost-icon-block__rotate-button-${H}`,icon:El,label:(0,s.__)("Rotate","icon-block"),onClick:()=>function(e){const t=(0,i.isNumber)(e)?e:0;let o=t+90;270===t&&(o=0),d({rotate:o})}(H),isPressed:H}),(0,n.createElement)(r.ToolbarButton,{icon:Wt,label:(0,s.__)("Flip Horizontal","icon-block"),onClick:()=>d({flipHorizontal:!u}),isPressed:u}),(0,n.createElement)(r.ToolbarButton,{icon:Qt,label:(0,s.__)("Flip Vertical","icon-block"),onClick:()=>d({flipVertical:!V}),isPressed:V})),(0,n.createElement)(r.ToolbarGroup,null,W||R?ce:(0,n.createElement)(r.ToolbarButton,{onClick:()=>{O(!0)}},(0,s.__)("Replace","icon-block")))),$&&(0,n.createElement)(r.Popover,{position:"bottom center",onClose:()=>{q(!1),Q.current?.focus()},anchorRef:J?.current,focusOnMount:!!$&&"firstElement"},(0,n.createElement)(a.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:y,opensInNewTab:K},onChange:e=>{let{url:t="",opensInNewTab:o}=e;d({linkUrl:t}),K!==o&&function(e){const t=e?"_blank":void 0;let o=k;t&&!k?o=ea:t||k!==ea||(o=void 0),d({linkTarget:t,linkRel:o})}(o)},onRemove:()=>{ne(),Q.current?.focus()}}))),ie=[{colorLabel:(0,s.__)("Icon color","icon-block"),colorValue:w.color||x,onChange:e=>{p(e),d({iconColorValue:e})},resetAllFilter:()=>{p(void 0),d({iconColorValue:void 0})}},{colorLabel:(0,s.__)("Background color","icon-block"),colorValue:v.color||f,colorGradientValue:N,onChange:e=>{g(e),d({iconBackgroundColorValue:e})},onGradientChange:Z,resetAllFilter:()=>{g(void 0),d({iconBackgroundColorValue:void 0})}}],re=(0,a.__experimentalUseMultipleOriginColorsAndGradients)(),ae=null===(o=re?.hasColorsOrGradients)||void 0===o||o,se=(b||_)&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.InspectorControls,{group:"settings"},(0,n.createElement)(Ar,t({className:"outermost-icon-block__main-settings",label:(0,s.__)("Settings","icon-block"),options:[{attributeSlug:"label",label:(0,s.__)("Label","icon-block"),isDefault:!0},{attributeSlug:"width",label:(0,s.__)("Width","icon-block"),isDefault:!0},{attributeSlug:"height",label:(0,s.__)("Height","icon-block")}]},e),(0,n.createElement)(r.TextControl,{label:(0,s.__)("Label","icon-block"),help:(0,s.__)("Briefly describe the icon to help screen reader users.","icon-block"),value:C||"",onChange:e=>d({label:e})}),(0,n.createElement)(Zr,{label:(0,s.__)("Width","icon-block"),value:L,onChange:e=>d({width:e})}),void 0!==P&&(0,n.createElement)(Zr,{label:(0,s.__)("Height","icon-block"),value:P,onChange:e=>d({height:e}),units:["px","em","rem","vh","vw"]}))),ae&&(0,n.createElement)(a.InspectorControls,{group:"color"},ie.map((e=>{let{colorLabel:o,colorValue:l,colorGradientValue:i,onChange:r,onGradientChange:s,resetAllFilter:m}=e;return(0,n.createElement)(a.__experimentalColorGradientSettingsDropdown,t({key:`icon-block-color-${C}`,__experimentalIsRenderedInSidebar:!0,settings:[{label:o,colorValue:l,gradientValue:i,onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:m,enableAlpha:!0}],panelId:c},re))})),(w.color||x)&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",{className:"outermost-icon-block__color-settings__help"},(0,s.__)("Any color or fill values in the SVG icon itself will take precedent over the chosen color.","icon-block")),(0,n.createElement)(r.ToggleControl,{className:"outermost-icon-block__color-settings__apply-fill",checked:!E,label:(0,s.__)("Apply icon color to fill","icon-block"),help:(0,s.__)("Set the SVG fill value to the chosen icon color. Disable as needed.","icon-block"),onChange:()=>d({hasNoIconFill:!E})})),(0,n.createElement)(a.ContrastChecker,{textColor:x,backgroundColor:f,isLargeText:!1})),(0,n.createElement)(a.InspectorControls,{group:"advanced"},(0,n.createElement)(r.TextControl,{label:(0,s.__)("Link rel","icon-block"),value:k||"",onChange:e=>d({linkRel:e})}),(0,n.createElement)(r.TextControl,{label:(0,s.__)("Title attribute","icon-block"),className:"outermost-icon-block__title-control",value:S||"",onChange:e=>d({title:e}),help:(0,n.createElement)(n.Fragment,null,(0,s.__)("Describe the role of this icon on the page.","icon-block"),(0,n.createElement)(r.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,s.__)("Note: many devices and browsers do not display this text","icon-block")))}))),me=(0,a.useBlockProps)(),he=(0,a.__experimentalGetBorderClassesAndStyles)(h),ve=v?.slug||h.iconBackgroundColor,we=w?.slug||h.iconColor,de=l()("icon-container",he?.className,{"has-icon-color":w.color||x,"has-no-icon-fill-color":E,"has-icon-background-color":v.color||f||N,"has-background-gradient":N,[`has-${we}-color`]:we,[`has-${ve}-background-color`]:ve,[A]:A,[`items-justified-${z}`]:z,[`rotate-${H}`]:H,"flip-horizontal":u,"flip-vertical":V}),[ge,pe]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(L);let ue=P?void 0:"48px";ge&&(ue=pe?`${ge}${pe}`:`${ge}px`);const Ve={background:N,backgroundColor:f,...me.style,...he.style,color:x,width:ue,height:P||void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},Ee={marginBottom:me.style?.marginBottom,marginLeft:me.style?.marginLeft,marginRight:me.style?.marginRight,marginTop:me.style?.marginTop},be=(0,n.createElement)(n.Fragment,null,b||_?(0,n.createElement)("div",{ref:Q,className:de,style:Ve},te):(0,n.createElement)(Xr,{setInserterOpen:O,isQuickInserterOpen:F,setQuickInserterOpen:D,isCustomInserterOpen:U,setCustomInserterOpen:j,attributes:h,setAttributes:d,enableCustomIcons:W,isSVGUploadAllowed:R}));return(0,n.createElement)(n.Fragment,null,le,se,(0,n.createElement)("div",t({},(0,a.useBlockProps)({className:z&&`items-justified-${z}`,ref:J,onKeyDown:function(e){Pr.isKeyboardEvent.primary(e,"k")?oe(e):Pr.isKeyboardEvent.primaryShift(e,"k")&&(ne(),Q.current?.focus())}}),{style:Ee}),be,(0,n.createElement)(Yr,{attributes:h,setAttributes:d,mediaUpload:T,isSVGUploadAllowed:R})),(0,n.createElement)(Jr,{isInserterOpen:I,setInserterOpen:O,attributes:h,setAttributes:d}),W&&(0,n.createElement)(Wr,{isCustomInserterOpen:U,setCustomInserterOpen:j,attributes:h,setAttributes:d}))})),oa=JSON.parse('{"apiVersion":3,"name":"outermost/icon-block","title":"Icon","category":"media","description":"Insert an SVG icon or graphic.","keywords":["icon","svg"],"attributes":{"icon":{"type":"string","source":"html","selector":".icon-container","default":""},"iconName":{"type":"string"},"itemsJustification":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"gradient":{"type":"string"},"customGradient":{"type":"string"},"hasNoIconFill":{"type":"boolean"},"label":{"type":"string"},"title":{"type":"string"},"linkUrl":{"type":"string"},"linkRel":{"type":"string"},"linkTarget":{"type":"string"},"rotate":{"type":"number"},"flipHorizontal":{"type":"boolean"},"flipVertical":{"type":"boolean"},"width":{"type":["string","number"]},"height":{"type":"string"},"percentWidth":{"type":"number"}},"supports":{"anchor":true,"align":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSelector":".icon-container","__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":false,"radius":false,"style":false,"width":false}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"icon-block","editorScript":"file:./index.js","editorStyle":"file:./editor.css","style":"file:./style.css"}'),{name:na}=oa,ca={icon:Or,example:{attributes:{icon:'',iconColorValue:"#ffffff",iconBackgroundColorValue:"#0F172A",itemsJustification:"center",width:"60px",style:{border:{radius:"50px"},spacing:{padding:{top:"10px",right:"10px",bottom:"10px",left:"10px"}}}}},edit:ta,save:function(e){const{customGradient:o,flipHorizontal:c,flipVertical:s,gradient:m,hasNoIconFill:h,icon:v,iconBackgroundColor:w,iconBackgroundColorValue:d,iconColor:g,iconColorValue:p,iconName:u,itemsJustification:V,label:E,linkRel:b,linkTarget:f,linkUrl:x,rotate:_,title:z,width:C,height:k}=e.attributes;if(!v&&!u)return null;const M=Er(Vr()).filter((e=>e.name===u));let y="";if(v&&(0,i.isEmpty)(M)?(y=Dr(v),(0,i.isEmpty)(y?.props)&&(y="")):(y=M[0]?.icon,"string"==typeof y&&(y=Dr(y))),!y)return null;E&&(y={...y,props:{...y.props,"aria-label":E}});const H=a.useBlockProps.save(),S=(0,a.__experimentalGetBorderClassesAndStyles)(e.attributes),L=l()("icon-container",S?.className,{"has-icon-color":p,"has-no-icon-fill-color":h,"has-icon-background-color":d||w||m||o,[`has-${w}-background-color`]:w,[`has-${g}-color`]:g,[`has-${m}-gradient-background`]:m,[`rotate-${_}`]:_,"flip-horizontal":c,"flip-vertical":s}),[P,B]=(0,r.__experimentalParseQuantityAndUnitFromRawValue)(C);let G=k?void 0:"48px";P&&(G=B?`${P}${B}`:`${P}px`);const T={background:m?void 0:o,backgroundColor:d,color:p,width:G,height:k||void 0,...H.style,...S.style,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,marginTop:void 0},R=a.useBlockProps.save()?.style,A={marginBottom:R?.marginBottom,marginLeft:R?.marginLeft,marginRight:R?.marginRight,marginTop:R?.marginTop},N=(0,i.isEmpty)(b)?void 0:b,Z=(0,i.isEmpty)(f)?void 0:f,I=(0,n.createElement)(n.Fragment,null,x?(0,n.createElement)("a",{className:L,href:x,target:Z,rel:N,style:T,"aria-label":E||null},y):(0,n.createElement)("div",{className:L,style:T},y));return(0,n.createElement)("div",t({},a.useBlockProps.save({className:V&&`items-justified-${V}`}),{style:A,title:z}),I)},deprecated:Sr};(0,e.registerBlockType)({name:na,...oa},ca)})()})(); \ No newline at end of file