(()=>{"use strict";var e,t={4420:()=>{const e=window.wp.blocks,t=window.wp.primitives,o=window.ReactJSXRuntime,r=(0,o.jsx)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(t.Path,{d:"m6.6 15.6-1.2.8c.6.9 1.3 1.6 2.2 2.2l.8-1.2c-.7-.5-1.3-1.1-1.8-1.8zM5.5 12c0-.4 0-.9.1-1.3l-1.5-.3c0 .5-.1 1.1-.1 1.6s.1 1.1.2 1.6l1.5-.3c-.2-.4-.2-.9-.2-1.3zm11.9-3.6 1.2-.8c-.6-.9-1.3-1.6-2.2-2.2l-.8 1.2c.7.5 1.3 1.1 1.8 1.8zM5.3 7.6l1.2.8c.5-.7 1.1-1.3 1.8-1.8l-.7-1.3c-.9.6-1.7 1.4-2.3 2.3zm14.5 2.8-1.5.3c.1.4.1.8.1 1.3s0 .9-.1 1.3l1.5.3c.1-.5.2-1 .2-1.6s-.1-1.1-.2-1.6zM12 18.5c-.4 0-.9 0-1.3-.1l-.3 1.5c.5.1 1 .2 1.6.2s1.1-.1 1.6-.2l-.3-1.5c-.4.1-.9.1-1.3.1zm3.6-1.1.8 1.2c.9-.6 1.6-1.3 2.2-2.2l-1.2-.8c-.5.7-1.1 1.3-1.8 1.8zM10.4 4.2l.3 1.5c.4-.1.8-.1 1.3-.1s.9 0 1.3.1l.3-1.5c-.5-.1-1.1-.2-1.6-.2s-1.1.1-1.6.2z"})}),n=(0,o.jsx)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(t.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})}),l=JSON.parse('{"UU":"remote-data-blocks/no-results"}'),a=window.wp.blockEditor,s=window.wp.components,c=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var i;null===(i=window.REMOTE_DATA_BLOCKS)||void 0===i||i.rest_url,function(...e){e.filter(Boolean).join(" ")}(undefined,`rdb-${"container".replace(/[^a-zA-Z\d\u00C0-\u00FF]/g,"-").toLowerCase()}`);const d=window.wp.data,u=window.wp.editor;function v(e){var t;const{postMeta:o,postType:r}=(n=e=>{var t,o;return{postMeta:null!==(t=e("meta"))&&void 0!==t?t:{},postType:null!==(o=e("type"))&&void 0!==o?o:""}},(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(u.store);return n(t)}),[]));var n;if("wp_block"===r){const e=String(null!==(t=o._remote_data_blocks_block_type)&&void 0!==t?t:""),r=function(e){var t,o;return null===(o=null===(t=window.REMOTE_DATA_BLOCKS)||void 0===t?void 0:t.config)||void 0===o?void 0:o[e]}(e);if(r)return{remoteData:{blockName:e,metadata:{},queryInputs:[],queryKey:"Example Query Key",resultId:"",results:[{result:Object.fromEntries(Object.entries(r.availableBindings).map((([e,t])=>[e,{name:t.name,type:t.type,value:t.name}]))),uuid:"Example Entity ID"}]}}}return{remoteData:e["remote-data-blocks/remoteData"]}}const p=window.wp.i18n;function __(e){return(0,p.__)(e,"remote-data-blocks")}const w=[["core/paragraph",{content:__("No results found.")}]],m=[["core/paragraph",{content:__("Error loading results.")}]];(0,e.registerBlockType)(l.UU,{edit:function(e){var t;const{context:r}=e,{remoteData:n}=v(r),l=(0,a.useBlockProps)();return(null==n?void 0:n.blockName)?(0,o.jsx)("div",Object.assign({},l,{children:(0,o.jsx)(a.InnerBlocks,{template:"error"===(null===(t=e.attributes)||void 0===t?void 0:t.mode)?m:w})})):(0,o.jsx)(s.Placeholder,{label:__("No Remote Data Results"),icon:c,instructions:__("This block must be placed inside a remote data block. This block will be ignored as currently configured.")})},icon:{src:r},save:function(){return(0,o.jsx)(a.InnerBlocks.Content,{})},variations:[{name:"remote-data-blocks/error",title:"Error",icon:{src:n}}]})}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var l=o[e]={exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,o,n,l)=>{if(!o){var a=1/0;for(d=0;d<e.length;d++){for(var[o,n,l]=e[d],s=!0,c=0;c<o.length;c++)(!1&l||a>=l)&&Object.keys(r.O).every((e=>r.O[e](o[c])))?o.splice(c--,1):(s=!1,l<a&&(a=l));if(s){e.splice(d--,1);var i=n();void 0!==i&&(t=i)}}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]=[o,n,l]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={589:0,849:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,l,[a,s,c]=o,i=0;if(a.some((t=>0!==e[t]))){for(n in s)r.o(s,n)&&(r.m[n]=s[n]);if(c)var d=c(r)}for(t&&t(o);i<a.length;i++)l=a[i],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},o=globalThis.webpackChunkremote_data_blocks=globalThis.webpackChunkremote_data_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=r.O(void 0,[849],(()=>r(4420)));n=r.O(n)})();