import{a as e,i as t,n,r,t as i}from"./static/esm/6046a29b.js";import{n as a,t as o}from"./static/esm/e6780554.js";(function(){var e=window.__useblocks__=window.__useblocks__||{};__useblocks__.publicPath||(__useblocks__.publicPath=(function(){var e=(function(){if(typeof document>`u`)return`./`;var e=document.getElementsByTagName(`script`),t=document.currentScript||e[e.length-1];return t&&t.src?t.src.substring(0,t.src.lastIndexOf(`/`)+1):`./`})();e||=`./`;try{var t=String(e);if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)||t.indexOf(`//`)===0)return t;var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return String(e)}})()),__useblocks__.assetUrl||(__useblocks__.assetUrl=function(e){function t(e){try{var t=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return t?new URL(String(e||``),t).href:String(e||``)}catch{return String(e||``)}}var n=String(e||``);if(!n)return``;if(/^(?:data:|blob:)/.test(n))return n;if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.indexOf(`//`)===0||n.charAt(0)===`/`)return t(n);var r=n.replace(/^\.\/+/,``).replace(/^\/+/,``),i=`static/media`.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/,``),a=i&&r.indexOf(i+`/`)!==0?i+`/`+r:r,o=__useblocks__.publicPath||`./`;try{return new URL(a,o).href}catch{return o.slice(-1)!==`/`&&(o+=`/`),t(o+a)}});var t=e.modules=Object.create(null),n=import(`./runtime/index.js`),r=import(`./ui-kit/index.js`);t.React=n.then(function(e){return e.React}),t.ReactDom=n.then(function(e){return e.ReactDom}),t.ReactDomClient=n.then(function(e){return e.ReactDomClient}),t.ReactJsxRuntime=n.then(function(e){return e.ReactJsxRuntime}),t.ReactJsxDevRuntime=n.then(function(e){return e.ReactJsxDevRuntime}),t.PropTypes=n.then(function(e){return e.PropTypes}),t.ReactRouterDom=n.then(function(e){return e.ReactRouterDom}),t.Antd=n.then(function(e){return e.Antd}),t.AntDesignIcons=n.then(function(e){return e.AntDesignIcons}),t.AntDesignCssinjs=n.then(function(e){return e.AntDesignCssinjs}),t.Classnames=n.then(function(e){return e.Classnames}),t.Dayjs=n.then(function(e){return e.Dayjs}),t.Uuid=n.then(function(e){return e.Uuid}),t.UiKit=r.then(function(e){return e.UiKit===void 0?e:e.UiKit});var i=Promise.all([n,r]).then(function(e){var n=e[0]||Object.create(null),r=Object.create(null);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);var a=e[1]||Object.create(null);for(var o in r.UiKit=a.UiKit===void 0?a:a.UiKit,r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return r}),a=t,o=i;typeof e.define!=`function`&&(Function(`__amdEnv`,`/**
 * Async AMD Loader (IIFE version for injection)
 *
 * This file is injected at the beginning of iframe entry points.
 * It initializes the AMD loader before any define() calls.
 *
 * Note: __amdEnv is replaced at build time with the active product namespace
 * (window bucket derived from REACT_APP_NAME).
 *
 * @internal
 */
(function() {
  'use strict';

  // Skip if already initialized
  if (typeof __amdEnv !== 'undefined' && __amdEnv.define) {
    return;
  }

  // Initialize namespace
  if (typeof __amdEnv === 'undefined') {
    window.__amdEnv = {};
  }

  // State
  var modules = {};
  var resolved = {};
  var pending = {};
  var loading = {};
  var errors = {};
  var baseUrl = './';
  var paths = {};

  // ===========================================================================
  // Error Handling
  // ===========================================================================

  function createLoadError(id, cause) {
    var error = new Error(
      '[AMD] Failed to load module "' + id + '"' +
      (cause ? ': ' + cause.message : '')
    );
    error.moduleId = id;
    error.cause = cause;
    return error;
  }

  function createDependencyError(id, depId, cause) {
    var error = new Error(
      '[AMD] Failed to resolve dependency "' + depId + '" for module "' + id + '"' +
      (cause ? ': ' + cause.message : '')
    );
    error.moduleId = id;
    error.dependencyId = depId;
    error.cause = cause;
    return error;
  }

  // ===========================================================================
  // Helpers
  // ===========================================================================

  function normalizeAbsoluteId(id) {
    var parts = String(id || '').split('/');
    var out = [];

    for (var i = 0; i < parts.length; i++) {
      var part = parts[i];
      if (!part || part === '.') continue;
      if (part === '..') {
        if (out.length > 0) out.pop();
        continue;
      }
      out.push(part);
    }

    return out.join('/');
  }

  function normalizeModuleId(id) {
    var normalizedId = String(id || '').replace(/\\\\/g, '/');
    var normalizedBase = String(baseUrl || './').replace(/\\\\/g, '/');

    normalizedBase = normalizedBase.replace(/^\\.\\/+/, '');
    normalizedBase = normalizedBase.replace(/^\\/+/, '');

    if (normalizedBase && normalizedBase.slice(-1) !== '/') {
      normalizedBase += '/';
    }

    if (normalizedBase && normalizedId.indexOf(normalizedBase) === 0) {
      normalizedId = normalizedId.slice(normalizedBase.length);
    }

    if (normalizedId.indexOf('./') === 0) {
      normalizedId = normalizedId.slice(2);
    }

    return normalizedId;
  }

  function resolveId(rawId, parentId) {
    var id = String(rawId || '');
    if (!id) return id;

    var isRelative = id.indexOf('./') === 0 || id.indexOf('../') === 0;
    if (!isRelative) {
      return normalizeModuleId(normalizeAbsoluteId(id));
    }

    var base = normalizeAbsoluteId(parentId || '');
    var baseParts = base ? base.split('/') : [];
    if (baseParts.length > 0) {
      // Parent id includes file/module name at the end, remove it.
      baseParts.pop();
    }

    var requestParts = id.split('/');
    for (var i = 0; i < requestParts.length; i++) {
      var part = requestParts[i];
      if (!part || part === '.') continue;
      if (part === '..') {
        if (baseParts.length > 0) baseParts.pop();
        continue;
      }
      baseParts.push(part);
    }

    return normalizeModuleId(baseParts.join('/'));
  }

  function isAbsoluteUrl(url) {
    return /^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.test(url) || url.indexOf('//') === 0;
  }

  function normalizeRuntimeUrl(url) {
    var normalizedUrl = String(url || '');
    if (!normalizedUrl) {
      return normalizedUrl;
    }

    if (isAbsoluteUrl(normalizedUrl)) {
      return normalizedUrl;
    }

    try {
      var baseUrl =
        typeof document !== 'undefined' && document.baseURI
          ? document.baseURI
          : (typeof window !== 'undefined' && window.location ? window.location.href : '');
      return baseUrl ? new URL(normalizedUrl, baseUrl).href : normalizedUrl;
    } catch (e) {
      return normalizedUrl;
    }
  }

  function resolveBaseUrl() {
    var normalizedBase = String(baseUrl || './');

    if (normalizedBase.slice(-1) !== '/') {
      normalizedBase += '/';
    }

    if (isAbsoluteUrl(normalizedBase) || normalizedBase.charAt(0) === '/') {
      return normalizedBase;
    }

    if (typeof __amdEnv !== 'undefined' && __amdEnv && __amdEnv.publicPath) {
      try {
        return new URL(normalizedBase, normalizeRuntimeUrl(__amdEnv.publicPath)).href;
      } catch (e) {
        // Ignore and keep relative baseUrl.
      }
    }

    return normalizeRuntimeUrl(normalizedBase);
  }

  function toUrl(id, parentId) {
    var normalizedId = resolveId(id, parentId);
    var normalizedBase = resolveBaseUrl();
    var mappedId = Object.prototype.hasOwnProperty.call(paths, normalizedId)
      ? String(paths[normalizedId] || '')
      : normalizedId;

    if (mappedId.slice(-3) !== '.js') {
      mappedId += '.js';
    }

    try {
      return new URL(mappedId, normalizedBase).href;
    } catch (e) {
      return normalizedBase + mappedId;
    }
  }

  function getAnonymousModuleId() {
    if (typeof document === 'undefined') {
      return '';
    }

    var currentScript = document.currentScript;
    if (currentScript) {
      var scriptModuleId = currentScript.getAttribute('data-amd-module-id');
      if (scriptModuleId) {
        return scriptModuleId;
      }
    }

    return '';
  }

  // ===========================================================================
  // define(id, deps, factory)
  // ===========================================================================

  function define(id, deps, factory) {
    if (Array.isArray(id)) {
      factory = deps;
      deps = id;
      id = getAnonymousModuleId();
    } else if (typeof id === 'function') {
      factory = id;
      deps = [];
      id = getAnonymousModuleId();
    } else if (typeof deps === 'function') {
      factory = deps;
      deps = [];
    }

    if (!id) {
      throw new Error('[AMD] Anonymous define() could not be associated with a module id');
    }

    if (id in modules) {
      return;
    }

    modules[id] = { deps: deps || [], factory: factory };
  }

  define.amd = { async: true };

  function createCompatExports() {
    return function __amdCompatExports() {};
  }

  function createCompatModule(id, exportsObject) {
    return { id: id, exports: exportsObject, uri: toUrl(id) };
  }

  // ===========================================================================
  // require(id, callback, errback)
  // ===========================================================================

  function require(id, callback, errback, parentId) {
    if (Array.isArray(id)) {
      var promise = Promise.all(id.map(function(dep) { return requireOne(dep, parentId); }))
        .then(function(deps) {
          if (callback) callback.apply(null, deps);
          return deps;
        });

      if (errback) promise.catch(errback);
      return promise;
    }

    return requireOne(id, parentId);
  }

  function syncRequire(rawId, parentId) {
    if (Array.isArray(rawId)) {
      throw new Error('[AMD] syncRequire does not support dependency arrays');
    }

    var id = resolveId(rawId, parentId);

    if (id in errors) {
      throw errors[id];
    }

    if (id in resolved) {
      return resolved[id];
    }

    if (id in pending || id in loading) {
      throw createLoadError(id, new Error('Module is still loading asynchronously'));
    }

    if (!(id in modules)) {
      throw createLoadError(id, new Error('Module is not available for syncRequire'));
    }

    return executeModuleSync(id);
  }

  // ===========================================================================
  // requireOne(id)
  // ===========================================================================

  function requireOne(rawId, parentId) {
    var id = resolveId(rawId, parentId);

    if (id in errors) return Promise.reject(errors[id]);
    if (id in resolved) return Promise.resolve(resolved[id]);
    if (id in pending) return pending[id];

    if (!(id in modules)) {
      pending[id] = loadScript(id)
        .then(function() {
          if (!(id in modules)) {
            var error = createLoadError(id, new Error('Module not defined after script load'));
            errors[id] = error;
            throw error;
          }
          return executeModule(id);
        })
        .catch(function(err) {
          delete pending[id];
          var error = createLoadError(id, err);
          errors[id] = error;
          throw error;
        });
      return pending[id];
    }

    pending[id] = executeModule(id);
    return pending[id];
  }

  function executeModule(id) {
    var mod = modules[id];
    var localRequire = localRequireFor(id);
    var exportsObject = createCompatExports();
    var moduleObject = createCompatModule(id, exportsObject);

    return Promise.all(
      mod.deps.map(function(dep) {
        if (dep === 'exports') return exportsObject;
        if (dep === 'require') return localRequire;
        if (dep === 'module') return moduleObject;

        return requireOne(dep, id).catch(function(err) {
          throw createDependencyError(id, dep, err);
        });
      })
    ).then(function(depValues) {
      var result = mod.factory.apply(null, depValues);

      if (result && typeof result.then === 'function') {
        return result.then(function(asyncResult) {
          resolved[id] = asyncResult !== undefined ? asyncResult : moduleObject.exports;
          delete pending[id];
          return resolved[id];
        });
      }

      resolved[id] = result !== undefined ? result : moduleObject.exports;
      delete pending[id];
      return resolved[id];
    }).catch(function(err) {
      delete pending[id];
      errors[id] = err;
      throw err;
    });
  }

  function executeModuleSync(id) {
    var mod = modules[id];
    var localRequire = localRequireFor(id);
    var exportsObject = createCompatExports();
    var moduleObject = createCompatModule(id, exportsObject);

    try {
      var depValues = mod.deps.map(function(dep) {
        if (dep === 'exports') return exportsObject;
        if (dep === 'require') return localRequire;
        if (dep === 'module') return moduleObject;

        try {
          return syncRequire(dep, id);
        } catch (err) {
          throw createDependencyError(id, dep, err);
        }
      });

      var result = mod.factory.apply(null, depValues);
      if (result && typeof result.then === 'function') {
        throw createLoadError(id, new Error('Module resolved asynchronously and cannot be syncRequired'));
      }

      resolved[id] = result !== undefined ? result : moduleObject.exports;
      return resolved[id];
    } catch (err) {
      errors[id] = err;
      throw err;
    }
  }

  function localRequireFor(id) {
    var localRequire = function(depId, cb, errback) {
      if (Array.isArray(depId)) return require(depId, cb, errback, id);
      var resolvedId = resolveId(depId, id);
      if (resolvedId in resolved) {
        return resolved[resolvedId];
      }
      if (resolvedId in modules) {
        return syncRequire(depId, id);
      }
      return requireOne(depId, id);
    };
    localRequire.resolve = function(depId) { return resolveId(depId, id); };
    localRequire.toUrl = function(depId) { return toUrl(depId, id); };
    localRequire.sync = function(depId) { return syncRequire(depId, id); };
    return localRequire;
  }

  // ===========================================================================
  // loadScript(id)
  // ===========================================================================

  function loadScript(id) {
    if (id in loading) return loading[id];

    var url = toUrl(id);
    var existingScript = document.querySelector('script[src="' + url + '"]');
    if (existingScript) {
      loading[id] = Promise.resolve();
      return loading[id];
    }

    loading[id] = new Promise(function(resolve, reject) {
      var script = document.createElement('script');
      script.src = url;
      script.setAttribute('data-amd-module-id', id);
      script.async = true;
      script.onload = function() { resolve(); };
      script.onerror = function() {
        delete loading[id];
        reject(new Error('Failed to load script: ' + url));
      };
      document.head.appendChild(script);
    });

    return loading[id];
  }

  // ===========================================================================
  // Configuration
  // ===========================================================================

  require.config = function(config) {
    if (config.baseUrl) {
      baseUrl = config.baseUrl;
    }
    if (config.paths) {
      for (var key in config.paths) {
        if (Object.prototype.hasOwnProperty.call(config.paths, key)) {
          paths[key] = config.paths[key];
        }
      }
    }
  };

  require.modules = modules;
  require.resolved = resolved;
  require.errors = errors;
  require.toUrl = toUrl;
  require.sync = syncRequire;

  // ===========================================================================
  // Export to namespace
  // ===========================================================================

  __amdEnv.define = define;
  __amdEnv.require = require;
  __amdEnv.syncRequire = syncRequire;
})();
`)(e),typeof e.require==`function`&&typeof e.require.config==`function`&&e.require.config({baseUrl:`./`,paths:{core:`useblocks-core.c589fcf1.js`}}));var s=typeof e.prefetch==`function`?e.prefetch:void 0;if(e.prefetch=function(){return i.then(function(){if(typeof s==`function`)return s.call(e)})},typeof e.define==`function`){var c=typeof WeakMap<`u`?new WeakMap:null;function t(e){if(!e||typeof e!=`object`&&typeof e!=`function`||e.__esModule)return e;if(c){var t=c.get(e);if(t)return t}var n=Object.create(null);Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});for(var r=Reflect.ownKeys(e),i=0;i<r.length;i++){var a=r[i];if(a!=="__esModule"){var o=Object.getOwnPropertyDescriptor(e,a);o&&Object.defineProperty(n,a,o)}}return Object.prototype.hasOwnProperty.call(n,`default`)||Object.defineProperty(n,"default",{enumerable:!0,value:e,writable:!1}),c&&c.set(e,n),n}e.define(`react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`useblocks/runtime/react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`useblocks/runtime/prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`useblocks/runtime/antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`useblocks/runtime/classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks/runtime/uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks-ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)}),e.define(`useblocks/ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)})}globalThis.__SHARED_RUNTIME_INIT_SENTINEL__=`@shared-runtime:init-complete`})();var s=null,c=`core`;function l(){return typeof window.__useblocks__?.require==`function`?new Promise((e,t)=>{window.__useblocks__.require([c],t=>e(t),e=>t(e instanceof Error?e:Error(`[loadEngine] Failed to require core module`)))}):Promise.reject(Error(`[loadEngine] AMD loader is unavailable`))}function u(){return s||=l(),s}var d=null,f=null;async function p(e){typeof e?.prefetch==`function`&&await e.prefetch()}function m(){return d||=u().then(()=>void 0),d}function h(e){return f||=p(e),f}function g(e){return Promise.all([m(),h(e)]).then(()=>void 0)}function _(e){let t=e?.startupPrefetchMode;return t===`eager`||t===`idle`||t===`manual`||t===`off`?t:`eager`}function v(e){Promise.resolve().then(()=>g(e)).catch(()=>{})}function y(e){Promise.resolve().then(()=>h(e)).catch(()=>{})}function b(e){let t=_(e);if(t===`eager`)v(e);else if(t===`idle`){let t=window.requestIdleCallback;typeof t==`function`?t(()=>v(e),{timeout:1500}):setTimeout(()=>v(e),0)}}var x=new WeakMap,S=`data-useblocks-config-styles`;function C(e){return typeof e==`string`?e.trim():``}function w(e,t){if(e.firstChild){e.insertBefore(t,e.firstChild);return}e.appendChild(t)}function T(e,t,n){if(!e||typeof document>`u`)return null;let r=C(t),i=x.get(e),a=n||e;if(!r)return i&&(i.remove(),x.delete(e)),null;if(i)return i.textContent!==r&&(i.textContent=r),(i.parentNode!==a||i!==a.firstChild)&&w(a,i),i;let o=document.createElement(`style`);return o.setAttribute(S,`true`),o.textContent=r,w(a,o),x.set(e,o),o}function E(e){if(!e)return;let t=x.get(e);t&&(t.remove(),x.delete(e))}function D(){return!1}var O=`
.blocks-app-initial-spinner-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blocks-app-initial-spinner {
  width: 28px;
  height: 28px;
  border: 4px solid rgb(231 212 228 / 100%);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation_loader 1s linear infinite;
  will-change: transform;
  border-bottom-color: transparent;
}

@keyframes rotation_loader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}`;function k(){return()=>{}}function A(e,t){if(!D()||!e||typeof document>`u`)return k();e.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=document.createElement(`div`);n.classList.add(`blocks-app-initial-spinner-wrapper`);let r=document.createElement(`div`);r.classList.add(`blocks-app-initial-spinner`),n.appendChild(r);let i=document.createElement(`style`);i.setAttribute(t,`true`),i.textContent=O,document.head?.appendChild(i),e.appendChild(n);let a=!1;return()=>{a||(a=!0,n.remove(),i.remove())}}function j(e){for(;e.endsWith(`/`);)e=e.slice(0,e.length-1);return/\/wp-json$/i.test(e)?e:`${e}/wp-json`}j(`https://app.useblocks.io/api`),t(),t(),t(),t();var M;(function(e){let t=`https://racs.rest/v3`;function n(e,n){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(n)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,r)}e.post=n;async function r(e,n=0){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:`{"filter":{},"limit":${n}}`};return await(await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,r)).json()}e.getAll=r})(M||={});var N=new Map,P=new WeakMap;function F(e){return j(String(e||``).trim()||`https://app.useblocks.io/api`)}async function I(e){if(!e.getAuthToken)return;let t=await e.getAuthToken(e.user,e.project,void 0);return t?`Bearer ${t}`:void 0}function L(e){return async({baseUrl:t})=>{let n=F(t);if(!n)throw Error(`[Loader] appInit warmup requires baseUrl or REACT_APP_OPENAPI_BASE_URL`);let r=new Headers({Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded;charset=UTF-8`}),i=await I(e);i&&r.set(`authorization`,i);let a=await fetch(`${n}/app/v1/app_init`,{method:`POST`,headers:r,body:new URLSearchParams,credentials:`same-origin`});if(!a.ok)throw Error(`[Loader] appInit request failed: ${a.status} ${a.statusText}`);return a.json()}}function R(e){return JSON.stringify({baseUrl:F(e.baseUrl)||``,project:e.project??``,userId:e.user?.id??``})}function z(e){return async t=>{let n=R(t),r=N.get(n);if(r)return r;let i=Promise.resolve(e(t)).catch(e=>{throw N.delete(n),e});return N.set(n,i),i}}function B(e){if(e.standaloneKey)return e;let t=e.appInit||L(e),n=P.get(t);return n||(n=z(t),P.set(t,n)),Promise.resolve(n({baseUrl:e.baseUrl,user:e.user,project:e.project,prevApp:void 0})).catch(e=>{}),{...e,appInit:n}}var V=new WeakMap;function H(e){let t=null;return async(n,r,i)=>(t||=Promise.resolve(e(n,r,i)).finally(()=>{t=null}),t)}function U(e){if(e.standaloneKey)return e;let t=e.getAuthToken;if(!t)return e;let n=V.get(t);return n||(n=H(t),V.set(t,n)),Promise.resolve(n(e.user,e.project,void 0)).catch(e=>{}),{...e,getAuthToken:n}}function W(e,t){return{...e,element:t}}function G(){return()=>{}}function K(e){let t=e.element;return!t||typeof t==`string`||typeof document>`u`?G():(T(t,e.config?.styles,t),()=>{E(t)})}function q(e){if(!D()||e.initialSpinner===!1||typeof document>`u`)return{options:e,cleanup:G()};let t=e.element;if(!t||typeof t==`string`)return{options:e,cleanup:G()};t.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=A(t,`data-useblocks`),r=e.handleChunkLoaded;return{options:{...e,handleChunkLoaded:()=>{n(),r?.()}},cleanup:n}}function J(e){return e?.length?e.some(e=>Array.isArray(e)?!1:!!(e&&typeof e==`object`&&`url`in e)):!1}var Y=`1.1.6`;async function X(e){await g(window.__useblocks__===void 0?void 0:window.__useblocks__)}async function Z(t){let n=new e,r=await a(t.element,n);n.dispose();let i=B(U(W(t,r)));if(r){let e=o.get(r);if(e)try{let t=await e;if(t.getElement()===r)return t.reset(i)}catch{o.get(r)===e&&o.delete(r)}}let s=K(i),c=q(i),l=c.options;await m();let d=window.__useblocks__===void 0?void 0:window.__useblocks__;J(l.plugins)?await h(d):y(d);let f=u().then(e=>e.init(l));r&&o.set(r,f);try{let e=await f;return r&&o.set(r,e),e}catch(e){throw s(),c.cleanup(),r&&o.get(r)===f&&o.delete(r),e}}async function Q(e){return(await u()).parseAMP(e)}typeof window<`u`&&b(window.__useblocks__===void 0?void 0:window.__useblocks__);export{n as errors,i as helpers,Z as init,Q as parseAMP,r as pluginRegistry,X as preload,Y as version};