📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-06-28 23:37:53
📂
/ (Root)
/
home
/
apkbfjox
/
2jbet.net.pk
/
wp-content
/
plugins
/
generateblocks-pro
/
dist
📍 /home/apkbfjox/2jbet.net.pk/wp-content/plugins/generateblocks-pro/dist
🔄 Refresh
✏️
Editing: overlay-dashboard.js
Writable
(()=>{"use strict";var e={21020:(e,t,r)=>{var s=r(51609),n=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var s,c={},u=null,l=null;for(s in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===c[s]&&(c[s]=t[s]);return{$$typeof:n,type:e,key:u,ref:l,props:c,_owner:a.current}}},51609:e=>{e.exports=window.React},74848:(e,t,r)=>{e.exports=r(21020)}},t={};function r(s){var n=t[s];if(void 0!==n)return n.exports;var i=t[s]={exports:{}};return e[s](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=r(51609);const n=window.wp.components,i=window.wp.i18n,a=window.wp.element,o=window.wp.primitives,c=(0,a.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var u=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},l="undefined"==typeof window||"Deno"in globalThis;function h(){}function d(e){return"number"==typeof e&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function y(e,t){return"function"==typeof e?e(t):e}function m(e,t){return"function"==typeof e?e(t):e}function f(e,t){const{type:r="all",exact:s,fetchStatus:n,predicate:i,queryKey:a,stale:o}=e;if(a)if(s){if(t.queryHash!==b(a,t.options))return!1}else if(!w(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return!("boolean"==typeof o&&t.isStale()!==o||n&&n!==t.state.fetchStatus||i&&!i(t))}function g(e,t){const{exact:r,status:s,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(v(t.options.mutationKey)!==v(i))return!1}else if(!w(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||n&&!n(t))}function b(e,t){return(t?.queryKeyHashFn||v)(e)}function v(e){return JSON.stringify(e,((e,t)=>O(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function w(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every((r=>w(e[r],t[r])))}function _(e,t){if(e===t)return e;const r=C(e)&&C(t);if(r||O(e)&&O(t)){const s=r?e:Object.keys(e),n=s.length,i=r?t:Object.keys(t),a=i.length,o=r?[]:{};let c=0;for(let n=0;n<a;n++){const a=r?n:i[n];(!r&&s.includes(a)||r)&&void 0===e[a]&&void 0===t[a]?(o[a]=void 0,c++):(o[a]=_(e[a],t[a]),o[a]===e[a]&&void 0!==e[a]&&c++)}return n===a&&c===n?e:o}return t}function E(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function C(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O(e){if(!S(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!S(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function k(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?_(e,t):t}function R(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function x(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var P=Symbol();function q(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==P?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Q(e,t){return"function"==typeof e?e(...t):!!e}var M=new class extends u{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!l&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},D=e=>setTimeout(e,0),T=function(){let e=[],t=0,r=e=>{e()},s=e=>{e()},n=D;const i=s=>{t?e.push(s):n((()=>{r(s)}))};return{batch:i=>{let a;t++;try{a=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&n((()=>{s((()=>{t.forEach((e=>{r(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{s=e},setScheduler:e=>{n=e}}}(),F=new class extends u{#s=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!l&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#s}};function I(){let e,t;const r=new Promise(((r,s)=>{e=r,t=s}));function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch((()=>{})),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}function N(e){return Math.min(1e3*2**e,3e4)}function U(e){return"online"!==(e??"online")||F.isOnline()}var A=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function K(e){return e instanceof A}function L(e){let t,r=!1,s=0,n=!1;const i=I(),a=()=>M.isFocused()&&("always"===e.networkMode||F.isOnline())&&e.canRun(),o=()=>U(e.networkMode)&&e.canRun(),c=r=>{n||(n=!0,e.onSuccess?.(r),t?.(),i.resolve(r))},u=r=>{n||(n=!0,e.onError?.(r),t?.(),i.reject(r))},h=()=>new Promise((r=>{t=e=>{(n||a())&&r(e)},e.onPause?.()})).then((()=>{t=void 0,n||e.onContinue?.()})),d=()=>{if(n)return;let t;const i=0===s?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(c).catch((t=>{if(n)return;const i=e.retry??(l?0:3),o=e.retryDelay??N,c="function"==typeof o?o(s,t):o,p=!0===i||"number"==typeof i&&s<i||"function"==typeof i&&i(s,t);var y;!r&&p?(s++,e.onFail?.(s,t),(y=c,new Promise((e=>{setTimeout(e,y)}))).then((()=>a()?void 0:h())).then((()=>{r?u(t):d()}))):u(t)}))};return{promise:i,cancel:t=>{n||(u(new A(t)),e.abort?.())},continue:()=>(t?.(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:o,start:()=>(o()?d():h().then(d),i)}}var j=class{#n;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d(this.gcTime)&&(this.#n=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(l?1/0:3e5))}clearGcTimeout(){this.#n&&(clearTimeout(this.#n),this.#n=void 0)}},B=class extends j{#i;#a;#o;#c;#u;#l;#h;constructor(e){super(),this.#h=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#o=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#u?.promise}setOptions(e){this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){const r=k(this.state.data,e,this.options);return this.#d({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some((e=>!1!==m(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===P||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!p(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){const e=this.observers.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#u&&(this.#h?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const r=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#h=!0,r.signal)})},n={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:()=>{const e=q(this.options,t),r={client:this.#c,queryKey:this.queryKey,meta:this.meta};return s(r),this.#h=!1,this.options.persister?this.options.persister(e,r,this):e(r)}};s(n),this.options.behavior?.onFetch(n,this),this.#a=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===n.fetchOptions?.meta||this.#d({type:"fetch",meta:n.fetchOptions?.meta});const i=e=>{K(e)&&e.silent||this.#d({type:"error",error:e}),K(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#u=L({initialPromise:t?.initialPromise,fn:n.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0!==e){try{this.setData(e)}catch(e){return void i(e)}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()}else i(new Error(`${this.queryHash} data is undefined`))},onError:i,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:n.options.retry,retryDelay:n.options.retryDelay,networkMode:n.options.networkMode,canRun:()=>!0}),this.#u.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...z(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return K(r)&&r.revert&&this.#a?{...this.#a,fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),T.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#o.notify({query:this,type:"updated",action:e})}))}};function z(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:U(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var $=class extends u{constructor(e,t){super(),this.options=t,this.#c=e,this.#p=null,this.#y=I(),this.options.experimental_prefetchInRender||this.#y.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#c;#m=void 0;#f=void 0;#g=void 0;#b;#v;#y;#p;#w;#_;#E;#C;#O;#S;#k=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#m.addObserver(this),H(this.#m,this.options)?this.#R():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G(this.#m,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G(this.#m,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#q(),this.#m.removeObserver(this)}setOptions(e){const t=this.options,r=this.#m;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof m(this.options.enabled,this.#m))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#Q(),this.#m.setOptions(this.options),t._defaulted&&!E(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#m,observer:this});const s=this.hasListeners();s&&V(this.#m,r,this.options,t)&&this.#R(),this.updateResult(),!s||this.#m===r&&m(this.options.enabled,this.#m)===m(t.enabled,this.#m)&&y(this.options.staleTime,this.#m)===y(t.staleTime,this.#m)||this.#M();const n=this.#D();!s||this.#m===r&&m(this.options.enabled,this.#m)===m(t.enabled,this.#m)&&n===this.#S||this.#T(n)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),r=this.createResult(t,e);return s=r,!E(this.getCurrentResult(),s)&&(this.#g=r,this.#v=this.options,this.#b=this.#m.state),r;var s}getCurrentResult(){return this.#g}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),Reflect.get(e,r))})}trackProp(e){this.#k.add(e)}getCurrentQuery(){return this.#m}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return this.#R({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#g)))}#R(e){this.#Q();let t=this.#m.fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}#M(){this.#P();const e=y(this.options.staleTime,this.#m);if(l||this.#g.isStale||!d(e))return;const t=p(this.#g.dataUpdatedAt,e)+1;this.#C=setTimeout((()=>{this.#g.isStale||this.updateResult()}),t)}#D(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#m):this.options.refetchInterval)??!1}#T(e){this.#q(),this.#S=e,!l&&!1!==m(this.options.enabled,this.#m)&&d(this.#S)&&0!==this.#S&&(this.#O=setInterval((()=>{(this.options.refetchIntervalInBackground||M.isFocused())&&this.#R()}),this.#S))}#x(){this.#M(),this.#T(this.#D())}#P(){this.#C&&(clearTimeout(this.#C),this.#C=void 0)}#q(){this.#O&&(clearInterval(this.#O),this.#O=void 0)}createResult(e,t){const r=this.#m,s=this.options,n=this.#g,i=this.#b,a=this.#v,o=e!==r?e.state:this.#f,{state:c}=e;let u,l={...c},h=!1;if(t._optimisticResults){const n=this.hasListeners(),i=!n&&H(e,t),a=n&&V(e,r,t,s);(i||a)&&(l={...l,...z(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(l.fetchStatus="idle")}let{error:d,errorUpdatedAt:p,status:y}=l;u=l.data;let m=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===y){let e;n?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(e=n.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(y="success",u=k(n?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!m)if(n&&u===i?.data&&t.select===this.#w)u=this.#_;else try{this.#w=t.select,u=t.select(u),u=k(n?.data,u,t),this.#_=u,this.#p=null}catch(e){this.#p=e}this.#p&&(d=this.#p,u=this.#_,p=Date.now(),y="error");const f="fetching"===l.fetchStatus,g="pending"===y,b="error"===y,v=g&&f,w=void 0!==u,_={status:y,fetchStatus:l.fetchStatus,isPending:g,isSuccess:"success"===y,isError:b,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:l.dataUpdatedAt,error:d,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>o.dataUpdateCount||l.errorUpdateCount>o.errorUpdateCount,isFetching:f,isRefetching:f&&!g,isLoadingError:b&&!w,isPaused:"paused"===l.fetchStatus,isPlaceholderData:h,isRefetchError:b&&w,isStale:W(e,t),refetch:this.refetch,promise:this.#y};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===_.status?e.reject(_.error):void 0!==_.data&&e.resolve(_.data)},s=()=>{const e=this.#y=_.promise=I();t(e)},n=this.#y;switch(n.status){case"pending":e.queryHash===r.queryHash&&t(n);break;case"fulfilled":"error"!==_.status&&_.data===n.value||s();break;case"rejected":"error"===_.status&&_.error===n.reason||s()}}return _}updateResult(){const e=this.#g,t=this.createResult(this.#m,this.options);this.#b=this.#m.state,this.#v=this.options,void 0!==this.#b.data&&(this.#E=this.#m),E(t,e)||(this.#g=t,this.#F({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#k.size)return!0;const s=new Set(r??this.#k);return this.options.throwOnError&&s.add("error"),Object.keys(this.#g).some((t=>{const r=t;return this.#g[r]!==e[r]&&s.has(r)}))})()}))}#Q(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#m)return;const t=this.#m;this.#m=e,this.#f=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#F(e){T.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#g)})),this.#c.getQueryCache().notify({query:this.#m,type:"observerResultsUpdated"})}))}};function H(e,t){return function(e,t){return!1!==m(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&G(e,t,t.refetchOnMount)}function G(e,t,r){if(!1!==m(t.enabled,e)){const s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&W(e,t)}return!1}function V(e,t,r,s){return(e!==t||!1===m(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&W(e,r)}function W(e,t){return!1!==m(t.enabled,e)&&e.isStaleByTime(y(t.staleTime,e))}var X=r(74848),Y=s.createContext(void 0),Z=e=>{const t=s.useContext(Y);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},J=({client:e,children:t})=>(s.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),(0,X.jsx)(Y.Provider,{value:e,children:t}));var ee=s.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),te=s.createContext(!1),re=(te.Provider,(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()})));function se(e,t){return function(e,t,r){const n=Z(r),i=s.useContext(te),a=s.useContext(ee),o=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",(e=>{const t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(o),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(o,a),(e=>{s.useEffect((()=>{e.clearReset()}),[e])})(a);const c=!n.getQueryCache().get(o.queryHash),[u]=s.useState((()=>new t(n,o))),d=u.getOptimisticResult(o),p=!i&&!1!==e.subscribed;if(s.useSyncExternalStore(s.useCallback((e=>{const t=p?u.subscribe(T.batchCalls(e)):h;return u.updateResult(),t}),[u,p]),(()=>u.getCurrentResult()),(()=>u.getCurrentResult())),s.useEffect((()=>{u.setOptions(o)}),[o,u]),((e,t)=>e?.suspense&&t.isPending)(o,d))throw re(o,u,a);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||Q(r,[e.error,s])))({result:d,errorResetBoundary:a,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if(n.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!l&&((e,t)=>e.isLoading&&e.isFetching&&!t)(d,i)){const e=c?re(o,u,a):n.getQueryCache().get(o.queryHash)?.promise;e?.catch(h).finally((()=>{u.updateResult()}))}return o.notifyOnChangeProps?d:u.trackResult(d)}(e,$,t)}var ne=class extends j{#I;#N;#u;constructor(e){super(),this.mutationId=e.mutationId,this.#N=e.mutationCache,this.#I=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#I.includes(e)||(this.#I.push(e),this.clearGcTimeout(),this.#N.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#I=this.#I.filter((t=>t!==e)),this.scheduleGc(),this.#N.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#I.length||("pending"===this.state.status?this.scheduleGc():this.#N.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#d({type:"continue"})};this.#u=L({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#N.canRun(this)});const r="pending"===this.state.status,s=!this.#u.canStart();try{if(r)t();else{this.#d({type:"pending",variables:e,isPaused:s}),await(this.#N.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:s})}const n=await this.#u.start();return await(this.#N.config.onSuccess?.(n,e,this.state.context,this)),await(this.options.onSuccess?.(n,e,this.state.context)),await(this.#N.config.onSettled?.(n,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(n,null,e,this.state.context)),this.#d({type:"success",data:n}),n}catch(t){try{throw await(this.#N.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#N.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#d({type:"error",error:t})}}finally{this.#N.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),T.batch((()=>{this.#I.forEach((t=>{t.onMutationUpdate(e)})),this.#N.notify({mutation:this,type:"updated",action:e})}))}},ie=class extends u{#c;#g=void 0;#U;#A;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#K()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),E(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#U,observer:this}),t?.mutationKey&&this.options.mutationKey&&v(t.mutationKey)!==v(this.options.mutationKey)?this.reset():"pending"===this.#U?.state.status&&this.#U.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#U?.removeObserver(this)}onMutationUpdate(e){this.#K(),this.#F(e)}getCurrentResult(){return this.#g}reset(){this.#U?.removeObserver(this),this.#U=void 0,this.#K(),this.#F()}mutate(e,t){return this.#A=t,this.#U?.removeObserver(this),this.#U=this.#c.getMutationCache().build(this.#c,this.options),this.#U.addObserver(this),this.#U.execute(e)}#K(){const e=this.#U?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#g={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#F(e){T.batch((()=>{if(this.#A&&this.hasListeners()){const t=this.#g.variables,r=this.#g.context;"success"===e?.type?(this.#A.onSuccess?.(e.data,t,r),this.#A.onSettled?.(e.data,null,t,r)):"error"===e?.type&&(this.#A.onError?.(e.error,t,r),this.#A.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach((e=>{e(this.#g)}))}))}};function ae(e,t){const r=Z(t),[n]=s.useState((()=>new ie(r,e)));s.useEffect((()=>{n.setOptions(e)}),[n,e]);const i=s.useSyncExternalStore(s.useCallback((e=>n.subscribe(T.batchCalls(e))),[n]),(()=>n.getCurrentResult()),(()=>n.getCurrentResult())),a=s.useCallback(((e,t)=>{n.mutate(e,t).catch(h)}),[n]);if(i.error&&Q(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const oe=window.wp.apiFetch;var ce=r.n(oe),ue=class extends u{constructor(e={}){super(),this.config=e,this.#L=new Map}#L;build(e,t,r){const s=t.queryKey,n=t.queryHash??b(s,t);let i=this.get(n);return i||(i=new B({client:e,queryKey:s,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){this.#L.has(e.queryHash)||(this.#L.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#L.get(e.queryHash);t&&(e.destroy(),t===e&&this.#L.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){T.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#L.get(e)}getAll(){return[...this.#L.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>f(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>f(e,t))):t}notify(e){T.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){T.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){T.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},le=class extends u{constructor(e={}){super(),this.config=e,this.#j=new Set,this.#B=new Map,this.#z=0}#j;#B;#z;build(e,t,r){const s=new ne({mutationCache:this,mutationId:++this.#z,options:e.defaultMutationOptions(t),state:r});return this.add(s),s}add(e){this.#j.add(e);const t=he(e);if("string"==typeof t){const r=this.#B.get(t);r?r.push(e):this.#B.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#j.delete(e)){const t=he(e);if("string"==typeof t){const r=this.#B.get(t);if(r)if(r.length>1){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#B.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=he(e);if("string"==typeof t){const r=this.#B.get(t),s=r?.find((e=>"pending"===e.state.status));return!s||s===e}return!0}runNext(e){const t=he(e);if("string"==typeof t){const r=this.#B.get(t)?.find((t=>t!==e&&t.state.isPaused));return r?.continue()??Promise.resolve()}return Promise.resolve()}clear(){T.batch((()=>{this.#j.forEach((e=>{this.notify({type:"removed",mutation:e})})),this.#j.clear(),this.#B.clear()}))}getAll(){return Array.from(this.#j)}find(e){const t={exact:!0,...e};return this.getAll().find((e=>g(t,e)))}findAll(e={}){return this.getAll().filter((t=>g(e,t)))}notify(e){T.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return T.batch((()=>Promise.all(e.map((e=>e.continue().catch(h))))))}};function he(e){return e.options.scope?.id}function de(e){return{onFetch:(t,r)=>{const s=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let r=!1;const u=q(t.options,t.fetchOptions),l=async(e,s,n)=>{if(r)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const i={client:t.client,queryKey:t.queryKey,pageParam:s,direction:n?"backward":"forward",meta:t.options.meta};var a;a=i,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",(()=>{r=!0})),t.signal)});const o=await u(i),{maxPages:c}=t.options,l=n?x:R;return{pages:l(e.pages,o,c),pageParams:l(e.pageParams,s,c)}};if(n&&i.length){const e="backward"===n,t={pages:i,pageParams:a},r=(e?ye:pe)(s,t);o=await l(t,r,e)}else{const t=e??i.length;do{const e=0===c?a[0]??s.initialPageParam:pe(s,o);if(c>0&&null==e)break;o=await l(o,e),c++}while(c<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function pe(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function ye(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var me=class{#$;#N;#l;#H;#G;#V;#W;#X;constructor(e={}){this.#$=e.queryCache||new ue,this.#N=e.mutationCache||new le,this.#l=e.defaultOptions||{},this.#H=new Map,this.#G=new Map,this.#V=0}mount(){this.#V++,1===this.#V&&(this.#W=M.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#$.onFocus())})),this.#X=F.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#$.onOnline())})))}unmount(){this.#V--,0===this.#V&&(this.#W?.(),this.#W=void 0,this.#X?.(),this.#X=void 0)}isFetching(e){return this.#$.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#N.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#$.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#$.build(this,t),s=r.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(y(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#$.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),n=this.#$.get(s.queryHash),i=n?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==a)return this.#$.build(this,s).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return T.batch((()=>this.#$.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#$.get(t.queryHash)?.state}removeQueries(e){const t=this.#$;T.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=this.#$;return T.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries({type:"active",...e},t))))}cancelQueries(e,t={}){const r={revert:!0,...t},s=T.batch((()=>this.#$.findAll(e).map((e=>e.cancel(r)))));return Promise.all(s).then(h).catch(h)}invalidateQueries(e,t={}){return T.batch((()=>(this.#$.findAll(e).forEach((e=>{e.invalidate()})),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=T.batch((()=>this.#$.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(h)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(s).then(h)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#$.build(this,t);return r.isStaleByTime(y(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(h).catch(h)}fetchInfiniteQuery(e){return e.behavior=de(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(h).catch(h)}ensureInfiniteQueryData(e){return e.behavior=de(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return F.isOnline()?this.#N.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#$}getMutationCache(){return this.#N}getDefaultOptions(){return this.#l}setDefaultOptions(e){this.#l=e}setQueryDefaults(e,t){this.#H.set(v(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],r={};return t.forEach((t=>{w(e,t.queryKey)&&Object.assign(r,t.defaultOptions)})),r}setMutationDefaults(e,t){this.#G.set(v(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#G.values()],r={};return t.forEach((t=>{w(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#l.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=b(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===P&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#l.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#$.clear(),this.#N.clear()}};let fe=null;function ge(){return fe||(fe=new me({defaultOptions:{queries:{staleTime:3e5,cacheTime:6e5,retry:1,refetchOnWindowFocus:!0}}})),fe}"undefined"!=typeof window&&(window.addEventListener("gb-invalidate-conditions",(()=>{ge().invalidateQueries({queryKey:["conditions"]})})),window.addEventListener("message",(e=>{"gb_invalidate_conditions"===e.data?.type&&ge().invalidateQueries({queryKey:["conditions"]})})),window.addEventListener("gb-overlay-saved-global",(e=>{const t=ge();t.invalidateQueries({queryKey:["overlays"]}),e.detail?.overlayId&&t.invalidateQueries({queryKey:["overlay",e.detail.overlayId]})})));const be=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),ve=window.wp.htmlEntities,we=window.gbp.components;const _e=window.wp.url;function Ee(e="",t={}){const r=`${function(){if("undefined"==typeof window)return"/wp-admin/";if(window.ajaxurl)try{const e=new URL(window.ajaxurl,window.location.origin),t=e.pathname.replace(/admin-ajax\.php$/,"");return`${e.origin}${t}`}catch(e){}const{origin:e,pathname:t}=window.location,r=t.indexOf("/wp-admin");return-1!==r?`${e}${t.substring(0,r)}/wp-admin/`:`${e}/wp-admin/`}().replace(/\/+$/,"/")}${e.replace(/^\/+/,"")}`;return t&&0!==Object.keys(t).length?(0,_e.addQueryArgs)(r,t):r}function Ce({onSelectKey:e,overlays:t,refreshKey:r,isIframeMode:o=!1,onOverlaySelect:c=null}){const u=function(){const e=ge();return ae({mutationFn:async e=>{const t=await ce()({path:`/wp/v2/gblocks_overlay/${e}`,method:"DELETE",data:{force:!0}});if(!t||!t.deleted)throw console.error("Delete failed - invalid response:",t),new Error("Failed to delete overlay panel");return t},onSuccess:(t,r)=>{e.removeQueries({queryKey:["overlay",r]}),e.invalidateQueries({queryKey:["overlays"]})},onError:e=>{console.error("Delete overlay panel mutation error:",e)}})}(),l=function(){const e=ge();return ae({mutationFn:async({id:e,status:t})=>ce()({path:`/wp/v2/gblocks_overlay/${e}`,method:"POST",data:{status:t}}),onSuccess:t=>{e.invalidateQueries({queryKey:["overlay",t.id]}),e.invalidateQueries({queryKey:["overlays"]})}})}(),h=function(){const e=ge();return ae({mutationFn:async e=>{const t=await ce()({path:`/wp/v2/gblocks_overlay/${e}?context=edit`});return await ce()({path:"/wp/v2/gblocks_overlay",method:"POST",data:{title:t.title.raw+" (Copy)",content:t.content.raw,status:"draft",meta:t.meta,gblocks_overlay_cat:t.gblocks_overlay_cat}})},onSuccess:()=>{e.invalidateQueries({queryKey:["overlays"]})},onError:e=>{console.error("Duplicate overlay panel mutation error:",e)}})}(),[d,p]=(0,a.useState)(null),[y,m]=(0,a.useState)([]),[f,g]=(0,a.useState)({}),{data:b,isLoading:v}=function(e=100,t=1){return se({queryKey:["conditions",{perPage:e,page:t}],queryFn:()=>async function({perPage:e=100,page:t=1}){const r=await ce()({path:`/generateblocks-pro/advanced-conditions/v1/conditions/?page=${t}&per_page=${e}`});if(r.success)return r.response;throw new Error("Failed to fetch conditions")}({perPage:e,page:t}),select:e=>({conditions:e?.conditions||[],total:e?.total||0,pages:e?.pages||1})})}(100,1),w=ge();(0,a.useEffect)((()=>{ce()({path:"/wp/v2/overlay-categories?per_page=100"}).then((e=>{m(e)})).catch((e=>{console.error("Error loading categories:",e)}))}),[r]),(0,a.useEffect)((()=>{if(b?.conditions){const e={};b.conditions.forEach((t=>{let r="";"object"==typeof t.title&&t.title?.rendered?r=t.title.rendered:"string"==typeof t.title&&(r=t.title),e[t.id]=r})),g(e)}}),[b]);const _=(0,a.useMemo)((()=>[{id:"name",header:(0,i.__)("Name","generateblocks-pro"),accessorKey:"title.rendered",cell:e=>{const{admin_edit_url:t,id:r,title:a,status:u}=e.row.original;let l="";"object"==typeof a&&null!==a?"object"==typeof a.rendered&&void 0!==a.rendered?.rendered?l=a.rendered.rendered:void 0!==a.rendered&&(l=a.rendered):"string"==typeof a&&(l=a),l&&""!==l.trim()||(l=(0,i.__)("(Untitled)","generateblocks-pro"));const h="draft"===u;return o&&c?(0,s.createElement)("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},(0,s.createElement)(n.Button,{variant:"link",onClick:()=>c(r,l),style:{textDecoration:"none",padding:0,minHeight:"auto"}},(0,ve.decodeEntities)(l)),h&&(0,s.createElement)("span",{style:{color:"#999",fontSize:"0.9em"}},"(",(0,i.__)("draft","generateblocks-pro"),")")):(0,s.createElement)("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},(0,s.createElement)("a",{href:t},(0,ve.decodeEntities)(l)),h&&(0,s.createElement)("span",{style:{color:"#999",fontSize:"0.9em"}},"(",(0,i.__)("draft","generateblocks-pro"),")"))}},{id:"type",header:(0,i.__)("Overlay Panel Type","generateblocks-pro"),accessorKey:"overlay_type",cell:e=>{const t=e.getValue()||"standard",r={standard:(0,i.__)("Standard","generateblocks-pro"),anchored:(0,i.__)("Anchored","generateblocks-pro"),"mega-menu":(0,i.__)("Mega Menu","generateblocks-pro")};return(0,s.createElement)("span",{className:"gb-modal-type"},r[t]||t)}},{id:"category",header:(0,i.__)("Category","generateblocks-pro"),accessorKey:"gblocks_overlay_cat",cell:e=>{const t=e.getValue()||[],r=t.length>0?t[0]:null;if(!r)return(0,s.createElement)("span",{className:"gb-condition-category gb-condition-category--uncategorized"},(0,i.__)("Uncategorized","generateblocks-pro"));const n=y.find((e=>e.id===r)),a=n?n.name:"";return a?(0,s.createElement)("span",{className:"gb-condition-category"},a):(0,s.createElement)("span",{className:"gb-condition-category gb-condition-category--uncategorized"},(0,i.__)("Uncategorized","generateblocks-pro"))}},{id:"condition",header:(0,i.__)("Display Condition","generateblocks-pro"),accessorKey:"display_condition",cell:e=>{const t=e.getValue(),r=e.row.original.display_condition_invert;if(!t)return(0,s.createElement)("span",{className:"gb-modal-condition gb-modal-condition--everywhere"},(0,i.__)("Display Everywhere","generateblocks-pro"));if(v)return(0,s.createElement)("span",{className:"gb-modal-condition gb-modal-condition--loading"},(0,s.createElement)(n.Spinner,null));const a=f[t]||(0,i.__)("Unknown Condition","generateblocks-pro"),c=Ee("admin.php",{page:"generateblocks-conditions",edit:t});if(o){const e=r?`${(0,i.__)("NOT","generateblocks-pro")}: ${a}`:a;return(0,s.createElement)("span",{className:"gb-modal-condition"},e)}return r?(0,s.createElement)("span",{className:"gb-modal-condition"},(0,i.__)("NOT","generateblocks-pro"),": ",(0,s.createElement)("a",{href:c},a)):(0,s.createElement)("span",{className:"gb-modal-condition"},(0,s.createElement)("a",{href:c},a))}},{id:"actions",header:null,cell:e=>{const{id:t,admin_edit_url:r,status:a}=e.row.original;return(0,s.createElement)("div",{className:"gb-cloud-public-keys__actions"},(0,s.createElement)(n.DropdownMenu,{icon:be,label:(0,i.__)("More options","generateblocks-pro"),popoverProps:{placement:"left"}},(({onClose:u})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(n.MenuGroup,null,(0,s.createElement)(n.MenuItem,{onClick:()=>{if(o&&c){const{title:r}=e.row.original;let s="";"object"==typeof r&&null!==r?"object"==typeof r.rendered&&void 0!==r.rendered?.rendered?s=r.rendered.rendered:void 0!==r.rendered&&(s=r.rendered):"string"==typeof r&&(s=r),s&&""!==s.trim()||(s=(0,i.__)("(Untitled)","generateblocks-pro")),c(t,s)}else window.location.href=r;u()}},(0,i.__)("Edit Overlay Panel","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{onClick:()=>{h.mutateAsync(t).then((e=>{if(w.invalidateQueries({queryKey:["overlays"]}),e?.id){const t=e.admin_edit_url||Ee("post.php",{post:e.id,action:"edit"});window.location.href=t}})),u()}},(0,i.__)("Duplicate","generateblocks-pro"))),(0,s.createElement)(n.MenuGroup,null,(0,s.createElement)(n.MenuItem,{onClick:()=>{const e="publish"===a?"draft":"publish";l.mutateAsync({id:t,status:e}).then((()=>{w.invalidateQueries({queryKey:["overlays"]})})),u()}},"publish"===a?(0,i.__)("Set as Draft","generateblocks-pro"):(0,i.__)("Publish","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{isDestructive:!0,onClick:()=>{p(t),u()}},(0,i.__)("Delete Overlay Panel","generateblocks-pro")))))))}}]),[e,o,c,y,f,v]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"gb-dashboard-table-wrapper"},t.length?(0,s.createElement)(we.Table,{className:"gb-dashboard-table table-view-list",columns:_,data:t,"aria-labelledby":"modals-table-header"}):(0,s.createElement)("div",{className:"gb-modals-empty-state"},(0,s.createElement)("p",null,(0,i.__)("No overlay panels found.","generateblocks-pro")))),!!d&&(0,s.createElement)(n.Modal,{title:(0,i.__)("Confirm","generateblocks-pro"),isDismissible:!1,onRequestClose:()=>null,className:"gb-modal-name-input"},(0,s.createElement)("div",{className:"gb-modal-input-container"},(0,i.__)("This will permanently delete this overlay panel. You cannot undo this action.","generateblocks-pro")),(0,s.createElement)(n.Button,{variant:"primary",onClick:async()=>{try{await u.mutateAsync(d),w.invalidateQueries({queryKey:["overlays"]}),p(null)}catch(e){console.error("Error deleting overlay:",e),p(null)}}},(0,i.__)("OK","generateblocks-pro")),(0,s.createElement)(n.Button,{variant:"tertiary",onClick:()=>p(null)},(0,i.__)("Cancel","generateblocks-pro"))))}const Oe=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(o.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"})),Se=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),ke=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(o.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));function Re({category:e,updateCategory:t,saving:r}){const[o,c]=(0,a.useState)(!1),[u,l]=(0,a.useState)((0,ve.decodeEntities)(e.name)),[h,d]=(0,a.useState)(!1),p=async()=>{d(!0),await t(e.id,u),d(!1),c(!1)},y=()=>{c(!1),l((0,ve.decodeEntities)(e.name))};return o&&!e.isUncategorized?(0,s.createElement)("div",{className:"gb-edit-taxonomy-form"},(0,s.createElement)(n.TextControl,{value:u,onChange:l,disabled:h||r,onKeyDown:e=>{"Enter"===e.key?p():"Escape"===e.key&&y()},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,s.createElement)("div",{className:"gb-edit-actions"},(0,s.createElement)(n.Button,{variant:"primary",size:"small",onClick:p,disabled:!u.trim()||h||r,isBusy:h||r,__next40pxDefaultSize:!0},(0,i.__)("Save","generateblocks-pro")),(0,s.createElement)(n.Button,{variant:"secondary",size:"small",onClick:y,disabled:h||r,__next40pxDefaultSize:!0},(0,i.__)("Cancel","generateblocks-pro")))):(0,s.createElement)("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},(0,s.createElement)("strong",{className:e.isUncategorized?"gb-uncategorized-label":""},(0,ve.decodeEntities)(e.name)),!e.isUncategorized&&(0,s.createElement)(n.Button,{icon:ke,size:"small",onClick:()=>{c(!0),l((0,ve.decodeEntities)(e.name))},label:(0,i.__)("Edit category name","generateblocks-pro"),style:{visibility:"hidden"},className:"gb-taxonomy-edit-button"}))}function xe({taxonomyConfig:e={slug:"",restBase:"",labels:{singular:"Category",plural:"Categories",uncategorized:"Uncategorized",itemsCount:"items"}},itemsEndpoint:t,itemsTaxonomyField:r,manageEndpoint:o,onNavigateBack:c,onTaxonomyChange:u}){const[l,h]=(0,a.useState)([]),[d,p]=(0,a.useState)(!1),[y,m]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)(""),{labels:w={},restBase:_}=e;(0,a.useEffect)((()=>{E()}),[]);const E=async()=>{p(!0),g(null);try{const e=[ce()({path:`/wp/v2/${_}`})];t&&e.push(ce()({path:`${t}?per_page=100`}));const s=await Promise.all(e),n=s[0],a=s[1];if(n){let e=[...n];if(a?.success&&r){const t=(a.response?.[Object.keys(a.response)[0]]||[]).filter((e=>!e[r]||0===e[r].length)).length;e=[{id:"uncategorized",name:w.uncategorized||(0,i.__)("Uncategorized","generateblocks-pro"),slug:"",count:t,isUncategorized:!0},...n]}h(e)}}catch(e){g((0,i.__)("Failed to load categories.","generateblocks-pro"))}finally{p(!1)}},C=async()=>{if(b.trim()){m(!0),g(null);try{const e=b.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-");(await ce()({path:o,method:"POST",data:{name:b.trim(),slug:e}})).success&&(await E(),v(""),u&&u())}catch(e){g((0,i.__)("Failed to create category.","generateblocks-pro"))}finally{m(!1)}}},O=async(e,t)=>{if(t.trim()){m(!0),g(null);try{(await ce()({path:`${o}/${e}`,method:"POST",data:{name:t.trim()}})).success&&(await E(),u&&u())}catch(e){g((0,i.__)("Failed to update category.","generateblocks-pro"))}finally{m(!1)}}},S=async e=>{const t=w.singular?.toLowerCase()||"category",r=(0,i.sprintf)(/* translators: %1$s: singular taxonomy label, %2$s: singular taxonomy label */ /* translators: %1$s: singular taxonomy label, %2$s: singular taxonomy label */ (0,i.__)("Are you sure you want to delete this %1$s? Items using this %2$s will become uncategorized.","generateblocks-pro"),t,t);if(confirm(r)){m(!0),g(null);try{(await ce()({path:`${o}/${e}`,method:"DELETE"})).success&&(await E(),u&&u())}catch(e){g((0,i.__)("Failed to delete category.","generateblocks-pro"))}finally{m(!1)}}},k=(0,a.useMemo)((()=>[{id:"name",header:(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("%s Name","generateblocks-pro"),w.singular||"Category"),accessorKey:"name",cell:e=>{const t=e.row.original;return(0,s.createElement)(Re,{category:t,updateCategory:O,saving:y})}},{id:"items",header:w.itemsCount?w.itemsCount.charAt(0).toUpperCase()+w.itemsCount.slice(1):(0,i.__)("Items","generateblocks-pro"),cell:e=>`${e.row.original.count||0} ${w.itemsCount||"items"}`},{id:"actions",header:(0,i.__)("Actions","generateblocks-pro"),cell:e=>{const t=e.row.original;return t.isUncategorized?(0,s.createElement)("span",{className:"gb-uncategorized-actions"},(0,i.__)("Built-in","generateblocks-pro")):(0,s.createElement)(n.DropdownMenu,{icon:be,label:(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("%s actions","generateblocks-pro"),w.singular||"Category"),className:"gb-taxonomy-actions",popoverProps:{placement:"left"}},(({onClose:e})=>(0,s.createElement)(n.MenuGroup,null,(0,s.createElement)(n.MenuItem,{icon:Oe,onClick:()=>{S(t.id),e()},isDestructive:!0},(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("Delete %s","generateblocks-pro"),w.singular||"Category")))))}}]),[w,O,S,y]);return(0,s.createElement)("div",{className:"gb-taxonomy-manager"},(0,s.createElement)("div",{className:"gb-taxonomy-manager-header"},(0,s.createElement)("div",{className:"gb-taxonomy-title-section"},(0,s.createElement)("h2",null,(0,i.sprintf)(/* translators: %s: plural taxonomy label */ /* translators: %s: plural taxonomy label */ (0,i.__)("Manage %s","generateblocks-pro"),w.plural||"Categories"))),(0,s.createElement)("div",{className:"gb-taxonomy-header-actions"},(0,s.createElement)(n.Button,{variant:"secondary",onClick:()=>{c()},disabled:y},(0,i.__)("Back","generateblocks-pro")))),(0,s.createElement)("div",{className:"gb-taxonomy-content"},!!f&&(0,s.createElement)(n.Notice,{status:"error",isDismissible:!1,className:"gb-taxonomy-error-notice"},f),(0,s.createElement)("div",{className:"gb-create-taxonomy-section"},(0,s.createElement)("h3",null,(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("Create New %s","generateblocks-pro"),w.singular||"Category")),(0,s.createElement)("div",{className:"gb-create-taxonomy-form"},(0,s.createElement)(n.TextControl,{label:(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("%s Name","generateblocks-pro"),w.singular||"Category"),value:b,onChange:v,placeholder:(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("Enter %s name…","generateblocks-pro"),w.singular?.toLowerCase()||"category"),disabled:y,onKeyDown:e=>{"Enter"===e.key&&C()},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,s.createElement)(n.Button,{variant:"primary",icon:Se,onClick:C,disabled:!b.trim()||y,isBusy:y,__next40pxDefaultSize:!0},(0,i.sprintf)(/* translators: %s: singular taxonomy label */ /* translators: %s: singular taxonomy label */ (0,i.__)("Create %s","generateblocks-pro"),w.singular||"Category")))),(0,s.createElement)("div",{className:"gb-taxonomy-list-section"},(0,s.createElement)("h3",null,(0,i.sprintf)(/* translators: %s: plural taxonomy label */ /* translators: %s: plural taxonomy label */ (0,i.__)("Existing %s","generateblocks-pro"),w.plural||"Categories")),d?(0,s.createElement)("div",{className:"gb-taxonomy-loading"},(0,s.createElement)(n.Spinner,null),(0,s.createElement)("span",null,(0,i.sprintf)(/* translators: %s: plural taxonomy label */ /* translators: %s: plural taxonomy label */ (0,i.__)("Loading %s…","generateblocks-pro"),w.plural?.toLowerCase()||"categories"))):(0,s.createElement)("div",{className:"gb-dashboard-table-wrapper"},0===l.length?(0,s.createElement)("p",{style:{marginTop:"0"}},(0,i.sprintf)(/* translators: %s: plural taxonomy label */ /* translators: %s: plural taxonomy label */ (0,i.__)("No %s created yet.","generateblocks-pro"),w.plural?.toLowerCase()||"categories")):(0,s.createElement)(we.Table,{className:"gb-dashboard-table table-view-list",columns:k,data:l,"aria-labelledby":"taxonomy-table-header"})))))}const Pe={taxonomyConfig:{slug:"gblocks_overlay_cat",restBase:"overlay-categories",labels:{singular:(0,i.__)("Category","generateblocks-pro"),plural:(0,i.__)("Categories","generateblocks-pro"),uncategorized:(0,i.__)("Uncategorized","generateblocks-pro"),itemsCount:"overlay panels"}},itemsEndpoint:"/generateblocks-pro/overlays/v1/overlays",itemsTaxonomyField:"gblocks_overlay_cat",manageEndpoint:"/generateblocks-pro/overlays/v1/manage_category"};function qe({onNavigateBack:e,onCategoriesChange:t}){return(0,s.createElement)("div",{className:"gb-categories-manager"},(0,s.createElement)(xe,{...Pe,onNavigateBack:e,onTaxonomyChange:t}))}function Qe({currentView:e,views:t={},className:r="",minHeight:n=400,viewOrder:i=[]}){const[o,c]=(0,a.useState)(e),[u,l]=(0,a.useState)(!1),[h,d]=(0,a.useState)(!1),[p,y]=(0,a.useState)("forward");(0,a.useEffect)((()=>{h||d(!0)}),[]),(0,a.useEffect)((()=>{if(h&&o!==e){const t=i.indexOf(e),r=i.indexOf(o);y(-1!==t&&-1!==r?t>r?"forward":"backward":"forward"),l(!0);const s=setTimeout((()=>{l(!1),c(e)}),260);return()=>clearTimeout(s)}}),[e,o,h,i]);const m=["gb-navigator",r,u?"gb-navigator--transitioning":"",u?`gb-navigator--${p}`:""].filter(Boolean).join(" ");return(0,s.createElement)("div",{className:m,style:{minHeight:`${n}px`}},Object.entries(t).map((([t,r])=>{const n=t===e,i=["gb-navigator-view",`gb-navigator-view--${t}`,n?"gb-navigator-view--active":"gb-navigator-view--inactive"].join(" ");return(0,s.createElement)("div",{key:t,className:i,"aria-hidden":!n},(n||u)&&r)})))}function Me({isIframeMode:e=!1,onOverlaySelect:t=null,onCreateOverlay:r=null}){const[o,u]=(0,a.useState)("list"),[l,h]=(0,a.useState)(0),[d,p]=(0,a.useState)((()=>{const e=new URLSearchParams(window.location.search);return parseInt(e.get("overlayPage")||"1",10)})),{data:y,isLoading:m,isError:f}=function({status:e="publish",perPage:t=200,page:r=1,category:s=""}={}){return se({queryKey:["overlays",{status:e,perPage:t,page:r,category:s}],queryFn:async()=>{const n=new URLSearchParams({per_page:t,page:r,_fields:"id,title,trigger_info,status,date,modified,admin_edit_url,gblocks_overlay_cat,overlay_type,display_condition,display_condition_invert",orderby:"date",order:"desc"});"any"===e?n.append("status","publish,draft,pending,private,future"):n.append("status",e),s&&n.append("gblocks_overlay_cat",s);const i=await ce()({path:`/wp/v2/gblocks_overlay?${n.toString()}`,parse:!1});return{overlays:await i.json(),totalPages:parseInt(i.headers.get("X-WP-TotalPages")||"1",10),totalItems:parseInt(i.headers.get("X-WP-Total")||"0",10)}},staleTime:12e4,cacheTime:3e5})}({status:"any",perPage:20,page:d}),g=y?.overlays||[],b=y?.totalPages||1,v=(0,a.useMemo)((()=>g&&g.length>0?g.map((e=>{const t=e.title?.rendered||e.title||"Untitled";return{...e,title:{...e.title,rendered:t}}})):[]),[g]);(0,a.useEffect)((()=>{const e=new URL(window.location);e.searchParams.set("overlayPage",d),window.history.replaceState({},"",e)}),[d]),(0,a.useEffect)((()=>{if(e)return;const t=new URLSearchParams(window.location.search).get("categories");u(t?"categories":"list")}),[e]);const w=t=>{if(e)return;const r=new URL(window.location);"categories"===t?r.searchParams.set("categories","true"):r.searchParams.delete("categories"),window.history.pushState({},"",r)},_=e=>{p(e)};if(m)return(0,s.createElement)("div",{className:"gb-cloud"},(0,s.createElement)(n.Spinner,null));if(f)return(0,s.createElement)("div",{className:"gb-cloud"},(0,s.createElement)("p",null,(0,i.__)("Error loading overlay panels. Please try again.","generateblocks-pro")));const E={list:(0,s.createElement)("div",{className:"gb-dashboard-admin"},(0,s.createElement)("div",{className:"gb-dashboard-admin__header"},(0,s.createElement)("div",{className:"gb-dashboard-admin__header-buttons"},e&&r?(0,s.createElement)("div",{style:{display:"flex"}},(0,s.createElement)(n.Button,{variant:"primary",onClick:()=>{r("new")},style:{borderTopRightRadius:0,borderBottomRightRadius:0}},(0,i.__)("Add New","generateblocks-pro")),(0,s.createElement)(n.DropdownMenu,{icon:c,label:(0,i.__)("Select overlay panel type","generateblocks-pro"),popoverProps:{placement:"bottom-end"},toggleProps:{variant:"primary",style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:"1px solid rgba(255,255,255,0.1)"},iconSize:18}},(({onClose:e})=>(0,s.createElement)(n.MenuGroup,null,(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),r("new","standard")}},(0,i.__)("Standard","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),r("new","anchored")}},(0,i.__)("Anchored","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),r("new","mega-menu")}},(0,i.__)("Mega Menu","generateblocks-pro")))))):(0,s.createElement)("div",{style:{display:"flex"}},(0,s.createElement)(n.Button,{variant:"primary",href:gbOverlaysDashboard.newOverlayUrl,style:{borderTopRightRadius:0,borderBottomRightRadius:0}},(0,i.__)("Add New","generateblocks-pro")),(0,s.createElement)(n.DropdownMenu,{icon:c,label:(0,i.__)("Select overlay panel type","generateblocks-pro"),popoverProps:{placement:"bottom-end"},toggleProps:{variant:"primary",style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:"1px solid rgba(255,255,255,0.1)"},iconSize:18}},(({onClose:e})=>(0,s.createElement)(n.MenuGroup,null,(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),window.location.href=gbOverlaysDashboard.newOverlayUrl+"&overlay_type=standard"}},(0,i.__)("Standard","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),window.location.href=gbOverlaysDashboard.newOverlayUrl+"&overlay_type=anchored"}},(0,i.__)("Anchored","generateblocks-pro")),(0,s.createElement)(n.MenuItem,{onClick:()=>{e(),window.location.href=gbOverlaysDashboard.newOverlayUrl+"&overlay_type=mega-menu"}},(0,i.__)("Mega Menu","generateblocks-pro"))))))),(0,s.createElement)("div",{className:"gb-dashboard-admin__header-buttons-right"},(0,s.createElement)(n.Button,{variant:"secondary",onClick:()=>{u("categories"),w("categories")}},(0,i.__)("Manage Categories","generateblocks-pro")))),(0,s.createElement)("div",{className:"gb-dashboard-admin__inner"},(0,s.createElement)(Ce,{overlays:v,refreshKey:l,isIframeMode:e,onOverlaySelect:t}),b>1&&(0,s.createElement)("div",{className:"gb-dashboard__pagination"},(0,s.createElement)(n.Button,{disabled:1===d,onClick:()=>_(d-1),variant:"secondary"},(0,i.__)("Previous","generateblocks-pro")),(0,s.createElement)("span",null,(0,i.sprintf)( // translators: %1$s: current page, %2$s: total pages // translators: %1$s: current page, %2$s: total pages (0,i.__)("Page %1$s of %2$s","generateblocks-pro"),d,b)),(0,s.createElement)(n.Button,{disabled:d===b,onClick:()=>_(d+1),variant:"secondary"},(0,i.__)("Next","generateblocks-pro"))))),categories:(0,s.createElement)("div",{className:"gb-dashboard-admin"},(0,s.createElement)(qe,{onNavigateBack:()=>{u("list"),w("list")},onCategoriesChange:()=>{h((e=>e+1))}}))};return(0,s.createElement)(Qe,{currentView:o,views:E,viewOrder:["list","categories"],className:"gb-modals-dashboard",minHeight:400})}function De(e){return(0,s.createElement)(J,{client:ge()},(0,s.createElement)(Me,{...e}))}window.addEventListener("DOMContentLoaded",(()=>{var e,t;e=(0,s.createElement)(De,null),t=document.getElementById("gblocks-overlays"),void 0!==a.createRoot?(0,a.createRoot)(t).render(e):(0,a.render)(e,t)}))})();
💾 Save Changes
❌ Cancel