(()=>{"use strict";vare={d:(t,r)=>{for(varninr)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>T});constr=window.wp.i18n;constn=function(e){constt=(e,r)=>{const{headers:n={}}=e;for(constoinn)if("x-wp-nonce"===o.toLowerCase()&&n[o]===t.nonce)returnr(e);returnr({...e,headers:{...n,"X-WP-Nonce":t.nonce}})};returnt.nonce=e,t},o=(e,t)=>{letr,n,o=e.path;return"string"==typeofe.namespace&&"string"==typeofe.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),o=n?r+"/"+n:r),deletee.namespace,deletee.endpoint,t({...e,path:o})},a=e=>(t,r)=>o(t,(t=>{letn,o=t.url,a=t.path;return"string"==typeofa&&(n=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeofn&&-1!==n.indexOf("?")&&(a=a.replace("?","&")),o=n+a),r({...t,url:o})})),s=window.wp.url;functioni(e,t){returnPromise.resolve(t?e.body:newwindow.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}constc=function(e){constt=Object.fromEntries(Object.entries(e).map((([e,t])=>[(0,s.normalizePath)(e),t])));return(e,r)=>{const{parse:n=!0}=e;leto=e.path;if(!o&&e.url){const{rest_route:t,...r}=(0,s.getQueryArgs)(e.url);"string"==typeoft&&(o=(0,s.addQueryArgs)(t,r))}if("string"!=typeofo)returnr(e);consta=e.method||"GET",c=(0,s.normalizePath)(o);if("GET"===a&&t[c]){conste=t[c];returndeletet[c],i(e,!!n)}if("OPTIONS"===a&&t[a]&&t[a][c]){conste=t[a][c];returndeletet[a][c],i(e,!!n)}returnr(e)}},p=({path:e,url:t,...r},n)=>({...r,url:t&&(0,s.addQueryArgs)(t,n),path:e&&(0,s.addQueryArgs)(e,n)}),d=e=>e.json?e.json():Promise.reject(e),u=e=>{const{next:t}=(e=>{if(!e)return{};constt=e.match(/<([^>]+)>; rel="next"/);returnt?{next:t[1]}:{}})(e.headers.get("link"));returnt},h=async(e,t)=>{if(!1===e.parse)returnt(e);if(!(e=>{constt=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");returnt||r})(e))returnt(e);constr=awaitT({...p(e,{per_page:100}),parse:!1}),n=awaitd(r);if(!Array.isArray(n))returnn;leto=u(r);if(!o)returnn;leta=[].concat(n);for(;o;){constt=awaitT({...e,path:void0,url:o,parse:!1}),r=awaitd(t);a=a.concat(r),o=u(t)}returna},l=newSet(["PATCH","PUT","DELETE"]),w="GET",f=(e,t=!0)=>Promise.resolve(((e,t=!0)=>t?204===e.status?null:e.json?e.json():Promise.reject(e):e)(e,t)).catch((e=>m(e,t)));functionm(e,t=!0){if(!t)throwe;return(e=>{constt={code:"invalid_json",message:(0,r.__)("The response is not a valid JSON response.")};if(!e||!e.json)throwt;returne.json().catch((()=>{throwt}))})(e).then((e=>{constt={code:"unknown_error",message:(0,r.__)("An unknown error occurred.")};throwe||t}))}constg=(e,t)=>{if(!function(e){constt=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))returnt(e);letn=0;consto=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?o(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));returnt({...e,parse:!1}).catch((t=>{if(!t.headers)returnPromise.reject(t);constn=t.headers.get("x-wp-upload-attachment-id");returnt.status>=500&&t.status<600&&n?o(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:(0,r.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):m(t,e.parse)})).then((t=>f(t,e.parse)))},y=e=>(t,r)=>{if("string"==typeoft.url){constr=(0,s.getQueryArg)(t.url,"wp_theme_preview");void0===r?t.url=(0,s.addQueryArgs)(t.url,{wp_theme_preview:e}):""===r&&(t.url=(0,s.removeQueryArgs)(t.url,"wp_theme_preview"))}if("string"==typeoft.path){constr=(0,s.getQueryArg)(t.path,"wp_theme_preview");void0===r?t.path=(0,s.addQueryArgs)(t.path,{wp_theme_preview:e}):""===r&&(t.path=(0,s.removeQueryArgs)(t.path,"wp_theme_preview"))}returnr(t)},_={Accept:"application/json, */*;q=0.1"},v={credentials:"include"},P=[(e,t)=>("string"!=ty