You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
44 KiB

(()=>{var e,t={843:(e,t,a)=>{"use strict";const i=window.wp.blocks;(0,window.wp.hooks.addFilter)("blockEditor.useSetting.before","MFB/blockEditor.useSetting.before",((e,t,a,i)=>"mfb/meta-field-block"!==i?e:!!["color.text","color.background","color.link"].includes(t)||e));const n=window.React,l=window.wp.i18n,o=window.wp.blockEditor,r=window.wp.components,s=["div","h1","h2","h3","h4","h5","h6","span","p","header","footer","section"],c={className:"mfb-tagname-dropdown"},d=({value:e})=>(0,n.createElement)("strong",{style:{fontFamily:"sans-serif",fontWeight:800,fontSize:"1.3em",textAlign:"center",letterSpacing:"-1px"}},e.toUpperCase());function p({value:e,onChange:t}){return(0,n.createElement)(r.ToolbarDropdownMenu,{popoverProps:c,label:(0,l.__)("Change tag name","display-a-meta-field-as-block"),text:(0,n.createElement)(d,{value:e}),icon:null,controls:s.map((a=>{{const i=a===e;return{key:a,title:(0,n.createElement)(d,{value:a}),label:a,isActive:i,onClick(){t(a)},role:"menuitemradio"}}}))})}var f=a(856),m=a.n(f),u=a(967),y=a.n(u);const g=({value:e,isLoading:t,fieldType:a,type:i,className:l,TagName:s="div",textAlign:c,prefix:d,suffix:p,prefixSettings:f,suffixSettings:u,displayLayout:g="",showOutline:h=!1})=>{const b="div"===s?"div":"span",_=d?(0,n.createElement)(b,{className:"prefix",style:{...f,...f?.gap?.top?{"--mfb--gap":(0,o.getSpacingPresetCssVar)(f.gap.top)}:{}},dangerouslySetInnerHTML:{__html:m().sanitize(d)}}):null,v=p?(0,n.createElement)(b,{className:"suffix",style:{...u,...u?.gap?.top?{"--mfb--gap":(0,o.getSpacingPresetCssVar)(u.gap.top)}:{}},dangerouslySetInnerHTML:{__html:m().sanitize(p)}}):null;return(0,n.createElement)(s,{...(0,o.useBlockProps)({className:y()(l,{[`is-${i}-field`]:i,[`is-${a}-field`]:a,[`has-text-align-${c}`]:c,[`is-display-${g}`]:g}),style:h?{minHeight:"1em",outline:"1px dashed"}:null})},_,t?(0,n.createElement)(r.Spinner,null):(0,n.createElement)(b,{className:"value",dangerouslySetInnerHTML:{__html:e?m().sanitize(e):e}}),v)},h=({fieldType:e,fieldTypeOptions:t,fieldTypeHelpMessages:a,setAttributes:i,fieldName:o,setFieldName:s,fieldNameHelp:c})=>{var d;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.SelectControl,{label:(0,l.__)("Field type","display-a-meta-field-as-block"),value:e,onChange:e=>i({fieldType:e}),options:t,help:null!==(d=a[e])&&void 0!==d?d:(0,l.__)("Choose a field type","display-a-meta-field-as-block")}),(0,n.createElement)(r.TextControl,{autoComplete:"off",label:(0,l.__)("Field name","display-a-meta-field-as-block"),value:o,onChange:s,help:c}))},b=({setAttributes:e,hideEmpty:t,hasEmptyMessage:a=!0,emptyMessage:i})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.ToggleControl,{label:(0,l.__)("Hide block if the value is empty","display-a-meta-field-as-block"),checked:t,onChange:t=>e({hideEmpty:t})}),!t&&a&&(0,n.createElement)(r.TextControl,{label:(0,l.__)("Empty message","display-a-meta-field-as-block"),value:i,onChange:t=>e({emptyMessage:t}),help:(0,l.__)("Display this text if the value is empty.","display-a-meta-field-as-block")})),_=window.lodash,v=window.wp.element,k=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),E=(0,l.__)("<code>This data type is not supported!</code>","display-a-meta-field-as-block"),x=(0,l.__)("<code>No value</code>","display-a-meta-field-as-block"),T=(0,l.__)("<code>No value</code>","display-a-meta-field-as-block"),S=[{label:(0,l.__)("Default 'meta'","display-a-meta-field-as-block"),value:"meta"},{label:(0,l.__)("ACF - Advanced Custom Fields","display-a-meta-field-as-block"),value:"acf"},{label:(0,l.__)("Dynamic field","display-a-meta-field-as-block"),value:"dynamic"},{label:(0,l.__)("Custom rest field","display-a-meta-field-as-block"),value:"rest_field"}],w={meta:(0,n.createElement)(v.Fragment,null,(0,l.__)("Fields are registered with ","display-a-meta-field-as-block"),(0,n.createElement)(r.ExternalLink,{href:"https://developer.wordpress.org/reference/functions/register_meta/"},"register_meta"),(0,l.__)(" and 'show_in_rest' setting is enable.","display-a-meta-field-as-block")),acf:(0,n.createElement)(v.Fragment,null,(0,l.__)("Fields are registered with ","display-a-meta-field-as-block"),(0,n.createElement)(r.ExternalLink,{href:"https://wordpress.org/plugins/advanced-custom-fields/"},"Advanced Custom Fields"),(0,l.__)(" and 'Show in REST API' setting is ON.","display-a-meta-field-as-block")),rest_field:(0,n.createElement)(v.Fragment,null,(0,l.__)("Fields are registered with ","display-a-meta-field-as-block"),(0,n.createElement)(r.ExternalLink,{href:"https://developer.wordpress.org/reference/functions/register_rest_field/"},"register_rest_field."),(0,l.__)("The 'rest field' and the 'custom field' should be the same name. Or adding a filter for the hook `apply_filters( 'meta_field_block_get_block_content', $content, $attributes, $block, $object_id, $object_type )` to get value for front end.","display-a-meta-field-as-block")),dynamic:(0,n.createElement)(v.Fragment,null,(0,l.__)("You can use any field whose value is a string or can be converted to a string. The changes made by the hook `meta_field_block_get_block_content` can be seen on both the front end and the editor. You can also run a shortcode by inputting it in the field name.","display-a-meta-field-as-block"))},A=["footnotes","_acf_changed"],N=({fieldName:e,fieldType:t,metaFields:a,ACFFields:i,ACFFieldObject:n,restFieldValue:l,settingFieldValue:o,dynamicValue:r})=>{let s;var c;if(e)if("meta"===t)"object"===k(a)&&(s=null!==(c=a[e])&&void 0!==c?c:"");else if("acf"===t){var d;"object"===k(i)&&null!==(d=i[e])&&void 0!==d&&d?s=i[e]:"object"===k(n)&&n?.field?.key===e&&(s=n)}else s="option"===t?o:"dynamic"===t?r:l;return s},C=(0,l.__)("Prefix and suffix","display-a-meta-field-as-block"),F=(0,l.__)("Prefix","display-a-meta-field-as-block"),O=(0,l.__)("Suffix","display-a-meta-field-as-block"),D=window.wp.data,L=window.wp.coreData,M=window.wp.editor,R=window.wp.url,I=window.wp.apiFetch;var H=a.n(I);const j=({setAttributes:e,labelAsPrefix:t,prefix:a,suffix:i,fieldType:o,displayLayout:s})=>(0,n.createElement)(n.Fragment,null,"acf"===o&&(0,n.createElement)(r.ToggleControl,{label:(0,l.__)("Use field label as prefix","display-a-meta-field-as-block"),checked:t,onChange:t=>e({labelAsPrefix:t})}),(0,n.createElement)(r.TextControl,{label:F,value:a,onChange:t=>e({prefix:t}),help:(0,l.__)("Display before the field value.","display-a-meta-field-as-block")}),(0,n.createElement)(r.TextControl,{label:O,value:i,onChange:t=>e({suffix:t}),help:(0,l.__)("Display after the field value.","display-a-meta-field-as-block")}),(0,n.createElement)(r.SelectControl,{label:(0,l.__)("Display layout","display-a-meta-field-as-block"),options:[{value:"inline-block",label:(0,l.__)("Inline block")},{value:"block",label:(0,l.__)("Block")},{value:"",label:(0,l.__)("Auto")}],value:s,onChange:t=>e({displayLayout:t}),help:(0,l.__)("Choose basic layout for prefix, value and suffix. This block does not provide any CSS style for the meta field.","display-a-meta-field-as-block")})),P=({label:e,fontSizeValue:t,fontWeight:a,fontStyle:i,lineHeight:l,onChange:s})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.BaseControl,{label:e}),(0,n.createElement)(r.__experimentalGrid,{className:"typography-settings",columns:2,columnGap:"8px",rowGap:"16px"},(0,n.createElement)("div",{style:{gridColumn:"span 2"}},(0,n.createElement)(o.FontSizePicker,{value:t,onChange:s("fontSize"),withReset:!1,withSlider:!0,__nextHasNoMarginBottom:!0,size:"__unstable-large"})),(0,n.createElement)(o.__experimentalFontAppearanceControl,{value:{fontWeight:a,fontStyle:i},onChange:s("fontAppearance"),hasFontStyles:!0,hasFontWeights:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0}),(0,n.createElement)(o.LineHeightControl,{value:l,onChange:s("lineHeight"),size:"__unstable-large",__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto"}))),z=({setAttributes:e,attributes:t})=>{const{showOutline:a,prefix:i,suffix:s,fieldType:c,labelAsPrefix:d,prefixSettings:p,suffixSettings:f}=t,m=!!i||"acf"===c&&d,u=!!s,y=(0,o.useSetting)("typography.fontSizes"),g=(t,a)=>i=>n=>{if("fontAppearance"!==i)if("fontSize"===i){const e=(0,o.getFontSizeObjectByValue)(y,n).slug;n={fontSizeValue:n,fontSize:e?`var(--wp--preset--font-size--${e}, ${n})`:n}}else n={[i]:n};a=a?{...a,...n}:{...n},e({[t]:a})},h=(t,a)=>i=>{a=a?{...a,gap:i}:{gap:i},e({[t]:a})},b=(0,l.__)("Margin","display-a-meta-field-as-block");return(0,n.createElement)(o.InspectorControls,{group:"styles"},(m||u)&&(0,n.createElement)(r.__experimentalToolsPanel,{label:C,resetAll:()=>{e({prefixSettings:void 0,suffixSettings:void 0})}},m&&(0,n.createElement)(r.__experimentalToolsPanelItem,{label:F,hasValue:()=>m&&p,onDeselect:()=>e({prefixSettings:void 0})},(0,n.createElement)(P,{label:F,...p,onChange:g("prefixSettings",p)}),(0,n.createElement)("div",{style:{marginTop:"16px"}},(0,n.createElement)(o.__experimentalSpacingSizesControl,{label:b,values:p?.gap,onChange:h("prefixSettings",p),sides:["top"],showSideInLabel:!1}))),u&&(0,n.createElement)(r.__experimentalToolsPanelItem,{label:O,hasValue:()=>u&&f,onDeselect:()=>e({suffixSettings:void 0})},(0,n.createElement)(P,{label:O,...f,onChange:g("suffixSettings",f)}),(0,n.createElement)("div",{style:{marginTop:"16px"}},(0,n.createElement)(o.__experimentalSpacingSizesControl,{label:b,values:f?.gap,onChange:h("suffixSettings",f),sides:["top"],showSideInLabel:!1})))),(0,n.createElement)(r.PanelBody,{title:(0,l.__)("Block style settings")},(0,n.createElement)(r.ToggleControl,{label:(0,l.__)("Show block outline","display-a-meta-field-as-block"),checked:a,onChange:t=>e({showOutline:t}),help:(0,l.__)("Highlight the block on the Editor only.","display-a-meta-field-as-block")})))};var U,B;function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},q.apply(this,arguments)}const W=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"mfb/meta-field-block","title":"Meta Field Block","category":"theme","description":"Display a meta field or a custom field as a block on the front end, supporting ACF fields.","keywords":["meta","custom","acf","meta field","custom field","setting field","metadata"],"attributes":{"textAlign":{"type":"string"},"fieldType":{"type":"string","default":"meta"},"fieldName":{"type":"string"},"fieldSettings":{"type":"object"},"hideEmpty":{"type":"boolean","default":false},"emptyMessage":{"type":"string","default":""},"prefix":{"type":"string"},"suffix":{"type":"string"},"labelAsPrefix":{"type":"boolean","default":false},"prefixSettings":{"type":"object"},"suffixSettings":{"type":"object"},"displayLayout":{"type":"string","default":""},"tagName":{"type":"string","default":"div"},"showOutline":{"type":"boolean","default":false}},"supports":{"html":false,"anchor":true,"align":["wide","full"],"color":{"background":true,"text":true,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":true,"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"lineHeight":true,"fontAppearance":true,"textTransform":true}}},"usesContext":["postId","postType"],"textdomain":"display-a-meta-field-as-block","editorScript":"file:./index.js","style":"file:./style-index.css"}'),G=[{name:"text-field",title:(0,l.__)("Text","display-a-meta-field-as-block"),description:(0,l.__)("Display a text field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"text"===e?.fieldSettings?.type},{name:"textarea-field",title:(0,l.__)("Textarea","display-a-meta-field-as-block"),description:(0,l.__)("Display a textarea field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"textarea"===e?.fieldSettings?.type},{name:"image-field",title:(0,l.__)("Image","display-a-meta-field-as-block"),description:(0,l.__)("Display a image field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"image"===e?.fieldSettings?.type},{name:"link-field",title:(0,l.__)("Link","display-a-meta-field-as-block"),description:(0,l.__)("Display a link field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"link"===e?.fieldSettings?.type},{name:"select-field",title:(0,l.__)("Select","display-a-meta-field-as-block"),description:(0,l.__)("Display a select field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"select"===e?.fieldSettings?.type},{name:"true_false-field",title:(0,l.__)("True/false","display-a-meta-field-as-block"),description:(0,l.__)("Display a true/false field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"true_false"===e?.fieldSettings?.type},{name:"wysiwyg-field",title:(0,l.__)("Editor","display-a-meta-field-as-block"),description:(0,l.__)("Display a wysiwyg field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"wysiwyg"===e?.fieldSettings?.type},{name:"relationship-field",title:(0,l.__)("Relationship","display-a-meta-field-as-block"),description:(0,l.__)("Display a relationship field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"relationship"===e?.fieldSettings?.type},{name:"post_object-field",title:(0,l.__)("Post Object","display-a-meta-field-as-block"),description:(0,l.__)("Display a post object field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"post_object"===e?.fieldSettings?.type},{name:"number-field",title:(0,l.__)("Number","display-a-meta-field-as-block"),description:(0,l.__)("Display a number field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"number"===e?.fieldSettings?.type},{name:"email-field",title:(0,l.__)("Email","display-a-meta-field-as-block"),description:(0,l.__)("Display an email field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"email"===e?.fieldSettings?.type},{name:"url-field",title:(0,l.__)("URL","display-a-meta-field-as-block"),description:(0,l.__)("Display a URL field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"url"===e?.fieldSettings?.type},{name:"oembed-field",title:(0,l.__)("Embed","display-a-meta-field-as-block"),description:(0,l.__)("Display an embed field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"oembed"===e?.fieldSettings?.type},{name:"page_link-field",title:(0,l.__)("Page link","display-a-meta-field-as-block"),description:(0,l.__)("Display a page link field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"page_link"===e?.fieldSettings?.type},{name:"file-field",title:(0,l.__)("File","display-a-meta-field-as-block"),description:(0,l.__)("Display a file field.","display-a-meta-field-as-block"),scope:[],isActive:e=>"file"===e?.fieldSettings?.type}];(0,i.registerBlockType)(W,{icon:function(e){return n.createElement("svg",q({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 256 256"},e),U||(U=n.createElement("path",{d:"M31.672 74.043q-10.838 0-15.54 3.118-5.275 3.504-5.275 12.698v23.64q0 11.164-9.403 12.531v3.94q9.404 1.424 9.403 12.641v23.42q0 8.1 3.957 11.712 4.587 4.214 16.858 4.214h1.491v-3.777h-.689q-8.143 0-11.467-2.353-3.783-2.627-3.784-10.014v-23.31q0-10.452-10.837-14.557 10.837-3.885 10.837-14.446V90.187q0-6.512 2.808-9.195 3.27-3.118 12.443-3.118h.69v-3.83zm191.166 0v3.831h.689q9.173 0 12.442 3.118 2.808 2.683 2.808 9.195v23.312q0 10.56 10.837 14.446-10.836 4.105-10.837 14.556v23.312q0 7.388-3.784 10.014-3.324 2.354-11.467 2.354h-.688v3.776h1.49q12.271 0 16.857-4.214 3.958-3.612 3.958-11.712v-23.42q0-11.218 9.403-12.641v-3.94q-9.404-1.368-9.403-12.53V89.858q0-9.194-5.276-12.698-4.7-3.118-15.539-3.118z"})),B||(B=n.createElement("path",{d:"M99.742 169.265H83.248v-55.26l-11.917 35.861H59.89l-11.916-35.86v55.26h-15.63v-82.53h19.256l14.465 41.402 14.42-41.402h19.258zm62.478-66.567h-29.577v15.354h27.418v15.962h-27.418v35.251H116.15v-82.53h46.07zm66.449 41.292q0 5.987-1.9 10.698-1.856 4.711-5.138 7.814-3.8 3.659-8.376 5.21-4.533 1.553-11.529 1.553h-28.065v-82.53h24.957q7.772 0 11.356.666 3.627.666 7.167 2.938 3.67 2.383 5.44 6.43 1.814 3.99 1.814 9.144 0 5.986-2.461 10.587-2.461 4.545-6.952 7.095v.443q6.304 1.607 9.974 6.65 3.713 5.044 3.713 13.302m-21.244-33.92q0-2.05-.82-4.1-.776-2.052-2.805-3.049-1.815-.888-4.533-.943-2.678-.11-7.557-.11h-1.556v17.458h2.593q3.928 0 6.691-.166t4.36-1.108q2.246-1.275 2.937-3.27.69-2.051.69-4.711m4.06 33.589q0-3.937-1.21-6.042-1.165-2.161-4.014-3.215-1.944-.72-5.355-.776-3.41-.055-7.123-.055h-3.629v20.563h1.21q6.995 0 10.018-.056 3.022-.055 5.569-1.44 2.59-1.387 3.54-3.66.993-2.326.993-5.32","aria-label":"MFB"})))},edit:function({attributes:e,attributes:{fieldType:t="meta",fieldName:a,fieldSettings:i={},hideEmpty:s,emptyMessage:c="",tagName:d="div",textAlign:f,labelAsPrefix:m,prefix:u,suffix:y,prefixSettings:F,suffixSettings:O,displayLayout:I="",showOutline:P=!1},setAttributes:U,isSelected:B,context:{postId:q,postType:W}}){const{postId:G,postType:V}=(({postType:e,postId:t})=>{const{getCurrentPostId:a,getCurrentPostType:i}=(0,D.useSelect)(M.store);return e||(e=i()),t||(t=a()),{postType:e,postId:t}})({postId:q,postType:W}),{data:$,loading:Y}=((e,t={},a=[])=>{const[i,n]=(0,v.useState)(!1),[l,o]=(0,v.useState)(),[r,s]=(0,v.useState)();a=[e.fieldType,e.fieldName,...a];const c=(0,v.useCallback)((()=>{n(!0),o(void 0),s(void 0),H()({path:(0,R.addQueryArgs)("/mfb/v1/getDynamicField",{attributes:e,...t}),headers:{"Content-Type":"application/json"},method:"GET"}).then(s).catch(o).finally((()=>n(!1)))}),a);return(0,v.useEffect)((()=>{var t,a;"dynamic"===(null!==(t=e.fieldType)&&void 0!==t?t:"")&&null!==(a=e.fieldName)&&void 0!==a&&a?c():(l&&o(void 0),r&&s(void 0))}),[c]),{loading:i,error:l,data:r}})(e,{postId:G}),{ACFFields:K,metaFields:X,restFieldNames:Z,restFieldValue:J}=(({kind:e="postType",name:t,id:a,fieldName:i})=>{const[n]=(0,L.useEntityProp)(e,t,"acf",a),[l]=(0,L.useEntityProp)(e,t,"meta",a),[o]=(0,L.useEntityProp)(e,t,"mfb_rest_fields",a),[r]=(0,L.useEntityProp)(e,t,i,a);return{ACFFields:n,metaFields:l,restFieldNames:o,restFieldValue:r}})({name:V,id:G,fieldName:a}),[Q,ee]=(({value:e,onChange:t,delay:a=500})=>{const[i,n]=(0,v.useState)(e),l=((e,t=500)=>{const[a,i]=(0,v.useState)(e);let n;return(0,v.useEffect)((()=>(n&&clearTimeout(n),n=setTimeout((()=>{i(e)}),t),()=>clearTimeout(n))),[e,t]),a})(i,a),o=(0,v.useCallback)(t);return(0,v.useEffect)((()=>{l!==e&&o(l)}),[l,e,o]),[i,n]})({value:a,onChange:e=>{let a={fieldName:e,fieldSettings:{...i,type:void 0,key:void 0}};if("acf"===t){const l=N({fieldType:t,fieldName:e,ACFFields:K});if("object"===k(l)){var n;const e=null!==(n=l?.field)&&void 0!==n?n:{};a={...a,fieldSettings:{...i,type:e?.type,key:e?.key}}}}U(a)}}),te=N({fieldType:t,fieldName:a,metaFields:X,ACFFields:K,restFieldValue:J,dynamicValue:$}),ae=(({fieldType:e,fieldName:t,hideEmpty:a,emptyMessage:i,rawValue:n})=>{let o;return t?(0,_.isNil)(n)?o=(0,l.sprintf)((0,l.__)("MFB - <code>%s</code>","display-a-meta-field-as-block"),t):(o=n,"acf"===e&&"object"===k(n)&&(o=n?.simple_value_formatted),o=(({fieldValue:e,hideEmpty:t,emptyMessage:a})=>(e&&["object","array"].includes(k(e))&&(e=E),e||0===e||(e=t?x:a||T),e))({fieldValue:o,hideEmpty:a,emptyMessage:i})):o=(0,l.__)('This is the Meta Field Block. Please input "Field Name"',"display-a-meta-field-as-block"),o})({rawValue:te,fieldType:t,fieldName:a,hideEmpty:s,emptyMessage:c}),ie=(({fieldType:e,metaFields:t,ACFFields:a,restFieldNames:i,settingFieldNames:o})=>{let r,s=(0,l.__)("Input the field name. ","display-a-meta-field-as-block");"meta"===e?"object"===k(t)&&(r=Object.keys((0,_.omit)(t,A))):"acf"===e?"object"===k(a)&&(r=Object.keys(a)):"rest_field"===e?r=i:"option"===e&&(r=o);let c=null;return r&&r.length&&(c=r.map(((e,t)=>(0,n.createElement)(v.Fragment,{key:e},(0,n.createElement)("code",{key:e},e),t<r?.length-1?", ":"")))),c?s=(0,n.createElement)(v.Fragment,null,s,(0,l.__)("Suggested values: ","display-a-meta-field-as-block"),(0,n.createElement)("span",{style:{lineHeight:2}},c)):"acf"===e&&(s=(0,n.createElement)(v.Fragment,null,s,(0,l.__)("Using the field key as the field name can help the block access the field information without an object id.","display-a-meta-field-as-block"))),s})({fieldType:t,metaFields:X,ACFFields:K,restFieldNames:Z}),ne=u||("acf"===t&&m?(e=>{let t="";var a;return"object"===k(e)&&(t=null!==(a=e?.field?.label)&&void 0!==a?a:""),t})(te):"");return(0,n.createElement)(n.Fragment,null,B&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.BlockControls,{group:"block"},(0,n.createElement)(p,{value:d,onChange:e=>U({tagName:e})}),(0,n.createElement)(o.AlignmentControl,{value:f,onChange:e=>U({textAlign:e})})),(0,n.createElement)(o.InspectorControls,{group:"settings"},(0,n.createElement)(r.PanelBody,{title:(0,l.__)("Meta field settings","display-a-meta-field-as-block")},(0,n.createElement)(h,{setAttributes:U,fieldType:t,fieldTypeOptions:S,fieldTypeHelpMessages:w,fieldName:Q,setFieldName:ee,fieldNameHelp:ie}),(0,n.createElement)(b,{setAttributes:U,hideEmpty:s,emptyMessage:c})),(0,n.createElement)(r.PanelBody,{title:C,initialOpen:!(!ne&&!y)},(0,n.createElement)(j,{setAttributes:U,prefix:u,suffix:y,labelAsPrefix:m,fieldType:t,displayLayout:I}))),(0,n.createElement)(z,{setAttributes:U,attributes:e})),(0,n.createElement)(g,{value:ae,fieldType:t,isLoading:Y,TagName:d,textAlign:f,prefix:ne,suffix:y,prefixSettings:F,suffixSettings:O,displayLayout:I,showOutline:P}))},variations:G})},856:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,a){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,a)}function a(e,i,n){return a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,a,i){var n=[null];n.push.apply(n,a);var l=new(Function.bind.apply(e,n));return i&&t(l,i.prototype),l},a.apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}var l=Object.hasOwnProperty,o=Object.setPrototypeOf,r=Object.isFrozen,s=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,d=Object.freeze,p=Object.seal,f=Object.create,m="undefined"!=typeof Reflect&&Reflect,u=m.apply,y=m.construct;u||(u=function(e,t,a){return e.apply(t,a)}),d||(d=function(e){return e}),p||(p=function(e){return e}),y||(y=function(e,t){return a(e,i(t))});var g,h=N(Array.prototype.forEach),b=N(Array.prototype.pop),_=N(Array.prototype.push),v=N(String.prototype.toLowerCase),k=N(String.prototype.toString),E=N(String.prototype.match),x=N(String.prototype.replace),T=N(String.prototype.indexOf),S=N(String.prototype.trim),w=N(RegExp.prototype.test),A=(g=TypeError,function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return y(g,t)});function N(e){return function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return u(e,t,i)}}function C(e,t,a){var i;a=null!==(i=a)&&void 0!==i?i:v,o&&o(e,null);for(var n=t.length;n--;){var l=t[n];if("string"==typeof l){var s=a(l);s!==l&&(r(t)||(t[n]=s),l=s)}e[l]=!0}return e}function F(e){var t,a=f(null);for(t in e)!0===u(l,e,[t])&&(a[t]=e[t]);return a}function O(e,t){for(;null!==e;){var a=c(e,t);if(a){if(a.get)return N(a.get);if("function"==typeof a.value)return N(a.value)}e=s(e)}return function(e){return console.warn("fallback value for",e),null}}var D=d(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=d(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=d(["#text"]),P=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),z=d(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=d(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),q=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=p(/<%[\w\W]*|[\w\W]*%>/gm),G=p(/\${[\w\W]*}/gm),V=p(/^data-[\-\w.\u00B7-\uFFFF]/),$=p(/^aria-[\-\w]+$/),Y=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=p(/^(?:\w+script|data):/i),X=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=p(/^html$/i),J=function(){return"undefined"==typeof window?null:window};return function t(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),n=function(e){return t(e)};if(n.version="2.4.7",n.removed=[],!a||!a.document||9!==a.document.nodeType)return n.isSupported=!1,n;var l=a.document,o=a.document,r=a.DocumentFragment,s=a.HTMLTemplateElement,c=a.Node,p=a.Element,f=a.NodeFilter,m=a.NamedNodeMap,u=void 0===m?a.NamedNodeMap||a.MozNamedAttrMap:m,y=a.HTMLFormElement,g=a.DOMParser,N=a.trustedTypes,Q=p.prototype,ee=O(Q,"cloneNode"),te=O(Q,"nextSibling"),ae=O(Q,"childNodes"),ie=O(Q,"parentNode");if("function"==typeof s){var ne=o.createElement("template");ne.content&&ne.content.ownerDocument&&(o=ne.content.ownerDocument)}var le=function(t,a){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var i=null,n="data-tt-policy-suffix";a.currentScript&&a.currentScript.hasAttribute(n)&&(i=a.currentScript.getAttribute(n));var l="dompurify"+(i?"#"+i:"");try{return t.createPolicy(l,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+l+" could not be created."),null}}(N,l),oe=le?le.createHTML(""):"",re=o,se=re.implementation,ce=re.createNodeIterator,de=re.createDocumentFragment,pe=re.getElementsByTagName,fe=l.importNode,me={};try{me=F(o).documentMode?o.documentMode:{}}catch(e){}var ue={};n.isSupported="function"==typeof ie&&se&&void 0!==se.createHTMLDocument&&9!==me;var ye,ge,he=q,be=W,_e=G,ve=V,ke=$,Ee=K,xe=X,Te=Y,Se=null,we=C({},[].concat(i(D),i(L),i(M),i(I),i(j))),Ae=null,Ne=C({},[].concat(i(P),i(z),i(U),i(B))),Ce=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Fe=null,Oe=null,De=!0,Le=!0,Me=!1,Re=!0,Ie=!1,He=!1,je=!1,Pe=!1,ze=!1,Ue=!1,Be=!1,qe=!0,We=!1,Ge=!0,Ve=!1,$e={},Ye=null,Ke=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Xe=null,Ze=C({},["audio","video","img","source","image","track"]),Je=null,Qe=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml",it=at,nt=!1,lt=null,ot=C({},[et,tt,at],k),rt=["application/xhtml+xml","text/html"],st=null,ct=o.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){st&&st===t||(t&&"object"===e(t)||(t={}),t=F(t),ye=ye=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===ye?k:v,Se="ALLOWED_TAGS"in t?C({},t.ALLOWED_TAGS,ge):we,Ae="ALLOWED_ATTR"in t?C({},t.ALLOWED_ATTR,ge):Ne,lt="ALLOWED_NAMESPACES"in t?C({},t.ALLOWED_NAMESPACES,k):ot,Je="ADD_URI_SAFE_ATTR"in t?C(F(Qe),t.ADD_URI_SAFE_ATTR,ge):Qe,Xe="ADD_DATA_URI_TAGS"in t?C(F(Ze),t.ADD_DATA_URI_TAGS,ge):Ze,Ye="FORBID_CONTENTS"in t?C({},t.FORBID_CONTENTS,ge):Ke,Fe="FORBID_TAGS"in t?C({},t.FORBID_TAGS,ge):{},Oe="FORBID_ATTR"in t?C({},t.FORBID_ATTR,ge):{},$e="USE_PROFILES"in t&&t.USE_PROFILES,De=!1!==t.ALLOW_ARIA_ATTR,Le=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ie=t.SAFE_FOR_TEMPLATES||!1,He=t.WHOLE_DOCUMENT||!1,ze=t.RETURN_DOM||!1,Ue=t.RETURN_DOM_FRAGMENT||!1,Be=t.RETURN_TRUSTED_TYPE||!1,Pe=t.FORCE_BODY||!1,qe=!1!==t.SANITIZE_DOM,We=t.SANITIZE_NAMED_PROPS||!1,Ge=!1!==t.KEEP_CONTENT,Ve=t.IN_PLACE||!1,Te=t.ALLOWED_URI_REGEXP||Te,it=t.NAMESPACE||at,Ce=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&dt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&dt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Le=!1),Ue&&(ze=!0),$e&&(Se=C({},i(j)),Ae=[],!0===$e.html&&(C(Se,D),C(Ae,P)),!0===$e.svg&&(C(Se,L),C(Ae,z),C(Ae,B)),!0===$e.svgFilters&&(C(Se,M),C(Ae,z),C(Ae,B)),!0===$e.mathMl&&(C(Se,I),C(Ae,U),C(Ae,B))),t.ADD_TAGS&&(Se===we&&(Se=F(Se)),C(Se,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Ae===Ne&&(Ae=F(Ae)),C(Ae,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&C(Je,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(Ye===Ke&&(Ye=F(Ye)),C(Ye,t.FORBID_CONTENTS,ge)),Ge&&(Se["#text"]=!0),He&&C(Se,["html","head","body"]),Se.table&&(C(Se,["tbody"]),delete Fe.tbody),d&&d(t),st=t)},ft=C({},["mi","mo","mn","ms","mtext"]),mt=C({},["foreignobject","desc","title","annotation-xml"]),ut=C({},["title","style","font","a","script"]),yt=C({},L);C(yt,M),C(yt,R);var gt=C({},I);C(gt,H);var ht=function(e){_(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},bt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(ze||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){var t,a;if(Pe)e="<remove></remove>"+e;else{var i=E(e,/^[\r\n\t ]+/);a=i&&i[0]}"application/xhtml+xml"===ye&&it===at&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var n=le?le.createHTML(e):e;if(it===at)try{t=(new g).parseFromString(n,ye)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(it,"template",null);try{t.documentElement.innerHTML=nt?oe:n}catch(e){}}var l=t.body||t.documentElement;return e&&a&&l.insertBefore(o.createTextNode(a),l.childNodes[0]||null),it===at?pe.call(t,He?"html":"body")[0]:He?t.documentElement:l},vt=function(e){return ce.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},kt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Et=function(e,t,a){ue[e]&&h(ue[e],(function(e){e.call(n,t,a,st)}))},xt=function(e){var t,a;if(Et("beforeSanitizeElements",e,null),(a=e)instanceof y&&("string"!=typeof a.nodeName||"string"!=typeof a.textContent||"function"!=typeof a.removeChild||!(a.attributes instanceof u)||"function"!=typeof a.removeAttribute||"function"!=typeof a.setAttribute||"string"!=typeof a.namespaceURI||"function"!=typeof a.insertBefore||"function"!=typeof a.hasChildNodes))return ht(e),!0;if(w(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var i=ge(e.nodeName);if(Et("uponSanitizeElement",e,{tagName:i,allowedTags:Se}),e.hasChildNodes()&&!kt(e.firstElementChild)&&(!kt(e.content)||!kt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===i&&w(/<template/i,e.innerHTML))return ht(e),!0;if(!Se[i]||Fe[i]){if(!Fe[i]&&St(i)){if(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,i))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(i))return!1}if(Ge&&!Ye[i]){var l=ie(e)||e.parentNode,o=ae(e)||e.childNodes;if(o&&l)for(var r=o.length-1;r>=0;--r)l.insertBefore(ee(o[r],!0),te(e))}return ht(e),!0}return e instanceof p&&!function(e){var t=ie(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});var a=v(e.tagName),i=v(t.tagName);return!!lt[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===at?"svg"===a:t.namespaceURI===et?"svg"===a&&("annotation-xml"===i||ft[i]):Boolean(yt[a]):e.namespaceURI===et?t.namespaceURI===at?"math"===a:t.namespaceURI===tt?"math"===a&&mt[i]:Boolean(gt[a]):e.namespaceURI===at?!(t.namespaceURI===tt&&!mt[i])&&!(t.namespaceURI===et&&!ft[i])&&!gt[a]&&(ut[a]||!yt[a]):!("application/xhtml+xml"!==ye||!lt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!w(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,t=x(t,he," "),t=x(t,be," "),t=x(t,_e," "),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et("afterSanitizeElements",e,null),!1):(ht(e),!0)},Tt=function(e,t,a){if(qe&&("id"===t||"name"===t)&&(a in o||a in ct))return!1;if(Le&&!Oe[t]&&w(ve,t));else if(De&&w(ke,t));else if(!Ae[t]||Oe[t]){if(!(St(e)&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&w(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,a)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(a))))return!1}else if(Je[t]);else if(w(Te,x(a,xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(a,"data:")||!Xe[e])if(Me&&!w(Ee,x(a,xe,"")));else if(a)return!1;return!0},St=function(e){return e.indexOf("-")>0},wt=function(t){var a,i,l,o;Et("beforeSanitizeAttributes",t,null);var r=t.attributes;if(r){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};for(o=r.length;o--;){var c=a=r[o],d=c.name,p=c.namespaceURI;if(i="value"===d?a.value:S(a.value),l=ge(d),s.attrName=l,s.attrValue=i,s.keepAttr=!0,s.forceKeepAttr=void 0,Et("uponSanitizeAttribute",t,s),i=s.attrValue,!s.forceKeepAttr&&(bt(d,t),s.keepAttr))if(Re||!w(/\/>/i,i)){Ie&&(i=x(i,he," "),i=x(i,be," "),i=x(i,_e," "));var f=ge(t.nodeName);if(Tt(f,l,i)){if(!We||"id"!==l&&"name"!==l||(bt(d,t),i="user-content-"+i),le&&"object"===e(N)&&"function"==typeof N.getAttributeType)if(p);else switch(N.getAttributeType(f,l)){case"TrustedHTML":i=le.createHTML(i);break;case"TrustedScriptURL":i=le.createScriptURL(i)}try{p?t.setAttributeNS(p,d,i):t.setAttribute(d,i),b(n.removed)}catch(e){}}}else bt(d,t)}Et("afterSanitizeAttributes",t,null)}},At=function e(t){var a,i=vt(t);for(Et("beforeSanitizeShadowDOM",t,null);a=i.nextNode();)Et("uponSanitizeShadowNode",a,null),xt(a)||(a.content instanceof r&&e(a.content),wt(a));Et("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(t){var i,o,s,d,p,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!kt(t)){if("function"!=typeof t.toString)throw A("toString is not a function");if("string"!=typeof(t=t.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof t)return a.toStaticHTML(t);if(kt(t))return a.toStaticHTML(t.outerHTML)}return t}if(je||pt(f),n.removed=[],"string"==typeof t&&(Ve=!1),Ve){if(t.nodeName){var m=ge(t.nodeName);if(!Se[m]||Fe[m])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(o=(i=_t("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!ze&&!Ie&&!He&&-1===t.indexOf("<"))return le&&Be?le.createHTML(t):t;if(!(i=_t(t)))return ze?null:Be?oe:""}i&&Pe&&ht(i.firstChild);for(var u=vt(Ve?t:i);s=u.nextNode();)3===s.nodeType&&s===d||xt(s)||(s.content instanceof r&&At(s.content),wt(s),d=s);if(d=null,Ve)return t;if(ze){if(Ue)for(p=de.call(i.ownerDocument);i.firstChild;)p.appendChild(i.firstChild);else p=i;return(Ae.shadowroot||Ae.shadowrootmod)&&(p=fe.call(l,p,!0)),p}var y=He?i.outerHTML:i.innerHTML;return He&&Se["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&w(Z,i.ownerDocument.doctype.name)&&(y="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+y),Ie&&(y=x(y,he," "),y=x(y,be," "),y=x(y,_e," ")),le&&Be?le.createHTML(y):y},n.setConfig=function(e){pt(e),je=!0},n.clearConfig=function(){st=null,je=!1},n.isValidAttribute=function(e,t,a){st||pt({});var i=ge(e),n=ge(t);return Tt(i,n,a)},n.addHook=function(e,t){"function"==typeof t&&(ue[e]=ue[e]||[],_(ue[e],t))},n.removeHook=function(e){if(ue[e])return b(ue[e])},n.removeHooks=function(e){ue[e]&&(ue[e]=[])},n.removeAllHooks=function(){ue={}},n}()}()},967:(e,t)=>{var a;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=o(e,l(a)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)i.call(e,a)&&e[a]&&(t=o(t,a));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()}},a={};function i(e){var n=a[e];if(void 0!==n)return n.exports;var l=a[e]={exports:{}};return t[e].call(l.exports,l,l.exports,i),l.exports}i.m=t,e=[],i.O=(t,a,n,l)=>{if(!a){var o=1/0;for(d=0;d<e.length;d++){for(var[a,n,l]=e[d],r=!0,s=0;s<a.length;s++)(!1&l||o>=l)&&Object.keys(i.O).every((e=>i.O[e](a[s])))?a.splice(s--,1):(r=!1,l<o&&(o=l));if(r){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[a,n,l]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var n,l,[o,r,s]=a,c=0;if(o.some((t=>0!==e[t]))){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(s)var d=s(i)}for(t&&t(a);c<o.length;c++)l=o[c],i.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return i.O(d)},a=globalThis.webpackChunkmeta_field_block=globalThis.webpackChunkmeta_field_block||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var n=i.O(void 0,[431],(()=>i(843)));n=i.O(n)})();