(()=>{"use strict";var e={d:(r,o)=>{for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{createRegistry:()=>t});const o=window.wp.element;function t(e){const{name:r,groups:t={},defaultGroup:i=""}=e;let p={...t},n=[];const u=new Set,a=()=>{u.forEach(e=>e())},g=(e,r)=>{if(e.group===r.group)return e.priority-r.priority;const o=e=>e?p[e]?.priority??50:1/0;return o(e.group)-o(r.group)||(e.group??"zzzz").localeCompare(r.group??"zzzz")};return{name:r,register:e=>{const r={...e,group:e.group??i,priority:e.priority??10};n.find(({id:e,group:o})=>e===r.id&&o===r.group)?n=n.map(e=>e.id===r.id?r:e):n.push(r),n.sort(g),a()},registerGroup:(e,r)=>{p={...p,[e]:r},n.sort(g),a()},getItems:()=>[...n],useItems:()=>{const e=()=>n;return(0,o.useSyncExternalStore)(e=>(u.add(e),()=>u.delete(e)),e,e)},filter:e=>n.filter(e),emitChange:a,clear:()=>{n=[],a()}}}(window.popupMaker=window.popupMaker||{}).registry=r})();