@cogenta/cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/admin-assets/assets/index-Buwdj1V2.js +71 -0
  2. package/dist/admin-assets/assets/index-Csef0SiA.css +1 -0
  3. package/dist/admin-assets/index.html +2 -2
  4. package/dist/commands/assistant.d.ts +65 -0
  5. package/dist/commands/assistant.d.ts.map +1 -0
  6. package/dist/commands/assistant.js +207 -0
  7. package/dist/commands/assistant.js.map +1 -0
  8. package/dist/commands/content-webhooks.d.ts +41 -0
  9. package/dist/commands/content-webhooks.d.ts.map +1 -0
  10. package/dist/commands/content-webhooks.js +61 -0
  11. package/dist/commands/content-webhooks.js.map +1 -0
  12. package/dist/commands/http-security.d.ts +39 -0
  13. package/dist/commands/http-security.d.ts.map +1 -0
  14. package/dist/commands/http-security.js +153 -0
  15. package/dist/commands/http-security.js.map +1 -0
  16. package/dist/commands/links.d.ts +24 -0
  17. package/dist/commands/links.d.ts.map +1 -0
  18. package/dist/commands/links.js +109 -0
  19. package/dist/commands/links.js.map +1 -0
  20. package/dist/commands/media-images.d.ts +67 -0
  21. package/dist/commands/media-images.d.ts.map +1 -0
  22. package/dist/commands/media-images.js +107 -0
  23. package/dist/commands/media-images.js.map +1 -0
  24. package/dist/commands/search-page.d.ts +40 -0
  25. package/dist/commands/search-page.d.ts.map +1 -0
  26. package/dist/commands/search-page.js +104 -0
  27. package/dist/commands/search-page.js.map +1 -0
  28. package/dist/commands/security-alerts.d.ts +24 -0
  29. package/dist/commands/security-alerts.d.ts.map +1 -0
  30. package/dist/commands/security-alerts.js +82 -0
  31. package/dist/commands/security-alerts.js.map +1 -0
  32. package/dist/commands/seo.d.ts +88 -0
  33. package/dist/commands/seo.d.ts.map +1 -0
  34. package/dist/commands/seo.js +155 -0
  35. package/dist/commands/seo.js.map +1 -0
  36. package/dist/commands/serve.d.ts +87 -4
  37. package/dist/commands/serve.d.ts.map +1 -1
  38. package/dist/commands/serve.js +740 -40
  39. package/dist/commands/serve.js.map +1 -1
  40. package/dist/commands/site-plan.d.ts +86 -0
  41. package/dist/commands/site-plan.d.ts.map +1 -0
  42. package/dist/commands/site-plan.js +235 -0
  43. package/dist/commands/site-plan.js.map +1 -0
  44. package/dist/commands/theme-css.d.ts +54 -0
  45. package/dist/commands/theme-css.d.ts.map +1 -0
  46. package/dist/commands/theme-css.js +121 -0
  47. package/dist/commands/theme-css.js.map +1 -0
  48. package/dist/commands/theme-render.d.ts +78 -4
  49. package/dist/commands/theme-render.d.ts.map +1 -1
  50. package/dist/commands/theme-render.js +170 -16
  51. package/dist/commands/theme-render.js.map +1 -1
  52. package/dist/commands/users.d.ts +7 -1
  53. package/dist/commands/users.d.ts.map +1 -1
  54. package/dist/commands/users.js +159 -15
  55. package/dist/commands/users.js.map +1 -1
  56. package/dist/index.d.ts +2 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +31 -0
  59. package/dist/index.js.map +1 -1
  60. package/package.json +12 -10
  61. package/dist/admin-assets/assets/index-21ZcDkDC.css +0 -1
  62. package/dist/admin-assets/assets/index-CKLmd_Fi.js +0 -23
@@ -0,0 +1,71 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function oe(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function de(e,t){switch(oe(le,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(se),oe(se,e)}function fe(){I(se),I(ce),I(le)}function pe(e){e.memoizedState!==null&&oe(ue,e);var t=se.current,n=Zd(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function me(e){ce.current===e&&(I(se),I(ce)),ue.current===e&&(I(ue),J._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=F.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function ot(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[ct])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Yt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Jt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Xt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Yt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Yt(e,o,t[o])}function Zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),$t=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function en(e){return $t.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function tn(){}var nn=null;function rn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var an=null,on=null;function sn(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(an!==null||on!==null)&&(Eu(),an&&(t=an,e=on,on=an=null,sn(t),e)))for(t=0;t<e.length;t++)sn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return gn=i.slice(e,1<r?1-r:void 0)}function vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yn(){return!0}function bn(){return!1}function xn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?yn:bn,this.isPropagationStopped=bn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=h({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=h({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(h({},kn,{dataTransfer:0})),Mn=xn(h({},wn,{relatedTarget:0})),Nn=xn(h({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(h({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(h({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(h({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(h({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(h({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(h({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(h({},kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=xn(h({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function L(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function R(e,t){switch(e){case`compositionend`:return L(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function z(e,t){if(tr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){an?on?on.push(r):on=[r]:an=r,t=Pd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){Ed(e,0)}function cr(e){if(Lt(yt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(dn){var dr;if(dn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,rn(e)),ln(sr,t)}}function B(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function _r(e,t){if(e===`click`)return cr(t)}function vr(e,t){if(e===`input`||e===`change`)return cr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function V(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!br(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Er=dn&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Rt(r)||(r=Dr,`selectionStart`in r&&Tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kr&&V(kr,r)||(kr=r,r=Pd(Or,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};dn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),wt(t,[e])}var qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<_u)throw _u=0,vu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Yf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ai(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-ze(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,Mi=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:Dd(`cancel`,t),Dd(`close`,t);break;case`iframe`:case`object`:case`embed`:Dd(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)Dd(wd[n],t);break;case`source`:Dd(`error`,t);break;case`img`:case`image`:case`link`:Dd(`error`,t),Dd(`load`,t);break;case`details`:Dd(`toggle`,t);break;case`input`:Dd(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Dd(`invalid`,t);break;case`textarea`:Dd(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Bd(t.textContent,n)?(r.popover!=null&&(Dd(`beforetoggle`,t),Dd(`toggle`,t)),r.onScroll!=null&&Dd(`scroll`,t),r.onScrollEnd!=null&&Dd(`scrollend`,t),r.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:Ai=Ai.return}}function zi(e){if(e!==Ai)return!1;if(!Mi)return Ri(e),Mi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Qd(e.type,e.memoizedProps)),n=!n),n&&ji&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=yf(e)}else t===27?(t=ji,sf(e.type)?(e=vf,vf=null,ji=e):ji=t):ji=Ai?_f(e.stateNode.nextSibling):null;return!0}function Bi(){ji=Ai=null,Mi=!1}function Vi(){var e=Ni;return e!==null&&(ru===null?ru=e:ru.push.apply(ru,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ae(null),Wi=null,Gi=null;function Ki(e,t,n){oe(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,I(Ui)}function Ji(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Yi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Xi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[J]:e.push(J))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=vd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=P.S;P.S=function(e,t){ou=De(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ae(null);function _a(){var e=ga.current;return e===null?Vl.pooledCache:e}function va(e,t){t===null?oe(ga,ga.current):oe(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tn,tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(tn,tn);else{if(e=Vl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Na(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(te(t)||M(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Mi&&Ti(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Mi&&Ti(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Mi&&Ti(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Mi&&Ti(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Mi&&Ti(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Mi&&Ti(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ma(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Pa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Wa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Ul&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ra=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=ae(null),Za=ae(0);function Qa(e,t){e=Yl,oe(Za,e),oe(Xa,t),Yl=e|t.baseLanes}function $a(){oe(Za,Yl),oe(Xa,Xa.current)}function eo(){Yl=Za.current,I(Xa),I(Za)}var to=ae(null),no=null;function ro(e){var t=e.alternate;oe(co,co.current&1),oe(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){oe(co,co.current),oe(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(oe(co,co.current),oe(to,e),no===null&&(no=e)):oo(e)}function oo(){oe(co,co.current),oe(to,to.current)}function so(e){I(to),no===e&&(no=null),I(co)}var co=ae(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=0,H=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return uo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Rs:zs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){P.H=Ls;var t=fo!==null&&fo.next!==null;if(uo=0,po=fo=H=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||nc||(e=e.dependencies,e!==null&&Zi(e)&&(nc=!0))}function To(e,t,n,r){H=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Bs,o=t(n,r)}while(ho);return o}function Eo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(H.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}uo=0,po=fo=H=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?H.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?H.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?H.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ta(yo,e,t),t=H,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Rs:zs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),H.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(uo&f)===f:(Ul&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((uo&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,H.lanes|=p,Zl|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,H.lanes|=f,Zl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(nc=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);br(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=H,a=jo(),o=Mi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,nc=!0),a=a.queue,ls(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Vl===null)throw Error(i(349));o||uo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Mo(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,U(t)&&Wo(e)}function Uo(e,t,n){return n(function(){U(t)&&Wo(e)})}function U(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Wo(e){var t=ei(e,2);t!==null&&xu(t,e,2)}function Go(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function qo(e,t,n,r,a){if(Ps(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){W(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){W(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return W(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Zo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function W(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Zo(t),t=t.next;while(t!==r)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qo(e,t){return t}function $o(e,t){if(Mi){var n=Vl.formState;if(n!==null){a:{var r=H;if(Mi){if(ji){b:{for(var i=ji,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ji=_f(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:t},n.queue=r,n=js.bind(null,H,r),r.dispatch=n,r=Go(!1),a=Ns.bind(null,H,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function es(e){return ts(jo(),fo,e)}function ts(e,t,n){if(t=Ro(e,t,Qo)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ba?Sa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,is(9,{destroy:void 0},ns.bind(null,i,n),null)),[r,a,e]}function ns(e,t){e.action=t}function rs(e){var t=jo(),n=fo;if(n!==null)return ts(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=Mo(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function as(){return jo().memoizedState}function os(e,t,n,r){var i=Ao();H.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,r===void 0?null:r)}function ss(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=is(t,a,n,r):(H.flags|=e,i.memoizedState=is(1|t,a,n,r))}function cs(e,t){os(8390656,8,e,t)}function ls(e,t){ss(2048,8,e,t)}function us(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Mo(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ds(e){var t=jo().memoizedState;return us({ref:t,nextImpl:e}),function(){if(Bl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function fs(e,t){return ss(4,2,e,t)}function ps(e,t){return ss(4,4,e,t)}function ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hs(e,t,n){n=n==null?null:n.concat([e]),ss(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function ys(e,t,n){return n===void 0||uo&1073741824&&!(Ul&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),H.lanes|=e,Zl|=e,n)}function bs(e,t,n,r){return br(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(Ul&261930)?(nc=!0,e.memoizedState=n):(e=bu(),H.lanes|=e,Zl|=e,t):(e=ys(e,n,r),br(e,t)||(nc=!0),e)}function xs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ns(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,ma(c,r),yu(e)):Ms(e,t,r,yu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,ne,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},yu())}function Es(){return $i(J)}function Ds(){return jo().memoizedState}function Os(){return jo().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Va(n);var r=Ha(t,e,n);r!==null&&(xu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=$r(e,t,n,r),n!==null&&(xu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,yu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return Qr(e,t,i,0),Vl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return xu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&xu(t,e,2)}function Ps(e){var t=e.alternate;return e===H||t!==null&&t===H}function Fs(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Ls={readContext:$i,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Ls.useEffectEvent=xo;var Rs={readContext:$i,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=js.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Ao(),e,t)},useTransition:function(){var e=Go(!1);return e=xs.bind(null,H,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=Ao();if(Mi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Uo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Vl.identifierPrefix;if(Mi){var n=wi,r=Ci;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:$o,useActionState:$o,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=ks.bind(null,H)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Bl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:$i,use:Po,useCallback:_s,useContext:$i,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Lo,useRef:as,useState:function(){return Lo(Io)},useDebugValue:gs,useDeferredValue:function(e,t){return bs(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Ds,useHostTransitionStatus:Es,useFormState:es,useActionState:es,useOptimistic:function(e,t){return Ko(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:Os};zs.useEffectEvent=ds;var Bs={readContext:$i,use:Po,useCallback:_s,useContext:$i,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:zo,useRef:as,useState:function(){return zo(Io)},useDebugValue:gs,useDeferredValue:function(e,t){var n=jo();return fo===null?ys(n,e,t):bs(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Ds,useHostTransitionStatus:Es,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:Os};Bs.useEffectEvent=ds;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(xu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(xu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(xu(t,e,n),Ua(t,e,n))}};function Us(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!V(n,r)||!V(i,a):!0}function Ws(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){qr(e)}function qs(e){console.error(e)}function Js(e){qr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Va(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(lu===null?lu=new Set([this]):lu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Nu():n.alternate===null&&Xl===0&&(Xl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Qu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Qu(e,r,a)),!1}throw Error(i(435,n.tag))}return Qu(e,r,a),Nu(),!1}if(Mi)return t=to.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Zs(e.stateNode,r,a),Wa(e,a),Xl!==4&&(Xl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),nu===null?nu=[o]:nu.push(o),Xl!==4&&(Xl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Zs(n.stateNode,r,e),Wa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(lu===null||!lu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var tc=Error(i(461)),nc=!1;function rc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function ic(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Qi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!nc?(Oo(e,t,i),Oc(e,t,i)):(Mi&&s&&Di(t),t.flags|=1,rc(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?V:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(V(a,r)&&e.ref===t.ref){if(nc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(nc=!0);else return t.lanes=e.lanes,Oc(e,t,i)}}return mc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return rc(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function uc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dc(e,t,n){return Ia(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function fc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Mi){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(io(t),(e=ji)?(e=pf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),a){if(t.flags&256)t.flags&=-257,t=dc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(nc||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,nc||a){if(r=Vl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),xu(r,e,s),tc;Nu(),t=dc(e,t,n)}else e=o.treeContext,ji=_f(s.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=uc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,r,i){return Qi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!nc?(Oo(e,t,i),Oc(e,t,i)):(Mi&&r&&Di(t),t.flags|=1,rc(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!nc?(Oo(e,t,a),Oc(e,t,a)):(Mi&&r&&Di(t),t.flags|=1,rc(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Hs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=$i(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ws(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Ra||Us(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ba(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=$i(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ws(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Ra||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,pc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Oc(e,t,i),e}function _c(e,t,n,r){return Bi(),t.flags|=256,rc(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:ya()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=eu),e}function xc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(co.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Mi){if(a?ro(t):oo(t),(e=ji)?(e=pf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Ii(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(null,r)):(ro(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=cc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(nc||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=Vl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),xu(s,e,r),tc;mf(c)||Nu(),t=wc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=_f(c.nextSibling),Ai=t,Mi=!0,Ni=null,Pi=!1,e!==null&&ki(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Ia(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Ec(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,oe(co,o),rc(e,t,r,n),r=Mi?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Zi(e)))}function Ac(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(co,co.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Oc(e,t,n)}function jc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)nc=!0;else{if(!kc(e,n)&&!(t.flags&128))return nc=!1,Ac(e,t,n);nc=!!(e.flags&131072)}}else nc=!1,Mi&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Gs(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ic(null,t,e,r,n);break a}if(a===D){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Gs(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ka(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=_c(e,t,r,n);break a}if(r!==a){a=hi(Error(i(424)),t),Hi(a),t=_c(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ji=_f(e.firstChild),Ai=t,Mi=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=Oc(e,t,n);break a}rc(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:Mi||(n=t.type,e=t.pendingProps,r=Yd(le.current).createElement(n),r[ct]=t,r[lt]=e,Ud(r,n,e),xt(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&Mi&&(r=t.stateNode=xf(t.type,t.pendingProps,le.current),Ai=t,Pi=!0,a=ji,sf(t.type)?(vf=a,ji=_f(r.firstChild)):ji=a),rc(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Mi&&((a=r=ji)&&(r=df(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,Ai=t,ji=_f(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),J._currentValue=a),pc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&Mi&&((e=n=ji)&&(n=ff(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Ii(t)),null;case 13:return xc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):rc(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return rc(e,t,t.pendingProps,n),t.child;case 8:return rc(e,t,t.pendingProps.children,n),t.child;case 12:return rc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,rc(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return fc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Vl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),rc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Au())e.flags|=8192;else throw Da=Ca,xa}}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xf(t)){if(Au())e.flags|=8192;else throw Da=Ca,xa}}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,tu|=t)}function Ic(e,t){if(!Mi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Lc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lc(t),null;case 1:return Lc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Lc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(Lc(t),Nc(t,a,null,r,n)):(Lc(t),Pc(t,o))):o?o===e.memoizedState?(Lc(t),t.flags&=-16777217):(Mc(t),Lc(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),Lc(t),Nc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}e=se.current,zi(t)?Li(t,e):(e=xf(a,r,n),t.stateNode=e,Mc(t))}return Lc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}if(o=se.current,zi(t))Li(t,o);else{var s=Yd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ii(t,!0)}else e=Yd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return fe(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return qi(t.type),Lc(t),null;case 19:if(I(co),r=t.memoizedState,r===null)return Lc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return oe(co,co.current&1|2),Mi&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}}else{if(!a){if(e=lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Mi)return Lc(t),null}else 2*De()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=co.current,oe(co,a?n&1|2:n&1),Mi&&Ti(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(co),null;case 4:return fe(),null;case 10:return qi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&I(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Bc(e,t){switch(Oi(t),t.tag){case 3:qi(aa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:I(co);break;case 10:qi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&I(ga);break;case 24:qi(aa)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[lt]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[ct]=e,t[lt]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=fp,e=wr(e),Tr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},fp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Zu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Vc(5,n);break;case 1:if(xl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Zu(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Zu(n,n.return,e)}}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ya(e,t)}catch(e){Zu(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:xl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=td.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Cl(e,n,!!(n.subtreeFlags&8772)):xl(e,n),el=i,tl=a}break;case 30:break;default:xl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var cl=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=cl,i=ll;sf(n.type)&&(cl=n.stateNode,ll=!1),ul(e,t,n),Sf(n.stateNode),cl=r,ll=i;break;case 5:tl||Kc(n,t);case 6:if(r=cl,i=ll,cl=null,ul(e,t,n),cl=r,ll=i,cl!==null){if(ll)try{(cl.nodeType===9?cl.body:cl.nodeName===`HTML`?cl.ownerDocument.body:cl).removeChild(n.stateNode)}catch(e){Zu(n,t,e)}else try{cl.removeChild(n.stateNode)}catch(e){Zu(n,t,e)}}break;case 18:cl!==null&&(ll?(e=cl,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):cf(cl,n.stateNode));break;case 4:r=cl,i=ll,cl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),cl=r,ll=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ul(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ul(e,t,n),tl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Zu(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Zu(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=nd.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){cl=c.stateNode,ll=!1;break a}break;case 5:cl=c.stateNode,ll=!1;break a;case 3:case 4:cl=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(cl===null)throw Error(i(160));dl(o,s,a),cl=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ud(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Jf(a,e.type,e.stateNode)}else e.stateNode=Hf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Jf(a,e.type,e.stateNode):Hf(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{qt(a,``)}catch(t){Zu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Zu(e,e.return,t)}}break;case 3:if(Kf=null,a=_l,_l=Tf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Zu(e,e.return,t)}nl&&(nl=!1,bl(e));break;case 4:r=_l,_l=Tf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(au=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,gl(t,e),tl=d,el=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Zu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Zu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){Zu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(qt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Zu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),Sl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),Sl(t);break;case 27:Sf(t.stateNode);case 26:case 5:Kc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Vc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Zu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ja(c[i],s)}catch(e){Zu(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Gc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&sa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Vc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Zu(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Zf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=Tf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Rl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,Bl=0,Vl=null,Hl=null,Ul=0,Wl=0,Gl=null,Kl=!1,ql=!1,Jl=!1,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=null,ru=null,iu=!1,au=0,ou=0,su=1/0,cu=null,lu=null,uu=0,du=null,fu=null,pu=0,mu=0,hu=null,gu=null,_u=0,vu=null;function yu(){return Bl&2&&Ul!==0?Ul&-Ul:P.T===null?at():vd()}function bu(){if(eu===0){if(!(Ul&536870912)||Mi){var e=We;We<<=1,!(We&3932160)&&(We=262144),eu=e}else eu=536870912}return e=to.current,e!==null&&(e.flags|=32),eu}function xu(e,t,n){(e===Vl&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Ul,eu,!1)),Qe(e,n),(!(Bl&2)||e!==Vl)&&(e===Vl&&(!(Bl&2)&&(Ql|=n),Xl===4&&Tu(e,Ul,eu,!1)),ud(e))}function Su(e,t,n){if(Bl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Je(e,t),a=r?Iu(e,t):Pu(e,t,!0),o=r;do{if(a===0){ql&&!r&&Tu(e,t,0,!1);break}if(n=e.current.alternate,o&&!wu(n)){a=Pu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=nu;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Jl&&!l){c.errorRecoveryDisabledLanes|=o,Ql|=o,a=4;break a}o=ru,ru=a,o!==null&&(ru===null?ru=o:ru.push.apply(ru,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ou(e,0),Tu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Tu(r,t,eu,!Kl);break a;case 2:ru=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=au+300-De(),10<a)){if(Tu(r,t,eu,!Kl),qe(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=tf(Cu.bind(null,r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,`Throttled`,-0,0),a);break a}Cu(r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,null,-0,0)}break}while(1);ud(e)}function Cu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Ml(t,a,d);var m=(a&62914560)===a?au-De():(a&4194048)===a?ou-De():0;if(m=$f(d,m),m!==null){pu=a,e.cancelPendingCommit=m(Uu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Tu(e,a,o,!l);return}}Uu(e,t,a,n,r,i,o,s,c)}function wu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tu(e,t,n,r){t&=~$l,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function Eu(){return Bl&6?!0:(dd(0,!1),!1)}function Du(){if(Hl!==null){if(Wl===0)var e=Hl.return;else e=Hl,Gi=Wi=null,ko(e),Aa=null,ja=0,e=Hl;for(;e!==null;)Bc(e.alternate,e),e=e.return;Hl=null}}function Ou(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),pu=0,Du(),Vl=e,Hl=n=si(e.current,null),Ul=t,Wl=0,Gl=null,Kl=!1,ql=Je(e,t),Jl=!1,tu=eu=$l=Ql=Zl=Xl=0,ru=nu=null,iu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Yl=t,Zr(),n}function ku(e,t){H=null,P.H=Ls,t===ba||t===Sa?(t=Oa(),Wl=3):t===xa?(t=Oa(),Wl=4):Wl=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Gl=t,Hl===null&&(Xl=1,Ys(e,hi(t,e.current)))}function Au(){var e=to.current;return e===null?!0:(Ul&4194048)===Ul?no===null:(Ul&62914560)===Ul||Ul&536870912?e===no:!1}function ju(){var e=P.H;return P.H=Ls,e===null?Ls:e}function Mu(){var e=P.A;return P.A=Rl,e}function Nu(){Xl=4,Kl||(Ul&4194048)!==Ul&&to.current!==null||(ql=!0),!(Zl&134217727)&&!(Ql&134217727)||Vl===null||Tu(Vl,Ul,eu,!1)}function Pu(e,t,n){var r=Bl;Bl|=2;var i=ju(),a=Mu();(Vl!==e||Ul!==t)&&(cu=null,Ou(e,t)),t=!1;var o=Xl;a:do try{if(Wl!==0&&Hl!==null){var s=Hl,c=Gl;switch(Wl){case 8:Du(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=Wl;if(Wl=0,Gl=null,Bu(e,s,c,l),n&&ql){o=0;break a}break;default:l=Wl,Wl=0,Gl=null,Bu(e,s,c,l)}}Fu(),o=Xl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Bl=r,P.H=i,P.A=a,Hl===null&&(Vl=null,Ul=0,Zr()),o}function Fu(){for(;Hl!==null;)Ru(Hl)}function Iu(e,t){var n=Bl;Bl|=2;var r=ju(),a=Mu();Vl!==e||Ul!==t?(cu=null,su=De()+500,Ou(e,t)):ql=Je(e,t);a:do try{if(Wl!==0&&Hl!==null){t=Hl;var o=Gl;b:switch(Wl){case 1:Wl=0,Gl=null,Bu(e,t,o,1);break;case 2:case 9:if(wa(o)){Wl=0,Gl=null,zu(t);break}t=function(){Wl!==2&&Wl!==9||Vl!==e||(Wl=7),ud(e)},o.then(t,t);break a;case 3:Wl=7;break a;case 4:Wl=5;break a;case 7:wa(o)?(Wl=0,Gl=null,zu(t)):(Wl=0,Gl=null,Bu(e,t,o,7));break;case 5:var s=null;switch(Hl.tag){case 26:s=Hl.memoizedState;case 5:case 27:var c=Hl;if(s?Xf(s):c.stateNode.complete){Wl=0,Gl=null;var l=c.sibling;if(l!==null)Hl=l;else{var u=c.return;u===null?Hl=null:(Hl=u,Vu(u))}break b}}Wl=0,Gl=null,Bu(e,t,o,5);break;case 6:Wl=0,Gl=null,Bu(e,t,o,6);break;case 8:Du(),Xl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return Gi=Wi=null,P.H=r,P.A=a,Bl=n,Hl===null?(Vl=null,Ul=0,Zr(),Xl):0}function Lu(){for(;Hl!==null&&!Te();)Ru(Hl)}function Ru(e){var t=jc(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function zu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Ul);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Ul);break;case 5:ko(t);default:Bc(n,t),t=Hl=ci(t,Yl),t=jc(n,t,Yl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function Bu(e,t,n,r){Gi=Wi=null,ko(t),Aa=null,ja=0;var i=t.return;try{if(ec(e,i,t,n,Ul)){Xl=1,Ys(e,hi(n,e.current)),Hl=null;return}}catch(t){if(i!==null)throw Hl=i,t;Xl=1,Ys(e,hi(n,e.current)),Hl=null;return}t.flags&32768?(Mi||r===1?e=!0:ql||Ul&536870912?e=!1:(Kl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hu(t,e)):Vu(t)}function Vu(e){var t=e;do{if(t.flags&32768){Hu(t,Kl);return}e=t.return;var n=Rc(t.alternate,t,Yl);if(n!==null){Hl=n;return}if(t=t.sibling,t!==null){Hl=t;return}Hl=t=e}while(t!==null);Xl===0&&(Xl=5)}function Hu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,Hl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Hl=e;return}Hl=e=n}while(e!==null);Xl=6,Hl=null}function Uu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ju();while(uu!==0);if(Bl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,$e(e,n,o,s,c,l),e===Vl&&(Hl=Vl=null,Ul=0),fu=t,du=e,pu=n,mu=o,hu=a,gu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rd(je,function(){return Yu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Bl,Bl|=4;try{al(e,t,n)}finally{Bl=s,F.p=a,P.T=r}}uu=1,Wu(),Gu(),Ku()}}function Wu(){if(uu===1){uu=0;var e=du,t=fu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Bl;Bl|=4;try{vl(t,e);var a=Jd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Sr(s,h),v=Sr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fp=!!qd,Jd=qd=null}finally{Bl=i,F.p=r,P.T=n}}e.current=t,uu=2}}function Gu(){if(uu===2){uu=0;var e=du,t=fu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Bl;Bl|=4;try{ol(e,t.alternate,t)}finally{Bl=i,F.p=r,P.T=n}}uu=3}}function Ku(){if(uu===4||uu===3){uu=0,Ee();var e=du,t=fu,n=pu,r=gu;t.subtreeFlags&10256||t.flags&10256?uu=5:(uu=0,fu=du=null,qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(lu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}pu&3&&Ju(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===vu?_u++:(_u=0,vu=e):_u=0,dd(0,!1)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Ju(){return Wu(),Gu(),Ku(),Yu()}function Yu(){if(uu!==5)return!1;var e=du,t=mu;mu=0;var n=it(pu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{F.p=a,P.T=r,qu(e,t)}}function Xu(e,t,n){t=hi(n,t),t=Zs(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Qe(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=hi(n,e),n=Qs(2),r=Ha(t,n,2),r!==null&&($s(n,r,t,e),Qe(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>De()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=Xe()),e=ei(e,t),e!==null&&(Qe(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return Ce(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=qe(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,gd(r,a))}r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=De(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Vl,n=Ul,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=hd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(uu!==0&&uu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ju()&&e.callbackNode!==n)return null;var r=Ul;return r=qe(e,e===Vl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Su(e,r,t),md(e,De()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Ju())return null;Su(e,t,!0)}function _d(){af(function(){Bl&6?Ce(ke,fd):pd()})}function vd(){if(ld===0){var e=ua;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:en(``+e)}function bd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ld!==0){var e=o?bd(i,o):new FormData(i);Cs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),Cs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<Gr.length;Sd++){var Cd=Gr[Sd];Kr(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,St.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Md(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}ln(function(){var r=a,i=rn(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Lr:case Rr:case zr:l=Nn;break;case Ur:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=un(m,p),g!=null&&d.push(Nd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==nn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Fd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c)){if(ur)v=vr;else{v=gr;var y=B}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Zt(r.elementType)&&(v=lr):v=_r;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,tr=!0)),y=Pd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=L(n),b!==null&&(x.data=b)))),(b=Xn?R(e,n):z(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=un(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=un(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=un(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=un(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
9
+ `).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&qt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Xt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=en(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Qt.get(n)||n,At(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Xt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&qt(e,``+r);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Ud(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Dd(`error`,e),Dd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:Dd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Vd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Dd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in Dd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Vd(e,t,s,c,n,null)}Kt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Vd(e,t,l,r,n,null)}return;case`dialog`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Dd(`cancel`,e),Dd(`close`,e);break;case`iframe`:case`object`:Dd(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)Dd(wd[r],e);break;case`image`:Dd(`error`,e),Dd(`load`,e);break;case`details`:Dd(`toggle`,e);break;case`embed`:case`source`:case`link`:Dd(`error`,e),Dd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,u,r,n,null)}return;default:if(Zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Wd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Vd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Vd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Vd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Vd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Vd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Vd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Vd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Vd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Vd(e,t,u,p,r,m)}return;default:if(Zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Vd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Gd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Zd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e!==$d&&($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function lf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function uf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:uf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function _f(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function xf(e,t,n){switch(t=Yd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var G=F.d;F.d={f:Ef,r:Df,D:Af,C:jf,L:Mf,m:Nf,X:K,S:Pf,M:Ff};function Ef(){var e=G.f(),t=Eu();return e||t}function Df(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):G.r(e)}var Of=typeof document>`u`?null:document;function kf(e,t,n){var r=Of;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Af(e){G.D(e),kf(`dns-prefetch`,e,null)}function jf(e,t){G.C(e,t),kf(`preconnect`,e,t)}function Mf(e,t,n){G.L(e,t,n);var r=Of;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=q(e)}Cf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Nf(e,t){G.m(e,t);var n=Of;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=q(e)}if(!Cf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Pf(e,t,n){G.S(e,t,n);var r=Of;if(r&&e){var i=bt(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);xt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function K(e,t){G.X(e,t);var n=Of;if(n&&e){var r=bt(n).hoistableScripts,i=q(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=h({src:e,async:!0},t),(t=Cf.get(i))&&Gf(e,t),a=n.createElement(`script`),xt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){G.M(e,t);var n=Of;if(n&&e){var r=bt(n).hoistableScripts,i=q(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Gf(e,t),a=n.createElement(`script`),xt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=le.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Lf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Bf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=q(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lf(e){return`href="`+Bt(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Bf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),xt(t),e.head.appendChild(t))}function q(e){return`[src="`+Bt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Ud(r,`style`,a),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=zf(n),(a=Cf.get(a))&&Wf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=q(n.src),(a=e.querySelector(Vf(o)))?(t.instance=a,xt(a),a):(r=n,(a=Cf.get(o))&&(r=h({},n),Gf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Kf=null;function qf(e,t,n){if(Kf===null){var r=new Map,i=Kf=new Map;i.set(n,r)}else i=Kf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=zf(r),(i=Cf.get(i))&&Wf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&np(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Qf===0&&(Qf=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&np(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ep.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var J={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ip(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function op(e){return e?(e=ri,e):ri}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(xu(n,e,t),Ua(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&xu(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=yu();t=rt(t);var n=ei(e,t);n!==null&&xu(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function mp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)Md(e,t,r,_p,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<X.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Bl&6)&&(su=De()+500,dd(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&xu(s,a,2),Eu(),lp(a,2)}if(a=gp(r),a===null&&Md(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function gp(e){return e=rn(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _p=e,null}function yp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Y=[],X=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return xp=Dp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=Dp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=Dp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,Dp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,Dp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){dp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nn=r,n.target.dispatchEvent(r),nn=null}else return t=vt(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){bp=!1,xp!==null&&Ap(xp)&&(xp=null),Sp!==null&&Ap(Sp)&&(Sp=null),Cp!==null&&Ap(Cp)&&(Cp=null),wp.forEach(jp),Tp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(vp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}xp!==null&&Np(xp,e),Sp!==null&&Np(Sp,e),Cp!==null&&Np(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Y.length;n++){var r=Y[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Y.length&&(n=Y[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&Y.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;sp(n,yu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),Eu(),t[ut]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Y.length&&t!==0&&t<Y[n].priority;n++);Y.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ie=Hp.inject(Vp),Le=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[ut]=t.current,Ad(e),new Rp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,v=/^[\\/]{2}/;function y(e,t){return t+e.replace(/\\/g,`/`)}var b=`popstate`;function x(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function S(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return D(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:O(t)}return A(t,n,null,e)}function C(e,t){if(e===!1||e==null)throw Error(t)}function w(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function T(){return Math.random().toString(36).substring(2,10)}function E(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function D(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?k(t):t,state:n,key:t&&t.key||r||T(),mask:i}}function O({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function k(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function A(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=x(e)?e:D(h.location,e,t);n&&n(r,e),l=u()+1;let d=E(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=x(e)?e:D(h.location,e,t);n&&n(r,e),l=u();let i=E(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return j(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(b,d),c=e,()=>{i.removeEventListener(b,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function j(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),C(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:O(t);return i=i.replace(/ $/,`%20`),!n&&v.test(i)&&(i=r+i),new URL(i,r)}var M=c(u(),1);function N(e,t,n=`/`){return ee(e,t,n,!1)}function ee(e,t,n,r,i){let a=ve((typeof t==`string`?k(t):t).pathname||`/`,n);if(a==null)return null;let o=i??te(e),s=null,c=_e(a);for(let e=0;s==null&&e<o.length;++e)s=pe(o[e],c,r);return s}function te(e){let t=P(e);return ne(t),t}function P(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;C(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ee([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(C(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),P(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:de(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ge(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of F(e.path))a(e,t,!0,n)}),t}function F(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=F(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ne(e){e.sort((e,t)=>e.score===t.score?fe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,ie=/^:[\w-]+/,ae=3.5,I=3,oe=2,se=1,ce=10,le=-2,ue=e=>e===`*`;function de(e,t){let n=e.split(`/`),r=n.length;return n.some(ue)&&(r+=le),t&&(r+=oe),n.filter(e=>!ue(e)).reduce((e,t)=>e+(re.test(t)?I:ie.test(t)?ae:t===``?se:ce),r)}function fe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function pe(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?he(u,l,s.matcher,s.compiledParams):me(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=me({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Ee([a,d.pathname]),pathnameBase:Oe(Ee([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Ee([a,d.pathnameBase]))}return o}function me(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ge(e.path,e.caseSensitive,e.end);return he(e,t,n,r)}function he(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ge(e,t=!1,n=!0){w(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function _e(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return w(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ve(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ye(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?k(e):e,a;return n?(n=Te(n),a=n.startsWith(`/`)?be(n.substring(1),`/`):be(n,t)):a=t,{pathname:a,search:ke(r),hash:Ae(i)}}function be(e,t){let n=De(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function xe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Se(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ce(e){let t=Se(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function we(e,t,n,r=!1){let i;typeof e==`string`?i=k(e):(i={...e},C(!i.pathname||!i.pathname.includes(`?`),xe(`?`,`pathname`,`search`,i)),C(!i.pathname||!i.pathname.includes(`#`),xe(`#`,`pathname`,`hash`,i)),C(!i.search||!i.search.includes(`#`),xe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ye(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Te=e=>e.replace(/[\\/]{2,}/g,`/`),Ee=e=>Te(e.join(`/`)),De=e=>e.replace(/\/+$/,``),Oe=e=>De(e).replace(/^\/*/,`/`),ke=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ae=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,je=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return Ee(e.map(e=>e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Fe(e,t){let n=e;if(typeof n!=`string`||!_.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=v.test(n)?new URL(y(n,e.protocol)):new URL(n),a=ve(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{w(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ie=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ie);var Le=[`GET`,...Ie];new Set(Le);var Re=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ze(e){try{return Re.includes(new URL(e).protocol)}catch{return!1}}var Be=M.createContext(null);Be.displayName=`DataRouter`;var Ve=M.createContext(null);Ve.displayName=`DataRouterState`;var He=M.createContext(!1);function Ue(){return M.useContext(He)}var We=M.createContext({isTransitioning:!1});We.displayName=`ViewTransition`;var Ge=M.createContext(new Map);Ge.displayName=`Fetchers`;var Ke=M.createContext(null);Ke.displayName=`Await`;var qe=M.createContext(null);qe.displayName=`Navigation`;var Je=M.createContext(null);Je.displayName=`Location`;var Ye=M.createContext({outlet:null,matches:[],isDataRoute:!1});Ye.displayName=`Route`;var Xe=M.createContext(null);Xe.displayName=`RouteError`;var Ze=`REACT_ROUTER_ERROR`,Qe=`REDIRECT`,$e=`ROUTE_ERROR_RESPONSE`;function et(e){if(e.startsWith(`${Ze}:${Qe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function tt(e){if(e.startsWith(`${Ze}:${$e}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function nt(e,{relative:t}={}){C(rt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=M.useContext(qe),{hash:i,pathname:a,search:o}=dt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ee([n,a])),r.createHref({pathname:s,search:o,hash:i})}function rt(){return M.useContext(Je)!=null}function it(){return C(rt(),`useLocation() may be used only in the context of a <Router> component.`),M.useContext(Je).location}var at=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ot(){let{isDataRoute:e}=M.useContext(Ye);return e?Ot():st()}function st(){C(rt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=M.useContext(Be),{basename:t,navigator:n}=M.useContext(qe),{matches:r}=M.useContext(Ye),{pathname:i}=it(),a=JSON.stringify(Ce(r)),o=M.useRef(!1);return M.useLayoutEffect(()=>{o.current=!0}),M.useCallback((r,s={})=>{if(w(o.current,at),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=we(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ee([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var ct=M.createContext(null);function lt(e){let t=M.useContext(Ye).outlet;return M.useMemo(()=>t&&M.createElement(ct.Provider,{value:e},t),[t,e])}function ut(){let{matches:e}=M.useContext(Ye);return e[e.length-1]?.params??{}}function dt(e,{relative:t}={}){let{matches:n}=M.useContext(Ye),{pathname:r}=it(),i=JSON.stringify(Ce(n));return M.useMemo(()=>we(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ft(e,t){return pt(e,t)}function pt(e,t,n){C(rt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=M.useContext(qe),{matches:i}=M.useContext(Ye),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=it(),l;if(t){let e=typeof t==`string`?k(t):t;C(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):N(e,{pathname:d}),p=bt(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ee([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Ee([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?M.createElement(Je.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function mt(){let e=Dt(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return M.createElement(M.Fragment,null,M.createElement(`h2`,null,`Unexpected Application Error!`),M.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?M.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var ht=M.createElement(mt,null),gt=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=He;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=tt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:M.createElement(Ye.Provider,{value:this.props.routeContext},M.createElement(Xe.Provider,{value:e,children:this.props.component}));return this.context?M.createElement(vt,{error:e},t):t}},_t=new WeakMap;function vt({children:e,error:t}){let{basename:n}=M.useContext(qe);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=et(t.digest);if(e){let r=_t.get(t);if(r)throw r;let i=Fe(e.location,n),a=i.absoluteURL||i.to;if(ze(a))throw Error(`Invalid redirect location`);if(Pe&&!_t.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw _t.set(t,n),n}}return M.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function yt({routeContext:e,match:t,children:n}){let r=M.useContext(Be);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Ye.Provider,{value:e},n)}function bt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);C(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ht,o&&(s<0&&c===0?(At(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?M.createElement(n.route.Component,null):n.route.element?n.route.element:e,M.createElement(yt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?M.createElement(gt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function xt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function St(e){let t=M.useContext(Be);return C(t,xt(e)),t}function Ct(e){let t=M.useContext(Ve);return C(t,xt(e)),t}function wt(e){let t=M.useContext(Ye);return C(t,xt(e)),t}function Tt(e){let t=wt(e),n=t.matches[t.matches.length-1];return C(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Et(){return Tt(`useRouteId`)}function Dt(){let e=M.useContext(Xe),t=Ct(`useRouteError`),n=Tt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ot(){let{router:e}=St(`useNavigate`),t=Tt(`useNavigate`),n=M.useRef(!1);return M.useLayoutEffect(()=>{n.current=!0}),M.useCallback(async(r,i={})=>{w(n.current,at),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var kt={};function At(e,t,n){!t&&!kt[e]&&(kt[e]=!0,w(!1,n))}M.memo(jt);function jt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return pt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Mt({to:e,replace:t,state:n,relative:r}){C(rt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=M.useContext(qe);w(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=M.useContext(Ye),{pathname:o}=it(),s=ot(),c=we(e,Ce(a),o,r===`path`),l=JSON.stringify(c);return M.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Nt(e){return lt(e.context)}function Pt(e){C(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Ft({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){C(!rt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=M.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=k(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=M.useMemo(()=>{let e=ve(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return w(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:M.createElement(qe.Provider,{value:c},M.createElement(Je.Provider,{children:t,value:h}))}function It({children:e,location:t}){return ft(Lt(e),t)}M.Component;function Lt(e,t=[]){let n=[];return M.Children.forEach(e,(e,r)=>{if(!M.isValidElement(e))return;let i=[...t,r];if(e.type===M.Fragment){n.push.apply(n,Lt(e.props.children,i));return}C(e.type===Pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;C(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=Lt(a.children,i)),n.push(o)}),n}var Rt=`application/x-www-form-urlencoded`;function zt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Bt(e){return zt(e)&&e.tagName.toLowerCase()===`button`}function Vt(e){return zt(e)&&e.tagName.toLowerCase()===`form`}function Ht(e){return zt(e)&&e.tagName.toLowerCase()===`input`}function Ut(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ut(e)}var Gt=null;function Kt(){if(Gt===null)try{new FormData(document.createElement(`form`),0),Gt=!1}catch{Gt=!0}return Gt}var qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Jt(e){return e!=null&&!qt.has(e)?(w(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rt}"`),null):e}function Yt(e,t){let n,r,i,a,o;if(Vt(e)){let o=e.getAttribute(`action`);r=o?ve(o,t):null,n=e.getAttribute(`method`)||`get`,i=Jt(e.getAttribute(`enctype`))||Rt,a=new FormData(e)}else if(Bt(e)||Ht(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ve(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Jt(e.getAttribute(`formenctype`))||Jt(o.getAttribute(`enctype`))||Rt,a=new FormData(o,e),!Kt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(zt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Rt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Xt(e,t){if(e===!1||e==null)throw Error(t)}function Zt(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var Qt=`modulepreload`,$t=function(e){return`/admin/`+e},en={},tn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=$t(t,n),t=s(t),t in en)return;en[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Qt,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function nn(e,t){if(e.id in t)return t[e.id];try{let n=await tn(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rn(e){return e!=null&&typeof e.page==`string`}function an(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function on(e,t,n){return dn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await nn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(an).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function sn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function cn(e,t,{includeHydrateFallback:n}={}){return ln(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ln(e){return[...new Set(e)]}function un(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function dn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!rn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(un(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function fn(){let e=M.useContext(Be);return Xt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function pn(){let e=M.useContext(Ve);return Xt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var mn=M.createContext(void 0);mn.displayName=`FrameworkContext`;function hn(){let e=M.useContext(mn);return Xt(e,`You must render this element inside a <HydratedRouter> element`),e}function gn(e,t){let n=M.useContext(mn),[r,i]=M.useState(!1),[a,o]=M.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=M.useRef(null);M.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),M.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:_n(s,p),onBlur:_n(c,m),onMouseEnter:_n(l,p),onMouseLeave:_n(u,m),onTouchStart:_n(d,p)}]:[a,f,{}]:[!1,f,{}]}function _n(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function vn({page:e,...t}){let n=Ue(),{nonce:r}=hn(),{router:i}=fn(),a=M.useMemo(()=>N(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?M.createElement(bn,{page:e,matches:a,...t}):M.createElement(xn,{page:e,matches:a,...t})):null}function yn(e){let{manifest:t,routeModules:n}=hn(),[r,i]=M.useState([]);return M.useEffect(()=>{let r=!1;return on(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function bn({page:e,matches:t,...n}){let r=it(),i=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Zt(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return M.createElement(M.Fragment,null,i.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function xn({page:e,matches:t,...n}){let r=it(),{manifest:i,routeModules:a}=hn(),{loaderData:o,matches:s}=pn(),c=M.useMemo(()=>sn(e,t,s,i,r,`data`),[e,t,s,i,r]),l=M.useMemo(()=>sn(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=Zt(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=M.useMemo(()=>cn(l,i),[l,i]),f=yn(l);return M.createElement(M.Fragment,null,u.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>M.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>M.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Sn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Cn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Cn&&(window.__reactRouterVersion=`8.3.0`)}catch{}function wn({basename:e,children:t,useTransitions:n,window:r}){let i=M.useRef(null);i.current??=S({window:r,v5Compat:!0});let a=i.current,[o,s]=M.useState({action:a.action,location:a.location}),c=M.useCallback(e=>{n===!1?s(e):M.startTransition(()=>s(e))},[n]);return M.useLayoutEffect(()=>a.listen(c),[a,c]),M.createElement(Ft,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Tn=M.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=M.useContext(qe),y=typeof l==`string`&&_.test(l),b=Fe(l,h);l=b.to;let x=nt(l,{relative:r}),S=it(),C=null;if(o){let e=we(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ee([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=gn(n,p),D=An(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=M.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Sn(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?M.createElement(M.Fragment,null,A,M.createElement(vn,{page:x})):A});Tn.displayName=`Link`;var En=M.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=dt(a,{relative:c.relative}),d=it(),f=M.useContext(Ve),{navigator:p,basename:m}=M.useContext(qe),h=f!=null&&Fn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ve(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return M.createElement(Tn,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});En.displayName=`NavLink`;var Dn=M.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=M.useContext(qe),g=Nn(),v=Pn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&_.test(s);return M.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?M.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Dn.displayName=`Form`;function On(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kn(e){let t=M.useContext(Be);return C(t,On(e)),t}function An(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ot(),d=it(),f=dt(e,{relative:o});return M.useCallback(p=>{if(Wt(p,t)){p.preventDefault();let t=n===void 0?O(d)===O(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?M.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var jn=0,Mn=()=>`__${String(++jn)}__`;function Nn(){let{router:e}=kn(`useSubmit`),{basename:t}=M.useContext(qe),n=Et(),r=e.fetch,i=e.navigate;return M.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Yt(e,t);a.navigate===!1?await r(a.fetcherKey||Mn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Pn(e,{relative:t}={}){let{basename:n}=M.useContext(qe),r=M.useContext(Ye);C(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...dt(e||`.`,{relative:t})},o=it();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ee([n,a.pathname])),O(a)}function Fn(e,{relative:t}={}){let n=M.useContext(We);C(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=kn(`useViewTransitionState`),i=dt(e,{relative:t});if(!n.isTransitioning)return!1;let a=ve(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ve(n.nextLocation.pathname,r)||n.nextLocation.pathname;return me(i.pathname,o)!=null||me(i.pathname,a)!=null}var In=g();function Ln(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Rn(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function zn(){return Bn.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var Bn={stubThis:e=>e};function Vn(e){let{id:t}=e;return{...e,id:Rn(t),transports:e.transports}}function Hn(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var Un=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function Wn({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Un({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Un({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Un({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Un({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Un({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Un({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Un({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Un({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Hn(t))return new Un({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Un({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Un({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Un({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var Gn=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Kn=[`cross-platform`,`platform`];function qn(e){if(e&&!(Kn.indexOf(e)<0))return e}async function Jn(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!zn())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Rn(t.challenge),user:{...t.user,id:Rn(t.user.id)},excludeCredentials:t.excludeCredentials?.map(Vn)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Gn.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Wn({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){Yn(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Ln(e))}catch(e){Yn(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Ln(c.getAuthenticatorData())}catch(e){Yn(`getAuthenticatorData()`,e)}return{id:o,rawId:Ln(s),response:{attestationObject:Ln(c.attestationObject),clientDataJSON:Ln(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:qn(a.authenticatorAttachment)}}function Yn(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function Xn(){if(!zn())return Zn.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Zn.stubThis(new Promise(e=>e(!1))):Zn.stubThis(e.isConditionalMediationAvailable())}var Zn={stubThis:e=>e};function Qn({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Un({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Un({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Hn(t))return new Un({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Un({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Un({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function $n(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!zn())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(Vn));let a={...t,challenge:Rn(t.challenge),allowCredentials:i},o={};if(n){if(!await Xn())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=Gn.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Qn({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=Ln(u.userHandle)),{id:c,rawId:Ln(l),response:{authenticatorData:Ln(u.authenticatorData),clientDataJSON:Ln(u.clientDataJSON),signature:Ln(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:qn(s.authenticatorAttachment)}}var er={BASE_URL:`/admin/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_API_BASE_URL??``,L=class extends Error{code;hint;constructor(e,t,n){super(t),this.name=`ApiError`,this.code=e,this.hint=n}};async function tr(e,t={}){let n=await fetch(`${er}${e}`,{...t,headers:{"content-type":`application/json`,...t.headers}}),r=await n.json().catch(()=>null);if(!n.ok){let e=r?.error;throw new L(e?.code??`INTERNAL`,e?.message??`The request could not be completed.`,e?.hint)}return r}async function R(e,t={}){return(await tr(e,t))?.data??null}function z(e){return{authorization:`Bearer ${e}`}}function nr(e,t){return R(`/api/auth/login`,{method:`POST`,body:JSON.stringify({email:e,password:t})})}function rr(e,t){return R(`/api/auth/totp`,{method:`POST`,body:JSON.stringify({ticket:e,token:t})})}function ir(e){return R(`/api/auth/totp/enrol`,{method:`POST`,headers:z(e)})}function ar(e,t){return R(`/api/auth/totp/enrol/confirm`,{method:`POST`,headers:z(e),body:JSON.stringify({token:t})})}function or(e){return R(`/api/auth/totp`,{method:`DELETE`,headers:z(e)})}function sr(e){return R(`/api/auth/session`,{headers:z(e)})}function cr(){return R(`/api/auth/webauthn/login/begin`,{method:`POST`})}function lr(e,t){return R(`/api/auth/webauthn/login/complete`,{method:`POST`,body:JSON.stringify({ticket:e,response:t})})}async function ur(){let e=await cr(),t=await $n({optionsJSON:e.options});return lr(e.ticket,t)}async function dr(e){await fetch(`${er}/api/auth/session`,{method:`DELETE`,headers:z(e)})}function fr(e){return R(`/api/auth/webauthn/register/begin`,{method:`POST`,headers:z(e)})}function pr(e,t,n,r){return R(`/api/auth/webauthn/register/complete`,{method:`POST`,headers:z(e),body:JSON.stringify({ticket:t,response:n,...r===void 0?{}:{label:r}})})}async function mr(e,t){let n=await fr(e),r=await Jn({optionsJSON:n.options});await pr(e,n.ticket,r,t)}var hr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),B=o(((e,t)=>{t.exports=hr()}))(),gr=`cogenta.session.token`,_r=(0,M.createContext)({state:{status:`loading`},login:()=>Promise.reject(Error(`AuthProvider is not mounted`)),completeTotp:()=>Promise.reject(Error(`AuthProvider is not mounted`)),loginWithPasskey:()=>Promise.reject(Error(`AuthProvider is not mounted`)),logout:()=>Promise.reject(Error(`AuthProvider is not mounted`))});function vr(){return(0,M.useContext)(_r)}function yr({children:e}){let[t,n]=(0,M.useState)({status:`loading`});(0,M.useEffect)(()=>{let e=localStorage.getItem(gr);if(e===null){n({status:`anonymous`});return}sr(e).then(t=>n({status:`authenticated`,token:e,user:t}),()=>{localStorage.removeItem(gr),n({status:`anonymous`})})},[]);let r=(0,M.useCallback)(e=>(e.status===`session`&&(localStorage.setItem(gr,e.session.token),n({status:`authenticated`,token:e.session.token,user:e.user})),e),[]),i=(0,M.useMemo)(()=>({state:t,login:(e,t)=>nr(e,t).then(r),completeTotp:(e,t)=>rr(e,t).then(r),loginWithPasskey:()=>ur().then(r),logout:async()=>{t.status===`authenticated`&&await dr(t.token).catch(()=>void 0),localStorage.removeItem(gr),n({status:`anonymous`})}}),[t,r]);return(0,B.jsx)(_r.Provider,{value:i,children:e})}function br({children:e}){let{state:t}=vr(),n=it();return t.status===`loading`?null:t.status===`anonymous`?(0,B.jsx)(Mt,{to:`/login`,state:{from:n},replace:!0}):(0,B.jsx)(B.Fragment,{children:e})}var V=e=>typeof e==`string`,xr=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Sr=e=>e==null?``:String(e),Cr=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},wr=/###/g,Tr=e=>e&&e.includes(`###`)?e.replace(wr,`.`):e,Er=e=>!e||V(e),Dr=(e,t,n)=>{let r=V(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Er(e))return{};let t=Tr(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Er(e)?{}:{obj:e,k:Tr(r[i])}},Or=(e,t,n)=>{let{obj:r,k:i}=Dr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Dr(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Dr(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},kr=(e,t,n,r)=>{let{obj:i,k:a}=Dr(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Ar=(e,t)=>{let{obj:n,k:r}=Dr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},jr=(e,t,n)=>{let r=Ar(e,n);return r===void 0?Ar(t,n):r},Mr=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?V(e[r])||e[r]instanceof String||V(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Mr(e[r],t[r],n):e[r]=t[r]);return e},Nr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Pr={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Fr=e=>V(e)?e.replace(/[&<>"'\/]/g,e=>Pr[e]):e,Ir=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Lr=[` `,`,`,`?`,`!`,`;`],Rr=new Ir(20),zr=(e,t,n)=>{t||=``,n||=``;let r=Lr.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Rr.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Br=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Vr=e=>e?.replace(/_/g,`-`),Hr={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Ur=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Hr,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>V(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),V(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Wr=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Gr=class extends Wr{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):V(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Ar(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!V(n)?s:Br(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Or(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(V(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Ar(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Mr(s,n,i):s={...s,...n},Or(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Kr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},qr=Symbol(`i18next/PATH_KEY`);function Jr(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===qr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Yr(e,t){let{[qr]:n}=e(Jr()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Xr=e=>!V(e)&&typeof e!=`boolean`&&typeof e!=`number`,Zr=class e extends Wr{constructor(e,t={}){super(),Cr([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Ur.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Xr(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!zr(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:V(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:V(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Yr(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Yr(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!V(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Xr(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(V(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Xr(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&V(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=V(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=V(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Kr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return V(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Yr(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!V(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(V(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!V(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Qr=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ur.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Vr(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Vr(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(V(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),V(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return V(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):V(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},$r={zero:0,one:1,two:2,few:3,many:4,other:5},ei={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ti=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ur.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Vr(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ei;if(!e.match(/-|_/))return ei;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>$r[e]-$r[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ni=(e,t,n,r=`.`,i=!0)=>{let a=jr(e,t,n);return!a&&i&&V(n)&&(a=Br(e,n,r),a===void 0&&(a=Br(t,n,r))),a},ri=e=>e.replace(/\$/g,`$$$$`),ii=class{constructor(e={}){this.logger=Ur.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Fr:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Nr(i):a||`{{`,this.suffix=o?Nr(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?Nr(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?Nr(l):``,this.nestingPrefix=d?Nr(d):f||Nr(`$t(`),this.nestingSuffix=p?Nr(p):m||Nr(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ni(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ni(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=V(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!V(a)&&!this.useRawValueToEscape&&(a=Sr(a));let s=t.safeValue(a);if(e=e.replace(i[0],ri(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${Nr(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!V(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!V(i))return i;V(i)||(i=Sr(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ai=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},oi=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Vr(r),i),t[o]=s),s(n)}},si=e=>(t,n,r)=>e(Vr(n),r)(t),ci=class{constructor(e={}){this.logger=Ur.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?oi:si;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=oi(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ai(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},li=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ui=class extends Wr{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Ur.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{kr(n.loaded,[i],a),li(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();V(e)&&(e=this.languageUtils.toResolveHierarchy(e)),V(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},di=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fi=e=>(V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),pi=()=>{},mi=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},hi=class e extends Wr{constructor(e={},t){if(super(),this.options=fi(e),this.services={},this.logger=Ur,this.modules={external:[]},mi(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(V(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=di();this.options={...n,...this.options,...fi(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Ur.init(r(this.modules.logger),this.options):Ur.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ci;let t=new Qr(this.options);this.store=new Gr(this.options.resources,this.options);let n=this.services;n.logger=Ur,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new ti(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new ii(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new ui(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Zr(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=pi,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=xr(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=pi){let n=t,r=V(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=xr();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=pi,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Kr.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=xr();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=V(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(V(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Yr(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Yr(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Yr(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return V(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=xr();return this.options.ns?(V(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=xr();V(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Qr(di());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=pi){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Gr(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...di().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ii(n)}return a.translator=new Zr(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();hi.createInstance,hi.dir,hi.init,hi.loadResources,hi.reloadResources,hi.use,hi.changeLanguage,hi.getFixedT,hi.t,hi.exists,hi.setDefaultNamespace,hi.hasLoadedNamespace,hi.loadNamespaces,hi.loadLanguages;var gi=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Ci(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_i={},vi=(e,t,n,r)=>{Ci(n)&&_i[n]||(Ci(n)&&(_i[n]=new Date),gi(e,t,n,r))},yi=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},bi=(e,t,n)=>{e.loadNamespaces(t,yi(e,n))},xi=(e,t,n,r)=>{if(Ci(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return bi(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,yi(e,r))},Si=(e,t,n={})=>!t.languages||!t.languages.length?(vi(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Ci=e=>typeof e==`string`,wi=e=>typeof e==`object`&&!!e,Ti=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ei={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Di=e=>Ei[e],Oi={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Ti,Di),transDefaultProps:void 0},ki=(e={})=>{Oi={...Oi,...e}},Ai=()=>Oi,ji,Mi=e=>{ji=e},Ni=()=>ji,Pi={type:`3rdParty`,init(e){ki(e.options.react),Mi(e)}},Fi=(0,M.createContext)(),Ii=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Li=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ri=o(((e,t)=>{t.exports=Li()}))(),zi={t:(e,t)=>{if(Ci(t))return t;if(wi(t)&&Ci(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Bi=()=>()=>{},Vi=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,M.useContext)(Fi)||{},a=n||r||Ni();a&&!a.reportNamespaces&&(a.reportNamespaces=new Ii),a||vi(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,M.useMemo)(()=>({...Ai(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=Ci(l)?[l]:l||[`translation`],d=(0,M.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,M.useRef)(0),p=(0,M.useCallback)(e=>{if(!a)return Bi;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,M.useRef)(),h=(0,M.useCallback)(()=>{if(!a)return zi;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>Si(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,M.useState)(0),{t:v,ready:y}=(0,Ri.useSyncExternalStore)(p,h,h);(0,M.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?xi(a,t.lng,d,e):bi(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,M.useRef)(null),S=(0,M.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,M.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(vi(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&vi(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?xi(a,t.lng,d,n):bi(a,d,n)})}return w},Hi={common:{loading:`Loading…`,schemaError:`Could not load the schema: {{message}}`,cancel:`Cancel`},fields:{geoLat:`Latitude`,geoLng:`Longitude`,jsonInvalid:`Invalid JSON — changes are not applied until this is fixed.`,mediaChoose:`Choose…`,mediaRemove:`Remove`,mediaNoImages:`No images in the media library.`,relationPlaceholder:`Relation picker to "{{target}}" coming soon (task 7).`,selectMultiNotSupported:`This field accepts multiple values; its editor is not available yet.`,blocksUnknownLabel:`Unknown block: {{type}}`,blocksMoveUp:`Move block {{position}} up`,blocksMoveDown:`Move block {{position}} down`,blocksRemove:`Remove block {{position}}`,blocksUnrecognized:`This block type ("{{type}}") is not recognised by this admin — its data is kept but cannot be edited here.`,blocksAddLabel:`Add a block`,taxonomyEmpty:`No terms available in "{{taxonomy}}".`,taxonomyNone:`— none —`},richText:{internalLinkTitle:`Internal link: {{path}}`,mediaLabel:`Media: {{id}}`,placeholder:`Write…`,toolbarLabel:`Formatting`,markStrong:`Bold`,markEm:`Italic`,markCode:`Code`,blockParagraph:`Paragraph`,blockH2:`Heading 2`,blockH3:`Heading 3`,blockH4:`Heading 4`,blockQuote:`Quote`,blockBullet:`Bulleted list`,blockNumber:`Numbered list`,removeLink:`Remove link`,linkButton:`Link`,linkUrlLabel:`Link URL`,linkPlaceholder:`https://…`},nav:{dashboard:`Dashboard`,collections:`Content`,media:`Media library`,taxonomies:`Taxonomies`,trash:`Trash`,audit:`Audit log`,agents:`Agents`,users:`Users`,profile:`My profile`,settings:`Settings`,sitePlan:`Site plan`},shell:{skipLink:`Skip to main content`,brand:`Cogenta`,logout:`Sign out`,nav:`Main navigation`},login:{heading:`Sign in to Cogenta`,passkeyButton:`Sign in with a passkey`,or:`or`,email:`Email address`,password:`Password`,submit:`Sign in`,totpHeading:`Verification code`,totpPrompt:`Enter the 6-digit code from your authenticator app.`,code:`Code`,verify:`Verify`,passkeyRefused:`The passkey was refused or cancelled.`,connectionFailed:`Could not sign in.`,incorrectCode:`Incorrect code.`},notices:{dismiss:`Hide this recommendation`,security:{"mfa-recommended":{title:`Turn on two-factor verification`,body:`This account can publish or administer the site. A second factor (an authenticator app or a passkey) protects it if its password ever leaks. Nothing forces you to: this recommendation stays until it is followed or hidden.`,action:`Set it up now`},"suspicious-activity":{title:`Repeated failed sign-in attempts`,body:`{{attempts}} sign-in attempts failed across {{subjects}} account(s) in the last 15 minutes. They are already being slowed down. Check the audit log, and make sure the accounts involved have strong passwords and a second factor. This disappears on its own once the attempts stop.`,action:`Open the audit log`}}},collections:{heading:`Content`},versions:{heading:`Version history`,loadError:`Could not load the history.`,current:` (current version)`,hideDiff:`Hide differences`,compare:`Compare to the current version`,restoring:`Restoring…`,restore:`Restore`,computingDiff:`Computing differences…`,diffError:`Could not compute the differences.`,restoreError:`Could not restore this version.`,noDiff:`No difference.`,before:`, before: {{value}}`,after:`, after: {{value}}`,movedPosition:` (position {{from}} → {{to}})`,changeAdded:`added`,changeRemoved:`removed`,changeChanged:`changed`,changeMoved:`moved`},translations:{heading:`Translations`,loadError:`Could not load translations.`,current:`{{locale}} (current)`,create:`{{locale}} — create translation`},entryEdit:{newHeading:`New: {{label}}`,editHeading:`Edit: {{label}}`,languageLabel:`Language:`,newTranslationSuffix:` (new translation)`,backToList:`Back to the list`,previewButton:`Preview`,previewGenerating:`Generating the link…`,previewNoSiteUrl:`This server has no site URL configured (site.url): the preview cannot be opened.`,previewError:`Could not generate the preview link.`,readOnly:`Read-only: you do not have permission to edit this content.`,saved:`Saved.`,createButton:`Create`,saveButton:`Save`,loadError:`Could not load this content.`,saveError:`Could not save this content.`,autosaveKept:`Unsaved changes kept in this browser at {{at}}. Save to record a version.`,autosaveFound:`Unsaved changes from {{at}} were found in this browser, newer than the last saved version.`,autosaveRestore:`Restore them`,autosaveDiscard:`Discard them`},media:{heading:`Media library`,loadError:`Could not load the media library.`,empty:`No media.`,fileLabel:`File`,altLabel:`Alt text`,decorativeLabel:`Decorative image (no description needed)`,justificationLabel:`Why this image is decorative`,uploading:`Uploading…`,uploadButton:`Upload`,uploadError:`Could not upload this file.`,closeButton:`Close`,saveButton:`Save`,deleting:`Deleting…`,deleteButton:`Delete`,updateError:`Could not update this media asset.`,deleteError:`Could not delete this media asset.`,focalLoadError:`Could not load the image.`,focalUpdateError:`Could not update the focal point.`,focalHint:`Click the image to set the focal point.`},collectionList:{newButton:`New`,searchLabel:`Search`,searchButton:`Search`,clearSearch:`Clear search`,searchResults:`{{count}} result(s)`,noMatches:`Nothing matched that search.`,searchError:`Could not search this collection.`,statusFilter:`Status`,allStatuses:`All`,deleteSelected:`Delete ({{count}})`,selectionColumn:`Selection`,selectRow:`Select {{title}}`,titleColumn:`Title`,idColumn:`ID`,statusColumn:`Status`,updatedColumn:`Updated`,noContent:`No content.`,previous:`Previous`,next:`Next`,notFoundHeading:`Content not found`,notFoundBody:`This collection does not exist, or you do not have access to it.`,back:`Back`,loadError:`Could not load content.`},taxonomies:{heading:`Taxonomies`,none:`This site declares no taxonomy you may read.`,taxonomy:`Taxonomy`,caption:`Terms, parents before children`,empty:`No terms yet.`,term:`Term`,slug:`Slug`,label:`Label`,parent:`Parent`,noParent:`— none (root) —`,actions:`Actions`,newTerm:`New term`,create:`Add the term`,delete:`Delete`,loadError:`Could not load the terms.`,createError:`The term could not be created.`,deleteError:`The term could not be deleted.`},trash:{heading:`Trash`,noCollections:`No collection you may delete from has a trash.`,collection:`Collection`,caption:`Deleted entries, still recoverable`,empty:`The trash is empty.`,entry:`Entry`,status:`Status when deleted`,deletedAt:`Deleted at`,actions:`Actions`,restore:`Restore`,purge:`Delete for good`,purgeConfirm:`Delete this entry for good? This cannot be undone.`,loadError:`Could not load the trash.`,restoreError:`The entry could not be restored.`,purgeError:`The entry could not be deleted.`},audit:{heading:`Audit log`,adminOnly:`Restricted to the "admin" role: this log names every account's actions.`,actor:`Actor`,action:`Action`,collection:`Collection`,filter:`Filter`,verify:`Verify integrity`,verifying:`Verifying…`,verifyOk:`Chain intact.`,verifyBroken:`Anomaly detected.`,verifyError:`Could not verify the log's integrity.`,loadError:`Could not load the audit log.`,date:`Date`,roles:`Roles`,entry:`Entry`,noEntries:`No entries.`},agents:{heading:`Agents`,adminOnly:`Restricted to the "admin" role: this manages every agent's activation and budget.`,name:`Name`,state:`State`,autonomy:`Autonomy`,budget:`Budget (tokens/day used)`,actions:`Actions`,enabled:`Enabled`,disabled:`Disabled`,enable:`Enable`,disable:`Disable`,noAgents:`No agents configured.`,loadError:`Could not load the agent list.`,toggleError:`Could not change this agent's state.`,detailHeading:`Agent: {{name}}`,traces:`Recent traces`,noTraces:`No traces yet.`,history:`History`,noHistory:`No history yet.`},dashboard:{heading:`Dashboard`,healthHeading:`Site health`,adminOnly:`Restricted to the "admin" role.`,database:`Database:`,storage:`Storage:`,healthLoadError:`Could not read the site's health.`,activityHeading:`Recent activity`,noActivity:`No activity.`,activityLoadError:`Could not load recent activity.`,scheduledHeading:`Scheduled content`,noScheduled:`No scheduled content.`,scheduledLoadError:`Could not load scheduled content.`,cveHeading:`Open CVEs`,cveBody:`No data source yet: this widget arrives with the security-monitoring agent (L5).`,vitalsHeading:`Core Web Vitals`,vitalsBody:`No data source yet: this widget arrives with measured rendering (L5).`,backupsHeading:`Backup status`,backupsBody:`No data source yet: this widget arrives with the backup agent (L5).`},settings:{heading:`Account settings`,signedInAs:`Signed in as {{email}}.`,languageHeading:`Interface language`,languageLabel:`Language`,securityMoved:`Password, two-step verification and active sessions: see "My profile".`},users:{heading:`Users`,adminOnly:`Admin role only: this page creates accounts and changes roles.`,tableLabel:`Account list`,newButton:`New user`,newHeading:`Create a user`,newDescription:`The password is generated by the server and shown exactly once.`,createButton:`Create the account`,close:`Close`,createdTitle:`Account created: {{email}}`,createdBody:`Here is its password. It is shown once and stored only as a hash — pass it on over a safe channel.`,createdDismiss:`Hide the password`,roleFilter:`Filter by role`,allRoles:`All roles`,emailColumn:`Email address`,rolesColumn:`Roles`,rolesHint:`One or more role names, separated by commas.`,statusColumn:`Status`,mfaColumn:`Second factor`,actionsColumn:`Actions`,active:`Active`,disabled:`Disabled`,mfaOn:`On`,mfaOff:`None`,empty:`No account matches this filter.`,changeRoles:`Change the roles of {{email}}`,rolesHeading:`Roles of {{email}}`,saveRoles:`Save the roles`,viewSessions:`See the sessions of {{email}}`,sessionsHeading:`Sessions of {{email}}`,disableAccount:`Disable {{email}}`,enableAccount:`Re-enable {{email}}`,sessionsTitle:`Active sessions`,noSessions:`No active session.`,unnamedSession:`Unnamed device`,lastSeen:`last seen`,revokeSession:`Revoke the session last seen {{at}}`,loadError:`Could not load the account list.`,createError:`Could not create this account.`,updateError:`Could not change this account.`,sessionsError:`Could not load the sessions.`,revokeError:`Could not revoke this session.`},profile:{heading:`My profile`,signedInAs:`Signed in as {{email}} — roles: {{roles}}.`,loadError:`Could not load your profile.`,passwordHeading:`Password`,passwordIntro:`Changing your password needs the one you use today. If you have forgotten it, there is no reset procedure yet.`,currentPassword:`Current password`,newPassword:`New password`,newPasswordHint:`At least 12 characters. A phrase of a few ordinary words is both longer and easier to remember than a short one with symbols in it.`,changePassword:`Change the password`,passwordChanged:`Password changed.`,passwordError:`Could not change the password.`,securityHeading:`Two-step verification`,securityIntro:`A second factor protects this account even if its password leaks. Nothing forces you to have one to sign in.`,totpOn:`Authenticator app: on.`,totpOff:`Authenticator app: not set up.`,passkeyCount:`Passkeys registered: {{count}}.`,enableTotp:`Set up an authenticator app`,disableTotp:`Turn off the authenticator app`,totpScan:`Enter this key in an authenticator app (Google Authenticator, 1Password…), then type the code it shows.`,totpKeyLabel:`Key:`,totpCode:`6-digit code`,totpConfirm:`Confirm`,totpEnabled:`Two-step verification turned on.`,totpDisabled:`Two-step verification turned off.`,totpBeginError:`Could not start the setup.`,totpCodeError:`Incorrect code.`,totpDisableError:`Could not turn off two-step verification.`,passkeyLabelField:`Device name (optional)`,passkeyLabelPlaceholder:`E.g.: work laptop`,addPasskey:`Add a passkey`,passkeyAdded:`Passkey added.`,passkeyRefused:`The passkey was refused or cancelled.`,revokeError:`Could not revoke this session.`},pluginPermissions:{heading:`Permissions requested`,intro:`Here, in plain language, is what "{{name}}" will be able to do on your site.`,riskLow:`Low risk`,riskMedium:`Medium risk`,riskHigh:`High risk — confirmation required`,confirmHighRisk:`I understand and allow this high-risk action`,approveAll:`Approve all without reading them one by one`,approveReviewed:`Approve the checked permissions`,noCapabilities:`This plugin does not request any particular permission.`,grantedHeading:`Granted permissions`,noGrants:`This plugin has no active permission right now.`,revoke:`Revoke`,pendingHeading:`New permissions requested`,pendingIntro:`A new version of this plugin requests additional permissions. They will not take effect until you approve them.`},fleetDashboard:{heading:`Fleet`,searchLabel:`Search a site or client`,searchPlaceholder:`Site or client name…`,clientFilterLabel:`Client`,allClients:`All clients`,minTierLabel:`Minimum risk`,tierCritical:`Critical`,tierHigh:`High`,tierMedium:`Medium`,tierLow:`All`,empty:`No site matches these filters.`,score:`Risk score: {{score}}`,noClient:`No client`},sitePlan:{heading:`Site plan`,intro:`Upload a specification and an agent proposes a content model, pages, designs and starter content. Nothing is applied until you have judged every item.`,adminOnly:`Restricted to the "admin" role: a site plan changes the shape of the site.`,noProvider:`No LLM provider is configured, so a new document cannot be analysed here. Plans proposed elsewhere can still be reviewed and applied. Everything else in this admin works without a provider.`,uploadHeading:`Read a document`,uploadHelp:`PDF, DOCX, Markdown or plain text. A brief, a cahier des charges, a specification.`,uploadLabel:`Choose document(s)`,draftsHeading:`Proposals`,noDrafts:`No proposal is waiting.`,discard:`Discard`,appliedOn:`Applied on {{at}}`,reviewHeading:`Review, item by item`,sectionEmpty:`Nothing proposed in this section.`,keep:`Keep`,drop:`Drop`,allDecided:`Every item has been decided. You can apply this plan.`,remaining_one:`{{count}} item still to decide.`,remaining_other:`{{count}} items still to decide.`,saveProgress:`Save progress`,apply:`Apply what I accepted`,appliedSummary:`Applied: {{added}} collection(s) added, {{entries}} demonstration entries created as drafts.`,loadError:`The proposals could not be loaded.`,proposeError:`The document could not be turned into a plan.`,saveError:`Your decisions could not be saved.`,applyError:`The plan could not be applied.`,deleteError:`The proposal could not be discarded.`},builder:{modeLabel:`Editing mode`,modeForm:`Form`,modeVisual:`Visual builder`,unavailableNew:`The visual builder needs an entry that has been saved: the preview renders the real page, and this one does not exist yet. Save once, then come back here.`,noZone:`This collection has no blocks field, so there is nothing to compose visually.`,historyLabel:`Undo and redo`,undo:`Undo`,redo:`Redo`,viewportLabel:`Preview width`,viewport:{desktop:`Desktop`,tablet:`Tablet`,mobile:`Mobile`},chromeHide:`Hide editing marks`,chromeShow:`Show editing marks`,previewTitle:`Page preview`,previewLoading:`Rendering…`,previewError:`The preview could not be rendered.`,outlineHeading:`Blocks on this page`,outlineEmpty:`No blocks yet. Add one from the panel below.`,pickerHeading:`Add a block`,searchLabel:`Search blocks`,searchPlaceholder:`hero, quote, gallery…`,searchEmpty:`No block matches “{{query}}”.`,categoriesLabel:`Block categories`,categoryAll:`All`,category:{highlight:`Highlight`,text:`Text`,media:`Media`,listing:`Listings`},detailHeading:`Selected block`,detailEmpty:`Select a block in the preview or in the list to edit its fields.`},assist:{title:`Writing assistant`,fieldLabel:`Which field?`,needsText:`Write something first — the assistant works on the text of this entry.`,running:`Working…`,goalLabel:`What should change?`,goalPlaceholder:`shorter, less formal, for a beginner…`,targetLocale:`Translate into`,use:`Use this`,notApplied:`Nothing has been changed. Choosing a suggestion fills the form; you still have to save.`,errorTitle:`The assistant could not answer`,runError:`The assistant could not answer. Try again.`}},Ui={common:{loading:`Chargement…`,schemaError:`Impossible de charger le schéma : {{message}}`,cancel:`Annuler`},fields:{geoLat:`Latitude`,geoLng:`Longitude`,jsonInvalid:`JSON invalide — les modifications ne sont pas prises en compte tant que ce n’est pas corrigé.`,mediaChoose:`Choisir…`,mediaRemove:`Retirer`,mediaNoImages:`Aucune image dans la médiathèque.`,relationPlaceholder:`Sélecteur de relation vers « {{target}} » à venir (tâche 7).`,selectMultiNotSupported:`Ce champ accepte plusieurs valeurs ; l'éditeur correspondant n'est pas encore disponible.`,blocksUnknownLabel:`Bloc inconnu : {{type}}`,blocksMoveUp:`Monter le bloc {{position}}`,blocksMoveDown:`Descendre le bloc {{position}}`,blocksRemove:`Retirer le bloc {{position}}`,blocksUnrecognized:`Ce type de bloc (« {{type}} ») n'est pas reconnu par cet admin — ses données sont conservées mais ne peuvent pas être éditées ici.`,blocksAddLabel:`Ajouter un bloc`,taxonomyEmpty:`Aucun terme disponible dans « {{taxonomy}} ».`,taxonomyNone:`— aucun —`},richText:{internalLinkTitle:`Lien interne : {{path}}`,mediaLabel:`Média : {{id}}`,placeholder:`Écrire…`,toolbarLabel:`Mise en forme`,markStrong:`Gras`,markEm:`Italique`,markCode:`Code`,blockParagraph:`Paragraphe`,blockH2:`Titre 2`,blockH3:`Titre 3`,blockH4:`Titre 4`,blockQuote:`Citation`,blockBullet:`Liste à puces`,blockNumber:`Liste numérotée`,removeLink:`Retirer le lien`,linkButton:`Lien`,linkUrlLabel:`URL du lien`,linkPlaceholder:`https://…`},nav:{dashboard:`Tableau de bord`,collections:`Contenus`,media:`Médiathèque`,taxonomies:`Taxonomies`,trash:`Corbeille`,audit:`Journal d'audit`,agents:`Agents`,users:`Utilisateurs`,profile:`Mon profil`,settings:`Paramètres`,sitePlan:`Plan du site`},shell:{skipLink:`Aller au contenu principal`,brand:`Cogenta`,logout:`Se déconnecter`,nav:`Navigation principale`},login:{heading:`Connexion à Cogenta`,passkeyButton:`Se connecter avec une clé d'accès`,or:`ou`,email:`Adresse e-mail`,password:`Mot de passe`,submit:`Se connecter`,totpHeading:`Code de vérification`,totpPrompt:`Entrez le code à 6 chiffres de votre application d'authentification.`,code:`Code`,verify:`Vérifier`,passkeyRefused:`La clé d’accès a été refusée ou annulée.`,connectionFailed:`Connexion impossible.`,incorrectCode:`Code incorrect.`},notices:{dismiss:`Masquer cette recommandation`,security:{"mfa-recommended":{title:`Activez la vérification en deux étapes`,body:`Ce compte peut publier ou administrer le site. Un second facteur (application d'authentification ou clé d'accès) le protège si son mot de passe fuite. Rien ne vous y oblige : cette recommandation reste affichée tant qu'elle n'est pas suivie ou masquée.`,action:`Configurer maintenant`},"suspicious-activity":{title:`Tentatives de connexion échouées répétées`,body:`{{attempts}} tentatives de connexion ont échoué sur {{subjects}} compte(s) au cours des 15 dernières minutes. Elles sont déjà ralenties. Consultez le journal d'audit et vérifiez que les comptes concernés ont un mot de passe solide et un second facteur. Ce message disparaît de lui-même dès que les tentatives cessent.`,action:`Ouvrir le journal d'audit`}}},collections:{heading:`Contenus`},versions:{heading:`Historique des versions`,loadError:`Impossible de charger l'historique.`,current:` (version actuelle)`,hideDiff:`Masquer les différences`,compare:`Comparer à la version actuelle`,restoring:`Restauration…`,restore:`Restaurer`,computingDiff:`Calcul des différences…`,diffError:`Impossible de calculer les différences.`,restoreError:`Impossible de restaurer cette version.`,noDiff:`Aucune différence.`,before:`, avant : {{value}}`,after:`, après : {{value}}`,movedPosition:` (position {{from}} → {{to}})`,changeAdded:`ajouté`,changeRemoved:`retiré`,changeChanged:`modifié`,changeMoved:`déplacé`},translations:{heading:`Traductions`,loadError:`Impossible de charger les traductions.`,current:`{{locale}} (courant)`,create:`{{locale}} — créer la traduction`},entryEdit:{newHeading:`Nouveau : {{label}}`,editHeading:`Modifier : {{label}}`,languageLabel:`Langue :`,newTranslationSuffix:` (nouvelle traduction)`,backToList:`Retour à la liste`,previewButton:`Prévisualiser`,previewGenerating:`Génération du lien…`,previewNoSiteUrl:`Ce serveur n'a pas d'URL de site configurée (site.url) : impossible d'ouvrir la prévisualisation.`,previewError:`Impossible de générer le lien de prévisualisation.`,readOnly:`Lecture seule : vous n'avez pas la permission de modifier ce contenu.`,saved:`Enregistré.`,createButton:`Créer`,saveButton:`Enregistrer`,loadError:`Impossible de charger ce contenu.`,saveError:`Impossible d'enregistrer ce contenu.`,autosaveKept:`Modifications non enregistrées conservées dans ce navigateur à {{at}}. Enregistrez pour créer une version.`,autosaveFound:`Des modifications non enregistrées datant de {{at}} ont été retrouvées dans ce navigateur, plus récentes que la dernière version enregistrée.`,autosaveRestore:`Les restaurer`,autosaveDiscard:`Les abandonner`},media:{heading:`Médiathèque`,loadError:`Impossible de charger la médiathèque.`,empty:`Aucun média.`,fileLabel:`Fichier`,altLabel:`Texte alternatif`,decorativeLabel:`Image décorative (aucune description nécessaire)`,justificationLabel:`Pourquoi cette image est décorative`,uploading:`Envoi…`,uploadButton:`Téléverser`,uploadError:`Impossible d'envoyer ce fichier.`,closeButton:`Fermer`,saveButton:`Enregistrer`,deleting:`Suppression…`,deleteButton:`Supprimer`,updateError:`Impossible de mettre à jour ce média.`,deleteError:`Impossible de supprimer ce média.`,focalLoadError:`Impossible de charger l’image.`,focalUpdateError:`Impossible de mettre à jour le point focal.`,focalHint:`Cliquer sur l’image pour placer le point focal.`},collectionList:{newButton:`Nouveau`,searchLabel:`Rechercher`,searchButton:`Rechercher`,clearSearch:`Effacer la recherche`,searchResults:`{{count}} résultat(s)`,noMatches:`Aucun résultat pour cette recherche.`,searchError:`La recherche n'a pas pu aboutir.`,statusFilter:`Statut`,allStatuses:`Tous`,deleteSelected:`Supprimer ({{count}})`,selectionColumn:`Sélection`,selectRow:`Sélectionner {{title}}`,titleColumn:`Titre`,idColumn:`ID`,statusColumn:`Statut`,updatedColumn:`Modifié`,noContent:`Aucun contenu.`,previous:`Précédent`,next:`Suivant`,notFoundHeading:`Contenu introuvable`,notFoundBody:`Cette collection n'existe pas ou vous n'y avez pas accès.`,back:`Retour`,loadError:`Impossible de charger les contenus.`},taxonomies:{heading:`Taxonomies`,none:`Ce site ne déclare aucune taxonomie que vous puissiez lire.`,taxonomy:`Taxonomie`,caption:`Termes, les parents avant leurs enfants`,empty:`Aucun terme pour l'instant.`,term:`Terme`,slug:`Slug`,label:`Libellé`,parent:`Parent`,noParent:`— aucun (racine) —`,actions:`Actions`,newTerm:`Nouveau terme`,create:`Ajouter le terme`,delete:`Supprimer`,loadError:`Impossible de charger les termes.`,createError:`Le terme n'a pas pu être créé.`,deleteError:`Le terme n'a pas pu être supprimé.`},trash:{heading:`Corbeille`,noCollections:`Aucune collection que vous puissiez supprimer n'a de corbeille.`,collection:`Collection`,caption:`Entrées supprimées, encore récupérables`,empty:`La corbeille est vide.`,entry:`Entrée`,status:`Statut à la suppression`,deletedAt:`Supprimée le`,actions:`Actions`,restore:`Restaurer`,purge:`Supprimer définitivement`,purgeConfirm:`Supprimer définitivement cette entrée ? C'est irréversible.`,loadError:`Impossible de charger la corbeille.`,restoreError:`L'entrée n'a pas pu être restaurée.`,purgeError:`L'entrée n'a pas pu être supprimée.`},audit:{heading:`Journal d'audit`,adminOnly:`Réservé au rôle « admin » : ce journal nomme les actions de tous les comptes.`,actor:`Acteur`,action:`Action`,collection:`Collection`,filter:`Filtrer`,verify:`Vérifier l'intégrité`,verifying:`Vérification…`,verifyOk:`Chaîne intacte.`,verifyBroken:`Anomalie détectée.`,verifyError:`Impossible de vérifier l'intégrité du journal.`,loadError:`Impossible de charger le journal d'audit.`,date:`Date`,roles:`Rôles`,entry:`Entrée`,noEntries:`Aucune entrée.`},agents:{heading:`Agents`,adminOnly:`Réservé au rôle « admin » : cette page pilote l'activation et le budget de chaque agent.`,name:`Nom`,state:`État`,autonomy:`Autonomie`,budget:`Budget (jetons/jour utilisés)`,actions:`Actions`,enabled:`Activé`,disabled:`Désactivé`,enable:`Activer`,disable:`Désactiver`,noAgents:`Aucun agent configuré.`,loadError:`Impossible de charger la liste des agents.`,toggleError:`Impossible de changer l'état de cet agent.`,detailHeading:`Agent : {{name}}`,traces:`Traces récentes`,noTraces:`Aucune trace pour l'instant.`,history:`Historique`,noHistory:`Aucun historique pour l'instant.`},dashboard:{heading:`Tableau de bord`,healthHeading:`Santé du site`,adminOnly:`Réservé au rôle « admin ».`,database:`Base de données :`,storage:`Stockage :`,healthLoadError:`Impossible de lire l'état du site.`,activityHeading:`Activité récente`,noActivity:`Aucune activité.`,activityLoadError:`Impossible de charger l'activité.`,scheduledHeading:`Contenus programmés`,noScheduled:`Aucun contenu programmé.`,scheduledLoadError:`Impossible de charger les contenus programmés.`,cveHeading:`CVE ouvertes`,cveBody:`Aucune source de données pour l'instant : ce widget arrive avec l'agent de veille de sécurité (L5).`,vitalsHeading:`Core Web Vitals`,vitalsBody:`Aucune source de données pour l'instant : ce widget arrive avec le rendu mesuré (L5).`,backupsHeading:`État des sauvegardes`,backupsBody:`Aucune source de données pour l'instant : ce widget arrive avec l'agent de sauvegarde (L5).`},settings:{heading:`Paramètres du compte`,signedInAs:`Connecté en tant que {{email}}.`,languageHeading:`Langue de l'interface`,languageLabel:`Langue`,securityMoved:`Mot de passe, vérification en deux étapes et sessions actives : voir « Mon profil ».`},users:{heading:`Utilisateurs`,adminOnly:`Réservé au rôle « admin » : cette page crée des comptes et change des rôles.`,tableLabel:`Liste des comptes`,newButton:`Nouvel utilisateur`,newHeading:`Créer un utilisateur`,newDescription:`Le mot de passe est généré par le serveur et affiché une seule fois.`,createButton:`Créer le compte`,close:`Fermer`,createdTitle:`Compte créé : {{email}}`,createdBody:`Voici son mot de passe. Il n'est affiché qu'une fois et n'est stocké que sous forme de hachage — transmettez-le à la personne concernée par un canal sûr.`,createdDismiss:`Masquer le mot de passe`,roleFilter:`Filtrer par rôle`,allRoles:`Tous les rôles`,emailColumn:`Adresse e-mail`,rolesColumn:`Rôles`,rolesHint:`Un ou plusieurs noms de rôle, séparés par des virgules.`,statusColumn:`État`,mfaColumn:`Second facteur`,actionsColumn:`Actions`,active:`Actif`,disabled:`Désactivé`,mfaOn:`Activé`,mfaOff:`Aucun`,empty:`Aucun compte ne correspond à ce filtre.`,changeRoles:`Changer les rôles de {{email}}`,rolesHeading:`Rôles de {{email}}`,saveRoles:`Enregistrer les rôles`,viewSessions:`Voir les sessions de {{email}}`,sessionsHeading:`Sessions de {{email}}`,disableAccount:`Désactiver {{email}}`,enableAccount:`Réactiver {{email}}`,sessionsTitle:`Sessions actives`,noSessions:`Aucune session active.`,unnamedSession:`Appareil sans nom`,lastSeen:`vue le`,revokeSession:`Révoquer la session vue le {{at}}`,loadError:`Impossible de charger la liste des comptes.`,createError:`Impossible de créer ce compte.`,updateError:`Impossible de modifier ce compte.`,sessionsError:`Impossible de charger les sessions.`,revokeError:`Impossible de révoquer cette session.`},profile:{heading:`Mon profil`,signedInAs:`Connecté en tant que {{email}} — rôles : {{roles}}.`,loadError:`Impossible de charger votre profil.`,passwordHeading:`Mot de passe`,passwordIntro:`Changer votre mot de passe exige celui que vous utilisez aujourd'hui. Si vous l'avez oublié, il n'existe pas encore de procédure de réinitialisation.`,currentPassword:`Mot de passe actuel`,newPassword:`Nouveau mot de passe`,newPasswordHint:`Au moins 12 caractères. Une phrase de quelques mots ordinaires est plus longue et plus facile à retenir qu'un mot court avec des symboles.`,changePassword:`Changer le mot de passe`,passwordChanged:`Mot de passe modifié.`,passwordError:`Impossible de changer le mot de passe.`,securityHeading:`Vérification en deux étapes`,securityIntro:`Un second facteur protège ce compte même si son mot de passe fuite. Rien ne vous y oblige pour vous connecter.`,totpOn:`Application d'authentification : activée.`,totpOff:`Application d'authentification : non configurée.`,passkeyCount:`Clés d'accès enregistrées : {{count}}.`,enableTotp:`Configurer une application d'authentification`,disableTotp:`Désactiver l'application d'authentification`,totpScan:`Saisissez cette clé dans une application d'authentification (Google Authenticator, 1Password…), puis entrez le code affiché.`,totpKeyLabel:`Clé :`,totpCode:`Code à 6 chiffres`,totpConfirm:`Confirmer`,totpEnabled:`Vérification en deux étapes activée.`,totpDisabled:`Vérification en deux étapes désactivée.`,totpBeginError:`Impossible de démarrer la configuration.`,totpCodeError:`Code incorrect.`,totpDisableError:`Impossible de désactiver la vérification en deux étapes.`,passkeyLabelField:`Nom de l'appareil (facultatif)`,passkeyLabelPlaceholder:`Ex. : ordinateur portable professionnel`,addPasskey:`Ajouter une clé d'accès`,passkeyAdded:`Clé d'accès ajoutée.`,passkeyRefused:`La clé d’accès a été refusée ou annulée.`,revokeError:`Impossible de révoquer cette session.`},pluginPermissions:{heading:`Autorisations demandées`,intro:`Voici, en langage clair, ce que « {{name}} » pourra faire sur votre site.`,riskLow:`Risque faible`,riskMedium:`Risque modéré`,riskHigh:`Risque élevé — confirmation requise`,confirmHighRisk:`Je comprends et j'autorise cette action à risque élevé`,approveAll:`Tout autoriser sans les lire un par un`,approveReviewed:`Autoriser les permissions cochées`,noCapabilities:`Ce plugin ne demande aucune autorisation particulière.`,grantedHeading:`Autorisations accordées`,noGrants:`Ce plugin n'a aucune autorisation active pour le moment.`,revoke:`Révoquer`,pendingHeading:`Nouvelles autorisations demandées`,pendingIntro:`Une nouvelle version de ce plugin demande des autorisations supplémentaires. Elles ne prendront effet qu'après votre accord.`},fleetDashboard:{heading:`Flotte`,searchLabel:`Rechercher un site ou un client`,searchPlaceholder:`Nom du site ou du client…`,clientFilterLabel:`Client`,allClients:`Tous les clients`,minTierLabel:`Risque minimum`,tierCritical:`Critique`,tierHigh:`Élevé`,tierMedium:`Modéré`,tierLow:`Tous`,empty:`Aucun site ne correspond à ces filtres.`,score:`Score de risque : {{score}}`,noClient:`Sans client`},sitePlan:{heading:`Plan du site`,intro:`Téléversez un cahier des charges et un agent propose un modèle de contenu, des pages, des gabarits et du contenu de départ. Rien n'est appliqué tant que vous n'avez pas jugé chaque élément.`,adminOnly:`Réservé au rôle « admin » : un plan de site change la structure du site.`,noProvider:`Aucun fournisseur LLM n'est configuré : un nouveau document ne peut pas être analysé ici. Les plans proposés ailleurs restent consultables et applicables. Tout le reste de cette administration fonctionne sans fournisseur.`,uploadHeading:`Lire un document`,uploadHelp:`PDF, DOCX, Markdown ou texte brut. Un brief, un cahier des charges, une spécification.`,uploadLabel:`Choisir le ou les documents`,draftsHeading:`Propositions`,noDrafts:`Aucune proposition en attente.`,discard:`Écarter`,appliedOn:`Appliqué le {{at}}`,reviewHeading:`Relecture, élément par élément`,sectionEmpty:`Rien de proposé dans cette section.`,keep:`Garder`,drop:`Retirer`,allDecided:`Tous les éléments sont tranchés. Vous pouvez appliquer ce plan.`,remaining_one:`{{count}} élément reste à trancher.`,remaining_other:`{{count}} éléments restent à trancher.`,saveProgress:`Enregistrer l'avancement`,apply:`Appliquer ce que j'ai accepté`,appliedSummary:`Appliqué : {{added}} collection(s) ajoutée(s), {{entries}} entrée(s) de démonstration créée(s) en brouillon.`,loadError:`Les propositions n'ont pas pu être chargées.`,proposeError:`Le document n'a pas pu être transformé en plan.`,saveError:`Vos décisions n'ont pas pu être enregistrées.`,applyError:`Le plan n'a pas pu être appliqué.`,deleteError:`La proposition n'a pas pu être écartée.`},builder:{modeLabel:`Mode d'édition`,modeForm:`Formulaire`,modeVisual:`Composition visuelle`,unavailableNew:`La composition visuelle demande une entrée déjà enregistrée : l'aperçu rend la vraie page, qui n'existe pas encore. Enregistrez une première fois, puis revenez ici.`,noZone:`Cette collection n'a pas de champ de blocs : il n'y a rien à composer visuellement.`,historyLabel:`Annuler et rétablir`,undo:`Annuler`,redo:`Rétablir`,viewportLabel:`Largeur d'aperçu`,viewport:{desktop:`Ordinateur`,tablet:`Tablette`,mobile:`Mobile`},chromeHide:`Masquer les repères`,chromeShow:`Afficher les repères`,previewTitle:`Aperçu de la page`,previewLoading:`Rendu en cours…`,previewError:`L'aperçu n'a pas pu être rendu.`,outlineHeading:`Blocs de la page`,outlineEmpty:`Aucun bloc. Ajoutez-en un depuis le panneau ci-dessous.`,pickerHeading:`Ajouter un bloc`,searchLabel:`Rechercher un bloc`,searchPlaceholder:`héros, citation, galerie…`,searchEmpty:`Aucun bloc ne correspond à « {{query}} ».`,categoriesLabel:`Catégories de blocs`,categoryAll:`Tous`,category:{highlight:`Mise en avant`,text:`Texte`,media:`Média`,listing:`Listes`},detailHeading:`Bloc sélectionné`,detailEmpty:`Sélectionnez un bloc dans l'aperçu ou dans la liste pour modifier ses champs.`},assist:{title:`Assistant de rédaction`,fieldLabel:`Quel champ ?`,needsText:`Écrivez d'abord quelque chose — l'assistant travaille sur le texte de cette fiche.`,running:`En cours…`,goalLabel:`Que faut-il changer ?`,goalPlaceholder:`plus court, moins formel, pour un débutant…`,targetLocale:`Traduire vers`,use:`Utiliser`,notApplied:`Rien n'a été modifié. Choisir une suggestion remplit le formulaire ; il reste à enregistrer.`,errorTitle:`L'assistant n'a pas pu répondre`,runError:`L'assistant n'a pas pu répondre. Réessayez.`}},Wi=[`fr`,`en`],Gi=`fr`,Ki=`cogenta.admin.language`;function qi(e){return Wi.includes(e)}function Ji(){let e=localStorage.getItem(Ki);if(e!==null&&qi(e))return e;let t=navigator.language.slice(0,2).toLowerCase();return qi(t)?t:Gi}function Yi(e){localStorage.setItem(Ki,e),hi.changeLanguage(e)}hi.use(Pi).init({resources:{fr:{translation:Ui},en:{translation:Hi}},lng:Ji(),fallbackLng:Gi,interpolation:{escapeValue:!1}});function Xi(e){return R(`/api/agents`,{headers:z(e)})}function Zi(e,t){return R(`/api/agents/${encodeURIComponent(t)}/enable`,{method:`POST`,headers:z(e)})}function Qi(e,t){return R(`/api/agents/${encodeURIComponent(t)}/disable`,{method:`POST`,headers:z(e)})}function $i(e,t){return R(`/api/agents/${encodeURIComponent(t)}/traces`,{headers:z(e)})}function ea(e,t){return R(`/api/agents/${encodeURIComponent(t)}/history`,{headers:z(e)})}function ta(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,r=(t.state.status===`authenticated`?t.state.user.roles:[]).includes(`admin`),[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(!0),[c,l]=(0,M.useState)(null),[u,d]=(0,M.useState)(null),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)([]),[g,_]=(0,M.useState)([]),[v,y]=(0,M.useState)(!1),b=(0,M.useCallback)(async()=>{if(!(n===null||!r)){s(!0),l(null);try{a(await Xi(n))}catch(t){l(t instanceof L?t.message:e(`agents.loadError`))}finally{s(!1)}}},[n,r,e]);(0,M.useEffect)(()=>{b()},[b]),(0,M.useEffect)(()=>{if(n===null||f===null){h([]),_([]);return}y(!0),Promise.all([$i(n,f),ea(n,f)]).then(([e,t])=>{h(e),_(t)}).catch(t=>{l(t instanceof L?t.message:e(`agents.loadError`))}).finally(()=>y(!1))},[n,f,e]);async function x(t){if(n!==null){d(t.name);try{t.enabled?await Qi(n,t.name):await Zi(n,t.name),await b()}catch(t){l(t instanceof L?t.message:e(`agents.toggleError`))}finally{d(null)}}}return r?(0,B.jsxs)(`section`,{"aria-labelledby":`agents-heading`,children:[(0,B.jsx)(`h1`,{id:`agents-heading`,children:e(`agents.heading`)}),c!==null&&(0,B.jsx)(`p`,{role:`alert`,children:c}),o&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!o&&c===null&&(0,B.jsxs)(`table`,{children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{scope:`col`,children:e(`agents.name`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`agents.state`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`agents.autonomy`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`agents.budget`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`agents.actions`)})]})}),(0,B.jsxs)(`tbody`,{children:[i.map(t=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:(0,B.jsx)(`button`,{type:`button`,onClick:()=>p(t.name),children:t.name})}),(0,B.jsx)(`td`,{children:t.enabled?e(`agents.enabled`):e(`agents.disabled`)}),(0,B.jsx)(`td`,{children:t.autonomy?.default??`—`}),(0,B.jsxs)(`td`,{children:[t.budget?.tokensPerDay??`—`,` / `,t.usage?.tokensToday??0]}),(0,B.jsx)(`td`,{children:(0,B.jsx)(`button`,{type:`button`,disabled:u===t.name,onClick:()=>void x(t),children:t.enabled?e(`agents.disable`):e(`agents.enable`)})})]},t.name)),i.length===0&&(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:5,children:e(`agents.noAgents`)})})]})]}),f!==null&&(0,B.jsxs)(`section`,{"aria-labelledby":`agents-detail-heading`,children:[(0,B.jsx)(`h2`,{id:`agents-detail-heading`,children:e(`agents.detailHeading`,{name:f})}),v&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!v&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`h3`,{children:e(`agents.traces`)}),(0,B.jsxs)(`ul`,{children:[m.map(e=>(0,B.jsxs)(`li`,{children:[e.startedAt,` — `,e.stopReason]},e.id)),m.length===0&&(0,B.jsx)(`li`,{children:e(`agents.noTraces`)})]}),(0,B.jsx)(`h3`,{children:e(`agents.history`)}),(0,B.jsxs)(`ul`,{children:[g.map(e=>(0,B.jsxs)(`li`,{children:[e.at,` — `,e.action]},e.id)),g.length===0&&(0,B.jsx)(`li`,{children:e(`agents.noHistory`)})]})]})]})]}):(0,B.jsxs)(`section`,{"aria-labelledby":`agents-heading`,children:[(0,B.jsx)(`h1`,{id:`agents-heading`,children:e(`agents.heading`)}),(0,B.jsx)(`p`,{role:`alert`,children:e(`agents.adminOnly`)})]})}function na(e,t={}){let n=new URLSearchParams;t.actorId!==void 0&&n.set(`actorId`,t.actorId),t.action!==void 0&&n.set(`action`,t.action),t.collection!==void 0&&n.set(`collection`,t.collection),t.since!==void 0&&n.set(`since`,t.since),t.limit!==void 0&&n.set(`limit`,String(t.limit));let r=n.toString();return R(`/api/audit${r===``?``:`?${r}`}`,{headers:z(e)})}function ra(e){return R(`/api/audit/verify`,{headers:z(e)})}function ia(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,r=(t.state.status===`authenticated`?t.state.user.roles:[]).includes(`admin`),[i,a]=(0,M.useState)(``),[o,s]=(0,M.useState)(``),[c,l]=(0,M.useState)(``),[u,d]=(0,M.useState)([]),[f,p]=(0,M.useState)(!0),[m,h]=(0,M.useState)(null),[g,_]=(0,M.useState)(!1),[v,y]=(0,M.useState)(null),b=(0,M.useCallback)(async()=>{if(!(n===null||!r)){p(!0),h(null);try{let e=await na(n,{...i===``?{}:{actorId:i},...o===``?{}:{action:o},...c===``?{}:{collection:c}});d(e)}catch(t){h(t instanceof L?t.message:e(`audit.loadError`))}finally{p(!1)}}},[n,r,i,o,c,e]);(0,M.useEffect)(()=>{b()},[b]);function x(e){e.preventDefault(),b()}async function S(){if(n!==null){_(!0),y(null);try{let t=await ra(n);y(t.ok?e(`audit.verifyOk`):e(`audit.verifyBroken`))}catch(t){y(t instanceof L?t.message:e(`audit.verifyError`))}finally{_(!1)}}}return r?(0,B.jsxs)(`section`,{"aria-labelledby":`audit-heading`,children:[(0,B.jsx)(`h1`,{id:`audit-heading`,children:e(`audit.heading`)}),(0,B.jsxs)(`form`,{onSubmit:x,children:[(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:`audit-actor`,children:e(`audit.actor`)}),(0,B.jsx)(`input`,{id:`audit-actor`,value:i,onChange:e=>a(e.target.value)})]}),(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:`audit-action`,children:e(`audit.action`)}),(0,B.jsx)(`input`,{id:`audit-action`,value:o,onChange:e=>s(e.target.value)})]}),(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:`audit-collection`,children:e(`audit.collection`)}),(0,B.jsx)(`input`,{id:`audit-collection`,value:c,onChange:e=>l(e.target.value)})]}),(0,B.jsx)(`button`,{type:`submit`,children:e(`audit.filter`)})]}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`button`,{type:`button`,disabled:g,onClick:()=>void S(),children:e(g?`audit.verifying`:`audit.verify`)}),v!==null&&(0,B.jsxs)(`span`,{role:`status`,children:[` `,v]})]}),m!==null&&(0,B.jsx)(`p`,{role:`alert`,children:m}),f&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!f&&m===null&&(0,B.jsxs)(`table`,{children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.date`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.actor`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.roles`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.action`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.collection`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`audit.entry`)})]})}),(0,B.jsxs)(`tbody`,{children:[u.map(e=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:e.at}),(0,B.jsx)(`td`,{children:e.actorId??`—`}),(0,B.jsx)(`td`,{children:e.actorRoles.join(`, `)}),(0,B.jsx)(`td`,{children:e.action}),(0,B.jsx)(`td`,{children:e.collection??`—`}),(0,B.jsx)(`td`,{children:e.entryId??`—`})]},e.id)),u.length===0&&(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:6,children:e(`audit.noEntries`)})})]})]})]}):(0,B.jsxs)(`section`,{"aria-labelledby":`audit-heading`,children:[(0,B.jsx)(`h1`,{id:`audit-heading`,children:e(`audit.heading`)}),(0,B.jsx)(`p`,{role:`alert`,children:e(`audit.adminOnly`)})]})}function aa(e){let t=new URLSearchParams;return t.set(`state`,`working`),e.sort!==void 0&&t.set(`sort`,`${e.sort.field}:${e.sort.direction}`),e.status!==void 0&&t.set(`status`,e.status),e.after!==void 0&&t.set(`after`,e.after),e.limit!==void 0&&t.set(`limit`,String(e.limit)),e.trashed!==void 0&&t.set(`trashed`,e.trashed),t}async function oa(e,t,n={}){let r=aa(n).toString(),i=await tr(`/api/content/${encodeURIComponent(t)}${r===``?``:`?${r}`}`,{headers:z(e)});return{items:i.data,hasMore:i.page.hasMore,nextCursor:i.page.nextCursor}}async function sa(e,t,n){await R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:`DELETE`,headers:z(e)})}function ca(e,t,n){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/untrash`,{method:`POST`,headers:z(e)})}async function la(e,t,n){await R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/purge`,{method:`POST`,headers:z(e)})}function ua(e,t,n){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}?state=working`,{headers:z(e)})}function da(e,t,n,r={}){let{blocks:i,locale:a,translationOf:o}=r;return R(`/api/content/${encodeURIComponent(t)}`,{method:`POST`,headers:z(e),body:JSON.stringify({values:n,...i===void 0?{}:{blocks:i},...a===void 0?{}:{locale:a},...o===void 0?{}:{translationOf:o}})})}function fa(e,t,n,r,i){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:`PATCH`,headers:z(e),body:JSON.stringify(i===void 0?{values:r}:{values:r,blocks:i})})}function pa(e,t,n){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/history`,{headers:z(e)})}function ma(e,t,n){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/translations`,{headers:z(e)})}function ha(e,t,n,r,i){let a=new URLSearchParams({from:String(r),to:String(i)});return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/diff?${a.toString()}`,{headers:z(e)})}function ga(e,t,n,r){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/restore`,{method:`POST`,headers:z(e),body:JSON.stringify({version:r})})}function _a(e,t,n){return R(`/api/content/${encodeURIComponent(t)}/${encodeURIComponent(n)}/preview`,{method:`POST`,headers:z(e)})}async function va(e,t,n={}){let r=new URLSearchParams({q:t});n.collections!==void 0&&n.collections.length>0&&r.set(`collections`,n.collections.join(`,`)),n.status!==void 0&&r.set(`status`,n.status),n.locale!==void 0&&r.set(`locale`,n.locale),n.limit!==void 0&&r.set(`limit`,String(n.limit)),n.offset!==void 0&&r.set(`offset`,String(n.offset));let i=await tr(`/api/search?${r.toString()}`,{headers:z(e)});return{hits:i.data,hasMore:i.page.hasMore,nextOffset:i.page.nextOffset}}var ya=`public`;function ba(e,t,n){let r=t.permissions[e]??[];return r.length===0?!1:r.includes(ya)?!0:n.some(e=>r.includes(e))}function xa(e,t,n){let r=t.permissions[e]??[];return r.length===0?!1:r.includes(ya)?!0:n.some(e=>r.includes(e))}function Sa(e,t){return e.filter(e=>ba(`read`,e,t))}var Ca={BASE_URL:`/admin/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_API_BASE_URL??``,wa=(0,M.createContext)({status:`loading`});function Ta(){return(0,M.useContext)(wa)}function Ea({children:e}){let[t,n]=(0,M.useState)({status:`loading`});return(0,M.useEffect)(()=>{let e=!1;async function t(){try{let t=await fetch(`${Ca}/api/schema`);if(!t.ok){e||n({status:`error`,message:`Schema request failed with status ${t.status}.`});return}let r=await t.json();e||n({status:`ready`,schema:r.data})}catch(t){e||n({status:`error`,message:t instanceof Error?t.message:`Could not load the schema.`})}}return t(),()=>{e=!0}},[]),(0,B.jsx)(wa.Provider,{value:t,children:e})}var Da=[`draft`,`scheduled`,`published`,`archived`];function Oa(e){let t=Object.values(e.values).find(e=>typeof e==`string`);return typeof t==`string`&&t.length>0?t:e.id}function ka(){let{t:e}=Vi(),{name:t=``}=ut(),n=vr(),r=Ta(),i=n.state.status===`authenticated`?n.state.token:null,a=n.state.status===`authenticated`?n.state.user.roles:[],o=r.status===`ready`?r.schema.collections.find(e=>e.name===t):void 0,[s,c]=(0,M.useState)({field:`updatedAt`,direction:`desc`}),[l,u]=(0,M.useState)(``),[d,f]=(0,M.useState)([]),[p,m]=(0,M.useState)([void 0]),[h,g]=(0,M.useState)(null),[_,v]=(0,M.useState)(!1),[y,b]=(0,M.useState)(new Set),[x,S]=(0,M.useState)(!0),[C,w]=(0,M.useState)(null),[T,E]=(0,M.useState)(``),[D,O]=(0,M.useState)(``),[k,A]=(0,M.useState)(null),[j,N]=(0,M.useState)(!1),ee=p[p.length-1],te=(0,M.useCallback)(async()=>{if(i!==null&&o!==void 0){S(!0),w(null);try{let e=await oa(i,o.name,{sort:s,...l===``?{}:{status:l},...ee===void 0?{}:{after:ee}});f(e.items),v(e.hasMore),g(e.nextCursor),b(new Set)}catch(t){w(t instanceof L?t.message:e(`collectionList.loadError`))}finally{S(!1)}}},[i,o,s,l,ee,e]);(0,M.useEffect)(()=>{te()},[te]);let P=(0,M.useCallback)(async()=>{if(i===null||o===void 0)return;let t=D.trim();if(t===``){A(null);return}N(!0),w(null);try{let e=await va(i,t,{collections:[o.name],...l===``?{}:{status:l}});A(e.hits)}catch(t){A([]),w(t instanceof L?t.message:e(`collectionList.searchError`))}finally{N(!1)}},[i,o,D,l,e]);(0,M.useEffect)(()=>{P()},[P]);function F(e){m([void 0]),c(t=>t.field===e?{field:e,direction:t.direction===`asc`?`desc`:`asc`}:{field:e,direction:`asc`})}function ne(e){b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function re(){i!==null&&o!==void 0&&(await Promise.all([...y].map(e=>sa(i,o.name,e))),await te())}let ie=(0,M.useMemo)(()=>o!==void 0&&ba(`delete`,o,a),[o,a]),ae=(0,M.useMemo)(()=>o!==void 0&&ba(`create`,o,a),[o,a]);return r.status===`loading`?(0,B.jsx)(`p`,{children:e(`common.loading`)}):r.status===`error`?(0,B.jsx)(`p`,{role:`alert`,children:e(`common.schemaError`,{message:r.message})}):o===void 0||!ba(`read`,o,a)?(0,B.jsxs)(`section`,{"aria-labelledby":`collection-heading`,children:[(0,B.jsx)(`h1`,{id:`collection-heading`,children:e(`collectionList.notFoundHeading`)}),(0,B.jsxs)(`p`,{children:[e(`collectionList.notFoundBody`),` `,(0,B.jsx)(Tn,{to:`/collections`,children:e(`collectionList.back`)})]})]}):(0,B.jsxs)(`section`,{"aria-labelledby":`collection-heading`,children:[(0,B.jsx)(`h1`,{id:`collection-heading`,children:o.labels.plural}),ae&&(0,B.jsx)(Tn,{to:`/collections/${encodeURIComponent(t)}/new`,children:e(`collectionList.newButton`)}),(0,B.jsxs)(`div`,{className:`collection-list__toolbar`,children:[(0,B.jsx)(`search`,{children:(0,B.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),O(T)},children:[(0,B.jsx)(`label`,{htmlFor:`content-search`,children:e(`collectionList.searchLabel`)}),(0,B.jsx)(`input`,{id:`content-search`,type:`search`,value:T,onChange:e=>E(e.target.value)}),(0,B.jsx)(`button`,{type:`submit`,children:e(`collectionList.searchButton`)}),D!==``&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>{E(``),O(``)},children:e(`collectionList.clearSearch`)})]})}),(0,B.jsx)(`label`,{htmlFor:`status-filter`,children:e(`collectionList.statusFilter`)}),(0,B.jsxs)(`select`,{id:`status-filter`,value:l,onChange:e=>{m([void 0]),u(e.target.value)},children:[(0,B.jsx)(`option`,{value:``,children:e(`collectionList.allStatuses`)}),Da.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]}),ie&&y.size>0&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>void re(),children:e(`collectionList.deleteSelected`,{count:y.size})})]}),C!==null&&(0,B.jsx)(`p`,{role:`alert`,children:C}),j&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),x&&k===null&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),k!==null&&!j&&(0,B.jsxs)(`section`,{"aria-labelledby":`search-results-heading`,children:[(0,B.jsx)(`h2`,{id:`search-results-heading`,children:e(`collectionList.searchResults`,{count:k.length})}),k.length===0?(0,B.jsx)(`p`,{children:e(`collectionList.noMatches`)}):(0,B.jsx)(`ul`,{children:k.map(e=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(Tn,{to:`/collections/${encodeURIComponent(t)}/${encodeURIComponent(e.id)}`,children:e.title===``?e.id:e.title}),` `,(0,B.jsx)(`span`,{children:e.status})]},e.id))})]}),k===null&&!x&&C===null&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`table`,{children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[ie&&(0,B.jsx)(`th`,{scope:`col`,"aria-label":e(`collectionList.selectionColumn`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`collectionList.titleColumn`)}),(0,B.jsx)(Aa,{field:`id`,label:e(`collectionList.idColumn`),sort:s,onSort:F}),(0,B.jsx)(`th`,{scope:`col`,children:e(`collectionList.statusColumn`)}),(0,B.jsx)(Aa,{field:`updatedAt`,label:e(`collectionList.updatedColumn`),sort:s,onSort:F})]})}),(0,B.jsxs)(`tbody`,{children:[d.map(n=>(0,B.jsxs)(`tr`,{children:[ie&&(0,B.jsx)(`td`,{children:(0,B.jsx)(`input`,{type:`checkbox`,"aria-label":e(`collectionList.selectRow`,{title:Oa(n)}),checked:y.has(n.id),onChange:()=>ne(n.id)})}),(0,B.jsx)(`td`,{children:(0,B.jsx)(Tn,{to:`/collections/${encodeURIComponent(t)}/${encodeURIComponent(n.id)}`,children:Oa(n)})}),(0,B.jsx)(`td`,{children:n.id}),(0,B.jsx)(`td`,{children:n.status}),(0,B.jsx)(`td`,{children:n.updatedAt})]},n.id)),d.length===0&&(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:ie?5:4,children:e(`collectionList.noContent`)})})]})]}),(0,B.jsxs)(`div`,{className:`collection-list__pagination`,children:[(0,B.jsx)(`button`,{type:`button`,disabled:p.length<=1,onClick:()=>m(e=>e.slice(0,-1)),children:e(`collectionList.previous`)}),(0,B.jsx)(`button`,{type:`button`,disabled:!_||h===null,onClick:()=>m(e=>[...e,h??void 0]),children:e(`collectionList.next`)})]})]})]})}function Aa({field:e,label:t,sort:n,onSort:r}){let i=n.field===e;return(0,B.jsx)(`th`,{scope:`col`,"aria-sort":i?n.direction===`asc`?`ascending`:`descending`:`none`,children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>r(e),children:[t,i&&(n.direction===`asc`?` ▲`:` ▼`)]})})}function ja(){let{t:e}=Vi(),t=vr(),n=Ta(),r=t.state.status===`authenticated`?t.state.user.roles:[];return(0,B.jsxs)(`section`,{"aria-labelledby":`collections-heading`,children:[(0,B.jsx)(`h1`,{id:`collections-heading`,children:e(`collections.heading`)}),n.status===`loading`&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),n.status===`error`&&(0,B.jsx)(`p`,{role:`alert`,children:e(`common.schemaError`,{message:n.message})}),n.status===`ready`&&(0,B.jsx)(`ul`,{children:Sa(n.schema.collections,r).map(e=>(0,B.jsx)(`li`,{children:(0,B.jsx)(Tn,{to:`/collections/${e.name}`,children:e.labels.plural})},e.name))})]})}function Ma(e){return R(`/api/health`,{headers:z(e)})}function Na(e){let t=Object.values(e.values).find(e=>typeof e==`string`);return typeof t==`string`&&t.length>0?t:e.id}function Pa({report:e}){return(0,B.jsxs)(`span`,{className:`dashboard__badge dashboard__badge--${e.status}`,children:[e.driver,` (`,e.tier,`) — `,e.status]})}function Fa(){let{t:e}=Vi(),t=vr(),n=Ta(),r=t.state.status===`authenticated`?t.state.token:null,i=t.state.status===`authenticated`?t.state.user.roles:[],a=i.includes(`admin`),[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)(null),[u,d]=(0,M.useState)([]),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)([]),[g,_]=(0,M.useState)(null);return(0,M.useEffect)(()=>{if(r===null||!a)return;let t=!1;return Ma(r).then(e=>{t||s(e)}).catch(n=>{t||l(n instanceof L?n.message:e(`dashboard.healthLoadError`))}),()=>{t=!0}},[r,a,e]),(0,M.useEffect)(()=>{if(r===null||!a)return;let t=!1;return na(r,{limit:10}).then(e=>{t||d(e)}).catch(n=>{t||p(n instanceof L?n.message:e(`dashboard.activityLoadError`))}),()=>{t=!0}},[r,a,e]),(0,M.useEffect)(()=>{if(r===null||n.status!==`ready`)return;let t=!1,a=n.schema.collections.filter(e=>ba(`update`,e,i));return Promise.all(a.map(e=>oa(r,e.name,{status:`scheduled`,limit:5}).then(t=>t.items.map(t=>({collection:e.name,entry:t}))).catch(()=>[]))).then(e=>{t||h(e.flat())}).catch(n=>{t||_(n instanceof L?n.message:e(`dashboard.scheduledLoadError`))}),()=>{t=!0}},[r,n,i,e]),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-heading`,children:[(0,B.jsx)(`h1`,{id:`dashboard-heading`,children:e(`dashboard.heading`)}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-health-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-health-heading`,children:e(`dashboard.healthHeading`)}),!a&&(0,B.jsx)(`p`,{children:e(`dashboard.adminOnly`)}),a&&c!==null&&(0,B.jsx)(`p`,{role:`alert`,children:c}),a&&c===null&&o===null&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),a&&o!==null&&(0,B.jsxs)(`ul`,{children:[(0,B.jsxs)(`li`,{children:[e(`dashboard.database`),` `,(0,B.jsx)(Pa,{report:o.database})]}),(0,B.jsxs)(`li`,{children:[e(`dashboard.storage`),` `,(0,B.jsx)(Pa,{report:o.storage})]})]})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-activity-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-activity-heading`,children:e(`dashboard.activityHeading`)}),!a&&(0,B.jsx)(`p`,{children:e(`dashboard.adminOnly`)}),a&&f!==null&&(0,B.jsx)(`p`,{role:`alert`,children:f}),a&&f===null&&u.length===0&&(0,B.jsx)(`p`,{children:e(`dashboard.noActivity`)}),a&&u.length>0&&(0,B.jsx)(`ul`,{children:u.map(e=>(0,B.jsxs)(`li`,{children:[e.at,` — `,e.actorId??`—`,` — `,e.action,e.collection!==null&&` (${e.collection})`]},e.id))})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-scheduled-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-scheduled-heading`,children:e(`dashboard.scheduledHeading`)}),g!==null&&(0,B.jsx)(`p`,{role:`alert`,children:g}),g===null&&m.length===0&&(0,B.jsx)(`p`,{children:e(`dashboard.noScheduled`)}),m.length>0&&(0,B.jsx)(`ul`,{children:m.map(e=>(0,B.jsxs)(`li`,{children:[e.collection,` — `,Na(e.entry)]},`${e.collection}:${e.entry.id}`))})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-cve-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-cve-heading`,children:e(`dashboard.cveHeading`)}),(0,B.jsx)(`p`,{children:e(`dashboard.cveBody`)})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-vitals-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-vitals-heading`,children:e(`dashboard.vitalsHeading`)}),(0,B.jsx)(`p`,{children:e(`dashboard.vitalsBody`)})]}),(0,B.jsxs)(`section`,{"aria-labelledby":`dashboard-backups-heading`,children:[(0,B.jsx)(`h2`,{id:`dashboard-backups-heading`,children:e(`dashboard.backupsHeading`)}),(0,B.jsx)(`p`,{children:e(`dashboard.backupsBody`)})]})]})}function Ia(e){return R(`/api/assistant`,{headers:z(e)})}function La(e,t,n){return R(`/api/assistant/run`,{method:`POST`,headers:z(e),body:JSON.stringify({tool:t,input:n})})}function Ra(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ra(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function za(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ra(e))&&(r&&(r+=` `),r+=t);return r}var Ba=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Va=za,Ha=(e,t)=>n=>{if(t?.variants==null)return Va(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ba(t)||Ba(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Va(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ua=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Wa=(e,t)=>({classGroupId:e,validator:t}),Ga=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ka=`-`,qa=[],Ja=`arbitrary..`,Ya=e=>{let t=Qa(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Za(e);let n=e.split(Ka);return Xa(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ua(i,t):t:i||qa}return n[e]||qa}}},Xa=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Xa(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ka):e.slice(t).join(Ka),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Za=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ja+r:void 0})(),Qa=e=>{let{theme:t,classGroups:n}=e;return $a(n,t)},$a=(e,t)=>{let n=Ga();for(let r in e){let i=e[r];eo(i,n,r,t)}return n},eo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];to(i,t,n,r)}},to=(e,t,n,r)=>{if(typeof e==`string`){no(e,t,n);return}if(typeof e==`function`){ro(e,t,n,r);return}io(e,t,n,r)},no=(e,t,n)=>{let r=e===``?t:ao(t,e);r.classGroupId=n},ro=(e,t,n,r)=>{if(oo(e)){eo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Wa(n,e))},io=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];eo(o,ao(t,a),n,r)}},ao=(e,t)=>{let n=e,r=t.split(Ka),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ga(),n.nextPart.set(t,i)),n=i}return n},oo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,so=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},co=`!`,lo=`:`,uo=[],H=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fo=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===lo){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(co)?(c=s.slice(0,-1),l=!0):s.startsWith(co)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return H(t,l,c,u)};if(t){let e=t+lo,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):H(uo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},po=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},mo=e=>({cache:so(e.cacheSize),parseClassName:fo(e),sortModifiers:po(e),postfixLookupClassGroupIds:ho(e),...Ya(e)}),ho=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},go=/\s+/,_o=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(go),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+co:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},vo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=yo(n))&&(i&&(i+=` `),i+=r);return i},yo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=yo(e[r]))&&(n&&(n+=` `),n+=t);return n},bo=(e,...t)=>{let n,r,i,a,o=o=>(n=mo(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=_o(e,n);return i(e,a),a};return a=o,(...e)=>a(vo(...e))},xo=[],So=e=>{let t=t=>t[e]||xo;return t.isThemeGetter=!0,t},Co=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,To=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Eo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Do=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Oo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ko=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ao=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jo=e=>To.test(e),Mo=e=>!!e&&!Number.isNaN(Number(e)),No=e=>!!e&&Number.isInteger(Number(e)),Po=e=>e.endsWith(`%`)&&Mo(e.slice(0,-1)),Fo=e=>Eo.test(e),Io=()=>!0,Lo=e=>Do.test(e)&&!Oo.test(e),Ro=()=>!1,zo=e=>ko.test(e),Bo=e=>Ao.test(e),Vo=e=>!U(e)&&!W(e),Ho=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Uo=e=>is(e,cs,Ro),U=e=>Co.test(e),Wo=e=>is(e,ls,Lo),Go=e=>is(e,us,Mo),Ko=e=>is(e,fs,Io),qo=e=>is(e,ds,Ro),Jo=e=>is(e,os,Ro),Yo=e=>is(e,ss,Bo),Xo=e=>is(e,ps,zo),W=e=>wo.test(e),Zo=e=>as(e,ls),Qo=e=>as(e,ds),$o=e=>as(e,os),es=e=>as(e,cs),ts=e=>as(e,ss),ns=e=>as(e,ps,!0),rs=e=>as(e,fs,!0),is=(e,t,n)=>{let r=Co.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},as=(e,t,n=!1)=>{let r=wo.exec(e);return r?r[1]?t(r[1]):n:!1},os=e=>e===`position`||e===`percentage`,ss=e=>e===`image`||e===`url`,cs=e=>e===`length`||e===`size`||e===`bg-size`,ls=e=>e===`length`,us=e=>e===`number`,ds=e=>e===`family-name`,fs=e=>e===`number`||e===`weight`,ps=e=>e===`shadow`,ms=bo(()=>{let e=So(`color`),t=So(`font`),n=So(`text`),r=So(`font-weight`),i=So(`tracking`),a=So(`leading`),o=So(`breakpoint`),s=So(`container`),c=So(`spacing`),l=So(`radius`),u=So(`shadow`),d=So(`inset-shadow`),f=So(`text-shadow`),p=So(`drop-shadow`),m=So(`blur`),h=So(`perspective`),g=So(`aspect`),_=So(`ease`),v=So(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[jo,`full`,`auto`,...w()],E=()=>[No,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,No,W,U]},No,W,U],O=()=>[No,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[jo,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[jo,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[jo,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,W,U],F=()=>[...b(),$o,Jo,{position:[W,U]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,es,Uo,{size:[W,U]}],ie=()=>[Po,Zo,Wo],ae=()=>[``,`none`,`full`,l,W,U],I=()=>[``,Mo,Zo,Wo],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[Mo,Po,$o,Jo],le=()=>[``,`none`,m,W,U],ue=()=>[`none`,Mo,W,U],de=()=>[`none`,Mo,W,U],fe=()=>[Mo,W,U],pe=()=>[jo,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Fo],breakpoint:[Fo],color:[Io],container:[Fo],"drop-shadow":[Fo],ease:[`in`,`out`,`in-out`],font:[Vo],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Fo],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Fo],shadow:[Fo],spacing:[`px`,Mo],text:[Fo],"text-shadow":[Fo],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,jo,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Ho],columns:[{columns:[Mo,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[No,`auto`,W,U]}],basis:[{basis:[jo,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Mo,jo,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,Mo,W,U]}],shrink:[{shrink:[``,Mo,W,U]}],order:[{order:[No,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Zo,Wo]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,rs,Ko]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Po,U]}],"font-family":[{font:[Qo,qo,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[Mo,`none`,W,Go]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Mo,`from-font`,`auto`,W,Wo]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Mo,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[No,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},No,W,U],radial:[``,W,U],conic:[No,W,U]},ts,Yo]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Mo,W,U]}],"outline-w":[{outline:[``,Mo,Zo,Wo]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,ns,Xo]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,ns,Xo]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Mo,Wo]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,ns,Xo]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Mo,W,U]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Mo]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Mo]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:le()}],brightness:[{brightness:[Mo,W,U]}],contrast:[{contrast:[Mo,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ns,Xo]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Mo,W,U]}],"hue-rotate":[{"hue-rotate":[Mo,W,U]}],invert:[{invert:[``,Mo,W,U]}],saturate:[{saturate:[Mo,W,U]}],sepia:[{sepia:[``,Mo,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Mo,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[Mo,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Mo,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mo,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,Mo,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[Mo,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[Mo,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,Mo,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Mo,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[Mo,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[No,W,U]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Mo,Zo,Wo,Go]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function hs(...e){return ms(za(e))}var gs=Ha(`inline-flex items-center justify-center gap-2 appearance-none cursor-pointer select-none whitespace-nowrap rounded-md border font-sans font-medium leading-none transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-60 disabled:cursor-default`,{variants:{variant:{primary:`border-transparent bg-primary text-primary-foreground shadow-card hover:bg-primary/90`,secondary:`border-input bg-secondary text-secondary-foreground shadow-card hover:bg-accent hover:text-accent-foreground`,ghost:`border-transparent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow-card hover:bg-destructive/90`},size:{sm:`h-8 px-3 text-xs`,md:`h-9 px-4 text-sm`,lg:`h-10 px-5 text-base`,icon:`size-9 p-0 text-sm`}},defaultVariants:{variant:`primary`,size:`md`}});function _s({className:e,variant:t,size:n,type:r,...i}){return(0,B.jsx)(`button`,{type:r??`button`,className:hs(gs({variant:t,size:n}),e),...i})}function vs({className:e,...t}){return(0,B.jsx)(`section`,{className:hs(`flex flex-col rounded-lg border border-border bg-card text-card-foreground shadow-card`,e),...t})}function ys({className:e,...t}){return(0,B.jsx)(`div`,{className:hs(`flex flex-col gap-1 px-5 pt-5 pb-3`,e),...t})}function bs({className:e,...t}){return(0,B.jsx)(`div`,{className:hs(`font-sans text-base leading-6 font-semibold text-foreground [&>*]:m-0 [&>*]:text-inherit [&>*]:font-inherit`,e),...t})}function xs({className:e,...t}){return(0,B.jsx)(`p`,{className:hs(`m-0 text-sm leading-5 text-muted-foreground`,e),...t})}function Ss({className:e,...t}){return(0,B.jsx)(`div`,{className:hs(`flex flex-col gap-4 px-5 py-4`,e),...t})}var Cs=`w-full appearance-none rounded-md border border-input bg-card px-3 py-2 font-sans text-sm leading-5 text-card-foreground shadow-card transition-colors placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive disabled:cursor-default disabled:opacity-60`;function ws({label:e,description:t,error:n,className:r,children:i}){let a=(0,M.useId)(),o=t===void 0?void 0:`${a}-description`,s=n==null?void 0:`${a}-error`,c=[o,s].filter(e=>e!==void 0).join(` `);return(0,B.jsxs)(`div`,{className:hs(`flex flex-col gap-1.5`,r),children:[(0,B.jsx)(Ts,{htmlFor:a,children:e}),i({id:a,"aria-describedby":c===``?void 0:c,"aria-invalid":s!==void 0||void 0}),t!==void 0&&(0,B.jsx)(`p`,{id:o,className:`text-xs leading-5 text-muted-foreground`,children:t}),s!==void 0&&(0,B.jsx)(`p`,{id:s,role:`alert`,className:`text-xs leading-5 font-medium text-destructive`,children:n})]})}function Ts({className:e,...t}){return(0,B.jsx)(`label`,{className:hs(`font-sans text-sm leading-5 font-medium text-foreground`,e),...t})}function Es({className:e,...t}){return(0,B.jsx)(`input`,{className:hs(Cs,e),...t})}function Ds({className:e,...t}){return(0,B.jsx)(`select`,{className:hs(Cs,`cursor-pointer pr-8`,e),...t})}var Os=Object.defineProperty,ks=(e,t)=>Os(e,`name`,{value:t,configurable:!0}),As=!!(typeof window<`u`&&window.document&&window.document.createElement);function js(e,t,{checkForDefaultPrevented:n=!0}={}){return ks(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ks(js,`composeEventHandlers`);function Ms(e){if(!As)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ks(Ms,`getOwnerWindow`);function Ns(e){if(!As)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ks(Ns,`getOwnerDocument`);function Ps(e,t=!1){let{activeElement:n}=Ns(e);if(!n?.nodeName)return null;if(Fs(n)&&n.contentDocument)return Ps(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ns(n).getElementById(e);if(t)return t}}return n}ks(Ps,`getActiveElement`);function Fs(e){return e.tagName===`IFRAME`}ks(Fs,`isFrame`);var Is=Object.defineProperty,Ls=(e,t)=>Is(e,`name`,{value:t,configurable:!0});function Rs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ls(Rs,`setRef`);function zs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Rs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Rs(e[t],null)}}}}Ls(zs,`composeRefs`);function Bs(...e){return M.useCallback(zs(...e),e)}Ls(Bs,`useComposedRefs`);var Vs=Object.defineProperty,Hs=(e,t)=>Vs(e,`name`,{value:t,configurable:!0});function Us(e,t){let n=M.createContext(t);n.displayName=e+`Context`;let r=Hs(e=>{let{children:t,...r}=e,i=M.useMemo(()=>r,Object.values(r));return(0,B.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=M.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Hs(i,`useContext`),[r,i]}Hs(Us,`createContext`);function Ws(e,t=[]){let n=[];function r(t,r){let i=M.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Hs(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=M.useMemo(()=>o,Object.values(o));return(0,B.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=M.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Hs(s,`useContext`),[o,s]}Hs(r,`createContext`);let i=Hs(()=>{let t=n.map(e=>M.createContext(e));return Hs(function(n){let r=n?.[e]||t;return M.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Gs(i,...t)]}Hs(Ws,`createContextScope`);function Gs(...e){let t=e[0];if(e.length===1)return t;let n=Hs(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Hs(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return M.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Hs(Gs,`composeContextScopes`);var Ks=globalThis?.document?M.useLayoutEffect:()=>{},qs=Object.defineProperty,Js=(e,t)=>qs(e,`name`,{value:t,configurable:!0}),Ys=M.useId||(()=>void 0),Xs=0;function Zs(e){let[t,n]=M.useState(Ys());return Ks(()=>{e||n(e=>e??String(Xs++))},[e]),e||(t?`radix-${t}`:``)}Js(Zs,`useId`);var Qs=Object.defineProperty,$s=(e,t)=>Qs(e,`name`,{value:t,configurable:!0}),ec=M.useEffectEvent,tc=M.useInsertionEffect;function nc(e){if(typeof ec==`function`)return ec(e);let t=M.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof tc==`function`?tc(()=>{t.current=e}):Ks(()=>{t.current=e}),M.useMemo(()=>((...e)=>t.current?.(...e)),[])}$s(nc,`useEffectEvent`);var rc=Object.defineProperty,ic=(e,t)=>rc(e,`name`,{value:t,configurable:!0}),ac=M.useInsertionEffect||Ks;function oc({prop:e,defaultProp:t,onChange:n=ic(()=>{},`onChange`),caller:r}){let[i,a,o]=sc({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,M.useCallback(t=>{if(s){let n=cc(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ic(oc,`useControllableState`);function sc({defaultProp:e,onChange:t}){let[n,r]=M.useState(e),i=M.useRef(n),a=M.useRef(t);return ac(()=>{a.current=t},[t]),M.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ic(sc,`useUncontrolledState`);function cc(e){return typeof e==`function`}ic(cc,`isFunction`);var lc=Symbol(`RADIX:SYNC_STATE`);function uc(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=nc(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=M.useReducer((t,n)=>{if(n.type===lc)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=M.useRef(p);M.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=M.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return M.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:lc,state:i})},[i,d.state,c]),[h,f]}ic(uc,`useControllableStateReducer`);var dc=c(m(),1),fc=Object.defineProperty,pc=(e,t)=>fc(e,`name`,{value:t,configurable:!0});function mc(e){let t=M.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Sc(r)&&typeof Ec==`function`&&(r=Ec(r._payload)),M.Children.forEach(r,e=>{if(bc(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Sc(n)&&typeof Ec==`function`&&(n=Ec(n._payload)),a=_c(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=M.cloneElement(a,void 0,s):!o&&M.Children.count(r)===1&&M.isValidElement(r)&&(a=r);let c=a?yc(a):void 0,l=Bs(n,c);if(!a){if(r||r===0)throw Error(o?Tc(e):wc(e));return r}let u=vc(i,a.props??{});return a.type!==M.Fragment&&(u.ref=n?l:c),M.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}pc(mc,`createSlot`);var hc=Symbol.for(`radix.slottable`);function gc(e){let t=pc(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=hc,t}pc(gc,`createSlottable`);var _c=pc((e,t)=>{if(`child`in e.props){let t=e.props.child;return M.isValidElement(t)?M.cloneElement(t,void 0,e.props.children(t.props.children)):null}return M.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function vc(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}pc(vc,`mergeProps`);function yc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pc(yc,`getElementRef`);function bc(e){return M.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hc}pc(bc,`isSlottable`);var xc=Symbol.for(`react.lazy`);function Sc(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===xc&&`_payload`in e&&Cc(e._payload)}pc(Sc,`isLazyComponent`);function Cc(e){return typeof e==`object`&&!!e&&`then`in e}pc(Cc,`isPromiseLike`);var wc=pc(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Tc=pc(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Ec=M.use,Dc=Object.defineProperty,Oc=(e,t)=>Dc(e,`name`,{value:t,configurable:!0}),kc=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=mc(`Primitive.${t}`),r=M.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ac(e,t){e&&dc.flushSync(()=>e.dispatchEvent(t))}Oc(Ac,`dispatchDiscreteCustomEvent`);var jc=Object.defineProperty,Mc=(e,t)=>jc(e,`name`,{value:t,configurable:!0});function Nc(e){let t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>((...e)=>t.current?.(...e)),[])}Mc(Nc,`useCallbackRef`);var Pc=Object.defineProperty,Fc=(e,t)=>Pc(e,`name`,{value:t,configurable:!0}),Ic=`dismissableLayer.update`,Lc=`dismissableLayer.pointerDownOutside`,Rc=`dismissableLayer.focusOutside`,zc,Bc=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Vc=M.forwardRef(Fc(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=M.useContext(Bc),[d,f]=M.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=M.useState({}),h=Bs(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=M.useRef(!1),C=Wc(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:M.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=Gc(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Nc(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return M.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),M.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(zc=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Kc(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=zc))}},[d,p,n,u]),M.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Kc())},[d,u]),M.useEffect(()=>{let e=Fc(()=>m({}),`handleUpdate`);return document.addEventListener(Ic,e),()=>document.removeEventListener(Ic,e)},[]),(0,B.jsx)(kc.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:js(e.onFocusCapture,w.onFocusCapture),onBlurCapture:js(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:js(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Hc(){let e=M.useContext(Bc),[t,n]=M.useState(null);return M.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Fc(Hc,`useDismissableLayerSurface`);var Uc=Fc(()=>!0,`IS_TRUE`);function Wc(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Uc}=t,s=Nc(e),c=M.useRef(!1),l=M.useRef(!1),u=M.useRef(new Map),d=M.useRef(()=>{});return M.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Fc(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Fc(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Fc(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Fc(p,`handleInteractionBubble`);let m=Fc(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||qc(Lc,s,p,{discrete:!0})};if(Fc(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Fc(()=>c.current=!0,`onPointerDownCapture`)}}Fc(Wc,`usePointerDownOutside`);function Gc(e,t=globalThis?.document){let n=Nc(e),r=M.useRef(!1);return M.useEffect(()=>{let e=Fc(e=>{e.target&&!r.current&&qc(Rc,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Fc(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Fc(()=>r.current=!1,`onBlurCapture`)}}Fc(Gc,`useFocusOutside`);function Kc(){let e=new CustomEvent(Ic);document.dispatchEvent(e)}Fc(Kc,`dispatchUpdate`);function qc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ac(i,a):i.dispatchEvent(a)}Fc(qc,`handleAndDispatchCustomEvent`);var Jc=Object.defineProperty,Yc=(e,t)=>Jc(e,`name`,{value:t,configurable:!0}),Xc=`focusScope.autoFocusOnMount`,Zc=`focusScope.autoFocusOnUnmount`,Qc={bubbles:!1,cancelable:!0},$c=M.forwardRef(Yc(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=M.useState(null),l=Nc(i),u=Nc(a),d=M.useRef(null),f=Bs(t,c),p=M.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ol(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ol(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ol(s)};Yc(e,`handleFocusIn`),Yc(t,`handleFocusOut`),Yc(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),M.useEffect(()=>{if(s){sl.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Xc,Qc);s.addEventListener(Xc,l),s.dispatchEvent(t),t.defaultPrevented||(el(ul(nl(s)),{select:!0}),document.activeElement===e&&ol(s))}return()=>{s.removeEventListener(Xc,l),setTimeout(()=>{let t=new CustomEvent(Zc,Qc);s.addEventListener(Zc,u),s.dispatchEvent(t),t.defaultPrevented||ol(e??document.body,{select:!0}),s.removeEventListener(Zc,u),sl.remove(p)},0)}}},[s,l,u,p]);let m=M.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=tl(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ol(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ol(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(kc.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function el(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ol(r,{select:t}),document.activeElement!==n)return}Yc(el,`focusFirst`);function tl(e){let t=nl(e);return[rl(t,e),rl(t.reverse(),e)]}Yc(tl,`getTabbableEdges`);function nl(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Yc(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Yc(nl,`getTabbableCandidates`);function rl(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):il(r,{upTo:t})))return r}Yc(rl,`findVisible`);function il(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Yc(il,`isHidden`);function al(e){return e instanceof HTMLInputElement&&`select`in e}Yc(al,`isSelectableInput`);function ol(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&al(e)&&t&&e.select()}}Yc(ol,`focus`);var sl=cl();function cl(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ll(e,t),e.unshift(t)},remove(t){e=ll(e,t),e[0]?.resume()}}}Yc(cl,`createFocusScopesStack`);function ll(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Yc(ll,`arrayRemove`);function ul(e){return e.filter(e=>e.tagName!==`A`)}Yc(ul,`removeLinks`);var dl=Object.defineProperty,fl=M.forwardRef(((e,t)=>dl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=M.useState(!1);Ks(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?dc.createPortal((0,B.jsx)(kc.div,{...r,ref:t}),o):null},`Portal`)),pl=Object.defineProperty,ml=(e,t)=>pl(e,`name`,{value:t,configurable:!0});function hl(e,t){return M.useReducer((e,n)=>t[e][n]??e,e)}ml(hl,`useStateMachine`);var gl=ml(e=>{let{present:t,children:n}=e,r=_l(t),i=typeof n==`function`?n({present:r.isPresent}):M.Children.only(n),a=yl(r.ref,xl(i));return typeof n==`function`||r.isPresent?M.cloneElement(i,{ref:a}):null},`Presence`);function _l(e){let[t,n]=M.useState(),r=M.useRef(null),i=M.useRef(e),a=M.useRef(`none`),o=M.useRef(void 0),[s,c]=hl(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return M.useEffect(()=>{s===`mounted`?(a.current=o.current??bl(r.current),o.current=void 0):a.current=`none`},[s]),Ks(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=bl(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Ks(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ml(a=>{let o=bl(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ml(e=>{e.target===t&&(a.current=bl(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:M.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=bl(t)}else r.current=null;n(e)},[])}}ml(_l,`usePresence`);function vl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ml(vl,`setRef`);function yl(...e){let t=M.useRef(e);return t.current=e,M.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=vl(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():vl(n[e],null)}}},[])}ml(yl,`useStableComposedRefs`);function bl(e){return e?.animationName||`none`}ml(bl,`getAnimationName`);function xl(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ml(xl,`getElementRef`);var Sl=Object.defineProperty,Cl=(e,t)=>Sl(e,`name`,{value:t,configurable:!0}),wl=0,Tl=null;function El(e){return Dl(),e.children}Cl(El,`FocusGuards`);function Dl(){M.useEffect(()=>{Tl||={start:Ol(),end:Ol()};let{start:e,end:t}=Tl;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),wl++,()=>{wl===1&&(Tl?.start.remove(),Tl?.end.remove(),Tl=null),wl=Math.max(0,wl-1)}},[])}Cl(Dl,`useFocusGuards`);function Ol(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Cl(Ol,`createFocusGuard`);var kl=function(){return kl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kl.apply(this,arguments)};function Al(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function jl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ml=`right-scroll-bar-position`,Nl=`width-before-scroll-bar`,Pl=`with-scroll-bars-hidden`,Fl=`--removed-body-scroll-bar-size`;function Il(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ll(e,t){var n=(0,M.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Rl=typeof window<`u`?M.useLayoutEffect:M.useEffect,zl=new WeakMap;function Bl(e,t){var n=Ll(t||null,function(t){return e.forEach(function(e){return Il(e,t)})});return Rl(function(){var t=zl.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Il(e,null)}),i.forEach(function(e){r.has(e)||Il(e,a)})}zl.set(n,e)},[e]),n}function Vl(e){return e}function Hl(e,t){t===void 0&&(t=Vl);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ul(e){e===void 0&&(e={});var t=Hl(null);return t.options=kl({async:!0,ssr:!1},e),t}var Wl=function(e){var t=e.sideCar,n=Al(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return M.createElement(r,kl({},n))};Wl.isSideCarExport=!0;function Gl(e,t){return e.useMedium(t),Wl}var Kl=Ul(),ql=function(){},Jl=M.forwardRef(function(e,t){var n=M.useRef(null),r=M.useState({onScrollCapture:ql,onWheelCapture:ql,onTouchMoveCapture:ql}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Al(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Bl([n,t]),C=kl(kl({},b),i);return M.createElement(M.Fragment,null,u&&M.createElement(x,{sideCar:Kl,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?M.cloneElement(M.Children.only(s),kl(kl({},C),{ref:S})):M.createElement(v,kl({},C,{className:c,ref:S}),s))});Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jl.classNames={fullWidth:Nl,zeroRight:Ml};var Yl,Xl=function(){if(Yl)return Yl;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Zl(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Xl();return t&&e.setAttribute(`nonce`,t),e}function Ql(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $l(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var eu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zl())&&(Ql(t,n),$l(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tu=function(){var e=eu();return function(t,n){M.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nu=function(){var e=tu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ru={left:0,top:0,right:0,gap:0},iu=function(e){return parseInt(e||``,10)||0},au=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[iu(n),iu(r),iu(i)]},ou=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ru;var t=au(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},su=nu(),cu=`data-scroll-locked`,lu=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
+ .${Pl} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${cu}] {
15
+ overflow: hidden ${r};
16
+ overscroll-behavior: contain;
17
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
18
+ padding-left: ${i}px;
19
+ padding-top: ${a}px;
20
+ padding-right: ${o}px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: ${s}px ${r};
24
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
+ }
26
+
27
+ .${Ml} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${Nl} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${Ml} .${Ml} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${Nl} .${Nl} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${cu}] {
44
+ ${Fl}: ${s}px;
45
+ }
46
+ `},uu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},du=function(){M.useEffect(function(){return document.body.setAttribute(cu,(uu()+1).toString()),function(){var e=uu()-1;e<=0?document.body.removeAttribute(cu):document.body.setAttribute(cu,e.toString())}},[])},fu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;du();var a=M.useMemo(function(){return ou(i)},[i]);return M.createElement(su,{styles:lu(a,!t,i,n?``:`!important`)})},pu=!1;if(typeof window<`u`)try{var mu=Object.defineProperty({},"passive",{get:function(){return pu=!0,!0}});window.addEventListener(`test`,mu,mu),window.removeEventListener(`test`,mu,mu)}catch{pu=!1}var hu=pu?{passive:!1}:!1,gu=function(e){return e.tagName===`TEXTAREA`},_u=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!gu(e)&&n[t]===`visible`)},vu=function(e){return _u(e,`overflowY`)},yu=function(e){return _u(e,`overflowX`)},bu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Cu(e,r)){var i=wu(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Su=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Cu=function(e,t){return e===`v`?vu(t):yu(t)},wu=function(e,t){return e===`v`?xu(t):Su(t)},Tu=function(e,t){return e===`h`&&t===`rtl`?-1:1},Eu=function(e,t,n,r,i){var a=Tu(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=wu(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Cu(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Du=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ou=function(e){return[e.deltaX,e.deltaY]},ku=function(e){return e&&`current`in e?e.current:e},Au=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ju=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},Mu=0,Nu=[];function Pu(e){var t=M.useRef([]),n=M.useRef([0,0]),r=M.useRef(),i=M.useState(Mu++)[0],a=M.useState(nu)[0],o=M.useRef(e);M.useEffect(function(){o.current=e},[e]),M.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=jl([e.lockRef.current],(e.shards||[]).map(ku),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=M.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Du(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=bu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=bu(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Eu(h,t,e,h===`h`?s:c,!0)},[]),c=M.useCallback(function(e){var n=e;if(!(!Nu.length||Nu[Nu.length-1]!==a)){var r=`deltaY`in n?Ou(n):Du(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Au(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ku).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=M.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Fu(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=M.useCallback(function(e){n.current=Du(e),r.current=void 0},[]),d=M.useCallback(function(t){l(t.type,Ou(t),t.target,s(t,e.lockRef.current))},[]),f=M.useCallback(function(t){l(t.type,Du(t),t.target,s(t,e.lockRef.current))},[]);M.useEffect(function(){return Nu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,hu),document.addEventListener(`touchmove`,c,hu),document.addEventListener(`touchstart`,u,hu),function(){Nu=Nu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,hu),document.removeEventListener(`touchmove`,c,hu),document.removeEventListener(`touchstart`,u,hu)}},[]);var p=e.removeScrollBar,m=e.inert;return M.createElement(M.Fragment,null,m?M.createElement(a,{styles:ju(i)}):null,p?M.createElement(fu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Iu=Gl(Kl,Pu),Lu=M.forwardRef(function(e,t){return M.createElement(Jl,kl({},e,{ref:t,sideCar:Iu}))});Lu.classNames=Jl.classNames;var Ru=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},zu=new WeakMap,Bu=new WeakMap,Vu={},Hu=0,Uu=function(e){return e&&(e.host||Uu(e.parentNode))},Wu=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Uu(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Gu=function(e,t,n,r){var i=Wu(t,Array.isArray(e)?e:[e]);Vu[n]||(Vu[n]=new WeakMap);var a=Vu[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(zu.get(e)||0)+1,l=(a.get(e)||0)+1;zu.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Bu.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Hu++,function(){o.forEach(function(e){var t=zu.get(e)-1,i=a.get(e)-1;zu.set(e,t),a.set(e,i),t||(Bu.has(e)||e.removeAttribute(r),Bu.delete(e)),i||e.removeAttribute(n)}),Hu--,Hu||(zu=new WeakMap,zu=new WeakMap,Bu=new WeakMap,Vu={})}},Ku=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ru(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Gu(r,i,n,`aria-hidden`)):function(){return null}},qu=Object.defineProperty,Ju=(e,t)=>qu(e,`name`,{value:t,configurable:!0}),Yu=`Dialog`,[Xu,Zu]=Ws(Yu),[Qu,$u]=Xu(Yu),ed=Ju(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=M.useRef(null),c=M.useRef(null),[l,u]=oc({prop:r,defaultProp:i??!1,onChange:a,caller:Yu}),[d,f]=M.useState(0),[p,m]=M.useState(0);return(0,B.jsx)(Qu,{scope:t,triggerRef:s,contentRef:c,contentId:Zs(),titleId:Zs(),descriptionId:Zs(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:M.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),td=`DialogPortal`,[nd,rd]=Xu(td,{forceMount:void 0}),id=Ju(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$u(td,t);return(0,B.jsx)(nd,{scope:t,forceMount:n,children:M.Children.map(r,e=>(0,B.jsx)(gl,{present:n||a.open,children:(0,B.jsx)(fl,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ad=`DialogOverlay`,od=M.forwardRef(Ju(function(e,t){let n=rd(ad,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$u(ad,e.__scopeDialog);return a.modal?(0,B.jsx)(gl,{present:r||a.open,children:(0,B.jsx)(cd,{...i,ref:t})}):null},`DialogOverlay`)),sd=mc(`DialogOverlay.RemoveScroll`),cd=M.forwardRef(Ju(function(e,t){let{__scopeDialog:n,...r}=e,i=$u(ad,n),a=Bs(t,Hc());return(0,B.jsx)(Lu,{as:sd,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(kc.div,{"data-state":bd(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),ld=`DialogContent`,ud=M.forwardRef(Ju(function(e,t){let n=rd(ld,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$u(ld,e.__scopeDialog);return(0,B.jsx)(gl,{present:r||a.open,children:a.modal?(0,B.jsx)(dd,{...i,ref:t}):(0,B.jsx)(fd,{...i,ref:t})})},`DialogContent`)),dd=M.forwardRef(Ju(function(e,t){let n=$u(ld,e.__scopeDialog),r=M.useRef(null),i=Bs(t,n.contentRef,r);return M.useEffect(()=>{let e=r.current;if(e)return Ku(e)},[]),(0,B.jsx)(pd,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:js(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:js(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:js(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),fd=M.forwardRef(Ju(function(e,t){let n=$u(ld,e.__scopeDialog),r=M.useRef(!1),i=M.useRef(!1);return(0,B.jsx)(pd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),pd=M.forwardRef(Ju(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$u(ld,n);return Dl(),(0,B.jsx)(B.Fragment,{children:(0,B.jsx)($c,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(Vc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":bd(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),md=`DialogTitle`,hd=M.forwardRef(Ju(function(e,t){let{__scopeDialog:n,...r}=e,i=$u(md,n),{setTitleCount:a}=i;return Ks(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(kc.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),gd=`DialogDescription`,_d=M.forwardRef(Ju(function(e,t){let{__scopeDialog:n,...r}=e,i=$u(gd,n),{setDescriptionCount:a}=i;return Ks(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(kc.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),vd=`DialogClose`,yd=M.forwardRef(Ju(function(e,t){let{__scopeDialog:n,...r}=e,i=$u(vd,n);return(0,B.jsx)(kc.button,{type:`button`,...r,ref:t,onClick:js(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function bd(e){return e?`open`:`closed`}Ju(bd,`getState`);function xd({open:e,onOpenChange:t,title:n,description:r,children:i,footer:a,closeLabel:o,className:s}){let c=(0,M.useRef)(null);return(0,M.useEffect)(()=>{e&&(c.current=document.activeElement)},[e]),(0,B.jsx)(ed,{open:e,onOpenChange:t,children:(0,B.jsxs)(id,{children:[(0,B.jsx)(od,{className:`fixed inset-0 z-40 bg-foreground/40`}),(0,B.jsxs)(ud,{onCloseAutoFocus:e=>{e.preventDefault(),c.current?.focus()},className:hs(`fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] w-[min(32rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-border bg-card font-sans text-card-foreground shadow-overlay focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,s),children:[(0,B.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-5 pt-5 pb-3`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(hd,{className:`m-0 text-base leading-6 font-semibold`,children:n}),r!==void 0&&(0,B.jsx)(_d,{className:`m-0 text-sm leading-5 text-muted-foreground`,children:r})]}),(0,B.jsx)(yd,{"aria-label":o,className:`inline-flex size-8 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-md border border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,children:(0,B.jsx)(Sd,{})})]}),(0,B.jsx)(`div`,{className:`flex flex-col gap-4 overflow-y-auto px-5 py-2`,children:i}),a!==void 0&&(0,B.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 border-t border-border px-5 py-3`,children:a})]})]})})}function Sd(){return(0,B.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 20 20`,className:`size-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,children:(0,B.jsx)(`path`,{d:`M5 5l10 10M15 5L5 15`})})}var Cd=Ha(`flex gap-3 rounded-lg border px-4 py-3 font-sans text-sm leading-5 shadow-card`,{variants:{tone:{info:`border-info/30 bg-info-surface text-foreground`,success:`border-success/30 bg-success-surface text-foreground`,warning:`border-warning/40 bg-warning-surface text-foreground`,danger:`border-destructive/30 bg-destructive-surface text-foreground`}},defaultVariants:{tone:`info`}}),wd={info:`text-info`,success:`text-success`,warning:`text-warning`,danger:`text-destructive`};function Td({tone:e,title:t,children:n,actions:r,onDismiss:i,dismissLabel:a,live:o=`polite`,className:s}){let c=wd[e??`info`],l=o===`off`?{}:o===`assertive`?{role:`alert`}:{role:`status`};return(0,B.jsxs)(`div`,{className:hs(Cd({tone:e}),s),...l,children:[(0,B.jsx)(Ed,{className:hs(`mt-0.5 size-4 shrink-0`,c)}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[t!==void 0&&(0,B.jsx)(`p`,{className:`m-0 font-semibold`,children:t}),(0,B.jsx)(`div`,{className:`m-0 [&>p]:m-0`,children:n}),r!==void 0&&(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r})]}),i!==void 0&&a!==void 0&&(0,B.jsx)(`button`,{type:`button`,onClick:i,"aria-label":a,className:`inline-flex size-6 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-md border border-transparent bg-transparent text-muted-foreground hover:bg-foreground/5 hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,children:(0,B.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 20 20`,className:`size-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,children:(0,B.jsx)(`path`,{d:`M5 5l10 10M15 5L5 15`})})})]})}function Ed({className:e}){return(0,B.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 20 20`,className:e,fill:`currentColor`,children:(0,B.jsx)(`path`,{d:`M10 1a9 9 0 100 18 9 9 0 000-18zm0 4a1.1 1.1 0 110 2.2A1.1 1.1 0 0110 5zm1 10H9V9h2z`})})}function Dd({className:e,label:t,...n}){return(0,B.jsx)(`section`,{"aria-label":t,tabIndex:0,className:hs(`w-full overflow-x-auto rounded-lg border border-border bg-card shadow-card focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,e),...n})}function Od({className:e,...t}){return(0,B.jsx)(`table`,{className:hs(`w-full border-collapse font-sans text-sm text-card-foreground`,e),...t})}function kd({className:e,...t}){return(0,B.jsx)(`thead`,{className:hs(`bg-muted`,e),...t})}function Ad({className:e,...t}){return(0,B.jsx)(`tbody`,{className:e,...t})}function jd({className:e,...t}){return(0,B.jsx)(`tr`,{className:hs(`border-b border-border last:border-b-0 hover:bg-accent/60`,e),...t})}function Md({className:e,scope:t,...n}){return(0,B.jsx)(`th`,{scope:t??`col`,className:hs(`px-4 py-2.5 text-left align-middle text-xs leading-5 font-semibold tracking-wide text-muted-foreground uppercase`,e),...n})}function Nd({className:e,...t}){return(0,B.jsx)(`td`,{className:hs(`px-4 py-3 align-middle leading-5`,e),...t})}function Pd({className:e,colSpan:t,...n}){return(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:t,className:hs(`px-4 py-8 text-center text-sm text-muted-foreground`,e),...n})})}var Fd=new Set([`targetLocale`]);function Id({token:e,fields:t,locale:n,siteLocales:r,onApply:i}){let{t:a}=Vi(),[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)(null),[u,d]=(0,M.useState)(null),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(null),[g,_]=(0,M.useState)(r.find(e=>e!==n)??n),[v,y]=(0,M.useState)(``),[b,x]=(0,M.useState)(t[0]?.name??``),S=(0,M.useCallback)(async()=>{try{let t=await Ia(e);l(t.available),s(t.tools)}catch{l(!1),s([])}},[e]);if((0,M.useEffect)(()=>{S()},[S]),c!==!0||o===null)return null;let C=o.filter(e=>e.needs.every(e=>Fd.has(e)));if(C.length===0||t.length===0)return null;let w=t.find(e=>e.name===b)??t[0],T=w?.value??``,E=T.trim().length>0;async function D(t){d(t.tool),h(null),p(null);try{let r={text:T,locale:n};t.needs.includes(`targetLocale`)&&(r.targetLocale=g),t.tool===`assist.rewrite`&&v.trim().length>0&&(r.goal=v.trim()),t.tool===`assist.alt_text`&&(r.context=T,delete r.text),p({tool:t.tool,suggestion:await La(e,t.tool,r)})}catch(e){h(e instanceof L?e.message:a(`assist.runError`))}finally{d(null)}}return(0,B.jsxs)(vs,{"aria-labelledby":`assistant-panel-title`,children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{id:`assistant-panel-title`,children:a(`assist.title`)})}),(0,B.jsxs)(Ss,{className:`flex flex-col gap-4`,children:[t.length>1&&(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(Ts,{htmlFor:`assist-field`,children:a(`assist.fieldLabel`)}),(0,B.jsx)(`select`,{id:`assist-field`,value:w?.name??``,onChange:e=>{x(e.target.value),p(null)},className:`h-9 rounded-md border border-input bg-background px-3 text-sm`,children:t.map(e=>(0,B.jsx)(`option`,{value:e.name,children:e.label},e.name))})]}),!E&&(0,B.jsx)(`p`,{className:`m-0 text-sm text-muted-foreground`,children:a(`assist.needsText`)}),(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:C.map(e=>(0,B.jsx)(_s,{type:`button`,variant:`secondary`,size:`sm`,disabled:!E||u!==null,title:e.description,onClick:()=>{D(e)},children:u===e.tool?a(`assist.running`):e.label},e.tool))}),C.some(e=>e.tool===`assist.rewrite`)&&(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(Ts,{htmlFor:`assist-goal`,children:a(`assist.goalLabel`)}),(0,B.jsx)(Es,{id:`assist-goal`,value:v,placeholder:a(`assist.goalPlaceholder`),onChange:e=>y(e.target.value)})]}),C.some(e=>e.needs.includes(`targetLocale`))&&r.length>1&&(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(Ts,{htmlFor:`assist-target-locale`,children:a(`assist.targetLocale`)}),(0,B.jsx)(`select`,{id:`assist-target-locale`,value:g,onChange:e=>_(e.target.value),className:`h-9 rounded-md border border-input bg-background px-3 text-sm`,children:r.filter(e=>e!==n).map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))})]}),m!==null&&(0,B.jsx)(Td,{tone:`danger`,live:`assertive`,title:a(`assist.errorTitle`),children:(0,B.jsx)(`p`,{children:m})}),f!==null&&(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[f.suggestion.note!==void 0&&(0,B.jsx)(`p`,{className:`m-0 text-sm text-muted-foreground`,children:f.suggestion.note}),(0,B.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-2 p-0`,children:f.suggestion.suggestions.map(e=>(0,B.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-md border border-input p-3`,children:[(0,B.jsx)(`p`,{className:`m-0 whitespace-pre-wrap text-sm`,children:e}),(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{type:`button`,size:`sm`,onClick:()=>{w!==void 0&&i(w.name,e)},children:a(`assist.use`)})})]},e))}),(0,B.jsx)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:a(`assist.notApplied`)})]})]})]})}function Ld(e,t,n,r,i){return R(`/api/builder/render`,{method:`POST`,headers:z(e),body:JSON.stringify({collection:t,entryId:n,blocks:r,...i===void 0?{}:{values:i}})})}function Rd(e){switch(e){case`text`:case`slug`:case`date`:case`datetime`:case`color`:return``;case`number`:return null;case`boolean`:return!1;case`select`:return``;case`json`:return{};case`geo`:return null;case`richText`:case`media`:case`relation`:case`blocks`:return null;case`taxonomy`:return[]}}function zd(e,t,n={}){return{name:e,kind:t,required:n.required??!1,localized:n.localized??!1,unique:!1,hasCustomValidation:!1,options:n.options??{}}}function Bd(e){return{options:e.map(e=>({value:e}))}}var Vd=[`original`,`1:1`,`4:3`,`3:2`,`16:9`,`21:9`],Hd=[{name:`hero`,label:`Héros`,fields:[zd(`eyebrow`,`text`,{localized:!0}),zd(`title`,`text`,{required:!0,localized:!0}),zd(`subtitle`,`text`,{localized:!0}),zd(`media`,`media`),zd(`actions`,`json`,{localized:!0})]},{name:`prose`,label:`Texte`,fields:[zd(`body`,`richText`,{required:!0,localized:!0})]},{name:`mediaFigure`,label:`Média et légende`,fields:[zd(`media`,`media`,{required:!0}),zd(`caption`,`text`,{localized:!0}),zd(`credit`,`text`),zd(`ratio`,`select`,{options:Bd(Vd)}),zd(`align`,`select`,{options:Bd([`start`,`center`,`end`,`wide`,`full`])})]},{name:`featureGrid`,label:`Grille de fonctionnalités`,fields:[zd(`title`,`text`,{localized:!0}),zd(`items`,`json`,{required:!0,localized:!0})]},{name:`cta`,label:`Appel à action`,fields:[zd(`title`,`text`,{required:!0,localized:!0}),zd(`text`,`text`,{localized:!0}),zd(`actions`,`json`,{required:!0,localized:!0})]},{name:`gallery`,label:`Galerie`,fields:[zd(`items`,`json`,{required:!0}),zd(`layout`,`select`,{required:!0,options:Bd([`grid`,`carousel`,`masonry`])})]},{name:`quote`,label:`Citation`,fields:[zd(`text`,`text`,{required:!0,localized:!0}),zd(`author`,`text`),zd(`role`,`text`,{localized:!0}),zd(`avatar`,`media`)]},{name:`faq`,label:`FAQ`,fields:[zd(`title`,`text`,{localized:!0}),zd(`items`,`json`,{required:!0,localized:!0})]},{name:`stats`,label:`Statistiques`,fields:[zd(`title`,`text`,{localized:!0}),zd(`items`,`json`,{required:!0,localized:!0})]},{name:`logos`,label:`Logos`,fields:[zd(`title`,`text`,{localized:!0}),zd(`items`,`json`,{required:!0})]},{name:`collectionList`,label:`Liste de contenus`,fields:[zd(`title`,`text`,{localized:!0}),zd(`collection`,`text`,{required:!0}),zd(`filter`,`json`),zd(`sort`,`json`),zd(`limit`,`number`),zd(`layout`,`select`,{required:!0,options:Bd([`list`,`grid`,`carousel`])})]},{name:`embed`,label:`Contenu externe`,fields:[zd(`provider`,`select`,{required:!0,options:Bd([`youtube`,`vimeo`,`dailymotion`,`spotify`,`soundcloud`,`bluesky`,`mastodon`,`other`])}),zd(`url`,`text`,{required:!0}),zd(`ratio`,`select`,{options:Bd(Vd)}),zd(`consentRequired`,`boolean`,{required:!0})]}];function Ud(e){return Hd.find(t=>t.name===e)}var Wd=0;function Gd(){return Wd+=1,`b${Date.now().toString(36)}${Wd.toString(36)}`}function Kd({id:e,field:t,children:n}){let r=t.admin?.label??t.name;return(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsxs)(`label`,{htmlFor:e,children:[r,t.required&&(0,B.jsxs)(`span`,{"aria-hidden":`true`,className:`field__required`,children:[` `,`*`]})]}),n,t.admin?.help!==void 0&&(0,B.jsx)(`p`,{className:`field__help`,children:t.admin.help})]})}function qd({id:e,field:t,value:n,onChange:r,disabled:i=!1}){let{t:a}=Vi(),o=n??[],s=(0,M.useId)();function c(e,t){r(o.map((n,r)=>r===e?t:n))}function l(e){r(o.filter((t,n)=>n!==e))}function u(e,t){let n=e+t;if(n<0||n>=o.length)return;let i=[...o],[a]=i.splice(e,1);a!==void 0&&(i.splice(n,0,a),r(i))}function d(e){Ud(e)!==void 0&&r([...o,{key:Gd(),type:e,data:{}}])}return(0,B.jsxs)(Kd,{id:e,field:t,children:[(0,B.jsx)(`ol`,{className:`blocks-field`,"aria-label":t.admin?.label??t.name,children:o.map((t,n)=>{let r=Ud(t.type),s=`${e}-${t.key}`;return(0,B.jsxs)(`li`,{className:`blocks-field__item`,children:[(0,B.jsxs)(`div`,{className:`blocks-field__item-header`,children:[(0,B.jsx)(`span`,{children:r?.label??a(`fields.blocksUnknownLabel`,{type:t.type})}),(0,B.jsxs)(`div`,{className:`blocks-field__item-controls`,children:[(0,B.jsx)(`button`,{type:`button`,disabled:i||n===0,"aria-label":a(`fields.blocksMoveUp`,{position:n+1}),onClick:()=>u(n,-1),children:`↑`}),(0,B.jsx)(`button`,{type:`button`,disabled:i||n===o.length-1,"aria-label":a(`fields.blocksMoveDown`,{position:n+1}),onClick:()=>u(n,1),children:`↓`}),(0,B.jsx)(`button`,{type:`button`,disabled:i,"aria-label":a(`fields.blocksRemove`,{position:n+1}),onClick:()=>l(n),children:a(`fields.mediaRemove`)})]})]}),r===void 0?(0,B.jsx)(`p`,{role:`alert`,children:a(`fields.blocksUnrecognized`,{type:t.type})}):(0,B.jsx)(eS,{idPrefix:s,definition:r,data:t.data,disabled:i,onChange:e=>c(n,{...t,data:e})})]},t.key)})}),!i&&(0,B.jsxs)(`div`,{className:`blocks-field__add`,children:[(0,B.jsx)(`label`,{htmlFor:s,children:a(`fields.blocksAddLabel`)}),(0,B.jsxs)(`select`,{id:s,value:``,onChange:e=>{e.target.value!==``&&d(e.target.value)},children:[(0,B.jsx)(`option`,{value:``,disabled:!0,children:`—`}),Hd.map(e=>(0,B.jsx)(`option`,{value:e.name,children:e.label},e.name))]})]})]})}function Jd({id:e,field:t,value:n,onChange:r,disabled:i}){return(0,B.jsxs)(`div`,{className:`field field--boolean`,children:[(0,B.jsxs)(`label`,{htmlFor:e,children:[(0,B.jsx)(`input`,{id:e,type:`checkbox`,disabled:i,checked:n,onChange:e=>r(e.target.checked)}),Yd(t)]}),t.admin?.help!==void 0&&(0,B.jsx)(`p`,{className:`field__help`,children:t.admin.help})]})}function Yd(e){return e.admin?.label??e.name}function Xd({id:e,field:t,value:n,onChange:r,disabled:i}){let a=/^#[0-9a-fA-F]{6}$/u.test(n)?n:`#000000`;return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsxs)(`div`,{className:`field__color`,children:[(0,B.jsx)(`input`,{type:`color`,"aria-hidden":`true`,tabIndex:-1,disabled:i,value:a,onChange:e=>r(e.target.value)}),(0,B.jsx)(`input`,{id:e,type:`text`,pattern:`#[0-9a-fA-F]{3}([0-9a-fA-F]{3}([0-9a-fA-F]{2})?)?`,required:t.required,disabled:i,value:n,onChange:e=>r(e.target.value)})]})})}function Zd({id:e,field:t,value:n,onChange:r,disabled:i}){return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`input`,{id:e,type:`date`,required:t.required,disabled:i,value:n,onChange:e=>r(e.target.value)})})}function Qd(e){if(e===``)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function $d(e){if(e===``)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString()}function ef({id:e,field:t,value:n,onChange:r,disabled:i}){return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`input`,{id:e,type:`datetime-local`,required:t.required,disabled:i,value:Qd(n),onChange:e=>r($d(e.target.value))})})}function tf({id:e,field:t,value:n,onChange:r,disabled:i}){let{t:a}=Vi(),o=n?.lat??null,s=n?.lng??null;function c(e){r(e===null&&s===null?null:{lat:e??0,lng:s??0})}function l(e){r(o===null&&e===null?null:{lat:o??0,lng:e??0})}return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsxs)(`div`,{className:`field__geo`,children:[(0,B.jsx)(`label`,{htmlFor:`${e}-lat`,children:a(`fields.geoLat`)}),(0,B.jsx)(`input`,{id:`${e}-lat`,type:`number`,step:`any`,min:-90,max:90,disabled:i,value:o??``,onChange:e=>c(e.target.value===``?null:Number(e.target.value))}),(0,B.jsx)(`label`,{htmlFor:`${e}-lng`,children:a(`fields.geoLng`)}),(0,B.jsx)(`input`,{id:`${e}-lng`,type:`number`,step:`any`,min:-180,max:180,disabled:i,value:s??``,onChange:e=>l(e.target.value===``?null:Number(e.target.value))})]})})}function nf({id:e,field:t,value:n,onChange:r,disabled:i}){let{t:a}=Vi(),[o,s]=(0,M.useState)(()=>JSON.stringify(n,null,2)??``),[c,l]=(0,M.useState)(null);function u(e){s(e);try{r(JSON.parse(e)),l(null)}catch{l(a(`fields.jsonInvalid`))}}return(0,B.jsxs)(Kd,{id:e,field:t,children:[(0,B.jsx)(`textarea`,{id:e,required:t.required,disabled:i,value:o,onChange:e=>u(e.target.value),"aria-invalid":c!==null}),c!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`field__error`,children:c})]})}function rf(e){return e.startsWith(`image/`)?`image`:e.startsWith(`video/`)?`video`:e.startsWith(`audio/`)?`audio`:`file`}function af(e){return new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error(`Could not read the file.`)),r.onload=()=>{let e=r.result;if(typeof e!=`string`){n(Error(`Could not read the file.`));return}let i=e.indexOf(`,`);t(i===-1?e:e.slice(i+1))},r.readAsDataURL(e)})}async function of(e,t={}){let n=new URLSearchParams;t.kind!==void 0&&n.set(`kind`,t.kind),t.cursor!==void 0&&n.set(`after`,t.cursor),t.limit!==void 0&&n.set(`limit`,String(t.limit));let r=n.toString(),i=await tr(`/api/media${r===``?``:`?${r}`}`,{headers:z(e)});return{items:i.data,hasMore:i.page.hasMore,nextCursor:i.page.nextCursor}}function sf(e,t){return R(`/api/media`,{method:`POST`,headers:z(e),body:JSON.stringify(t)})}function cf(e,t){return R(`/api/media/${encodeURIComponent(t)}`,{headers:z(e)})}function lf(e,t,n){return R(`/api/media/${encodeURIComponent(t)}`,{method:`PATCH`,headers:z(e),body:JSON.stringify(n)})}async function uf(e,t){await R(`/api/media/${encodeURIComponent(t)}`,{method:`DELETE`,headers:z(e)})}async function df(e,t){let n=await fetch(`${er}/api/media/${encodeURIComponent(t)}/file`,{headers:z(e)});if(!n.ok){let e=await n.json().catch(()=>null);throw new L(e?.error?.code??`INTERNAL`,e?.error?.message??`Could not load the file.`,e?.error?.hint)}return URL.createObjectURL(await n.blob())}function ff({token:e,id:t,alt:n,previewable:r}){let[i,a]=(0,M.useState)(null),[o,s]=(0,M.useState)(!1);return(0,M.useEffect)(()=>{if(!r)return;let n=!1,i=null;return df(e,t).then(e=>{if(n){URL.revokeObjectURL(e);return}i=e,a(e)}).catch(()=>{n||s(!0)}),()=>{n=!0,i!==null&&URL.revokeObjectURL(i)}},[e,t,r]),!r||o?(0,B.jsx)(`span`,{className:`media-thumbnail media-thumbnail--placeholder`,"aria-hidden":`true`}):i===null?(0,B.jsx)(`span`,{className:`media-thumbnail media-thumbnail--loading`,"aria-hidden":`true`}):(0,B.jsx)(`img`,{className:`media-thumbnail`,src:i,alt:n})}function pf({id:e,field:t,value:n,onChange:r,disabled:i=!1}){let{t:a}=Vi(),o=vr(),s=o.state.status===`authenticated`?o.state.token:null,[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)([]),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(null);(0,M.useEffect)(()=>{if(s===null||n===null||n===``){p(null);return}let e=!1;return cf(s,n).then(t=>{e||p(t)}).catch(()=>{e||p(null)}),()=>{e=!0}},[s,n]);async function g(){if(s!==null){h(null);try{let e=await of(s,{kind:`image`});d(e.items),l(!0)}catch(e){h(e instanceof L?e.message:a(`media.loadError`))}}}return s===null?(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`p`,{children:a(`common.loading`)})}):(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsxs)(`div`,{id:e,className:`media-field`,children:[n!==null&&n!==``&&f!==null&&(0,B.jsxs)(`div`,{className:`media-field__selected`,children:[(0,B.jsx)(ff,{token:s,id:f.id,alt:f.alt,previewable:f.kind===`image`}),(0,B.jsx)(`span`,{children:f.filename})]}),!i&&(0,B.jsxs)(`div`,{className:`media-field__actions`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>void g(),children:a(`fields.mediaChoose`)}),n!==null&&n!==``&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>r(null),children:a(`fields.mediaRemove`)})]}),m!==null&&(0,B.jsx)(`p`,{role:`alert`,children:m}),c&&(0,B.jsxs)(`ul`,{className:`media-field__picker`,children:[u.map(e=>(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>{r(e.id),p(e),l(!1)},children:[(0,B.jsx)(ff,{token:s,id:e.id,alt:e.alt,previewable:!0}),(0,B.jsx)(`span`,{children:e.filename})]})},e.id)),u.length===0&&(0,B.jsx)(`li`,{children:a(`fields.mediaNoImages`)}),(0,B.jsx)(`li`,{children:(0,B.jsx)(`button`,{type:`button`,onClick:()=>l(!1),children:a(`common.cancel`)})})]})]})})}function mf({id:e,field:t,value:n,onChange:r,disabled:i}){let a=t.options;return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`input`,{id:e,type:`number`,required:t.required,min:a.min,max:a.max,step:a.integer===!0?1:`any`,disabled:i,value:n??``,onChange:e=>r(e.target.value===``?null:Number(e.target.value))})})}function hf({id:e,field:t}){let{t:n}=Vi(),r=t.options;return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`p`,{className:`field__placeholder`,children:n(`fields.relationPlaceholder`,{target:r.to??`?`})})})}var gf={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=G.transform(n,t,{affinity:r});e.current=i,i??e.unref()}}},_f={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=Op.transform(n,t,{affinity:r});e.current=i,i??e.unref()}}},vf={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=K.transform(n,t,{affinity:r});e.current=i,i??e.unref()}}},yf=new WeakMap,bf=new WeakMap,xf=new WeakMap,Sf=new WeakMap,Cf=new WeakMap,wf=new WeakMap,Tf=new WeakMap,G={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=G.levels(e,t);return r=n?r.slice(1):r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var i=e[r],a=t[r];if(typeof i!=`number`||typeof a!=`number`)throw Error(`Got non-numeric path index`);if(i!==a)break;n.push(i)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),a=e[n],o=t[n];return G.equals(r,i)&&a>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return G.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),a=e[n],o=t[n];return G.equals(r,i)&&a<o},equals(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return G.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&G.compare(e,t)===0},isBefore(e,t){return G.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&G.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&G.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&G.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&G.compare(e,t)===0},isPath(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&G.equals(n,r)},levels(e){for(var{reverse:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=0;r<=e.length;r++)n.push(e.slice(0,r));return t&&n.reverse(),n},next(e){if(e.length===0)throw Error(`Cannot get the next path of a root path [${e}], because it has no next index.`);var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case`insert_node`:case`remove_node`:case`merge_node`:case`split_node`:case`move_node`:return!0;default:return!1}},parent(e){if(e.length===0)throw Error(`Cannot get the parent path of the root path [${e}].`);return e.slice(0,-1)},previous(e){if(e.length===0)throw Error(`Cannot get the previous path of a root path [${e}], because it has no previous index.`);var t=e[e.length-1];if(t<=0)throw Error(`Cannot get the previous path of a first child path [${e}] because it would result in a negative index.`);return e.slice(0,-1).concat(t-1)},relative(e,t){if(!G.isAncestor(t,e)&&!G.equals(e,t))throw Error(`Cannot get the relative path of [${e}] inside ancestor [${t}], because it is not above or equal to the path.`);return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:i=`forward`}=n;if(e.length===0)return r;switch(t.type){case`insert_node`:var{path:a}=t;(G.equals(a,r)||G.endsBefore(a,r)||G.isAncestor(a,r))&&(r[a.length-1]+=1);break;case`remove_node`:var{path:o}=t;if(G.equals(o,r)||G.isAncestor(o,r))return null;G.endsBefore(o,r)&&--r[o.length-1];break;case`merge_node`:var{path:s,position:c}=t;G.equals(s,r)||G.endsBefore(s,r)?--r[s.length-1]:G.isAncestor(s,r)&&(--r[s.length-1],r[s.length]+=c);break;case`split_node`:var{path:l,position:u}=t;if(G.equals(l,r)){if(i===`forward`)r[r.length-1]+=1;else if(i!==`backward`)return null}else G.endsBefore(l,r)?r[l.length-1]+=1:G.isAncestor(l,r)&&e[l.length]>=u&&(r[l.length-1]+=1,r[l.length]-=u);break;case`move_node`:var{path:d,newPath:f}=t;if(G.equals(d,f))return r;if(G.isAncestor(d,r)||G.equals(d,r)){var p=f.slice();return G.endsBefore(d,f)&&d.length<f.length&&--p[d.length-1],p.concat(r.slice(d.length))}G.isSibling(d,f)&&(G.isAncestor(f,r)||G.equals(f,r))?G.endsBefore(d,r)?--r[d.length-1]:r[d.length-1]+=1:G.endsBefore(f,r)||G.equals(f,r)||G.isAncestor(f,r)?(G.endsBefore(d,r)&&--r[d.length-1],r[f.length-1]+=1):G.endsBefore(d,r)&&(G.equals(f,r)&&(r[f.length-1]+=1),--r[d.length-1])}return r}};function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ef(e)}function Df(e,t){if(Ef(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Of(e){var t=Df(e,`string`);return Ef(t)===`symbol`?t:String(t)}function kf(e,t,n){return t=Of(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Af(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function jf(e,t){if(e==null)return{};var n=Af(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Mf=[`anchor`,`focus`];function Nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Nf(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var K={edges(e){var{reverse:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{anchor:n,focus:r}=e;return K.isBackward(e)===t?[n,r]:[r,n]},end(e){var[,t]=K.edges(e);return t},equals(e,t){return Op.equals(e.anchor,t.anchor)&&Op.equals(e.focus,t.focus)},surrounds(e,t){var n=K.intersection(e,t);return n?K.equals(n,t):!1},includes(e,t){if(X.isRange(t)){if(K.includes(e,t.anchor)||K.includes(e,t.focus))return!0;var[n,r]=K.edges(e),[i,a]=K.edges(t);return Op.isBefore(n,i)&&Op.isAfter(r,a)}var[o,s]=K.edges(e),c=!1,l=!1;return X.isPoint(t)?(c=Op.compare(t,o)>=0,l=Op.compare(t,s)<=0):(c=G.compare(t,o.path)>=0,l=G.compare(t,s.path)<=0),c&&l},intersection(e,t){var{anchor:n,focus:r}=e,i=jf(e,Mf),[a,o]=K.edges(e),[s,c]=K.edges(t),l=Op.isBefore(a,s)?s:a,u=Op.isBefore(o,c)?o:c;return Op.isBefore(u,l)?null:Pf({anchor:l,focus:u},i)},isBackward(e){var{anchor:t,focus:n}=e;return Op.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return Op.equals(t,n)},isExpanded(e){return!K.isCollapsed(e)},isForward(e){return!K.isBackward(e)},isRange(e){return Wf(e)&&Op.isPoint(e.anchor)&&Op.isPoint(e.focus)},*points(e){yield[e.anchor,`anchor`],yield[e.focus,`focus`]},start(e){var[t]=K.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===null)return null;var{affinity:r=`inward`}=n,i,a;if(r===`inward`){var o=K.isCollapsed(e);K.isForward(e)?(i=`forward`,a=o?i:`backward`):(i=`backward`,a=o?i:`forward`)}else r===`outward`?K.isForward(e)?(i=`backward`,a=`forward`):(i=`forward`,a=`backward`):(i=r,a=r);var s=Op.transform(e.anchor,t,{affinity:i}),c=Op.transform(e.focus,t,{affinity:a});return!s||!c?null:{anchor:s,focus:c}}},Ff=function(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return!Wf(e)||typeof e.apply==`function`?!1:t?q.isNodeList(e.children):Array.isArray(e.children)},If={isAncestor(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Wf(e)&&q.isNodeList(e.children,{deep:t})},isElement:Ff,isElementList(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)&&e.every(e=>If.isElement(e,{deep:t}))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`type`;return Ff(e)&&e[n]===t},matches(e,t){for(var n in t)if(n!==`children`&&e[n]!==t[n])return!1;return!0}},Lf=[`text`],Rf=[`children`];function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zf(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var q={ancestor(e,t){var n=q.get(e,t);if(q.isText(n))throw Error(`Cannot get the ancestor node at path [${t}] because it refers to a text node instead: ${Ap.stringify(n)}`);return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of G.ancestors(t,n))yield[q.ancestor(e,r),r]}()},child(e,t){if(q.isText(e))throw Error(`Cannot get the child of a text node: ${Ap.stringify(e)}`);if(typeof t!=`number`)throw Error(`Expected index to be a number`);var n=e.children[t];if(n==null)throw Error(`Cannot get child at index \`${t}\` in node: ${Ap.stringify(e)}`);return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=q.ancestor(e,t),{children:a}=i,o=r?a.length-1:0;r?o>=0:o<a.length;)yield[q.child(i,o),t.concat(o)],o=r?o-1:o+1}()},common(e,t,n){var r=G.common(t,n);return[q.get(e,r),r]},descendant(e,t){var n=q.get(e,t);if(q.isEditor(n))throw Error(`Cannot get the descendant node at path [${t}] because it refers to the root editor node instead: ${Ap.stringify(n)}`);return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of q.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of q.nodes(e,t))q.isElement(n)&&(yield[n,r])}()},extractProps(e){if(q.isText(e)){var{text:t}=e,n=jf(e,Lf);return n}var{children:r}=e,n=jf(e,Rf);return n},first(e,t){for(var n=t.slice(),r=q.get(e,n);r&&!(q.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){var n={children:e.children},[r,i]=K.edges(t),a=q.nodes(n,{reverse:!0,pass:e=>{var[,n]=e;return!K.includes(t,n)}}),o=function(){if(!K.includes(t,s)){var e=s[s.length-1];Hp(n,G.parent(s),t=>Bp(t,e,1))}G.equals(s,i.path)&&Up(n,s,e=>{var t=e.text.slice(0,i.offset);return Bf(Bf({},e),{},{text:t})}),G.equals(s,r.path)&&Up(n,s,e=>{var t=e.text.slice(r.offset);return Bf(Bf({},e),{},{text:t})})};for(var[,s]of a)o();return n.children},get(e,t){var n=q.getIf(e,t);if(n===void 0)throw Error(`Cannot find a descendant at path [${t}] in node: ${Ap.stringify(e)}`);return n},getIf(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(typeof i!=`number`)throw Error(`Got non-numeric path index`);if(q.isText(n)||!n.children[i])return;n=n.children[i]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(typeof i!=`number`)throw Error(`Got non-numeric path index`);if(q.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isAncestor(e){return!q.isText(e)},isEditor(e){return typeof e.apply==`function`},isElement(e){return Array.isArray(e.children)&&typeof e.apply!=`function`},isNode(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fp.isText(e)||If.isElement(e,{deep:t})||Y.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)&&e.every(e=>q.isNode(e,{deep:t}))},isText(e){return typeof e.text==`string`},last(e,t){for(var n=t.slice(),r=q.get(e,n);r&&!(q.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=q.get(e,t);if(!q.isText(n))throw Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Ap.stringify(n)}`);return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of G.levels(t,n))yield[q.get(e,r),r]}()},matches(e,t){return q.isElement(e)&&If.isElementProps(t)&&If.matches(e,t)||q.isText(e)&&Fp.isTextProps(t)&&Fp.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:i=[],to:a}=t,o=new Set,s=[],c=e;!(a&&(r?G.isBefore(s,a):G.isAfter(s,a)));){if(o.has(c)||(yield[c,s]),!o.has(c)&&!q.isText(c)&&c.children.length!==0&&(n==null||n([c,s])===!1)){o.add(c);var l=r?c.children.length-1:0;G.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),c=q.get(e,s);continue}if(s.length===0)break;if(!r){var u=G.next(s);if(q.has(e,u)){s=u,c=q.get(e,s);continue}}if(r&&s[s.length-1]!==0){s=G.previous(s),c=q.get(e,s);continue}s=G.parent(s),c=q.get(e,s),o.add(c)}}()},parent(e,t){var n=G.parent(t),r=q.get(e,n);if(q.isText(r))throw Error(`Cannot get the parent of path [${t}] because it does not exist in the root.`);return r},string(e){return q.isText(e)?e.text:e.children.map(q.string).join(``)},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of q.nodes(e,t))q.isText(n)&&(yield[n,r])}()}};function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vf(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Uf={isNodeOperation(e){return Uf.isOperation(e)&&e.type.endsWith(`_node`)},isOperation(e){if(!Wf(e))return!1;switch(e.type){case`insert_node`:return G.isPath(e.path)&&q.isNode(e.node);case`insert_text`:return typeof e.offset==`number`&&typeof e.text==`string`&&G.isPath(e.path);case`merge_node`:return typeof e.position==`number`&&G.isPath(e.path)&&Wf(e.properties);case`move_node`:return G.isPath(e.path)&&G.isPath(e.newPath);case`remove_node`:return G.isPath(e.path)&&q.isNode(e.node);case`remove_text`:return typeof e.offset==`number`&&typeof e.text==`string`&&G.isPath(e.path);case`set_node`:return G.isPath(e.path)&&Wf(e.properties)&&Wf(e.newProperties);case`set_selection`:return e.properties===null&&K.isRange(e.newProperties)||e.newProperties===null&&K.isRange(e.properties)||Wf(e.properties)&&Wf(e.newProperties);case`split_node`:return G.isPath(e.path)&&typeof e.position==`number`&&Wf(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(e=>Uf.isOperation(e))},isSelectionOperation(e){return Uf.isOperation(e)&&e.type.endsWith(`_selection`)},isTextOperation(e){return Uf.isOperation(e)&&e.type.endsWith(`_text`)},inverse(e){switch(e.type){case`insert_node`:return Hf(Hf({},e),{},{type:`remove_node`});case`insert_text`:return Hf(Hf({},e),{},{type:`remove_text`});case`merge_node`:return Hf(Hf({},e),{},{type:`split_node`,path:G.previous(e.path)});case`move_node`:var{newPath:t,path:n}=e;if(G.equals(t,n))return e;if(G.isSibling(n,t))return Hf(Hf({},e),{},{path:t,newPath:n});var r=G.transform(n,e),i=G.transform(G.next(n),e);return Hf(Hf({},e),{},{path:r,newPath:i});case`remove_node`:return Hf(Hf({},e),{},{type:`insert_node`});case`remove_text`:return Hf(Hf({},e),{},{type:`insert_text`});case`set_node`:var{properties:a,newProperties:o}=e;return Hf(Hf({},e),{},{properties:o,newProperties:a});case`set_selection`:var{properties:s,newProperties:c}=e;return s==null?Hf(Hf({},e),{},{properties:c,newProperties:null}):c==null?Hf(Hf({},e),{},{properties:null,newProperties:s}):Hf(Hf({},e),{},{properties:c,newProperties:s});case`split_node`:return Hf(Hf({},e),{},{type:`merge_node`,path:G.next(e.path)})}}},Wf=e=>typeof e==`object`&&!!e,Gf=(e,t)=>{if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gf(e[n],t[n]))return!1;return!0}if(Wf(e)&&Wf(t)){for(var r in e)if(!Gf(Object.hasOwn(e,r)?e[r]:void 0,Object.hasOwn(t,r)?t[r]:void 0))return!1;for(var i in t)if(e[i]===void 0&&t[i]!==void 0)return!1;return!0}return e===t},Kf=e=>e.selection?e.selection:e.children.length>0?Y.end(e,[]):[0],qf=(e,t)=>{var[n]=Y.node(e,t);return e=>e===n},Jf=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!t,r=t?tp(e):e,i=J.None,a=J.None,o=0,s=null,c=null,l=null;for(var u of r){var d=u.codePointAt(0);if(!d)break;var f=gp(u,d);if([i,a]=n?[a,f]:[f,i],_p(i,J.ZWJ)&&_p(a,J.ExtPict)&&(s=xp(n?e.substring(0,o):e.substring(0,e.length-o)),!s)||_p(i,J.RI)&&_p(a,J.RI)&&(c=c===null?n?!0:Tp(e.substring(0,e.length-o)):!c,!c)||_p(i,J.InCBLinker|J.InCBExtend)&&_p(a,J.InCBConsonant)&&(l=Cp(n?e.substring(0,o):e.substring(0,e.length-o)),!l)||i!==J.None&&a!==J.None&&yp(i,a))break;o+=u.length}return o||1},Yf=/\s/,Xf=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Zf=/['\u2018\u2019]/,Qf=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=0,r=!1;e.length>0;){var i=Jf(e,t),[a,o]=$f(e,i,t);if(ep(a,o,t))r=!0,n+=i;else if(!r)n+=i;else break;e=o}return n},$f=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},ep=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(Yf.test(t))return!1;if(Zf.test(t)){var[i,a]=$f(n,Jf(n,r),r);if(e(i,a,r))return!0}return!Xf.test(t)},tp=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(rp(r.charCodeAt(0))){var i=e.charAt(t-n-1);if(np(i.charCodeAt(0))){yield i+r,n++;continue}}yield r}},np=e=>e>=55296&&e<=56319,rp=e=>e>=56320&&e<=57343,J;(function(e){e[e.None=0]=`None`,e[e.Extend=1]=`Extend`,e[e.ZWJ=2]=`ZWJ`,e[e.RI=4]=`RI`,e[e.Prepend=8]=`Prepend`,e[e.SpacingMark=16]=`SpacingMark`,e[e.L=32]=`L`,e[e.V=64]=`V`,e[e.T=128]=`T`,e[e.LV=256]=`LV`,e[e.LVT=512]=`LVT`,e[e.ExtPict=1024]=`ExtPict`,e[e.Any=2048]=`Any`,e[e.InCBConsonant=4096]=`InCBConsonant`,e[e.InCBExtend=8192]=`InCBExtend`,e[e.InCBLinker=16384]=`InCBLinker`})(J||={});var ip=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ap=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,op=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,sp=/^[\u1100-\u115F\uA960-\uA97C]$/,cp=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,lp=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,up=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,dp=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,fp=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,pp=/^(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])$/,mp=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D1\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42\u1B43\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAA\u1BAC\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD32\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE\uDFCF\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3D\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF41\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,hp=/^(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)$/,gp=(e,t)=>{var n=J.Any;return e.search(ip)!==-1&&(n|=J.Extend),t===8205&&(n|=J.ZWJ),t>=127462&&t<=127487&&(n|=J.RI),e.search(ap)!==-1&&(n|=J.Prepend),e.search(op)!==-1&&(n|=J.SpacingMark),e.search(sp)!==-1&&(n|=J.L),e.search(cp)!==-1&&(n|=J.V),e.search(lp)!==-1&&(n|=J.T),e.search(up)!==-1&&(n|=J.LV),e.search(dp)!==-1&&(n|=J.LVT),e.search(fp)!==-1&&(n|=J.ExtPict),e.search(pp)!==-1&&(n|=J.InCBConsonant),e.search(mp)!==-1&&(n|=J.InCBExtend),e.search(hp)!==-1&&(n|=J.InCBLinker),n};function _p(e,t){return(e&t)!==0}var vp=[[J.L,J.L|J.V|J.LV|J.LVT],[J.LV|J.V,J.V|J.T],[J.LVT|J.T,J.T],[J.Any,J.Extend|J.ZWJ],[J.Any,J.SpacingMark],[J.Prepend,J.Any],[J.InCBLinker|J.InCBExtend,J.InCBConsonant],[J.ZWJ,J.ExtPict],[J.RI,J.RI]];function yp(e,t){return vp.findIndex(n=>_p(e,n[0])&&_p(t,n[1]))===-1}var bp=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,xp=e=>e.search(bp)!==-1,Sp=/(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*$/,Cp=e=>e.search(Sp)!==-1,wp=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Tp=e=>{var t=e.match(wp);return t!==null&&t[0].length/2%2==1},Y={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var{unit:t=`character`}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e.deleteBackward(t)},deleteForward(e){var{unit:t=`character`}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e.deleteForward(t)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor:function(e){var{deep:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Wf(e)?typeof e.above==`function`&&typeof e.addMark==`function`&&typeof e.after==`function`&&typeof e.apply==`function`&&typeof e.before==`function`&&typeof e.collapse==`function`&&typeof e.delete==`function`&&typeof e.deleteBackward==`function`&&typeof e.deleteForward==`function`&&typeof e.deleteFragment==`function`&&typeof e.deselect==`function`&&typeof e.edges==`function`&&typeof e.elementReadOnly==`function`&&typeof e.end==`function`&&typeof e.first==`function`&&typeof e.fragment==`function`&&typeof e.getDirtyPaths==`function`&&typeof e.getFragment==`function`&&typeof e.getMarks==`function`&&typeof e.hasBlocks==`function`&&typeof e.hasInlines==`function`&&typeof e.hasPath==`function`&&typeof e.hasTexts==`function`&&typeof e.insertBreak==`function`&&typeof e.insertFragment==`function`&&typeof e.insertNode==`function`&&typeof e.insertNodes==`function`&&typeof e.insertSoftBreak==`function`&&typeof e.insertText==`function`&&typeof e.isBlock==`function`&&typeof e.isEdge==`function`&&typeof e.isElementReadOnly==`function`&&typeof e.isEmpty==`function`&&typeof e.isEnd==`function`&&typeof e.isInline==`function`&&typeof e.isNormalizing==`function`&&typeof e.isSelectable==`function`&&typeof e.isStart==`function`&&typeof e.isVoid==`function`&&typeof e.last==`function`&&typeof e.leaf==`function`&&typeof e.levels==`function`&&typeof e.liftNodes==`function`&&typeof e.markableVoid==`function`&&typeof e.mergeNodes==`function`&&typeof e.move==`function`&&typeof e.moveNodes==`function`&&typeof e.next==`function`&&typeof e.node==`function`&&typeof e.nodes==`function`&&typeof e.normalize==`function`&&typeof e.normalizeNode==`function`&&typeof e.onChange==`function`&&typeof e.parent==`function`&&typeof e.path==`function`&&typeof e.pathRef==`function`&&typeof e.pathRefs==`function`&&typeof e.point==`function`&&typeof e.pointRef==`function`&&typeof e.pointRefs==`function`&&typeof e.positions==`function`&&typeof e.previous==`function`&&typeof e.range==`function`&&typeof e.rangeRef==`function`&&typeof e.rangeRefs==`function`&&typeof e.removeMark==`function`&&typeof e.removeNodes==`function`&&typeof e.select==`function`&&typeof e.setNodes==`function`&&typeof e.setNormalizing==`function`&&typeof e.setPoint==`function`&&typeof e.setSelection==`function`&&typeof e.shouldMergeNodesRemovePrevNode==`function`&&typeof e.shouldNormalize==`function`&&typeof e.splitNodes==`function`&&typeof e.start==`function`&&typeof e.string==`function`&&typeof e.unhangRange==`function`&&typeof e.unsetNodes==`function`&&typeof e.unwrapNodes==`function`&&typeof e.void==`function`&&typeof e.withoutNormalizing==`function`&&typeof e.wrapNodes==`function`&&(e.marks===null||Wf(e.marks))&&(e.selection===null||K.isRange(e.selection))&&(t?q.isNodeList(e.children)&&Uf.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations)):!1},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},X={isLocation(e){return G.isPath(e)||Op.isPoint(e)||K.isRange(e)},isPath(e){return Array.isArray(e)},isPoint(e){return`offset`in e},isRange(e){return`anchor`in e},isSpan(e){return Array.isArray(e)&&Array.isArray(e[0])}};function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ep(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Op={compare(e,t){var n=G.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:+(e.offset>t.offset):n},isAfter(e,t){return Op.compare(e,t)===1},isBefore(e,t){return Op.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&G.equals(e.path,t.path)},isPoint(e){return Wf(e)&&typeof e.offset==`number`&&G.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===null)return null;var{affinity:r=`forward`}=n,{path:i,offset:a}=e;switch(t.type){case`insert_node`:case`move_node`:i=G.transform(i,t,n);break;case`insert_text`:G.equals(t.path,i)&&(t.offset<a||t.offset===a&&r===`forward`)&&(a+=t.text.length);break;case`merge_node`:G.equals(t.path,i)&&(a+=t.position),i=G.transform(i,t,n);break;case`remove_text`:G.equals(t.path,i)&&t.offset<=a&&(a-=Math.min(a-t.offset,t.text.length));break;case`remove_node`:if(G.equals(t.path,i)||G.isAncestor(t.path,i))return null;i=G.transform(i,t,n);break;case`split_node`:if(G.equals(t.path,i)){if(t.position===a&&r==null)return null;(t.position<a||t.position===a&&r===`forward`)&&(a-=t.position,i=G.transform(i,t,Dp(Dp({},n),{},{affinity:`forward`})))}else i=G.transform(i,t,n);break;default:return e}return{path:i,offset:a}}},kp=void 0,Ap={setScrubber(e){kp=e},stringify(e){return JSON.stringify(e,kp)}},jp=[`text`],Mp=[`anchor`,`focus`,`merge`];function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Np(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fp={equals(e,t){var{loose:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function r(e){var{text:t}=e;return jf(e,jp)}return Gf(n?r(e):e,n?r(t):t)},isText(e){return Wf(e)&&typeof e.text==`string`},isTextList(e){return Array.isArray(e)&&e.every(e=>Fp.isText(e))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!==`text`&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[{leaf:Pp({},e)}];for(var r of t){var{anchor:i,focus:a,merge:o}=r,s=jf(r,Mp),[c,l]=K.edges(r),u=[],d=0,f=c.offset,p=l.offset,m=o??Object.assign;for(var{leaf:h}of n){var{length:g}=h.text,_=d;if(d+=g,f<=_&&d<=p){m(h,s),u.push({leaf:h});continue}if(f!==p&&(f===d||p===_)||f>d||p<_||p===_&&_!==0){u.push({leaf:h});continue}var v=h,y=void 0,b=void 0;if(p<d){var x=p-_;b={leaf:Pp(Pp({},v),{},{text:v.text.slice(x)})},v=Pp(Pp({},v),{},{text:v.text.slice(0,x)})}if(f>_){var S=f-_;y={leaf:Pp(Pp({},v),{},{text:v.text.slice(0,S)})},v=Pp(Pp({},v),{},{text:v.text.slice(S)})}m(v,s),y&&u.push(y),u.push({leaf:v}),b&&u.push(b)}n=u}if(n.length>1){var C=0;for(var[w,T]of n.entries()){var E=C,D=E+T.leaf.text.length,O={start:E,end:D};w===0&&(O.isFirst=!0),w===n.length-1&&(O.isLast=!0),T.position=O,C=D}}return n}};function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ip(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Rp=function(e,t){var n=[...arguments].slice(2);return[...e.slice(0,t),...n,...e.slice(t)]},zp=function(e,t,n){var r=[...arguments].slice(3);return[...e.slice(0,t),...r,...e.slice(t+n)]},Bp=zp,Vp=(e,t,n)=>{if(t.length===0)throw Error(`Cannot modify the editor`);for(var r=q.get(e,t),i=t.slice(),a=n(r);i.length>1;){var o=i.pop(),s=q.get(e,i);a=Lp(Lp({},s),{},{children:zp(s.children,o,1,a)})}var c=i.pop();e.children=zp(e.children,c,1,a)},Hp=(e,t,n)=>{t.length===0?e.children=n(e.children):Vp(e,t,e=>{if(q.isText(e))throw Error(`Cannot get the element at path [${t}] because it refers to a leaf node: ${Ap.stringify(e)}`);return Lp(Lp({},e),{},{children:n(e.children)})})},Up=(e,t,n)=>Vp(e,t,e=>{if(!q.isText(e))throw Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Ap.stringify(e)}`);return n(e)});function Wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wp(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Kp=[`children`,`text`,...Object.getOwnPropertyNames(Object.prototype)],qp=Object.getOwnPropertyNames(Object.prototype),Jp={transform(e,t){var n=!1;switch(t.type){case`insert_node`:var{path:r,node:i}=t;Hp(e,G.parent(r),e=>{var t=r[r.length-1];if(t>e.length)throw Error(`Cannot apply an "insert_node" operation at path [${r}] because the destination is past the end of the node.`);return Rp(e,t,i)}),n=!0;break;case`insert_text`:var{path:a,offset:o,text:s}=t;if(s.length===0)break;Up(e,a,e=>{var t=e.text.slice(0,o),n=e.text.slice(o);return Gp(Gp({},e),{},{text:t+s+n})}),n=!0;break;case`merge_node`:var{path:c}=t,l=c[c.length-1],u=G.previous(c),d=u[u.length-1];if(c.length===0)throw Error(`Cannot apply a "merge_node" operation at path [${c}] because the root node cannot be merged.`);if(typeof l!=`number`||typeof d!=`number`)throw Error(`Index must be number`);Hp(e,G.parent(c),e=>{var t=e[l],n=e[d],r;if(q.isText(t)&&q.isText(n))r=Gp(Gp({},n),{},{text:n.text+t.text});else if(q.isElement(t)&&q.isElement(n))r=Gp(Gp({},n),{},{children:n.children.concat(t.children)});else throw Error(`Cannot apply a "merge_node" operation at path [${c}] to nodes of different interfaces: ${Ap.stringify(t)} ${Ap.stringify(n)}`);return zp(e,d,2,r)}),n=!0;break;case`move_node`:var{path:f,newPath:p}=t,m=f[f.length-1];if(G.isAncestor(f,p))throw Error(`Cannot move a path [${f}] to new path [${p}] because the destination is inside itself.`);var h=q.get(e,f);Hp(e,G.parent(f),e=>Bp(e,m,1));var g=G.transform(f,t),_=g[g.length-1];Hp(e,G.parent(g),e=>Rp(e,_,h)),n=!0;break;case`remove_node`:var{path:v}=t,y=v[v.length-1];if(Hp(e,G.parent(v),e=>Bp(e,y,1)),e.selection){var b=Gp({},e.selection);for(var[x,S]of K.points(b)){var C=Op.transform(x,t);if(b!=null&&C!=null)b[S]=C;else{var w=void 0,T=void 0;for(var[E,D]of q.texts(e))if(G.compare(D,v)===-1)w=[E,D];else{T=[E,D];break}var O=!1;w&&T&&(O=G.isSibling(w[1],v)?!1:G.equals(T[1],v)?!0:G.common(w[1],v).length<G.common(T[1],v).length),w&&!O?b[S]={path:w[1],offset:w[0].text.length}:T?b[S]={path:T[1],offset:0}:b=null}}(!b||!K.equals(b,e.selection))&&(e.selection=b)}break;case`remove_text`:var{path:k,offset:A,text:j}=t;if(j.length===0)break;Up(e,k,e=>{var t=e.text.slice(0,A),n=e.text.slice(A+j.length);return Gp(Gp({},e),{},{text:t+n})}),n=!0;break;case`set_node`:var{path:M,properties:N,newProperties:ee}=t;if(M.length===0)throw Error(`Cannot set properties on the root node!`);Vp(e,M,e=>{var t=Gp({},e);for(var n in ee){if(Kp.includes(n))throw Error(`Cannot set the "${n}" property of nodes!`);var r=ee[n];if(n===`then`&&typeof r==`function`)throw Error(`Cannot set the "then" property of a node to a function`);r==null?delete t[n]:t[n]=r}for(var i in N)Object.hasOwn(ee,i)||delete t[i];return t});break;case`set_selection`:var{newProperties:te}=t;if(te==null){e.selection=null;break}if(e.selection==null){if(!(te.anchor&&te.focus))throw Error(`Cannot apply an incomplete "set_selection" operation properties ${Ap.stringify(te)} when there is no current selection.`);e.selection=Gp({},te);break}var P=Gp({},e.selection);for(var F in te){if(qp.includes(F))throw Error(`Cannot set the "${F}" property of the selection!`);var ne=te[F];if(F===`then`&&typeof ne==`function`)throw Error(`Cannot set the "then" property of the selection to a function`);if(ne==null){if(F===`anchor`||F===`focus`)throw Error(`Cannot remove the "${F}" selection property`);delete P[F]}else P[F]=ne}e.selection=P;break;case`split_node`:var{path:re,position:ie,properties:ae}=t,I=re[re.length-1];if(re.length===0)throw Error(`Cannot apply a "split_node" operation at path [${re}] because the root node cannot be split.`);if(typeof I!=`number`)throw Error(`Index must be number`);Hp(e,G.parent(re),e=>{var t=e[I],n,r;if(q.isText(t)){var i=t.text.slice(0,ie),a=t.text.slice(ie);n=Gp(Gp({},t),{},{text:i}),r={text:a}}else{var o=t.children.slice(0,ie),s=t.children.slice(ie);n=Gp(Gp({},t),{},{children:o}),r={children:s}}for(var c in ae){if(Kp.includes(c))throw Error(`Cannot set the "${c}" property of nodes!`);var l=ae[c];if(c===`then`&&typeof l==`function`)throw Error(`Cannot set the "then" property of a node to a function`);l!=null&&(r[c]=l)}return zp(e,I,1,n,r)}),n=!0}if(n&&e.selection){var oe=Gp({},e.selection);for(var[se,ce]of K.points(oe))oe[ce]=Op.transform(se,t);K.equals(oe,e.selection)||(e.selection=oe)}}},Yp={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},Xp={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},Zp={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=Kf(e)}=n;if(X.isPath(i)&&(i=Y.range(e,i)),X.isRange(i)){if(K.isCollapsed(i))i=i.anchor;else{var a=K.end(i);if(!r&&Y.void(e,{at:a}))return;var o=K.start(i),s=Y.pointRef(e,o),c=Y.pointRef(e,a);Z.delete(e,{at:i,voids:r});var l=s.unref(),u=c.unref();i=l||u,Z.setSelection(e,{anchor:i,focus:i})}}if(!(!r&&Y.void(e,{at:i})||Y.elementReadOnly(e,{at:i}))){var{path:d,offset:f}=i;t.length>0&&e.apply({type:`insert_text`,path:d,offset:f,text:t})}})}};function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Qp(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Z=$p($p($p($p({},Jp),Yp),Xp),Zp),em=new WeakMap,tm=e=>em.get(e)||!1,nm=(e,t,n)=>{var r=em.get(e)||!1;em.set(e,!0);try{t(),n()}finally{em.set(e,r)}};function rm(e,t,n){var r=yf.get(e)||[],i=bf.get(e)||new Set,a,o,s=e=>{if(e){var t=e.join(`,`);o.has(t)||(o.add(t),a.push(e))}};if(n){a=[],o=new Set;for(var c of r)s(n(c))}else a=r,o=i;for(var l of t)s(l);yf.set(e,a),bf.set(e,o)}var im=(e,t)=>{for(var n of Y.pathRefs(e))gf.transform(n,t);for(var r of Y.pointRefs(e))_f.transform(r,t);for(var i of Y.rangeRefs(e))vf.transform(i,t);if(!tm(e)){var a=G.operationCanTransformPath(t)?e=>G.transform(e,t):void 0;rm(e,e.getDirtyPaths(t),a)}Z.transform(e,t),e.operations.push(t),Y.normalize(e,{operation:t}),t.type===`set_selection`&&(e.marks=null),xf.get(e)||(xf.set(e,!0),Promise.resolve().then(()=>{xf.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},am=(e,t)=>{switch(t.type){case`insert_text`:case`remove_text`:case`set_node`:var{path:n}=t;return G.levels(n);case`insert_node`:var{node:r,path:i}=t,a=G.levels(i),o=q.isText(r)?[]:Array.from(q.nodes(r),e=>{var[,t]=e;return i.concat(t)});return[...a,...o];case`merge_node`:var{path:s}=t,c=G.ancestors(s),l=G.previous(s);return[...c,l];case`move_node`:var{path:u,newPath:d}=t;if(G.equals(u,d))return[];var f=[],p=[];for(var m of G.ancestors(u)){var h=G.transform(m,t);f.push(h)}for(var g of G.ancestors(d)){var _=G.transform(g,t);p.push(_)}var v=p[p.length-1],y=d[d.length-1],b=v.concat(y);return[...f,...p,b];case`remove_node`:var{path:x}=t;return[...G.ancestors(x)];case`split_node`:var{path:S}=t,C=G.levels(S),w=G.next(S);return[...C,w];default:return[]}},om=e=>{var{selection:t}=e;return t?q.fragment(e,t):[]},sm=(e,t,n)=>{var[r,i]=t;if(!q.isText(r)){`children`in r||(r.children=[]);var a=r;if(a!==e&&a.children.length===0&&(Z.insertNodes(e,{text:``},{at:i.concat(0),voids:!0}),a=q.get(e,i)),a!==e&&(e.isInline(a)||q.isText(a.children[0])||e.isInline(a.children[0])))for(var o=0;o<a.children.length;o++){var s=a.children[o],c=a.children[o-1];q.isText(s)?c!=null&&q.isText(c)&&(s.text===``?(Z.removeNodes(e,{at:i.concat(o),voids:!0}),a=q.get(e,i),o--):c.text===``?(Z.removeNodes(e,{at:i.concat(o-1),voids:!0}),a=q.get(e,i),o--):Fp.equals(s,c,{loose:!0})&&(Z.mergeNodes(e,{at:i.concat(o),voids:!0}),a=q.get(e,i),o--)):e.isInline(s)?((c==null||!q.isText(c))&&(Z.insertNodes(e,{text:``},{at:i.concat(o),voids:!0}),a=q.get(e,i),o++),o===a.children.length-1&&(Z.insertNodes(e,{text:``},{at:i.concat(o+1),voids:!0}),a=q.get(e,i),o++)):(Z.unwrapNodes(e,{at:i.concat(o),voids:!0}),a=q.get(e,i),o--)}else for(var l=0;l<a.children.length;l++){var u=a.children[l];(q.isText(u)||e.isInline(u))&&(n!=null&&n.fallbackElement?Z.wrapNodes(e,n.fallbackElement(),{at:i.concat(l),voids:!0}):Z.removeNodes(e,{at:i.concat(l),voids:!0}),a=q.get(e,i),l--)}}},cm=(e,t)=>{var{iteration:n,initialDirtyPathsLength:r}=t,i=r*42;if(n>i)throw Error(`Could not completely normalize the editor after ${i} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.`);return!0},lm=function(e){var{voids:t=!1,mode:n=`lowest`,at:r=e.selection,match:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r){var a=Y.path(e,r);if(!X.isRange(r)||G.equals(r.focus.path,r.anchor.path)){if(a.length===0)return;a=G.parent(a)}var o=n===`lowest`,[s]=Y.levels(e,{at:a,voids:t,match:i,reverse:o});return s}};function um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?um(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):um(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fm=(e,t,n)=>{var{selection:r}=e;if(r){var i=(t,n)=>{if(!q.isText(t))return!1;var[r,i]=Y.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},a=K.isExpanded(r),o=!1;if(!a){var[s,c]=Y.node(e,r);if(s&&i(s,c)){var[l]=Y.parent(e,c);o=l&&e.markableVoid(l)}}a||o?Z.setNodes(e,{[t]:n},{match:i,split:!0,voids:!0}):(e.marks=dm(dm({},Y.marks(e)||{}),{},{[t]:n}),xf.get(e)||e.onChange())}};function pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pm(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={anchor:Y.point(e,t,{edge:`end`}),focus:Y.end(e,[])},{distance:i=1}=n,a=0,o;for(var s of Y.positions(e,mm(mm({},n),{},{at:r}))){if(a>i)break;a!==0&&(o=s),a++}return o};function gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gm(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={anchor:Y.start(e,[]),focus:Y.point(e,t,{edge:`start`})},{distance:i=1}=n,a=0,o;for(var s of Y.positions(e,_m(_m({},n),{},{at:r,reverse:!0}))){if(a>i)break;a!==0&&(o=s),a++}return o},ym=(e,t)=>{var{selection:n}=e;n&&K.isCollapsed(n)&&Z.delete(e,{unit:t,reverse:!0})},bm=(e,t)=>{var{selection:n}=e;n&&K.isCollapsed(n)&&Z.delete(e,{unit:t})},xm=function(e){var{direction:t=`forward`}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&K.isExpanded(n)&&Z.delete(e,{reverse:t===`backward`})},Sm=(e,t)=>[Y.start(e,t),Y.end(e,t)];function Cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cm(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Tm=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Y.above(e,wm(wm({},t),{},{match:t=>q.isElement(t)&&Y.isElementReadOnly(e,t)}))},Em=(e,t)=>Y.point(e,t,{edge:`end`}),Dm=(e,t)=>{var n=Y.path(e,t,{edge:`start`});return Y.node(e,n)},Om=(e,t)=>{var n=Y.range(e,t);return q.fragment(e,n)};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Am(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?km(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jm=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Y.above(e,Am(Am({},t),{},{match:t=>q.isElement(t)&&Y.isVoid(e,t)}))},Mm=(e,t)=>t.children.some(t=>q.isElement(t)&&Y.isBlock(e,t)),Nm=(e,t)=>t.children.some(t=>q.isText(t)||Y.isInline(e,t)),Pm=(e,t)=>q.has(e,t),Fm=(e,t)=>t.children.every(e=>q.isText(e)),Im=e=>{Z.splitNodes(e,{always:!0})},Lm=(e,t,n)=>{Z.insertNodes(e,t,n)},Rm=e=>{Z.splitNodes(e,{always:!0})};function zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zm(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Vm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r,marks:i}=e;if(r){if(i){var a=Bm({text:t},i);Z.insertNodes(e,a,{at:n.at,voids:n.voids})}else Z.insertText(e,t,n);e.marks=null}},Hm=(e,t)=>!e.isInline(t),Um=(e,t,n)=>Y.isStart(e,t,n)||Y.isEnd(e,t,n),Wm=(e,t)=>{var{children:n}=t,[r]=n;return n.length===0||n.length===1&&q.isText(r)&&r.text===``&&!e.isVoid(t)},Gm=(e,t,n)=>{var r=Y.end(e,n);return Op.equals(t,r)},Km=e=>{var t=Sf.get(e);return t===void 0||t},qm=(e,t,n)=>{if(t.offset!==0)return!1;var r=Y.start(e,n);return Op.equals(t,r)},Jm=(e,t)=>{var n=Y.path(e,t,{edge:`end`});return Y.node(e,n)},Ym=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Y.path(e,t,n);return[q.leaf(e,r),r]};function Xm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:a}=t;if(a??=()=>!0,n){var o=[],s=Y.path(e,n);for(var[c,l]of q.levels(e,s))if(a(c,l)&&(o.push([c,l]),!i&&q.isElement(c)&&Y.isVoid(e,c)))break;r&&o.reverse(),yield*o}}()}var Zm=[`text`],Qm=[`text`],$m=function(e){var{marks:t,selection:n}=e;if(!n)return null;var{anchor:r,focus:i}=n;if(t)return t;if(K.isExpanded(n)){if(K.isBackward(n)&&([i,r]=[r,i]),Y.isEnd(e,r,r.path)){var a=Y.after(e,r);a&&(r=a)}var[o]=Y.nodes(e,{match:q.isText,at:{anchor:r,focus:i}});if(o){var[s]=o,{text:c}=s;return jf(s,Zm)}return{}}var{path:l}=r,[u]=Y.leaf(e,l);if(r.offset===0){var d=Y.previous(e,{at:l,match:q.isText});if(!Y.above(e,{match:t=>q.isElement(t)&&Y.isVoid(e,t)&&e.markableVoid(t)})){var f=Y.above(e,{match:t=>q.isElement(t)&&Y.isBlock(e,t)});if(d&&f){var[p,m]=d,[,h]=f;G.isAncestor(h,m)&&(u=p)}}}var{text:g}=u;return jf(u,Qm)},eh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection}=t;if(a){var o=Y.after(e,a,{voids:r});if(o){var[,s]=Y.last(e,[]),c=[o.path,s];if(X.isPath(a)&&a.length===0)throw Error(`Cannot get the next node from the root node!`);if(i==null){if(X.isPath(a)){var[l]=Y.parent(e,a);i=e=>l.children.includes(e)}else i=()=>!0}var[u]=Y.nodes(e,{at:c,match:i,mode:n,voids:r});return u}}},th=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Y.path(e,t,n);return[q.get(e,r),r]};function nh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,mode:r=`all`,universal:i=!1,reverse:a=!1,voids:o=!1,pass:s}=t,{match:c}=t;if(c||=()=>!0,n){var l,u;if(X.isSpan(n))l=n[0],u=n[1];else{var d=Y.path(e,n,{edge:`start`}),f=Y.path(e,n,{edge:`end`});l=a?f:d,u=a?d:f}var p=q.nodes(e,{reverse:a,from:l,to:u,pass:t=>{var[n,r]=t;return s&&s([n,r])?!0:q.isElement(n)?!!(!o&&(Y.isVoid(e,n)||Y.isElementReadOnly(e,n))):!1}}),m=[],h;for(var[g,_]of p){var v=h&&G.compare(_,h[1])===0;if(!(r===`highest`&&v)){if(!c(g,_)){if(i&&!v&&q.isText(g))return;continue}if(r===`lowest`&&v){h=[g,_];continue}var y=r===`lowest`?h:[g,_];y&&(i?m.push(y):yield y),h=[g,_]}}r===`lowest`&&h&&(i?m.push(h):yield h),i&&(yield*m)}}()}var rh=function(e){var{force:t=!1,operation:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e=>yf.get(e)||[],i=e=>bf.get(e)||new Set,a=e=>{var t=r(e).pop(),n=t.join(`,`);return i(e).delete(n),t};if(Y.isNormalizing(e)){if(t){var o=Array.from(q.nodes(e),e=>{var[,t]=e;return t}),s=new Set(o.map(e=>e.join(`,`)));yf.set(e,o),bf.set(e,s)}r(e).length!==0&&Y.withoutNormalizing(e,()=>{for(var i of r(e))if(q.has(e,i)){var o=Y.node(e,i),[s,c]=o;q.isElement(s)&&s.children.length===0&&e.normalizeNode(o,{operation:n,force:t})}for(var l=r(e),u=l.length,d=0;l.length!==0;){if(!e.shouldNormalize({dirtyPaths:l,iteration:d,initialDirtyPathsLength:u,operation:n}))return;var f=a(e);if(q.has(e,f)){var p=Y.node(e,f);e.normalizeNode(p,{operation:n,force:t})}d++,l=r(e)}})}},ih=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Y.path(e,t,n),i=G.parent(r);return Y.node(e,i)},ah=function(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return Y.pathRefs(e).delete(r),r.current=null,t}};return Y.pathRefs(e).add(r),r},oh=e=>{var t=Cf.get(e);return t||(t=new Set,Cf.set(e,t)),t},sh=function(e,t){var{depth:n,edge:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(X.isPath(t)){if(r===`start`){var[,i]=q.first(e,t);t=i}else if(r===`end`){var[,a]=q.last(e,t);t=a}}return X.isRange(t)&&(t=r===`start`?K.start(t):r===`end`?K.end(t):G.common(t.anchor.path,t.focus.path)),X.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},ch=function(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return Y.pointRefs(e).delete(r),r.current=null,t}};return Y.pointRefs(e).add(r),r},lh=e=>{var t=wf.get(e);return t||(t=new Set,wf.set(e,t)),t},uh=function(e,t){var{edge:n=`start`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(X.isPath(t)){var r;if(n===`end`){var[,i]=q.last(e,t);r=i}else{var[,a]=q.first(e,t);r=a}var o=q.get(e,r);if(!q.isText(o))throw Error(`Cannot get the ${n} point in the node at path [${t}] because it has no ${n} text node.`);return{path:r,offset:n===`end`?o.text.length:0}}if(X.isRange(t)){var[s,c]=K.edges(t);return n===`start`?s:c}return t};function dh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,unit:r=`offset`,reverse:i=!1,voids:a=!1}=t;if(!n)return;var o=Y.range(e,n),[s,c]=K.edges(o),l=i?c:s,u=!1,d=``,f=0,p=0,m=0,h=[],g=function*(t){var n=h.some(e=>G.isAncestor(e,t));function*o(e){n||(yield e)}if(q.isElement(_)){if(!e.isSelectable(_)){if(h.push(t),i)return G.hasPrevious(t)&&(yield*o(Y.end(e,G.previous(t)))),0;var g=G.next(t);return Y.hasPath(e,g)&&(yield*o(Y.start(e,g))),0}if(!a&&(e.isVoid(_)||e.isElementReadOnly(_)))return yield*o(Y.start(e,t)),0;if(e.isInline(_))return 0;if(Y.hasInlines(e,_)){var v=G.isAncestor(t,c.path)?c:Y.end(e,t),b=G.isAncestor(t,s.path)?s:Y.start(e,t);d=Y.string(e,{anchor:b,focus:v},{voids:a}),u=!0}}if(q.isText(_)){var x=G.equals(t,l.path);for(x?(p=i?l.offset:_.text.length-l.offset,m=l.offset):(p=_.text.length,m=i?p:0),(x||u||r===`offset`)&&(yield*o({path:t,offset:m}),u=!1);;){if(f===0){if(d===``)break;f=y(d,r,i),d=$f(d,f,i)[1]}if(m=i?m-f:m+f,p-=f,p<0){f=-p;break}f=0,yield*o({path:t,offset:m})}}};for(var[_,v]of Y.nodes(e,{at:n,reverse:i,voids:a}))yield*g(v);function y(e,t,n){return t===`character`?Jf(e,n):t===`word`?Qf(e,n):t===`line`||t===`block`?e.length:1}}()}var fh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection}=t;if(a){var o=Y.before(e,a,{voids:r});if(o){var[,s]=Y.first(e,[]),c=[o.path,s];if(X.isPath(a)&&a.length===0)throw Error(`Cannot get the previous node from the root node!`);if(i==null){if(X.isPath(a)){var[l]=Y.parent(e,a);i=e=>l.children.includes(e)}else i=()=>!0}var[u]=Y.nodes(e,{reverse:!0,at:c,match:i,mode:n,voids:r});return u}}},ph=function(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return Y.rangeRefs(e).delete(r),r.current=null,t}};return Y.rangeRefs(e).add(r),r},mh=e=>{var t=Tf.get(e);return t||(t=new Set,Tf.set(e,t)),t},hh=(e,t,n)=>X.isRange(t)&&!n?t:{anchor:Y.start(e,t),focus:Y.end(e,n||t)};function gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gh(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vh=(e,t)=>{var{selection:n}=e;if(n){var r=(t,n)=>{if(!q.isText(t))return!1;var[r,i]=Y.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},i=K.isExpanded(n),a=!1;if(!i){var[o,s]=Y.node(e,n);if(o&&r(o,s)){var[c]=Y.parent(e,s);a=c&&e.markableVoid(c)}}if(i||a)Z.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var l=_h({},Y.marks(e)||{});delete l[t],e.marks=l,xf.get(e)||e.onChange()}}},yh=(e,t)=>{Sf.set(e,t)},bh=(e,t)=>Y.point(e,t,{edge:`start`}),xh=function(e,t){var{voids:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Y.range(e,t),[i,a]=K.edges(r),o=``;for(var[s,c]of Y.nodes(e,{at:r,match:q.isText,voids:n})){var l=s.text;G.equals(c,a.path)&&(l=l.slice(0,a.offset)),G.equals(c,i.path)&&(l=l.slice(i.offset)),o+=l}return o},Sh=function(e,t){var{voids:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},[r,i]=K.edges(t);if(r.offset!==0||i.offset!==0||K.isCollapsed(t)||G.hasPrevious(i.path))return t;var a=Y.above(e,{at:i,match:t=>q.isElement(t)&&Y.isBlock(e,t),voids:n}),o=a?a[1]:[],s={anchor:Y.start(e,r),focus:i},c=!0;for(var[l,u]of Y.nodes(e,{at:s,match:q.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(l.text!==``||G.isBefore(u,o)){i={path:u,offset:l.text.length};break}}return{anchor:r,focus:i}},Ch=(e,t)=>{var n=Y.isNormalizing(e);Y.setNormalizing(e,!1);try{t()}finally{Y.setNormalizing(e,n)}Y.normalize(e)},wh=(e,t,n)=>{var[r,i]=t,[a,o]=n;return q.isElement(r)&&Y.isEmpty(e,r)||q.isText(r)&&r.text===``&&i[i.length-1]!==0},Th=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r=`character`,distance:i=1,voids:a=!1}=t,{at:o=e.selection,hanging:s=!1}=t;if(o){var c=!1;if(X.isRange(o)&&K.isCollapsed(o)&&(c=!0,o=o.anchor),X.isPoint(o)){var l=Y.void(e,{at:o,mode:`highest`});if(!a&&l){var[,u]=l;o=u}else{var d={unit:r,distance:i},f=n?Y.before(e,o,d)||Y.start(e,[]):Y.after(e,o,d)||Y.end(e,[]);o={anchor:o,focus:f},s=!0}}if(X.isPath(o)){Z.removeNodes(e,{at:o,voids:a});return}if(!K.isCollapsed(o)){if(!s){var[,p]=K.edges(o),m=Y.end(e,[]);Op.equals(p,m)||(o=Y.unhangRange(e,o,{voids:a}))}var[h,g]=K.edges(o),_=Y.above(e,{match:t=>q.isElement(t)&&Y.isBlock(e,t),at:h,voids:a}),v=Y.above(e,{match:t=>q.isElement(t)&&Y.isBlock(e,t),at:g,voids:a}),y=_&&v&&!G.equals(_[1],v[1]),b=G.equals(h.path,g.path),x=a?null:Y.void(e,{at:h,mode:`highest`})??Y.elementReadOnly(e,{at:h,mode:`highest`}),S=a?null:Y.void(e,{at:g,mode:`highest`})??Y.elementReadOnly(e,{at:g,mode:`highest`});if(x){var C=Y.before(e,h);C&&_&&G.isAncestor(_[1],C.path)&&(h=C)}if(S){var w=Y.after(e,g);w&&v&&G.isAncestor(v[1],w.path)&&(g=w)}var T=[],E;for(var D of Y.nodes(e,{at:o,voids:a})){var[O,k]=D;E&&G.compare(k,E)===0||(!a&&q.isElement(O)&&(Y.isVoid(e,O)||Y.isElementReadOnly(e,O))||!G.isCommon(k,h.path)&&!G.isCommon(k,g.path))&&(T.push(D),E=k)}var A=Array.from(T,t=>{var[,n]=t;return Y.pathRef(e,n)}),j=Y.pointRef(e,h),M=Y.pointRef(e,g),N=``;if(!b&&!x){var ee=j.current,[te]=Y.leaf(e,ee),{path:P}=ee,{offset:F}=h,ne=te.text.slice(F);ne.length>0&&(e.apply({type:`remove_text`,path:P,offset:F,text:ne}),N=ne)}if(A.reverse().map(e=>e.unref()).filter(e=>e!==null).forEach(t=>Z.removeNodes(e,{at:t,voids:a})),!S){var re=M.current,[ie]=Y.leaf(e,re),{path:ae}=re,I=b?h.offset:0,oe=ie.text.slice(I,g.offset);oe.length>0&&(e.apply({type:`remove_text`,path:ae,offset:I,text:oe}),N=oe)}!b&&y&&M.current&&j.current&&Z.mergeNodes(e,{at:M.current,hanging:!0,voids:a}),c&&n&&r===`character`&&N.length>1&&N.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Z.insertText(e,N.slice(0,N.length-i));var se=j.unref(),ce=M.unref(),le=n?se||ce:ce||se;t.at==null&&le&&Z.select(e,le)}}})},Eh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:a=Kf(e),batchDirty:o=!0}=n;if(t.length){if(X.isRange(a)){if(r||(a=Y.unhangRange(e,a,{voids:i})),K.isCollapsed(a))a=a.anchor;else{var[,s]=K.edges(a);if(!i&&Y.void(e,{at:s}))return;var c=Y.pointRef(e,s);Z.delete(e,{at:a}),a=c.unref()}}else X.isPath(a)&&(a=Y.start(e,a));if(!(!i&&Y.void(e,{at:a}))){var l=Y.above(e,{at:a,match:t=>q.isElement(t)&&Y.isInline(e,t),mode:`highest`,voids:i});if(l){var[,u]=l;Y.isEnd(e,a,u)?a=Y.after(e,u):Y.isStart(e,a,u)&&(a=Y.before(e,u))}var[,d]=Y.above(e,{match:t=>q.isElement(t)&&Y.isBlock(e,t),at:a,voids:i}),f=Y.isStart(e,a,d),p=Y.isEnd(e,a,d),m=f&&p,[,h]=q.first({children:t},[]),[,g]=q.last({children:t},[]),_=t=>{var[n,r]=t;return r.length===0?!1:m?!0:!(!f&&G.isAncestor(r,h)&&q.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)||!p&&G.isAncestor(r,g)&&q.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))},v=!0,y=[],b=[],x=[];for(var S of q.nodes({children:t},{pass:_})){var[C,w]=S;v&&q.isElement(C)&&!e.isInline(C)&&!G.isAncestor(w,h)&&(v=!1),_(S)&&(q.isElement(C)&&!e.isInline(C)?(v=!1,b.push(C)):v?y.push(C):x.push(C))}var[T]=Y.nodes(e,{at:a,match:t=>q.isText(t)||Y.isInline(e,t),mode:`highest`,voids:i}),[,E]=T,D=Y.isStart(e,a,E),O=Y.isEnd(e,a,E),k=Y.pathRef(e,p&&!x.length?G.next(d):d),A=Y.pathRef(e,O?G.next(E):E),j=x.length>0;Z.splitNodes(e,{at:a,match:t=>j?q.isElement(t)&&Y.isBlock(e,t):q.isText(t)||Y.isInline(e,t),mode:j?`lowest`:`highest`,always:j&&(!f||y.length>0)&&(!p||x.length>0),voids:i});var M=Y.pathRef(e,!D||D&&O?G.next(E):E);if(Z.insertNodes(e,y,{at:M.current,match:t=>q.isText(t)||Y.isInline(e,t),mode:`highest`,voids:i,batchDirty:o}),m&&!y.length&&b.length&&!x.length&&Z.delete(e,{at:d,voids:i}),Z.insertNodes(e,b,{at:k.current,match:t=>q.isElement(t)&&Y.isBlock(e,t),mode:`lowest`,voids:i,batchDirty:o}),Z.insertNodes(e,x,{at:A.current,match:t=>q.isText(t)||Y.isInline(e,t),mode:`highest`,voids:i,batchDirty:o}),!n.at){var N;if(x.length>0&&A.current?N=G.previous(A.current):b.length>0&&k.current?N=G.previous(k.current):M.current&&(N=G.previous(M.current)),N){var ee=Y.end(e,N);Z.select(e,ee)}}M.unref(),k.unref(),A.unref()}}})},Dh=function(e){var{edge:t=`anchor`}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;if(n){if(t===`anchor`)Z.select(e,n.anchor);else if(t===`focus`)Z.select(e,n.focus);else if(t===`start`){var[r]=K.edges(n);Z.select(e,r)}else if(t===`end`){var[,i]=K.edges(n);Z.select(e,i)}}},Oh=e=>{var{selection:t}=e;t&&e.apply({type:`set_selection`,properties:t,newProperties:null})},kh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i=`character`,reverse:a=!1}=t,{edge:o=null}=t;if(n){o===`start`&&(o=K.isBackward(n)?`focus`:`anchor`),o===`end`&&(o=K.isBackward(n)?`anchor`:`focus`);var{anchor:s,focus:c}=n,l={distance:r,unit:i},u={};if(o==null||o===`anchor`){var d=a?Y.before(e,s,l):Y.after(e,s,l);d&&(u.anchor=d)}if(o==null||o===`focus`){var f=a?Y.before(e,c,l):Y.after(e,c,l);f&&(u.focus=f)}Z.setSelection(e,u)}},Ah=(e,t)=>{var{selection:n}=e;if(t=Y.range(e,t),n){Z.setSelection(e,t);return}if(!X.isRange(t))throw Error(`When setting the selection and the current selection is \`null\` you must provide at least an \`anchor\` and \`focus\`, but you passed: ${Ap.stringify(t)}`);e.apply({type:`set_selection`,properties:n,newProperties:t})};function jh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jh(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Nh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=e,{edge:i=`both`}=n;if(r){i===`start`&&(i=K.isBackward(r)?`focus`:`anchor`),i===`end`&&(i=K.isBackward(r)?`anchor`:`focus`);var{anchor:a,focus:o}=r,s=i===`anchor`?a:o;Z.setSelection(e,{[i===`anchor`?`anchor`:`focus`]:Mh(Mh({},s),t)})}},Ph=(e,t)=>{var{selection:n}=e,r={},i={};if(n){for(var a in t)if(!qp.includes(a)){var o=Object.hasOwn(n,a)?n[a]:void 0,s=t[a];Fh(a,o,s)&&(r[a]=n[a],i[a]=t[a])}Object.keys(r).length>0&&e.apply({type:`set_selection`,properties:r,newProperties:i})}};function Fh(e,t,n){return(e===`anchor`||e===`focus`)&&Op.isPoint(t)&&Op.isPoint(n)?!Op.equals(t,n):t!==n}var Ih=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a=`lowest`,batchDirty:o=!0}=n,{at:s,match:c,select:l}=n;if(q.isNode(t)&&(t=[t]),t.length!==0){var[u]=t;if(s||(s=Kf(e),l!==!1&&(l=!0)),l??=!1,X.isRange(s)){if(r||(s=Y.unhangRange(e,s,{voids:i})),K.isCollapsed(s))s=s.anchor;else{var[,d]=K.edges(s),f=Y.pointRef(e,d);Z.delete(e,{at:s}),s=f.unref()}}if(X.isPoint(s)){c??=q.isText(u)?e=>q.isText(e):e.isInline(u)?t=>q.isText(t)||Y.isInline(e,t):t=>q.isElement(t)&&Y.isBlock(e,t);var[p]=Y.nodes(e,{at:s.path,match:c,mode:a,voids:i});if(p){var[,m]=p,h=Y.pathRef(e,m),g=Y.isEnd(e,s,m);Z.splitNodes(e,{at:s,match:c,mode:a,voids:i});var _=h.unref();s=g?G.next(_):_}else return}var v=G.parent(s),y=s[s.length-1];if(!(!i&&Y.void(e,{at:v}))){if(o){var b=[],x=G.levels(v);nm(e,()=>{var n=function(){var t=v.concat(y);y++;var n={type:`insert_node`,path:t,node:r};e.apply(n),s=G.next(s),b.push(n),q.isText(r)?x.push(t):x.push(...Array.from(q.nodes(r),e=>{var[,n]=e;return t.concat(n)}))};for(var r of t)n()},()=>{rm(e,x,e=>{var t=e;for(var n of b)if(G.operationCanTransformPath(n)&&(t=G.transform(t,n),!t))return null;return t})})}else for(var S of t){var C=v.concat(y);y++,e.apply({type:`insert_node`,path:C,node:S}),s=G.next(s)}if(s=G.previous(s),l){var w=Y.end(e,s);w&&Z.select(e,w)}}}})},Lh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r=`lowest`,voids:i=!1}=t,{match:a}=t;if(n){a??=X.isPath(n)?qf(e,n):t=>q.isElement(t)&&Y.isBlock(e,t);var o=Y.nodes(e,{at:n,match:a,mode:r,voids:i});for(var s of Array.from(o,t=>{var[,n]=t;return Y.pathRef(e,n)})){var c=s.unref();if(c.length<2)throw Error(`Cannot lift node at a path [${c}] because it has a depth of less than \`2\`.`);var[l,u]=Y.node(e,G.parent(c)),d=c[c.length-1],{length:f}=l.children;if(f===1){var p=G.next(u);Z.moveNodes(e,{at:c,to:p,voids:i}),Z.removeNodes(e,{at:u,voids:i})}else if(d===0)Z.moveNodes(e,{at:c,to:u,voids:i});else if(d===f-1){var m=G.next(u);Z.moveNodes(e,{at:c,to:m,voids:i})}else{var h=G.next(c),g=G.next(u);Z.splitNodes(e,{at:h,voids:i}),Z.moveNodes(e,{at:c,to:g,voids:i})}}}})},Rh=[`text`],zh=[`children`],Bh=(e,t)=>t!==e&&(q.isText(t)||Y.isVoid(e,t)||t.children.length===1&&Bh(e,t.children[0])),Vh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:a=!1,mode:o=`lowest`}=t;if(r){var s=X.isPath(r),c=s?r:null,l=n==null&&s;if(n==null){if(s){var[u]=Y.parent(e,r);n=e=>u.children.includes(e)}else n=t=>q.isElement(t)&&Y.isBlock(e,t)}if(!i&&X.isRange(r)&&(r=Y.unhangRange(e,r,{voids:a})),X.isRange(r)){if(K.isCollapsed(r))r=r.anchor;else{var[,d]=K.edges(r),f=Y.pointRef(e,d);Z.delete(e,{at:r}),r=f.unref(),t.at??Z.select(e,r)}}var[p]=Y.nodes(e,{at:r,match:n,voids:a,mode:o}),m=l&&c&&G.hasPrevious(c)?G.previous(c):null,h=m?Y.node(e,m):Y.previous(e,{at:r,match:n,voids:a,mode:o});if(!(!p||!h)){var[g,_]=p,[v,y]=h;if(_.length!==0&&y.length!==0){var b=G.next(y),x=G.common(_,y),S=G.isSibling(_,y),C=Array.from(Y.levels(e,{at:_}),e=>{var[t]=e;return t}).slice(x.length).slice(0,-1),w=Y.above(e,{at:_,mode:`highest`,match:t=>C.includes(t)&&Bh(e,t)}),T=w&&Y.pathRef(e,w[1]),E,D;if(q.isText(g)&&q.isText(v)){var{text:O}=g,k=jf(g,Rh);D=v.text.length,E=k}else if(q.isElement(g)&&q.isElement(v)){var{children:A}=g,k=jf(g,zh);D=v.children.length,E=k}else throw Error(`Cannot merge the node at path [${_}] with the previous sibling because it is not the same kind: ${Ap.stringify(g)} ${Ap.stringify(v)}`);S||Z.moveNodes(e,{at:_,to:b,voids:a}),T&&Z.removeNodes(e,{at:T.current,voids:a}),Y.shouldMergeNodesRemovePrevNode(e,h,p)?Z.removeNodes(e,{at:y,voids:a}):e.apply({type:`merge_node`,path:b,position:D,properties:E}),T&&T.unref()}}}})},Hh=(e,t)=>{Y.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i=`lowest`,voids:a=!1}=t,{match:o}=t;if(r){o??=X.isPath(r)?qf(e,r):t=>q.isElement(t)&&Y.isBlock(e,t);var s=Y.pathRef(e,n),c=Y.nodes(e,{at:r,match:o,mode:i,voids:a});for(var l of Array.from(c,t=>{var[,n]=t;return Y.pathRef(e,n)})){var u=l.unref(),d=s.current;u.length!==0&&e.apply({type:`move_node`,path:u,newPath:d}),s.current&&G.isSibling(d,u)&&G.isAfter(d,u)&&(s.current=G.next(s.current))}s.unref()}})},Uh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i=`lowest`}=t,{at:a=e.selection,match:o}=t;if(a){o??=X.isPath(a)?qf(e,a):t=>q.isElement(t)&&Y.isBlock(e,t),!n&&X.isRange(a)&&(a=Y.unhangRange(e,a,{voids:r}));var s=Y.nodes(e,{at:a,match:o,mode:i,voids:r});for(var c of Array.from(s,t=>{var[,n]=t;return Y.pathRef(e,n)})){var l=c.unref();if(l){var[u]=Y.node(e,l);e.apply({type:`remove_node`,path:l,node:u})}}}})},Wh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection,compare:a,merge:o}=n,{hanging:s=!1,mode:c=`lowest`,split:l=!1,voids:u=!1}=n;if(i){if(r??=X.isPath(i)?qf(e,i):t=>q.isElement(t)&&Y.isBlock(e,t),!s&&X.isRange(i)&&(i=Y.unhangRange(e,i,{voids:u})),l&&X.isRange(i)){if(K.isCollapsed(i)&&Y.leaf(e,i.anchor)[0].text.length>0)return;var d=Y.rangeRef(e,i,{affinity:`inward`}),[f,p]=K.edges(i),m=c===`lowest`?`lowest`:`highest`,h=Y.isEnd(e,p,p.path);Z.splitNodes(e,{at:p,match:r,mode:m,voids:u,always:!h});var g=Y.isStart(e,f,f.path);Z.splitNodes(e,{at:f,match:r,mode:m,voids:u,always:!g}),i=d.unref(),n.at??Z.select(e,i)}a||=(e,t)=>e!==t;for(var[_,v]of Y.nodes(e,{at:i,match:r,mode:c,voids:u})){var y={},b={};if(v.length!==0){var x=!1;for(var S in t)if(!Kp.includes(S)){var C=Object.hasOwn(_,S)?_[S]:void 0,w=t[S];a(w,C)&&(x=!0,Object.hasOwn(_,S)&&(y[S]=C),o?w!=null&&(b[S]=o(C,w)):w!=null&&(b[S]=w))}x&&e.apply({type:`set_node`,path:v,properties:y,newProperties:b})}}}})},Gh=(e,t)=>{if(K.isCollapsed(t))return t.anchor;var[,n]=K.edges(t),r=Y.pointRef(e,n);return Z.delete(e,{at:t}),r.unref()},Kh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection,height:o=0,always:s=!1}=t;if(a&&(i??=t=>q.isElement(t)&&Y.isBlock(e,t),!(X.isRange(a)&&(a=Gh(e,a),!a)))){if(X.isPath(a)){var c=a,l=Y.point(e,c),[u]=Y.parent(e,c);i=e=>e===u,o=l.path.length-c.length+1,a=l,s=!0}var d=Y.pointRef(e,a,{affinity:`backward`}),f;try{var[p]=Y.nodes(e,{at:a,match:i,mode:n,voids:r});if(!p)return;var m=Y.void(e,{at:a,mode:`highest`}),h=0;if(!r&&m){var[g,_]=m;if(e.isInline(g)){var v=Y.after(e,_);if(!v){var y={text:``},b=G.next(_);Z.insertNodes(e,y,{at:b,voids:r}),v=Y.point(e,b)}a=v,s=!0}o=a.path.length-_.length+1,s=!0}f=Y.pointRef(e,a);var x=a.path.length-o,[,S]=p,C=a.path.slice(0,x),w=o===0?a.offset:a.path[x]+h;for(var[T,E]of Y.levels(e,{at:C,reverse:!0,voids:r})){var D=!1;if(E.length<S.length||E.length===0||!r&&q.isElement(T)&&Y.isVoid(e,T))break;var O=d.current,k=Y.isEnd(e,O,E);if(s||!d||!Y.isEdge(e,O,E)){D=!0;var A=q.extractProps(T);e.apply({type:`split_node`,path:E,position:w,properties:A})}w=E[E.length-1]+(D||k?1:0)}if(t.at==null){var j=f.current||Y.end(e,[]);Z.select(e,j)}}finally{var M;d.unref(),(M=f)==null||M.unref()}}})},qh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;Z.setNodes(e,r,n)},Jh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y.withoutNormalizing(e,()=>{var{mode:n=`lowest`,split:r=!1,voids:i=!1}=t,{at:a=e.selection,match:o}=t;if(a){o??=X.isPath(a)?qf(e,a):t=>q.isElement(t)&&Y.isBlock(e,t),X.isPath(a)&&(a=Y.range(e,a));var s=X.isRange(a)?Y.rangeRef(e,a):null,c=Y.nodes(e,{at:a,match:o,mode:n,voids:i}),l=Array.from(c,t=>{var[,n]=t;return Y.pathRef(e,n)}).reverse(),u=function(){var t=d.unref(),[n]=Y.node(e,t),a=Y.range(e,t);r&&s&&(a=K.intersection(s.current,a)),Z.liftNodes(e,{at:a,match:e=>!q.isText(n)&&n.children.includes(e),voids:i})};for(var d of l)u();s&&s.unref()}})};function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yh(Object(n),!0).forEach(function(t){kf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Zh=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Y.withoutNormalizing(e,()=>{var{mode:r=`lowest`,split:i=!1,voids:a=!1}=n,{match:o,at:s=e.selection}=n;if(s){if(o??=X.isPath(s)?qf(e,s):e.isInline(t)?t=>q.isElement(t)&&Y.isInline(e,t)||q.isText(t):t=>q.isElement(t)&&Y.isBlock(e,t),i&&X.isRange(s)){var[c,l]=K.edges(s),u=Y.rangeRef(e,s,{affinity:`inward`}),d=t=>{var n=Y.above(e,{at:t,match:t=>q.isElement(t)&&Y.isBlock(e,t)});return n&&Y.isEdge(e,t,n[1])};Z.splitNodes(e,{at:l,match:o,voids:a,always:!d(l)}),Z.splitNodes(e,{at:c,match:o,voids:a,always:!d(c)}),s=u.unref(),n.at??Z.select(e,s)}var f=Array.from(Y.nodes(e,{at:s,match:e.isInline(t)?t=>q.isElement(t)&&Y.isBlock(e,t):e=>q.isEditor(e),mode:`lowest`,voids:a})),p=function(){var n=X.isRange(s)?K.intersection(s,Y.range(e,m)):s;if(!n)return 0;var i=Array.from(Y.nodes(e,{at:n,match:o,mode:r,voids:a}));if(i.length>0){var[c]=i,l=i[i.length-1],[,u]=c,[,d]=l;if(u.length===0&&d.length===0)return 0;var f=G.equals(u,d)?G.parent(u):G.common(u,d),p=Y.range(e,u,d),[h]=Y.node(e,f),g=f.length+1,_=G.next(d.slice(0,g)),v=Xh(Xh({},t),{},{children:[]});Z.insertNodes(e,v,{at:_,voids:a}),Z.moveNodes(e,{at:p,match:e=>!q.isText(h)&&h.children.includes(e),to:_.concat(0),voids:a})}};for(var[,m]of f)p()}})},Qh=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){return im(e,...arguments)},addMark:function(){return fm(e,...arguments)},deleteBackward:function(){return ym(e,...arguments)},deleteForward:function(){return bm(e,...arguments)},deleteFragment:function(){return xm(e,...arguments)},getFragment:function(){return om(e,...arguments)},insertBreak:function(){return Im(e,...arguments)},insertSoftBreak:function(){return Rm(e,...arguments)},insertFragment:function(){return Eh(e,...arguments)},insertNode:function(){return Lm(e,...arguments)},insertText:function(){return Vm(e,...arguments)},normalizeNode:function(){return sm(e,...arguments)},removeMark:function(){return vh(e,...arguments)},getDirtyPaths:function(){return am(e,...arguments)},shouldNormalize:function(){return cm(e,...arguments)},above:function(){return lm(e,...arguments)},after:function(){return hm(e,...arguments)},before:function(){return vm(e,...arguments)},collapse:function(){return Dh(e,...arguments)},delete:function(){return Th(e,...arguments)},deselect:function(){return Oh(e,...arguments)},edges:function(){return Sm(e,...arguments)},elementReadOnly:function(){return Tm(e,...arguments)},end:function(){return Em(e,...arguments)},first:function(){return Dm(e,...arguments)},fragment:function(){return Om(e,...arguments)},getMarks:function(){return $m(e,...arguments)},hasBlocks:function(){return Mm(e,...arguments)},hasInlines:function(){return Nm(e,...arguments)},hasPath:function(){return Pm(e,...arguments)},hasTexts:function(){return Fm(e,...arguments)},insertNodes:function(){return Ih(e,...arguments)},isBlock:function(){return Hm(e,...arguments)},isEdge:function(){return Um(e,...arguments)},isEmpty:function(){return Wm(e,...arguments)},isEnd:function(){return Gm(e,...arguments)},isNormalizing:function(){return Km(e,...arguments)},isStart:function(){return qm(e,...arguments)},last:function(){return Jm(e,...arguments)},leaf:function(){return Ym(e,...arguments)},levels:function(){return Xm(e,...arguments)},liftNodes:function(){return Lh(e,...arguments)},mergeNodes:function(){return Vh(e,...arguments)},move:function(){return kh(e,...arguments)},moveNodes:function(){return Hh(e,...arguments)},next:function(){return eh(e,...arguments)},node:function(){return th(e,...arguments)},nodes:function(){return nh(e,...arguments)},normalize:function(){return rh(e,...arguments)},parent:function(){return ih(e,...arguments)},path:function(){return sh(e,...arguments)},pathRef:function(){return ah(e,...arguments)},pathRefs:function(){return oh(e,...arguments)},point:function(){return uh(e,...arguments)},pointRef:function(){return ch(e,...arguments)},pointRefs:function(){return lh(e,...arguments)},positions:function(){return dh(e,...arguments)},previous:function(){return fh(e,...arguments)},range:function(){return hh(e,...arguments)},rangeRef:function(){return ph(e,...arguments)},rangeRefs:function(){return mh(e,...arguments)},removeNodes:function(){return Uh(e,...arguments)},select:function(){return Ah(e,...arguments)},setNodes:function(){return Wh(e,...arguments)},setNormalizing:function(){return yh(e,...arguments)},setPoint:function(){return Nh(e,...arguments)},setSelection:function(){return Ph(e,...arguments)},splitNodes:function(){return Kh(e,...arguments)},start:function(){return bh(e,...arguments)},string:function(){return xh(e,...arguments)},unhangRange:function(){return Sh(e,...arguments)},unsetNodes:function(){return qh(e,...arguments)},unwrapNodes:function(){return Jh(e,...arguments)},void:function(){return jm(e,...arguments)},withoutNormalizing:function(){return Ch(e,...arguments)},wrapNodes:function(){return Zh(e,...arguments)},shouldMergeNodesRemovePrevNode:function(){return wh(e,...arguments)}};return e};function $h(e){return Object.prototype.toString.call(e)===`[object Object]`}function eg(e){var t,n;return $h(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,$h(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var tg={isHistory(e){return eg(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Uf.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Uf.isOperationList(e.undos[0].operations))}},ng=new WeakMap,rg=new WeakMap,ig=new WeakMap,ag={isHistoryEditor(e){return tg.isHistory(e.history)&&Y.isEditor(e)},isMerging(e){return rg.get(e)},isSplittingOnce(e){return ig.get(e)},setSplittingOnce(e,t){ig.set(e,t)},isSaving(e){return ng.get(e)},redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=ag.isMerging(e);rg.set(e,!0),t(),rg.set(e,n)},withNewBatch(e,t){var n=ag.isMerging(e);rg.set(e,!0),ig.set(e,!0),t(),rg.set(e,n),ig.delete(e)},withoutMerging(e,t){var n=ag.isMerging(e);rg.set(e,!1),t(),rg.set(e,n)},withoutSaving(e,t){var n=ag.isSaving(e);ng.set(e,!1);try{t()}finally{ng.set(e,n)}}},og=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&Z.setSelection(t,r.selectionBefore),ag.withoutSaving(t,()=>{Y.withoutNormalizing(t,()=>{for(var e of r.operations)t.apply(e)})}),e.redos.pop(),t.writeHistory(`undos`,r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];ag.withoutSaving(t,()=>{Y.withoutNormalizing(t,()=>{for(var e of r.operations.map(Uf.inverse).reverse())t.apply(e);r.selectionBefore&&Z.setSelection(t,r.selectionBefore)})}),t.writeHistory(`redos`,r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:i}=t,{undos:a}=i,o=a[a.length-1],s=o&&o.operations[o.operations.length-1],c=ag.isSaving(t),l=ag.isMerging(t);if(c??=cg(e),c){if(l??=o==null?!1:r.length!==0||sg(e,s),ag.isSplittingOnce(t)&&(l=!1,ag.setSplittingOnce(t,void 0)),o&&l)o.operations.push(e);else{var u={operations:[e],selectionBefore:t.selection};t.writeHistory(`undos`,u)}for(;a.length>100;)a.shift();i.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t},sg=(e,t)=>!!(t&&e.type===`insert_text`&&t.type===`insert_text`&&e.offset===t.offset+t.text.length&&G.equals(e.path,t.path)||t&&e.type===`remove_text`&&t.type===`remove_text`&&e.offset+e.text.length===t.offset&&G.equals(e.path,t.path)),cg=(e,t)=>e.type!==`set_selection`,lg=o(((e,t)=>{t.exports=o;var n=`֑-߿יִ-﷽ﹰ-ﻼ`,r=`A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿`,i=RegExp(`^[^`+r+`]*[`+n+`]`),a=RegExp(`^[^`+n+`]*[`+r+`]`);function o(e){return e=String(e||``),i.test(e)?`rtl`:a.test(e)?`ltr`:`neutral`}})),ug=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),dg=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),fg=o(((e,t)=>{var n=dg(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),pg=o(((e,t)=>{var n=fg();t.exports=function(){return n.Date.now()}})),mg=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),hg=o(((e,t)=>{var n=mg(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),gg=o(((e,t)=>{t.exports=fg().Symbol})),_g=o(((e,t)=>{var n=gg(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),vg=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),yg=o(((e,t)=>{var n=gg(),r=_g(),i=vg(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),bg=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),xg=o(((e,t)=>{var n=yg(),r=bg(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),Sg=o(((e,t)=>{var n=hg(),r=ug(),i=xg(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),Cg=o(((e,t)=>{var n=ug(),r=pg(),i=Sg(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),wg=o(((e,t)=>{var n=Cg(),r=ug(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a})),Tg=c(lg()),Eg=c(Cg()),Dg=c(wg()),Og=e=>typeof e==`object`&&!!e&&e.nodeType===1,kg=(e,t)=>(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`,Ag=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return kg(n.overflowY,t)||kg(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},jg=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,Mg=e=>e.parentElement??(e.getRootNode().host||null),Ng=(e,t)=>{if(typeof document>`u`)return[];let{scrollMode:n,block:r,inline:i,boundary:a,skipOverflowHiddenElements:o}=t,s=typeof a==`function`?a:e=>e!==a;if(!Og(e))throw TypeError(`Invalid target`);let c=document.scrollingElement||document.documentElement,l=[],u=e;for(;Og(u)&&s(u);){if(u=Mg(u),u===c){l.push(u);break}u!=null&&u===document.body&&Ag(u)&&!Ag(document.documentElement)||u!=null&&Ag(u,o)&&l.push(u)}let d=window.visualViewport?.width??innerWidth,f=window.visualViewport?.height??innerHeight,{scrollX:p,scrollY:m}=window,{height:h,width:g,top:_,right:v,bottom:y,left:b}=e.getBoundingClientRect(),{top:x,right:S,bottom:C,left:w}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),T=r===`start`||r===`nearest`?_-x:r===`end`?y+C:_+h/2-x+C,E=i===`center`?b+g/2-w+S:i===`end`?v+S:b-w,D=[];for(let e=0;e<l.length;e++){let t=l[e],{height:a,width:o,top:s,right:u,bottom:x,left:S}=t.getBoundingClientRect();if(n===`if-needed`&&_>=0&&b>=0&&y<=f&&v<=d&&(t===c&&!Ag(t)||_>=s&&y<=x&&b>=S&&v<=u))return D;let C=getComputedStyle(t),w=parseInt(C.borderLeftWidth,10),O=parseInt(C.borderTopWidth,10),k=parseInt(C.borderRightWidth,10),A=parseInt(C.borderBottomWidth,10),j=0,M=0,N=`offsetWidth`in t?t.offsetWidth-t.clientWidth-w-k:0,ee=`offsetHeight`in t?t.offsetHeight-t.clientHeight-O-A:0,te=`offsetWidth`in t?t.offsetWidth===0?0:o/t.offsetWidth:0,P=`offsetHeight`in t?t.offsetHeight===0?0:a/t.offsetHeight:0;if(c===t)j=r===`start`?T:r===`end`?T-f:r===`nearest`?jg(m,m+f,f,O,A,m+T,m+T+h,h):T-f/2,M=i===`start`?E:i===`center`?E-d/2:i===`end`?E-d:jg(p,p+d,d,w,k,p+E,p+E+g,g),j=Math.max(0,j+m),M=Math.max(0,M+p);else{j=r===`start`?T-s-O:r===`end`?T-x+A+ee:r===`nearest`?jg(s,x,a,O,A+ee,T,T+h,h):T-(s+a/2)+ee/2,M=i===`start`?E-S-w:i===`center`?E-(S+o/2)+N/2:i===`end`?E-u+k+N:jg(S,u,o,w,k+N,E,E+g,g);let{scrollLeft:e,scrollTop:n}=t;j=P===0?0:Math.max(0,Math.min(n+j/P,t.scrollHeight-a/P+ee)),M=te===0?0:Math.max(0,Math.min(e+M/te,t.scrollWidth-o/te+N)),T+=n-j,E+=e-M}D.push({el:t,top:j,left:M})}return D},Pg=e=>!1===e?{block:`end`,inline:`nearest`}:(e=>e===Object(e)&&Object.keys(e).length!==0)(e)?e:{block:`start`,inline:`nearest`};function Fg(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>typeof e==`object`&&typeof e.behavior==`function`)(t))return t.behavior(Ng(e,t));let r=typeof t==`boolean`||t==null?void 0:t.behavior;for(let{el:i,top:a,left:o}of Ng(e,Pg(t))){let e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var Ig=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});for(var t=typeof window<`u`&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),n={alt:`altKey`,control:`ctrlKey`,meta:`metaKey`,shift:`shiftKey`},r={add:`+`,break:`pause`,cmd:`meta`,command:`meta`,ctl:`control`,ctrl:`control`,del:`delete`,down:`arrowdown`,esc:`escape`,ins:`insert`,left:`arrowleft`,mod:t?`meta`:`control`,opt:`alt`,option:`alt`,return:`enter`,right:`arrowright`,space:` `,spacebar:` `,up:`arrowup`,win:`meta`,windows:`meta`},i={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},a=1;a<20;a++)i[`f`+a]=111+a;function o(e,t,n){t&&!(`byKey`in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return s(e,t)}),i=function(e){return r.some(function(t){return c(t,e)})};return n==null?i:i(n)}function s(e,t){var a=t&&t.byKey,o={};e=e.replace(`++`,`+add`);var s=e.split(`+`),c=s.length;for(var d in n)o[n[d]]=!1;var f=!0,p=!1,m=void 0;try{for(var h=s[Symbol.iterator](),g;!(f=(g=h.next()).done);f=!0){var _=g.value,v=_.endsWith(`?`)&&_.length>1;v&&(_=_.slice(0,-1));var y=u(_),b=n[y];if(_.length>1&&!b&&!r[_]&&!i[y])throw TypeError(`Unknown modifier: "`+_+`"`);(c===1||!b)&&(a?o.key=y:o.which=l(_)),b&&(o[b]=!v||null)}}catch(e){p=!0,m=e}finally{try{!f&&h.return&&h.return()}finally{if(p)throw m}}return o}function c(e,t){for(var n in e){var r=e[n],i=void 0;if(r!=null&&(i=n===`key`&&t.key!=null?t.key.toLowerCase():n===`which`?r===91&&t.which===93?91:t.which:t[n],(i!=null||r!==!1)&&i!==r))return!1}return!0}function l(e){return e=u(e),i[e]||e.toUpperCase().charCodeAt(0)}function u(e){return e=e.toLowerCase(),e=r[e]||e,e}e.isHotkey=o}))(),Lg=globalThis.Node;globalThis.Element;var Rg=globalThis.Text;globalThis.Range,globalThis.Selection,globalThis.StaticRange;var zg=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Bg=e=>Hg(e)&&e.nodeType===8,Vg=e=>Hg(e)&&e.nodeType===1,Hg=e=>{var t=zg(e);return!!t&&e instanceof t.Node},Ug=e=>{var t=e&&e.anchorNode&&zg(e.anchorNode);return!!t&&e instanceof t.Selection},Wg=e=>Hg(e)&&e.nodeType===3,Gg=e=>e.clipboardData&&e.clipboardData.getData(`text/plain`)!==``&&e.clipboardData.types.length===1,Kg=e=>{var[t,n]=e;if(Vg(t)&&t.childNodes.length){var r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=Jg(t,i,r?`backward`:`forward`),r=i<n;Vg(t)&&t.childNodes.length;){var a=r?t.childNodes.length-1:0;t=Yg(t,a,r?`backward`:`forward`)}n=r&&t.textContent!=null?t.textContent.length:0}return[t,n]},qg=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1},Jg=(e,t,n)=>{if(typeof t!=`number`)throw Error(`Expected index to be a number`);for(var{childNodes:r}=e,i=r[t],a=t,o=!1,s=!1;(Bg(i)||Vg(i)&&i.childNodes.length===0||Vg(i)&&i.getAttribute(`contenteditable`)===`false`)&&!(o&&s);){if(a>=r.length){o=!0,a=t-1,n=`backward`;continue}if(a<0){s=!0,a=t+1,n=`forward`;continue}i=r[a],t=a,a+=n===`forward`?1:-1}return[i,t]},Yg=(e,t,n)=>{var[r]=Jg(e,t,n);return r},Xg=e=>{var t=``;if(Wg(e)&&e.nodeValue)return e.nodeValue;if(Vg(e)){for(var n of Array.from(e.childNodes))t+=Xg(n);var r=getComputedStyle(e).getPropertyValue(`display`);(r===`block`||r===`list`||e.tagName===`BR`)&&(t+=`
50
+ `)}return t},Zg=/data-slate-fragment="(.+?)"/m,Qg=e=>{var[,t]=e.getData(`text/html`).match(Zg)||[];return t},$g=e=>e.getSelection==null?document.getSelection():e.getSelection(),e_=(e,t,n)=>{var{target:r}=t;if(Vg(r)&&r.matches(`[contentEditable="false"]`))return!1;var{document:i}=Q.getWindow(e);if(a_(i,r))return Q.hasDOMNode(e,r,{editable:!0});var a=n.find(e=>{var{addedNodes:t,removedNodes:n}=e;for(var i of t)if(i===r||a_(i,r))return!0;for(var a of n)if(a===r||a_(a,r))return!0});return!a||a===t?!1:e_(e,a,n)},t_=()=>{for(var e=document.activeElement;(t=e)!=null&&t.shadowRoot&&(n=e.shadowRoot)!=null&&n.activeElement;){var t,n,r;e=(r=e)==null||(r=r.shadowRoot)==null?void 0:r.activeElement}return e},n_=(e,t)=>!!(e.compareDocumentPosition(t)&Lg.DOCUMENT_POSITION_PRECEDING),r_=(e,t)=>!!(e.compareDocumentPosition(t)&Lg.DOCUMENT_POSITION_FOLLOWING),i_=(e,t)=>{if(!e)return null;for(var n=e;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&`host`in n.parentNode)n=n.parentNode.host;else return null}return null},a_=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;for(var n=t;n;){if(n===e)return!0;if(n.parentNode)n=`host`in n.parentNode?n.parentNode.host:n.parentNode;else return!1}return!1},o_,s_=typeof navigator<`u`&&typeof window<`u`&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c_=typeof navigator<`u`&&/Mac OS X/.test(navigator.userAgent),l_=typeof navigator<`u`&&/Android/.test(navigator.userAgent),u_=typeof navigator<`u`&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),d_=typeof navigator<`u`&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),f_=typeof navigator<`u`&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),p_=typeof navigator<`u`&&/Chrome/i.test(navigator.userAgent),m_=typeof navigator<`u`&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),h_=l_&&typeof navigator<`u`&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),g_=typeof navigator<`u`&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),__=typeof navigator<`u`&&/.*UCBrowser/.test(navigator.userAgent),v_=typeof navigator<`u`&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!p_||m_),y_=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;typeof navigator<`u`&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(o_=navigator.userAgent.match(/Version\/(\d+)/))!=null&&o_[1]&&parseInt(navigator.userAgent.match(/Version\/(\d+)/)?.[1],10);var b_=(!m_||!h_)&&!f_&&typeof globalThis<`u`&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges==`function`;function x_(e){"@babel/helpers - typeof";return x_=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},x_(e)}function S_(e,t){if(x_(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(x_(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C_(e){var t=S_(e,`string`);return x_(t)===`symbol`?t:String(t)}function w_(e,t,n){return t=C_(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T_=0,E_=class{constructor(){w_(this,`id`,void 0),this.id=`${T_++}`}},D_=new WeakMap,O_=new WeakMap,k_=new WeakMap,A_=new WeakMap,j_=new WeakMap,M_=new WeakMap,N_=new WeakMap,P_=new WeakMap,F_=new WeakMap,I_=new WeakMap,L_=new WeakMap,R_=new WeakMap,z_=new WeakMap,B_=new WeakMap,V_=new WeakMap,H_=new WeakMap,U_=new WeakMap,W_=new WeakMap,G_=new WeakMap,K_=new WeakMap,q_=new WeakMap,J_=new WeakMap,Y_=Symbol(`placeholder`),X_=Symbol(`mark-placeholder`),Q={androidPendingDiffs:e=>G_.get(e),androidScheduleFlush:e=>{var t;(t=H_.get(e))==null||t()},blur:e=>{var t=Q.toDOMNode(e,e),n=Q.findDocumentOrShadowRoot(e);R_.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,n=$g(Q.findDocumentOrShadowRoot(e));n&&n.rangeCount>0&&n.removeAllRanges(),t&&Z.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Q.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t)=>{`nativeEvent`in t&&(t=t.nativeEvent);var{clientX:n,clientY:r,target:i}=t;if(n==null||r==null)throw Error(`Cannot resolve a Slate range from a DOM event: ${t}`);var a=Q.toSlateNode(e,t.target),o=Q.findPath(e,a);if(q.isElement(a)&&Y.isVoid(e,a)){var s=i.getBoundingClientRect(),c=e.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,l=Y.point(e,o,{edge:c?`start`:`end`}),u=c?Y.before(e,l):Y.after(e,l);if(u)return Y.range(e,u)}var d,{document:f}=Q.getWindow(e);if(f.caretRangeFromPoint)d=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&(d=f.createRange(),d.setStart(p.offsetNode,p.offset),d.setEnd(p.offsetNode,p.offset))}if(!d)throw Error(`Cannot resolve a Slate range from a DOM event: ${t}`);return Q.toSlateRange(e,d,{exactMatch:!1,suppressThrow:!1})},findKey:(e,t)=>{var n=F_.get(t);return n||(n=new E_,F_.set(t,n)),n},findPath:(e,t)=>{for(var n=[],r=t;;){var i=k_.get(r);if(i==null){if(r===e)return n;break}var a=O_.get(r);if(a==null)break;n.unshift(a),r=i}throw Error(`Unable to find the path for Slate node: ${Ap.stringify(t)}`)},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!R_.get(e)&&j_.get(e)){if(t.retries<=0)throw Error(`Could not set focus, editor seems stuck with pending operations`);if(e.operations.length>0){setTimeout(()=>{Q.focus(e,{retries:t.retries-1})},10);return}var n=Q.toDOMNode(e,e),r=Q.findDocumentOrShadowRoot(e);if(r.activeElement!==n){if(e.selection&&r instanceof Document){var i=$g(r),a=Q.toDOMRange(e,e.selection);i?.removeAllRanges(),i?.addRange(a)}e.selection||Z.select(e,Y.start(e,[])),R_.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:e=>{var t=A_.get(e);if(!t)throw Error(`Unable to find a host window element for this editor`);return t},hasDOMNode:function(e,t){var{editable:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Q.toDOMNode(e,e),i;try{i=Vg(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes(`Permission denied to access property "nodeType"`))throw e}return i?i_(i,`[data-slate-editor]`)===r&&(!n||i.isContentEditable?!0:typeof i.isContentEditable==`boolean`&&i_(i,`[contenteditable="false"]`)===r||!!i.getAttribute(`data-slate-zero-width`)):!1},hasEditableTarget:(e,t)=>Hg(t)&&Q.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:n,focus:r}=t;return Y.hasPath(e,n.path)&&Y.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Q.hasEditableTarget(e,t)||Q.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Hg(t)&&Q.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!z_.get(e),isFocused:e=>!!R_.get(e),isReadOnly:e=>!!L_.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(L_.get(e)||!Q.hasTarget(e,t))return!1;var n=Q.toSlateNode(e,t);return q.isElement(n)&&Y.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n=t===e?j_.get(e):I_.get(e)?.get(Q.findKey(e,t));if(!n)throw Error(`Cannot resolve a DOM node from Slate node: ${Ap.stringify(t)}`);return n},toDOMPoint:(e,t)=>{var[n]=Y.node(e,t.path),r=Q.toDOMNode(e,n),i;Y.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a=Array.from(r.querySelectorAll(`[data-slate-string], [data-slate-zero-width]`)),o=0,s=0;s<a.length;s++){var c=a[s],l=c.childNodes[0];if(l!=null&&l.textContent!=null){var{length:u}=l.textContent,d=c.getAttribute(`data-slate-length`),f=o+(d==null?u:parseInt(d,10)),p=a[s+1];if(t.offset===f&&p!=null&&p.hasAttribute(`data-slate-mark-placeholder`)){var m,h=p.childNodes[0];i=[h instanceof Rg?h:p,(m=p.textContent)!=null&&m.startsWith(``)?1:0];break}if(t.offset<=f){i=[l,Math.min(u,Math.max(0,t.offset-o))];break}o=f}}if(!i)throw Error(`Cannot resolve a DOM point from Slate point: ${Ap.stringify(t)}`);return i},toDOMRange:(e,t)=>{var{anchor:n,focus:r}=t,i=K.isBackward(t),a=Q.toDOMPoint(e,n),o=K.isCollapsed(t)?a:Q.toDOMPoint(e,r),s=Q.getWindow(e).document.createRange(),[c,l]=i?o:a,[u,d]=i?a:o,f=!!(Vg(c)?c:c.parentElement).getAttribute(`data-slate-zero-width`),p=!!(Vg(u)?u:u.parentElement).getAttribute(`data-slate-zero-width`);return s.setStart(c,f?1:l),s.setEnd(u,p?1:d),s},toSlateNode:(e,t)=>{var n=Vg(t)?t:t.parentElement;n&&!n.hasAttribute(`data-slate-node`)&&(n=n.closest(`[data-slate-node]`));var r=n?N_.get(n):null;if(!r)throw Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{var{exactMatch:r,suppressThrow:i}=n,[a,o]=r?t:Kg(t),s=a.parentNode,c=n.searchDirection,l=null,u=0;if(s){var d,f,p=Q.toDOMNode(e,e),m=s.closest(`[data-slate-void="true"]`),h=m&&a_(p,m)?m:null,g=s.closest(`[contenteditable="false"]`),_=g&&a_(p,g)?g:null,v=s.closest(`[data-slate-leaf]`),y=null;if(v){if(l=v.closest(`[data-slate-node="text"]`),l){var b=Q.getWindow(e).document.createRange();b.setStart(l,0),b.setEnd(a,o);var x=b.cloneContents();[...Array.prototype.slice.call(x.querySelectorAll(`[data-slate-zero-width]`)),...Array.prototype.slice.call(x.querySelectorAll(`[contenteditable=false]`))].forEach(e=>{if(l_&&!r&&e.hasAttribute(`data-slate-zero-width`)&&e.textContent.length>0&&e.textContext!==``){e.textContent.startsWith(``)&&(e.textContent=e.textContent.slice(1));return}e.parentNode.removeChild(e)}),u=x.textContent.length,y=l}}else if(h){for(var S=h.querySelectorAll(`[data-slate-leaf]`),C=0;C<S.length;C++){var w=S[C];if(Q.hasDOMNode(e,w)){v=w;break}}v?(l=v.closest(`[data-slate-node="text"]`),y=v,u=y.textContent.length,y.querySelectorAll(`[data-slate-zero-width]`).forEach(e=>{u-=e.textContent.length})):u=1}else if(_){var T=e=>e?e.querySelectorAll(`[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])`):[],E=_.closest(`[data-slate-node="element"]`);(c===`backward`||!c)&&(v=[...T(E?.previousElementSibling),...T(E)].findLast(e=>n_(_,e))??null,v&&(c=`backward`)),(c===`forward`||!c)&&(v=[...T(E),...T(E?.nextElementSibling)].find(e=>r_(_,e))??null,v&&(c=`forward`)),v&&(l=v.closest(`[data-slate-node="text"]`),y=v,c===`forward`?u=0:(u=y.textContent.length,y.querySelectorAll(`[data-slate-zero-width]`).forEach(e=>{u-=e.textContent.length})))}y&&u===y.textContent.length&&l_&&y.getAttribute(`data-slate-zero-width`)===`z`&&(d=y.textContent)!=null&&d.startsWith(``)&&(s.hasAttribute(`data-slate-zero-width`)||u_&&(f=y.textContent)!=null&&f.endsWith(`
51
+
52
+ `))&&u--}if(l_&&!l&&!r){var D=s.hasAttribute(`data-slate-node`)?s:s.closest(`[data-slate-node]`);if(D&&Q.hasDOMNode(e,D,{editable:!0})){var O=Q.toSlateNode(e,D),k;try{k=Q.findPath(e,O)}catch(e){if(i)return null;throw e}var{path:A,offset:j}=Y.start(e,k);return D.querySelector(`[data-slate-leaf]`)||(j=o),{path:A,offset:j}}}if(!l){if(i)return null;throw Error(`Cannot resolve a Slate point from DOM point: ${t}`)}var M;try{M=Q.toSlateNode(e,l)}catch(e){if(i)return null;throw e}var N;try{N=Q.findPath(e,M)}catch(e){if(i)return null;throw e}return{path:N,offset:u}},toSlateRange:(e,t,n)=>{var r,{exactMatch:i,suppressThrow:a}=n,o=Ug(t)?t.anchorNode:t.startContainer,s,c,l,u,d;if(o){if(Ug(t)){if(u_&&t.rangeCount>1){l=t.focusNode;var f=t.getRangeAt(0),p=t.getRangeAt(t.rangeCount-1);if(l instanceof HTMLTableRowElement&&f.startContainer instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement){function e(t){return t.childElementCount>0?e(t.children[0]):t}var m=f.startContainer,h=p.startContainer,g=e(m.children[f.startOffset]),_=e(h.children[p.startOffset]);u=0,s=_.childNodes.length>0?_.childNodes[0]:_,l=g.childNodes.length>0?g.childNodes[0]:g,c=_ instanceof HTMLElement?_.innerHTML.length:0}else f.startContainer===l?(s=p.endContainer,c=p.endOffset,u=f.startOffset):(s=f.startContainer,c=f.endOffset,u=p.startOffset)}else s=t.anchorNode,c=t.anchorOffset,l=t.focusNode,u=t.focusOffset;d=p_&&qg(s)||u_?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed}else s=t.startContainer,c=t.startOffset,l=t.endContainer,u=t.endOffset,d=t.collapsed}if(s==null||l==null||c==null||u==null)throw Error(`Cannot resolve a Slate range from DOM range: ${t}`);u_&&(r=l.textContent)!=null&&r.endsWith(`
53
+
54
+ `)&&u===l.textContent.length&&u--;var v=Q.toSlatePoint(e,[s,c],{exactMatch:i,suppressThrow:a});if(!v)return null;var y=n_(s,l)||s===l&&u<c,b=d?v:Q.toSlatePoint(e,[l,u],{exactMatch:i,suppressThrow:a,searchDirection:y?`forward`:`backward`});if(!b)return null;var x={anchor:v,focus:b};return K.isExpanded(x)&&K.isForward(x)&&Vg(l)&&Y.void(e,{at:x.focus,mode:`highest`})&&(x=Y.unhangRange(e,x,{voids:!0})),x}};function Z_(e,t){var{path:n,diff:r}=t;if(!Y.hasPath(e,n))return!1;var i=q.get(e,n);if(!q.isText(i))return!1;if(r.start!==i.text.length||r.text.length===0)return i.text.slice(r.start,r.start+r.text.length)===r.text;var a=G.next(n);if(!Y.hasPath(e,a))return!1;var o=q.get(e,a);return q.isText(o)&&o.text.startsWith(r.text)}function Q_(e){return[...arguments].slice(1).reduce((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end),e)}function $_(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return n}function ev(e,t,n){for(var r=Math.min(e.length,t.length,n),i=0;i<r;i++)if(e.charAt(e.length-i-1)!==t.charAt(t.length-i-1))return i;return r}function tv(e,t){var{start:n,end:r,text:i}=t,a=e.slice(n,r),o=$_(a,i),s=ev(a,i,Math.min(a.length-o,i.length-o)),c={start:n+o,end:r-s,text:i.slice(o,i.length-s)};return c.start===c.end&&c.text.length===0?null:c}function nv(e,t,n){var r=Math.min(t.start,n.start),i=Math.max(0,Math.min(t.start+t.text.length,n.end)-n.start),a=Q_(e,t,n),o=Math.max(n.start+n.text.length,t.start+t.text.length+(t.start+t.text.length>n.start?n.text.length:0)-i),s=a.slice(r,o);return tv(e,{start:r,end:Math.max(t.end,n.end-t.text.length+(t.end-t.start)),text:s})}function rv(e){var{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function iv(e,t){var{path:n,offset:r}=t;if(!Y.hasPath(e,n))return null;var i=q.get(e,n);if(!q.isText(i))return null;var a=Y.above(e,{match:t=>q.isElement(t)&&Y.isBlock(e,t),at:n});if(!a)return null;for(;r>i.text.length;){var o=Y.next(e,{at:n,match:q.isText});if(!o||!G.isDescendant(o[1],a[1]))return null;r-=i.text.length,i=o[0],n=o[1]}return{path:n,offset:r}}function av(e,t){var n=iv(e,t.anchor);if(!n)return null;if(K.isCollapsed(t))return{anchor:n,focus:n};var r=iv(e,t.focus);return r?{anchor:n,focus:r}:null}function ov(e,t,n){var r=G_.get(e)?.find(e=>{var{path:n}=e;return G.equals(n,t.path)});if(!r||t.offset<=r.diff.start)return Op.transform(t,n,{affinity:`backward`});var{diff:i}=r;if(t.offset<=i.start+i.text.length){var a={path:t.path,offset:i.start},o=Op.transform(a,n,{affinity:`backward`});return o?{path:o.path,offset:o.offset+t.offset-i.start}:null}var s={path:t.path,offset:t.offset-i.text.length+i.end-i.start},c=Op.transform(s,n,{affinity:`backward`});return c?n.type===`split_node`&&G.equals(n.path,t.path)&&s.offset<n.position&&i.start<n.position?c:{path:c.path,offset:c.offset+i.text.length-i.end+i.start}:null}function sv(e,t,n){var r=ov(e,t.anchor,n);if(!r)return null;if(K.isCollapsed(t))return{anchor:r,focus:r};var i=ov(e,t.focus,n);return i?{anchor:r,focus:i}:null}function cv(e,t){var{path:n,diff:r,id:i}=e;switch(t.type){case`insert_text`:return!G.equals(t.path,n)||t.offset>=r.end?e:t.offset<=r.start?{diff:{start:t.text.length+r.start,end:t.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+t.text.length,text:r.text},id:i,path:n};case`remove_text`:return!G.equals(t.path,n)||t.offset>=r.end?e:t.offset+t.text.length<=r.start?{diff:{start:r.start-t.text.length,end:r.end-t.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-t.text.length,text:r.text},id:i,path:n};case`split_node`:return!G.equals(t.path,n)||t.position>=r.end?{diff:r,id:i,path:G.transform(n,t,{affinity:`backward`})}:t.position>r.start?{diff:{start:r.start,end:Math.min(t.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-t.position,end:r.end-t.position,text:r.text},id:i,path:G.transform(n,t,{affinity:`forward`})};case`merge_node`:return G.equals(t.path,n)?{diff:{start:r.start+t.position,end:r.end+t.position,text:r.text},id:i,path:G.transform(n,t)}:{diff:r,id:i,path:G.transform(n,t)}}var a=G.transform(n,t);return a?{diff:r,path:a,id:i}:null}var lv=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},uv=(e,t,n)=>{var r=Q.toDOMRange(e,t).getBoundingClientRect(),i=Q.toDOMRange(e,n).getBoundingClientRect();return lv(r,i)&&lv(i,r)},dv=(e,t)=>{var n=Y.range(e,K.end(t)),r=Array.from(Y.positions(e,{at:t})),i=0,a=r.length,o=Math.floor(a/2);if(uv(e,Y.range(e,r[i]),n))return Y.range(e,r[i],n);if(r.length<2)return Y.range(e,r[r.length-1],n);for(;o!==r.length&&o!==i;)uv(e,Y.range(e,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return Y.range(e,r[i],n)};function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fv(Object(n),!0).forEach(function(t){w_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var mv=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`x-slate-fragment`,n=e,{apply:r,onChange:i,deleteBackward:a,addMark:o,removeMark:s}=n;return I_.set(n,new WeakMap),n.addMark=(e,t)=>{var r,i;(r=H_.get(n))==null||r(),!U_.get(n)&&(i=G_.get(n))!=null&&i.length&&U_.set(n,null),W_.delete(n),o(e,t)},n.removeMark=e=>{var t;!U_.get(n)&&(t=G_.get(n))!=null&&t.length&&U_.set(n,null),W_.delete(n),s(e)},n.deleteBackward=e=>{if(e!==`line`)return a(e);if(n.selection&&K.isCollapsed(n.selection)){var t=Y.above(n,{match:e=>q.isElement(e)&&Y.isBlock(n,e),at:n.selection});if(t){var[,r]=t,i=dv(n,Y.range(n,r,n.selection.anchor));K.isCollapsed(i)||Z.delete(n,{at:i})}}},n.apply=t=>{var i=[],a=[],o=G_.get(n);if(o!=null&&o.length){var s=o.map(e=>cv(e,t)).filter(Boolean);G_.set(n,s)}var c=q_.get(n);c&&q_.set(n,sv(n,c,t));var l=K_.get(n);if(l!=null&&l.at){var u=X.isPoint(l?.at)?ov(n,l.at,t):sv(n,l.at,t);K_.set(n,u?pv(pv({},l),{},{at:u}):null)}switch(t.type){case`insert_text`:case`remove_text`:case`set_node`:case`split_node`:i.push(...hv(n,t.path));break;case`set_selection`:var d;(d=B_.get(n))==null||d.unref(),B_.delete(n);break;case`insert_node`:case`remove_node`:i.push(...hv(n,G.parent(t.path)));break;case`merge_node`:var f=G.previous(t.path);i.push(...hv(n,f));break;case`move_node`:var p=G.common(G.parent(t.path),G.parent(t.newPath));i.push(...hv(n,p));var m;G.isBefore(t.path,t.newPath)?(i.push(...hv(n,G.parent(t.path))),m=t.newPath):(i.push(...hv(n,G.parent(t.newPath))),m=t.path);var h=q.get(e,G.parent(m)),g=Q.findKey(n,h),_=Y.pathRef(n,G.parent(m));a.push([_,g])}switch(r(t),t.type){case`insert_node`:case`remove_node`:case`merge_node`:case`move_node`:case`split_node`:case`insert_text`:case`remove_text`:case`set_selection`:D_.set(n,!0)}for(var[v,y]of i){var[b]=Y.node(n,v);F_.set(b,y)}for(var[x,S]of a){if(x.current){var[C]=Y.node(n,x.current);F_.set(C,S)}x.unref()}},n.setFragmentData=e=>{var{selection:r}=n;if(r){var[i,a]=K.edges(r),o=Y.void(n,{at:i.path}),s=Y.void(n,{at:a.path});if(!(K.isCollapsed(r)&&!o)){var c=Q.toDOMRange(n,r),l=c.cloneContents(),u=l.childNodes[0];if(l.childNodes.forEach(e=>{e.textContent&&e.textContent.trim()!==``&&(u=e)}),s){var[d]=s,f=c.cloneRange(),p=Q.toDOMNode(n,d);f.setEndAfter(p),l=f.cloneContents()}if(o&&(u=l.querySelector(`[data-slate-spacer]`)),Array.from(l.querySelectorAll(`[data-slate-zero-width]`)).forEach(e=>{e.textContent=e.getAttribute(`data-slate-zero-width`)===`n`?`
55
+ `:``}),Wg(u)){var m=u.ownerDocument.createElement(`span`);m.style.whiteSpace=`pre`,m.appendChild(u),l.appendChild(m),u=m}var h=n.getFragment(),g=JSON.stringify(h),_=window.btoa(encodeURIComponent(g));u.setAttribute(`data-slate-fragment`,_),e.setData(`application/${t}`,_);var v=l.ownerDocument.createElement(`div`);return v.appendChild(l),v.setAttribute(`hidden`,`true`),l.ownerDocument.body.appendChild(v),e.setData(`text/html`,v.innerHTML),e.setData(`text/plain`,Xg(v)),l.ownerDocument.body.removeChild(v),e}}},n.insertData=e=>{n.insertFragmentData(e)||n.insertTextData(e)},n.insertFragmentData=e=>{var r=e.getData(`application/${t}`)||Qg(e);if(r){var i=decodeURIComponent(window.atob(r)),a=JSON.parse(i);return n.insertFragment(a),!0}return!1},n.insertTextData=e=>{var t=e.getData(`text/plain`);if(t){var r=t.split(/\r\n|\r|\n/),i=!1;for(var a of r)i&&Z.splitNodes(n,{always:!0}),n.insertText(a),i=!0;return!0}return!1},n.onChange=e=>{var t=V_.get(n);t&&t(e),i(e)},n},hv=(e,t)=>{var n=[];for(var[r,i]of Y.levels(e,{at:t})){var a=Q.findKey(e,r);n.push([i,a])}return n},gv={bold:`mod+b`,compose:[`down`,`left`,`right`,`up`,`backspace`,`enter`],moveBackward:`left`,moveForward:`right`,moveWordBackward:`ctrl+left`,moveWordForward:`ctrl+right`,deleteBackward:`shift?+backspace`,deleteForward:`shift?+delete`,extendBackward:`shift+left`,extendForward:`shift+right`,italic:`mod+i`,insertSoftBreak:`shift+enter`,splitBlock:`enter`,undo:`mod+z`},_v={moveLineBackward:`opt+up`,moveLineForward:`opt+down`,moveWordBackward:`opt+left`,moveWordForward:`opt+right`,deleteBackward:[`ctrl+backspace`,`ctrl+h`],deleteForward:[`ctrl+delete`,`ctrl+d`],deleteLineBackward:`cmd+shift?+backspace`,deleteLineForward:[`cmd+shift?+delete`,`ctrl+k`],deleteWordBackward:`opt+shift?+backspace`,deleteWordForward:`opt+shift?+delete`,extendLineBackward:`opt+shift+up`,extendLineForward:`opt+shift+down`,redo:`cmd+shift+z`,transposeCharacter:`ctrl+t`},vv={deleteWordBackward:`ctrl+shift?+backspace`,deleteWordForward:`ctrl+shift?+delete`,redo:[`ctrl+y`,`ctrl+shift+z`]},yv=e=>{var t=gv[e],n=_v[e],r=vv[e],i=t&&(0,Ig.isHotkey)(t),a=n&&(0,Ig.isHotkey)(n),o=r&&(0,Ig.isHotkey)(r);return e=>!!(i&&i(e)||c_&&a&&a(e)||!c_&&o&&o(e))},bv={isBold:yv(`bold`),isCompose:yv(`compose`),isMoveBackward:yv(`moveBackward`),isMoveForward:yv(`moveForward`),isDeleteBackward:yv(`deleteBackward`),isDeleteForward:yv(`deleteForward`),isDeleteLineBackward:yv(`deleteLineBackward`),isDeleteLineForward:yv(`deleteLineForward`),isDeleteWordBackward:yv(`deleteWordBackward`),isDeleteWordForward:yv(`deleteWordForward`),isExtendBackward:yv(`extendBackward`),isExtendForward:yv(`extendForward`),isExtendLineBackward:yv(`extendLineBackward`),isExtendLineForward:yv(`extendLineForward`),isItalic:yv(`italic`),isMoveLineBackward:yv(`moveLineBackward`),isMoveLineForward:yv(`moveLineForward`),isMoveWordBackward:yv(`moveWordBackward`),isMoveWordForward:yv(`moveWordForward`),isRedo:yv(`redo`),isSoftBreak:yv(`insertSoftBreak`),isSplitBlock:yv(`splitBlock`),isTransposeCharacter:yv(`transposeCharacter`),isUndo:yv(`undo`)};function xv(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Sv(e,t){if(e==null)return{};var n=xv(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Cv=[`anchor`,`focus`],wv=[`anchor`,`focus`];function Tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ev(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Tv(Object(n),!0).forEach(function(t){w_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Dv=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),Ov=(e,t)=>{var{anchor:n,focus:r}=e,i=Sv(e,Cv),{anchor:a,focus:o}=t,s=Sv(t,wv);return e[Y_]===t[Y_]&&Dv(i,s)},kv=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(!K.equals(r,i)||!Ov(r,i))return!1}return!0},Av=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!Ov(r,i))return!1}return!0},jv=(e,t,n)=>{var r=Array.from(t.children,()=>[]);if(n.length===0)return r;var i=Q.findPath(e,t),a=i.length,o=Y.range(e,i),s=Array(t.children.length),c=t=>{var n=s[t];if(n)return n;var r=Y.range(e,[...i,t]);return s[t]=r,r};for(var l of n){var u=K.intersection(o,l);if(u)for(var[d,f]=K.edges(u),p=d.path[a],m=f.path[a],h=p;h<=m;h++){var g=r[h];if(g){var _=c(h),v=K.intersection(_,l);v&&g.push(Ev(Ev({},l),v))}}}return r},Mv=[],Nv=function(){return Mv.some(function(e){return e.activeTargets.length>0})},Pv=function(){return Mv.some(function(e){return e.skippedTargets.length>0})},Fv=`ResizeObserver loop completed with undelivered notifications.`,Iv=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:Fv}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=Fv),window.dispatchEvent(e)},Lv;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(Lv||={});var Rv=function(e){return Object.freeze(e)},zv=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,Rv(this)}return e}(),Bv=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Rv(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Vv=function(e){return e instanceof SVGElement&&`getBBox`in e},Hv=function(e){if(Vv(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},Uv=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},Wv=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},Gv=typeof window<`u`?window:{},Kv=new WeakMap,qv=/auto|scroll/,Jv=/^tb|vertical/,Yv=/msie|trident/i.test(Gv.navigator&&Gv.navigator.userAgent),Xv=function(e){return parseFloat(e||`0`)},Zv=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new zv((n?t:e)||0,(n?e:t)||0)},Qv=Rv({devicePixelContentBoxSize:Zv(),borderBoxSize:Zv(),contentBoxSize:Zv(),contentRect:new Bv(0,0,0,0)}),$v=function(e,t){if(t===void 0&&(t=!1),Kv.has(e)&&!t)return Kv.get(e);if(Hv(e))return Kv.set(e,Qv),Qv;var n=getComputedStyle(e),r=Vv(e)&&e.ownerSVGElement&&e.getBBox(),i=!Yv&&n.boxSizing===`border-box`,a=Jv.test(n.writingMode||``),o=!r&&qv.test(n.overflowY||``),s=!r&&qv.test(n.overflowX||``),c=r?0:Xv(n.paddingTop),l=r?0:Xv(n.paddingRight),u=r?0:Xv(n.paddingBottom),d=r?0:Xv(n.paddingLeft),f=r?0:Xv(n.borderTopWidth),p=r?0:Xv(n.borderRightWidth),m=r?0:Xv(n.borderBottomWidth),h=r?0:Xv(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:Xv(n.width)-S-x,T=r?r.height:Xv(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=Rv({devicePixelContentBoxSize:Zv(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:Zv(E,D,a),contentBoxSize:Zv(w,T,a),contentRect:new Bv(d,c,w,T)});return Kv.set(e,O),O},ey=function(e,t,n){var r=$v(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case Lv.DEVICE_PIXEL_CONTENT_BOX:return o;case Lv.BORDER_BOX:return i;default:return a}},ty=function(){function e(e){var t=$v(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Rv([t.borderBoxSize]),this.contentBoxSize=Rv([t.contentBoxSize]),this.devicePixelContentBoxSize=Rv([t.devicePixelContentBoxSize])}return e}(),ny=function(e){if(Hv(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ry=function(){var e=1/0,t=[];Mv.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new ty(t.target),i=ny(t.target);r.push(n),t.lastReportedSize=ey(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},iy=function(e){Mv.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(ny(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},ay=function(){var e=0;for(iy(e);Nv();)e=ry(),iy(e);return Pv()&&Iv(),e>0},oy,sy=[],cy=function(){return sy.splice(0).forEach(function(e){return e()})},ly=function(e){if(!oy){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return cy()}).observe(n,{characterData:!0}),oy=function(){n.textContent=`${t?t--:t++}`}}sy.push(e),oy()},uy=function(e){ly(function(){requestAnimationFrame(e)})},dy=0,fy=function(){return!!dy},py=250,my={attributes:!0,characterData:!0,childList:!0,subtree:!0},hy=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],gy=function(e){return e===void 0&&(e=0),Date.now()+e},_y=!1,vy=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=py),!_y){_y=!0;var n=gy(e);uy(function(){var r=!1;try{r=ay()}finally{if(_y=!1,e=n-gy(),!fy())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,my)};document.body?t():Gv.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),hy.forEach(function(t){return Gv.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),hy.forEach(function(t){return Gv.removeEventListener(t,e.listener,!0)}),!0)},e}()),yy=function(e){!dy&&e>0&&vy.start(),dy+=e,!dy&&vy.stop()},by=function(e){return!Vv(e)&&!Wv(e)&&getComputedStyle(e).display===`inline`},xy=function(){function e(e,t){this.target=e,this.observedBox=t||Lv.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=ey(this.target,this.observedBox,!0);return by(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Sy=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Cy=new WeakMap,wy=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ty=function(){function e(){}return e.connect=function(e,t){var n=new Sy(e,t);Cy.set(e,n)},e.observe=function(e,t,n){var r=Cy.get(e),i=r.observationTargets.length===0;wy(r.observationTargets,t)<0&&(i&&Mv.push(r),r.observationTargets.push(new xy(t,n&&n.box)),yy(1),vy.schedule())},e.unobserve=function(e,t){var n=Cy.get(e),r=wy(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&Mv.splice(Mv.indexOf(n),1),n.observationTargets.splice(r,1),yy(-1))},e.disconnect=function(e){var t=this,n=Cy.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Ey=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Ty.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Uv(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ty.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Uv(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ty.unobserve(this,e)},e.prototype.disconnect=function(){Ty.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}();function Dy(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Oy(e,t){if(e==null)return{};var n=Dy(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ky(e){"@babel/helpers - typeof";return ky=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ky(e)}function Ay(e,t){if(ky(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ky(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function jy(e){var t=Ay(e,`string`);return ky(t)===`symbol`?t:String(t)}function My(e,t,n){return t=jy(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ny=(0,M.createContext)(null),Py=()=>{var e=(0,M.useContext)(Ny);if(!e)throw Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},$=Q;function Fy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Iy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fy(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ly=25,Ry=200,zy=e=>e?.constructor.name===`DataTransfer`;function By(e){var{editor:t,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=e,i=!1,a=null,o=null,s=null,c=0,l=!1,u=()=>{var e=q_.get(t);if(q_.delete(t),e){var{selection:n}=t,r=av(t,e);r&&(!n||!K.equals(r,n))&&Z.select(t,r)}},d=()=>{var e=K_.get(t);if(K_.delete(t),e){if(e.at){var n=X.isPoint(e.at)?iv(t,e.at):av(t,e.at);if(!n)return;var r=Y.range(t,n);(!t.selection||!K.equals(t.selection,r))&&Z.select(t,n)}e.run()}},f=()=>{if(o&&=(clearTimeout(o),null),s&&=(clearTimeout(s),null),!b()&&!y()){u();return}i||(i=!0,setTimeout(()=>i=!1)),y()&&(i=`action`);var e=t.selection&&Y.rangeRef(t,t.selection,{affinity:`forward`});W_.set(t,t.marks),K_.get(t),G_.get(t);for(var a=b(),c;c=(f=G_.get(t))?.[0];){var f,p=U_.get(t);p!==void 0&&(U_.delete(t),t.marks=p),p&&l===!1&&(l=null);var m=rv(c);(!t.selection||!K.equals(t.selection,m))&&Z.select(t,m),c.diff.text?Y.insertText(t,c.diff.text):Y.deleteFragment(t),G_.set(t,G_.get(t)?.filter(e=>{var{id:t}=e;return t!==c.id})),Z_(t,c)||(a=!1,K_.delete(t),W_.delete(t),i=`action`,q_.delete(t),n.cancel(),r.cancel(),e?.unref())}var h=e?.unref();if(h&&!q_.get(t)&&(!t.selection||!K.equals(h,t.selection))&&Z.select(t,h),y()){d();return}a&&n(),n.flush(),r.flush(),u();var g=W_.get(t);W_.delete(t),g!==void 0&&(t.marks=g,t.onChange())},p=e=>{a&&clearTimeout(a),a=setTimeout(()=>{z_.set(t,!1),f()},Ly)},m=e=>{z_.set(t,!0),a&&=(clearTimeout(a),null)},h=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=M_.get(t);if(n){if(b()||e){n.style.display=`none`;return}n.style.removeProperty(`display`)}},g=(e,n)=>{var r=G_.get(t)??[];G_.set(t,r);var i=q.leaf(t,e),a=r.findIndex(t=>G.equals(t.path,e));if(a<0){tv(i.text,n)&&r.push({path:e,diff:n,id:c++}),h();return}var o=nv(i.text,r[a].diff,n);if(!o){r.splice(a,1),h();return}r[a]=Iy(Iy({},r[a]),{},{diff:o})},_=function(e){var{at:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,q_.delete(t),n.cancel(),r.cancel(),y()&&f(),K_.set(t,{at:i,run:e}),s=setTimeout(f)},v=e=>{if(o&&=(clearTimeout(o),null),!D_.get(t)){var{inputType:n}=e,r=null,i=e.dataTransfer||e.data||void 0;l!==!1&&n!==`insertText`&&n!==`insertCompositionText`&&(l=!1);var[a]=e.getTargetRanges();a&&(r=$.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!0}));var s=$.getWindow(t).getSelection();if(!r&&s&&(a=s,r=$.toSlateRange(t,s,{exactMatch:!1,suppressThrow:!0})),r??=t.selection,r){var c=!0;if(n.startsWith(`delete`)){var u=n.endsWith(`Backward`)?`backward`:`forward`,[d,f]=K.edges(r),[p,m]=Y.leaf(t,d.path);if(K.isExpanded(r)&&p.text.length===d.offset&&f.offset===0){var h=Y.next(t,{at:d.path,match:q.isText});h&&G.equals(h[1],f.path)&&(u===`backward`?(r={anchor:f,focus:f},d=f,[p,m]=h):(r={anchor:d,focus:d},f=d))}var v={text:``,start:d.offset,end:f.offset},y=G_.get(t)?.find(e=>G.equals(e.path,m)),b=y?[y.diff,v]:[v];if(Q_(p.text,...b).length===0&&(c=!1),K.isExpanded(r)){if(c&&G.equals(r.anchor.path,r.focus.path)){var x={path:r.anchor.path,offset:d.offset};return C(Y.range(t,x,x)),g(r.anchor.path,{text:``,end:f.offset,start:d.offset})}return _(()=>Y.deleteFragment(t,{direction:u}),{at:r})}}switch(n){case`deleteByComposition`:case`deleteByCut`:case`deleteByDrag`:return _(()=>Y.deleteFragment(t),{at:r});case`deleteContent`:case`deleteContentForward`:var{anchor:S}=r;if(c&&K.isCollapsed(r)){var w=q.leaf(t,S.path);if(S.offset<w.text.length)return g(S.path,{text:``,start:S.offset,end:S.offset+1})}return _(()=>Y.deleteForward(t),{at:r});case`deleteContentBackward`:var T,{anchor:D}=r,O=Ug(a)?a.isCollapsed:!!((T=a)!=null&&T.collapsed);return c&&O&&K.isCollapsed(r)&&D.offset>0?g(D.path,{text:``,start:D.offset-1,end:D.offset}):_(()=>Y.deleteBackward(t),{at:r});case`deleteEntireSoftLine`:return _(()=>{Y.deleteBackward(t,{unit:`line`}),Y.deleteForward(t,{unit:`line`})},{at:r});case`deleteHardLineBackward`:return _(()=>Y.deleteBackward(t,{unit:`block`}),{at:r});case`deleteSoftLineBackward`:return _(()=>Y.deleteBackward(t,{unit:`line`}),{at:r});case`deleteHardLineForward`:return _(()=>Y.deleteForward(t,{unit:`block`}),{at:r});case`deleteSoftLineForward`:return _(()=>Y.deleteForward(t,{unit:`line`}),{at:r});case`deleteWordBackward`:return _(()=>Y.deleteBackward(t,{unit:`word`}),{at:r});case`deleteWordForward`:return _(()=>Y.deleteForward(t,{unit:`word`}),{at:r});case`insertLineBreak`:return _(()=>Y.insertSoftBreak(t),{at:r});case`insertParagraph`:return _(()=>Y.insertBreak(t),{at:r});case`insertCompositionText`:case`deleteCompositionText`:case`insertFromComposition`:case`insertFromDrop`:case`insertFromPaste`:case`insertFromYank`:case`insertReplacementText`:case`insertText`:if(zy(i))return _(()=>$.insertData(t,i),{at:r});var k=i??``;if(U_.get(t)&&(k=k.replace(``,``)),n===`insertText`&&/.*\n.*\n$/.test(k)&&(k=k.slice(0,-1)),k.includes(`
56
+ `))return _(()=>{var e=k.split(`
57
+ `);e.forEach((n,r)=>{n&&Y.insertText(t,n),r!==e.length-1&&Y.insertSoftBreak(t)})},{at:r});if(G.equals(r.anchor.path,r.focus.path)){var[A,j]=K.edges(r),M={start:A.offset,end:j.offset,text:k};if(k&&l&&n===`insertCompositionText`){var N=l.start+l.text.search(/\S|$/);M.start+M.text.search(/\S|$/)===N+1&&M.end===l.start+l.text.length?(--M.start,l=null,E()):l=!1}else l=n===`insertText`?l===null?M:l&&K.isCollapsed(r)&&l.end+l.text.length===A.offset?Iy(Iy({},l),{},{text:l.text+k}):!1:!1;if(c){var ee=t.selection;if(g(A.path,M),ee){var te={path:A.path,offset:A.offset+k.length};_(()=>{Z.select(t,{anchor:te,focus:te})},{at:te})}return}}return _(()=>Y.insertText(t,k),{at:r})}}}},y=()=>!!K_.get(t),b=()=>{var e;return!!((e=G_.get(t))!=null&&e.length)},x=()=>y()||b(),S=()=>i,C=e=>{q_.set(t,e),o&&=(clearTimeout(o),null);var{selection:n}=t;if(e){var r=!n||!G.equals(n.anchor.path,e.anchor.path),i=!n||!G.equals(n.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(r&&l||i)&&(l=!1),(r||b())&&(o=setTimeout(f,Ry))}},w=()=>{(y()||!b())&&f()},T=e=>{b()||(h(!0),setTimeout(h))},E=()=>{y()||(s=setTimeout(f))};return{flush:f,scheduleFlush:E,hasPendingDiffs:b,hasPendingAction:y,hasPendingChanges:x,isFlushing:S,handleUserSelect:C,handleCompositionEnd:p,handleCompositionStart:m,handleDOMBeforeInput:v,handleKeyDown:T,handleDomMutations:e=>{if(!(b()||y())&&e.some(n=>e_(t,n,e))){var n;(n=J_.get(t))==null||n()}},handleInput:w}}function Vy(){var e=(0,M.useRef)(!1);return(0,M.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Hy=y_?M.useLayoutEffect:M.useEffect;function Uy(e,t,n){var[r]=(0,M.useState)(()=>new MutationObserver(t));Hy(()=>{r.takeRecords()}),(0,M.useEffect)(()=>{if(!e.current)throw Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}var Wy=[`node`];function Gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ky(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gy(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var qy={subtree:!0,childList:!0,characterData:!0},Jy=l_?e=>{var{node:t}=e,n=Oy(e,Wy);if(!l_)return null;var r=Py(),i=Vy(),[a]=(0,M.useState)(()=>By(Ky({editor:r},n)));return Uy(t,a.handleDomMutations,qy),H_.set(r,a.scheduleFlush),i&&a.flush(),a}:()=>null;function Yy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yy(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Zy=e=>{var{isLast:t,leaf:n,parent:r,text:i}=e,a=Py(),o=$.findPath(a,i),s=G.parent(o),c=!!n[X_];return a.isVoid(r)?M.createElement(eb,{length:q.string(r).length}):n.text===``&&r.children[r.children.length-1]===i&&!a.isInline(r)&&Y.string(a,s)===``?M.createElement(eb,{isLineBreak:!0,isMarkPlaceholder:c}):n.text===``?M.createElement(eb,{isMarkPlaceholder:c}):t&&n.text.slice(-1)===`
58
+ `?M.createElement(Qy,{isTrailing:!0,text:n.text}):M.createElement(Qy,{text:n.text})},Qy=e=>{var{text:t,isTrailing:n=!1}=e,r=(0,M.useRef)(null),i=()=>`${t??``}${n?`
59
+ `:``}`,[a]=(0,M.useState)(i);return Hy(()=>{var e=i();r.current&&r.current.textContent!==e&&(r.current.textContent=e)}),M.createElement($y,{ref:r},a)},$y=(0,M.memo)((0,M.forwardRef)((e,t)=>M.createElement(`span`,{"data-slate-string":!0,ref:t},e.children))),eb=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,i={"data-slate-zero-width":n?`n`:`z`,"data-slate-length":t};return r&&(i[`data-slate-mark-placeholder`]=!0),M.createElement(`span`,Xy({},i),!l_||!n?``:null,n?M.createElement(`br`,null):null)};function tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tb(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var rb=l_?300:0;function ib(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ab(e){e.current&&=(clearTimeout(e.current),null)}var ob=e=>M.createElement(cb,nb({},e)),sb=M.memo(e=>{var{leaf:t,isLast:n,text:r,parent:i,renderPlaceholder:a,renderLeaf:o=ob,leafPosition:s}=e,c=Py(),l=(0,M.useRef)(null),u=(0,M.useRef)(null),[d,f]=(0,M.useState)(!1),p=(0,M.useRef)(null),m=(0,M.useCallback)(e=>{if(ib(l,e==null),e==null){var n;M_.delete(c),(n=t.onPlaceholderResize)==null||n.call(t,null)}else M_.set(c,e),l.current||=new(window.ResizeObserver||Ey)(()=>{var n;(n=t.onPlaceholderResize)==null||n.call(t,e)}),l.current.observe(e),u.current=e},[u,t,c]),h=M.createElement(Zy,{isLast:n,leaf:t,parent:i,text:r}),g=!!t[Y_];if((0,M.useEffect)(()=>(g?p.current||=setTimeout(()=>{f(!0),p.current=null},rb):(ab(p),f(!1)),()=>ab(p)),[g,f]),g&&d){var _={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:`absolute`,top:0,pointerEvents:`none`,width:`100%`,maxWidth:`100%`,display:`block`,opacity:`0.333`,userSelect:`none`,textDecoration:`none`,WebkitUserModify:d_?`inherit`:void 0},contentEditable:!1,ref:m}};h=M.createElement(M.Fragment,null,h,a(_))}return o({attributes:{"data-slate-leaf":!0},children:h,leaf:t,text:r,leafPosition:s})},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Fp.equals(t.leaf,e.leaf)&&t.leaf[Y_]===e.leaf[Y_]),cb=e=>{var{attributes:t,children:n}=e;return M.createElement(`span`,nb({},t),n)};function lb(e,t){var[,n]=(0,M.useReducer)(e=>e+1,0),r=(0,M.useRef)(),i=(0,M.useRef)(()=>null),a=(0,M.useRef)(null),o;try{if(e!==i.current||r.current){var s=e();o=t(a.current,s)?a.current:s}else o=a.current}catch(e){throw r.current&&ub(e)&&(e.message+=`
60
+ The error may be correlated with this previous error:
61
+ ${r.current.stack}
62
+
63
+ `),e}i.current=e,a.current=o,r.current=void 0;var c=(0,M.useCallback)(()=>{try{var e=i.current();if(t(a.current,e))return;a.current=e}catch(e){r.current=e instanceof Error?e:Error(String(e))}n()},[]);return[o,c]}function ub(e){return e instanceof Error}var db=(0,M.createContext)({}),fb=(e,t)=>{var n=Py(),{decorate:r,addEventListener:i}=(0,M.useContext)(db),[a,o]=lb(()=>r([e,$.findPath(n,e)]),q.isText(e)?Av:kv);return Hy(()=>{var e=i(o);return o(),e},[i,o]),(0,M.useMemo)(()=>[...a,...t],[a,t])},pb=e=>{var[,t]=(0,M.useReducer)(e=>e+1,0),n=(0,M.useRef)(new Set),r=(0,M.useRef)(!1),i=(0,M.useRef)(e);Hy(()=>{if(i.current=e,n.current.forEach(e=>e()),!r.current){r.current=!0;return}t()},[e]);var a=(0,M.useCallback)(e=>i.current(e),[]),o=(0,M.useCallback)(e=>(n.current.add(e),()=>{n.current.delete(e)}),[]);return(0,M.useMemo)(()=>({decorate:a,addEventListener:o}),[a,o])};function mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mb(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gb=e=>M.createElement(vb,hb({},e)),_b=M.memo(e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:a,renderText:o=gb,text:s}=e,c=Py(),l=(0,M.useRef)(null),u=fb(s,t),d=Fp.decorations(s,u),f=$.findKey(c,s),p=[],m=0;m<d.length;m++){var{leaf:h,position:g}=d[m];p.push(M.createElement(sb,{isLast:n&&m===d.length-1,key:`${f.id}-${m}`,renderPlaceholder:i,leaf:h,leafPosition:g,text:s,parent:r,renderLeaf:a}))}return o({text:s,children:p,attributes:{"data-slate-node":`text`,ref:(0,M.useCallback)(e=>{var t=I_.get(c);e?(t?.set(f,e),P_.set(s,e),N_.set(e,s)):(t?.delete(f),P_.delete(s),l.current&&N_.delete(l.current)),l.current=e},[l,c,f,s])}})},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Av(t.decorations,e.decorations)),vb=e=>{var{attributes:t,children:n}=e;return M.createElement(`span`,hb({},t),n)};function yb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yb(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xb=e=>M.createElement(Cb,bb({},e)),Sb=M.memo(e=>{var{decorations:t,element:n,renderElement:r=xb,renderChunk:i,renderPlaceholder:a,renderLeaf:o,renderText:s}=e,c=Py(),l=Vb(),u=c.isInline(n),d=fb(n,t),f=$.findKey(c,n),p=(0,M.useCallback)(e=>{var t=I_.get(c);e?(t?.set(f,e),P_.set(n,e),N_.set(e,n)):(t?.delete(f),P_.delete(n))},[c,f,n]),m=Rb({decorations:d,node:n,renderElement:r,renderChunk:i,renderPlaceholder:a,renderLeaf:o,renderText:s}),h={"data-slate-node":`element`,ref:p};if(u&&(h[`data-slate-inline`]=!0),!u&&Y.hasInlines(c,n)){var g=q.string(n),_=(0,Tg.default)(g);_===`rtl`&&(h.dir=_)}if(Y.isVoid(c,n)){h[`data-slate-void`]=!0,!l&&u&&(h.contentEditable=!1);var v=u?`span`:`div`,[[y]]=q.texts(n);m=M.createElement(v,{"data-slate-spacer":!0,style:{height:`0`,color:`transparent`,outline:`none`,position:`absolute`}},M.createElement(_b,{renderPlaceholder:a,decorations:[],isLast:!1,parent:n,text:y})),O_.set(y,0),k_.set(y,n)}return r({attributes:h,children:m,element:n})},(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&kv(e.decorations,t.decorations)),Cb=e=>{var{attributes:t,children:n,element:r}=e,i=Py().isInline(r)?`span`:`div`;return M.createElement(i,bb(bb({},t),{},{style:{position:`relative`}}),n)},wb=class{constructor(e,t){var{chunkSize:n,debug:r}=t;My(this,`root`,void 0),My(this,`chunkSize`,void 0),My(this,`debug`,void 0),My(this,`reachedEnd`,void 0),My(this,`pointerChunk`,void 0),My(this,`pointerIndex`,void 0),My(this,`pointerIndexStack`,void 0),My(this,`cachedPointerNode`,void 0),this.root=e,this.chunkSize=n,this.debug=r??!1,this.pointerChunk=e,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}readLeaf(){if(this.reachedEnd)return null;for(;;)if(this.pointerIndex+1<this.pointerSiblings.length){this.pointerIndex++,this.cachedPointerNode=void 0;break}else if(this.pointerChunk.type===`root`)return this.reachedEnd=!0,null;else this.exitChunk();return this.validateState(),this.enterChunkUntilLeaf(!1),this.pointerNode}returnToPreviousLeaf(){if(this.reachedEnd){this.reachedEnd=!1,this.enterChunkUntilLeaf(!0);return}for(;;)if(this.pointerIndex>=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}else if(this.pointerChunk.type===`root`){this.pointerIndex=-1;return}else this.exitChunk();this.validateState(),this.enterChunkUntilLeaf(!0)}insertBefore(e){this.returnToPreviousLeaf(),this.insertAfter(e),this.readLeaf()}insertAfter(e){if(e.length!==0){for(var t=0,n=0;this.pointerChunk.type===`chunk`&&this.pointerIndex===this.pointerSiblings.length-1;){var r=this.chunkSize-this.pointerSiblings.length,i=Math.min(r,e.length);if(i>0){var a=e.splice(0,i);this.rawInsertAfter(a,t)}this.exitChunk(),t++}if(e.length!==0){var o=this.savePointer(),s=null;if(this.readLeaf())for(;this.pointerChunk.type===`chunk`&&this.pointerIndex===0;){var c=this.chunkSize-this.pointerSiblings.length,l=Math.min(c,e.length);if(l>0){var u=e.splice(-l,l);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(u,n),s||=this.savePointer()}this.exitChunk(),n++}this.restorePointer(o);var d=Math.max(t,n);this.rawInsertAfter(e,d),s&&this.restorePointer(s),this.validateState()}}}remove(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,this.pointerSiblings.length===0&&this.pointerChunk.type===`chunk`?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}invalidateChunk(){for(var e=this.pointerChunk;e.type===`chunk`;e=e.parent)this.root.modifiedChunks.add(e)}get atStart(){return this.pointerChunk.type===`root`&&this.pointerIndex===-1}get pointerSiblings(){return this.pointerChunk.children}getPointerNode(){return this.reachedEnd||this.pointerIndex===-1?null:this.pointerSiblings[this.pointerIndex]}get pointerNode(){if(this.cachedPointerNode!==void 0)return this.cachedPointerNode;var e=this.getPointerNode();return this.cachedPointerNode=e,e}getChunkPath(e){for(var t=[],n=e;n.type===`chunk`;n=n.parent){var r=n.parent.children.indexOf(n);if(r===-1)return null;t.unshift(r)}return t}savePointer(){if(this.atStart)return`start`;if(!this.pointerNode)throw Error(`Cannot save pointer when pointerNode is null`);return{chunk:this.pointerChunk,node:this.pointerNode}}restorePointer(e){if(e===`start`){this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.cachedPointerNode=void 0;return}var{chunk:t,node:n}=e,r=t.children.indexOf(n);if(r===-1)throw Error(`Cannot restore point because saved node is no longer in saved chunk`);var i=this.getChunkPath(t);if(!i)throw Error(`Cannot restore point because saved chunk is no longer connected to root`);this.pointerChunk=t,this.pointerIndex=r,this.pointerIndexStack=i,this.reachedEnd=!1,this.cachedPointerNode=n,this.validateState()}enterChunk(e){if(this.pointerNode?.type!==`chunk`)throw Error(`Cannot enter non-chunk`);if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=e?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),this.pointerChunk.children.length===0)throw Error(`Cannot enter empty chunk`)}enterChunkUntilLeaf(e){for(;(t=this.pointerNode)?.type===`chunk`;){var t;this.enterChunk(e)}}exitChunk(){if(this.pointerChunk.type===`root`)throw Error(`Cannot exit root`);var e=this.pointerChunk;this.pointerChunk=e.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}rawInsertAfter(e,t){if(e.length!==0){for(var n=(e,t,r)=>{if(r===1)return e;for(var i=[],a=0;a<this.chunkSize;a++){var o=e.slice(a*r,(a+1)*r);if(o.length===0)break;var s={type:`chunk`,key:new E_,parent:t,children:[]};s.children=n(o,s,r/this.chunkSize),i.push(s)}return i},r=this.pointerSiblings.length+e.length,i=0,a=this.chunkSize;a<r;a*=this.chunkSize)i++;var o=Math.max(i,t),s=this.chunkSize**+o,c=n(e,this.pointerChunk,s);this.pointerSiblings.splice(this.pointerIndex+1,0,...c),this.pointerIndex+=c.length,this.cachedPointerNode=void 0,this.invalidateChunk(),this.validateState()}}validateState(){if(this.debug){var e=t=>{if(t.type===`chunk`){var{parent:n,children:r}=t;if(!n.children.includes(t))throw Error(`Debug: Chunk ${t.key.id} has an incorrect parent property`);r.forEach(e)}};if(this.root.children.forEach(e),this.cachedPointerNode!==void 0&&this.cachedPointerNode!==this.getPointerNode())throw Error(`Debug: The cached pointer is incorrect and has not been invalidated`);var t=this.getChunkPath(this.pointerChunk);if(!t)throw Error(`Debug: The pointer chunk is not connected to the root`);if(!G.equals(this.pointerIndexStack,t))throw Error(`Debug: The cached index stack [${this.pointerIndexStack.join(`, `)}] does not match the path of the pointer chunk [${t.join(`, `)}]`)}}},Tb=class{constructor(e,t){My(this,`editor`,void 0),My(this,`children`,void 0),My(this,`cachedKeys`,void 0),My(this,`pointerIndex`,void 0),this.editor=e,this.children=t,this.cachedKeys=Array(t.length),this.pointerIndex=0}read(e){if(e===1)return[this.children[this.pointerIndex++]];var t=this.remaining(e);return this.pointerIndex+=e,t}remaining(e){return e===void 0?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+e)}get reachedEnd(){return this.pointerIndex>=this.children.length}lookAhead(e,t){var n=this.children.indexOf(e,this.pointerIndex);if(n>-1)return n-this.pointerIndex;for(var r=this.pointerIndex;r<this.children.length;r++){var i=this.children[r];if(this.findKey(i,r)===t)return r-this.pointerIndex}return-1}toChunkLeaves(e,t){return e.map((e,n)=>({type:`leaf`,node:e,key:this.findKey(e,t+n),index:t+n}))}findKey(e,t){var n=this.cachedKeys[t];if(n)return n;var r=$.findKey(this.editor,e);return this.cachedKeys[t]=r,r}},Eb=(e,t)=>{for(var{chunkTree:n,children:r,chunkSize:i,rerenderChildren:a=[],onInsert:o,onUpdate:s,onIndexChange:c,debug:l}=t,u=new wb(n,{chunkSize:i,debug:l}),d=new Tb(e,r),f,p=function(){var e=d.lookAhead(f.node,f.key),t=e>0&&n.movedNodeKeys.has(f.key);if(e===-1||t)return u.remove(),1;var r=d.pointerIndex,i=d.read(e+1),l=i.pop();if(i.length){var p=d.toChunkLeaves(i,r);u.insertBefore(p),i.forEach((e,t)=>{o?.(e,r+t)})}var m=d.pointerIndex-1;f.node!==l&&(f.node=l,u.invalidateChunk(),s?.(l,m)),f.index!==m&&(f.index=m,c?.(l,m)),a.includes(m)&&u.invalidateChunk()};f=u.readLeaf();)if(p())continue;if(!d.reachedEnd){var m=d.remaining(),h=d.toChunkLeaves(m,d.pointerIndex);u.returnToPreviousLeaf(),u.insertAfter(h),m.forEach((e,t)=>{o?.(e,d.pointerIndex+t)})}n.movedNodeKeys.clear()};function Db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ob(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Db(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Db(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kb=new WeakMap,Ab=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=$.findKey(e,t),i=kb.get(r);return i||(i={type:`root`,movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},kb.set(r,i)),n.reconcile&&Eb(e,Ob({chunkTree:i,children:t.children},n.reconcile)),i};function jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jb(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Nb=e=>{var{children:t}=e;return t},Pb=e=>{var{root:t,ancestor:n,renderElement:r,renderChunk:i=Nb}=e;return n.children.map(e=>{if(e.type===`chunk`){var a=e.key.id,o=i({highest:n===t,lowest:e.children.some(e=>e.type===`leaf`),attributes:{"data-slate-chunk":!0},children:M.createElement(Ib,{root:t,ancestor:e,renderElement:r,renderChunk:i})});return M.createElement(M.Fragment,{key:a},o)}var s=e.node;return r(s,e.index,e.key)})},Fb=e=>((0,M.useEffect)(()=>{e.root.modifiedChunks.clear()}),M.createElement(Pb,Mb({},e))),Ib=M.memo(Pb,(e,t)=>e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)),Lb=(0,M.createContext)(null),Rb=e=>{var{decorations:t,node:n,renderElement:r,renderChunk:i,renderPlaceholder:a,renderText:o,renderLeaf:s}=e,c=Py();D_.set(c,!1);var l=q.isElement(n)&&!c.isInline(n)&&Y.hasInlines(c,n)?null:c.getChunkSize(n),u=!!l,{decorationsByChild:d,childrenToRedecorate:f}=zb(c,n,t);u||n.children.forEach((e,t)=>{O_.set(e,t),k_.set(e,n)});var p=(0,M.useCallback)((e,t,n)=>{var l=n??$.findKey(c,e);return M.createElement(Lb.Provider,{key:`provider-${l.id}`,value:e},M.createElement(Sb,{decorations:d[t],element:e,key:l.id,renderElement:r,renderChunk:i,renderPlaceholder:a,renderLeaf:s,renderText:o}))},[c,d,r,i,a,s,o]),m=(e,t)=>{var r=$.findKey(c,e);return M.createElement(_b,{decorations:d[t],key:r.id,isLast:t===n.children.length-1,parent:n,renderPlaceholder:a,renderLeaf:s,renderText:o,text:e})};if(!u)return n.children.map((e,t)=>q.isText(e)?m(e,t):p(e,t));var h=Ab(c,n,{reconcile:{chunkSize:l,rerenderChildren:f,onInsert:(e,t)=>{O_.set(e,t),k_.set(e,n)},onUpdate:(e,t)=>{O_.set(e,t),k_.set(e,n)},onIndexChange:(e,t)=>{O_.set(e,t)}}});return M.createElement(Fb,{root:h,ancestor:h,renderElement:p,renderChunk:i})},zb=(e,t,n)=>{var r=jv(e,t,n),i=(0,M.useRef)(r).current,a=[];i.length=r.length;for(var o=0;o<r.length;o++){var s=r[o];kv(i[o]??null,s)||(i[o]=s,a.push(o))}return{decorationsByChild:i,childrenToRedecorate:a}},Bb=(0,M.createContext)(!1),Vb=()=>(0,M.useContext)(Bb),Hb=(0,M.createContext)({});function Ub(){var e=(0,M.useRef)(new Set),t=(0,M.useRef)(new Set),n=(0,M.useCallback)(()=>{e.current.forEach(e=>e())},[]),r=(0,M.useCallback)(()=>{t.current.forEach(e=>e()),t.current.clear()},[]),i=(0,M.useCallback)(function(n){var{deferred:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r?()=>t.current.add(n):n;return e.current.add(i),()=>{e.current.delete(i)}},[]);return{selectorContext:(0,M.useMemo)(()=>({addEventListener:i,flushDeferred:r}),[i,r]),onChange:n}}function Wb(){var{flushDeferred:e}=(0,M.useContext)(Hb);Hy(e)}var Gb=()=>{var{addEventListener:e}=(0,M.useContext)(Hb),[,t]=(0,M.useReducer)(e=>e+1,0);if(!e)throw Error("The `useSlate` hook must be used inside the <Slate> component's context.");return Hy(()=>e(t),[e]),Py()};function Kb(){var e=Py(),t=(0,M.useRef)(!1),n=(0,M.useRef)(0),r=(0,M.useCallback)(()=>{if(!t.current){t.current=!0;var r=$.getWindow(e);r.cancelAnimationFrame(n.current),n.current=r.requestAnimationFrame(()=>{t.current=!1})}},[e]);return(0,M.useEffect)(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}var qb=(e,t)=>{var n=[],r=()=>{n=[]},i=r=>{if(t.current){var i=r.filter(t=>e_(e,t,r));n.push(...i)}};function a(){n.length>0&&(n.reverse().forEach(e=>{e.type!==`characterData`&&(e.removedNodes.forEach(t=>{e.target.insertBefore(t,e.nextSibling)}),e.addedNodes.forEach(t=>{e.target.removeChild(t)}))}),r())}return{registerMutations:i,restoreDOM:a,clear:r}},Jb={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0},Yb=class extends M.Component{constructor(){super(...arguments),My(this,`context`,null),My(this,`manager`,null),My(this,`mutationObserver`,null)}observe(){var e,{node:t}=this.props;if(!t.current)throw Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)==null||e.observe(t.current,Jb)}componentDidMount(){var{receivedUserInput:e}=this.props,t=this.context;this.manager=qb(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,t,n=this.mutationObserver?.takeRecords();if(n!=null&&n.length){var r;(r=this.manager)==null||r.registerMutations(n)}return(e=this.mutationObserver)==null||e.disconnect(),(t=this.manager)==null||t.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)==null||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)==null||e.disconnect()}render(){return this.props.children}};My(Yb,`contextType`,Ny);var Xb=l_?Yb:e=>{var{children:t}=e;return M.createElement(M.Fragment,null,t)},Zb=(0,M.createContext)(!1),Qb=[`autoFocus`,`decorate`,`onDOMBeforeInput`,`placeholder`,`readOnly`,`renderElement`,`renderChunk`,`renderLeaf`,`renderText`,`renderPlaceholder`,`scrollSelectionIntoView`,`style`,`as`,`disableDefaultStyles`],$b=[`text`];function ex(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ex(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ex(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nx=e=>M.createElement(M.Fragment,null,Rb(e)),rx=(0,M.forwardRef)((e,t)=>{var n=(0,M.useCallback)(e=>M.createElement(ix,tx({},e)),[]),{autoFocus:r,decorate:i=ax,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:c,renderChunk:l,renderLeaf:u,renderText:d,renderPlaceholder:f=n,scrollSelectionIntoView:p=ox,style:m={},as:h=`div`,disableDefaultStyles:g=!1}=e,_=Oy(e,Qb),v=Gb(),[y,b]=(0,M.useState)(!1),x=(0,M.useRef)(null),S=(0,M.useRef)([]),[C,w]=(0,M.useState)(),T=(0,M.useRef)(!1),{onUserInput:E,receivedUserInput:D}=Kb(),[,O]=(0,M.useReducer)(e=>e+1,0);J_.set(v,O),L_.set(v,s);var k=(0,M.useMemo)(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);(0,M.useEffect)(()=>{x.current&&r&&x.current.focus()},[r]);var A=(0,M.useRef)(),j=(0,M.useMemo)(()=>(0,Dg.default)(()=>{if(D_.get(v)){j();return}var e=$.toDOMNode(v,v).getRootNode();if(!T.current&&d_&&e instanceof ShadowRoot){T.current=!0,t_()?document.execCommand(`indent`):Z.deselect(v),T.current=!1;return}var t=A.current;if((l_||!$.isComposing(v))&&(!k.isUpdatingSelection||t!=null&&t.isFlushing())&&!k.isDraggingInternally){var n=$.findDocumentOrShadowRoot(v),{activeElement:r}=n,i=$.toDOMNode(v,v),a=$g(n);if(r===i?(k.latestElement=r,R_.set(v,!0)):R_.delete(v),!a)return Z.deselect(v);var{anchorNode:o,focusNode:c}=a,l=$.hasEditableTarget(v,o)||$.isTargetInsideNonReadonlyVoid(v,o),u=$.hasTarget(v,c);if(l&&u){var d=$.toSlateRange(v,a,{exactMatch:!1,suppressThrow:!0});d&&(!$.isComposing(v)&&!(t!=null&&t.hasPendingChanges())&&!(t!=null&&t.isFlushing())?Z.select(v,d):t?.handleUserSelect(d))}s&&(!l||!u)&&Z.deselect(v)}},100),[v,s,k]),N=(0,M.useMemo)(()=>(0,Eg.default)(j,0),[j]);A.current=Jy({node:x,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:N}),Hy(()=>{var e,t;x.current&&(t=zg(x.current))?(A_.set(v,t),j_.set(v,x.current),P_.set(v,x.current),N_.set(x.current,v)):P_.delete(v);var{selection:n}=v,r=$g($.findDocumentOrShadowRoot(v));if(!(!r||!$.isFocused(v)||(e=A.current)!=null&&e.hasPendingAction())){var i=e=>{var t=r.type!==`None`;if(!(!n&&!t)){var i=r.focusNode,a;if(u_&&r.rangeCount>1){var o=r.getRangeAt(0),s=r.getRangeAt(r.rangeCount-1);a=o.startContainer===i?s.endContainer:o.startContainer}else a=r.anchorNode;var c=j_.get(v),l=!1;if(a_(c,a)&&a_(c,i)&&(l=!0),t&&l&&n&&!e){var u=$.toSlateRange(v,r,{exactMatch:!0,suppressThrow:!0});if(u&&K.equals(u,n)){var d;if(!k.hasMarkPlaceholder||(d=a)!=null&&(d=d.parentElement)!=null&&d.hasAttribute(`data-slate-mark-placeholder`))return}}if(n&&!$.hasRange(v,n)){v.selection=$.toSlateRange(v,r,{exactMatch:!1,suppressThrow:!0});return}k.isUpdatingSelection=!0;var f=null;try{f=n&&$.toDOMRange(v,n)}catch{}return f?($.isComposing(v)&&!l_?r.collapseToEnd():K.isBackward(n)?r.setBaseAndExtent(f.endContainer,f.endOffset,f.startContainer,f.startOffset):r.setBaseAndExtent(f.startContainer,f.startOffset,f.endContainer,f.endOffset),p(v,f)):r.removeAllRanges(),f}};r.rangeCount<=1&&i();var a=A.current?.isFlushing()===`action`;if(!l_||!a){setTimeout(()=>{k.isUpdatingSelection=!1});return}var o=null,s=requestAnimationFrame(()=>{if(a){var e=e=>{try{$.toDOMNode(v,v).focus(),i(e)}catch{}};e(),o=setTimeout(()=>{e(!0),k.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(s),o&&clearTimeout(o)}}});var ee=(0,M.useCallback)(e=>{ux(v,e);var t=$.toDOMNode(v,v).getRootNode();if(T!=null&&T.current&&d_&&t instanceof ShadowRoot){var n=e.getTargetRanges()[0],r=new window.Range;r.setStart(n.startContainer,n.startOffset),r.setEnd(n.endContainer,n.endOffset);var i=$.toSlateRange(v,r,{exactMatch:!1,suppressThrow:!0});i&&Z.select(v,i),e.preventDefault(),e.stopImmediatePropagation();return}if(E(),!s&&$.hasEditableTarget(v,e.target)&&!lx(e,a)){if(A.current)return A.current.handleDOMBeforeInput(e);N.flush(),j.flush();var{selection:o}=v,{inputType:c}=e,l=e.dataTransfer||e.data||void 0,u=c===`insertCompositionText`||c===`deleteCompositionText`;if(u&&$.isComposing(v))return;var d=!1;if(c===`insertText`&&o&&K.isCollapsed(o)&&e.data&&e.data.length===1&&/[a-z ]/i.test(e.data)&&o.anchor.offset!==0&&(d=!0,v.marks&&(d=!1),!D_.get(v))){var f,{anchor:p}=o,[m,h]=$.toDOMPoint(v,p),g=m.parentElement?.closest(`a`),_=$.getWindow(v);if(d&&g&&$.hasDOMNode(v,g)){var y=_?.document.createTreeWalker(g,NodeFilter.SHOW_TEXT).lastChild();y===m&&y.textContent?.length===h&&(d=!1)}if(d&&m.parentElement&&(_==null||(f=_.getComputedStyle(m.parentElement))==null?void 0:f.whiteSpace)===`pre`){var x=Y.above(v,{at:p.path,match:e=>q.isElement(e)&&Y.isBlock(v,e)});x&&q.string(x[0]).includes(` `)&&(d=!1)}}if((!c.startsWith(`delete`)||c.startsWith(`deleteBy`))&&!D_.get(v)){var[C]=e.getTargetRanges();if(C){var w=$.toSlateRange(v,C,{exactMatch:!1,suppressThrow:!0});if(!w)d=!1;else if(!o||!K.equals(o,w)){d=!1;var D=!u&&v.selection&&Y.rangeRef(v,v.selection);Z.select(v,w),D&&B_.set(v,D)}}}if(u)return;if(d||e.preventDefault(),o&&K.isExpanded(o)&&c.startsWith(`delete`)){var O=c.endsWith(`Backward`)?`backward`:`forward`;Y.deleteFragment(v,{direction:O});return}switch(c){case`deleteByComposition`:case`deleteByCut`:case`deleteByDrag`:Y.deleteFragment(v);break;case`deleteContent`:case`deleteContentForward`:Y.deleteForward(v);break;case`deleteContentBackward`:Y.deleteBackward(v);break;case`deleteEntireSoftLine`:Y.deleteBackward(v,{unit:`line`}),Y.deleteForward(v,{unit:`line`});break;case`deleteHardLineBackward`:Y.deleteBackward(v,{unit:`block`});break;case`deleteSoftLineBackward`:Y.deleteBackward(v,{unit:`line`});break;case`deleteHardLineForward`:Y.deleteForward(v,{unit:`block`});break;case`deleteSoftLineForward`:Y.deleteForward(v,{unit:`line`});break;case`deleteWordBackward`:Y.deleteBackward(v,{unit:`word`});break;case`deleteWordForward`:Y.deleteForward(v,{unit:`word`});break;case`insertLineBreak`:Y.insertSoftBreak(v);break;case`insertParagraph`:Y.insertBreak(v);break;case`insertFromComposition`:case`insertFromDrop`:case`insertFromPaste`:case`insertFromYank`:case`insertReplacementText`:case`insertText`:c===`insertFromComposition`&&$.isComposing(v)&&(b(!1),z_.set(v,!1)),l?.constructor.name===`DataTransfer`?$.insertData(v,l):typeof l==`string`&&(d?S.current.push(()=>Y.insertText(v,l)):Y.insertText(v,l))}var k=B_.get(v)?.unref();B_.delete(v),k&&(!v.selection||!K.equals(v.selection,k))&&Z.select(v,k)}},[v,j,E,a,s,N]),te=(0,M.useCallback)(e=>{e==null?(j.cancel(),N.cancel(),j_.delete(v),P_.delete(v),x.current&&b_&&x.current.removeEventListener(`beforeinput`,ee)):b_&&e.addEventListener(`beforeinput`,ee),x.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[j,N,v,ee,t]);Hy(()=>{var e=$.getWindow(v),t=e=>{var{target:t}=e,n=(t instanceof HTMLElement?t:null)?.tagName;n!==`INPUT`&&n!==`TEXTAREA`&&N()};e.document.addEventListener(`selectionchange`,t);var n=()=>{k.isDraggingInternally=!1};return e.document.addEventListener(`dragend`,n),e.document.addEventListener(`drop`,n),()=>{e.document.removeEventListener(`selectionchange`,t),e.document.removeEventListener(`dragend`,n),e.document.removeEventListener(`drop`,n)}},[N,k]);var P=i([v,[]]),F=pb(i),ne=o&&v.children.length===1&&Array.from(q.texts(v)).length===1&&q.string(v)===``&&!y,re=(0,M.useCallback)(e=>{w(e&&ne?e.getBoundingClientRect()?.height:void 0)},[ne]);if(ne){var ie=Y.start(v,[]);P.push({[Y_]:!0,placeholder:o,onPlaceholderResize:re,anchor:ie,focus:ie})}var{marks:ae}=v;if(k.hasMarkPlaceholder=!1,v.selection&&K.isCollapsed(v.selection)&&ae){var{anchor:I}=v.selection,oe=q.leaf(v,I.path),{text:se}=oe,ce=Oy(oe,$b);if(!Fp.equals(oe,ae,{loose:!0})){k.hasMarkPlaceholder=!0;var le=Object.fromEntries(Object.keys(ce).map(e=>[e,null]));P.push(tx(tx(tx({[X_]:!0},le),ae),{},{anchor:I,focus:I}))}}return(0,M.useEffect)(()=>{setTimeout(()=>{var{selection:e}=v;if(e){var{anchor:t}=e,n=q.leaf(v,t.path);if(ae&&!Fp.equals(n,ae,{loose:!0})){U_.set(v,ae);return}}U_.delete(v)})}),Wb(),M.createElement(Bb.Provider,{value:s},M.createElement(Zb.Provider,{value:y},M.createElement(db.Provider,{value:F},M.createElement(Xb,{node:x,receivedUserInput:D},M.createElement(h,tx(tx({role:s?void 0:`textbox`,"aria-multiline":!s||void 0,translate:`no`},_),{},{spellCheck:b_||!y_?_.spellCheck:!1,autoCorrect:b_||!y_?_.autoCorrect:`false`,autoCapitalize:b_||!y_?_.autoCapitalize:`false`,"data-slate-editor":!0,"data-slate-node":`value`,contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:te,style:tx(tx({},g?{}:tx({position:`relative`,whiteSpace:`pre-wrap`,wordWrap:`break-word`},C?{minHeight:C}:{})),m),onBeforeInput:(0,M.useCallback)(e=>{if(!b_&&!s&&!sx(e,_.onBeforeInput)&&$.hasSelectableTarget(v,e.target)&&(e.preventDefault(),!$.isComposing(v))){var t=e.data;Y.insertText(v,t)}},[_.onBeforeInput,v,s]),onInput:(0,M.useCallback)(e=>{if(!sx(e,_.onInput)){if(A.current){A.current.handleInput();return}for(var t of S.current)t();S.current=[],$.isFocused(v)||ux(v,e.nativeEvent)}},[_.onInput,v]),onBlur:(0,M.useCallback)(e=>{if(!(s||k.isUpdatingSelection||!$.hasSelectableTarget(v,e.target)||sx(e,_.onBlur))){var t=$.findDocumentOrShadowRoot(v);if(k.latestElement!==t.activeElement){var{relatedTarget:n}=e;if(n!==$.toDOMNode(v,v)&&!(Vg(n)&&n.hasAttribute(`data-slate-spacer`))){if(n!=null&&Hg(n)&&$.hasDOMNode(v,n)){var r=$.toSlateNode(v,n);if(q.isElement(r)&&!v.isVoid(r))return}d_&&$g(t)?.removeAllRanges(),R_.delete(v)}}}},[s,k.isUpdatingSelection,k.latestElement,v,_.onBlur]),onClick:(0,M.useCallback)(e=>{if($.hasTarget(v,e.target)&&!sx(e,_.onClick)&&Hg(e.target)){var t=$.toSlateNode(v,e.target),n=$.findPath(v,t);if(!Y.hasPath(v,n)||q.get(v,n)!==t)return;if(e.detail===3&&n.length>=1){var r=n;q.isElement(t)&&Y.isBlock(v,t)||(r=Y.above(v,{match:e=>q.isElement(e)&&Y.isBlock(v,e),at:n})?.[1]??n.slice(0,1));var i=Y.range(v,r);Z.select(v,i);return}if(s)return;var a=Y.start(v,n),o=Y.end(v,n),c=Y.void(v,{at:a}),l=Y.void(v,{at:o});if(c&&l&&G.equals(c[1],l[1])){var u=Y.range(v,a);Z.select(v,u)}}},[v,_.onClick,s]),onCompositionEnd:(0,M.useCallback)(e=>{if(!cx(e)&&$.hasSelectableTarget(v,e.target)){var t;if($.isComposing(v)&&Promise.resolve().then(()=>{b(!1),z_.set(v,!1)}),(t=A.current)==null||t.handleCompositionEnd(e),sx(e,_.onCompositionEnd)||l_)return;if(!d_&&!g_&&!s_&&!v_&&!__&&e.data){var n=U_.get(v);U_.delete(v),n!==void 0&&(W_.set(v,v.marks),v.marks=n),Y.insertText(v,e.data);var r=W_.get(v);W_.delete(v),r!==void 0&&(v.marks=r)}}},[_.onCompositionEnd,v]),onCompositionUpdate:(0,M.useCallback)(e=>{$.hasSelectableTarget(v,e.target)&&!sx(e,_.onCompositionUpdate)&&!cx(e)&&($.isComposing(v)||(b(!0),z_.set(v,!0)))},[_.onCompositionUpdate,v]),onCompositionStart:(0,M.useCallback)(e=>{if(!cx(e)&&$.hasSelectableTarget(v,e.target)){var t;if((t=A.current)==null||t.handleCompositionStart(e),sx(e,_.onCompositionStart)||l_)return;b(!0);var{selection:n}=v;if(n&&K.isExpanded(n)){Y.deleteFragment(v);return}}},[_.onCompositionStart,v]),onCopy:(0,M.useCallback)(e=>{$.hasSelectableTarget(v,e.target)&&!sx(e,_.onCopy)&&!cx(e)&&(e.preventDefault(),$.setFragmentData(v,e.clipboardData,`copy`))},[_.onCopy,v]),onCut:(0,M.useCallback)(e=>{if(!s&&$.hasSelectableTarget(v,e.target)&&!sx(e,_.onCut)&&!cx(e)){e.preventDefault(),$.setFragmentData(v,e.clipboardData,`cut`);var{selection:t}=v;if(t){if(K.isExpanded(t))Y.deleteFragment(v);else{var n=q.parent(v,t.anchor.path);Y.isVoid(v,n)&&Z.delete(v)}}}},[s,v,_.onCut]),onDragOver:(0,M.useCallback)(e=>{if($.hasTarget(v,e.target)&&!sx(e,_.onDragOver)){var t=$.toSlateNode(v,e.target);q.isElement(t)&&Y.isVoid(v,t)&&e.preventDefault()}},[_.onDragOver,v]),onDragStart:(0,M.useCallback)(e=>{if(!s&&$.hasTarget(v,e.target)&&!sx(e,_.onDragStart)){var t=$.toSlateNode(v,e.target),n=$.findPath(v,t);if(q.isElement(t)&&Y.isVoid(v,t)||Y.void(v,{at:n,voids:!0})){var r=Y.range(v,n);Z.select(v,r)}k.isDraggingInternally=!0,$.setFragmentData(v,e.dataTransfer,`drag`)}},[s,v,_.onDragStart,k]),onDrop:(0,M.useCallback)(e=>{if(!s&&$.hasTarget(v,e.target)&&!sx(e,_.onDrop)){e.preventDefault();var t=v.selection,n=$.findEventRange(v,e),r=e.dataTransfer;Z.select(v,n),k.isDraggingInternally&&t&&!K.equals(t,n)&&!Y.void(v,{at:n,voids:!0})&&Z.delete(v,{at:t}),$.insertData(v,r),$.isFocused(v)||$.focus(v)}},[s,v,_.onDrop,k]),onDragEnd:(0,M.useCallback)(e=>{!s&&k.isDraggingInternally&&_.onDragEnd&&$.hasTarget(v,e.target)&&_.onDragEnd(e)},[s,k,_,v]),onFocus:(0,M.useCallback)(e=>{if(!s&&!k.isUpdatingSelection&&$.hasEditableTarget(v,e.target)&&!sx(e,_.onFocus)){var t=$.toDOMNode(v,v);if(k.latestElement=$.findDocumentOrShadowRoot(v).activeElement,u_&&e.target!==t){t.focus();return}R_.set(v,!0)}},[s,k,v,_.onFocus]),onKeyDown:(0,M.useCallback)(e=>{if(!s&&$.hasEditableTarget(v,e.target)){var t;(t=A.current)==null||t.handleKeyDown(e);var{nativeEvent:n}=e;if($.isComposing(v)&&n.isComposing===!1&&(z_.set(v,!1),b(!1)),sx(e,_.onKeyDown)||$.isComposing(v))return;var{selection:r}=v,i=v.children[r===null?0:r.focus.path[0]],a=(0,Tg.default)(q.string(i))===`rtl`;if(bv.isRedo(n)){e.preventDefault();var o=v;typeof o.redo==`function`&&o.redo();return}if(bv.isUndo(n)){e.preventDefault();var c=v;typeof c.undo==`function`&&c.undo();return}if(bv.isMoveLineBackward(n)){e.preventDefault(),Z.move(v,{unit:`line`,reverse:!0});return}if(bv.isMoveLineForward(n)){e.preventDefault(),Z.move(v,{unit:`line`});return}if(bv.isExtendLineBackward(n)){e.preventDefault(),Z.move(v,{unit:`line`,edge:`focus`,reverse:!0});return}if(bv.isExtendLineForward(n)){e.preventDefault(),Z.move(v,{unit:`line`,edge:`focus`});return}if(bv.isMoveBackward(n)){e.preventDefault(),r&&K.isCollapsed(r)?Z.move(v,{reverse:!a}):Z.collapse(v,{edge:a?`end`:`start`});return}if(bv.isMoveForward(n)){e.preventDefault(),r&&K.isCollapsed(r)?Z.move(v,{reverse:a}):Z.collapse(v,{edge:a?`start`:`end`});return}if(bv.isMoveWordBackward(n)){e.preventDefault(),r&&K.isExpanded(r)&&Z.collapse(v,{edge:`focus`}),Z.move(v,{unit:`word`,reverse:!a});return}if(bv.isMoveWordForward(n)){e.preventDefault(),r&&K.isExpanded(r)&&Z.collapse(v,{edge:`focus`}),Z.move(v,{unit:`word`,reverse:a});return}if(!b_){if(bv.isBold(n)||bv.isItalic(n)||bv.isTransposeCharacter(n)){e.preventDefault();return}if(bv.isSoftBreak(n)){e.preventDefault(),Y.insertSoftBreak(v);return}if(bv.isSplitBlock(n)){e.preventDefault(),Y.insertBreak(v);return}if(bv.isDeleteBackward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`backward`}):Y.deleteBackward(v);return}if(bv.isDeleteForward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`forward`}):Y.deleteForward(v);return}if(bv.isDeleteLineBackward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`backward`}):Y.deleteBackward(v,{unit:`line`});return}if(bv.isDeleteLineForward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`forward`}):Y.deleteForward(v,{unit:`line`});return}if(bv.isDeleteWordBackward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`backward`}):Y.deleteBackward(v,{unit:`word`});return}if(bv.isDeleteWordForward(n)){e.preventDefault(),r&&K.isExpanded(r)?Y.deleteFragment(v,{direction:`forward`}):Y.deleteForward(v,{unit:`word`});return}}else if((p_||d_)&&r&&(bv.isDeleteBackward(n)||bv.isDeleteForward(n))&&K.isCollapsed(r)){var l=q.parent(v,r.anchor.path);if(q.isElement(l)&&Y.isVoid(v,l)&&(Y.isInline(v,l)||Y.isBlock(v,l))){e.preventDefault(),Y.deleteBackward(v,{unit:`block`});return}}}},[s,v,_.onKeyDown]),onPaste:(0,M.useCallback)(e=>{!s&&$.hasEditableTarget(v,e.target)&&!sx(e,_.onPaste)&&(!b_||Gg(e.nativeEvent)||d_)&&(e.preventDefault(),$.insertData(v,e.clipboardData))},[s,v,_.onPaste])}),M.createElement(nx,{decorations:P,node:v,renderElement:c,renderChunk:l,renderPlaceholder:f,renderLeaf:u,renderText:d}))))))}),ix=e=>{var{attributes:t,children:n}=e;return M.createElement(`span`,tx({},t),n,l_&&M.createElement(`br`,null))},ax=()=>[],ox=(e,t)=>{var n=!!e.selection&&K.isBackward(e.selection),r=t.cloneRange();if(r.collapse(n),r.getBoundingClientRect){var i=r.startContainer.parentElement,a=r.getBoundingClientRect();if(a.width===0&&a.height===0&&a.x===0&&a.y===0){var o=i.getBoundingClientRect();if(o.width>0||o.height>0)return}i.getBoundingClientRect=r.getBoundingClientRect.bind(r),Fg(i,{scrollMode:`if-needed`}),delete i.getBoundingClientRect}},sx=(e,t)=>t?t(e)??(e.isDefaultPrevented()||e.isPropagationStopped()):!1,cx=e=>Hg(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),lx=(e,t)=>t?t(e)??e.defaultPrevented:!1,ux=(e,t)=>{var n=e;if(t.inputType===`historyUndo`&&typeof n.undo==`function`){n.undo();return}if(t.inputType===`historyRedo`&&typeof n.redo==`function`){n.redo();return}},dx=(0,M.createContext)(!1),fx=parseInt(`19.2.8`.split(`.`)[0],10),px=[`editor`,`children`,`onChange`,`onSelectionChange`,`onValueChange`,`initialValue`],mx=e=>{var{editor:t,children:n,onChange:r,onSelectionChange:i,onValueChange:a,initialValue:o}=e,s=Oy(e,px);M.useState(()=>{if(!q.isNodeList(o))throw Error(`[Slate] initialValue is invalid! Expected a list of elements but got: ${Ap.stringify(o)}`);if(!Y.isEditor(t))throw Error(`[Slate] editor is invalid! You passed: ${Ap.stringify(t)}`);t.children=o,Object.assign(t,s)});var{selectorContext:c,onChange:l}=Ub(),u=(0,M.useCallback)(()=>{r&&r(t.children),i&&t.operations.find(e=>e.type===`set_selection`)&&i(t.selection),a&&t.operations.find(e=>e.type!==`set_selection`)&&a(t.children),l()},[t,l,r,i,a]);(0,M.useEffect)(()=>(V_.set(t,u),()=>{V_.set(t,()=>{})}),[t,u]);var[d,f]=(0,M.useState)($.isFocused(t));return(0,M.useEffect)(()=>{f($.isFocused(t))},[t]),Hy(()=>{var e=()=>f($.isFocused(t));return fx>=17?(document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,e),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,e)}):(document.addEventListener(`focus`,e,!0),document.addEventListener(`blur`,e,!0),()=>{document.removeEventListener(`focus`,e,!0),document.removeEventListener(`blur`,e,!0)})},[t]),M.createElement(Hb.Provider,{value:c},M.createElement(Ny.Provider,{value:t},M.createElement(dx.Provider,{value:d},n)))},hx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`x-slate-fragment`,n=e;n=mv(n,t);var{onChange:r,apply:i,insertText:a}=n;return n.getChunkSize=()=>null,l_&&(n.insertText=(e,t)=>(q_.delete(n),a(e,t))),n.onChange=e=>{(fx<18?dc.unstable_batchedUpdates:e=>e())(()=>{r(e)})},n.apply=e=>{if(e.type===`move_node`){var t=q.parent(n,e.path);if(n.getChunkSize(t)){var r=q.get(n,e.path),a=Ab(n,t),o=$.findKey(n,r);a.movedNodeKeys.add(o)}}i(e)},n},gx=[`strong`,`em`,`code`],_x=0;function vx(){return _x+=1,`k${Date.now().toString(36)}${_x.toString(36)}`}function yx(e){return e.type===`h2`||e.type===`h3`||e.type===`h4`?e.type:e.type===`blockquote`?`blockquote`:`normal`}var bx=[{type:`paragraph`,children:[{text:``}]}];function xx(e){return e.length===0?bx:e.map(Sx)}function Sx(e){if(e._type===`media`)return{type:`media`,mediaId:e.id,...e.caption===void 0?{}:{caption:e.caption},children:[{text:``}]};let t=Cx(e.children,e.markDefs);return e.listItem===void 0?e.style===`h2`||e.style===`h3`||e.style===`h4`?{type:e.style,children:t}:e.style===`blockquote`?{type:`blockquote`,children:t}:{type:`paragraph`,children:t}:{type:`list-item`,listType:e.listItem,level:e.level??1,children:t}}function Cx(e,t){if(e.length===0)return[{text:``}];let n=new Map(t.map(e=>[e._key,e]));return e.map(e=>{let t={text:e.text};for(let n of e.marks)n===`strong`?t.strong=!0:n===`em`?t.em=!0:n===`code`&&(t.code=!0);let r=e.marks.find(e=>n.has(e));if(r===void 0)return t;let i=n.get(r);return i===void 0?t:i._type===`link`?{type:`link`,kind:`external`,href:i.href,...i.rel===void 0?{}:{rel:i.rel},children:[t]}:{type:`link`,kind:`internal`,collection:i.collection,entryId:i.id,children:[t]}})}function wx(e){return e.map(Tx)}function Tx(e){if(e.type===`media`)return{_key:vx(),_type:`media`,id:e.mediaId,...e.caption===void 0?{}:{caption:e.caption}};let t=[],n=Ex(e.children,t);return{_key:vx(),_type:`block`,style:yx(e),...e.type===`list-item`?{listItem:e.listType,level:e.level}:{},children:n,markDefs:t}}function Ex(e,t,n=[]){let r=[];for(let i of e){if(`text`in i){let e=[...n,...Dx(i)];r.push({_key:vx(),_type:`span`,text:i.text,marks:e});continue}if(i.type===`link`){let e=vx();t.push(i.kind===`external`?{_key:e,_type:`link`,href:i.href,...i.rel===void 0?{}:{rel:i.rel}}:{_key:e,_type:`internalLink`,collection:i.collection,id:i.entryId}),r.push(...Ex(i.children,t,[...n,e]))}}return r}function Dx(e){return gx.filter(t=>e[t]===!0)}function Ox(e,t){let n=Y.marks(e);return n!==null&&n[t]===!0}function kx(e,t){Ox(e,t)?Y.removeMark(e,t):Y.addMark(e,t,!0)}function Ax(e){return If.isElement(e)}function jx(e){return Ax(e)&&!Y.isEditor(e)&&e.type!==`link`&&e.type!==`media`}function Mx(e){let{selection:t}=e;if(t===null)return null;let[n]=Y.nodes(e,{at:Y.unhangRange(e,t),match:jx});if(n===void 0)return null;let[r]=n;return jx(r)?r.type===`list-item`?r.listType:r.type===`paragraph`?`paragraph`:r.type:null}function Nx(e,t){let n=Mx(e)===t;Y.withoutNormalizing(e,()=>{let r={match:jx};if(n){Z.setNodes(e,{type:`paragraph`},r),Z.unsetNodes(e,[`listType`,`level`],r);return}if(t===`bullet`||t===`number`){Z.setNodes(e,{type:`list-item`,listType:t,level:1},r);return}Z.setNodes(e,{type:t},r),Z.unsetNodes(e,[`listType`,`level`],r)})}function Px(e,t){let{selection:n}=e;if(n===null||Y.string(e,n)===``)return;let r={type:`link`,kind:`external`,href:t,children:[]};Z.wrapNodes(e,r,{split:!0,at:n}),Z.collapse(e,{edge:`end`})}function Fx(e){let{selection:t}=e;if(t===null)return!1;let[n]=Y.nodes(e,{at:Y.unhangRange(e,t),match:e=>Ax(e)&&!Y.isEditor(e)&&e.type===`link`});return n!==void 0}function Ix(e){Z.unwrapNodes(e,{match:e=>Ax(e)&&!Y.isEditor(e)&&e.type===`link`})}var Lx=[{mark:`strong`,labelKey:`richText.markStrong`},{mark:`em`,labelKey:`richText.markEm`},{mark:`code`,labelKey:`richText.markCode`}],Rx=[{kind:`paragraph`,labelKey:`richText.blockParagraph`},{kind:`h2`,labelKey:`richText.blockH2`},{kind:`h3`,labelKey:`richText.blockH3`},{kind:`h4`,labelKey:`richText.blockH4`},{kind:`blockquote`,labelKey:`richText.blockQuote`},{kind:`bullet`,labelKey:`richText.blockBullet`},{kind:`number`,labelKey:`richText.blockNumber`}];function zx({disabled:e}){let{t}=Vi(),n=Gb(),[r,i]=(0,M.useState)(null),a=Mx(n),o=Fx(n);return(0,B.jsxs)(`div`,{className:`rich-text-toolbar`,role:`toolbar`,"aria-label":t(`richText.toolbarLabel`),children:[Lx.map(({mark:r,labelKey:i})=>(0,B.jsx)(`button`,{type:`button`,disabled:e,"aria-pressed":Ox(n,r),onMouseDown:e=>{e.preventDefault(),kx(n,r)},children:t(i)},r)),Rx.map(({kind:r,labelKey:i})=>(0,B.jsx)(`button`,{type:`button`,disabled:e,"aria-pressed":a===r,onMouseDown:e=>{e.preventDefault(),Nx(n,r)},children:t(i)},r)),o?(0,B.jsx)(`button`,{type:`button`,disabled:e,onMouseDown:e=>{e.preventDefault(),Ix(n)},children:t(`richText.removeLink`)}):r===null?(0,B.jsx)(`button`,{type:`button`,disabled:e,onMouseDown:e=>{e.preventDefault(),i(``)},children:t(`richText.linkButton`)}):(0,B.jsx)(`input`,{type:`url`,"aria-label":t(`richText.linkUrlLabel`),placeholder:t(`richText.linkPlaceholder`),value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),r.trim()!==``&&Px(n,r.trim()),i(null)),e.key===`Escape`&&i(null)}})]})}function Bx(e){let{isInline:t,isVoid:n}=e;return e.isInline=e=>e.type===`link`||t(e),e.isVoid=e=>e.type===`media`||n(e),e}function Vx({attributes:e,children:t,element:n},r){switch(n.type){case`h2`:return(0,B.jsx)(`h2`,{...e,children:t});case`h3`:return(0,B.jsx)(`h3`,{...e,children:t});case`h4`:return(0,B.jsx)(`h4`,{...e,children:t});case`blockquote`:return(0,B.jsx)(`blockquote`,{...e,children:t});case`list-item`:return(0,B.jsx)(`div`,{...e,"data-list-type":n.listType,"data-list-level":n.level,children:t});case`link`:return(0,B.jsx)(`a`,{...e,href:n.kind===`external`?n.href:`#${n.collection}/${n.entryId}`,title:n.kind===`internal`?r(`richText.internalLinkTitle`,{path:`${n.collection}/${n.entryId}`}):void 0,children:t});case`media`:return(0,B.jsxs)(`div`,{...e,contentEditable:!1,className:`rich-text-media`,children:[(0,B.jsx)(`span`,{children:r(`richText.mediaLabel`,{id:n.mediaId})}),t]});default:return(0,B.jsx)(`p`,{...e,children:t})}}function Hx({attributes:e,children:t,leaf:n}){let r=t;return n.strong&&(r=(0,B.jsx)(`strong`,{children:r})),n.em&&(r=(0,B.jsx)(`em`,{children:r})),n.code&&(r=(0,B.jsx)(`code`,{children:r})),(0,B.jsx)(`span`,{...e,children:r})}function Ux({id:e,value:t,disabled:n=!1,onChange:r}){let{t:i}=Vi(),a=(0,M.useMemo)(()=>Bx(og(hx(Qh()))),[]),[o,s]=(0,M.useState)(()=>xx(t)),c=(0,M.useCallback)(e=>{s(e),a.operations.some(e=>e.type!==`set_selection`)&&r(wx(e))},[a,r]);return(0,B.jsx)(`div`,{className:`rich-text-editor`,children:(0,B.jsxs)(mx,{editor:a,initialValue:o,onChange:c,children:[(0,B.jsx)(zx,{disabled:n}),(0,B.jsx)(rx,{id:e,readOnly:n,renderElement:e=>Vx(e,i),renderLeaf:Hx,placeholder:i(`richText.placeholder`)})]})})}var Wx=[];function Gx({id:e,field:t,value:n,onChange:r,disabled:i}){return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(Ux,{id:e,value:n??Wx,disabled:i,onChange:r})})}function Kx({id:e,field:t,value:n,onChange:r,disabled:i}){let{t:a}=Vi(),o=t.options;return o.many===!0?(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`p`,{role:`alert`,children:a(`fields.selectMultiNotSupported`)})}):(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsxs)(`select`,{id:e,required:t.required,disabled:i,value:n,onChange:e=>r(e.target.value),children:[(0,B.jsx)(`option`,{value:``,disabled:!0,hidden:!0,children:`—`}),o.options.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label??e.value},e.value))]})})}function qx({id:e,field:t,value:n,onChange:r,disabled:i}){let a=t.options;return(0,B.jsx)(Kd,{id:e,field:t,children:(0,B.jsx)(`input`,{id:e,type:`text`,pattern:`[a-z0-9]+(?:-[a-z0-9]+)*`,required:t.required,maxLength:a.max,disabled:i,value:n,onChange:e=>r(e.target.value)})})}function Jx(e,t){return R(`/api/taxonomies/${encodeURIComponent(t)}`,{headers:z(e)})}function Yx(e,t,n){return R(`/api/taxonomies/${encodeURIComponent(t)}`,{method:`POST`,headers:z(e),body:JSON.stringify({slug:n.slug,labels:n.labels,...n.parent===void 0?{}:{parent:n.parent}})})}async function Xx(e,t,n,r={}){let i=r.cascade===!0?`?cascade=true`:``;await R(`/api/taxonomies/${encodeURIComponent(t)}/${encodeURIComponent(n)}${i}`,{method:`DELETE`,headers:z(e)})}function Zx({id:e,field:t,value:n,onChange:r,disabled:i}){let{t:a,i18n:o}=Vi(),s=vr(),c=s.state.status===`authenticated`?s.state.token:null,l=t.options,u=l.of??``,d=l.many!==!1,[f,p]=(0,M.useState)([]),[m,h]=(0,M.useState)(!1);(0,M.useEffect)(()=>{let e=!1;if(c!==null&&u!==``)return Jx(c,u).then(t=>{e||p(t)}).catch(()=>{e||h(!0)}),()=>{e=!0}},[c,u]);let g=d?Array.isArray(n)?n.map(String):[]:typeof n==`string`?[n]:[];function _(e){let t=[...e.target.selectedOptions].map(e=>e.value);r(d?t:t[0]??null)}return(0,B.jsx)(Kd,{id:e,field:t,children:m||f.length===0?(0,B.jsx)(`p`,{className:`field__placeholder`,children:a(`fields.taxonomyEmpty`,{taxonomy:u})}):(0,B.jsxs)(`select`,{id:e,multiple:d,value:d?g:g[0]??``,disabled:i,onChange:_,children:[!d&&(0,B.jsx)(`option`,{value:``,children:a(`fields.taxonomyNone`)}),f.map(e=>(0,B.jsx)(`option`,{value:e.id,children:`${`— `.repeat(e.depth)}${e.labels[o.language]??Object.values(e.labels)[0]??e.slug}`},e.id))]})})}function Qx({id:e,field:t,value:n,onChange:r,disabled:i}){let a=t.options;return(0,B.jsx)(Kd,{id:e,field:t,children:a.multiline===!0?(0,B.jsx)(`textarea`,{id:e,required:t.required,minLength:a.min,maxLength:a.max,disabled:i,value:n,onChange:e=>r(e.target.value)}):(0,B.jsx)(`input`,{id:e,type:`text`,required:t.required,minLength:a.min,maxLength:a.max,disabled:i,value:n,onChange:e=>r(e.target.value)})})}function $x(e){switch(e.field.kind){case`text`:return(0,B.jsx)(Qx,{...e,value:e.value});case`slug`:return(0,B.jsx)(qx,{...e,value:e.value});case`number`:return(0,B.jsx)(mf,{...e,value:e.value});case`boolean`:return(0,B.jsx)(Jd,{...e,value:e.value});case`date`:return(0,B.jsx)(Zd,{...e,value:e.value});case`datetime`:return(0,B.jsx)(ef,{...e,value:e.value});case`select`:return(0,B.jsx)(Kx,{...e,value:e.value});case`color`:return(0,B.jsx)(Xd,{...e,value:e.value});case`geo`:return(0,B.jsx)(tf,{...e,value:e.value});case`json`:return(0,B.jsx)(nf,{...e});case`richText`:return(0,B.jsx)(Gx,{...e,value:e.value});case`media`:return(0,B.jsx)(pf,{...e,value:e.value});case`relation`:return(0,B.jsx)(hf,{...e});case`taxonomy`:return(0,B.jsx)(Zx,{...e});case`blocks`:return(0,B.jsx)(qd,{...e,value:e.value})}}function eS({idPrefix:e,definition:t,data:n,onChange:r,disabled:i=!1}){return(0,B.jsx)(B.Fragment,{children:t.fields.map(t=>(0,B.jsx)($x,{id:`${e}-${t.name}`,field:t,value:n[t.name]??Rd(t.kind),onChange:e=>r({...n,[t.name]:e}),disabled:i},t.name))})}var tS=new Set([`text`,`slug`]);function nS(e,t){return e.findIndex(e=>e.key===t)}function rS(e,t,n){let r=nS(e,t);if(r===-1)return e;let i=Math.max(0,Math.min(n,e.length-1));if(i===r)return e;let a=[...e],[o]=a.splice(r,1);return o===void 0?e:(a.splice(i,0,o),a)}function iS(e,t,n){if(Ud(t)===void 0)return{blocks:e,key:null};let r=Gd(),i=[...e];return i.splice(Math.max(0,Math.min(n,e.length)),0,{key:r,type:t,data:{}}),{blocks:i,key:r}}function aS(e,t){return nS(e,t)===-1?e:e.filter(e=>e.key!==t)}function oS(e,t,n){return nS(e,t)===-1?e:e.map(e=>e.key===t?{...e,data:n}:e)}function sS(e,t){let n=Ud(e);if(n===void 0)return!1;let r=n.fields.find(e=>e.name===t);return r!==void 0&&tS.has(r.kind)}function cS(e,t,n,r){let i=e.find(e=>e.key===t);return i===void 0||!sS(i.type,n)||i.data[n]===r?e:oS(e,t,{...i.data,[n]:r})}var lS=`application/x-cogenta-block-key`,uS=`application/x-cogenta-block-type`,dS=`cogenta-builder-chrome`,fS=`
64
+ [data-block-key]{outline:2px dashed transparent;outline-offset:-2px;cursor:grab}
65
+ [data-block-key]:hover{outline-color:color-mix(in oklab,currentColor 35%,transparent)}
66
+ [data-block-key][data-cg-selected]{outline:2px solid currentColor;outline-offset:-2px}
67
+ [data-block-key][data-cg-drop-target]{outline:2px solid currentColor;outline-offset:4px}
68
+ [data-field]{outline:1px dotted transparent;outline-offset:2px}
69
+ [data-field]:hover{outline-color:color-mix(in oklab,currentColor 45%,transparent)}
70
+ [data-field][contenteditable]{outline:2px solid currentColor;outline-offset:2px;cursor:text}
71
+ `;function pS(e){return[...e.querySelectorAll(`[data-block-key]`)]}function mS(e){return e.dataset.blockKey??``}function hS(e){return e===null||!(e instanceof Element)?null:e.closest(`[data-block-key]`)}function gS(e){return e.hasAttribute(`contenteditable`)}function _S(e){e.setAttribute(`contenteditable`,`plaintext-only`),e.isContentEditable!==!0&&e.setAttribute(`contenteditable`,`true`)}function vS(e,t){for(let n of pS(e))t!==null&&mS(n)===t?n.setAttribute(`data-cg-selected`,``):n.removeAttribute(`data-cg-selected`)}function yS(e,t){let n=e.getElementById(dS);if(n!==null&&(n.textContent=t?fS:``),!t)for(let t of pS(e))t.removeAttribute(`data-cg-selected`),t.removeAttribute(`data-cg-drop-target`)}function bS(e,t){let n=[];function r(e,t,r){e.addEventListener(t,r),n.push(()=>e.removeEventListener(t,r))}let i=e.createElement(`style`);i.id=dS,i.textContent=fS,e.head.append(i),n.push(()=>i.remove()),r(e,`click`,e=>{let n=e.target;n instanceof Element&&n.closest(`a`)!==null&&e.preventDefault();let r=hS(e.target);r!==null&&t.onSelect(mS(r))}),r(e,`submit`,e=>{e.preventDefault()});let a=pS(e);for(let[e,n]of a.entries()){n.draggable=!0,r(n,`dragstart`,e=>{let t=e;t.dataTransfer?.setData(lS,mS(n)),t.dataTransfer!==null&&t.dataTransfer!==void 0&&(t.dataTransfer.effectAllowed=`move`)}),r(n,`dragover`,e=>{e.preventDefault(),n.setAttribute(`data-cg-drop-target`,``)}),r(n,`dragleave`,()=>n.removeAttribute(`data-cg-drop-target`)),r(n,`drop`,r=>{let i=r;i.preventDefault(),n.removeAttribute(`data-cg-drop-target`);let a=i.dataTransfer?.getData(`application/x-cogenta-block-key`)??``;if(a!==``){t.onMove(a,e);return}let o=i.dataTransfer?.getData(`application/x-cogenta-block-type`)??``;o!==``&&t.onInsert(o,e)}),r(n,`dragend`,()=>n.removeAttribute(`data-cg-drop-target`));for(let e of n.querySelectorAll(`[data-field]`)){let i=e.dataset.field??``;i!==``&&(r(e,`dblclick`,()=>{_S(e),e.focus()}),r(e,`blur`,()=>{gS(e)&&(e.removeAttribute(`contenteditable`),t.onInlineEdit(mS(n),i,e.textContent??``))}),r(e,`keydown`,t=>{if(!gS(e))return;let n=t.key;n===`Enter`&&(t.preventDefault(),e.blur()),n===`Escape`&&(t.preventDefault(),e.removeAttribute(`contenteditable`),e.blur())}))}}let o=e.querySelector(`main`)??e.body;return r(o,`dragover`,e=>{hS(e.target)===null&&e.preventDefault()}),r(o,`drop`,e=>{if(hS(e.target)!==null)return;let n=e;n.preventDefault();let r=n.dataTransfer?.getData(`application/x-cogenta-block-key`)??``;if(r!==``){t.onMove(r,a.length-1);return}let i=n.dataTransfer?.getData(`application/x-cogenta-block-type`)??``;i!==``&&t.onInsert(i,a.length)}),()=>{for(let e of n.splice(0))e();for(let e of a)e.draggable=!1,e.removeAttribute(`data-cg-selected`),e.removeAttribute(`data-cg-drop-target`)}}function xS({blocks:e,selectedKey:t,onSelect:n,onMove:r,onInsert:i,onRemove:a,disabled:o=!1}){let{t:s}=Vi();return e.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`builder.outlineEmpty`)}):(0,B.jsx)(`ol`,{className:`m-0 flex list-none flex-col gap-1 p-0`,"aria-label":s(`builder.outlineHeading`),children:e.map((c,l)=>{let u=Ud(c.type)?.label??s(`fields.blocksUnknownLabel`,{type:c.type}),d=c.key===t;return(0,B.jsxs)(`li`,{draggable:!o,onDragStart:e=>{e.dataTransfer.setData(lS,c.key),e.dataTransfer.effectAllowed=`move`},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault();let t=e.dataTransfer.getData(lS);if(t!==``){r(t,l);return}let n=e.dataTransfer.getData(uS);n!==``&&i(n,l)},className:hs(`flex items-center gap-1 rounded-md border px-2 py-1.5 transition-colors`,d?`border-primary bg-accent`:`border-input bg-card`),children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>n(c.key),"aria-current":d?`true`:void 0,className:hs(`flex-1 cursor-pointer border-0 bg-transparent p-0 text-left font-sans text-sm`,`text-card-foreground focus-visible:outline-2 focus-visible:outline-offset-2`,`focus-visible:outline-ring`),children:[(0,B.jsxs)(`span`,{className:`text-muted-foreground`,children:[l+1,`.`]}),` `,u]}),(0,B.jsx)(_s,{size:`icon`,variant:`ghost`,disabled:o||l===0,"aria-label":s(`fields.blocksMoveUp`,{position:l+1}),onClick:()=>r(c.key,l-1),children:`↑`}),(0,B.jsx)(_s,{size:`icon`,variant:`ghost`,disabled:o||l===e.length-1,"aria-label":s(`fields.blocksMoveDown`,{position:l+1}),onClick:()=>r(c.key,l+1),children:`↓`}),(0,B.jsx)(_s,{size:`icon`,variant:`ghost`,disabled:o,"aria-label":s(`fields.blocksRemove`,{position:l+1}),onClick:()=>a(c.key),children:`✕`})]},c.key)})})}var SS=[`highlight`,`text`,`media`,`listing`],CS={hero:`highlight`,cta:`highlight`,prose:`text`,quote:`text`,faq:`text`,mediaFigure:`media`,gallery:`media`,logos:`media`,embed:`media`,featureGrid:`listing`,stats:`listing`,collectionList:`listing`},wS=Hd.map(e=>({definition:e,category:CS[e.name]??`listing`}));function TS(e){return e.normalize(`NFD`).replace(/[̀-ͯ]/gu,``).toLowerCase()}function ES(e,t=null,n=wS){let r=TS(e.trim());return n.filter(e=>t!==null&&e.category!==t?!1:r===``||TS(e.definition.label).includes(r)||TS(e.definition.name).includes(r))}function DS({onAdd:e,disabled:t=!1}){let{t:n}=Vi(),r=(0,M.useId)(),[i,a]=(0,M.useState)(``),[o,s]=(0,M.useState)(null),c=ES(i,o);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(Ts,{htmlFor:r,children:n(`builder.searchLabel`)}),(0,B.jsx)(Es,{id:r,type:`search`,value:i,placeholder:n(`builder.searchPlaceholder`),onChange:e=>a(e.target.value)})]}),(0,B.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap gap-1 border-0 p-0`,"aria-label":n(`builder.categoriesLabel`),children:[(0,B.jsx)(_s,{size:`sm`,variant:o===null?`primary`:`ghost`,"aria-pressed":o===null,onClick:()=>s(null),children:n(`builder.categoryAll`)}),SS.map(e=>(0,B.jsx)(_s,{size:`sm`,variant:o===e?`primary`:`ghost`,"aria-pressed":o===e,onClick:()=>s(e),children:n(`builder.category.${e}`)},e))]}),c.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n(`builder.searchEmpty`,{query:i})}):(0,B.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0`,"aria-label":n(`builder.pickerHeading`),children:c.map(n=>(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,disabled:t,draggable:!t,onDragStart:e=>{e.dataTransfer.setData(uS,n.definition.name),e.dataTransfer.effectAllowed=`copy`},onClick:()=>e(n.definition.name),className:hs(`flex w-full cursor-grab items-center justify-between gap-2 rounded-md border`,`border-input bg-card px-3 py-2 text-left font-sans text-sm text-card-foreground`,`transition-colors hover:bg-accent hover:text-accent-foreground`,`focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,`disabled:cursor-default disabled:opacity-60`),children:[(0,B.jsx)(`span`,{children:n.definition.label}),(0,B.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n.definition.name})]})},n.definition.name))})]})}function OS(e){return{past:[],present:e,future:[]}}function kS(e,t){return Object.is(e.present,t)?e:{past:[...e.past,e.present].slice(-50),present:t,future:[]}}function AS(e){return e.past.length>0}function jS(e){return e.future.length>0}function MS(e){let t=e.past.at(-1);return t===void 0?e:{past:e.past.slice(0,-1),present:t,future:[e.present,...e.future].slice(0,50)}}function NS(e){let[t,...n]=e.future;return t===void 0?e:{past:[...e.past,e.present].slice(-50),present:t,future:n}}function PS(e){return OS(e)}var FS=[`desktop`,`tablet`,`mobile`],IS={desktop:`100%`,tablet:`768px`,mobile:`375px`};function LS({html:e,viewport:t,selectedKey:n,chromeVisible:r,handlers:i,title:a}){let{t:o}=Vi(),s=(0,M.useRef)(null),c=(0,M.useRef)(null),l=(0,M.useRef)(i);l.current=i;let u=(0,M.useCallback)(()=>{c.current?.(),c.current=null;let e=s.current?.contentDocument??null;e!==null&&(c.current=bS(e,{onSelect:e=>l.current.onSelect(e),onMove:(e,t)=>l.current.onMove(e,t),onInsert:(e,t)=>l.current.onInsert(e,t),onInlineEdit:(e,t,n)=>l.current.onInlineEdit(e,t,n)}))},[]);return(0,M.useEffect)(()=>()=>c.current?.(),[]),(0,M.useEffect)(()=>{let e=s.current?.contentDocument??null;e!==null&&vS(e,r?n:null)},[n,r]),(0,M.useEffect)(()=>{let e=s.current?.contentDocument??null;e!==null&&yS(e,r)},[r]),(0,B.jsxs)(`div`,{className:`flex justify-center overflow-auto rounded-lg border border-border bg-muted p-4`,children:[(0,B.jsx)(`iframe`,{ref:s,title:a,srcDoc:e??``,onLoad:u,className:hs(`h-[70vh] w-full border-0 bg-white transition-[max-width] duration-200`,`rounded-md shadow-card`),style:{maxWidth:IS[t]}}),e===null&&(0,B.jsx)(`p`,{className:`sr-only`,children:o(`builder.previewLoading`)})]})}var RS=300;function zS({token:e,collection:t,entryId:n,zone:r,blocks:i,onBlocksChange:a,disabled:o=!1}){let{t:s}=Vi(),[c,l]=(0,M.useState)(()=>OS(i)),[u,d]=(0,M.useState)(null),[f,p]=(0,M.useState)(`desktop`),[m,h]=(0,M.useState)(!0),[g,_]=(0,M.useState)(null),[v,y]=(0,M.useState)(!1),[b,x]=(0,M.useState)(null),S=(0,M.useRef)(null);(0,M.useEffect)(()=>{i!==S.current&&l(PS(i))},[i]);let C=c.present;function w(e){e!==C&&(S.current=e,l(t=>kS(t,e)),a(e))}function T(e){l(t=>{let n=e(t);return n===t?t:(S.current=n.present,a(n.present),n)})}(0,M.useEffect)(()=>{let i=!1,a=setTimeout(()=>{y(!0),Ld(e,t,n,{[r]:C}).then(e=>{i||(_(e.html),x(null))}).catch(e=>{i||x(e instanceof L?e.message:s(`builder.previewError`))}).finally(()=>{i||y(!1)})},RS);return()=>{i=!0,clearTimeout(a)}},[e,t,n,r,C,s]);function E(e,t){o||w(rS(C,e,t))}function D(e,t){if(o)return;let n=iS(C,e,t);n.key!==null&&(w(n.blocks),d(n.key))}function O(e){o||(w(aS(C,e)),u===e&&d(null))}function k(e,t,n){o||w(cS(C,e,t,n))}function A(e){!(e.ctrlKey||e.metaKey)||e.key.toLowerCase()!==`z`||(e.preventDefault(),T(e.shiftKey?NS:MS))}let j=C.find(e=>e.key===u)??null,N=j===null?void 0:Ud(j.type);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,onKeyDown:A,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsxs)(`fieldset`,{className:`m-0 flex gap-1 border-0 p-0`,"aria-label":s(`builder.historyLabel`),children:[(0,B.jsx)(_s,{size:`sm`,variant:`secondary`,disabled:o||!AS(c),onClick:()=>T(MS),children:s(`builder.undo`)}),(0,B.jsx)(_s,{size:`sm`,variant:`secondary`,disabled:o||!jS(c),onClick:()=>T(NS),children:s(`builder.redo`)})]}),(0,B.jsx)(`fieldset`,{className:`m-0 flex gap-1 border-0 p-0`,"aria-label":s(`builder.viewportLabel`),children:FS.map(e=>(0,B.jsx)(_s,{size:`sm`,variant:f===e?`primary`:`ghost`,"aria-pressed":f===e,onClick:()=>p(e),children:s(`builder.viewport.${e}`)},e))}),(0,B.jsx)(_s,{size:`sm`,variant:`ghost`,"aria-pressed":!m,onClick:()=>h(e=>!e),children:s(m?`builder.chromeHide`:`builder.chromeShow`)}),(0,B.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:v?s(`builder.previewLoading`):``})]}),b!==null&&(0,B.jsx)(Td,{tone:`danger`,children:b}),(0,B.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-[16rem_minmax(0,1fr)_20rem]`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,B.jsxs)(vs,{children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{children:(0,B.jsx)(`h3`,{children:s(`builder.outlineHeading`)})})}),(0,B.jsx)(Ss,{children:(0,B.jsx)(xS,{blocks:C,selectedKey:u,onSelect:d,onMove:E,onInsert:D,onRemove:O,disabled:o})})]}),(0,B.jsxs)(vs,{children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{children:(0,B.jsx)(`h3`,{children:s(`builder.pickerHeading`)})})}),(0,B.jsx)(Ss,{children:(0,B.jsx)(DS,{disabled:o,onAdd:e=>D(e,C.length)})})]})]}),(0,B.jsx)(LS,{html:g,viewport:f,selectedKey:u,chromeVisible:m&&!o,title:s(`builder.previewTitle`),handlers:{onSelect:d,onMove:E,onInsert:D,onInlineEdit:k}}),(0,B.jsxs)(vs,{children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{children:(0,B.jsx)(`h3`,{children:s(`builder.detailHeading`)})})}),(0,B.jsx)(Ss,{children:j===null||N===void 0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`builder.detailEmpty`)}):(0,B.jsx)(eS,{idPrefix:`builder-${j.key}`,definition:N,data:j.data,disabled:o,onChange:e=>w(oS(C,j.key,e))})})]})]})]})}var BS=1,VS=`cogenta.autosave`,HS=5e3;function US(e,t,n){return`${VS}.${e}.${t??`new`}.${n}`}function WS(e,t){let n=e.getItem(t);if(n===null)return null;let r;try{r=JSON.parse(n)}catch{return e.removeItem(t),null}if(typeof r!=`object`||!r)return e.removeItem(t),null;let i=r;return i.format!==BS||typeof i.at!=`string`||typeof i.values!=`object`||i.values===null||typeof i.blocks!=`object`||i.blocks===null?(e.removeItem(t),null):{at:i.at,values:i.values,blocks:i.blocks}}function GS(e,t,n,r=new Date){let i={format:BS,at:r.toISOString(),values:n.values,blocks:n.blocks};try{e.setItem(t,JSON.stringify(i))}catch{}}function KS(){try{return window.localStorage}catch{return null}}function qS(e,t){try{e.removeItem(t)}catch{}}function JS(e,t,n){if(e===null)return!1;let r=Date.parse(e.at),i=Date.parse(n);return Number.isNaN(r)||!Number.isNaN(i)&&r<=i?!1:!YS(e,t)}function YS(e,t){return JSON.stringify(e.values)===JSON.stringify(t.values)&&JSON.stringify(e.blocks)===JSON.stringify(t.blocks)}function XS({collection:e,values:t,blocks:n,onChange:r,onBlocksChange:i,disabled:a=!1,skipFields:o}){return(0,B.jsx)(B.Fragment,{children:e.fields.filter(e=>o?.has(e.name)!==!0).map(e=>e.kind===`blocks`?(0,B.jsx)($x,{id:`field-${e.name}`,field:e,value:n[e.name]??[],onChange:t=>i(e.name,t),disabled:a},e.name):(0,B.jsx)($x,{id:`field-${e.name}`,field:e,value:t[e.name]??e.default??Rd(e.kind),onChange:t=>r(e.name,t),disabled:a},e.name))})}function ZS({token:e,collection:t,entryId:n,currentLocale:r,locales:i,currentValues:a}){let{t:o}=Vi(),s=ot(),[c,l]=(0,M.useState)(null),[u,d]=(0,M.useState)(null);return(0,M.useEffect)(()=>{let r=!1;return ma(e,t,n).then(e=>{r||l(e)}).catch(e=>{r||d(e instanceof L?e.message:o(`translations.loadError`))}),()=>{r=!0}},[e,t,n,o]),i.length<2?null:(0,B.jsxs)(`section`,{"aria-labelledby":`translations-heading`,className:`translation-switcher`,children:[(0,B.jsx)(`h2`,{id:`translations-heading`,children:o(`translations.heading`)}),u!==null&&(0,B.jsx)(`p`,{role:`alert`,children:u}),c===null&&u===null&&(0,B.jsx)(`p`,{children:o(`common.loading`)}),c!==null&&(0,B.jsx)(`ul`,{children:i.map(e=>{let i=c.find(t=>t.locale===e);return(0,B.jsx)(`li`,{children:e===r?(0,B.jsx)(`strong`,{children:o(`translations.current`,{locale:e})}):i===void 0?(0,B.jsx)(`button`,{type:`button`,onClick:()=>s(`/collections/${encodeURIComponent(t)}/new`,{state:{locale:e,translationOf:n,values:a}}),children:o(`translations.create`,{locale:e})}):(0,B.jsx)(`button`,{type:`button`,onClick:()=>s(`/collections/${encodeURIComponent(t)}/${encodeURIComponent(i.id)}`),children:e})},e)})})]})}function QS(e){let{enabled:t,storageKey:n,intervalMs:r=HS}=e,i=e.storage??KS(),[a,o]=(0,M.useState)(null),s=(0,M.useRef)(e.snapshot),c=(0,M.useRef)(e.baseline),l=(0,M.useRef)(null);return s.current=e.snapshot,c.current=e.baseline,(0,M.useEffect)(()=>{if(!t||i===null)return;l.current=null,o(null);let e=setInterval(()=>{let e=s.current;if(YS(e,c.current)){l.current!==null&&(qS(i,n),l.current=null,o(null));return}if(l.current!==null&&YS(e,l.current))return;let t=new Date;GS(i,n,e,t),l.current=e,o(t.toISOString())},r);return()=>{clearInterval(e)}},[t,i,n,r]),{savedAt:a}}function $S({token:e,collection:t,entryId:n,canRestore:r,onRestored:i}){let{t:a}=Vi(),[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)(!0),[u,d]=(0,M.useState)(null),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(null),[g,_]=(0,M.useState)(!1),[v,y]=(0,M.useState)(null),[b,x]=(0,M.useState)(null),[S,C]=(0,M.useState)(null),w=(0,M.useCallback)(async()=>{l(!0),d(null);try{s(await pa(e,t,n))}catch(e){d(e instanceof L?e.message:a(`versions.loadError`))}finally{l(!1)}},[e,t,n,a]);(0,M.useEffect)(()=>{w()},[w]);let T=o?.find(e=>e.live)?.version??null;async function E(r){if(f===r){p(null),h(null);return}if(T!==null){p(r),h(null),y(null),_(!0);try{h(await ha(e,t,n,r,T))}catch(e){y(e instanceof L?e.message:a(`versions.diffError`))}finally{_(!1)}}}async function D(r){x(r),C(null);try{i(await ga(e,t,n,r)),await w(),p(null),h(null)}catch(e){C(e instanceof L?e.message:a(`versions.restoreError`))}finally{x(null)}}return(0,B.jsxs)(`section`,{"aria-labelledby":`version-history-heading`,className:`version-history`,children:[(0,B.jsx)(`h2`,{id:`version-history-heading`,children:a(`versions.heading`)}),c&&(0,B.jsx)(`p`,{children:a(`common.loading`)}),u!==null&&(0,B.jsx)(`p`,{role:`alert`,children:u}),S!==null&&(0,B.jsx)(`p`,{role:`alert`,children:S}),!c&&u===null&&o!==null&&(0,B.jsx)(`ol`,{className:`version-history__list`,children:o.map(e=>(0,B.jsxs)(`li`,{className:`version-history__item`,children:[(0,B.jsxs)(`span`,{children:[`v`,e.version,` — `,e.status,e.live&&a(`versions.current`)]}),(0,B.jsx)(`span`,{children:e.createdAt}),!e.live&&(0,B.jsxs)(`div`,{className:`version-history__actions`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>void E(e.version),children:f===e.version?a(`versions.hideDiff`):a(`versions.compare`)}),r&&(0,B.jsx)(`button`,{type:`button`,disabled:b!==null,onClick:()=>void D(e.version),children:b===e.version?a(`versions.restoring`):a(`versions.restore`)})]}),f===e.version&&(0,B.jsxs)(`div`,{className:`version-history__diff`,children:[g&&(0,B.jsx)(`p`,{children:a(`versions.computingDiff`)}),v!==null&&(0,B.jsx)(`p`,{role:`alert`,children:v}),m!==null&&(0,B.jsx)(eC,{diff:m})]})]},e.version))})]})}function eC({diff:e}){let{t}=Vi();return e.changed?(0,B.jsxs)(B.Fragment,{children:[e.fields.length>0&&(0,B.jsx)(`ul`,{className:`version-history__field-changes`,children:e.fields.map(e=>(0,B.jsx)(tC,{change:e},e.field))}),e.blocks.length>0&&(0,B.jsx)(`ul`,{className:`version-history__block-changes`,children:e.blocks.map(e=>(0,B.jsx)(nC,{change:e},`${e.zone}:${e.key}`))})]}):(0,B.jsx)(`p`,{children:t(`versions.noDiff`)})}function tC({change:e}){let{t}=Vi();return(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`strong`,{children:e.field}),` — `,rC(e.change,t),e.change!==`added`&&t(`versions.before`,{value:iC(e.before)}),e.change!==`removed`&&t(`versions.after`,{value:iC(e.after)})]})}function nC({change:e}){let{t}=Vi();return(0,B.jsxs)(`li`,{children:[(0,B.jsxs)(`strong`,{children:[e.zone,` / `,e.type]}),` `,`— `,rC(e.change,t),e.change===`moved`&&t(`versions.movedPosition`,{from:e.fromIndex,to:e.toIndex}),e.fields.length>0&&(0,B.jsx)(`ul`,{children:e.fields.map(e=>(0,B.jsx)(tC,{change:e},e.field))})]})}function rC(e,t){switch(e){case`added`:return t(`versions.changeAdded`);case`removed`:return t(`versions.changeRemoved`);case`changed`:return t(`versions.changeChanged`);case`moved`:return t(`versions.changeMoved`)}}function iC(e){return e===void 0?`—`:typeof e==`string`?e:JSON.stringify(e)}var aC={values:{},blocks:{}},oC=`cogenta.admin.editorMode`;function sC(){try{return localStorage.getItem(oC)===`visual`?`visual`:`form`}catch{return`form`}}function cC(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString()}function lC(){let{t:e}=Vi(),{name:t=``,id:n}=ut(),r=n===void 0,i=vr(),a=Ta(),o=ot(),s=it(),c=r?s.state:null,l=i.state.status===`authenticated`?i.state.token:null,u=i.state.status===`authenticated`?i.state.user.roles:[],d=a.status===`ready`?a.schema.collections.find(e=>e.name===t):void 0,f=a.status===`ready`?a.schema.site?.locales??[]:[],p=a.status===`ready`?a.schema.site?.defaultLocale??`en`:`en`,[m,h]=(0,M.useState)({}),[g,_]=(0,M.useState)({}),[v,y]=(0,M.useState)(p),[b,x]=(0,M.useState)(null),[S,C]=(0,M.useState)(!r),[w,T]=(0,M.useState)(!1),[E,D]=(0,M.useState)(null),[O,k]=(0,M.useState)(!1),[A,j]=(0,M.useState)(!1),[N,ee]=(0,M.useState)(null),[te,P]=(0,M.useState)(aC),[F,ne]=(0,M.useState)(null),[re,ie]=(0,M.useState)(sC);(0,M.useEffect)(()=>{if(r){let e={...c?.values??{}};c?.values!==void 0&&h(e),c?.locale!==void 0&&y(c.locale),c?.translationOf!==void 0&&x(c.translationOf),P({values:e,blocks:{}}),C(!1);return}if(l===null||n===void 0){C(!1);return}let i=!1;return C(!0),ua(l,t,n).then(e=>{if(!i){h({...e.values}),_({...e.blocks}),y(e.locale),x(e.translationOf);let n={values:e.values,blocks:e.blocks};P(n);let r=KS();if(r!==null){let i=WS(r,US(t,e.id,e.locale));ne(JS(i,n,e.updatedAt)?i:null)}}}).catch(t=>{i||D(t instanceof L?t.message:e(`entryEdit.loadError`))}).finally(()=>{i||C(!1)}),()=>{i=!0}},[r,l,t,n,c,e]);function ae(e,t){h(n=>({...n,[e]:t}))}function I(e,t){_(n=>({...n,[e]:t}))}function oe(){let e=KS();e!==null&&qS(e,US(t,n??null,v))}async function se(i){if(i.preventDefault(),l!==null){T(!0),D(null),k(!1);try{if(r){let e=await da(l,t,m,{blocks:g,locale:v,...b===null?{}:{translationOf:b}});oe(),o(`/collections/${encodeURIComponent(t)}/${encodeURIComponent(e.id)}`,{replace:!0})}else if(n!==void 0){let e=await fa(l,t,n,m,g);h({...e.values}),_({...e.blocks}),P({values:e.values,blocks:e.blocks}),ne(null),oe(),k(!0)}}catch(t){D(t instanceof L?t.message:e(`entryEdit.saveError`))}finally{T(!1)}}}async function ce(){if(l!==null&&n!==void 0){j(!0),ee(null);try{let r=await _a(l,t,n);if(r.url===null){ee(e(`entryEdit.previewNoSiteUrl`));return}window.open(r.url,`_blank`,`noopener`)}catch(t){ee(t instanceof L?t.message:e(`entryEdit.previewError`))}finally{j(!1)}}}function le(e){ie(e);try{localStorage.setItem(oC,e)}catch{}}let ue=d!==void 0&&ba(r?`create`:`update`,d,u),de=d?.fields.find(e=>e.kind===`blocks`)?.name,fe=re===`visual`&&de!==void 0&&r,pe=re===`visual`&&de!==void 0&&!r?de:null,me=QS({enabled:ue&&!S,storageKey:US(t,n??null,v),snapshot:{values:m,blocks:g},baseline:te});if(a.status===`loading`||S)return(0,B.jsx)(`p`,{children:e(`common.loading`)});if(a.status===`error`)return(0,B.jsx)(`p`,{role:`alert`,children:e(`common.schemaError`,{message:a.message})});if(d===void 0||!ba(`read`,d,u))return(0,B.jsxs)(`section`,{"aria-labelledby":`entry-heading`,children:[(0,B.jsx)(`h1`,{id:`entry-heading`,children:e(`collectionList.notFoundHeading`)}),(0,B.jsxs)(`p`,{children:[e(`collectionList.notFoundBody`),` `,(0,B.jsx)(Tn,{to:`/collections`,children:e(`collectionList.back`)})]})]});let he=Object.entries(d.fields).filter(([,e])=>e.kind===`text`).map(([e,t])=>({name:e,label:t.admin?.label??e,value:typeof m[e]==`string`?m[e]:``}));return(0,B.jsxs)(`section`,{"aria-labelledby":`entry-heading`,children:[(0,B.jsx)(`h1`,{id:`entry-heading`,children:e(r?`entryEdit.newHeading`:`entryEdit.editHeading`,{label:d.labels.singular})}),f.length>1&&(0,B.jsxs)(`p`,{children:[e(`entryEdit.languageLabel`),` `,(0,B.jsx)(`strong`,{children:v}),r&&b!==null&&e(`entryEdit.newTranslationSuffix`)]}),(0,B.jsx)(`p`,{children:(0,B.jsx)(Tn,{to:`/collections/${encodeURIComponent(t)}`,children:e(`entryEdit.backToList`)})}),!r&&n!==void 0&&(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`button`,{type:`button`,disabled:A,onClick:()=>void ce(),children:e(A?`entryEdit.previewGenerating`:`entryEdit.previewButton`)}),N!==null&&(0,B.jsxs)(`span`,{role:`alert`,children:[` `,N]})]}),!ue&&(0,B.jsx)(`p`,{role:`alert`,children:e(`entryEdit.readOnly`)}),F!==null&&(0,B.jsxs)(`div`,{role:`alert`,className:`entry-form__recovery`,children:[(0,B.jsx)(`p`,{children:e(`entryEdit.autosaveFound`,{at:cC(F.at)})}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>{h({...F.values}),_({...F.blocks}),ne(null)},children:e(`entryEdit.autosaveRestore`)}),` `,(0,B.jsx)(`button`,{type:`button`,onClick:()=>{oe(),ne(null)},children:e(`entryEdit.autosaveDiscard`)})]}),de!==void 0&&(0,B.jsxs)(`fieldset`,{"aria-label":e(`builder.modeLabel`),className:`entry-form__modes`,children:[(0,B.jsx)(_s,{size:`sm`,variant:re===`form`?`primary`:`ghost`,"aria-pressed":re===`form`,onClick:()=>le(`form`),children:e(`builder.modeForm`)}),(0,B.jsx)(_s,{size:`sm`,variant:re===`visual`?`primary`:`ghost`,"aria-pressed":re===`visual`,onClick:()=>le(`visual`),children:e(`builder.modeVisual`)})]}),fe&&(0,B.jsx)(`p`,{role:`note`,children:e(`builder.unavailableNew`)}),(0,B.jsxs)(`form`,{onSubmit:e=>void se(e),children:[(0,B.jsx)(XS,{collection:d,values:m,blocks:g,onChange:ae,onBlocksChange:I,disabled:!ue,...pe===null?{}:{skipFields:new Set([pe])}}),pe!==null&&l!==null&&n!==void 0&&(0,B.jsx)(zS,{token:l,collection:t,entryId:n,zone:pe,blocks:g[pe]??[],onBlocksChange:e=>I(pe,e),disabled:!ue}),E!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`entry-form__error`,children:E}),O&&(0,B.jsx)(`p`,{role:`status`,children:e(`entryEdit.saved`)}),me.savedAt!==null&&!O&&(0,B.jsx)(`p`,{className:`entry-form__autosave`,children:e(`entryEdit.autosaveKept`,{at:cC(me.savedAt)})}),ue&&(0,B.jsx)(`button`,{type:`submit`,disabled:w,children:e(r?`entryEdit.createButton`:`entryEdit.saveButton`)})]}),ue&&l!==null&&he.length>0&&(0,B.jsx)(Id,{token:l,fields:he,locale:v,siteLocales:f,onApply:ae}),!r&&n!==void 0&&l!==null&&(0,B.jsx)(ZS,{token:l,collection:t,entryId:n,currentLocale:v,locales:f,currentValues:m}),!r&&n!==void 0&&l!==null&&(0,B.jsx)($S,{token:l,collection:t,entryId:n,canRestore:ue,onRestored:e=>{h({...e.values}),_({...e.blocks}),k(!0)}})]})}function uC(){let{t:e}=Vi(),t=vr(),n=ot(),r=it(),[i,a]=(0,M.useState)(``),[o,s]=(0,M.useState)(``),[c,l]=(0,M.useState)({kind:`password`}),[u,d]=(0,M.useState)(``),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(!1);if(t.state.status===`authenticated`){let e=r.state?.from?.pathname??`/`;return(0,B.jsx)(Mt,{to:e,replace:!0})}function g(){n(r.state?.from?.pathname??`/`,{replace:!0})}async function _(){p(null),h(!0);try{await t.loginWithPasskey(),g()}catch(t){p(t instanceof L?t.message:e(`login.passkeyRefused`))}finally{h(!1)}}async function v(n){n.preventDefault(),p(null),h(!0);try{let e=await t.login(i,o);e.status===`session`?g():l({kind:`totp`,ticket:e.ticket})}catch(t){p(t instanceof L?t.message:e(`login.connectionFailed`))}finally{h(!1)}}async function y(n){if(n.preventDefault(),c.kind===`totp`){p(null),h(!0);try{await t.completeTotp(c.ticket,u),g()}catch(t){p(t instanceof L?t.message:e(`login.incorrectCode`))}finally{h(!1)}}}return c.kind===`totp`?(0,B.jsx)(`main`,{className:`auth-page`,children:(0,B.jsxs)(`form`,{className:`auth-form`,onSubmit:y,"aria-labelledby":`totp-heading`,children:[(0,B.jsx)(`h1`,{id:`totp-heading`,children:e(`login.totpHeading`)}),(0,B.jsx)(`p`,{children:e(`login.totpPrompt`)}),(0,B.jsx)(`label`,{htmlFor:`totp-code`,children:e(`login.code`)}),(0,B.jsx)(`input`,{id:`totp-code`,name:`totp-code`,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:u,onChange:e=>d(e.target.value)}),f!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`auth-form__error`,children:f}),(0,B.jsx)(`button`,{type:`submit`,disabled:m,children:e(`login.verify`)})]})}):(0,B.jsx)(`main`,{className:`auth-page`,children:(0,B.jsxs)(`div`,{className:`auth-form`,children:[(0,B.jsx)(`h1`,{id:`login-heading`,children:e(`login.heading`)}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>void _(),disabled:m,children:e(`login.passkeyButton`)}),(0,B.jsx)(`p`,{className:`auth-form__divider`,children:e(`login.or`)}),(0,B.jsxs)(`form`,{onSubmit:v,"aria-labelledby":`login-heading`,children:[(0,B.jsx)(`label`,{htmlFor:`email`,children:e(`login.email`)}),(0,B.jsx)(`input`,{id:`email`,name:`email`,type:`email`,autoComplete:`username`,required:!0,value:i,onChange:e=>a(e.target.value)}),(0,B.jsx)(`label`,{htmlFor:`password`,children:e(`login.password`)}),(0,B.jsx)(`input`,{id:`password`,name:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:o,onChange:e=>s(e.target.value)}),f!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`auth-form__error`,children:f}),(0,B.jsx)(`button`,{type:`submit`,disabled:m,children:e(`login.submit`)})]})]})})}function dC({token:e,id:t,alt:n,focal:r,disabled:i=!1,onChange:a}){let{t:o}=Vi(),[s,c]=(0,M.useState)(null),[l,u]=(0,M.useState)(null);(0,M.useEffect)(()=>{let n=!1,r=null;return df(e,t).then(e=>{if(n){URL.revokeObjectURL(e);return}r=e,c(e)}).catch(()=>{n||u(o(`media.focalLoadError`))}),()=>{n=!0,r!==null&&URL.revokeObjectURL(r)}},[e,t,o]);async function d(n){if(i)return;let r=n.currentTarget.getBoundingClientRect(),s={x:Math.min(1,Math.max(0,(n.clientX-r.left)/r.width)),y:Math.min(1,Math.max(0,(n.clientY-r.top)/r.height))};try{await lf(e,t,{focal:s}),a(s)}catch(e){u(e instanceof L?e.message:o(`media.focalUpdateError`))}}return l===null?s===null?(0,B.jsx)(`p`,{children:o(`common.loading`)}):(0,B.jsxs)(`div`,{className:`focal-point-editor`,children:[(0,B.jsxs)(`div`,{className:`focal-point-editor__frame`,children:[(0,B.jsx)(`img`,{src:s,alt:n,onClick:e=>void d(e),className:`focal-point-editor__image`}),r!==null&&(0,B.jsx)(`span`,{className:`focal-point-editor__marker`,style:{left:`${r.x*100}%`,top:`${r.y*100}%`},"aria-hidden":`true`})]}),(0,B.jsx)(`p`,{className:`field__help`,children:o(`media.focalHint`)})]}):(0,B.jsx)(`p`,{role:`alert`,children:l})}function fC({token:e,asset:t,onChange:n,onDeleted:r,onClose:i}){let{t:a}=Vi(),o=(0,M.useId)(),s=(0,M.useId)(),c=(0,M.useId)(),[l,u]=(0,M.useState)(t.alt),[d,f]=(0,M.useState)(t.decorative),[p,m]=(0,M.useState)(t.decorativeJustification??``),[h,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(!1),[y,b]=(0,M.useState)(null);async function x(r){r.preventDefault(),g(!0),b(null);try{n(await lf(e,t.id,{...d?{}:{alt:l},decorative:d,...d?{decorativeJustification:p}:{}}))}catch(e){b(e instanceof L?e.message:a(`media.updateError`))}finally{g(!1)}}async function S(){v(!0),b(null);try{await uf(e,t.id),r(t.id)}catch(e){b(e instanceof L?e.message:a(`media.deleteError`)),v(!1)}}return(0,B.jsxs)(`section`,{"aria-labelledby":`media-detail-heading`,className:`media-detail`,children:[(0,B.jsx)(`h2`,{id:`media-detail-heading`,children:t.filename}),(0,B.jsx)(`button`,{type:`button`,onClick:i,children:a(`media.closeButton`)}),t.kind===`image`&&(0,B.jsx)(dC,{token:e,id:t.id,alt:t.alt,focal:t.focal,onChange:e=>n({...t,focal:e})}),(0,B.jsxs)(`form`,{onSubmit:e=>void x(e),children:[!d&&(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:o,children:a(`media.altLabel`)}),(0,B.jsx)(`input`,{id:o,type:`text`,required:!d,value:l,onChange:e=>u(e.target.value)})]}),(0,B.jsxs)(`div`,{className:`field field--checkbox`,children:[(0,B.jsx)(`input`,{id:s,type:`checkbox`,checked:d,onChange:e=>f(e.target.checked)}),(0,B.jsx)(`label`,{htmlFor:s,children:a(`media.decorativeLabel`)})]}),d&&(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:c,children:a(`media.justificationLabel`)}),(0,B.jsx)(`input`,{id:c,type:`text`,required:d,value:p,onChange:e=>m(e.target.value)})]}),y!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`entry-form__error`,children:y}),(0,B.jsx)(`button`,{type:`submit`,disabled:h,children:a(`media.saveButton`)})]}),(0,B.jsx)(`button`,{type:`button`,disabled:_,onClick:()=>void S(),children:a(_?`media.deleting`:`media.deleteButton`)})]})}function pC({token:e,onUploaded:t}){let{t:n}=Vi(),r=(0,M.useId)(),i=(0,M.useId)(),a=(0,M.useId)(),o=(0,M.useId)(),[s,c]=(0,M.useState)(null),[l,u]=(0,M.useState)(``),[d,f]=(0,M.useState)(!1),[p,m]=(0,M.useState)(``),[h,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(null);async function y(r){if(r.preventDefault(),s!==null){g(!0),v(null);try{let n=await af(s);t(await sf(e,{kind:rf(s.type),filename:s.name,mimeType:s.type,data:n,...d?{}:{alt:l},decorative:d,...d?{decorativeJustification:p}:{}})),c(null),u(``),f(!1),m(``)}catch(e){v(e instanceof L?e.message:n(`media.uploadError`))}finally{g(!1)}}}return(0,B.jsxs)(`form`,{className:`upload-form`,onSubmit:e=>void y(e),children:[(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsx)(`label`,{htmlFor:r,children:n(`media.fileLabel`)}),(0,B.jsx)(`input`,{id:r,type:`file`,onChange:e=>c(e.target.files?.[0]??null)})]}),!d&&(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsxs)(`label`,{htmlFor:i,children:[n(`media.altLabel`),(0,B.jsxs)(`span`,{"aria-hidden":`true`,className:`field__required`,children:[` `,`*`]})]}),(0,B.jsx)(`input`,{id:i,type:`text`,required:!d,value:l,onChange:e=>u(e.target.value)})]}),(0,B.jsxs)(`div`,{className:`field field--checkbox`,children:[(0,B.jsx)(`input`,{id:a,type:`checkbox`,checked:d,onChange:e=>f(e.target.checked)}),(0,B.jsx)(`label`,{htmlFor:a,children:n(`media.decorativeLabel`)})]}),d&&(0,B.jsxs)(`div`,{className:`field`,children:[(0,B.jsxs)(`label`,{htmlFor:o,children:[n(`media.justificationLabel`),(0,B.jsxs)(`span`,{"aria-hidden":`true`,className:`field__required`,children:[` `,`*`]})]}),(0,B.jsx)(`input`,{id:o,type:`text`,required:d,value:p,onChange:e=>m(e.target.value)})]}),_!==null&&(0,B.jsx)(`p`,{role:`alert`,className:`entry-form__error`,children:_}),(0,B.jsx)(`button`,{type:`submit`,disabled:h||s===null,children:n(h?`media.uploading`:`media.uploadButton`)})]})}function mC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,[r,i]=(0,M.useState)([]),[a,o]=(0,M.useState)(!0),[s,c]=(0,M.useState)(null),[l,u]=(0,M.useState)(null),d=(0,M.useCallback)(async()=>{if(n!==null){o(!0),c(null);try{let e=await of(n);i(e.items)}catch(t){c(t instanceof L?t.message:e(`media.loadError`))}finally{o(!1)}}},[n,e]);if((0,M.useEffect)(()=>{d()},[d]),n===null)return(0,B.jsx)(`p`,{children:e(`common.loading`)});let f=r.find(e=>e.id===l)??null;return(0,B.jsxs)(`section`,{"aria-labelledby":`media-heading`,children:[(0,B.jsx)(`h1`,{id:`media-heading`,children:e(`media.heading`)}),(0,B.jsx)(pC,{token:n,onUploaded:e=>i(t=>[e,...t])}),s!==null&&(0,B.jsx)(`p`,{role:`alert`,children:s}),a&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!a&&(0,B.jsxs)(`ul`,{className:`media-grid`,children:[r.map(e=>(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,className:`media-grid__item`,onClick:()=>u(e.id),children:[(0,B.jsx)(ff,{token:n,id:e.id,alt:e.alt,previewable:e.kind===`image`}),(0,B.jsx)(`span`,{className:`media-grid__filename`,children:e.filename})]})},e.id)),r.length===0&&(0,B.jsx)(`li`,{children:e(`media.empty`)})]}),f!==null&&(0,B.jsx)(fC,{token:n,asset:f,onChange:e=>i(t=>t.map(t=>t.id===e.id?e:t)),onDeleted:e=>{i(t=>t.filter(t=>t.id!==e)),u(null)},onClose:()=>u(null)})]})}function hC(e,t){return R(`/api/users${t===void 0||t===``?``:`?role=${encodeURIComponent(t)}`}`,{headers:z(e)})}function gC(e,t){return R(`/api/users`,{method:`POST`,headers:z(e),body:JSON.stringify(t)})}function _C(e,t,n){return R(`/api/users/${encodeURIComponent(t)}`,{method:`PATCH`,headers:z(e),body:JSON.stringify(n)})}function vC(e,t){return R(`/api/users/${encodeURIComponent(t)}`,{headers:z(e)})}function yC(e,t){return R(`/api/users/${encodeURIComponent(t)}/sessions`,{headers:z(e)})}async function bC(e,t,n){await R(`/api/users/${encodeURIComponent(t)}/sessions/${encodeURIComponent(n)}`,{method:`DELETE`,headers:z(e)})}async function xC(e,t,n){await R(`/api/users/me/password`,{method:`POST`,headers:z(e),body:JSON.stringify({currentPassword:t,newPassword:n})})}function SC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,r=(t.state.status===`authenticated`?t.state.user.roles:[]).includes(`admin`),[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(``),[c,l]=(0,M.useState)(!0),[u,d]=(0,M.useState)(null),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(!1),[g,_]=(0,M.useState)(``),[v,y]=(0,M.useState)(`editor`),[b,x]=(0,M.useState)(null),[S,C]=(0,M.useState)(null),[w,T]=(0,M.useState)(``),[E,D]=(0,M.useState)(null),[O,k]=(0,M.useState)([]),A=(0,M.useCallback)(async()=>{if(!(n===null||!r)){l(!0),d(null);try{a(await hC(n,o))}catch(t){d(t instanceof L?t.message:e(`users.loadError`))}finally{l(!1)}}},[n,r,o,e]);(0,M.useEffect)(()=>{A()},[A]);let j=[...new Set(i.flatMap(e=>e.roles))].sort();function N(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}async function ee(t){if(t.preventDefault(),n!==null){p(null);try{let e=await gC(n,{email:g,roles:N(v)});x(e),h(!1),_(``),y(`editor`),await A()}catch(t){p(t instanceof L?t.message:e(`users.createError`))}}}async function te(t){if(t.preventDefault(),n!==null&&S!==null){p(null);try{await _C(n,S.id,{roles:N(w)}),C(null),await A()}catch(t){p(t instanceof L?t.message:e(`users.updateError`))}}}async function P(t){if(n!==null){p(null);try{await _C(n,t.id,{status:t.status===`active`?`disabled`:`active`}),await A()}catch(t){p(t instanceof L?t.message:e(`users.updateError`))}}}async function F(t){if(n!==null){p(null),D(t),k([]);try{k(await yC(n,t.id))}catch(t){p(t instanceof L?t.message:e(`users.sessionsError`))}}}async function ne(t){if(n!==null&&E!==null){p(null);try{await bC(n,E.id,t),k(await yC(n,E.id))}catch(t){p(t instanceof L?t.message:e(`users.revokeError`))}}}return r?(0,B.jsxs)(`section`,{"aria-labelledby":`users-heading`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,B.jsx)(`h1`,{id:`users-heading`,className:`m-0 text-xl leading-7 font-semibold`,children:e(`users.heading`)}),(0,B.jsx)(_s,{onClick:()=>h(!0),children:e(`users.newButton`)})]}),b!==null&&(0,B.jsxs)(Td,{tone:`success`,live:`assertive`,title:e(`users.createdTitle`,{email:b.user.email}),onDismiss:()=>x(null),dismissLabel:e(`users.createdDismiss`),children:[(0,B.jsx)(`p`,{children:e(`users.createdBody`)}),(0,B.jsx)(`p`,{className:`font-mono text-sm break-all`,children:b.password})]}),f!==null&&(0,B.jsx)(Td,{tone:`danger`,live:`assertive`,children:(0,B.jsx)(`p`,{children:f})}),(0,B.jsx)(`div`,{className:`max-w-xs`,children:(0,B.jsx)(ws,{label:e(`users.roleFilter`),children:t=>(0,B.jsxs)(Ds,{...t,value:o,onChange:e=>s(e.target.value),children:[(0,B.jsx)(`option`,{value:``,children:e(`users.allRoles`)}),j.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]})})}),u!==null&&(0,B.jsx)(Td,{tone:`danger`,live:`assertive`,children:(0,B.jsx)(`p`,{children:u})}),c&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!c&&u===null&&(0,B.jsx)(Dd,{label:e(`users.tableLabel`),children:(0,B.jsxs)(Od,{children:[(0,B.jsx)(kd,{children:(0,B.jsxs)(jd,{children:[(0,B.jsx)(Md,{children:e(`users.emailColumn`)}),(0,B.jsx)(Md,{children:e(`users.rolesColumn`)}),(0,B.jsx)(Md,{children:e(`users.statusColumn`)}),(0,B.jsx)(Md,{children:e(`users.mfaColumn`)}),(0,B.jsx)(Md,{children:e(`users.actionsColumn`)})]})}),(0,B.jsxs)(Ad,{children:[i.map(t=>(0,B.jsxs)(jd,{children:[(0,B.jsx)(Nd,{children:t.email}),(0,B.jsx)(Nd,{children:t.roles.join(`, `)}),(0,B.jsx)(Nd,{children:t.status===`active`?e(`users.active`):e(`users.disabled`)}),(0,B.jsx)(Nd,{children:t.mfa.totp||t.mfa.passkeys>0?e(`users.mfaOn`):e(`users.mfaOff`)}),(0,B.jsx)(Nd,{children:(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(_s,{variant:`secondary`,size:`sm`,onClick:()=>{C(t),T(t.roles.join(`, `))},children:e(`users.changeRoles`,{email:t.email})}),(0,B.jsx)(_s,{variant:`ghost`,size:`sm`,onClick:()=>void F(t),children:e(`users.viewSessions`,{email:t.email})}),(0,B.jsx)(_s,{variant:t.status===`active`?`destructive`:`secondary`,size:`sm`,onClick:()=>void P(t),children:t.status===`active`?e(`users.disableAccount`,{email:t.email}):e(`users.enableAccount`,{email:t.email})})]})})]},t.id)),i.length===0&&(0,B.jsx)(Pd,{colSpan:5,children:e(`users.empty`)})]})]})}),(0,B.jsx)(xd,{open:m,onOpenChange:h,title:e(`users.newHeading`),description:e(`users.newDescription`),closeLabel:e(`users.close`),children:(0,B.jsxs)(`form`,{id:`create-user-form`,onSubmit:ee,className:`flex flex-col gap-4`,children:[(0,B.jsx)(ws,{label:e(`users.emailColumn`),children:e=>(0,B.jsx)(Es,{...e,type:`email`,required:!0,autoComplete:`off`,value:g,onChange:e=>_(e.target.value)})}),(0,B.jsx)(ws,{label:e(`users.rolesColumn`),description:e(`users.rolesHint`),children:e=>(0,B.jsx)(Es,{...e,required:!0,value:v,onChange:e=>y(e.target.value)})}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(_s,{variant:`secondary`,onClick:()=>h(!1),children:e(`common.cancel`)}),(0,B.jsx)(_s,{type:`submit`,children:e(`users.createButton`)})]})]})}),(0,B.jsx)(xd,{open:S!==null,onOpenChange:e=>{e||C(null)},title:e(`users.rolesHeading`,{email:S?.email??``}),closeLabel:e(`users.close`),children:(0,B.jsxs)(`form`,{onSubmit:te,className:`flex flex-col gap-4`,children:[(0,B.jsx)(ws,{label:e(`users.rolesColumn`),description:e(`users.rolesHint`),children:e=>(0,B.jsx)(Es,{...e,required:!0,value:w,onChange:e=>T(e.target.value)})}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(_s,{variant:`secondary`,onClick:()=>C(null),children:e(`common.cancel`)}),(0,B.jsx)(_s,{type:`submit`,children:e(`users.saveRoles`)})]})]})}),(0,B.jsx)(xd,{open:E!==null,onOpenChange:e=>{e||D(null)},title:e(`users.sessionsHeading`,{email:E?.email??``}),closeLabel:e(`users.close`),children:(0,B.jsx)(CC,{sessions:O,onRevoke:e=>void ne(e)})})]}):(0,B.jsxs)(`section`,{"aria-labelledby":`users-heading`,children:[(0,B.jsx)(`h1`,{id:`users-heading`,children:e(`users.heading`)}),(0,B.jsx)(`p`,{role:`alert`,children:e(`users.adminOnly`)})]})}function CC({sessions:e,onRevoke:t}){let{t:n}=Vi();return e.length===0?(0,B.jsx)(`p`,{children:n(`users.noSessions`)}):(0,B.jsxs)(vs,{children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{children:(0,B.jsx)(`h2`,{children:n(`users.sessionsTitle`)})})}),(0,B.jsx)(Ss,{children:(0,B.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-3 p-0`,children:e.map(e=>(0,B.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,B.jsxs)(`span`,{className:`text-sm`,children:[e.label??n(`users.unnamedSession`),` — `,n(`users.lastSeen`),` `,e.lastSeenAt]}),(0,B.jsx)(_s,{variant:`destructive`,size:`sm`,onClick:()=>t(e.id),children:n(`users.revokeSession`,{at:e.lastSeenAt})})]},e.id))})})]})}function wC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,[r,i]=(0,M.useState)(null),[a,o]=(0,M.useState)([]),[s,c]=(0,M.useState)(null),[l,u]=(0,M.useState)(``),[d,f]=(0,M.useState)(``),[p,m]=(0,M.useState)(null),[h,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(null),[y,b]=(0,M.useState)(``),[x,S]=(0,M.useState)(null),[C,w]=(0,M.useState)(null),[T,E]=(0,M.useState)(``),D=(0,M.useCallback)(async()=>{if(n!==null){c(null);try{let[e,t]=await Promise.all([vC(n,`me`),yC(n,`me`)]);i(e),o(t)}catch(t){c(t instanceof L?t.message:e(`profile.loadError`))}}},[n,e]);(0,M.useEffect)(()=>{D()},[D]);async function O(t){if(t.preventDefault(),n!==null){m(null),g(!1);try{await xC(n,l,d),g(!0),u(``),f(``)}catch(t){m(t instanceof L?t.message:e(`profile.passwordError`))}}}async function k(){if(n!==null){S(null),w(null);try{v(await ir(n))}catch(t){S(t instanceof L?t.message:e(`profile.totpBeginError`))}}}async function A(t){if(t.preventDefault(),n!==null){S(null);try{await ar(n,y),v(null),b(``),w(e(`profile.totpEnabled`)),await D()}catch(t){S(t instanceof L?t.message:e(`profile.totpCodeError`))}}}async function j(){if(n!==null){S(null);try{await or(n),w(e(`profile.totpDisabled`)),await D()}catch(t){S(t instanceof L?t.message:e(`profile.totpDisableError`))}}}async function N(t){if(t.preventDefault(),n!==null){S(null),w(null);try{await mr(n,T===``?void 0:T),E(``),w(e(`profile.passkeyAdded`)),await D()}catch(t){S(t instanceof L?t.message:e(`profile.passkeyRefused`))}}}async function ee(t){if(n!==null)try{await bC(n,`me`,t),o(await yC(n,`me`))}catch(t){c(t instanceof L?t.message:e(`profile.revokeError`))}}return(0,B.jsxs)(`section`,{"aria-labelledby":`profile-heading`,className:`flex max-w-3xl flex-col gap-6`,children:[(0,B.jsx)(`h1`,{id:`profile-heading`,className:`m-0 text-xl leading-7 font-semibold`,children:e(`profile.heading`)}),s!==null&&(0,B.jsx)(Td,{tone:`danger`,live:`assertive`,children:(0,B.jsx)(`p`,{children:s})}),r!==null&&(0,B.jsx)(`p`,{children:e(`profile.signedInAs`,{email:r.email,roles:r.roles.join(`, `)})}),(0,B.jsxs)(vs,{children:[(0,B.jsxs)(ys,{children:[(0,B.jsx)(bs,{children:(0,B.jsx)(`h2`,{children:e(`profile.passwordHeading`)})}),(0,B.jsx)(xs,{children:e(`profile.passwordIntro`)})]}),(0,B.jsx)(Ss,{children:(0,B.jsxs)(`form`,{onSubmit:O,className:`flex flex-col gap-4`,children:[(0,B.jsx)(ws,{label:e(`profile.currentPassword`),children:e=>(0,B.jsx)(Es,{...e,type:`password`,autoComplete:`current-password`,required:!0,value:l,onChange:e=>u(e.target.value)})}),(0,B.jsx)(ws,{label:e(`profile.newPassword`),description:e(`profile.newPasswordHint`),error:p,children:e=>(0,B.jsx)(Es,{...e,type:`password`,autoComplete:`new-password`,required:!0,value:d,onChange:e=>f(e.target.value)})}),h&&(0,B.jsx)(Td,{tone:`success`,live:`assertive`,children:(0,B.jsx)(`p`,{children:e(`profile.passwordChanged`)})}),(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{type:`submit`,children:e(`profile.changePassword`)})})]})})]}),(0,B.jsxs)(vs,{children:[(0,B.jsxs)(ys,{children:[(0,B.jsx)(bs,{children:(0,B.jsx)(`h2`,{id:`security`,children:e(`profile.securityHeading`)})}),(0,B.jsx)(xs,{children:e(`profile.securityIntro`)})]}),(0,B.jsxs)(Ss,{children:[x!==null&&(0,B.jsx)(Td,{tone:`danger`,live:`assertive`,children:(0,B.jsx)(`p`,{children:x})}),C!==null&&(0,B.jsx)(Td,{tone:`success`,live:`assertive`,children:(0,B.jsx)(`p`,{children:C})}),(0,B.jsxs)(`p`,{children:[r?.mfa.totp===!0?e(`profile.totpOn`):e(`profile.totpOff`),r!==null&&` ${e(`profile.passkeyCount`,{count:r.mfa.passkeys})}`]}),r?.mfa.totp===!0?(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{variant:`destructive`,onClick:()=>void j(),children:e(`profile.disableTotp`)})}):_===null?(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{onClick:()=>void k(),children:e(`profile.enableTotp`)})}):(0,B.jsxs)(`form`,{onSubmit:A,className:`flex flex-col gap-4`,children:[(0,B.jsx)(`p`,{children:e(`profile.totpScan`)}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`strong`,{children:e(`profile.totpKeyLabel`)}),` `,(0,B.jsx)(`code`,{className:`font-mono`,children:_.secret})]}),(0,B.jsx)(ws,{label:e(`profile.totpCode`),children:e=>(0,B.jsx)(Es,{...e,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:y,onChange:e=>b(e.target.value)})}),(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{type:`submit`,children:e(`profile.totpConfirm`)})})]}),(0,B.jsxs)(`form`,{onSubmit:N,className:`flex flex-col gap-4`,children:[(0,B.jsx)(ws,{label:e(`profile.passkeyLabelField`),children:t=>(0,B.jsx)(Es,{...t,placeholder:e(`profile.passkeyLabelPlaceholder`),value:T,onChange:e=>E(e.target.value)})}),(0,B.jsx)(`div`,{children:(0,B.jsx)(_s,{type:`submit`,variant:`secondary`,children:e(`profile.addPasskey`)})})]})]})]}),(0,B.jsx)(CC,{sessions:a,onRevoke:e=>void ee(e)})]})}var TC={fr:`Français`,en:`English`};function EC(){let{t:e,i18n:t}=Vi(),n=vr(),r=n.state.status===`authenticated`?n.state.user.email:null;return(0,B.jsxs)(`section`,{"aria-labelledby":`settings-heading`,children:[(0,B.jsx)(`h1`,{id:`settings-heading`,children:e(`settings.heading`)}),r!==null&&(0,B.jsx)(`p`,{children:e(`settings.signedInAs`,{email:r})}),(0,B.jsxs)(`section`,{"aria-labelledby":`settings-language-heading`,children:[(0,B.jsx)(`h2`,{id:`settings-language-heading`,children:e(`settings.languageHeading`)}),(0,B.jsx)(`label`,{htmlFor:`settings-language`,children:e(`settings.languageLabel`)}),(0,B.jsx)(`select`,{id:`settings-language`,value:t.language,onChange:e=>Yi(e.target.value),children:Wi.map(e=>(0,B.jsx)(`option`,{value:e,children:TC[e]},e))})]}),(0,B.jsx)(`p`,{children:(0,B.jsx)(Tn,{to:`/profile`,children:e(`settings.securityMoved`)})})]})}function DC(e){return tr(`/api/site-plans`,{headers:z(e)})}function OC(e,t){return R(`/api/site-plans/${encodeURIComponent(t)}`,{headers:z(e)})}function kC(e,t,n){return R(`/api/site-plans`,{method:`POST`,headers:{...z(e),"content-type":`application/json`},body:JSON.stringify({documents:t,...n===void 0?{}:{siteName:n}})})}function AC(e,t,n){return R(`/api/site-plans/${encodeURIComponent(t)}/decisions`,{method:`POST`,headers:{...z(e),"content-type":`application/json`},body:JSON.stringify({decisions:n})})}function jC(e,t){return R(`/api/site-plans/${encodeURIComponent(t)}/apply`,{method:`POST`,headers:z(e)})}function MC(e,t){return R(`/api/site-plans/${encodeURIComponent(t)}`,{method:`DELETE`,headers:z(e)})}async function NC(e){let t=await e.arrayBuffer(),n=new Uint8Array(t),r=``,i=32768;for(let e=0;e<n.length;e+=i)r+=String.fromCharCode(...n.subarray(e,e+i));return{filename:e.name,contentBase64:btoa(r)}}function PC(e,t){return e.reduce((e,n)=>e+n.items.filter(e=>t[e.id]!==void 0).length,0)}function FC(e){return e.reduce((e,t)=>e+t.items.length,0)}function IC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,r=(t.state.status===`authenticated`?t.state.user.roles:[]).includes(`admin`),[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(!0),[c,l]=(0,M.useState)(null),[u,d]=(0,M.useState)({}),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(!0),[g,_]=(0,M.useState)(!1),[v,y]=(0,M.useState)(null),b=(0,M.useCallback)(async()=>{if(!(n===null||!r)){h(!0),y(null);try{let e=await DC(n);a(e.data),s(e.plannerAvailable)}catch(t){y(t instanceof L?{message:t.message,...t.hint===void 0?{}:{hint:t.hint}}:{message:e(`sitePlan.loadError`)})}finally{h(!1)}}},[n,r,e]);(0,M.useEffect)(()=>{b()},[b]);let x=(0,M.useCallback)((e,t)=>{y(e instanceof L?{message:e.message,...e.hint===void 0?{}:{hint:e.hint}}:{message:t})},[]);async function S(t){let r=[...t.target.files??[]];if(t.target.value=``,n!==null&&r.length!==0){_(!0),y(null),p(null);try{let e=await Promise.all(r.map(NC)),t=await kC(n,e);l(t),d({...t.decisions}),await b()}catch(t){x(t,e(`sitePlan.proposeError`))}finally{_(!1)}}}async function C(t){if(n!==null){_(!0),y(null),p(null);try{let e=await OC(n,t);l(e),d({...e.decisions})}catch(t){x(t,e(`sitePlan.loadError`))}finally{_(!1)}}}function w(e,t){d(n=>({...n,[e]:t}))}function T(e,t){d(n=>{let r={...n};for(let n of e.items)r[n.id]=n.id===t?`accepted`:`rejected`;return r})}async function E(){if(n!==null&&c!==null){_(!0),y(null);try{await AC(n,c.id,u),await b()}catch(t){x(t,e(`sitePlan.saveError`))}finally{_(!1)}}}async function D(){if(n!==null&&c!==null){_(!0),y(null);try{await AC(n,c.id,u);let e=await jC(n,c.id);await b(),await C(c.id),p(e.report)}catch(t){x(t,e(`sitePlan.applyError`))}finally{_(!1)}}}async function O(t){if(n!==null){_(!0);try{await MC(n,t),c?.id===t&&l(null),await b()}catch(t){x(t,e(`sitePlan.deleteError`))}finally{_(!1)}}}let k=(0,M.useMemo)(()=>FC(c?.sections??[]),[c])-(0,M.useMemo)(()=>PC(c?.sections??[],u),[c,u]);return r?(0,B.jsxs)(`section`,{"aria-labelledby":`site-plan-heading`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h1`,{id:`site-plan-heading`,children:e(`sitePlan.heading`)}),(0,B.jsx)(`p`,{className:`text-muted-foreground`,children:e(`sitePlan.intro`)})]}),v!==null&&(0,B.jsxs)(Td,{tone:`danger`,live:`assertive`,children:[(0,B.jsx)(`p`,{children:v.message}),v.hint!==void 0&&(0,B.jsx)(`p`,{children:v.hint})]}),!o&&(0,B.jsx)(Td,{tone:`info`,children:(0,B.jsx)(`p`,{children:e(`sitePlan.noProvider`)})}),(0,B.jsxs)(vs,{children:[(0,B.jsxs)(ys,{children:[(0,B.jsx)(bs,{children:(0,B.jsx)(`h2`,{children:e(`sitePlan.uploadHeading`)})}),(0,B.jsx)(xs,{children:e(`sitePlan.uploadHelp`)})]}),(0,B.jsxs)(Ss,{children:[(0,B.jsx)(`label`,{htmlFor:`site-plan-upload`,children:e(`sitePlan.uploadLabel`)}),(0,B.jsx)(`input`,{id:`site-plan-upload`,type:`file`,multiple:!0,accept:`.pdf,.docx,.md,.markdown,.txt`,disabled:g||!o,onChange:e=>void S(e)})]})]}),(0,B.jsxs)(vs,{children:[(0,B.jsx)(ys,{children:(0,B.jsx)(bs,{children:(0,B.jsx)(`h2`,{children:e(`sitePlan.draftsHeading`)})})}),(0,B.jsxs)(Ss,{children:[m&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!m&&i.length===0&&(0,B.jsx)(`p`,{children:e(`sitePlan.noDrafts`)}),(0,B.jsx)(`ul`,{children:i.map(t=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(_s,{type:`button`,variant:`ghost`,onClick:()=>void C(t.id),children:t.activity||t.id}),(0,B.jsxs)(`span`,{children:[` `,t.sources.join(`, `),` — `,t.createdAt,t.appliedAt===void 0?``:` — ${e(`sitePlan.appliedOn`,{at:t.appliedAt})}`]}),(0,B.jsx)(_s,{type:`button`,variant:`ghost`,disabled:g,onClick:()=>void O(t.id),children:e(`sitePlan.discard`)})]},t.id))})]})]}),f!==null&&(0,B.jsxs)(Td,{tone:`success`,live:`polite`,children:[(0,B.jsx)(`p`,{children:e(`sitePlan.appliedSummary`,{added:f.added.length,entries:f.entriesSeeded})}),f.added.length>0&&(0,B.jsx)(`p`,{children:f.added.join(`, `)}),f.skipped.map(e=>(0,B.jsxs)(`p`,{children:[e.name,`: `,e.reason]},e.name)),f.followUp.map(e=>(0,B.jsx)(`p`,{children:e},e))]}),c!==null&&(0,B.jsxs)(`section`,{"aria-labelledby":`site-plan-review-heading`,className:`flex flex-col gap-4`,children:[(0,B.jsx)(`h2`,{id:`site-plan-review-heading`,children:e(`sitePlan.reviewHeading`)}),(0,B.jsx)(`p`,{children:c.draft.brief.summary}),c.draft.violations.map(e=>(0,B.jsx)(Td,{tone:`warning`,children:(0,B.jsx)(`p`,{children:e.explanation})},e.explanation)),c.draft.warnings.map(e=>(0,B.jsx)(Td,{tone:`warning`,children:(0,B.jsx)(`p`,{children:e})},e)),c.appliedAt!==void 0&&(0,B.jsx)(Td,{tone:`info`,children:(0,B.jsx)(`p`,{children:e(`sitePlan.appliedOn`,{at:c.appliedAt})})}),c.sections.map(t=>(0,B.jsxs)(vs,{children:[(0,B.jsxs)(ys,{children:[(0,B.jsx)(bs,{children:(0,B.jsx)(`h3`,{children:t.title})}),(0,B.jsx)(xs,{children:t.description})]}),(0,B.jsxs)(Ss,{children:[t.items.length===0&&(0,B.jsx)(`p`,{children:e(`sitePlan.sectionEmpty`)}),t.mode===`one-of`?(0,B.jsxs)(`fieldset`,{children:[(0,B.jsx)(`legend`,{children:t.title}),t.items.map(e=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`input`,{type:`radio`,id:e.id,name:`section-${t.id}`,checked:u[e.id]===`accepted`,onChange:()=>T(t,e.id)}),(0,B.jsx)(`label`,{htmlFor:e.id,children:e.title}),(0,B.jsx)(`p`,{children:e.detail})]},e.id))]}):(0,B.jsx)(`ul`,{children:t.items.map(t=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`p`,{children:(0,B.jsx)(`strong`,{children:t.title})}),(0,B.jsx)(`p`,{children:t.detail}),(0,B.jsx)(_s,{type:`button`,variant:u[t.id]===`accepted`?`primary`:`secondary`,"aria-pressed":u[t.id]===`accepted`,onClick:()=>w(t.id,`accepted`),children:e(`sitePlan.keep`)}),(0,B.jsx)(_s,{type:`button`,variant:u[t.id]===`rejected`?`primary`:`secondary`,"aria-pressed":u[t.id]===`rejected`,onClick:()=>w(t.id,`rejected`),children:e(`sitePlan.drop`)})]},t.id))})]})]},t.id)),(0,B.jsx)(`p`,{role:`status`,children:k===0?e(`sitePlan.allDecided`):e(`sitePlan.remaining`,{count:k})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(_s,{type:`button`,variant:`secondary`,disabled:g,onClick:()=>void E(),children:e(`sitePlan.saveProgress`)}),(0,B.jsx)(_s,{type:`button`,disabled:g||k>0||c.appliedAt!==void 0,onClick:()=>void D(),children:e(`sitePlan.apply`)})]})]})]}):(0,B.jsxs)(`section`,{"aria-labelledby":`site-plan-heading`,children:[(0,B.jsx)(`h1`,{id:`site-plan-heading`,children:e(`sitePlan.heading`)}),(0,B.jsx)(`p`,{role:`alert`,children:e(`sitePlan.adminOnly`)})]})}function LC(){let{t:e,i18n:t}=Vi(),n=vr(),r=Ta(),i=n.state.status===`authenticated`?n.state.token:null,a=n.state.status===`authenticated`?n.state.user.roles:[],o=r.status===`ready`?(r.schema.taxonomies??[]).filter(e=>xa(`read`,e,a)):[],[s,c]=(0,M.useState)(null),[l,u]=(0,M.useState)([]),[d,f]=(0,M.useState)(!1),[p,m]=(0,M.useState)(null),[h,g]=(0,M.useState)(``),[_,v]=(0,M.useState)(``),[y,b]=(0,M.useState)(``),[x,S]=(0,M.useState)(!1),C=o.find(e=>e.name===s)??o[0],w=C?.name??null,T=C!==void 0&&xa(`create`,C,a),E=C!==void 0&&xa(`delete`,C,a),D=(0,M.useCallback)(async()=>{if(i!==null&&w!==null){f(!0),m(null);try{u(await Jx(i,w))}catch(t){m(t instanceof L?t.message:e(`taxonomies.loadError`))}finally{f(!1)}}},[i,w,e]);(0,M.useEffect)(()=>{D()},[D]);async function O(n){if(n.preventDefault(),i!==null&&w!==null){S(!0),m(null);try{await Yx(i,w,{slug:h,labels:{[t.language]:_},parent:y===``?null:y}),g(``),v(``),b(``),await D()}catch(t){m(t instanceof L?t.message:e(`taxonomies.createError`))}finally{S(!1)}}}async function k(t){if(i!==null&&w!==null){m(null);try{await Xx(i,w,t.id),await D()}catch(t){m(t instanceof L?t.message:e(`taxonomies.deleteError`))}}}return r.status===`loading`?(0,B.jsx)(`p`,{children:e(`common.loading`)}):r.status===`error`?(0,B.jsx)(`p`,{role:`alert`,children:e(`common.schemaError`,{message:r.message})}):(0,B.jsxs)(`section`,{"aria-labelledby":`taxonomies-heading`,children:[(0,B.jsx)(`h1`,{id:`taxonomies-heading`,children:e(`taxonomies.heading`)}),o.length===0?(0,B.jsx)(`p`,{children:e(`taxonomies.none`)}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`label`,{htmlFor:`taxonomy-name`,children:e(`taxonomies.taxonomy`)}),` `,(0,B.jsx)(`select`,{id:`taxonomy-name`,value:w??``,onChange:e=>c(e.target.value),children:o.map(e=>(0,B.jsx)(`option`,{value:e.name,children:RC(e,t.language)},e.name))}),p!==null&&(0,B.jsx)(`p`,{role:`alert`,children:p}),d&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!d&&l.length===0&&(0,B.jsx)(`p`,{children:e(`taxonomies.empty`)}),l.length>0&&(0,B.jsxs)(`table`,{children:[(0,B.jsx)(`caption`,{children:e(`taxonomies.caption`)}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{scope:`col`,children:e(`taxonomies.term`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`taxonomies.slug`)}),E&&(0,B.jsx)(`th`,{scope:`col`,children:e(`taxonomies.actions`)})]})}),(0,B.jsx)(`tbody`,{children:l.map(n=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{style:{paddingLeft:`${n.depth*1.5}rem`},children:n.labels[t.language]??Object.values(n.labels)[0]??n.slug}),(0,B.jsx)(`td`,{children:n.slug}),E&&(0,B.jsx)(`td`,{children:(0,B.jsx)(`button`,{type:`button`,onClick:()=>void k(n),children:e(`taxonomies.delete`)})})]},n.id))})]}),T&&(0,B.jsxs)(`form`,{onSubmit:e=>void O(e),children:[(0,B.jsx)(`h2`,{children:e(`taxonomies.newTerm`)}),(0,B.jsx)(`label`,{htmlFor:`term-label`,children:e(`taxonomies.label`)}),` `,(0,B.jsx)(`input`,{id:`term-label`,value:_,required:!0,onChange:e=>v(e.target.value)}),(0,B.jsx)(`label`,{htmlFor:`term-slug`,children:e(`taxonomies.slug`)}),` `,(0,B.jsx)(`input`,{id:`term-slug`,value:h,required:!0,onChange:e=>g(e.target.value)}),C?.hierarchical===!0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`label`,{htmlFor:`term-parent`,children:e(`taxonomies.parent`)}),` `,(0,B.jsxs)(`select`,{id:`term-parent`,value:y,onChange:e=>b(e.target.value),children:[(0,B.jsx)(`option`,{value:``,children:e(`taxonomies.noParent`)}),l.map(e=>(0,B.jsx)(`option`,{value:e.id,children:e.slug},e.id))]})]}),(0,B.jsx)(`button`,{type:`submit`,disabled:x,children:e(`taxonomies.create`)})]})]})]})}function RC(e,t){return e.labels.singular[t]??Object.values(e.labels.singular)[0]??e.name}function zC(){let{t:e}=Vi(),t=vr(),n=Ta(),r=t.state.status===`authenticated`?t.state.token:null,i=t.state.status===`authenticated`?t.state.user.roles:[],a=n.status===`ready`?n.schema.collections.filter(e=>ba(`delete`,e,i)&&e.trash!==!1):[],[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)([]),[u,d]=(0,M.useState)(!1),[f,p]=(0,M.useState)(null),[m,h]=(0,M.useState)(null),g=o??a[0]?.name??null,_=(0,M.useCallback)(async()=>{if(r!==null&&g!==null){d(!0),p(null);try{let e=await oa(r,g,{trashed:`only`,limit:50});l(e.items)}catch(t){p(t instanceof L?t.message:e(`trash.loadError`))}finally{d(!1)}}},[r,g,e]);(0,M.useEffect)(()=>{_()},[_]);async function v(t){if(r!==null&&g!==null){h(t),p(null);try{await ca(r,g,t),await _()}catch(t){p(t instanceof L?t.message:e(`trash.restoreError`))}finally{h(null)}}}async function y(t){if(r!==null&&g!==null&&globalThis.confirm(e(`trash.purgeConfirm`))){h(t),p(null);try{await la(r,g,t),await _()}catch(t){p(t instanceof L?t.message:e(`trash.purgeError`))}finally{h(null)}}}return n.status===`loading`?(0,B.jsx)(`p`,{children:e(`common.loading`)}):n.status===`error`?(0,B.jsx)(`p`,{role:`alert`,children:e(`common.schemaError`,{message:n.message})}):(0,B.jsxs)(`section`,{"aria-labelledby":`trash-heading`,children:[(0,B.jsx)(`h1`,{id:`trash-heading`,children:e(`trash.heading`)}),a.length===0?(0,B.jsx)(`p`,{children:e(`trash.noCollections`)}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`label`,{htmlFor:`trash-collection`,children:e(`trash.collection`)}),` `,(0,B.jsx)(`select`,{id:`trash-collection`,value:g??``,onChange:e=>s(e.target.value),children:a.map(e=>(0,B.jsx)(`option`,{value:e.name,children:e.labels.plural},e.name))}),f!==null&&(0,B.jsx)(`p`,{role:`alert`,children:f}),u&&(0,B.jsx)(`p`,{children:e(`common.loading`)}),!u&&c.length===0&&(0,B.jsx)(`p`,{children:e(`trash.empty`)}),c.length>0&&(0,B.jsxs)(`table`,{children:[(0,B.jsx)(`caption`,{children:e(`trash.caption`)}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{scope:`col`,children:e(`trash.entry`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`trash.status`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`trash.deletedAt`)}),(0,B.jsx)(`th`,{scope:`col`,children:e(`trash.actions`)})]})}),(0,B.jsx)(`tbody`,{children:c.map(t=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:BC(t)}),(0,B.jsx)(`td`,{children:t.status}),(0,B.jsx)(`td`,{children:t.deletedAt??`—`}),(0,B.jsxs)(`td`,{children:[(0,B.jsx)(`button`,{type:`button`,disabled:m===t.id,onClick:()=>void v(t.id),children:e(`trash.restore`)}),` `,(0,B.jsx)(`button`,{type:`button`,disabled:m===t.id,onClick:()=>void y(t.id),children:e(`trash.purge`)})]})]},t.id))})]})]})]})}function BC(e){for(let t of[`title`,`name`,`slug`]){let n=e.values[t];if(typeof n==`string`&&n!==``)return n}return e.id}function VC(e){return R(`/api/notices`,{headers:z(e)})}async function HC(e,t){await R(`/api/notices/${encodeURIComponent(t)}/dismiss`,{method:`POST`,headers:z(e)})}function UC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.token:null,[r,i]=(0,M.useState)([]);(0,M.useEffect)(()=>{if(n===null){i([]);return}let e=!0;return VC(n).then(t=>{e&&i(t)},()=>void 0),()=>{e=!1}},[n]);let a=(0,M.useCallback)(e=>{n!==null&&(i(t=>t.filter(t=>t.id!==e)),HC(n,e).catch(()=>void 0))},[n]);return r.length===0?null:(0,B.jsx)(`div`,{className:`mb-6 flex flex-col gap-3`,children:r.map(t=>(0,B.jsx)(Td,{tone:t.severity,live:`off`,title:e(`notices.${t.code}.title`,{...t.params,defaultValue:t.code}),...t.dismissible?{onDismiss:()=>a(t.id),dismissLabel:e(`notices.dismiss`)}:{},...t.action===void 0?{}:{actions:(0,B.jsx)(Tn,{to:t.action.href,className:gs({variant:`secondary`,size:`sm`}),children:e(`notices.${t.action.code}`,{defaultValue:t.action.code})})},children:(0,B.jsx)(`p`,{children:e(`notices.${t.code}.body`,{...t.params,defaultValue:t.code})})},t.id))})}var WC=[{to:`/`,labelKey:`nav.dashboard`},{to:`/collections`,labelKey:`nav.collections`},{to:`/taxonomies`,labelKey:`nav.taxonomies`},{to:`/trash`,labelKey:`nav.trash`},{to:`/media`,labelKey:`nav.media`},{to:`/audit`,labelKey:`nav.audit`},{to:`/agents`,labelKey:`nav.agents`},{to:`/site-plan`,labelKey:`nav.sitePlan`},{to:`/users`,labelKey:`nav.users`},{to:`/profile`,labelKey:`nav.profile`},{to:`/settings`,labelKey:`nav.settings`}],GC=`main-content`;function KC(){let{t:e}=Vi(),t=vr(),n=t.state.status===`authenticated`?t.state.user.email:null;return(0,B.jsxs)(`div`,{className:`app-shell`,children:[(0,B.jsx)(`a`,{className:`skip-link`,href:`#${GC}`,children:e(`shell.skipLink`)}),(0,B.jsxs)(`header`,{className:`app-shell__topbar`,children:[(0,B.jsx)(`span`,{className:`app-shell__brand`,children:e(`shell.brand`)}),n!==null&&(0,B.jsxs)(`div`,{className:`app-shell__account`,children:[(0,B.jsx)(`span`,{children:n}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>void t.logout(),children:e(`shell.logout`)})]})]}),(0,B.jsx)(`nav`,{className:`app-shell__sidebar`,"aria-label":e(`shell.nav`),children:(0,B.jsx)(`ul`,{children:WC.map(t=>(0,B.jsx)(`li`,{children:(0,B.jsx)(En,{to:t.to,end:t.to===`/`,children:e(t.labelKey)})},t.to))})}),(0,B.jsxs)(`main`,{id:GC,className:`app-shell__content`,tabIndex:-1,children:[(0,B.jsx)(UC,{}),(0,B.jsx)(Nt,{})]})]})}var qC=`/admin/`.replace(/\/$/,``);function JC(){return(0,B.jsx)(yr,{children:(0,B.jsx)(wn,{basename:qC,children:(0,B.jsxs)(It,{children:[(0,B.jsx)(Pt,{path:`login`,element:(0,B.jsx)(uC,{})}),(0,B.jsxs)(Pt,{element:(0,B.jsx)(br,{children:(0,B.jsx)(Ea,{children:(0,B.jsx)(KC,{})})}),children:[(0,B.jsx)(Pt,{index:!0,element:(0,B.jsx)(Fa,{})}),(0,B.jsx)(Pt,{path:`collections`,element:(0,B.jsx)(ja,{})}),(0,B.jsx)(Pt,{path:`collections/:name`,element:(0,B.jsx)(ka,{})}),(0,B.jsx)(Pt,{path:`collections/:name/new`,element:(0,B.jsx)(lC,{})}),(0,B.jsx)(Pt,{path:`collections/:name/:id`,element:(0,B.jsx)(lC,{})}),(0,B.jsx)(Pt,{path:`taxonomies`,element:(0,B.jsx)(LC,{})}),(0,B.jsx)(Pt,{path:`trash`,element:(0,B.jsx)(zC,{})}),(0,B.jsx)(Pt,{path:`media`,element:(0,B.jsx)(mC,{})}),(0,B.jsx)(Pt,{path:`audit`,element:(0,B.jsx)(ia,{})}),(0,B.jsx)(Pt,{path:`agents`,element:(0,B.jsx)(ta,{})}),(0,B.jsx)(Pt,{path:`users`,element:(0,B.jsx)(SC,{})}),(0,B.jsx)(Pt,{path:`profile`,element:(0,B.jsx)(wC,{})}),(0,B.jsx)(Pt,{path:`settings`,element:(0,B.jsx)(EC,{})}),(0,B.jsx)(Pt,{path:`site-plan`,element:(0,B.jsx)(IC,{})})]})]})})})}var YC=document.getElementById(`root`);(0,In.createRoot)(YC).render((0,B.jsx)(M.StrictMode,{children:(0,B.jsx)(JC,{})}));