(()=>{"use strict";const e=window.lodash,t=window.wp.element,r=window.wp.primitives,a=(0,t.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(r.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})),o=window.wp.blocks,n=JSON.parse('{"$schema":"https://json.schemastore.org/block.json","apiVersion":2,"name":"small-plugins/term-abbreviation","title":"Term Abbreviation","category":"text","description":"Display a post term abbreviation.","keywords":["category","labels"],"attributes":{"content":{"type":"string","default":""}},"version":"1.0.0","textdomain":"category-labels-block","editorScript":"category-abbreviation-block-script","parent":["small-plugins/post-term","small-plugins/primary-term"],"supports":{"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalSkipSerialization":["textDecoration"],"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"border":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true},"color":{"background":true,"link":false,"text":true}}}');function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},i.apply(this,arguments)}const l=window.wp.i18n,s=window.wp.blockEditor;"true"===(0,e.get)(smallPluginsCategoryLabelsBlockData,"isPremium")&&(0,o.registerBlockType)(n,{icon:a,edit:function(e){const r=(0,s.useBlockProps)({className:"clb-category-abbreviation"}),{content:a}=e.attributes;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(s.RichText,i({},r,{tagName:"span",value:a,placeholder:(0,l.__)("?"),allowedFormats:["core/bold","core/italic"],onChange:t=>e.setAttributes({content:t})})))},save:function(r){const{content:a}=r.attributes,o=s.useBlockProps.save({className:"clb-category-abbreviation"});return(0,t.createElement)(s.RichText.Content,i({},o,{tagName:"span",value:(0,e.isEmpty)(a)?"?":a}))}})})();