foss-design 0.1.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.
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/cli.js +3064 -0
- package/dist/runtime/base.css +8 -0
- package/dist/runtime/index.js +357 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/viewer/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/viewer/assets/index-Blh90C72.css +2 -0
- package/dist/viewer/assets/index-CN6gdSK-.js +166 -0
- package/dist/viewer/favicon.svg +1 -0
- package/dist/viewer/index.html +23 -0
- package/package.json +87 -0
|
@@ -0,0 +1,166 @@
|
|
|
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,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(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},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(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 u=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 ne(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,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=ne(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(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 re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ae=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)};function M(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else M(oe.bind(null,e))}var se={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=oe,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=M,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=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})),p=o(((e,t)=>{t.exports=f()})),m=l(d(),1),h=p(),g=m.createContext(void 0),_=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},v=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t})),y={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b=new class{#e=y;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function x(e){setTimeout(e,0)}var S=typeof window>`u`||`Deno`in globalThis;function C(){}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return typeof e==`number`&&e>=0&&e!==1/0}function E(e,t){return Math.max(e+(t||0)-Date.now(),0)}function D(e,t){return typeof e==`function`?e(t):e}function O(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==A(o,t.options))return!1}else if(!ee(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function k(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(j(t.options.mutationKey)!==j(a))return!1}else if(!ee(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function A(e,t){return(t?.queryKeyHashFn||j)(e)}function j(e){return JSON.stringify(e,(e,t)=>ae(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ee(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!ee(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!ee(e[r],t[r]))return!1;return!0}return!1}var te=Object.prototype.hasOwnProperty;function ne(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ie(e)&&ie(t);if(!r&&!(ae(e)&&ae(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ne(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function re(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ie(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ae(e){if(!M(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!M(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function M(e){return Object.prototype.toString.call(e)===`[object Object]`}function oe(e){return new Promise(t=>{b.setTimeout(t,e)})}function se(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ne(e,t)}function ce(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function le(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ue=Symbol();function de(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ue?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fe(e,t){return typeof e==`function`?e(...t):!!e}function pe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var me=()=>S,he=()=>me(),N=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},P=new class extends N{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ge=x;function _e(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ge,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ve=_e(),ye=new class extends N{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function be(e){return Math.min(1e3*2**e,3e4)}function xe(e){return(e??`online`)!==`online`||ye.isOnline()}var Se=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ce(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Se(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>P.isFocused()&&(e.networkMode===`always`||ye.isOnline())&&e.canRun(),p=()=>xe(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(he()?0:3),a=e.retryDelay??be,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),oe(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var we=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T(this.gcTime)&&(this.#e=b.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(he()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function Te(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{pe(e,()=>t.signal,()=>n=!0)},u=de(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?le:ce;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?De:Ee,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ee(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ee(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function De(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Oe=class extends we{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=je(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=je(this.options);e.data!==void 0&&(this.setState(Ae(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=se(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>D(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ue||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>D(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!E(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=de(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Te(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Ce({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Se&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Se){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ke(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ae(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ve.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ke(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ae(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function je(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Me=class extends N{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Pe(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof D(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!re(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ie(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||D(this.options.staleTime,this.#t)!==D(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return re(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!he()&&D(this.options.enabled,this.#t)!==!1&&T(e)}#g(){this.#b();let e=D(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=E(this.#r.dataUpdatedAt,e)+1;this.#u=b.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return D(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=b.setInterval(()=>{(this.options.refetchIntervalInBackground||P.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(b.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(b.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Pe(e,t),o=i&&Ie(e,n,t,r);(a||o)&&(l={...l,...ke(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=se(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=se(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Le(e,t),refetch:this.refetch,isEnabled:D(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),re(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();ve.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ne(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||D(t.retryOnMount,e)!==!1)}function Pe(e,t){return Ne(e,t)||e.state.data!==void 0&&Fe(e,t,t.refetchOnMount)}function Fe(e,t,n){if(D(t.enabled,e)!==!1&&D(t.staleTime,e)!==`static`){let r=D(n,e);return r===`always`||r!==!1&&Le(e,t)}return!1}function Ie(e,t,n,r){return(e!==t||D(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Le(e,n)}function Le(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(D(t.staleTime,e))}var Re=class extends we{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ze(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Ce({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),ve.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ze(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Be=class extends N{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Re({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ve(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ve(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ve.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>k(t,e))}findAll(e={}){return this.getAll().filter(t=>k(e,t))}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ve.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function Ve(e){return e.options.scope?.id}var He=class extends N{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??A(r,t),a=this.get(i);return a||(a=new Oe({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ve.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>O(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>O(e,t)):t}notify(e){ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ve.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ve.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ue=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new He,this.#t=e.mutationCache||new Be,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=P.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ye.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(D(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=w(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ve.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ve.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ve.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=ve.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return ve.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ve.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(C)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(C)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(D(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(D(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C).catch(C)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C).catch(C)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ye.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(j(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ee(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(j(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ee(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=A(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ue&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},We=m.createContext(!1),Ge=()=>m.useContext(We);We.Provider;function Ke(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qe=m.createContext(Ke()),Je=()=>m.useContext(qe),Ye=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?fe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Xe=e=>{m.useEffect(()=>{e.clearReset()},[e])},Ze=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||fe(n,[e.error,r])),Qe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},$e=(e,t)=>e?.suspense&&t.isPending,et=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tt(e,t,n){let r=Ge(),i=Je(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Qe(o),Ye(o,i,s),Xe(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(ve.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),$e(o,u))throw et(o,l,i);if(Ze({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function nt(e,t){return tt(e,Me,t)}var rt=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}i=void 0}}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}}}})),it=o(((e,t)=>{t.exports=rt()})),at=o((e=>{var t=d();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=u(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=u(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=u(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=u(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),ot=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=at()})),st=o((e=>{var t=it(),n=d(),r=ot();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e: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 u(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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.legacy_hidden`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.for(`react.view_transition`),ue=Symbol.for(`react.recoverable`),de=Symbol.iterator;function fe(e){return typeof e!=`object`||!e?null:(e=de&&e[de]||e[`@@iterator`],typeof e==`function`?e:null)}var pe=Symbol.for(`react.client.reference`);function me(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case oe:return`Activity`;case le:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?me(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var he=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},_e=[],ve=-1;function ye(e){return{current:e}}function be(e){0>ve||(e.current=_e[ve],_e[ve]=null,ve--)}function xe(e,t){ve++,_e[ve]=e.current,e.current=t}var Se=ye(null),Ce=ye(null),we=ye(null),Te=ye(null);function Ee(e,t){switch(xe(we,t),xe(Ce,e),xe(Se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=hp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}be(Se),xe(Se,e)}function De(){be(Se),be(Ce),be(we)}function Oe(e){var t=e.memoizedState;t!==null&&(dh._currentValue=t.memoizedState,xe(Te,e)),t=Se.current;var n=hp(t,e.type);t!==n&&(xe(Ce,e),xe(Se,n))}function ke(e){Ce.current===e&&(be(Se),be(Ce)),Te.current===e&&(be(Te),dh._currentValue=ge)}var Ae,je;function Me(e){if(Ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||``,je=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Ae+e+je}var Ne=!1;function Pe(e,t){if(!e||Ne)return``;Ne=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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{Ne=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Me(n):``}function Fe(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me(`Lazy`);case 13:return e.child!==t&&t!==null?Me(`Suspense Fallback`):Me(`Suspense`);case 19:return Me(`SuspenseList`);case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return Me(`Activity`);case 30:return Me(`ViewTransition`);default:return``}}function Ie(e){try{var t=``,n=null;do t+=Fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:rt,tt=Math.log,nt=Math.LN2;function rt(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var at=256,st=262144,ct=4194304;function lt(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&-e;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 ut(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=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(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 dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-et(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(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 mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(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-et(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&&vt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function vt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function bt(e,t){var n=t&-t;return n=n&42?1:xt(n),(n&(e.suspendedLanes|t))===0?n:0}function xt(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 St(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ct(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Dh(e.type)):e}function wt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Tt=Math.random().toString(36).slice(2),Et=`__reactFiber$`+Tt,Dt=`__reactProps$`+Tt,Ot=`__reactContainer$`+Tt,kt=`__reactEvents$`+Tt,At=`__reactListeners$`+Tt,jt=`__reactHandles$`+Tt,Mt=`__reactResources$`+Tt,Nt=`__reactMarker$`+Tt,Pt=`__reactLoad$`+Tt;function Ft(e){delete e[Et],delete e[Dt],delete e[At],delete e[jt]}function It(e){var t;if(t=e[Et])return t;for(var n=e.parentNode;n;){if(t=n[Ot]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gm(e);e!==null;){if(n=e[Et])return n;e=gm(e)}return t}e=n,n=e.parentNode}return null}function Lt(e){if(e=e[Et]||e[Ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Rt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function zt(e){var t=e[Mt];return t||=e[Mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Bt(e){e[Nt]=!0}function Vt(e){e[Pt]=void 0}var Ht=new Set,Ut={};function Wt(e,t){Gt(e,t),Gt(e+`Capture`,t)}function Gt(e,t){for(Ut[e]=t,e=0;e<t.length;e++)Ht.add(t[e])}var Kt=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]*$`),qt={},Jt={};function Yt(e){return Le.call(Jt,e)?!0:Le.call(qt,e)?!1:Kt.test(e)?Jt[e]=!0:(qt[e]=!0,!1)}var F=!1;function Xt(){var e=F;return F=!1,e}function Zt(e,t,n){if(Yt(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 Qt(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 I(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 $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(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 nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var an=/[\n"\\]/g;function on(e){return e.replace(an,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function sn(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=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):ln(e,$t(n)):o===`number`&&e.value==t?ln(e,$t(e.value)):ln(e,$t(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=``+$t(s):e.removeAttribute(`name`)}function cn(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)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(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),nn(e)}function ln(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function un(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=``+$t(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 dn(e,t,n){if(t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+$t(n)}function fn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(he(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function pn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mn=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 hn(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||mn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function gn(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]=``,F=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(hn(e,a,r),F=!0)}else for(var o in t)t.hasOwnProperty(o)&&hn(e,o,t[o])}function _n(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 vn=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`],[`maskType`,`mask-type`],[`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`]]),yn=/^[\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 bn(e){return yn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=Lt(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(sn(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="`+on(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Dt]||null;if(!a)throw Error(i(90));sn(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&&rn(r)}break a;case`textarea`:dn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&(Wd(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function L(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Dt]||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 kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,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 Pn=i.slice(e,1<r?1-r:void 0)}function In(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 Ln(){return!0}function Rn(){return!1}function zn(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)?Ln:Rn,this.isPropagationStopped=Rn,this}return T(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=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=T({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=T({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(T({},qn,{dataTransfer:0})),Xn=zn(T({},Hn,{relatedTarget:0})),Zn=zn(T({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(T({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(T({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={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`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(T({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(T({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(T({},Bn,{submitter:0})),cr=zn(T({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=zn(T({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=zn(T({},qn,{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})),dr=zn(T({},Bn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=kn&&`CompositionEvent`in window,mr=null;kn&&`documentMode`in document&&(mr=document.documentMode);var hr=kn&&`TextEvent`in window&&!mr,gr=kn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Fn(),Pn=Nn=Mn=null,xr=!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 gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={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 Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=Qf(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Kf(e,0)}function Ar(e){if(rn(Rt(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(kn){var Nr;if(kn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Cn(e)),On(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(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(!Le.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(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=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(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=Gr(e.document)}return t}function Xr(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 Zr=kn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(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}),ei&&Wr(ei,r)||(ei=r,r=Qf($r,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};kn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Wt(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Td.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Nd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=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)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[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&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(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-et(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Pd)throw Pd=0,Fd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(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 Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(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&1206910976,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 Li(e,t){e.flags&=1206910978;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 Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=Zm(e,n,Se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case oe:return e=Pi(31,n,t,a),e.elementType=oe,e.lanes=o,e;case k:return zi(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=Pi(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case re:return e=Pi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=Pi(19,n,t,a),e.elementType=ie,e.lanes=o,e;case se:case le:return e=a|32,e=Pi(30,n,t,e),e.elementType=le,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case M:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:Ie(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:Ie(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-et(r)-1;r&=~(1<<i),n+=1;var a=32-et(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-et(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var aa=null,oa=null,R=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Et]=e,t[Dt]=r,n){case`dialog`:q(`cancel`,t),q(`close`,t);break;case`iframe`:case`object`:case`embed`:q(`load`,t);break;case`video`:case`audio`:for(n=0;n<Wf.length;n++)q(Wf[n],t);break;case`source`:q(`error`,t);break;case`img`:case`image`:case`link`:q(`error`,t),q(`load`,t);break;case`details`:q(`toggle`,t);break;case`input`:q(`invalid`,t),cn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:q(`invalid`,t);break;case`textarea`:q(`invalid`,t),fn(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||ip(t.textContent,n)?(r.popover!=null&&(q(`beforetoggle`,t),q(`toggle`,t)),r.onScroll!=null&&q(`scroll`,t),r.onScrollEnd!=null&&q(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(aa=e.return;aa;)switch(aa.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:aa=aa.return}}function pa(e){if(e!==aa)return!1;if(!R)return fa(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||_p(e.type,e.memoizedProps)),n=!n),n&&oa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=hm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=hm(e)}else t===27?(t=oa,Ep(e.type)?(e=mm,mm=null,oa=e):oa=t):oa=aa?pm(e.stateNode.nextSibling):null;return!0}function ma(){oa=aa=null,R=!1}function ha(){var e=sa;return e!==null&&(_d===null?_d=e:_d.push.apply(_d,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=ye(null),va=null,ya=null;function ba(e,t,n){xe(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,be(_a)}function Sa(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 Ca(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),Sa(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),Sa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 wa(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;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dh]:e.push(dh))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function Ta(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Da(e){return ka(va,e)}function Oa(e,t){return va===null&&Ea(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Aa=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()})}},ja=t.unstable_scheduleCallback,Ma=t.unstable_NormalPriority,Na={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pa(){return{controller:new Aa,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&ja(Ma,function(){e.controller.abort()})}function Ia(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var La=null;function Ra(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var za=null,Ba=0,Va=0,Ha=null;function Ua(e,t){if(za===null){var n=za=[];Ba=0,Va=zf(),Ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ba++,t.then(Wa,Wa),t}function Wa(){if(--Ba===0&&(La=null,za!==null)){Ha!==null&&(Ha.status=`fulfilled`);var e=za;za=null,Va=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ga(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 Ka=N.S;N.S=function(e,t){if(bd=He(),typeof t==`object`&&t&&typeof t.then==`function`&&Ua(e,t),La!==null)for(var n=Tf;n!==null;)Ia(n,La),n=n.next;if(n=e.types,n!==null){for(var r=Tf;r!==null;)Ia(r,n),r=r.next;if(Va!==0){r=La,r===null&&(r=La=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ka!==null&&Ka(e,t)};var qa=ye(null);function Ja(){var e=qa.current;return e===null?id.pooledCache:e}function Ya(e,t){t===null?xe(qa,qa.current):xe(qa,t.pool)}function Xa(){var e=Ja();return e===null?null:{parent:Na._currentValue,pool:e}}var Za=Error(i(460)),Qa=Error(i(474)),$a=Error(i(542)),eo={then:function(){}};function to(e){return e=e.status,e===`fulfilled`||e===`rejected`}function no(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=id,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,oo(e),e}throw io=t,Za}}function ro(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(io=e,Za):e}}var io=null;function ao(){if(io===null)throw Error(i(459));var e=io;return io=null,e}function oo(e){if(e===Za||e===$a)throw Error(i(483))}var so=null,co=0;function lo(e){var t=co;return co+=1,so===null&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(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=Ii(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Bi(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===k?(e=d(e,t,n.props.children,r,n.key),uo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&ro(i)===t.type)?(t=a(t,n.props),uo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),uo(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=Hi(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=zi(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=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ri(t.type,t.key,t.props,null,e.mode,n),uo(n,t),n.return=e,n;case O:return t=Hi(t,e.mode,n),t.return=e,t;case M:return t=ro(t),f(e,t,n)}if(he(t)||fe(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,lo(t),n);if(t.$$typeof===te)return f(e,Oa(e,t),n);fo(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 D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case M:return n=ro(n),p(e,t,n,r)}if(he(n)||fe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,lo(n),r);if(n.$$typeof===te)return p(e,t,Oa(e,n),r);fo(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 D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:return r=ro(r),m(e,t,n,r,i)}if(he(r)||fe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,lo(r),i);if(r.$$typeof===te)return m(e,t,n,Oa(t,r),i);fo(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),R&&ea(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 R&&ea(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(_.key===null?h:_.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)}),R&&ea(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),R&&ea(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 R&&ea(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(_.key===null?g:_.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)}),R&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===M&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=zi(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case O: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=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case M:return o=ro(o),_(e,r,o,c)}if(he(o))return h(e,r,o,c);if(fe(o)){if(l=fe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===te)return _(e,r,Oa(e,o),c);fo(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=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function xo(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,yt(e,n)}}function So(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 Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!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?(W&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:go=!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),dd|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=ye(null),ko=ye(0);function Ao(e,t){e=ld,xe(ko,e),xe(Oo,t),ld=e|t.baseLanes}function jo(){xe(ko,ld),xe(Oo,Oo.current)}function Mo(){ld=ko.current,be(Oo),be(ko)}var No=ye(null),Po=null;function Fo(e){var t=e.alternate;xe(Bo,Bo.current&1),xe(No,e),Po===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(Po=e)}function Io(e){xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)}function Lo(e){e.tag===22?(xe(Bo,Bo.current),xe(No,e),Po===null&&(Po=e)):Ro()}function Ro(){xe(Bo,Bo.current),xe(No,No.current)}function zo(e){be(No),Po===e&&(Po=null),be(Bo)}var Bo=ye(0);function Vo(e,t){xe(No,No.current),xe(Bo,t)}function Ho(e){be(Bo),be(No),Po===e&&(Po=null)}function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||um(n)||dm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Wo=0,z=null,B=null,Go=null,Ko=!1,qo=!1,Jo=!1,Yo=0,Xo=0,Zo=null,Qo=0;function $o(){throw Error(i(321))}function es(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,i,a){return Wo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?vc:yc,Jo=!1,a=n(r,i),Jo=!1,qo&&(a=rs(t,n,r,i)),ns(e),a}function ns(e){N.H=_c;var t=B!==null&&B.next!==null;if(Wo=0,Go=B=z=null,Ko=!1,Xo=0,Zo=null,t)throw Error(i(300));e===null||Ic||(e=e.dependencies,e!==null&&Ta(e)&&(Ic=!0))}function rs(e,t,n,r){z=e;var a=0;do{if(qo&&(Zo=null),Xo=0,qo=!1,25<=a)throw Error(i(301));if(a+=1,Go=B=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=bc,o=t(n,r)}while(qo);return o}function is(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ds(t):t,e=e.useState()[0],(B===null?null:B.memoizedState)!==e&&(z.flags|=1024),t}function as(){var e=Yo!==0;return Yo=0,e}function os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ss(e){if(Ko){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ko=!1}Wo=0,Go=B=z=null,qo=!1,Xo=Yo=0,Zo=null}function cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Go===null?z.memoizedState=Go=e:Go=Go.next=e,Go}function ls(){if(B===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=B.next;var t=Go===null?z.memoizedState:Go.next;if(t!==null)Go=t,B=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));B=e,e={memoizedState:B.memoizedState,baseState:B.baseState,baseQueue:B.baseQueue,queue:B.queue,next:null},Go===null?z.memoizedState=Go=e:Go=Go.next=e}return Go}function us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ds(e){var t=Xo;return Xo+=1,Zo===null&&(Zo=[]),e=no(Zo,e,t),t=z,(Go===null?t.memoizedState:Go.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?vc:yc),e}function fs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ds(e);if(e.$$typeof===ue)return;if(e.$$typeof===te)return Da(e)}throw Error(i(438,String(e)))}function ps(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.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=us(),z.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]=ce;return t.index++,n}function ms(e,t){return typeof t==`function`?t(e):t}function hs(e){return gs(ls(),B,e)}function gs(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?(Wo&f)===f:(W&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===Va&&(d=!0);else if((Wo&p)===p){u=u.next,p===Va&&(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,z.lanes|=p,dd|=p;f=u.action,Jo&&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,z.lanes|=f,dd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Ic=!0,d&&(n=Ha,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 _s(e){var t=ls(),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);Ur(o,t.memoizedState)||(Ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vs(e,t,n){var r=z,a=ls(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((B||a).memoizedState,n);if(s&&(a.memoizedState=n,Ic=!0),a=a.queue,Us(xs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Go!==null&&!!(Go.memoizedState.tag&1),Rs(e?9:8,{destroy:void 0},bs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,id===null)throw Error(i(349));o||Wo&127||ys(r,t,n)}return n}function ys(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=us(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function bs(e,t,n,r){t.value=n,t.getSnapshot=r,Ss(t)&&Cs(e)}function xs(e,t,n){return n(function(){Ss(t)&&Cs(e)})}function Ss(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function Cs(e){var t=ki(e,2);t!==null&&zd(t,e,2)}function ws(e){var t=cs();if(typeof e==`function`){var n=e;if(e=n(),Jo){$e(!0);try{n()}finally{$e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:e},t}function Ts(e,t,n,r){return e.baseState=n,gs(e,B,typeof r==`function`?r:ms)}function Es(e,t,n,r,a){if(mc(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)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};o.types=a===null?null:a.types,N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Os(e,t,s)}catch(n){As(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Os(e,t,a)}catch(n){As(e,t,n)}}function Os(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ks(e,t,n)},function(n){return As(e,t,n)}):ks(e,t,n)}function ks(e,t,n){t.status=`fulfilled`,t.value=n,js(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ds(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,js(t),t=t.next;while(t!==r)}e.action=null}function js(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ms(e,t){return t}function Ns(e,t){if(R){var n=id.formState;if(n!==null){a:{var r=z;if(R){if(oa){b:{for(var i=oa,a=ca;i.nodeType!==8;){if(!a){i=null;break b}if(i=pm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){oa=pm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=cs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:t},n.queue=r,n=dc.bind(null,z,r),r.dispatch=n,r=ws(!1),a=pc.bind(null,z,!1,r.queue),r=cs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Es.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Fs(ls(),B,e)}function Fs(e,t,n){if(t=gs(e,t,Ms)[0],e=hs(ms)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ds(t)}catch(e){throw e===Za?$a:e}else r=t;t=ls();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,Rs(9,{destroy:void 0},Is.bind(null,i,n),null)),[r,a,e]}function Is(e,t){e.action=t}function Ls(e){var t=ls(),n=B;if(n!==null)return Fs(t,n,e);ls(),t=t.memoizedState,n=ls();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=us(),z.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 zs(){return ls().memoizedState}function Bs(e,t,n,r){var i=cs();z.flags|=e,i.memoizedState=Rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Vs(e,t,n,r){var i=ls();r=r===void 0?null:r;var a=i.memoizedState.inst;B!==null&&r!==null&&es(r,B.memoizedState.deps)?i.memoizedState=Rs(t,a,n,r):(z.flags|=e,i.memoizedState=Rs(1|t,a,n,r))}function Hs(e,t){Bs(8390656,8,e,t)}function Us(e,t){Vs(2048,8,e,t)}function Ws(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=us(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gs(e){var t=ls().memoizedState;return Ws({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ks(e,t){return Vs(4,2,e,t)}function qs(e,t){return Vs(4,4,e,t)}function Js(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 Ys(e,t,n){n=n==null?null:n.concat([e]),Vs(4,4,Js.bind(null,t,e),n)}function Xs(){}function Zs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qs(e,t){var n=ls();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&es(t,r[1]))return r[0];if(r=e(),Jo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r}function $s(e,t,n){return n===void 0||Wo&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ld(),z.lanes|=e,dd|=e,n)}function ec(e,t,n,r){return Ur(n,t)?n:Oo.current===null?!(Wo&106)||Wo&1073741824&&!(W&261930)?(Ic=!0,e.memoizedState=n):(e=Ld(),z.lanes|=e,dd|=e,t):(e=$s(e,n,r),Ur(e,t)||(Ic=!0),e)}function tc(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,pc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Ga(c,r),Id(e)):fc(e,t,r,Id(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},Id())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,ge,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:ge},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},Id())}function oc(){return Da(dh)}function sc(){return ls().memoizedState}function cc(){return ls().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Id();e=yo(n);var r=bo(t,e,n);r!==null&&(zd(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=Id();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Oi(e,t,n,r),n!==null&&(zd(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,Id())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(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,Ur(s,o))return Di(e,t,i,0),id===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return zd(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:zf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&zd(t,e,2)}function mc(e){var t=e.alternate;return e===z||t!==null&&t===z}function hc(e,t){qo=Ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}var _c={readContext:Da,use:fs,useCallback:$o,useContext:$o,useEffect:$o,useImperativeHandle:$o,useLayoutEffect:$o,useInsertionEffect:$o,useMemo:$o,useReducer:$o,useRef:$o,useState:$o,useDebugValue:$o,useDeferredValue:$o,useTransition:$o,useSyncExternalStore:$o,useId:$o,useHostTransitionStatus:$o,useFormState:$o,useActionState:$o,useOptimistic:$o,useMemoCache:$o,useCacheRefresh:$o,useEffectEvent:$o},vc={readContext:Da,use:fs,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=cs();t=t===void 0?null:t;var r=e();if(Jo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=cs();if(n!==void 0){var i=n(t);if(Jo){$e(!0);try{n(t)}finally{$e(!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=uc.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:function(e){e=ws(e);var t=e.queue,n=dc.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(cs(),e,t)},useTransition:function(){var e=ws(!1);return e=tc.bind(null,z,e.queue,!0,!1),cs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=cs();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),id===null)throw Error(i(349));W&127||ys(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(xs.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},bs.bind(null,r,o,n,t),null),n},useId:function(){var e=cs(),t=id.identifierPrefix;if(R){var n=$i,r=Qi;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Yo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e){var t=cs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pc.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:ps,useCacheRefresh:function(){return cs().memoizedState=lc.bind(null,z)},useEffectEvent:function(e){var t=cs(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Da,use:fs,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:hs,useRef:zs,useState:function(){return hs(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){return ec(ls(),B.memoizedState,e,t)},useTransition:function(){var e=hs(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return Ts(ls(),B,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs},bc={readContext:Da,use:fs,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:_s,useRef:zs,useState:function(){return _s(ms)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=ls();return B===null?$s(n,e,t):ec(n,B.memoizedState,e,t)},useTransition:function(){var e=_s(ms)[0],t=ls().memoizedState;return[typeof e==`boolean`?e:ds(e),t]},useSyncExternalStore:vs,useId:sc,useHostTransitionStatus:oc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e,t){var n=ls();return B===null?(n.baseState=e,[e,n.queue.dispatch]):Ts(n,B,e,t)},useMemoCache:ps,useCacheRefresh:cc,useEffectEvent:Gs};function xc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Id(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(zd(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Id(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(zd(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Id(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(zd(t,e,n),xo(t,e,n))}};function Cc(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?!Wr(n,r)||!Wr(i,a):!0}function wc(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&&Sc.enqueueReplaceState(t,t.state,null)}function Tc(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=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ec(e){Si(e)}function Dc(e){console.error(e)}function Oc(e){Si(e)}function kc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ac(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 jc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){kc(e,t)},n}function Mc(e){return e=yo(e),e.tag=3,e}function Nc(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(){Ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ac(t,n,r),typeof i!=`function`&&(Cd===null?Cd=new Set([this]):Cd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Pc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&wa(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Po===null?Zd():n.alternate===null&&ud===0&&(ud=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yf(e,r,a)),!1;case 22:return n.flags|=65536,r===eo?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)),yf(e,r,a)),!1}throw Error(i(435,n.tag))}return yf(e,r,a),Zd(),!1}if(R)return t=No.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=jc(e.stateNode,r,a),So(e,a),ud!==4&&(ud=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),gd===null?gd=[o]:gd.push(o),ud!==4&&(ud=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=jc(n.stateNode,r,e),So(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`&&(Cd===null||!Cd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Mc(a),Nc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fc=Error(i(461)),Ic=!1;function Lc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function Rc(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 Ea(t),r=ts(e,t,n,o,a,i),s=as(),e!==null&&!Ic?(os(e,t,i),fl(e,t,i)):(R&&s&&na(t),t.flags|=1,Lc(e,t,r,i),t.child)}function zc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Bc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!pl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return fl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function Bc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Ic=!1,t.pendingProps=r=a,pl(e,i))e.flags&131072&&(Ic=!0);else return t.lanes=e.lanes,fl(e,t,i)}}return Jc(e,t,n,r,i)}function Vc(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 Uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ya(t,a===null?null:a.cachePool),a===null?jo():Ao(t,a),Lo(t);else return r=t.lanes=536870912,Uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ya(t,null),jo(),Ro()):(Ya(t,a.cachePool),Ao(t,a),Ro(),t.memoizedState=null);return Lc(e,t,i,n),t.child}function Hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uc(e,t,n,r,i){var a=Ja();return a=a===null?null:{parent:Na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ya(t,null),jo(),Lo(t),e!==null&&wa(e,t,r,!0),t.childLanes=i,null}function Wc(e,t){return t=rl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gc(e,t,n){return mo(t,e.child,null,n),e=Wc(t,t.pendingProps),e.flags|=2,zo(t),t.memoizedState=null,e}function Kc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=Wc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hc(null,e);if(Io(t),(e=oa)?(e=lm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Wc(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=Gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ic||wa(e,t,n,!1),a=(n&e.childLanes)!==0,Ic||a){if(Oo.current===null){if(r=id,r!==null&&(s=bt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),zd(r,e,s),Fc;Zd()}t=Gc(e,t,n)}else e=o.treeContext,oa=pm(s.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=Wc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qc(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 Jc(e,t,n,r,i){return Ea(t),n=ts(e,t,n,r,void 0,i),r=as(),e!==null&&!Ic?(os(e,t,i),fl(e,t,i)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,i),t.child)}function Yc(e,t,n,r,i,a){return Ea(t),t.updateQueue=null,n=rs(t,r,n,i),ns(e),r=as(),e!==null&&!Ic?(os(e,t,a),fl(e,t,a)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,a),t.child)}function Xc(e,t,n,r,i){if(Ea(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Da(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?Da(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(xc(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&&Sc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),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=Tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Da(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)&&wc(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(xc(t,n,d,r),l=t.memoizedState),(c=go||Cc(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,vo(e,t),o=t.memoizedProps,u=Tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Da(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)&&wc(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Ta(e.dependencies)?(typeof s==`function`&&(xc(t,n,s,r),p=t.memoizedState),(u=go||Cc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ta(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,qc(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=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):Lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=fl(e,t,i),e}function Zc(e,t,n,r){return ma(),t.flags|=256,Lc(e,t,n,r),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Xa()}}function el(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=md),e}function tl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Bo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(R){if(i?Fo(t):Ro(),(e=oa)?(e=lm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=dm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ro(),i=t.mode,a=rl({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=$c(n),r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(null,r)):(Fo(t),nl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return al(e,t,a,o,r,c,s,n)}return i?(Ro(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Hc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=$c(n):(a=i.cachePool,a===null?a=Xa():(s=Na._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(e.child,r)):(Fo(t),n=e.child,e=n.sibling,n=Ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function nl(e,t){return t=rl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function rl(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function il(e,t,n){return mo(t,e.child,null,n),e=nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function al(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Fo(t),t.flags&=-257,il(e,t,c)):t.memoizedState===null?(Ro(),o=a.fallback,s=t.mode,a=rl({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=$c(c),a.childLanes=el(e,r,c),t.memoizedState=Qc,Hc(null,a)):(Ro(),t.child=e.child,t.flags|=128,null);if(Fo(t),dm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),il(e,t,c)}if(Ic||wa(e,t,c,!1),r=(c&e.childLanes)!==0,Ic||r){if(Oo.current!==null)return il(e,t,c);if(r=id,r!==null&&(a=bt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),zd(r,e,a),Fc;return um(o)||Zd(),il(e,t,c)}return um(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,oa=pm(o.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=nl(t,a.children),t.flags|=134221824,t)}function ol(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function sl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Uo(n)===null&&(t=e),e=e.sibling}return t}function cl(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 ll(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ul(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Bo.current;if(t.flags&128)return Vo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Vo(t,o),i===`backwards`&&e!==null?(ll(e),Lc(e,t,r,n),ll(e)):Lc(e,t,r,n),r=R?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ol(e,n,t);else if(e.tag===19)ol(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`backwards`:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ll(t)),cl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cl(t,!0,n,null,a,r);break;case`together`:cl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cl(t,!1,i,n,a,r)}return t.child}function dl(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Lc(e,t,r.children,n),t.child}function fl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(wa(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=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ta(e)))}function ml(e,t,n){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),ba(t,Na,e.memoizedState.cache),ma();break;case 27:case 5:Oe(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:ba(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){if(r.dehydrated!==null)return Fo(t),t.flags|=128,null;r=wa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?tl(e,t,n):(Fo(t),e=fl(e,t,n),e===null?null:e.sibling)}Fo(t);break;case 19:if(t.flags&128)return ul(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(wa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ul(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vo(t,Bo.current),r)break;return null;case 22:return t.lanes=0,Vc(e,t,n,t.pendingProps);case 24:ba(t,Na,e.memoizedState.cache)}return fl(e,t,n)}function hl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ic=!0;else{if(!pl(e,n)&&!(t.flags&128))return Ic=!1,ml(e,t,n);Ic=!!(e.flags&131072)}}else Ic=!1,R&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Tc(e,r),t.tag=1,t=Xc(null,t,e,r,n)):(t.tag=0,t=Jc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=Rc(null,t,e,r,n);break a}if(a===ae){t.tag=14,t=zc(null,t,e,r,n);break a}if(a===te){t.tag=10,t.type=e,t=dl(null,t,n);break a}}throw t=me(e)||e,Error(i(306,t,``))}}return t;case 0:return Jc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Tc(r,t.pendingProps),Xc(e,t,r,a,n);case 3:a:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,Na,r),r!==o.cache&&Ca(t,[Na],n,!0),wo(),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=Zc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ga(a),t=Zc(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(oa=pm(e.firstChild),aa=t,R=!0,sa=null,ca=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=fl(e,t,n);break a}Lc(e,t,r,n)}t=t.child}return t;case 26:return qc(e,t),e===null?(n=Lm(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(t.stateNode=gp(t.type,t.pendingProps,we.current,t)):t.memoizedState=Lm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Oe(t),e===null&&R&&(r=t.stateNode=ym(t.type,t.pendingProps,we.current),aa=t,ca=!0,a=oa,Ep(t.type)?(mm=a,oa=pm(r.firstChild)):oa=a),Lc(e,t,t.pendingProps.children,n),qc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=oa)&&(r=sm(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,aa=t,oa=pm(r.firstChild),ca=!1,a=!0)),a||ua(t)),Oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,_p(a,o)?r=null:s!==null&&_p(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ts(e,t,is,null,null,n),dh._currentValue=a),qc(e,t),Lc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=oa)&&(n=cm(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,aa=t,oa=null,e=!0)),e||ua(t)),null;case 13:return tl(e,t,n);case 4:return Ee(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):Lc(e,t,r,n),t.child;case 11:return Rc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,qc(e,t),Lc(e,t,r,n),t.child;case 8:return Lc(e,t,t.pendingProps.children,n),t.child;case 12:return Lc(e,t,t.pendingProps.children,n),t.child;case 10:return dl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ea(t),a=Da(a),r=r(a),t.flags|=1,Lc(e,t,r,n),t.child;case 14:return zc(e,t,t.type,t.pendingProps,n);case 15:return Bc(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 31:return Kc(e,t,n);case 22:return Vc(e,t,n,t.pendingProps);case 24:return Ea(t),r=Da(Na),e===null?(a=Ja(),a===null&&(a=id,o=Pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),ba(t,Na,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,Na,r),r!==a.cache&&Ca(t,[Na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,Na,r))),Lc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:R&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:qc(e,t),Lc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function gl(e){e.flags|=4}function _l(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Qm(t,r):Qm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Jd())e.flags|=8192;else throw io=eo,Qa}}else e.flags&=-16777217}function vl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t)){if(Jd())e.flags|=8192;else throw io=eo,Qa}}function yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,hd|=t)}function bl(e,t){if(!R)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function xl(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&1206910976,r|=i.flags&1206910976,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 Sl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xl(t),null;case 1:return xl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(Na),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?gl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),xl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(gl(t),o===null?(xl(t),_l(t,a,null,r,n)):(xl(t),vl(t,o))):o?o===e.memoizedState?(xl(t),t.flags&=-16777217):(gl(t),xl(t),vl(t,o)):(e=e.memoizedProps,e!==r&&gl(t),xl(t),_l(t,a,e,r,n)),null;case 27:if(ke(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}e=Se.current,pa(t)?da(t,e):(e=ym(a,r,n),t.stateNode=e,gl(t))}return xl(t),t.subtreeFlags&=-33554433,null;case 5:if(ke(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}if(o=Se.current,pa(t))da(t,o);else{var s=pp(we.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[Et]=t,o[Dt]=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(op(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&&gl(t)}}return xl(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=we.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=aa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ip(e.nodeValue,n)),e||ua(t,!0)}else e=pp(e).createTextNode(r),e[Et]=t,t.stateNode=e}return xl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(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[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return xl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(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[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(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),yl(t,t.updateQueue),xl(t),null);case 4:return De(),e===null&&J(t.stateNode.containerInfo),t.flags|=67108864,xl(t),null;case 10:return xa(t.type),xl(t),null;case 19:if(Ho(t),r=t.memoizedState,r===null)return xl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(ud!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Uo(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Vo(t,Bo.current&1|2),R&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>xd&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!R)return xl(t),null}else 2*He()-r.renderingStartTime>xd&&n!==536870912&&(t.flags|=128,a=!0,bl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=He(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||R?Vo(t,o):(n=o,xe(No,t),xe(Bo,n),Po===null&&(Po=t)),R&&ea(t,r.treeForkCount),e}return xl(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(xl(t),t.subtreeFlags&6&&(t.flags|=8192)):xl(t),n=t.updateQueue,n!==null&&yl(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&&be(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(Na),xl(t),null;case 25:return null;case 30:return t.flags|=33554432,xl(t),null}throw Error(i(156,t.tag))}function Cl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Na),De(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return De(),null;case 10:return xa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&be(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Na),null;case 25:return null;default:return null}}function wl(e,t){switch(ra(t),t.tag){case 3:xa(Na),De();break;case 26:case 27:case 5:ke(t);break;case 4:De();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Ho(t);break;case 10:xa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&be(qa);break;case 24:xa(Na)}}function Tl(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){K(t,t.return,e)}}function El(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){K(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){K(t,t.return,e)}}function Dl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){K(e,e.return,t)}}}function Ol(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){K(e,t,n)}}function kl(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:var i=e.stateNode,a=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Rp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new zp(e);p(e.child,!1,nm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){K(e,t,n)}}function Al(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){K(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){K(e,t,n)}else n.current=null}}function jl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)im(e.stateNode,t[n])}function Ml(e){for(var t=e.return;t!==null&&(Fl(t)&&im(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Nl(e){for(var t=e.return;t!==null&&(Fl(t)&&am(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Pl(e){return e.tag===5||e.tag===3||e.tag===27}function Fl(e){return e&&e.tag===7&&e.stateNode!==null}function Il(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){K(e,e.return,t)}}function Ll(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[Dt]=t}catch(t){K(e,e.return,t)}}function Rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ep(e.type)||e.tag===4}function zl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rl(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&&Ep(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 Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),jl(e,r),F=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Ep(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),jl(e,r),F=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Ep(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Vl(e,t,n,r),e=e.sibling;e!==null;)Vl(e,t,n,r),e=e.sibling}function Hl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[Et]=e,t[Dt]=n}catch(t){K(e,e.return,t)}}var Ul=!1,Wl=null;function Gl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ul=!0)}var Kl=null;function ql(){var e=Kl;return Kl=null,e}var Jl=0;function Yl(e,t,n,r,i){return Jl=0,Xl(e.child,t,n,r,i)}function Xl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Mp(o);r.push(s),s.view&&(a=!0)}else a||Mp(o).view&&(a=!0);Ul=!0,kp(o,Jl===0?t:t+`_`+Jl,n),Jl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Xl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Zl(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Zl(e.child,t)),e=e.sibling}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=xi(t.default,t.share),t!==`none`&&(Yl(e,n,t,null,!1)||Zl(e.child,!1))}e=e.sibling}}function $l(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Ql(e):Yl(e,i,a,null,!1)?(Ql(e),n.paired||t||Rd(e,r.onEnter)):Zl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e,t),e=e.sibling;else Ql(e)}function eu(e){if(Wl!==null&&Wl.size!==0){var t=Wl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=xi(n.default,n.share);if(a!==`none`&&(Yl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Rd(e,n.onShare)):Zl(e.child,!1)),t.delete(r),t.size===0)break}}}eu(e)}e=e.sibling}}}function tu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Wl===null?void 0:Wl.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Yl(e,n,i,null,!1)?r===void 0?Rd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Wl.delete(n),Rd(e,t.onShare)):Zl(e.child,!1)),Wl!==null&&eu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else Wl!==null&&eu(e)}function nu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Yl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&nu(e);e=e.sibling}}function ru(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Zl(e.child,!1))}ru(e)}e=e.sibling}}function iu(e){if(e.tag===30)e.stateNode.paired=null,Zl(e.child,!1),ru(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)iu(e),e=e.sibling;else ru(e)}function au(e){for(e=e.child;e!==null;)e.tag===30?Zl(e.child,!1):e.subtreeFlags&33554432&&au(e),e=e.sibling}function ou(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Jl<a.length){var l=a[Jl],u=Mp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&kp(c,Jl===0?n:n+`_`+Jl,i),s&&e.flags&4||(Kl===null&&(Kl=[]),Kl.push(c,Jl===0?r:r+`_`+Jl,t.memoizedProps)),Jl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ou(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function su(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Np)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Jl=0,i=ou(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Rd(e,n.onUpdate))}else e.subtreeFlags&33554432&&su(e,t);e=e.sibling}}var cu=!1,V=!1,lu=!1,uu=!1,du=typeof WeakSet==`function`?WeakSet:Set,fu=null,pu=!1,mu=!1,hu=!1,gu=!1;function _u(e,t,n){if(e=e.containerInfo,dp=bh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(fp={focusedElem:e,selectionRange:r},bh=!1,n=(n&335544064)===n,fu=t,t=n?9270:1024;fu!==null;){if(e=fu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&tu(r[a]);if(e.alternate===null&&e.flags&2)n&&Gl(e),vu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&tu(r),vu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Gl(e),vu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,fu=r):(n&&nu(e),vu(n))}}Wl=null}function vu(e){for(;fu!==null;){var t=fu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Tc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){K(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)om(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:om(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Yl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,fu=r;break}fu=t.return}}function yu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:zu(e,n),r&4&&Tl(5,n);break;case 1:if(zu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){K(n,n.return,e)}else{var i=Tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){K(n,n.return,e)}}}r&64&&Dl(n),r&512&&kl(n,n.return);break;case 3:if(zu(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{Do(e,t)}catch(e){K(n,n.return,e)}}break;case 27:t===null&&r&4&&Hl(n);case 26:case 5:zu(e,n),t===null&&r&4&&Il(n),r&512&&kl(n,n.return);break;case 12:zu(e,n);break;case 31:zu(e,n),r&4&&Ou(e,n);break;case 13:zu(e,n),r&4&&ku(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sf.bind(null,n),fm(e,n))));break;case 22:if(r=n.memoizedState!==null||cu,!r){var a=t!==null&&t.memoizedState!==null||V;t=cu,i=V,cu=r,(V=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Vu(e,n,r)):zu(e,n),cu=t,V=i}break;case 30:zu(e,n),r&512&&kl(n,n.return);break;case 7:r&512&&kl(n,n.return);default:zu(e,n)}}function bu(e,t){for(e=e.child;e!==null;)xu(e,t),e=e.sibling}function xu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){K(e,e.return,t)}Su(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,F=!0}catch(t){K(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Op(s,!0):Op(e.stateNode,!1)}catch(t){K(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&bu(e,t);break;default:bu(e,t)}}function Su(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:xu(n,r);break a;case 22:n.memoizedState===null&&Su(n,r);break a;default:Su(n,r)}}e=e.sibling}}function Cu(e){var t=e.alternate;t!==null&&(e.alternate=null,Cu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ft(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 wu=null,Tu=!1;function Eu(e,t,n){for(n=n.child;n!==null;)Du(e,t,n),n=n.sibling}function Du(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount==`function`)try{Qe.onCommitFiberUnmount(Ze,n)}catch{}switch(n.tag){case 26:V||Al(n,t),Eu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!V&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:V||Al(n,t),Nl(n);var r=wu,i=Tu;Ep(n.type)&&(wu=n.stateNode,Tu=!1),Eu(e,t,n),bm(n.stateNode,n.type,n.memoizedProps),wu=r,Tu=i;break;case 5:V||Al(n,t),Nl(n);case 6:if(n.tag===6&&Nl(n),r=wu,i=Tu,wu=null,Eu(e,t,n),wu=r,Tu=i,wu!==null){if(Tu)try{(wu.nodeType===9?wu.body:wu.nodeName===`HTML`?wu.ownerDocument.body:wu).removeChild(n.stateNode),F=!0}catch(e){K(n,t,e)}else try{wu.removeChild(n.stateNode),F=!0}catch(e){K(n,t,e)}}break;case 18:wu!==null&&(Tu?(e=wu,Dp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kh(e)):Dp(wu,n.stateNode));break;case 4:r=wu,i=Tu,wu=n.stateNode.containerInfo,Tu=!0,Eu(e,t,n),wu=r,Tu=i;break;case 0:case 11:case 14:case 15:El(2,n,t),V||El(4,n,t),Eu(e,t,n);break;case 1:V||(Al(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ol(n,t,r)),Eu(e,t,n);break;case 21:Eu(e,t,n);break;case 22:V=(r=V)||n.memoizedState!==null,Eu(e,t,n),V=r;break;case 30:Al(n,t),Eu(e,t,n);break;case 7:V||Al(n,t),Eu(e,t,n);break;default:Eu(e,t,n)}}function Ou(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kh(e)}catch(e){K(t,t.return,e)}}}function ku(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kh(e)}catch(e){K(t,t.return,e)}}function Au(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(i(435,e.tag))}}function ju(e,t){var n=Au(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Cf.bind(null,e,t);t.then(r,r)}})}function Mu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ep(l.type)){wu=l.stateNode,Tu=!1;break a}break;case 5:wu=l.stateNode,Tu=!1;break a;case 3:case 4:wu=l.stateNode.containerInfo,Tu=!0;break a}l=l.return}if(wu===null)throw Error(i(160));Du(s,c,o),wu=null,Tu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pu(t,e,n),t=t.sibling}var Nu=null;function Pu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Mu(t,e,n),Fu(e),a&4&&(El(3,e,e.return),Tl(3,e),El(5,e,e.return));break;case 1:Mu(t,e,n),Fu(e),a&512&&(V||r===null||Al(r,r.return)),a&64&&cu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Nu,Mu(t,e,n),Fu(e),a&512&&(V||r===null||Al(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(cu)e.stateNode=gp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Nt]||r[Et]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[Et]=e,Bt(r),t=r;break a;case`link`:if(o=Ym(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Ym(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Et]=e,Bt(r),t=r}e.stateNode=t}}else cu||Xm(o,e.type,e.stateNode)}else e.stateNode=Wm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ll(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||V||t.parentNode.removeChild(t)):a.count--,n===null?cu||Xm(o,e.type,e.stateNode):Wm(o,n,e.memoizedProps))}break;case 27:Mu(t,e,n),Fu(e),a&512&&(V||r===null||Al(r,r.return)),r!==null&&a&4&&Ll(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=lu,lu=!1,Mu(t,e,n),lu=o,Fu(e),a&512&&(V||r===null||Al(r,r.return)),e.flags&32){t=e.stateNode;try{pn(t,``),F=!0}catch(t){K(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ll(e,t,r===null?t:r.memoizedProps)),a&1024&&(uu=!0);break;case 6:if(Mu(t,e,n),Fu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,F=!0}catch(t){K(e,e.return,t)}}break;case 3:if(F=!1,Jm=null,o=Nu,Nu=wm(t.containerInfo),Mu(t,e,n),Nu=o,Fu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Kh(t.containerInfo)}catch(t){K(e,e.return,t)}uu&&(uu=!1,Iu(e)),F=!1;break;case 4:a=lu,lu=cu,r=Xt(),o=Nu,Nu=wm(e.stateNode.containerInfo),Mu(t,e,n),Fu(e),Nu=o,F&&mu&&(hu=!0),F=r,lu=a;break;case 12:Mu(t,e,n),Fu(e);break;case 31:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 13:Mu(t,e,n),Fu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yd=He()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=cu,l=V,u=lu;cu=c||o,lu=u||o,V=l||s,Mu(t,e,n),V=l,lu=u,cu=c,Fu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||cu||V||(t=s||V,n=cu,r=V,cu=o||cu,V=t,Bu(e,2),cu=n,V=r),!o&&lu||bu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ju(e,n))));break;case 19:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 30:a&512&&(V||r===null||Al(r,r.return)),a=Xt(),o=mu,s=(n&335544064)===n,c=e.memoizedProps,mu=s&&xi(c.default,c.update)!==`none`,Mu(t,e,n),Fu(e),s&&r!==null&&F&&(e.flags|=4),mu=o,F=a;break;case 21:break;case 7:a&512&&(V||r===null||Al(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Mu(t,e,n),Fu(e)}}function Fu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Rl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Fl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Pl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Vl(e,zl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(pn(l,``),n.flags&=-33),Vl(e,zl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Bl(e,zl(e),u,s);break;default:throw Error(i(161))}}catch(t){K(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Iu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Iu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,bh=!0,t.reset(),bh=!1),e=e.sibling}}function Lu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ru(t,e),t=t.sibling;else su(t,!1)}function Ru(e,t){var n=e.alternate;if(n===null)$l(e,!1);else switch(e.tag){case 3:if(gu=pu=!1,ql(),Lu(t,e),!pu&&!hu){if(e=Kl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ap(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),gu=!0}Kl=null;break;case 5:Lu(t,e);break;case 4:r=pu,pu=!1,Lu(t,e),pu&&(hu=!0),pu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Lu(t,e):$l(e,!1));break;case 30:r=pu,i=ql(),pu=!1,Lu(t,e),pu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Jl=0,t=ou(e,n,t,o,s,a,!0),Jl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Rd(e,e.memoizedProps.onUpdate),Kl=i):i!==null&&(i.push.apply(i,Kl),Kl=i),pu=e.flags&32?!0:r;break;default:Lu(t,e)}}function zu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yu(e,t.alternate,t),t=t.sibling}function Bu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:El(4,n,n.return),Bu(n,r);break;case 1:Al(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ol(n,n.return,i),Bu(n,r);break;case 27:r&2&&bm(n.stateNode,n.type,n.memoizedProps);case 5:Al(n,n.return),n.tag!==5&&n.tag!==27||Nl(n),Bu(n,r);break;case 6:Nl(n);break;case 26:Al(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||V||i.parentNode.removeChild(i),Bu(n,r);break;case 22:n.memoizedState===null&&Bu(n,r);break;case 30:Al(n,n.return),Bu(n,r);break;case 7:Al(n,n.return);default:Bu(n,r)}e=e.sibling}}function Vu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Vu(i,a,n),Tl(4,a);break;case 1:if(Vu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){K(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Eo(l[i],c)}catch(e){K(r,r.return,e)}}s&&o&64&&Dl(a),kl(a,a.return);break;case 27:n&2&&Hl(a);case 5:a.tag!==5&&a.tag!==27||Ml(a),Vu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 6:Ml(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||cu||Xm(wm(c.ownerDocument),a.type,c),Vu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 12:Vu(i,a,n);break;case 31:Vu(i,a,n),s&&o&4&&Ou(i,a);break;case 13:Vu(i,a,n),s&&o&4&&ku(i,a);break;case 22:a.memoizedState===null&&Vu(i,a,n),kl(a,a.return);break;case 30:Vu(i,a,n),kl(a,a.return);break;case 7:kl(a,a.return);default:Vu(i,a,n)}t=t.sibling}}function Hu(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&&Fa(n))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fa(e))}function Wu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Gu(e,t,n,r),t=t.sibling;else i&&au(t)}function Gu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&iu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Wu(e,t,n,r),a&2048&&Tl(9,t);break;case 1:Wu(e,t,n,r);break;case 3:Wu(e,t,n,r),i&&gu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Fa(a)));break;case 12:if(a&2048){Wu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){K(t,t.return,e)}}else Wu(e,t,n,r);break;case 31:Wu(e,t,n,r);break;case 13:Wu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&iu(t),o._visibility&2?Wu(e,t,n,r):(o._visibility|=2,Ku(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&iu(s),o._visibility&2?Wu(e,t,n,r):qu(e,t)),a&2048&&Hu(s,t);break;case 24:Wu(e,t,n,r),a&2048&&Uu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Zl(a.child,!0),Zl(t.child,!0))),Wu(e,t,n,r);break;default:Wu(e,t,n,r)}}function Ku(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:Ku(a,o,s,c,i),Tl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ku(a,o,s,c,i)):u._visibility&2?Ku(a,o,s,c,i):qu(a,o),i&&l&2048&&Hu(o.alternate,o);break;case 24:Ku(a,o,s,c,i),i&&l&2048&&Uu(o.alternate,o);break;default:Ku(a,o,s,c,i)}t=t.sibling}}function qu(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:qu(n,r),i&2048&&Hu(r.alternate,r);break;case 24:qu(n,r),i&2048&&Uu(r.alternate,r);break;default:qu(n,r)}t=t.sibling}}var Ju=8192;function Yu(e,t,n){if(e.subtreeFlags&Ju)for(e=e.child;e!==null;)Xu(e,t,n),e=e.sibling}function Xu(e,t,n){switch(e.tag){case 26:Yu(e,t,n),e.flags&Ju&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&th(n,e)):nh(n,Nu,e.memoizedState,e.memoizedProps));break;case 5:Yu(e,t,n),e.flags&Ju&&(e=e.stateNode,(t&335544128)===t&&th(n,e));break;case 3:case 4:var r=Nu;Nu=wm(e.stateNode.containerInfo),Yu(e,t,n),Nu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ju,Ju=16777216,Yu(e,t,n),Ju=r):Yu(e,t,n));break;case 30:if((e.flags&Ju)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Wl===null&&(Wl=new Map),Wl.set(r,i)}Yu(e,t,n);break;default:Yu(e,t,n)}}function Zu(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 Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)$u(e),e=e.sibling}function $u(e){switch(e.tag){case 0:case 11:case 15:Qu(e),e.flags&2048&&El(9,e,e.return);break;case 3:Qu(e);break;case 12:Qu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ed(e)):Qu(e);break;default:Qu(e)}}function ed(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),ed(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ed(t));break;default:ed(t)}e=e.sibling}}function td(e,t){for(;fu!==null;){var n=fu;switch(n.tag){case 0:case 11:case 15:El(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:Fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fu=r;else a:for(n=e;fu!==null;){r=fu;var i=r.sibling,a=r.return;if(Cu(r),r===n){fu=null;break a}if(i!==null){i.return=a,fu=i;break a}fu=a}}}var nd={getCacheForType:function(e){var t=Da(Na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Da(Na).controller.signal}},rd=typeof WeakMap==`function`?WeakMap:Map,H=0,id=null,U=null,W=0,G=0,ad=null,od=!1,sd=!1,cd=!1,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=null,_d=null,vd=!1,yd=0,bd=0,xd=1/0,Sd=null,Cd=null,wd=0,Td=null,Ed=null,Dd=0,Od=0,kd=null,Ad=null,jd=null,Md=null,Nd=null,Pd=0,Fd=null;function Id(){return H&2&&W!==0?W&-W:N.T===null?Ct():zf()}function Ld(){if(md===0){if(!(W&536870912)||R){var e=st;st<<=1,!(st&3932160)&&(st=262144),md=e}else md=536870912}return e=No.current,e!==null&&(e.flags|=32),md}function Rd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Rp(yi(e.memoizedProps,n))),Md===null&&(Md=[]),Md.push(t.bind(null,r))}}function zd(e,t,n){(e===id&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Kd(e,0),Ud(e,W,md,!1)),gt(e,n),(!(H&2)||e!==id)&&(e===id&&(!(H&2)&&(fd|=n),ud===4&&Ud(e,W,md,!1)),jf(e))}function Bd(e,t,n){if(H&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?ef(e,t):Qd(e,t,!0),o=r;do{if(a===0){sd&&!r&&Ud(e,t,0,!1);break}if(n=e.current.alternate,o&&!Hd(n)){a=Qd(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=gd;var l=c.current.memoizedState.isDehydrated;if(l&&(Kd(c,s).flags|=256),s=Qd(c,s,!1),s!==2&&s!==6){if(cd&&!l){c.errorRecoveryDisabledLanes|=o,fd|=o,a=4;break a}o=_d,_d=a,o!==null&&(_d===null?_d=o:_d.push.apply(_d,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Kd(e,0),Ud(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&&(t&62914560)!==t)break;case 6:Ud(r,t,md,!od);break a;case 2:_d=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=yd+300-He(),10<a)){if(Ud(r,t,md,!od),ut(r,0,!0)!==0)break a;Dd=t,r.timeoutHandle=bp(Vd.bind(null,r,n,_d,Sd,vd,t,md,fd,hd,od,o,`Throttled`,-0,0),a);break a}Vd(r,n,_d,Sd,vd,t,md,fd,hd,od,o,null,-0,0)}break}while(1);jf(e)}function Vd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Wl=null,Xu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=oh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?yd-He():(a&4194048)===a?bd-He():0,m=ih(d,m),m!==null)){Dd=a,e.cancelPendingCommit=m(cf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ud(e,a,o,!l);return}cf(e,t,a,n,r,i,o,s,c,l,u,d)}function Hd(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(!Ur(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 Ud(e,t,n,r){t=ft(e,t),t&=~pd,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-et(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&vt(e,n,t)}function Wd(){return H&6?!0:(Mf(0,!1),!1)}function Gd(){if(U!==null){if(G===0)var e=U.return;else e=U,ya=va=null,ss(e),so=null,co=0,e=U;for(;e!==null;)wl(e.alternate,e),e=e.return;U=null}}function Kd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,xp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Dd=0,Gd(),id=e,U=n=Ii(e.current,null),W=t,G=0,ad=null,od=!1,sd=dt(e,t),cd=!1,hd=md=pd=fd=dd=ud=0,_d=gd=null,vd=!1,ld=ft(e,t),Ei(),n}function qd(e,t){z=null,N.H=_c,t===Za||t===$a?(t=ao(),G=3):t===Qa?(t=ao(),G=4):G=t===Fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ad=t,U===null&&(ud=1,kc(e,Wi(t,e.current)))}function Jd(){var e=No.current;return e===null?!0:(W&4194048)===W?Po===null:(W&62914560)===W||W&536870912?e===Po:!1}function Yd(){var e=N.H;return N.H=_c,e===null?_c:e}function Xd(){var e=N.A;return N.A=nd,e}function Zd(){ud=4,od||(W&4194048)!==W&&No.current!==null||(sd=!0),!(dd&134217727)&&!(fd&134217727)||id===null||Ud(id,W,md,!1)}function Qd(e,t,n){var r=H;H|=2;var i=Yd(),a=Xd();(id!==e||W!==t)&&(Sd=null,Kd(e,t)),t=!1;var o=ud;a:do try{if(G!==0&&U!==null){var s=U,c=ad;switch(G){case 8:Gd(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=G;if(G=0,ad=null,af(e,s,c,l),n&&sd){o=0;break a}break;default:l=G,G=0,ad=null,af(e,s,c,l)}}$d(),o=ud;break}catch(t){qd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,H=r,N.H=i,N.A=a,U===null&&(id=null,W=0,Ei()),o}function $d(){for(;U!==null;)nf(U)}function ef(e,t){var n=H;H|=2;var r=Yd(),a=Xd();id!==e||W!==t?(Sd=null,xd=He()+500,Kd(e,t)):sd=dt(e,t);a:do try{if(G!==0&&U!==null){t=U;var o=ad;b:switch(G){case 1:G=0,ad=null,af(e,t,o,1);break;case 2:case 9:if(to(o)){G=0,ad=null,rf(t);break}t=function(){G!==2&&G!==9||id!==e||(G=7),jf(e)},o.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:to(o)?(G=0,ad=null,rf(t)):(G=0,ad=null,af(e,t,o,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?$m(s):c.stateNode.complete){G=0,ad=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,of(u))}break b}}G=0,ad=null,af(e,t,o,5);break;case 6:G=0,ad=null,af(e,t,o,6);break;case 8:Gd(),ud=6;break a;default:throw Error(i(462))}}tf();break}catch(t){qd(e,t)}while(1);return ya=va=null,N.H=r,N.A=a,H=n,U===null?(id=null,W=0,Ei(),ud):0}function tf(){for(;U!==null&&!Be();)nf(U)}function nf(e){var t=hl(e.alternate,e,ld);e.memoizedProps=e.pendingProps,t===null?of(e):U=t}function rf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=Yc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:ss(t);var r=t;r===aa&&(R?(fa(r),r.tag===5&&r.stateNode!=null&&(oa=r.stateNode)):(fa(r),R=!0));default:wl(n,t),t=U=Li(t,ld),t=hl(n,t,ld)}e.memoizedProps=e.pendingProps,t===null?of(e):U=t}function af(e,t,n,r){ya=va=null,ss(t),so=null,co=0;var i=t.return;try{if(Pc(e,i,t,n,W)){ud=1,kc(e,Wi(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;ud=1,kc(e,Wi(n,e.current)),U=null;return}t.flags&32768?(R||r===1?e=!0:sd||W&536870912?e=!1:(od=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),sf(t,e)):of(t)}function of(e){var t=e;do{if(t.flags&32768){sf(t,od);return}e=t.return;var n=Sl(t.alternate,t,ld);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);ud===0&&(ud=5)}function sf(e,t){do{var n=Cl(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);ud=6,U=null}function cf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do gf();while(wd!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===id&&(U=id=null,W=0),Ed=t,Td=e,Dd=n,kd=a,Ad=r,lf(e,t,n,s,c,l,f)}}function lf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Od=s,s|=Ti,_t(e,n,s,r,i,a),Md=null,(n&335544064)===n?(Nd=Ra(e),r=10262):(Nd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,wf(Ke,function(){return _f(),null})):(e.callbackNode=null,e.callbackPriority=0),Ul=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=P.p,P.p=2,a=H,H|=4;try{_u(e,t,n)}finally{H=a,P.p=i,N.T=r}}wd=1,Ul?jd=Ip(o,e.containerInfo,Nd,ff,pf,df,mf,_f,uf,null,null):(ff(),pf(),mf())}function uf(e){if(wd!==0){var t=Td.onRecoverableError;t(e,{componentStack:null})}}function df(){wd===3&&(wd=0,Ru(Ed,Td),wd=4)}function ff(){if(wd===1){wd=0;var e=Td,t=Ed,n=Dd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=N.T,N.T=null;var i=P.p;P.p=2;var a=H;H|=4;try{mu=hu=!1,Pu(t,e,n),n=fp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(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 _=qr(s,h),v=qr(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}}bh=!!dp,fp=dp=null}finally{H=a,P.p=i,N.T=r}}e.current=t,wd=2}}function pf(){if(wd===2){wd=0;var e=Td,t=Ed,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=H;H|=4;try{yu(e,t.alternate,t)}finally{H=i,P.p=r,N.T=n}}wd=3}}function mf(){if(wd===4||wd===3){wd=0;var e=jd;jd=null,Ve();var t=Td,n=Ed,r=Dd,i=Ad,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?wd=5:(wd=0,Ed=Td=null,hf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Cd=null),St(r),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot==`function`)try{Qe.onCommitFiberRoot(Ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=N.T,a=P.p,P.p=2,N.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{N.T=n,P.p=a}}if(i=Md,o=Nd,Nd=null,i!==null&&(Md=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Dd&3&&gf(),jf(t),a=t.pendingLanes,r&261930&&a&42?t===Fd?Pd++:(Pd=0,Fd=t):(Pd=0,Fd=null),Mf(0,!1)}}function hf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fa(t)))}function gf(){return jd!==null&&(jd.skipTransition(),jd=null),ff(),pf(),mf(),_f()}function _f(){if(wd!==5)return!1;var e=Td,t=Od;Od=0;var n=St(Dd),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=kd,kd=null;var o=Td,s=Dd;if(wd=0,Ed=Td=null,Dd=0,H&6)throw Error(i(331));var c=H;if(H|=4,$u(o.current),Gu(o,o.current,s,n),H=c,Mf(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{P.p=a,N.T=r,hf(e,t)}}function vf(e,t,n){t=Wi(n,t),t=jc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(gt(e,2),jf(e))}function K(e,t,n){if(e.tag===3)vf(e,e,n);else for(;t!==null;){if(t.tag===3){vf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cd===null||!Cd.has(r))){e=Wi(n,e),n=Mc(2),r=bo(t,n,2),r!==null&&(Nc(n,r,t,e),gt(r,2),jf(r));break}}t=t.return}}function yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rd;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)||(cd=!0,i.add(n),e=bf.bind(null,e,t,n),t.then(e,e))}function bf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,id===e&&(W&n)===n&&(ud===4||ud===3&&(W&62914560)===W&&300>He()-yd?H&2?pd|=n:Kd(e,0):pd|=n,hd===W&&(hd=0)),jf(e)}function xf(e,t){t===0&&(t=mt()),e=ki(e,t),e!==null&&(gt(e,t),jf(e))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xf(e,n)}function Cf(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),xf(e,n)}function wf(e,t){return Re(e,t)}var Tf=null,Ef=null,Df=!1,Of=!1,kf=!1,Af=0;function jf(e){e!==Ef&&e.next===null&&(Ef===null?Tf=Ef=e:Ef=Ef.next=e),Of=!0,Df||(Df=!0,Rf())}function Mf(e,t){if(!kf&&Of){kf=!0;do for(var n=!1,r=Tf;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-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Lf(r,a))}else a=W,a=ut(r,r===id?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Lf(r,a))}r=r.next}while(n);kf=!1}}function Nf(){Pf()}function Pf(){Of=Df=!1;var e=0;Af!==0&&yp()&&(e=Af);for(var t=He(),n=null,r=Tf;r!==null;){var i=r.next,a=Ff(r,t);a===0?(r.next=null,n===null?Tf=i:n.next=i,i===null&&(Ef=n)):(n=r,(e!==0||a&3)&&(Of=!0)),r=i}wd!==0&&wd!==5||Mf(e,!1),Af!==0&&(Af=0)}function Ff(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-et(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=id,n=W,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ze(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ze(r),St(n)){case 2:case 8:n=Ge;break;case 32:n=Ke;break;case 268435456:n=Je;break;default:n=Ke}return r=If.bind(null,e),n=Re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ze(r),e.callbackPriority=2,e.callbackNode=null,2}function If(e,t){if(wd!==0&&wd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(gf()&&e.callbackNode!==n)return null;var r=W;return r=ut(e,e===id?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Bd(e,r,t),Ff(e,He()),e.callbackNode!=null&&e.callbackNode===n?If.bind(null,e):null)}function Lf(e,t){if(gf())return null;Bd(e,t,!0)}function Rf(){wp(function(){H&6?Re(We,Nf):Pf()})}function zf(){if(Af===0){var e=Va;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),Af=e}return Af}function Bf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function Vf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Bf((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Bf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Af!==0){var e=new FormData(i,o);rc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),rc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Hf=0;Hf<gi.length;Hf++){var Uf=gi[Hf];_i(Uf.toLowerCase(),`on`+(Uf[0].toUpperCase()+Uf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),Gt(`onMouseEnter`,[`mouseout`,`mouseover`]),Gt(`onMouseLeave`,[`mouseout`,`mouseover`]),Gt(`onPointerEnter`,[`pointerout`,`pointerover`]),Gt(`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 Wf=`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(` `),Gf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Wf));function Kf(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){Si(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){Si(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[kt];n===void 0&&(n=t[kt]=new Set);var r=e+`__bubble`;n.has(r)||(Yf(t,e,2,!1),n.add(r))}function qf(e,t,n){var r=0;t&&(r|=4),Yf(n,e,r,t)}var Jf=`_reactListening`+Math.random().toString(36).slice(2);function J(e){if(!e[Jf]){e[Jf]=!0,Ht.forEach(function(t){t!==`selectionchange`&&(Gf.has(t)||qf(t,!1,e),qf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jf]||(t[Jf]=!0,qf(`selectionchange`,!1,t))}}function Yf(e,t,n,r){switch(Dh(t)){case 2:var i=xh;break;case 8:i=Sh;break;default:i=Ch}n=i.bind(null,t,n,e),i=void 0,!An||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 Xf(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=It(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}On(function(){var r=a,i=Cn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;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=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case ci:case li:case ui:l=Zn;break;case mi:l=lr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}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=L(m,p),g!=null&&d.push(Zf(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(It(u)||u[Ot]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?It(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Rt(c),h=l==null?u:Rt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,It(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,$f):null,c!==null&&ep(s,u,c,d,!1),l!==null&&f!==null&&ep(s,f,l,d,!0)))}a:{if(c=r?Rt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&_n(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Rt(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,xr=!0)),v=Qf(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=Qf(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Vf(s,e,r,n,i)}Kf(s,t)})}function Zf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qf(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=L(e,n),i!=null&&r.unshift(Zf(e,i,a)),i=L(e,t),i!=null&&r.push(Zf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function $f(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(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=L(n,a),l!=null&&o.unshift(Zf(n,l,c))):i||(l=L(n,a),l!=null&&o.push(Zf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var tp=/\r\n?/g,np=/\u0000|\uFFFD/g;function rp(e){return(typeof e==`string`?e:``+e).replace(tp,`
|
|
9
|
+
`).replace(np,``)}function ip(e,t){return t=rp(t),rp(e)===t}function Y(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Qt(e,`class`,r);break;case`tabIndex`:Qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Qt(e,n,r);break;case`style`:gn(e,r,o);return;case`data`:if(t!==`object`){Qt(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=bn(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`&&Y(e,t,`name`,a.name,a,null),Y(e,t,`formEncType`,a.formEncType,a,null),Y(e,t,`formMethod`,a.formMethod,a,null),Y(e,t,`formTarget`,a.formTarget,a,null)):(Y(e,t,`encType`,a.encType,a,null),Y(e,t,`method`,a.method,a,null),Y(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&q(`scroll`,e);return;case`onScrollEnd`:r!=null&&q(`scrollend`,e);return;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));o?.__html!==n&&(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=bn(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`credentialless`: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`:q(`beforetoggle`,e),q(`toggle`,e),Zt(e,`popover`,r);break;case`xlinkActuate`:I(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:I(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:I(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:I(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:I(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:I(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:I(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:I(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:I(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Zt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Zt(e,n,r);else return}F=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:gn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&q(`scroll`,e);return;case`onScrollEnd`:r!=null&&q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Dt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}F=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Zt(e,n,r)}return}F=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:q(`error`,e),q(`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:Y(e,t,o,s,n,null)}}a&&Y(e,t,`srcSet`,n.srcSet,n,null),r&&Y(e,t,`src`,n.src,n,null);return;case`input`:q(`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:Y(e,t,r,d,n,null)}}cn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in q(`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:Y(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(s in q(`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:Y(e,t,s,c,n,null)}fn(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:Y(e,t,l,r,n,null)}return;case`dialog`:q(`beforetoggle`,e),q(`toggle`,e),q(`cancel`,e),q(`close`,e);break;case`iframe`:case`object`:q(`load`,e);break;case`video`:case`audio`:for(r=0;r<Wf.length;r++)q(Wf[r],e);break;case`image`:q(`error`,e),q(`load`,e);break;case`details`:q(`toggle`,e);break;case`embed`:case`source`:case`link`:q(`error`,e),q(`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:Y(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Y(e,t,c,r,n,null))}var sp={};function cp(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)||Y(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`:m!==f&&(F=!0),o=m;break;case`name`:m!==f&&(F=!0),a=m;break;case`checked`:m!==f&&(F=!0),u=m;break;case`defaultChecked`:m!==f&&(F=!0),d=m;break;case`value`:m!==f&&(F=!0),s=m;break;case`defaultValue`:m!==f&&(F=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Y(e,t,p,m,r,f)}}sn(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)||Y(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`:o!==l&&(F=!0),p=o;break;case`defaultValue`:o!==l&&(F=!0),c=o;break;case`multiple`:o!==l&&(F=!0),s=o;default:o!==l&&Y(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(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:Y(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`:a!==o&&(F=!0),p=a;break;case`defaultValue`:a!==o&&(F=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Y(e,t,s,a,r,o)}dn(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:Y(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`:p!==m&&(F=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Y(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)&&Y(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:Y(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(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||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Y(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||Y(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){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&&lp(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&&lp(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 dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(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 hp(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 gp(e,t,n,r){return n=pp(n).createElement(e),n[Et]=r,n[Dt]=t,op(n,e,t),Bt(n),n}function _p(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 vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(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),Kh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xm(e.ownerDocument.body)}n=i}while(n);Kh(t)}function Op(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 kp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function jp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Mp(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Np(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Pp(e){return e.documentElement.clientHeight}function Fp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Ip(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Pp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=eh(f),u>rh){s.length=o;break}f=new Promise(Fp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Lp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Lp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Lp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Lp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rp(e){return{name:e,group:new Lp(`group`,e),imagePair:new Lp(`image-pair`,e),old:new Lp(`old`,e),new:new Lp(`new`,e)}}function zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Wp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Hp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Bp,e,s,r)}this._eventListeners=a}};function Bp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Wp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Hp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Vp,e,n,i),r.splice(t,1),a!==null&&a()}};function Vp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Hp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Up(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Wp(e,t,n,r){if(e.length===0)return-1;r=Up(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Up(a.optionsOrUseCapture)===r)return i}return-1}zp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Hp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},zp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=v(e),_m(e,t))}zp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Kp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Gp(t[n],e);n--);};function Kp(e,t){return t.push(e),!1}zp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=pp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,qp,e,void 0,void 0))};function qp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Jp,e,void 0,void 0)};function Jp(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0);for(var n=t=0;n<Xp.length;n++){var r=Xp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xp[t++]=r}Xp.length=t}};function Yp(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var Xp=[],Zp=!1;function Qp(e,t,n){Xp.push({fragmentInstance:e,observer:t,instance:n}),Zp||(Zp=!0,vm(function(){Zp=!1;var e=Xp;Xp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}zp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,$p,e,void 0,void 0),e};function $p(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}zp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},zp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Kp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||em(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function em(e,t,n,r,i){var a=It(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function tm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Kp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),tm(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),tm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function nm(e,t){return e=v(e),rm(e,t),!1}function rm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Xp.length;i++){var a=Xp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Xp[r++]=a)}Xp.length=r,n.observe(e)}),rm(e,t))}function am(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Hp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Qp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function om(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`:om(n),Ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sm(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[Nt])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=pm(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pm(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pm(e.nextSibling),e===null))return null;return e}function um(e){return e.data===`$?`||e.data===`$~`}function dm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function fm(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 pm(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 mm=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gm(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 _m(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function vm(e){Cp(function(){Cp(function(t){return e(t)})})}function ym(e,t,n){switch(t=pp(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 bm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&Y(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Ft(e)}function xm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ft(e)}var Sm=new Map,Cm=new Set;function wm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Tm=P.d;P.d={f:Em,r:Dm,D:Am,C:jm,L:Mm,m:Nm,X:Fm,S:Pm,M:Im};function Em(){var e=Tm.f(),t=Wd();return e||t}function Dm(e){var t=Lt(e);t!==null&&t.tag===5&&t.type===`form`?ac(t):Tm.r(e)}var Om=typeof document>`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Bt(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[Pt]=!0,o.onload=o.onerror=function(){Vt(o)}),Bt(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),op(r,`link`,e),Bt(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=zt(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);Bt(c),op(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,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=zt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=T({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Bt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=zt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Bt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=we.current)?wm(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`?(n=Rm(n.href),t=zt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Rm(n.href);var o=zt(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(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,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`?(n=Hm(n),t=zt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+on(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Pt]){r.loading=1;return}}else t=e.createElement(`link`),t[Pt]=!0,t.onload=t.onerror=Vt.bind(null,t),op(t,`link`,n),Bt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+on(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,Bt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Bt(r),op(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,Bt(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),Bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,Bt(a),a):(r=n,(a=Sm.get(o))&&(r=T({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Bt(a),op(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,Gm(r,n.precedence,e));return t.instance}function Gm(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 Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jm=null;function Ym(e,t,n){if(Jm===null){var r=new Map,i=Jm=new Map;i.set(n,r)}else i=Jm,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[Nt]||a[Et]||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 Xm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zm(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 Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(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=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Bt(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),Bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(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=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rh===0&&(rh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.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=oh.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 dh={$$typeof:te,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function fh(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=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function ph(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function mh(e){return e?(e=Mi,e):Mi}function hh(e,t,n,r,i,a){i=mh(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(zd(n,e,t),xo(n,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _h(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&zd(t,e,67108864),_h(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Id();t=xt(t);var n=ki(e,t);n!==null&&zd(n,e,t),_h(e,t)}}var bh=!0;function xh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,Ch(e,t,n,r)}finally{P.p=a,N.T=i}}function Sh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,Ch(e,t,n,r)}finally{P.p=a,N.T=i}}function Ch(e,t,n,r){if(bh){var i=wh(r);if(i===null)Xf(e,t,r,Th,n),Ih(e,r);else if(Rh(i,e,t,n,r))r.stopPropagation();else if(Ih(e,r),t&4&&-1<Fh.indexOf(e)){for(;i!==null;){var a=Lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-et(o);s.entanglements[1]|=c,o&=~c}jf(a),!(H&6)&&(xd=He()+500,Mf(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&zd(s,a,2),Wd(),_h(a,2)}if(a=wh(r),a===null&&Xf(e,t,r,Th,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Xf(e,t,r,null,n)}}function wh(e){return e=Cn(e),Eh(e)}var Th=null;function Eh(e){if(Th=null,e=It(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 Th=e,null}function Dh(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ue()){case We:return 2;case Ge:return 8;case Ke:case qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Oh=!1,kh=null,Ah=null,jh=null,Mh=new Map,Nh=new Map,Ph=[],Fh=`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 Ih(e,t){switch(e){case`focusin`:case`focusout`:kh=null;break;case`dragenter`:case`dragleave`:Ah=null;break;case`mouseover`:case`mouseout`:jh=null;break;case`pointerover`:case`pointerout`:Mh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Nh.delete(t.pointerId)}}function Lh(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=Lt(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rh(e,t,n,r,i){switch(t){case`focusin`:return kh=Lh(kh,e,t,n,r,i),!0;case`dragenter`:return Ah=Lh(Ah,e,t,n,r,i),!0;case`mouseover`:return jh=Lh(jh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mh.set(a,Lh(Mh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Nh.set(a,Lh(Nh.get(a)||null,e,t,n,r,i)),!0}return!1}function zh(e){var t=It(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,wt(e.priority,function(){yh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,wt(e.priority,function(){yh(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 Bh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=Lt(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vh(e,t,n){Bh(e)&&n.delete(t)}function Hh(){Oh=!1,kh!==null&&Bh(kh)&&(kh=null),Ah!==null&&Bh(Ah)&&(Ah=null),jh!==null&&Bh(jh)&&(jh=null),Mh.forEach(Vh),Nh.forEach(Vh)}function Uh(e,n){e.blockedOn===n&&(e.blockedOn=null,Oh||(Oh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hh)))}var Wh=null;function Gh(e){Wh!==e&&(Wh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wh===e&&(Wh=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(Eh(r||n)===null)continue;break}var a=Lt(n);a!==null&&(e.splice(t,3),t-=3,rc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kh(e){function t(t){return Uh(t,e)}kh!==null&&Uh(kh,e),Ah!==null&&Uh(Ah,e),jh!==null&&Uh(jh,e),Mh.forEach(t),Nh.forEach(t);for(var n=0;n<Ph.length;n++){var r=Ph[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ph.length&&(n=Ph[0],n.blockedOn===null);)zh(n),n.blockedOn===null&&Ph.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[Dt]||null;if(typeof a==`function`)o||Gh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Eh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gh(n)}}}function qh(){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 Jh(e){this._internalRoot=e}Yh.prototype.render=Jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hh(n,Id(),e,t,null,null)},Yh.prototype.unmount=Jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hh(e.current,2,null,e,null,null),Wd(),t[Ot]=null}};function Yh(e){this._internalRoot=e}Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ph.length&&t!==0&&t<Ph[n].priority;n++);Ph.splice(n,0,e),n===0&&zh(e)}};var Xh=n.version;if(Xh!==`19.3.0`)throw Error(i(527,Xh,`19.3.0`));P.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=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Zh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qh.isDisabled&&Qh.supportsFiber)try{Ze=Qh.inject(Zh),Qe=Qh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ec,s=Dc,c=Oc;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=ph(e,1,!1,null,null,n,r,null,o,s,c,qh),e[Ot]=t.current,J(e),new Jh(t)}})),ct=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=st()})),lt=(0,m.createContext)({});function ut(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var dt=typeof window<`u`?m.useLayoutEffect:m.useEffect,ft=(0,m.createContext)(null);function pt(e,t){e.indexOf(t)===-1&&e.push(t)}function mt(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ht=(e,t,n)=>n>t?t:n<e?e:n,gt={},_t=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vt=e=>typeof e==`object`&&!!e,yt=e=>/^0[^.\s]+$/u.test(e);function bt(e){let t;return()=>(t===void 0&&(t=e()),t)}var xt=e=>e,St=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Ct=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},wt=class{constructor(){this.subscriptions=[]}add(e){return pt(this.subscriptions,e),()=>this.remove(e)}remove(e){mt(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Tt=e=>e*1e3,Et=e=>e/1e3,Dt=(e,t)=>t?1e3/t*e:0,Ot=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kt=1e-7,At=12;function jt(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ot(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>kt&&++s<At);return o}function Mt(e,t,n,r){if(e===t&&n===r)return xt;let i=t=>jt(t,0,1,e,n);return e=>e===0||e===1?e:Ot(i(e),t,r)}var Nt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Pt=e=>t=>1-e(1-t),Ft=Mt(.33,1.53,.69,.99),It=Pt(Ft),Lt=Nt(It),Rt=e=>e>=1?1:(e*=2)<1?.5*It(e):.5*(2-2**(-10*(e-1))),zt=e=>1-Math.sin(Math.acos(e)),Bt=Pt(zt),Vt=Nt(zt),Ht=Mt(.42,0,1,1),Ut=Mt(0,0,.58,1),Wt=Mt(.42,0,.58,1),Gt=e=>Array.isArray(e)&&typeof e[0]!=`number`,Kt=e=>Array.isArray(e)&&typeof e[0]==`number`,qt={linear:xt,easeIn:Ht,easeInOut:Wt,easeOut:Ut,circIn:zt,circInOut:Vt,circOut:Bt,backIn:It,backInOut:Lt,backOut:Ft,anticipate:Rt},Jt=e=>typeof e==`string`,Yt=e=>{if(Kt(e)){e.length;let[t,n,r,i]=e;return Mt(t,n,r,i)}return Jt(e)?(qt[e],`${e}`,qt[e]):e},F=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Xt(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Zt=40;function Qt(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=F.reduce((e,t)=>(e[t]=Xt(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=gt.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Zt),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:F.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<F.length;t++)o[F[t]].cancel(e)},state:i,steps:o}}var{schedule:I,cancel:$t,state:en,steps:tn}=Qt(typeof requestAnimationFrame<`u`?requestAnimationFrame:xt,!0),nn;function rn(){nn=void 0}var an={now:()=>(nn===void 0&&an.set(en.isProcessing||gt.useManualTiming?en.timestamp:performance.now()),nn),set:e=>{nn=e,queueMicrotask(rn)}},on=e=>Math.round(e*1e5)/1e5,sn=e=>t=>typeof t==`string`&&t.startsWith(e),cn=sn(`--`),ln=sn(`var(--`),un=e=>ln(e)?dn.test(e.split(`/*`)[0].trim()):!1,dn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fn(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var pn={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},mn={...pn,transform:e=>ht(0,1,e)},hn={...pn,default:1},gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _n(e){return e==null}var vn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yn=(e,t)=>n=>!!(typeof n==`string`&&vn.test(n)&&n.startsWith(e)||t&&!_n(n)&&Object.prototype.hasOwnProperty.call(n,t)),bn=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(gn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},xn=e=>ht(0,255,e),Sn={...pn,transform:e=>Math.round(xn(e))},Cn={test:yn(`rgb`,`red`),parse:bn(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Sn.transform(e)+`, `+Sn.transform(t)+`, `+Sn.transform(n)+`, `+on(mn.transform(r))+`)`};function wn(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Tn={test:yn(`#`),parse:wn,transform:Cn.transform},En=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Dn=En(`deg`),On=En(`%`),L=En(`px`),kn=En(`vh`),An=En(`vw`),jn={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},Mn={test:yn(`hsl`,`hue`),parse:bn(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+On.transform(on(t))+`, `+On.transform(on(n))+`, `+on(mn.transform(r))+`)`},Nn={test:e=>Cn.test(e)||Tn.test(e)||Mn.test(e),parse:e=>Cn.test(e)?Cn.parse(e):Mn.test(e)?Mn.parse(e):Tn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Cn.transform(e):Mn.transform(e),getAnimatableNone:e=>{let t=Nn.parse(e);return t.alpha=0,Nn.transform(t)}},Pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Fn=new RegExp(gn.source),In=new RegExp(Pn.source,`i`);function Ln(e){return isNaN(e)&&typeof e==`string`&&(Fn.test(e)||In.test(e))}var Rn=`number`,zn=`color`,Bn=`var`,Vn=`var(`,Hn="${}",Un=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wn(e){let t=e.toString();return Fn.test(t)||In.test(t)}function Gn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Un,e=>(Nn.test(e)?(r.color.push(a),i.push(zn),n.push(Nn.parse(e))):e.startsWith(Vn)?(r.var.push(a),i.push(Bn),n.push(e)):(r.number.push(a),i.push(Rn),n.push(parseFloat(e))),++a,Hn)).split(Hn),indexes:r,types:i}}function Kn(e){return Gn(e).values}function qn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Rn?on(r[a]):e===zn?Nn.transform(r[a]):r[a]}return i}}function Jn(e){return qn(Gn(e))}var Yn=e=>typeof e==`number`?0:Nn.test(e)?Nn.getAnimatableNone(e):e,Xn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Yn(e);function Zn(e){let t=Gn(e);return qn(t)(t.values.map((e,n)=>Xn(e,t.split[n])))}var Qn={test:Ln,parse:Kn,createTransformer:Jn,getAnimatableNone:Zn};function $n(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function er({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=$n(s,r,e+1/3),a=$n(s,r,e),o=$n(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function tr(e,t){return n=>n>0?t:e}var nr=(e,t,n)=>e+(t-e)*n,rr=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ir=[Tn,Cn,Mn],ar=e=>ir.find(t=>t.test(e));function or(e){let t=ar(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===Mn&&(n=er(n)),n}var sr=(e,t)=>{let n=or(e),r=or(t);if(!n||!r)return tr(e,t);let i={...n};return e=>(i.red=rr(n.red,r.red,e),i.green=rr(n.green,r.green,e),i.blue=rr(n.blue,r.blue,e),i.alpha=nr(n.alpha,r.alpha,e),Cn.transform(i))},cr=new Set([`none`,`hidden`]);function lr(e,t){return cr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ur(e,t){return n=>nr(e,t,n)}function dr(e){return typeof e==`number`?ur:typeof e==`string`?un(e)?tr:Nn.test(e)?sr:hr:Array.isArray(e)?fr:typeof e==`object`?Nn.test(e)?sr:pr:tr}function fr(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>dr(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function pr(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=dr(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function mr(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var hr=(e,t)=>{let n=Qn.createTransformer(t),r=Gn(e),i=Gn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cr.has(e)&&!i.values.length||cr.has(t)&&!r.values.length?lr(e,t):St(fr(mr(r,i),i.values),n):(`${e}${t}`,tr(e,t))},gr=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function _r(e,t){let n=gr.exec(e);if(!n)return;let r=gr.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>on(nr(a,o,e))+i}function vr(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return nr(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=_r(e,t);if(n)return n}return dr(e)(e,t)}var yr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>I.update(t,e),stop:()=>$t(t),now:()=>en.isProcessing?en.timestamp:an.now()}},br=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},xr=2e4;function Sr(e,t=50,n=xr,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Cr(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Sr(r),xr);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Et(i)}}var wr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Tr(e,t){return e*Math.sqrt(1-t*t)}var Er=12;function Dr(e,t,n){let r=n;for(let n=1;n<Er;n++)r-=e(r)/t(r);return r}var Or=.001;function kr({duration:e=wr.duration,bounce:t=wr.bounce,velocity:n=wr.velocity,mass:r=wr.mass}){let i,a;wr.maxDuration;let o=1-t;o=ht(wr.minDamping,wr.maxDamping,o),e=ht(wr.minDuration,wr.maxDuration,Et(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Tr(t,o),c=Math.exp(-i);return Or-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o*o*t*t*e,c=Math.exp(-r),l=Tr(t*t,o);return(-i(t)+Or>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Dr(i,a,s);if(e=Tt(e),isNaN(c))return{stiffness:wr.stiffness,damping:wr.damping,duration:e};{let t=c*c*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Ar=[`duration`,`bounce`];function jr(e,t){return t.some(t=>e[t]!==void 0)}var Mr=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Nr(e,t){if(Mr(e,t))return e}function Pr(e){let t=Nr(e.stiffness),n=Nr(e.damping,!0),r=Nr(e.mass),i={...e,stiffness:t??wr.stiffness,damping:n??wr.damping,mass:r??wr.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&jr(e,Ar)};if(i.isTimeDefined){if(i.velocity=0,e.visualDuration){let t=e.visualDuration,n=2*Math.PI/(t*1.2),r=n*n,a=2*ht(.05,1,1-(e.bounce||0))*Math.sqrt(r);i={...i,mass:wr.mass,stiffness:r,damping:a}}else{let e=kr(i);i={...i,...e,mass:wr.mass},i.isResolvedFromDuration=!0}(!Mr(i.stiffness)||!Mr(i.damping,!0))&&(i.stiffness=wr.stiffness,i.damping=wr.damping)}return i}function Fr(e=wr.visualDuration,t=wr.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,velocity:u,isResolvedFromDuration:d,isTimeDefined:f}=Pr({...n,velocity:-Et(n.velocity||0)}),p=s/(2*Math.sqrt(o*c)),m=Et(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:u||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?wr.restSpeed.granular:wr.restSpeed.default),g.restDelta=n.restDelta||(e?wr.restDelta.granular:wr.restDelta.default)};_();let v,y,b;if(p<1){let e=Tr(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1);v=t=>{let n=Math.exp(-h*t),r=Math.min(e*t,300);return g.target-n*((g.velocity+h*g.delta)*Math.sinh(r)+e*g.delta*Math.cosh(r))/e};let t={P:0,sinh:0,cosh:0};b=()=>{t.P=(g.velocity+h*g.delta)/e,t.sinh=h*t.P-g.delta*e,t.cosh=h*g.delta-t.P*e},y=n=>{let r=Math.exp(-h*n),i=Math.min(e*n,300);return r*(t.sinh*Math.sinh(i)+t.cosh*Math.cosh(i))}}b();let x=d&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f?0:-Et(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>Tt(y(e)),next:e=>{let t=v(e);if(d)a.done=e>=l;else{let n=Tt(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Sr(S),xr),t=br(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}Fr.applyToOptions=e=>{let t=Cr(e,100,Fr);return e.ease=t.ease,e.duration=Tt(t.duration),e.type=`keyframes`,e};function Ir({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=Fr({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Lr(e,t,n){let r=[],i=n||gt.mix||vr,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=St(Array.isArray(t)?t[n]||xt:t,a)),r.push(a)}return r}function Rr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Lr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Ct(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ht(e[0],e[a-1],t)):l}function zr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Ct(0,t,r);e.push(nr(n,1,i))}}function Br(e){let t=[0];return zr(t,e.length-1),t}function Vr(e,t){return e.map(e=>e*t)}function Hr(e,t){return e.map(()=>t||Wt).splice(0,e.length-1)}function Ur({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Gt(r)?r.map(Yt):Yt(r)||Wt,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(gt.mix||vr)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?ht(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Rr(Vr(n&&n.length===t.length?n:Br(t),e),t,{ease:Array.isArray(i)?i:Hr(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Wr=5;function Gr(e,t,n){let r=Math.max(t-Wr,0);return Dt(n-e(r),t-r)}function Kr(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Gr(t=>e.next(t).value,t,e.next(t).value)}var qr=e=>e!==null;function Jr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(qr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Yr={decay:Ir,inertia:Ir,tween:Ur,keyframes:Ur,spring:Fr};function Xr(e){typeof e.type==`string`&&(e.type=Yr[e.type])}function Zr(e,t){return{kind:e,animation:t,timestamp:an.now(),frameTimestamp:en.timestamp,frameIsProcessing:en.isProcessing}}function Qr(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Zr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function $r(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Zr(`layout-animation-start`,e),node:t})}catch{}}var ei=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},ti=e=>e/100,ni=class extends ei{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==an.now()&&this.tick(an.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Qr(this,this.options)}initAnimation(){let{options:e}=this;Xr(e);let{type:t=Ur,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ur;s!==Ur&&typeof o[0]!=`number`&&(this.mixKeyframes=St(ti,vr(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Sr(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=ht(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Ir&&(b.value=Jr(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Et(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Et(e)}get time(){return Et(this.currentTime)}set time(e){e=Tt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Kr(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(an.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Et(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=yr,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(an.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},ri=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ii(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(gn)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ri.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ai=/\b([a-z-]*)\(.*?\)/gu,oi={...Qn,getAnimatableNone:e=>{let t=e.match(ai);return t?t.map(ii).join(` `):e}},si={...Qn,getAnimatableNone:e=>{let t=Qn.parse(e);return Qn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ci={...pn,transform:Math.round},li={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:Dn,pathRotation:Dn,rotateX:Dn,rotateY:Dn,rotateZ:Dn,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Dn,skewX:Dn,skewY:Dn,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:mn,originX:jn,originY:jn,originZ:L,zIndex:ci,fillOpacity:mn,strokeOpacity:mn,numOctaves:ci},ui={...li,color:Nn,backgroundColor:Nn,outlineColor:Nn,fill:Nn,stroke:Nn,borderColor:Nn,borderTopColor:Nn,borderRightColor:Nn,borderBottomColor:Nn,borderLeftColor:Nn,filter:oi,WebkitFilter:oi,mask:si,WebkitMask:si},di=e=>ui[e],fi=new Set([oi,si]);function pi(e,t){let n=di(e);return fi.has(n)||(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function mi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var hi=e=>e*180/Math.PI,gi=e=>vi(hi(Math.atan2(e[1],e[0]))),_i={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gi,rotateZ:gi,skewX:e=>hi(Math.atan(e[1])),skewY:e=>hi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vi=e=>(e%=360,e<0&&(e+=360),e),yi=gi,bi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Si={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bi,scaleY:xi,scale:e=>(bi(e)+xi(e))/2,rotateX:e=>vi(hi(Math.atan2(e[6],e[5]))),rotateY:e=>vi(hi(Math.atan2(-e[2],e[0]))),rotateZ:yi,rotate:yi,skewX:e=>hi(Math.atan(e[4])),skewY:e=>hi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ci(e){return+!!e.includes(`scale`)}function wi(e,t){if(!e||e===`none`)return Ci(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Si,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_i,i=t}if(!i)return Ci(t);let a=r[t],o=i[1].split(`,`).map(Ei);return typeof a==`function`?a(o):o[a]}var Ti=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return wi(n,t)};function Ei(e){return parseFloat(e.trim())}var Di=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Oi=new Set([...Di,`pathRotation`]),ki=e=>e===pn||e===L,Ai=new Set([`x`,`y`,`z`]),ji=Di.filter(e=>!Ai.has(e));function Mi(e){let t=[];return ji.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Ni=new Set([`bottom`,`right`]);function Pi(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Fi={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Pi(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Pi(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>wi(e,`x`),y:({transform:e})=>wi(e,`y`)};Fi.translateX=Fi.x,Fi.translateY=Fi.y;var Ii=new Set,Li=!1,Ri=!1,zi=!1;function Bi(){if(Ri){let e=[],t=new Set,n=new Set;Ii.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Ni.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Mi(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ri=!1,Li=!1,Ii.forEach(e=>e.complete(zi)),Ii.clear()}function Vi(){Ii.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ri=!0)})}function Hi(){zi=!0,Vi(),Bi(),zi=!1}function Ui(e,t,n){if(typeof e==`string`){if(_t(e)||yt(e))return parseFloat(e);if(!Qn.test(e)&&Qn.test(n))return pi(t,n)}return e??void 0}var Wi=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Ii.add(this),Li||(Li=!0,I.read(Vi),I.resolveKeyframes(Bi))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Ui(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mi(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ii.delete(this)}cancel(){this.state===`scheduled`&&(Ii.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Gi=e=>e.startsWith(`--`);function Ki(e,t,n){Gi(t)?e.style.setProperty(t,n):e.style[t]=n}var qi={};function Ji(e,t){let n=bt(e);return()=>qi[t]??n()}var Yi=Ji(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Xi=Ji(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Zi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qi={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Zi([0,.65,.55,1]),circOut:Zi([.55,0,1,.45]),backIn:Zi([.31,.01,.66,-.59]),backOut:Zi([.33,1.53,.69,.99])};function $i(e,t){if(e)return typeof e==`function`?Xi()?br(e,t):`ease-out`:Kt(e)?Zi(e):Array.isArray(e)?e.map(e=>$i(e,t)||Qi.easeOut):Qi[e]}function ea(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=$i(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function ta(e){return typeof e==`function`&&`applyToOptions`in e}function na({type:e,...t}){return ta(e)&&Xi()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ra=class extends ei{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=na(e);this.animation=ea(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Jr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Ki(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Qr(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Et(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Et(e)}get time(){return Et(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Tt(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Yi()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),xt):r(this)}},ia={anticipate:Rt,backInOut:Lt,circInOut:Vt};function aa(e){return e in ia}function oa(e){typeof e.ease==`string`&&aa(e.ease)&&(e.ease=ia[e.ease])}var R=10,sa=class extends ra{constructor(e){oa(e),Xr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new ni({...a,autoplay:!1}),s=Math.max(R,an.now()-this.startTime),c=ht(0,R,s-R),l=o.sample(s).value,{name:u}=this.options;i&&u&&Ki(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ca=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Qn.test(e)||e===`0`)&&!e.startsWith(`url(`));function la(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ua(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ca(i,t),s=ca(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):la(e)||(n===`spring`||ta(n))&&r}function da(e){e.duration=0,e.type=`keyframes`}var fa=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),pa=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ma(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&pa.test(e[t]))return!0;return!1}var ha=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ga=bt(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function _a(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(fa.has(n)||ha.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ga()&&(fa.has(n)||ha.has(n)&&ma(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var va=40,ya=class extends ei{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=an.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Wi;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=an.now();let u=!0;ua(e,i,a,o)||(u=!1,(gt.instantAnimations||!s)&&l?.(Jr(e,n,t)),e[0]=e[e.length-1],da(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>va?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&_a(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new sa(n)}catch{m=new ni(n)}}else m=new ni(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hi()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function ba(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var xa=30,Sa=e=>!isNaN(parseFloat(e)),Ca={current:void 0},wa=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=an.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=an.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new wt)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new wt,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){I.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ca.current&&Ca.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=an.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xa)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,xa);return Dt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ta(e,t){return new wa(e,t)}function Ea(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Da(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Ea(n,e)}var Oa={type:`spring`,stiffness:500,damping:25,restSpeed:10},ka=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Aa={type:`keyframes`,duration:.8},ja={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ma=(e,{keyframes:t})=>t.length>2?Aa:Oi.has(e)?e.startsWith(`scale`)?ka(t[1]):Oa:ja,Na=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Pa(e){for(let t in e)if(!Na.has(t))return!0;return!1}var Fa=(e,t,n,r={},i,a)=>o=>{let s=Da(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Tt(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Pa(s)||Object.assign(u,Ma(e,u)),u.duration&&=Tt(u.duration),u.repeatDelay&&=Tt(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(da(u),u.delay===0&&(d=!0)),(gt.instantAnimations||gt.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,da(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Jr(u.keyframes,s);if(e!==void 0){I.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new ni(u):new ya(u)},Ia=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function La(e){let t=Ia.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ra(e,t,n=1){`${e}`;let[r,i]=La(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return _t(e)?parseFloat(e):e}return un(i)?Ra(i,t,n+1):i}function za(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ba(e,t,n,r){if(typeof t==`function`){let[i,a]=za(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=za(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Va(e,t,n){let r=e.getProps();return Ba(r,t,n===void 0?r.custom:n,e)}var Ha=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Di]),Ua=e=>Array.isArray(e);function Wa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ta(n))}function Ga(e){return Ua(e)?e[e.length-1]||0:e}function Ka(e,t){let{transitionEnd:n={},transition:r={},...i}=Va(e,t)||{};i={...i,...n};for(let t in i)Wa(e,t,Ga(i[t]))}var qa=e=>!!(e&&e.getVelocity);function Ja(e){return!!(qa(e)&&e.add)}function Ya(e,t){let n=e.getValue(`willChange`);if(Ja(n))return n.add(t);if(!n&>.WillChange){let n=new gt.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Xa(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Za=`data-`+Xa(`framerAppearId`);function Qa(e){return e.props[Za]}var $a=typeof window<`u`;function eo({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function to(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Ea(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&eo(f,t))continue;let o={delay:n,...Da(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){I.update(()=>r.set(i));continue}let p=!1;if($a&&window.MotionHandoffAnimation){let n=Qa(e);if(n){let e=window.MotionHandoffAnimation(n,t,I);e!==null&&(o.startTime=e,p=!0)}}Ya(e,t);let m=l??e.shouldReduceMotion;r.start(Fa(t,r,i,m&&Ha.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>I.update(()=>{o&&Ka(e,o)});d.length?Promise.all(d).then(t):t()}return d}function no(e,t,n={}){let r=Va(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(to(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return ro(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function ro(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(no(c,t,{...o,delay:n+(typeof r==`function`?0:r)+ba(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function io(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>no(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=no(e,t,n);else{let i=typeof t==`function`?Va(e,t,n.custom):t;r=Promise.all(to(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var ao={test:e=>e===`auto`,parse:e=>e},oo=e=>t=>t.test(e),so=[pn,L,On,Dn,An,kn,ao],co=e=>so.find(oo(e));function lo(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||yt(e)}var uo=new Set([`auto`,`none`,`0`]);function fo(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!uo.has(t)&&Wn(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=pi(n,i))}var po=class extends Wi{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),un(r))){let i=Ra(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ha.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=co(r),o=co(i);if(fn(r)!==fn(i)&&Fi[n]){this.needsMeasurement=!0;return}if(a!==o){if(ki(a)&&ki(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Fi[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||lo(e[t]))&&n.push(t);n.length&&fo(e,n,t)}measure(){let{element:e,name:t}=this;return Fi[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},mo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function ho(e){return vt(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function go(e){return vt(e)&&`ownerSVGElement`in e}var _o=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function vo(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var yo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},bo=Di.length;function xo(e,t,n){let r=``,i=!0;for(let a=0;a<bo;a++){let o=Di[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=_o(s,li[o]);if(!c){i=!1;let t=yo[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${_o(a,li.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function So(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Oi.has(e)){o=!0;continue}if(cn(e)){i[e]=n;continue}{let t=_o(n,li[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=xo(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Co={offset:`stroke-dashoffset`,array:`stroke-dasharray`},wo={offset:`strokeDashoffset`,array:`strokeDasharray`};function To(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Co:wo;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Eo=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Do(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(So(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Eo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&To(d,i,a,o,!1)}function Oo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ko({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ao(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function jo(e){return e===void 0||e===1}function Mo({scale:e,scaleX:t,scaleY:n}){return!jo(e)||!jo(t)||!jo(n)}function No(e){return Mo(e)||Po(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Po(e){return Fo(e.x)||Fo(e.y)}function Fo(e){return e&&e!==`0%`}function Io(e,t,n){return n+t*(e-n)}function Lo(e,t,n,r,i){return i!==void 0&&(e=Io(e,i,r)),Io(e,n,r)+t}function Ro(e,t=0,n=1,r,i){e.min=Lo(e.min,t,n,r,i),e.max=Lo(e.max,t,n,r,i)}function zo(e,{x:t,y:n}){Ro(e.x,t.translate,t.scale,t.originPoint),Ro(e.y,n.translate,n.scale,n.originPoint)}var Bo=.999999999999,Vo=1.0000000000001;function Ho(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Uo(e.x,-a.scroll.offset.x),Uo(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,zo(e,o)),r&&No(a.latestValues)&&B(e,a.latestValues,a.layout?.layoutBox))}t.x<Vo&&t.x>Bo&&(t.x=1),t.y<Vo&&t.y>Bo&&(t.y=1)}function Uo(e,t){e.min+=t,e.max+=t}function Wo(e,t,n,r,i=.5){Ro(e,t,n,nr(e.min,e.max,i),r)}function z(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function B(e,t,n){let r=n??e;Wo(e.x,z(t.x,r.x),t.scaleX,t.scale,t.originX),Wo(e.y,z(t.y,r.y),t.scaleY,t.scale,t.originY)}function Go(e,t){return Oo(Ao(e.getBoundingClientRect(),t))}function Ko(e,t,n){let r=Go(e,n),{scroll:i}=t;return i&&(Uo(r.x,i.offset.x),Uo(r.y,i.offset.y)),r}var{schedule:qo,cancel:Jo}=Qt(queueMicrotask,!1),Yo={x:!1,y:!1};function Xo(){return Yo.x||Yo.y}function Zo(e){return e===`x`||e===`y`?Yo[e]?null:(Yo[e]=!0,()=>{Yo[e]=!1}):Yo.x||Yo.y?null:(Yo.x=Yo.y=!0,()=>{Yo.x=Yo.y=!1})}function Qo(e,t){let n=vo(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function $o(e){return!(e.pointerType===`touch`||Xo())}function es(e,t,n={}){let[r,i,a]=Qo(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!$o(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ts=(e,t)=>t?e===t||ts(e,t.parentElement):!1,ns=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,rs=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function is(e){return rs.has(e.tagName)||e.isContentEditable===!0}var as=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function os(e){return as.has(e.tagName)||e.isContentEditable===!0}var ss=new WeakSet;function cs(e){return t=>{t.key===`Enter`&&e(t)}}function ls(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var us=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=cs(()=>{if(ss.has(n))return;ls(n,`down`);let e=cs(()=>{ls(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ls(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function ds(e){return ns(e)&&!Xo()}var fs=new WeakSet;function ps(e,t,n={}){let[r,i,a]=Qo(e,n),o=e=>{let r=e.currentTarget;if(!ds(e)||fs.has(e))return;ss.add(r),n.stopPropagation&&fs.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),ss.has(r)&&ss.delete(r),ds(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||ts(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),ho(e)&&(e.addEventListener(`focus`,e=>us(e,i)),!is(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ms=new WeakMap,hs,gs=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:go(r)&&`getBBox`in r?r.getBBox()[t]:r[n],_s=gs(`inline`,`width`,`offsetWidth`),vs=gs(`block`,`height`,`offsetHeight`);function ys({target:e,borderBoxSize:t}){ms.get(e)?.forEach(n=>{n(e,{get width(){return _s(e,t)},get height(){return vs(e,t)}})})}function bs(e){e.forEach(ys)}function xs(){typeof ResizeObserver<`u`&&(hs=new ResizeObserver(bs))}function Ss(e,t){hs||xs();let n=vo(e);return n.forEach(e=>{let n=ms.get(e);n||(n=new Set,ms.set(e,n)),n.add(t),hs?.observe(e)}),()=>{n.forEach(e=>{let n=ms.get(e);n?.delete(t),n?.size||hs?.unobserve(e)})}}var Cs=new Set,ws;function Ts(){ws=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Cs.forEach(t=>t(e))},window.addEventListener(`resize`,ws)}function Es(e){return Cs.add(e),ws||Ts(),()=>{Cs.delete(e),!Cs.size&&typeof ws==`function`&&(window.removeEventListener(`resize`,ws),ws=void 0)}}function Ds(e,t){return typeof e==`function`?Es(e):Ss(e,t)}var Os={value:null,addProjectionMetrics:null};function ks(e){return go(e)&&e.tagName===`svg`}var As=()=>({translate:0,scale:1,origin:0,originPoint:0}),js=()=>({x:As(),y:As()}),Ms=()=>({min:0,max:0}),Ns=()=>({x:Ms(),y:Ms()}),Ps=new WeakMap;function Fs(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Is(e){return typeof e==`string`||Array.isArray(e)}var Ls=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Rs=[`initial`,...Ls];function zs(e){if(Fs(e.animate))return!0;for(let t=0;t<Rs.length;t++)if(Is(e[Rs[t]]))return!0;return!1}function Bs(e){return!!(zs(e)||e.variants)}function Vs(e,t,n){for(let r in t){let i=t[r],a=n[r];if(qa(i))e.addValue(r,i);else if(qa(a))e.addValue(r,Ta(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ta(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Hs={current:null},Us={current:!1},Ws=typeof window<`u`;function Gs(){if(Us.current=!0,Ws){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Hs.current=e.matches;e.addEventListener(`change`,t),t()}else Hs.current=!1}}var Ks=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],qs={};function Js(e){qs=e}function Ys(){return qs}var Xs=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Wi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=an.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,I.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=zs(t),this.isVariantNode=Bs(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&qa(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Ps.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Us.current||Gs(),this.shouldReduceMotion=Hs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$t(this.notifyUpdate),$t(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&fa.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new ra({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Tt(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Oi.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&I.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in qs){let t=qs[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ns()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Ks.length;t++){let n=Ks[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Vs(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ta(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(_t(n)||yt(n))?n=parseFloat(n):typeof n!=`number`&&!Qn.test(n)&&Qn.test(t)&&(n=pi(e,t)),this.setBaseTarget(e,qa(n)?n.get():n)),qa(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ba(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!qa(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new wt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){qo.render(this.render)}},Zs=class extends Xs{constructor(){super(...arguments),this.KeyframeResolver=po}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;qa(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Qs=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function $s(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function ec(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var tc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(L.test(e))e=parseFloat(e);else return e}return`${ec(e,t.target.x)}% ${ec(e,t.target.y)}%`}},nc={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Qn.parse(e);if(i.length>5)return r;let a=Qn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=nr(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},rc={borderRadius:{...tc,applyTo:[...mo]},borderTopLeftRadius:tc,borderTopRightRadius:tc,borderBottomLeftRadius:tc,borderBottomRightRadius:tc,boxShadow:nc};function ic(e,{layout:t,layoutId:n}){return Oi.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!rc[e]||e===`opacity`)}function ac(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(qa(r[t])||i&&qa(i[t])||ic(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function oc(e){return window.getComputedStyle(e)}var sc=class extends Zs{constructor(){super(...arguments),this.type=`html`,this.renderInstance=$s}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Oi.has(t))return this.projection?.isProjecting?Ci(t):Ti(e,t);{let n=oc(e),r=(cn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Go(e,t)}build(e,t,n){So(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ac(e,t,n)}},cc=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),lc=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function uc(e,t,n,r){$s(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(cc.has(n)?n:Xa(n),t.attrs[n])}function dc(e,t,n){let r=ac(e,t,n);for(let n in e)if(qa(e[n])||qa(t[n])){let t=Di.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var fc=class extends Zs{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Ns}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Oi.has(t)){let e=di(t);return e&&e.default||0}if(Eo.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=cc.has(t)?t:Xa(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return dc(e,t,n)}build(e,t,n){Do(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){uc(e,t,n,r)}mount(e){this.isSVGTag=lc(e.tagName),super.mount(e)}},pc=Rs.length;function mc(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&mc(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<pc;n++){let r=Rs[n],i=e.props[r];(Is(i)||i===!1)&&(t[r]=i)}return t}function hc(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var gc=[...Ls].reverse(),_c=Ls.length;function vc(e){return t=>Promise.all(t.map(({animation:t,options:n})=>io(e,t,n)))}function yc(e){let t=vc(e),n=Sc(),r=!0,i=!1,a=t=>(n,r)=>{let i=Va(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=mc(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<_c;t++){let p=gc[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Is(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Fs(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=bc(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ua(t)&&Ua(n)?!hc(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Va(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=ba(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Va(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Sc(),i=!0}}}function bc(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!hc(t,e):!1}function xc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sc(){return{animate:xc(!0),whileInView:xc(),whileHover:xc(),whileTap:xc(),whileDrag:xc(),whileFocus:xc(),exit:xc()}}function Cc(e,t){e.min=t.min,e.max=t.max}function wc(e,t){Cc(e.x,t.x),Cc(e.y,t.y)}function Tc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ec=.9999,Dc=1.0001,Oc=-.01,kc=.01;function Ac(e){return e.max-e.min}function jc(e,t,n){return Math.abs(e-t)<=n}function Mc(e,t,n,r=.5){e.origin=r,e.originPoint=nr(t.min,t.max,e.origin),e.scale=Ac(n)/Ac(t),e.translate=nr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ec&&e.scale<=Dc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Oc&&e.translate<=kc||isNaN(e.translate))&&(e.translate=0)}function Nc(e,t,n,r){Mc(e.x,t.x,n.x,r?r.originX:void 0),Mc(e.y,t.y,n.y,r?r.originY:void 0)}function Pc(e,t,n,r=0){e.min=(r?nr(n.min,n.max,r):n.min)+t.min,e.max=e.min+Ac(t)}function Fc(e,t,n,r){Pc(e.x,t.x,n.x,r?.x),Pc(e.y,t.y,n.y,r?.y)}function Ic(e,t,n,r=0){let i=r?nr(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Ac(t)}function Lc(e,t,n,r){Ic(e.x,t.x,n.x,r?.x),Ic(e.y,t.y,n.y,r?.y)}function Rc(e,t,n,r,i){return e-=t,e=Io(e,1/n,r),i!==void 0&&(e=Io(e,1/i,r)),e}function zc(e,t=0,n=1,r=.5,i,a=e,o=e){if(On.test(t)&&(t=parseFloat(t),t=nr(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=nr(a.min,a.max,r);e===a&&(s-=t),e.min=Rc(e.min,t,n,s,i),e.max=Rc(e.max,t,n,s,i)}function Bc(e,t,[n,r,i],a,o){zc(e,t[n],t[r],t[i],t.scale,a,o)}var Vc=[`x`,`scaleX`,`originX`],Hc=[`y`,`scaleY`,`originY`];function Uc(e,t,n,r){Bc(e.x,t,Vc,n?n.x:void 0,r?r.x:void 0),Bc(e.y,t,Hc,n?n.y:void 0,r?r.y:void 0)}function Wc(e){return e.translate===0&&e.scale===1}function Gc(e){return Wc(e.x)&&Wc(e.y)}function Kc(e,t){return e.min===t.min&&e.max===t.max}function qc(e,t){return Kc(e.x,t.x)&&Kc(e.y,t.y)}function Jc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yc(e,t){return Jc(e.x,t.x)&&Jc(e.y,t.y)}function Xc(e){return Ac(e.x)/Ac(e.y)}function Zc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qc(e){return[e(`x`),e(`y`)]}function $c(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var el=mo.length,tl=e=>typeof e==`string`?parseFloat(e):e,nl=e=>typeof e==`number`||L.test(e);function rl(e,t,n,r,i,a){i?(e.opacity=nr(0,n.opacity??1,al(r)),e.opacityExit=nr(t.opacity??1,0,ol(r))):a&&(e.opacity=nr(t.opacity??1,n.opacity??1,r));for(let i=0;i<el;i++){let a=mo[i],o=il(t,a),s=il(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||nl(o)===nl(s)?(e[a]=Math.max(nr(tl(o),tl(s),r),0),(On.test(s)||On.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=nr(t.rotate||0,n.rotate||0,r))}function il(e,t){return e[t]===void 0?e.borderRadius:e[t]}var al=sl(0,.5,Bt),ol=sl(.5,.95,xt);function sl(e,t,n){return r=>r<e?0:r>t?1:n(Ct(e,t,r))}function cl(e,t,n){let r=qa(e)?e:Ta(e);return r.start(Fa(``,r,t,n)),r.animation}function ll(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var ul=(e,t)=>e.depth-t.depth,dl=class{constructor(){this.children=[],this.isDirty=!1}add(e){pt(this.children,e),this.isDirty=!0}remove(e){mt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ul),this.isDirty=!1,this.children.forEach(e)}};function fl(e,t){let n=an.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&($t(r),e(a-t))};return I.setup(r,!0),()=>$t(r)}function pl(e){return qa(e)?e.get():e}var ml=class{constructor(){this.members=[]}add(e){pt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(mt(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(mt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},hl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},gl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},_l=[``,`X`,`Y`,`Z`],vl=1e3,yl=0;function bl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function xl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Qa(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,I,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&xl(r)}function Sl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=yl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Os.value&&(gl.nodes=gl.calculatedTargetDeltas=gl.calculatedProjections=0),this.nodes.forEach(Tl),this.nodes.forEach(Pl),this.nodes.forEach(Fl),this.nodes.forEach(El),Os.addProjectionMetrics&&Os.addProjectionMetrics(gl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new dl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=go(t)&&!ks(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;I.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=fl(i,250),hl.hasAnimatedSinceResize&&(hl.hasAnimatedSinceResize=!1,this.nodes.forEach(Nl)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Hl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Yc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Da(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Nl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$t(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Il),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(kl),this.nodes.forEach(Ol);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Al);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jl),this.nodes.forEach(Ml),this.nodes.forEach(Cl),this.nodes.forEach(wl)):this.nodes.forEach(Al),this.clearAllSnapshots();let e=an.now();en.delta=ht(0,1e3/60,e-en.timestamp),en.timestamp=e,en.isProcessing=!0,tn.update.process(en),tn.preRender.process(en),tn.render.process(en),en.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Dl),this.sharedNodes.forEach(Ll)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Ac(this.snapshot.measuredBox.x)&&!Ac(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Ns(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Gc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||No(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Kl(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Ns();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Jl))){let{scroll:e}=this.root;e&&(Uo(t.x,e.offset.x),Uo(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Ns();if(wc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&wc(t,e),Uo(t.x,i.offset.x),Uo(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Ns();wc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Uo(r.x,-n.scroll.offset.x),Uo(r.y,-n.scroll.offset.y)),No(n.latestValues)&&B(r,n.latestValues,n.layout?.layoutBox)}return No(this.latestValues)&&B(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Ns();wc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!No(n.latestValues))continue;let r;n.instance&&(Mo(n.latestValues)&&n.updateSnapshot(),r=Ns(),wc(r,n.measurePageBox())),Uc(t,n.latestValues,n.snapshot?.layoutBox,r)}return No(this.latestValues)&&Uc(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==en.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=en.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Ns(),this.targetWithTransforms=Ns()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):wc(this.target,this.layout.layoutBox),zo(this.target,this.targetDelta)):wc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Os.value&&gl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Mo(this.parent.latestValues)||Po(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ns(),this.relativeTargetOrigin=Ns(),Lc(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),wc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===en.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;wc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ho(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Ns());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tc(this.prevProjectionDelta.x,this.projectionDelta.x),Tc(this.prevProjectionDelta.y,this.projectionDelta.y)),Nc(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Zc(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Os.value&&gl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=js(),this.projectionDelta=js(),this.projectionDeltaWithTransform=js()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=js();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Ns(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Vl));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=nr(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=nr(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Rl(o.x,e.x,n),Rl(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Bl(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&qc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Ns(),wc(f,this.relativeTarget)),c&&(this.animationValues=a,rl(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=($t(this.pendingAnimation),void 0),this.pendingAnimation=I.update(()=>{hl.hasAnimatedSinceResize=!0,this.motionValue||=Ta(0),this.motionValue.jump(0,!1),this.currentAnimation=cl(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),$r(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&ql(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Ns();let t=Ac(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Ac(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}wc(t,i),B(t,r),Nc(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ml),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&bl(`z`,e,r,this.animationValues);for(let t=0;t<_l.length;t++)bl(`rotate${_l[t]}`,e,r,this.animationValues),bl(`skew${_l[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=pl(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=pl(t?.pointerEvents)||``),this.hasProjected&&!No(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$c(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in rc){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=rc[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?pl(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ol),this.root.sharedNodes.clear()}}}function Cl(e){e.updateLayout()}function wl(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Qc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Ac(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Cc(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ql(i,t.layoutBox,n)&&Qc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Ac(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=js();Nc(o,n,t.layoutBox);let s=js();a?Nc(s,e.applyTransform(r,!0),t.measuredBox):Nc(s,n,t.layoutBox);let c=!Gc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Ns();Lc(s,t.layoutBox,i.layoutBox,o);let c=Ns();Lc(c,n,a.layoutBox,o),Yc(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Tl(e){Os.value&&gl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function El(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Dl(e){e.clearSnapshot()}function Ol(e){e.clearMeasurements()}function kl(e){e.isLayoutDirty=!0,e.updateLayout()}function Al(e){e.isLayoutDirty=!1}function jl(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ml(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Nl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Pl(e){e.resolveTargetDelta()}function Fl(e){e.calcProjection()}function Il(e){e.resetSkewAndRotation()}function Ll(e){e.removeLeadSnapshot()}function Rl(e,t,n){e.translate=nr(t.translate,0,n),e.scale=nr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zl(e,t,n,r){e.min=nr(t.min,n.min,r),e.max=nr(t.max,n.max,r)}function Bl(e,t,n,r){zl(e.x,t.x,n.x,r),zl(e.y,t.y,n.y,r)}function Vl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Hl={duration:.45,ease:[.4,0,.1,1]},Ul=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Wl=Ul(`applewebkit/`)&&!Ul(`chrome/`)?Math.round:xt;function Gl(e){e.min=Wl(e.min),e.max=Wl(e.max)}function Kl(e){Gl(e.x),Gl(e.y)}function ql(e,t,n){return e===`position`||e===`preserve-aspect`&&!jc(Xc(t),Xc(n),.2)}function Jl(e){return e!==e.root&&e.scroll?.wasRoot}var Yl=Sl({attachResizeListener:(e,t)=>ll(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Xl={current:void 0},Zl=Sl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){let e=new Yl({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ql=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function $l(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function eu(...e){return t=>{let n=!1,r=e.map(e=>{let r=$l(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():$l(e[t],null)}}}}function tu(...e){return m.useCallback(eu(...e),e)}var nu=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(ho(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=ho(e)&&e.offsetWidth||0,r=ho(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function ru({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(Ql),u=tu(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
10
|
+
[data-motion-pop-id="${o}"] {
|
|
11
|
+
position: absolute !important;
|
|
12
|
+
width: ${e}px !important;
|
|
13
|
+
height: ${u}px !important;
|
|
14
|
+
${_}px !important;
|
|
15
|
+
${v}px !important;
|
|
16
|
+
}
|
|
17
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,h.jsx)(nu,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var iu=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=ut(au),d=(0,m.useId)(),f=(0,m.useRef)(n),p=(0,m.useRef)(r);dt(()=>{f.current=n,p.current=r});let g=!0,_=(0,m.useMemo)(()=>(g=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&g&&(_={..._}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,h.jsx)(ru,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,h.jsx)(ft.Provider,{value:_,children:e})};function au(){return new Map}function ou(e=!0){let t=(0,m.useContext)(ft);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,m.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var su=e=>e.key||``;function cu(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var V=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=ou(o),f=(0,m.useMemo)(()=>cu(e),[e]),p=o&&!u?[]:f.map(su),g=(0,m.useRef)(!0),_=(0,m.useRef)(f),v=ut(()=>new Map),y=(0,m.useRef)(new Set),[b,x]=(0,m.useState)(f),[S,C]=(0,m.useState)(f);dt(()=>{o&&!u&&!S.length&&d?.()},[u,o,S.length,d]),dt(()=>{g.current=!1,_.current=f;for(let e=0;e<S.length;e++){let t=su(S[e]);p.includes(t)?(v.delete(t),y.current.delete(t)):v.get(t)!==!0&&v.set(t,!1)}},[S,p.length,p.join(`-`)]);let w=[];if(f!==b){let e=[...f],t=0;for(let n of S){let r=p.indexOf(su(n));r===-1?(e.splice(t++,0,n),w.push(n)):t=r+w.length+1}return a===`wait`&&w.length&&(e=w),C(cu(e)),x(f),null}let{forceRender:T}=(0,m.useContext)(lt);return(0,h.jsx)(h.Fragment,{children:S.map(e=>{let m=su(e),b=o&&!u?!1:f===S||p.includes(m);return(0,h.jsx)(iu,{isPresent:b,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(y.current.has(m))return;if(v.has(m))y.current.add(m),v.set(m,!0);else return;let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(T?.(),C(_.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},m)})})},lu=(0,m.createContext)({strict:!1}),uu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},du=!1;function fu(){if(du)return;let e={};for(let t in uu)e[t]={isEnabled:e=>uu[t].some(t=>!!e[t])};Js(e),du=!0}function pu(){return fu(),Ys()}function mu(e){let t=pu();for(let n in e)t[n]={...t[n],...e[n]};Js(t)}function hu({children:e,...t}){let n=(0,m.useContext)(Ql);t={...n,...t},t.transition=Ea(t.transition,n.transition),t.isStatic=ut(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,h.jsx)(Ql.Provider,{value:r,children:e})}var gu=(0,m.createContext)({});function _u(e,t){if(zs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Is(t)?t:void 0,animate:Is(n)?n:void 0}}return e.inherit===!1?{}:t}function vu(e){let{initial:t,animate:n}=_u(e,(0,m.useContext)(gu));return(0,m.useMemo)(()=>({initial:t,animate:n}),[yu(t),yu(n)])}function yu(e){return Array.isArray(e)?e.join(` `):e}var bu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xu(e,t,n){for(let r in t)!qa(t[r])&&!ic(r,n)&&(e[r]=t[r])}function Su({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=bu();return So(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Cu(e,t){let n=e.style||{},r={};return xu(r,n,e),Object.assign(r,Su(e,t)),r}function wu(e,t){let n={},r=Cu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Tu=()=>({...bu(),attrs:{}});function Eu(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=Tu();return Do(n,t,lc(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};xu(t,e.style,e),i.style={...t,...i.style}}return i}var Du=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Ou(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Du.has(e)}function ku(e,t){return e.startsWith(`on`)?!Ou(e):t?.(e)??!Ou(e)}function Au(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(qa(e[a])||(ku(a,r)||n===!0&&Ou(a)||!t&&!Ou(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var ju=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Mu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(ju.indexOf(e)>-1||/[A-Z]/u.test(e))}function Nu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Mu(e)?Eu:wu)(t,r,i,e),l=Au(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>qa(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function Pu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Fu(n,r,i,e),renderState:t()}}function Fu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=pl(a[e]);let{initial:o,animate:s}=e,c=zs(e),l=Bs(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Fs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ba(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Iu=e=>(t,n)=>{let r=(0,m.useContext)(gu),i=(0,m.useContext)(ft),a=()=>Pu(e,t,r,i);return n?a():ut(a)},Lu=Iu({scrapeMotionValuesFromProps:ac,createRenderState:bu}),Ru=Iu({scrapeMotionValuesFromProps:dc,createRenderState:Tu}),zu=Symbol.for(`motionComponentSymbol`);function Bu(e,t,n){let r=(0,m.useRef)(n);(0,m.useInsertionEffect)(()=>{r.current=n});let i=(0,m.useRef)(null);return(0,m.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Vu=(0,m.createContext)({});function Hu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Uu(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(gu),s=(0,m.useContext)(lu),c=(0,m.useContext)(ft),l=(0,m.useContext)(Ql),u=l.reducedMotion,d=l.skipAnimations,f=(0,m.useRef)(null),p=(0,m.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,m.useContext)(Vu);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&Wu(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[Za],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return dt(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),dt(()=>{p.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Wu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Gu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Hu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Gu(e){if(e)return e.options.allowProjection===!1?Gu(e.parent):e.projection}function Ku(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&mu(r);let a=n?n===`svg`:Mu(e),o=a?Ru:Lu;function s(n,s){let c,l={...(0,m.useContext)(Ql),...n,layoutId:qu(n)},{isStatic:u,isValidProp:d}=l,f=vu(n),p=o(n,u);if(!u&&typeof window<`u`){Ju(l,r);let t=Yu(l);c=t.MeasureLayout,f.visualElement=Uu(e,p,l,i,t.ProjectionNode,a)}return(0,h.jsxs)(gu.Provider,{value:f,children:[c&&f.visualElement?(0,h.jsx)(c,{visualElement:f.visualElement,...l}):null,Nu(e,n,Bu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[zu]=e,c}function qu({layoutId:e}){let t=(0,m.useContext)(lt).id;return t&&e!==void 0?t+`-`+e:e}function Ju(e,t){(0,m.useContext)(lu).strict}function Yu(e){let{drag:t,layout:n}=pu();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Xu(e,t){if(typeof Proxy>`u`)return Ku;let n=new Map,r=(n,r)=>Ku(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ku(a,void 0,e,t)),n.get(a))})}var Zu=(e,t)=>t.isSVG??Mu(e)?new fc(t):new sc(t,{allowProjection:e!==m.Fragment}),Qu=class extends Qs{constructor(e){super(e),e.animationState||=yc(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Fs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},$u=0,ed={animation:{Feature:Qu},exit:{Feature:class extends Qs{constructor(){super(...arguments),this.id=$u++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=Va(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.blockInitialAnimation=!1,this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1,this.exitAnimation=void 0;return}let r=this.exitAnimation=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.exitAnimation===r&&(this.isExitComplete=!0,t(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function td(e){return{point:{x:e.pageX,y:e.pageY}}}var nd=e=>t=>ns(t)&&e(t,td(t));function rd(e,t,n,r){return ll(e,t,nd(n),r)}var H=({current:e})=>e?e.ownerDocument.defaultView:null,id=(e,t)=>Math.abs(e-t);function U(e,t){let n=id(e.x,t.x),r=id(e.y,t.y);return Math.sqrt(n**2+r**2)}var W=new Set([`auto`,`scroll`]),G=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ad(this.lastRawMoveEventInfo,this.transformPagePoint));let e=sd(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=U(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:an.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ad(t,this.transformPagePoint),this.hasPendingMove=!0,I.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=sd(e.type===`pointercancel`?this.lastMoveEventInfo:ad(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ns(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=ad(td(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=en;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,sd(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=St(rd(this.contextWindow,`pointermove`,this.handlePointerMove,d),rd(this.contextWindow,`pointerup`,this.handlePointerUp,d),rd(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(W.has(e.overflowX)||W.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),$t(this.updatePoint)}};function ad(e,t){return t?{point:t(e.point)}:e}function od(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sd({point:e},t){return{point:e,delta:od(e,ld(t)),offset:od(e,cd(t)),velocity:ud(t,.1)}}function cd(e){return e[0]}function ld(e){return e[e.length-1]}function ud(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=ld(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Tt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Tt(t)*2&&(r=e[1]);let a=Et(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function dd(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?nr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?nr(n,e,r.max):Math.min(e,n)),e}function fd(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function pd(e,{top:t,left:n,bottom:r,right:i}){return{x:fd(e.x,n,i),y:fd(e.y,t,r)}}function md(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hd(e,t){return{x:md(e.x,t.x),y:md(e.y,t.y)}}function gd(e,t){let n=.5,r=Ac(e),i=Ac(t);return i>r?n=Ct(t.min,t.max-r,e.min):r>i&&(n=Ct(e.min,e.max-i,t.min)),ht(0,1,n)}function _d(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var vd=.35;function yd(e=vd){return e===!1?e=0:e===!0&&(e=vd),{x:bd(e,`left`,`right`),y:bd(e,`top`,`bottom`)}}function bd(e,t,n){return{min:xd(e,t),max:xd(e,n)}}function xd(e,t){return typeof e==`number`?e:e[t]||0}var Sd=new WeakMap,Cd=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ns(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zo(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(On.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Ac(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&I.update(()=>i(e,t),!1,!0),Ya(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Dd(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&I.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new G(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:H(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Ed(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=dd(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Hu(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?pd(n.layoutBox,e):!1,this.elastic=yd(t),r!==this.constraints&&!Hu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Qc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=_d(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Hu(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Ko(n,r.root,this.visualElement.getTransformPagePoint()),a=hd(r.layout.layoutBox,i);if(t){let e=t(ko(a));this.hasMutatedConstraints=!!e,e&&(a=Oo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Qc(o=>{if(!Ed(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ya(this.visualElement,e),n.start(Fa(e,n,0,t,this.visualElement,!1))}stopAnimation(){Qc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Qc(e=>{if(!Ed(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-nr(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Hu(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Qc(e=>{let t=this.getAxisMotionValue(e).get();i[e]=gd({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qc(t=>{let n=this.getAxisMotionValue(t);if(!Ed(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(nr(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Sd.set(this.visualElement,this);let e=this.visualElement.current,t=rd(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&os(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Hu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Td(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),I.read(r);let o=ll(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Qc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=vd,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function wd(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Td(e,t,n){let r=Ds(e,wd(n)),i=Ds(t,wd(n));return()=>{r(),i()}}function Ed(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Dd(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Od=class extends Qs{constructor(e){super(e),this.removeGroupControls=xt,this.removeListeners=xt,this.controls=new Cd(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xt}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},kd=e=>(t,n)=>{e&&I.update(()=>e(t,n),!1,!0)},Ad=class extends Qs{constructor(){super(...arguments),this.removePointerDownListener=xt}onPointerDown(e){this.session=new G(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:H(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:kd(e),onStart:kd(t),onMove:kd(n),onEnd:(e,t)=>{delete this.session,r&&I.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=rd(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},jd=!1,Md=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),jd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),hl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),jd=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||I.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),qo.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;jd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Nd(e){let[t,n]=ou(),r=(0,m.useContext)(lt);return(0,h.jsx)(Md,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(Vu),isPresent:t,safeToRemove:n})}var Pd={pan:{Feature:Ad},drag:{Feature:Od,ProjectionNode:Zl,MeasureLayout:Nd}};function Fd(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&I.postRender(()=>i(t,td(t)))}var Id=class extends Qs{mount(){let{current:e}=this.node;e&&(this.unmount=es(e,(e,t)=>(Fd(this.node,t,`Start`),e=>Fd(this.node,e,`End`))))}unmount(){}},Ld=class extends Qs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=St(ll(this.node.current,`focus`,()=>this.onFocus()),ll(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Rd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&I.postRender(()=>i(t,td(t)))}var zd=class extends Qs{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ps(e,(e,t)=>(Rd(this.node,t,`Start`),(e,{success:t})=>Rd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Bd=new WeakMap,Vd=new WeakMap,Hd=e=>{let t=Bd.get(e.target);t&&t(e)},Ud=e=>{e.forEach(Hd)};function Wd({root:e,...t}){let n=e||document;Vd.has(n)||Vd.set(n,{});let r=Vd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ud,{root:e,...t})),r[i]}function Gd(e,t,n){let r=Wd(t);return Bd.set(e,n),r.observe(e),()=>{Bd.delete(e),r.unobserve(e)}}var Kd={some:0,all:1},qd=class extends Qs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Kd[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Gd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Jd(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Jd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Yd={inView:{Feature:qd},tap:{Feature:zd},focus:{Feature:Ld},hover:{Feature:Id}},Xd={layout:{ProjectionNode:Zl,MeasureLayout:Nd}},Zd=Xu({...ed,...Yd,...Pd,...Xd},Zu),Qd=ct(),$d=Zd;function ef(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var tf=o((e=>{var t=d();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 u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),nf=o(((e,t)=>{t.exports=tf()}))(),rf=m.useInsertionEffect,af=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?m.useLayoutEffect:m.useEffect,of=rf||af,sf=e=>{let t=m.useRef([e,(...e)=>t[0](...e)]).current;return of(()=>{t[0]=e}),t[1]},cf=[`popstate`,`pushState`,`replaceState`,`hashchange`],lf=[],uf=()=>lf.forEach(e=>e()),df=e=>(lf.push(e)===1&&cf.forEach(e=>addEventListener(e,uf)),()=>{lf=lf.filter(t=>t!==e),lf.length||cf.forEach(e=>removeEventListener(e,uf))}),ff=(e,t)=>(0,nf.useSyncExternalStore)(df,e,t),pf=()=>location.search,mf=({ssrSearch:e}={})=>ff(pf,e==null?pf:()=>e),hf=()=>location.pathname,gf=({ssrPath:e}={})=>ff(hf,e==null?hf:()=>e),_f=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),vf=e=>[gf(e),_f],K=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[K]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,K,{value:!0})}var yf=(e=``)=>e===`/`?``:e,bf=(e,t)=>e[0]===`~`?e.slice(1):yf(t)+e,xf=(e,t)=>(e=Sf(yf(e)),t=Sf(t),!e||!t.toLowerCase().indexOf(e.toLowerCase())?t.slice(e.length)||`/`:`~`+t),Sf=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},Cf={hook:vf,searchHook:mf,parser:ef,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},wf=(0,m.createContext)(Cf),Tf=()=>(0,m.useContext)(wf),Ef={},Df=(0,m.createContext)(Ef),Of=()=>(0,m.useContext)(Df),kf=(e,t=e.base)=>xf(t,e.hook(e)[0]),Af=e=>{let[t,n]=e.hook(e);return[xf(e.base,t),sf((t,r)=>e.aroundNav(n,bf(t,e.base),r))]},jf=()=>Af(Tf()),Mf=(e,t,n,r)=>{let{pattern:i,keys:a}=t instanceof RegExp?{pattern:t}:e(t||`*`,r),o=i.exec(n);if(!o)return[!1,null];let s={};for(let e=1;e<o.length;e++)s[e-1]=o[e];if(a)for(let e=0;e<a.length;e++)s[a[e]]=o[e+1];else Object.assign(s,o.groups);return r?[!0,s,o[0]]:[!0,s]},Nf=({children:e,...t})=>{let n=Tf(),r=t.hook?Cf:n,i=r;if(t.ssrPath){let[e,n=t.ssrSearch??``]=t.ssrPath.split(`?`);e&&(t.ssrSearch=n,t.ssrPath=e)}t.hrefs=t.hrefs??t.hook?.hrefs,t.searchHook=t.searchHook??t.hook?.searchHook;let a=(0,m.useRef)(r),o=a.current,s=o;for(let e in r){let n=e===`base`?r[e]+(t[e]??``):t[e]??r[e];n!==s[e]&&(o===s&&(a.current=s={...s}),s[e]=n),(n!==r[e]||n!==i[e])&&(i=s)}return(0,m.createElement)(wf.Provider,{value:i},e)},Pf=({children:e,component:t},n)=>t?(0,m.createElement)(t,{params:n}):typeof e==`function`?e(n):e,Ff=e=>{let t=(0,m.useRef)(Ef),n=t.current,r=Object.keys(e);return t.current=r.length!==Object.keys(n).length||r.some(t=>e[t]!==n[t])?e:n},If=({path:e,nest:t,match:n,...r})=>{let i=Tf(),a=kf(i),[o,s,c]=n??Mf(i.parser,e,a,t),l=Ff({...Of(),...s});if(!o)return null;let u=Pf(r,l);return(0,m.createElement)(Df.Provider,{value:l},c?(0,m.createElement)(Nf,{base:c},u):u)},Lf=(0,m.forwardRef)((e,t)=>{let n=Tf(),[r,i]=Af(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...h}=e;return h.onClick=sf(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),h.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(h.className=u?.call?u(r===o):u),t&&(h.ref=t),c&&(0,m.isValidElement)(l)?(0,m.cloneElement)(l,h):(0,m.createElement)(`a`,h,l)}),Rf=(e,t=[])=>{if(Array.isArray(e))for(let n of e)Rf(n&&n.type===m.Fragment?n.props.children:n,t);else t.push(e);return t},zf=({children:e,location:t})=>{let n=Tf(),r=kf(n);for(let i of Rf(e)){let e=0;if((0,m.isValidElement)(i)&&(e=Mf(n.parser,i.props.path,t||r,i.props.nest))[0])return(0,m.cloneElement)(i,{match:e})}return null},Bf=[],Vf=()=>Bf.forEach(e=>e()),Hf=e=>(Bf.push(e)===1&&addEventListener(`hashchange`,Vf),()=>{Bf=Bf.filter(t=>t!==e),Bf.length||removeEventListener(`hashchange`,Vf)}),Uf=/^#?\/?/,Wf=()=>`/`+location.hash.replace(Uf,``),Gf=(e,{state:t=null,replace:n=!1}={})=>{let r=location.href,[i,a]=e.replace(Uf,``).split(`?`),o=new URL(r);o.hash=`/${i}`,a!==void 0&&(o.search=a);let s=o.href;history[n?`replaceState`:`pushState`](t,``,s);let c=typeof HashChangeEvent<`u`?new HashChangeEvent(`hashchange`,{oldURL:r,newURL:s}):new Event(`hashchange`,{detail:{oldURL:r,newURL:s}});dispatchEvent(c)},Kf=({ssrPath:e=`/`}={})=>[(0,nf.useSyncExternalStore)(Hf,Wf,()=>e),Gf];Kf.hrefs=e=>`#`+e;var q=Object.defineProperty,qf=(e,t)=>q(e,`name`,{value:t,configurable:!0}),Jf=!!(typeof window<`u`&&window.document&&window.document.createElement);function J(e,t,{checkForDefaultPrevented:n=!0}={}){return qf(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}qf(J,`composeEventHandlers`);function Yf(e){if(!Jf)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}qf(Yf,`getOwnerWindow`);function Xf(e){if(!Jf)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}qf(Xf,`getOwnerDocument`);function Zf(e,t=!1){let{activeElement:n}=Xf(e);if(!n?.nodeName)return null;if(Qf(n)&&n.contentDocument)return Zf(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Xf(n).getElementById(e);if(t)return t}}return n}qf(Zf,`getActiveElement`);function Qf(e){return e.tagName===`IFRAME`}qf(Qf,`isFrame`);var $f=Object.defineProperty,ep=(e,t)=>$f(e,`name`,{value:t,configurable:!0});function tp(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ep(tp,`setRef`);function np(...e){return t=>{let n=!1,r=e.map(e=>{let r=tp(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():tp(e[t],null)}}}}ep(np,`composeRefs`);function rp(...e){return m.useCallback(np(...e),e)}ep(rp,`useComposedRefs`);var ip=Object.defineProperty,Y=(e,t)=>ip(e,`name`,{value:t,configurable:!0});function ap(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=Y(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,h.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 Y(i,`useContext`),[r,i]}Y(ap,`createContext`);function op(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=Y(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,h.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 Y(s,`useContext`),[o,s]}Y(r,`createContext`);let i=Y(()=>{let t=n.map(e=>m.createContext(e));return Y(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,sp(i,...t)]}Y(op,`createContextScope`);function sp(...e){let t=e[0];if(e.length===1)return t;let n=Y(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Y(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}Y(sp,`composeContextScopes`);var cp=globalThis?.document?m.useLayoutEffect:()=>{},lp=Object.defineProperty,up=(e,t)=>lp(e,`name`,{value:t,configurable:!0}),dp=m.useId||(()=>void 0),fp=0;function pp(e){let[t,n]=m.useState(dp());return cp(()=>{e||n(e=>e??String(fp++))},[e]),e||(t?`radix-${t}`:``)}up(pp,`useId`);var mp=Object.defineProperty,hp=(e,t)=>mp(e,`name`,{value:t,configurable:!0}),gp=m.useEffectEvent,_p=m.useInsertionEffect;function vp(e){if(typeof gp==`function`)return gp(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof _p==`function`?_p(()=>{t.current=e}):cp(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}hp(vp,`useEffectEvent`);var yp=Object.defineProperty,bp=(e,t)=>yp(e,`name`,{value:t,configurable:!0}),xp=m.useInsertionEffect||cp;function Sp({prop:e,defaultProp:t,onChange:n=bp(()=>{},`onChange`),caller:r}){let[i,a,o]=Cp({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=wp(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}bp(Sp,`useControllableState`);function Cp({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return xp(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}bp(Cp,`useUncontrolledState`);function wp(e){return typeof e==`function`}bp(wp,`isFunction`);var Tp=Symbol(`RADIX:SYNC_STATE`);function Ep(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=vp(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===Tp)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,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Tp,state:i})},[i,d.state,c]),[g,f]}bp(Ep,`useControllableStateReducer`);var Dp=l(ot(),1),Op=Object.defineProperty,kp=(e,t)=>Op(e,`name`,{value:t,configurable:!0});function Ap(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Rp(r)&&typeof Hp==`function`&&(r=Hp(r._payload)),m.Children.forEach(r,e=>{if(Ip(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Rp(n)&&typeof Hp==`function`&&(n=Hp(n._payload)),a=Np(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?Fp(a):void 0,l=rp(n,c);if(!a){if(r||r===0)throw Error(o?Vp(e):Bp(e));return r}let u=Pp(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}kp(Ap,`createSlot`);var jp=Symbol.for(`radix.slottable`);function Mp(e){let t=kp(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=jp,t}kp(Mp,`createSlottable`);var Np=kp((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 Pp(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}}kp(Pp,`mergeProps`);function Fp(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)}kp(Fp,`getElementRef`);function Ip(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===jp}kp(Ip,`isSlottable`);var Lp=Symbol.for(`react.lazy`);function Rp(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Lp&&`_payload`in e&&zp(e._payload)}kp(Rp,`isLazyComponent`);function zp(e){return typeof e==`object`&&!!e&&`then`in e}kp(zp,`isPromiseLike`);var Bp=kp(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Vp=kp(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Hp=m.use,Up=Object.defineProperty,Wp=(e,t)=>Up(e,`name`,{value:t,configurable:!0}),Gp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ap(`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,h.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Kp(e,t){e&&Dp.flushSync(()=>e.dispatchEvent(t))}Wp(Kp,`dispatchDiscreteCustomEvent`);var qp=Object.defineProperty,Jp=(e,t)=>qp(e,`name`,{value:t,configurable:!0});function Yp(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Jp(Yp,`useCallbackRef`);var Xp=Object.defineProperty,Zp=(e,t)=>Xp(e,`name`,{value:t,configurable:!0}),Qp=`dismissableLayer.update`,$p=`dismissableLayer.pointerDownOutside`,em=`dismissableLayer.focusOutside`,tm,nm=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),rm=m.forwardRef(Zp(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(nm),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=m.useState({}),_=rp(t,f),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=m.useRef(!1),T=om(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=sm(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),D=d?x===v.length-1:!1,O=Yp(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(D)return p.addEventListener(`keydown`,O,{capture:!0}),()=>p.removeEventListener(`keydown`,O,{capture:!0})},[p,D,O]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tm=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cm(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=tm))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cm())},[d,u]),m.useEffect(()=>{let e=Zp(()=>g({}),`handleUpdate`);return document.addEventListener(Qp,e),()=>document.removeEventListener(Qp,e)},[]),(0,h.jsx)(Gp.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:J(e.onFocusCapture,E.onFocusCapture),onBlurCapture:J(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function im(){let e=m.useContext(nm),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Zp(im,`useDismissableLayerSurface`);var am=Zp(()=>!0,`IS_TRUE`);function om(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=am}=t,s=Yp(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()}Zp(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Zp(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)}Zp(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Zp(p,`handleInteractionBubble`);let m=Zp(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||lm($p,s,p,{discrete:!0})};if(Zp(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:Zp(()=>c.current=!0,`onPointerDownCapture`)}}Zp(om,`usePointerDownOutside`);function sm(e,t=globalThis?.document){let n=Yp(e),r=m.useRef(!1);return m.useEffect(()=>{let e=Zp(e=>{e.target&&!r.current&&lm(em,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Zp(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Zp(()=>r.current=!1,`onBlurCapture`)}}Zp(sm,`useFocusOutside`);function cm(){let e=new CustomEvent(Qp);document.dispatchEvent(e)}Zp(cm,`dispatchUpdate`);function lm(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?Kp(i,a):i.dispatchEvent(a)}Zp(lm,`handleAndDispatchCustomEvent`);var um=Object.defineProperty,dm=(e,t)=>um(e,`name`,{value:t,configurable:!0}),fm=`focusScope.autoFocusOnMount`,pm=`focusScope.autoFocusOnUnmount`,mm={bubbles:!1,cancelable:!0},hm=m.forwardRef(dm(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Yp(i),u=Yp(a),d=m.useRef(null),f=rp(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:Sm(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Sm(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Sm(s)};dm(e,`handleFocusIn`),dm(t,`handleFocusOut`),dm(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){Cm.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(fm,mm);s.addEventListener(fm,l),s.dispatchEvent(t),t.defaultPrevented||(gm(Em(vm(s)),{select:!0}),document.activeElement===e&&Sm(s))}return()=>{s.removeEventListener(fm,l),setTimeout(()=>{let t=new CustomEvent(pm,mm);s.addEventListener(pm,u),s.dispatchEvent(t),t.defaultPrevented||Sm(e??document.body,{select:!0}),s.removeEventListener(pm,u),Cm.remove(p)},0)}}},[s,l,u,p]);let g=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]=_m(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Sm(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Sm(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,h.jsx)(Gp.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})},`FocusScope`));function gm(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Sm(r,{select:t}),document.activeElement!==n)return}dm(gm,`focusFirst`);function _m(e){let t=vm(e);return[ym(t,e),ym(t.reverse(),e)]}dm(_m,`getTabbableEdges`);function vm(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:dm(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}dm(vm,`getTabbableCandidates`);function ym(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):bm(r,{upTo:t})))return r}dm(ym,`findVisible`);function bm(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}dm(bm,`isHidden`);function xm(e){return e instanceof HTMLInputElement&&`select`in e}dm(xm,`isSelectableInput`);function Sm(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xm(e)&&t&&e.select()}}dm(Sm,`focus`);var Cm=wm();function wm(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Tm(e,t),e.unshift(t)},remove(t){e=Tm(e,t),e[0]?.resume()}}}dm(wm,`createFocusScopesStack`);function Tm(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}dm(Tm,`arrayRemove`);function Em(e){return e.filter(e=>e.tagName!==`A`)}dm(Em,`removeLinks`);var Dm=Object.defineProperty,Om=m.forwardRef(((e,t)=>Dm(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);cp(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Dp.createPortal((0,h.jsx)(Gp.div,{...r,ref:t}),o):null},`Portal`)),km=Object.defineProperty,Am=(e,t)=>km(e,`name`,{value:t,configurable:!0});function jm(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}Am(jm,`useStateMachine`);var Mm=Am(e=>{let{present:t,children:n}=e,r=Nm(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=Fm(r.ref,Lm(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function Nm(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]=jm(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??Im(r.current),o.current=void 0):a.current=`none`},[s]),cp(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Im(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]),cp(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Am(a=>{let o=Im(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=Am(e=>{e.target===t&&(a.current=Im(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=Im(t)}else r.current=null;n(e)},[])}}Am(Nm,`usePresence`);function Pm(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Am(Pm,`setRef`);function Fm(...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=Pm(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():Pm(n[e],null)}}},[])}Am(Fm,`useStableComposedRefs`);function Im(e){return e?.animationName||`none`}Am(Im,`getAnimationName`);function Lm(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)}Am(Lm,`getElementRef`);var Rm=Object.defineProperty,zm=(e,t)=>Rm(e,`name`,{value:t,configurable:!0}),Bm=0,Vm=null;function Hm(e){return Um(),e.children}zm(Hm,`FocusGuards`);function Um(){m.useEffect(()=>{Vm||={start:Wm(),end:Wm()};let{start:e,end:t}=Vm;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Bm++,()=>{Bm===1&&(Vm?.start.remove(),Vm?.end.remove(),Vm=null),Bm=Math.max(0,Bm-1)}},[])}zm(Um,`useFocusGuards`);function Wm(){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}zm(Wm,`createFocusGuard`);var Gm=function(){return Gm=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},Gm.apply(this,arguments)};function Km(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 qm(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 Jm=`right-scroll-bar-position`,Ym=`width-before-scroll-bar`,Xm=`with-scroll-bars-hidden`,Zm=`--removed-body-scroll-bar-size`;function Qm(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function $m(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 eh=typeof window<`u`?m.useLayoutEffect:m.useEffect,th=new WeakMap;function nh(e,t){var n=$m(t||null,function(t){return e.forEach(function(e){return Qm(e,t)})});return eh(function(){var t=th.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Qm(e,null)}),i.forEach(function(e){r.has(e)||Qm(e,a)})}th.set(n,e)},[e]),n}function rh(e){return e}function ih(e,t){t===void 0&&(t=rh);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 ah(e){e===void 0&&(e={});var t=ih(null);return t.options=Gm({async:!0,ssr:!1},e),t}var oh=function(e){var t=e.sideCar,n=Km(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,Gm({},n))};oh.isSideCarExport=!0;function sh(e,t){return e.useMedium(t),oh}var ch=ah(),lh=function(){},uh=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:lh,onWheelCapture:lh,onTouchMoveCapture:lh}),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,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Km(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=nh([n,t]),w=Gm(Gm({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:ch,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Gm(Gm({},w),{ref:C})):m.createElement(y,Gm({},w,{className:c,ref:C}),s))});uh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},uh.classNames={fullWidth:Ym,zeroRight:Jm};var dh=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function fh(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=dh();return t&&e.setAttribute(`nonce`,t),e}function ph(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mh(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var hh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fh())&&(ph(t,n),mh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gh=function(){var e=hh();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_h=function(){var e=gh();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},vh={left:0,top:0,right:0,gap:0},yh=function(e){return parseInt(e||``,10)||0},bh=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[yh(n),yh(r),yh(i)]},xh=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return vh;var t=bh(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])}},Sh=_h(),Ch=`data-scroll-locked`,wh=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
18
|
+
.${Xm} {
|
|
19
|
+
overflow: hidden ${r};
|
|
20
|
+
padding-right: ${s}px ${r};
|
|
21
|
+
}
|
|
22
|
+
body[${Ch}] {
|
|
23
|
+
overflow: hidden ${r};
|
|
24
|
+
overscroll-behavior: contain;
|
|
25
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
26
|
+
padding-left: ${i}px;
|
|
27
|
+
padding-top: ${a}px;
|
|
28
|
+
padding-right: ${o}px;
|
|
29
|
+
margin-left:0;
|
|
30
|
+
margin-top:0;
|
|
31
|
+
margin-right: ${s}px ${r};
|
|
32
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.${Jm} {
|
|
36
|
+
right: ${s}px ${r};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${Ym} {
|
|
40
|
+
margin-right: ${s}px ${r};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.${Jm} .${Jm} {
|
|
44
|
+
right: 0 ${r};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.${Ym} .${Ym} {
|
|
48
|
+
margin-right: 0 ${r};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body[${Ch}] {
|
|
52
|
+
${Zm}: ${s}px;
|
|
53
|
+
}
|
|
54
|
+
`},Th=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Eh=function(){m.useEffect(function(){return document.body.setAttribute(Ch,(Th()+1).toString()),function(){var e=Th()-1;e<=0?document.body.removeAttribute(Ch):document.body.setAttribute(Ch,e.toString())}},[])},Dh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Eh();var a=m.useMemo(function(){return xh(i)},[i]);return m.createElement(Sh,{styles:wh(a,!t,i,n?``:`!important`)})},Oh=!1;if(typeof window<`u`)try{var kh=Object.defineProperty({},"passive",{get:function(){return Oh=!0,!0}});window.addEventListener(`test`,kh,kh),window.removeEventListener(`test`,kh,kh)}catch{Oh=!1}var Ah=Oh?{passive:!1}:!1,jh=function(e){return e.tagName===`TEXTAREA`},Mh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!jh(e)&&n[t]===`visible`)},Nh=function(e){return Mh(e,`overflowY`)},Ph=function(e){return Mh(e,`overflowX`)},Fh=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Rh(e,r)){var i=zh(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ih=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Lh=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Rh=function(e,t){return e===`v`?Nh(t):Ph(t)},zh=function(e,t){return e===`v`?Ih(t):Lh(t)},Bh=function(e,t){return e===`h`&&t===`rtl`?-1:1},Vh=function(e,t,n,r,i){var a=Bh(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=zh(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Rh(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},Hh=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Uh=function(e){return[e.deltaX,e.deltaY]},Wh=function(e){return e&&`current`in e?e.current:e},Gh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kh=function(e){return`
|
|
55
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
56
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
57
|
+
`},qh=0,Jh=[];function Yh(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(qh++)[0],a=m.useState(_h)[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=qm([e.lockRef.current],(e.shards||[]).map(Wh),!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=Hh(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=Fh(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Fh(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 Vh(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(Jh.length&&Jh[Jh.length-1]===a){var r=`deltaY`in n?Uh(n):Hh(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Gh(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Wh).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:Xh(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=Hh(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Uh(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Hh(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return Jh.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Ah),document.addEventListener(`touchmove`,c,Ah),document.addEventListener(`touchstart`,u,Ah),function(){Jh=Jh.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Ah),document.removeEventListener(`touchmove`,c,Ah),document.removeEventListener(`touchstart`,u,Ah)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Kh(i)}):null,p?m.createElement(Dh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Zh=sh(ch,Yh),Qh=m.forwardRef(function(e,t){return m.createElement(uh,Gm({},e,{ref:t,sideCar:Zh}))});Qh.classNames=uh.classNames;var $h=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},eg=new WeakMap,tg=new WeakMap,ng={},rg=0,ig=function(e){return e&&(e.host||ig(e.parentNode))},ag=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ig(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})},og=function(e,t,n,r){var i=ag(t,Array.isArray(e)?e:[e]);ng[n]||(ng[n]=new WeakMap);var a=ng[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=(eg.get(e)||0)+1,l=(a.get(e)||0)+1;eg.set(e,c),a.set(e,l),o.push(e),c===1&&i&&tg.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(),rg++,function(){o.forEach(function(e){var t=eg.get(e)-1,i=a.get(e)-1;eg.set(e,t),a.set(e,i),t||(tg.has(e)||e.removeAttribute(r),tg.delete(e)),i||e.removeAttribute(n)}),rg--,rg||(eg=new WeakMap,eg=new WeakMap,tg=new WeakMap,ng={})}},sg=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||$h(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),og(r,i,n,`aria-hidden`)):function(){return null}},cg=Object.defineProperty,lg=(e,t)=>cg(e,`name`,{value:t,configurable:!0}),ug=`Dialog`,[dg,fg]=op(ug),[pg,mg]=dg(ug),hg=lg(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]=Sp({prop:r,defaultProp:i??!1,onChange:a,caller:ug}),[d,f]=m.useState(0),[p,g]=m.useState(0);return(0,h.jsx)(pg,{scope:t,triggerRef:s,contentRef:c,contentId:pp(),titleId:pp(),descriptionId:pp(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:g,open:l,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),gg=`DialogPortal`,[_g,vg]=dg(gg,{forceMount:void 0}),yg=lg(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=mg(gg,t);return(0,h.jsx)(_g,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,h.jsx)(Mm,{present:n||a.open,children:(0,h.jsx)(Om,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),bg=`DialogOverlay`,xg=m.forwardRef(lg(function(e,t){let n=vg(bg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mg(bg,e.__scopeDialog);return a.modal?(0,h.jsx)(Mm,{present:r||a.open,children:(0,h.jsx)(Cg,{...i,ref:t})}):null},`DialogOverlay`)),Sg=Ap(`DialogOverlay.RemoveScroll`),Cg=m.forwardRef(lg(function(e,t){let{__scopeDialog:n,...r}=e,i=mg(bg,n),a=rp(t,im());return(0,h.jsx)(Qh,{as:Sg,allowPinchZoom:!0,shards:[i.contentRef],children:(0,h.jsx)(Gp.div,{"data-state":jg(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),wg=`DialogContent`,Tg=m.forwardRef(lg(function(e,t){let n=vg(wg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mg(wg,e.__scopeDialog);return(0,h.jsx)(Mm,{present:r||a.open,children:a.modal?(0,h.jsx)(Eg,{...i,ref:t}):(0,h.jsx)(Dg,{...i,ref:t})})},`DialogContent`)),Eg=m.forwardRef(lg(function(e,t){let n=mg(wg,e.__scopeDialog),r=m.useRef(null),i=rp(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return sg(e)},[]),(0,h.jsx)(Og,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Dg=m.forwardRef(lg(function(e,t){let n=mg(wg,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,h.jsx)(Og,{...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`)),Og=m.forwardRef(lg(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=mg(wg,n);return Um(),(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,h.jsx)(rm,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":jg(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),kg=`DialogTitle`,Ag=m.forwardRef(lg(function(e,t){let{__scopeDialog:n,...r}=e,i=mg(kg,n),{setTitleCount:a}=i;return cp(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,h.jsx)(Gp.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`));function jg(e){return e?`open`:`closed`}lg(jg,`getState`);var Mg=window.__DESIGN_STATIC__===!0,Ng=class extends Error{status;constructor(e,t){super(t),this.status=e}};async function Pg(e){let t=await fetch(e,{cache:Mg?`default`:`no-store`});if(!t.ok){let e=`${t.status} ${t.statusText}`;try{let n=await t.json();n.error&&(e=n.error)}catch{}throw new Ng(t.status,e)}return await t.json()}var Fg=null,Ig={project:()=>Pg(Mg?`api/project.json`:`/api/project`),canvas:e=>Pg(Mg?`api/canvas/${encodeURIComponent(e)}.json`:`/api/canvas/${encodeURIComponent(e)}`),system:()=>Pg(Mg?`api/system.json`:`/api/system`),async source(e){if(Mg){Fg??=Pg(`api/sources.json`).catch(()=>({}));let t=(await Fg)[e];if(t===void 0)throw new Ng(404,`${e} is not in this build`);return t}let t=await fetch(`/api/source?path=${encodeURIComponent(e)}`,{cache:`no-store`});if(!t.ok)throw new Ng(t.status,`Could not read ${e}`);return t.text()}},Lg=new Ue({defaultOptions:{queries:{staleTime:Mg?1/0:0,retry:1,refetchOnWindowFocus:!1}}}),Rg={project:[`project`],canvas:e=>[`canvas`,e],system:[`system`],source:e=>[`source`,e]};function zg(){return nt({queryKey:Rg.project,queryFn:Ig.project})}function Bg(e){return nt({queryKey:Rg.canvas(e),queryFn:()=>Ig.canvas(e),placeholderData:e=>e})}function Vg(e=!0){return nt({queryKey:Rg.system,queryFn:Ig.system,enabled:e})}function Hg(e){return nt({queryKey:Rg.source(e??``),queryFn:()=>Ig.source(e),enabled:!!e})}function Ug(){if(Mg)return()=>{};let e=null,t=!1;return e=new EventSource(`/api/events`),e.onopen=()=>{t&&(t=!1,Lg.invalidateQueries())},e.onerror=()=>{t=!0},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if(t.type===`project`)Lg.invalidateQueries({queryKey:Rg.project});else if(t.type===`system`)Lg.invalidateQueries({queryKey:Rg.system}),Lg.invalidateQueries({queryKey:[`source`]});else if(t.type===`canvas`||t.type===`snapshot`){let e=t.type===`canvas`?t.id:t.canvas;Lg.invalidateQueries({queryKey:Rg.canvas(e)}),t.type===`snapshot`&&Lg.invalidateQueries({queryKey:Rg.project})}},()=>e?.close()}function X(...e){return e.filter(Boolean).join(` `)}var Wg=null;function Gg(e,t){Wg={canvas:e,item:t},window.dispatchEvent(new CustomEvent(`design:focus`,{detail:Wg}))}function Kg(e){if(!Wg||Wg.canvas!==e)return null;let t=Wg.item;return Wg=null,t}var qg=class{value;listeners=new Set;constructor(e){this.value=e}get=()=>this.value;set=e=>{let t=typeof e==`function`?e(this.value):e;if(!Object.is(t,this.value)){this.value=t;for(let e of this.listeners)e()}};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)})};function Jg(e,t=e=>e){return(0,m.useSyncExternalStore)(e.subscribe,()=>t(e.get()),()=>t(e.get()))}var Yg=`foss-design.theme`;function Xg(){try{let e=localStorage.getItem(Yg);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var Zg=new qg(Xg()),Qg=window.matchMedia(`(prefers-color-scheme: dark)`);function $g(e){return e===`system`?Qg.matches?`dark`:`light`:e}function e_(){document.documentElement.dataset.theme=$g(Zg.get())}Qg.addEventListener(`change`,e_),Zg.subscribe(e_);function t_(e){try{localStorage.setItem(Yg,e)}catch{}Zg.set(e)}function n_(){return Jg(Zg)}function r_(){let e=Jg(Zg),t=(0,m.useSyncExternalStore)(e=>(Qg.addEventListener(`change`,e),()=>Qg.removeEventListener(`change`,e)),()=>Qg.matches);return e===`system`?t?`dark`:`light`:e}var i_={plus:`<path d="M5 12h14"/><path d="M12 5v14"/>`,check:`<path d="M20 6 9 17l-5-5"/>`,x:`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`,"chevron-down":`<path d="m6 9 6 6 6-6"/>`,"chevron-up":`<path d="m18 15-6-6-6 6"/>`,"chevron-right":`<path d="m9 18 6-6-6-6"/>`,"arrow-right":`<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>`,chevrons:`<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>`,copy:`<rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`,search:`<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>`,bell:`<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>`,refresh:`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`,"up-right":`<path d="M7 7h10v10"/><path d="M7 17 17 7"/>`,"down-left":`<path d="M17 7 7 17"/><path d="M17 17H7V7"/>`,external:`<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>`,"user-plus":`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M19 8v6"/><path d="M22 11h-6"/>`,user:`<circle cx="12" cy="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/>`,trash:`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`,more:`<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>`,alert:`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>`,info:`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`,upload:`<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m17 8-5-5-5 5"/><path d="M12 3v12"/>`,download:`<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/><path d="M12 15V3"/>`,shield:`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`,logout:`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><path d="m16 17 5-5-5-5"/><path d="M21 12H9"/>`,loader:`<path d="M21 12a9 9 0 1 1-6.219-8.56"/>`,"circle-check":`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`,"circle-dashed":`<circle cx="12" cy="12" r="9" stroke-dasharray="3 3"/>`,clock:`<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>`,mail:`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`,send:`<path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/>`,chat:`<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>`,wallet:`<path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"/><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"/>`,"file-code":`<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="m10 13-2 2 2 2"/><path d="m14 17 2-2-2-2"/>`,ban:`<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>`,code:`<path d="m16 18 6-6-6-6"/><path d="m8 6-6 6 6 6"/>`,"chevron-left":`<path d="m15 18-6-6 6-6"/>`,bluetooth:`<path d="m7 7 10 10-5 5V2l5 5L7 17"/>`,face:`<path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><path d="M9 9h.01"/><path d="M15 9h.01"/>`,eye:`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`,clipboard:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>`,grip:`<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>`,list:`<path d="M3 12h.01"/><path d="M3 18h.01"/><path d="M3 6h.01"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M8 6h13"/>`,lock:`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`,hw:`<rect width="20" height="10" x="2" y="7" rx="2"/><path d="M15 7v10"/><circle cx="8" cy="12" r="1.5"/>`,link:`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`,signal:`<path d="M2 20h.01"/><path d="M7 20v-4"/><path d="M12 20v-8"/><path d="M17 20V8"/>`,grid:`<rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/>`,coins:`<circle cx="8" cy="8" r="6"/><path d="M18.09 10.37A6 6 0 1 1 10.34 18"/><path d="M7 6h1v4"/><path d="m16.71 13.88.7.71-2.82 2.82"/>`,arrows:`<path d="M8 3 4 7l4 4"/><path d="M4 7h16"/><path d="m16 21 4-4-4-4"/><path d="M20 17H4"/>`,key:`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`,blocks:`<rect width="7" height="7" x="14" y="3" rx="1"/><path d="M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3"/>`,settings:`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`,qr:`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`,edit:`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>`,star:`<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>`,home:`<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>`,moon:`<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>`,sun:`<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>`,languages:`<path d="m5 8 6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/>`,"arrow-left":`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`,play:`<polygon points="6 3 20 12 6 21 6 3"/>`,"zoom-in":`<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M11 8v6"/><path d="M8 11h6"/>`,"zoom-out":`<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M8 11h6"/>`,fit:`<path d="M8 3H5a2 2 0 0 0-2 2v3"/><path d="M21 8V5a2 2 0 0 0-2-2h-3"/><path d="M3 16v3a2 2 0 0 0 2 2h3"/><path d="M16 21h3a2 2 0 0 0 2-2v-3"/>`,"panel-left":`<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/>`,layers:`<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/>`,file:`<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/>`,palette:`<circle cx="13.5" cy="6.5" r="1"/><circle cx="17.5" cy="10.5" r="1"/><circle cx="8.5" cy="7.5" r="1"/><circle cx="6.5" cy="12.5" r="1"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.93 0 1.65-.75 1.65-1.69 0-.44-.18-.84-.44-1.13-.29-.29-.44-.65-.44-1.13a1.64 1.64 0 0 1 1.67-1.67h2c3.05 0 5.55-2.5 5.55-5.55C21.96 6.01 17.46 2 12 2z"/>`,type:`<path d="M4 7V4h16v3"/><path d="M9 20h6"/><path d="M12 4v16"/>`,shape:`<path d="M5 3a2 2 0 0 0-2 2"/><path d="M19 3a2 2 0 0 1 2 2"/><path d="M21 19a2 2 0 0 1-2 2"/><path d="M5 21a2 2 0 0 1-2-2"/><path d="M9 3h1"/><path d="M9 21h1"/><path d="M14 3h1"/><path d="M14 21h1"/><path d="M3 9v1"/><path d="M21 9v1"/><path d="M3 14v1"/><path d="M21 14v1"/>`,motion:`<path d="M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1 .6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/><path d="M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1 .6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/><path d="M2 6c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1 .6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>`,book:`<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>`,image:`<rect width="18" height="18" x="3" y="3" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21"/>`,monitor:`<rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/>`,smartphone:`<rect width="14" height="20" x="5" y="2" rx="2"/><path d="M12 18h.01"/>`,tablet:`<rect width="16" height="20" x="4" y="2" rx="2"/><path d="M12 18h.01"/>`,note:`<path d="M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z"/><path d="M15 3v4a2 2 0 0 0 2 2h4"/>`,globe:`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`,pointer:`<path d="M4.04 4.69a.5.5 0 0 1 .65-.65l16 6.5a.5.5 0 0 1-.06.95l-6.12 1.58a2 2 0 0 0-1.44 1.44l-1.58 6.12a.5.5 0 0 1-.95.06z"/>`,component:`<path d="M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z"/><path d="m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z"/><path d="M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z"/><path d="m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z"/>`,keyboard:`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="M6 8h.01"/><path d="M10 8h.01"/><path d="M14 8h.01"/><path d="M18 8h.01"/><path d="M8 12h.01"/><path d="M12 12h.01"/><path d="M16 12h.01"/><path d="M7 16h10"/>`,folder:`<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>`,canvas:`<rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/>`};function Z({name:e,size:t=16,strokeWidth:n=1.75,className:r}){return(0,h.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:n,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:`shrink-0 ${e===`loader`?`animate-spin`:``} ${r??``}`,dangerouslySetInnerHTML:{__html:i_[e]}})}function Q({children:e,size:t=12.5,className:n,title:r,wrap:i}){return(0,h.jsx)(`span`,{title:r,className:X(i?`break-all`:`whitespace-nowrap`,`font-mono`,n),style:{fontSize:t},children:e})}function a_({children:e}){return(0,h.jsx)(`kbd`,{className:`rounded-[4px] border border-rule bg-surface px-[5px] py-px font-mono text-[11px] text-ink2`,children:e})}function o_({top:e,bottom:t,weight:n=500}){return(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-px`,children:[(0,h.jsx)(`span`,{className:`truncate leading-[1.35]`,style:{fontWeight:n},children:e}),t?(0,h.jsx)(`span`,{className:`flex min-w-0 items-center gap-2.5 overflow-hidden whitespace-nowrap text-[12.5px] leading-[1.35] text-muted`,children:t}):null]})}var s_={canvas:`This canvas`,canvases:`Canvases`,system:`Design system`,actions:`Actions`};function c_(e){let t=/^\/c\/([^/]+)/.exec(e);return t?decodeURIComponent(t[1]):null}function l_({onClose:e}){let[t,n]=jf(),r=zg().data,i=c_(t),a=nt({queryKey:Rg.canvas(i??``),queryFn:()=>Ig.canvas(i),enabled:!!i}).data,o=nt({queryKey:Rg.system,queryFn:Ig.system,enabled:!!r?.system}).data,[s,c]=(0,m.useState)(``),[l,u]=(0,m.useState)(0),d=t=>()=>{e(),t()},f=[];if(a)for(let e of a.pages){f.push({id:`page:${e.id}`,group:`canvas`,label:e.title,icon:`file`,hint:`Page`,run:d(()=>n(`/c/${encodeURIComponent(a.id)}/p/${encodeURIComponent(e.id)}`))});for(let t of e.sections)for(let r of t.items)(r.kind===`screen`||r.kind===`url`)&&f.push({id:`item:${e.id}:${r.id}`,group:`canvas`,label:r.title,icon:r.kind===`url`?`globe`:`monitor`,hint:t.title?`${e.title} · ${t.title}`:e.title,keywords:`${r.id} ${t.title??``}`,searchOnly:!0,run:d(()=>{n(`/c/${encodeURIComponent(a.id)}/p/${encodeURIComponent(e.id)}`),Gg(a.id,r.id)})})}for(let e of r?.canvases??[])e.id!==i&&f.push({id:`canvas:${e.id}`,group:`canvases`,label:e.title,icon:`canvas`,hint:`${e.screens} screens`,keywords:e.id,run:d(()=>n(`/c/${encodeURIComponent(e.id)}`))});if(r?.system){for(let[e,t,r]of[[`Overview`,`/system`,`book`],[`Colors`,`/system/colors`,`palette`],[`Typography`,`/system/typography`,`type`],[`Spacing & shape`,`/system/shape`,`shape`]])f.push({id:`sys:${t}`,group:`system`,label:e,icon:r,run:d(()=>n(t))});for(let e of o?.components??[])f.push({id:`component:${e.id}`,group:`system`,label:e.title,icon:`component`,hint:e.group,searchOnly:!0,run:d(()=>n(`/system/components/${encodeURIComponent(e.id)}`))});for(let e of o?.guidelines??[])f.push({id:`guide:${e.slug}`,group:`system`,label:e.title,icon:`book`,hint:`Guideline`,searchOnly:!0,run:d(()=>n(`/system/guidelines/${encodeURIComponent(e.slug)}`))})}f.push({id:`home`,group:`actions`,label:`All canvases`,icon:`home`,run:d(()=>n(`/`))},{id:`light`,group:`actions`,label:`Light appearance`,icon:`sun`,searchOnly:!0,run:d(()=>t_(`light`))},{id:`dark`,group:`actions`,label:`Dark appearance`,icon:`moon`,searchOnly:!0,run:d(()=>t_(`dark`))},{id:`system-theme`,group:`actions`,label:`System appearance`,icon:`monitor`,searchOnly:!0,run:d(()=>t_(`system`))});let p=s.trim().toLowerCase(),g=f.filter(e=>p?`${e.label} ${e.keywords??``} ${typeof e.hint==`string`?e.hint:``}`.toLowerCase().includes(p):!e.searchOnly),_=[`canvas`,`canvases`,`system`,`actions`].map(e=>({group:e,items:g.filter(t=>t.group===e)})).filter(e=>e.items.length),v=_.flatMap(e=>e.items),y=Math.min(l,Math.max(v.length-1,0)),b=-1;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ag,{className:`sr-only`,children:`Search and jump`}),(0,h.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center gap-2.5 border-b border-rule px-4`,children:[(0,h.jsx)(Z,{name:`search`,size:16,className:`text-muted`}),(0,h.jsx)(`input`,{value:s,onChange:e=>{c(e.target.value),u(0)},onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),u((y+1)%Math.max(v.length,1))):e.key===`ArrowUp`?(e.preventDefault(),u((y-1+v.length)%Math.max(v.length,1))):e.key===`Enter`&&(e.preventDefault(),v[y]?.run())},placeholder:`Canvases, screens, components…`,"aria-label":`Search and jump`,role:`combobox`,"aria-expanded":`true`,"aria-controls":`palette-list`,autoComplete:`off`,spellCheck:!1,className:`h-full min-w-0 grow border-0 bg-transparent text-[15px] text-ink outline-none placeholder:text-muted`}),(0,h.jsx)(a_,{children:`esc`})]}),(0,h.jsx)(`div`,{id:`palette-list`,role:`listbox`,className:`min-h-0 grow overflow-y-auto py-1.5`,children:_.length?_.map(({group:e,items:t})=>(0,h.jsxs)(`div`,{role:`presentation`,children:[(0,h.jsx)(`div`,{className:`px-4 pt-2.5 pb-1 text-[12px] text-muted`,children:s_[e]}),t.map(e=>{b+=1;let t=b,n=t===y;return(0,h.jsxs)(`button`,{type:`button`,role:`option`,tabIndex:-1,"aria-selected":n,ref:n?e=>e?.scrollIntoView({block:`nearest`}):void 0,onMouseMove:()=>n?void 0:u(t),onClick:e.run,className:X(`flex h-10 w-full cursor-pointer items-center gap-3 border-0 px-4 text-left text-[13.5px] text-ink`,n?`bg-soft`:`bg-transparent`),children:[(0,h.jsx)(`span`,{className:`flex w-5 shrink-0 justify-center text-ink2`,children:(0,h.jsx)(Z,{name:e.icon,size:16})}),(0,h.jsx)(`span`,{className:`min-w-0 grow truncate`,children:e.label}),e.hint?(0,h.jsx)(`span`,{className:`flex shrink-0 items-center text-[12.5px] text-muted`,children:e.hint}):null]},e.id)})]},e)):(0,h.jsx)(`div`,{className:`px-6 py-10 text-center text-[13px] text-muted`,children:`Nothing matches.`})}),(0,h.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-4 border-t border-rule bg-soft px-4 text-[12px] text-muted`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(a_,{children:`↑`}),(0,h.jsx)(a_,{children:`↓`}),`move`]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(a_,{children:`↵`}),`open`]})]})]})}function u_(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=()=>t(e=>!e),n=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`k`&&(t.preventDefault(),e())};return window.addEventListener(`keydown`,n),window.addEventListener(`design:palette`,e),()=>{window.removeEventListener(`keydown`,n),window.removeEventListener(`design:palette`,e)}},[]),(0,h.jsx)(hg,{open:e,onOpenChange:t,children:(0,h.jsx)(V,{children:e?(0,h.jsx)(yg,{forceMount:!0,children:(0,h.jsx)(xg,{asChild:!0,forceMount:!0,children:(0,h.jsx)($d.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.14},className:`fixed inset-0 z-50 flex items-start justify-center bg-overlay p-6 pt-[12vh]`,children:(0,h.jsx)(Tg,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,h.jsx)($d.div,{initial:{opacity:0,scale:.98,y:-6},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,transition:{duration:.1}},transition:{type:`spring`,stiffness:560,damping:40},className:`flex max-h-[min(560px,76vh)] w-[560px] max-w-full flex-col overflow-hidden rounded-[12px] border border-rule bg-surface shadow-pop outline-none`,children:(0,h.jsx)(l_,{onClose:()=>t(!1)})})})})})}):null})})}var d_=/Mac|iPhone|iPad/.test(navigator.platform)?`⌘`:`Ctrl`;function f_(){window.dispatchEvent(new CustomEvent(`design:palette`))}function p_({width:e=240,label:t=`Search and jump`}){return(0,h.jsxs)(`button`,{type:`button`,onClick:f_,style:{width:e},className:`flex h-ctrl min-w-0 shrink cursor-pointer items-center gap-2 rounded-[6px] border border-rule bg-soft pr-1.5 pl-3 text-ctrl text-muted transition-colors hover:border-rule-strong max-lg:w-auto!`,children:[(0,h.jsx)(Z,{name:`search`,size:15}),(0,h.jsx)(`span`,{className:`min-w-0 grow truncate text-left max-lg:hidden`,children:t}),(0,h.jsx)(a_,{children:d_===`⌘`?`⌘K`:`Ctrl K`})]})}var m_={primary:`border border-primary bg-primary text-primary-ink hover:opacity-90`,secondary:`border border-rule-strong bg-surface text-ink hover:bg-soft`,ghost:`border border-transparent bg-transparent text-ink2 hover:bg-soft2`,dashed:`border border-dashed border-rule-strong bg-transparent text-ink2 hover:bg-soft`,danger:`border border-danger bg-danger text-on-danger hover:opacity-90`},h_=(e=`secondary`,t)=>X(`inline-flex h-ctrl shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-[6px] px-ctrl text-ctrl font-medium leading-none no-underline transition-[background-color,opacity] duration-100`,`disabled:cursor-not-allowed disabled:opacity-45 aria-disabled:cursor-not-allowed aria-disabled:opacity-45`,m_[e],t),g_=(0,m.forwardRef)(function({kind:e=`secondary`,icon:t,loading:n,disabled:r,className:i,children:a,type:o=`button`,...s},c){return(0,h.jsxs)(`button`,{ref:c,type:o,disabled:r||n,"aria-busy":n||void 0,className:h_(e,i),...s,children:[n?(0,h.jsx)(Z,{name:`loader`,size:15,className:`animate-spin`}):t?(0,h.jsx)(Z,{name:t,size:15}):null,a]})}),__={ghost:`border border-transparent bg-transparent text-muted hover:bg-soft2 hover:text-ink2`,secondary:`border border-rule-strong bg-surface text-ink2 hover:bg-soft`},v_=(e=`ghost`,t)=>X(`inline-flex h-ctrl w-ctrl shrink-0 cursor-pointer items-center justify-center rounded-[6px] p-0 transition-colors duration-100 disabled:cursor-not-allowed disabled:opacity-45`,__[e],t),y_=(0,m.forwardRef)(function({icon:e,label:t,kind:n=`ghost`,size:r=16,className:i,type:a=`button`,...o},s){return(0,h.jsx)(`button`,{ref:s,type:a,"aria-label":t,title:t,className:v_(n,i),...o,children:(0,h.jsx)(Z,{name:e,size:r})})});function b_({to:e,kind:t=`secondary`,icon:n,className:r,children:i}){return(0,h.jsxs)(Lf,{href:e,className:h_(t,r),children:[n?(0,h.jsx)(Z,{name:n,size:15}):null,i]})}function x_({kind:e=`secondary`,icon:t,className:n,children:r,...i}){return(0,h.jsxs)(`a`,{className:h_(e,n),...i,children:[t?(0,h.jsx)(Z,{name:t,size:15}):null,r]})}var S_=Object.defineProperty,C_=(e,t)=>S_(e,`name`,{value:t,configurable:!0});function w_(e){let t=e+`CollectionProvider`,[n,r]=op(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=C_(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,h.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Ap(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=rp(t,a(s,n).collectionRef);return(0,h.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ap(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=rp(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,h.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return C_(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},g,r]}C_(w_,`createCollection`);var T_=new WeakMap,E_=class e extends Map{static{C_(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],T_.set(this,!0)}set(e,t){return T_.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=k_(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=D_(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=D_(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return D_(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function D_(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=O_(e,t);return n===-1?void 0:e[n]}C_(D_,`at`);function O_(e,t){let n=e.length,r=k_(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}C_(O_,`toSafeIndex`);function k_(e){return e!==e||e===0?0:Math.trunc(e)}C_(k_,`toSafeInteger`);function A_(e){let t=e+`CollectionProvider`,[n,r]=op(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new E_,setItemMap:C_(()=>void 0,`setItemMap`)}),o=C_(({state:e,...t})=>e?(0,h.jsx)(c,{...t,state:e}):(0,h.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=C_(e=>{let t=_();return(0,h.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=C_(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[o,s]=m.useState(null),c=rp(a,s),[l,u]=r;return m.useEffect(()=>{if(!o)return;let e=P_(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,h.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Ap(l),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=rp(t,a(l,n).collectionRef);return(0,h.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Ap(f),g=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),[s,c]=m.useState(null),l=rp(t,o,c),{setItemMap:u}=a(f,n),d=m.useRef(i);j_(d.current,i)||(d.current=i);let g=d.current;return m.useEffect(()=>{let e=g;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(N_):(t.set(s,{...e,element:s}),t.toSorted(N_)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new E_(e)))}},[s,g,u]),(0,h.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});g.displayName=f;function _(){return m.useState(new E_)}C_(_,`useInitCollection`);function v(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return C_(v,`useCollection`),[{Provider:o,Slot:d,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:_}]}C_(A_,`createCollection`);function j_(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}C_(j_,`shallowEqual`);function M_(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}C_(M_,`isElementPreceding`);function N_(e,t){return!e[1].element||!t[1].element?0:M_(e[1].element,t[1].element)?-1:1}C_(N_,`sortByDocumentPosition`);function P_(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}C_(P_,`getChildListObserver`);var F_=Object.defineProperty,I_=(e,t)=>F_(e,`name`,{value:t,configurable:!0}),L_=m.createContext(void 0);function R_(e){let t=m.useContext(L_);return e||t||`ltr`}I_(R_,`useDirection`);var z_=[`top`,`right`,`bottom`,`left`],B_=Math.min,V_=Math.max,H_=Math.round,U_=Math.floor,W_=e=>({x:e,y:e}),G_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function K_(e,t,n){return V_(e,B_(t,n))}function q_(e,t){return typeof e==`function`?e(t):e}function J_(e){return e.split(`-`)[0]}function Y_(e){return e.split(`-`)[1]}function X_(e){return e===`x`?`y`:`x`}function Z_(e){return e===`y`?`height`:`width`}function Q_(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $_(e){return X_(Q_(e))}function ev(e,t,n){n===void 0&&(n=!1);let r=Y_(e),i=$_(e),a=Z_(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lv(o)),[o,lv(o)]}function tv(e){let t=lv(e);return[nv(e),t,nv(t)]}function nv(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rv=[`left`,`right`],iv=[`right`,`left`],av=[`top`,`bottom`],ov=[`bottom`,`top`];function sv(e,t,n){switch(e){case`top`:case`bottom`:return n?t?iv:rv:t?rv:iv;case`left`:case`right`:return t?av:ov;default:return[]}}function cv(e,t,n,r){let i=Y_(e),a=sv(J_(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(nv)))),a}function lv(e){let t=J_(e);return G_[t]+e.slice(t.length)}function uv(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function dv(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:uv(e)}function fv(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pv(e,t,n){let{reference:r,floating:i}=e,a=Q_(t),o=$_(t),s=Z_(o),c=J_(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Y_(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function mv(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=q_(t,e),p=dv(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var hv=50,gv=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mv},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pv(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<hv&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=pv(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_v=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=q_(e,t)||{};if(l==null)return{};let d=dv(u),f={x:n,y:r},p=$_(i),m=Z_(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=B_(d[_],T),D=B_(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=K_(E,k,O),j=!c.arrow&&Y_(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}}),vv=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=q_(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=J_(r),_=Q_(o),v=J_(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[lv(o)]:tv(o)),x=p!==`none`;!d&&x&&b.push(...cv(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ev(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Q_(t)||T.every(e=>Q_(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Q_(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function yv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bv(e){return z_.some(t=>e[t]>=0)}var xv=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=q_(e,t);switch(i){case`referenceHidden`:{let e=yv(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bv(e)}}}case`escaped`:{let e=yv(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bv(e)}}}default:return{}}}}},Sv=new Set([`left`,`top`]);async function Cv(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=J_(n),s=Y_(n),c=Q_(n)===`y`,l=Sv.has(o)?-1:1,u=a&&c?-1:1,d=q_(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wv=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Cv(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Tv=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=q_(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Q_(i),p=X_(f),m=u[p],h=u[f],g=(e,t)=>K_(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ev=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=q_(e,t),u={x:n,y:r},d=Q_(i),f=X_(d),p=u[f],m=u[d],h=q_(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sv.has(J_(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Dv=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=q_(e,t),c=await i.detectOverflow(t,s),l=J_(n),u=Y_(n),d=Q_(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=B_(p-c[m],g),y=B_(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*V_(c.left,c.right):S=p-2*V_(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ov(){return typeof window<`u`}function kv(e){return Mv(e)?(e.nodeName||``).toLowerCase():`#document`}function Av(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jv(e){return((Mv(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mv(e){return Ov()?e instanceof Node||e instanceof Av(e).Node:!1}function Nv(e){return Ov()?e instanceof Element||e instanceof Av(e).Element:!1}function Pv(e){return Ov()?e instanceof HTMLElement||e instanceof Av(e).HTMLElement:!1}function Fv(e){return!Ov()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Av(e).ShadowRoot}function Iv(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qv(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lv(e){return/^(table|td|th)$/.test(kv(e))}function Rv(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zv=/transform|translate|scale|rotate|perspective|filter/,Bv=/paint|layout|strict|content/,Vv=e=>!!e&&e!==`none`,Hv;function Uv(e){let t=Nv(e)?qv(e):e;return Vv(t.transform)||Vv(t.translate)||Vv(t.scale)||Vv(t.rotate)||Vv(t.perspective)||!Gv()&&(Vv(t.backdropFilter)||Vv(t.filter))||zv.test(t.willChange||``)||Bv.test(t.contain||``)}function Wv(e){let t=Yv(e);for(;Pv(t)&&!Kv(t);){if(Uv(t))return t;if(Rv(t))return null;t=Yv(t)}return null}function Gv(){return Hv??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hv}function Kv(e){return/^(html|body|#document)$/.test(kv(e))}function qv(e){return Av(e).getComputedStyle(e)}function Jv(e){return Nv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yv(e){if(kv(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fv(e)&&e.host||jv(e);return Fv(t)?t.host:t}function Xv(e){let t=Yv(e);return Kv(t)?(e.ownerDocument||e).body:Pv(t)&&Iv(t)?t:Xv(t)}function Zv(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xv(e),i=r===e.ownerDocument?.body,a=Av(r);if(i){let e=Qv(a);return t.concat(a,a.visualViewport||[],Iv(r)?r:[],e&&n?Zv(e):[])}return t.concat(r,Zv(r,[],n))}function Qv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $v(e){let t=qv(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pv(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=H_(n)!==a||H_(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ey(e){return Nv(e)?e:e.contextElement}function ty(e){let t=ey(e);if(!Pv(t))return W_(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$v(t),o=(a?H_(n.width):n.width)/r,s=(a?H_(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ny=W_(0);function ry(e){let t=Av(e);return!Gv()||!t.visualViewport?ny:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iy(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Av(e)}function ay(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ey(e),o=W_(1);t&&(r?Nv(r)&&(o=ty(r)):o=ty(e));let s=iy(a,n,r)?ry(a):W_(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Av(a),t=Nv(r)?Av(r):r,n=e,i=Qv(n);for(;i&&t!==n;){let e=ty(i),t=i.getBoundingClientRect(),r=qv(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Av(i),i=Qv(n)}}return fv({width:u,height:d,x:c,y:l})}function oy(e,t){let n=Jv(e).scrollLeft;return t?t.left+n:ay(jv(e)).left+n}function sy(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oy(e,n),y:n.top+t.scrollTop}}function cy(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jv(r),s=t?Rv(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=W_(1),u=W_(0),d=Pv(r);if((d||!a)&&((kv(r)!==`body`||Iv(o))&&(c=Jv(r)),d)){let e=ay(r);l=ty(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sy(o,c):W_(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ly(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function uy(e){let t=Jv(e),n=e.ownerDocument.body,r=V_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=V_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+oy(e),o=-t.scrollTop;return qv(n).direction===`rtl`&&(a+=V_(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var dy=25;function fy(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Av(e),a=jv(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Gv()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(oy(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=dy&&(s-=o)}return{width:s,height:c,x:l,y:u}}function py(e,t){let n=ay(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ty(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function my(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=fy(e,n,t);else if(t===`document`)r=uy(jv(e));else if(Nv(t))r=py(t,n);else{let n=ry(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fv(r)}function hy(e,t){let n=t.get(e);if(n)return n;let r=Zv(e,[],!1).filter(e=>Nv(e)&&kv(e)!==`body`),i=null,a=qv(e).position===`fixed`,o=a?Yv(e):e;for(;Nv(o)&&!Kv(o);){let e=qv(o),t=Uv(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Yv(o)}return t.set(e,r),r}function gy(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rv(t)?[]:hy(t,this._c):[].concat(n),r],o=my(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=my(t,a[e],i);s=V_(n.top,s),c=B_(n.right,c),l=B_(n.bottom,l),u=V_(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function _y(e){let{width:t,height:n}=$v(e);return{width:t,height:n}}function vy(e,t,n){let r=Pv(t),i=jv(t),a=n===`fixed`,o=ay(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=W_(0);if((r||!a)&&((kv(t)!==`body`||Iv(i))&&(s=Jv(t)),r)){let e=ay(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=oy(i));let l=i&&!r&&!a?sy(i,s):W_(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function yy(e){return qv(e).position===`static`}function by(e,t){if(!Pv(e)||qv(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jv(e)===n&&(n=n.ownerDocument.body),n}function xy(e,t){let n=Av(e);if(Rv(e))return n;if(!Pv(e)){let t=Yv(e);for(;t&&!Kv(t);){if(Nv(t)&&!yy(t))return t;t=Yv(t)}return n}let r=by(e,t);for(;r&&Lv(r)&&yy(r);)r=by(r,t);return r&&Kv(r)&&yy(r)&&!Uv(r)?n:r||Wv(e)||n}var Sy=async function(e){let t=this.getOffsetParent||xy,n=this.getDimensions,r=await n(e.floating);return{reference:vy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cy(e){return qv(e).direction===`rtl`}var wy={convertOffsetParentRelativeRectToViewportRelativeRect:cy,getDocumentElement:jv,getClippingRect:gy,getOffsetParent:xy,getElementRects:Sy,getClientRects:ly,getDimensions:_y,getScale:ty,isElement:Nv,isRTL:Cy};function Ty(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ey(e,t,n){let r=null,i,a=jv(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=U_(d),h=U_(a.clientWidth-(u+f)),g=U_(a.clientHeight-(d+p)),_=U_(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:V_(0,B_(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ty(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Av(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Dy(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ey(e),u=i||a?[...l?Zv(l):[],...t?Zv(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ey(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ay(e):null;c&&g();function g(){let t=ay(e);h&&!Ty(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Oy=wv,ky=Tv,Ay=vv,jy=Dv,My=xv,Ny=_v,Py=Ev,Fy=(e,t,n)=>{let r=new Map,i=n??{},a={...wy,...i.platform,_c:r};return gv(e,t,{...i,platform:a})},Iy=typeof document<`u`?m.useLayoutEffect:function(){};function Ly(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ly(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ly(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ry(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zy(e,t){let n=Ry(e);return Math.round(t*n)/n}function By(e){let t=m.useRef(e);return Iy(()=>{t.current=e}),t}function Vy(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);Ly(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=By(c),O=By(i),k=By(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Fy(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Ly(T.current,t)&&(T.current=t,Dp.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Iy(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);Iy(()=>(j.current=!0,()=>{j.current=!1}),[]),Iy(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),te=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ne=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=zy(te.floating,u.x),r=zy(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ry(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:ee,elements:te,floatingStyles:ne}),[u,A,ee,te,ne])}var Hy=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ny({element:r.current,padding:i}).fn(n):r?Ny({element:r,padding:i}).fn(n):{}}}},Uy=(e,t)=>{let n=Oy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wy=(e,t)=>{let n=ky(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gy=(e,t)=>({fn:Py(e).fn,options:[e,t]}),Ky=(e,t)=>{let n=Ay(e);return{name:n.name,fn:n.fn,options:[e,t]}},qy=(e,t)=>{let n=jy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jy=(e,t)=>{let n=My(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yy=(e,t)=>{let n=Hy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xy=Object.defineProperty,Zy=(e,t)=>Xy(e,`name`,{value:t,configurable:!0});function Qy(e){let[t,n]=m.useState(void 0);return cp(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Zy(Qy,`useSize`);var $y=Object.defineProperty,eb=(e,t)=>$y(e,`name`,{value:t,configurable:!0}),tb=`Popper`,[nb,rb]=op(tb),[ib,ab]=nb(tb),ob=eb(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,h.jsx)(ib,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),sb=`PopperAnchor`,cb=m.forwardRef(eb(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=ab(sb,n),o=m.useRef(null),s=a.onAnchorChange,c=rp(t,m.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=m.useRef(null);m.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&hb(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,h.jsx)(Gp.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),lb=`PopperContent`,[ub,db]=nb(lb),fb=m.forwardRef(eb(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:g,..._}=e,v=ab(lb,n),[y,b]=m.useState(null),x=rp(t,b),[S,C]=m.useState(null),w=Qy(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(pb),altBoundary:A},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:ie}=Vy({strategy:`fixed`,placement:D,whileElementsMounted:eb((...e)=>Dy(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[Uy({mainAxis:i+E,alignmentAxis:o}),c&&Wy({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Gy():void 0,...j}),c&&Ky({...j}),qy({...j,apply:eb(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Yy({element:S,padding:s}),mb({arrowWidth:T,arrowHeight:E}),f&&Jy({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),ae=v.setPlacementState;cp(()=>(ae(ne),()=>{ae(void 0)}),[ne,ae]);let[M,oe]=hb(ne),se=Yp(g);cp(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=m.useState();return cp(()=>{y&&fe(window.getComputedStyle(y).zIndex)},[y]),(0,h.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,h.jsx)(ub,{scope:n,placedSide:M,placedAlign:oe,onArrowChange:C,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,h.jsx)(Gp.div,{"data-side":M,"data-align":oe,..._,ref:x,style:{..._.style,animation:re?_.style?.animation:`none`}})})})},`PopperContent`));function pb(e){return e!==null}eb(pb,`isNotNull`);var mb=eb(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=hb(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function hb(e){let[t,n=`center`]=e.split(`-`);return[t,n]}eb(hb,`getSideAndAlignFromPlacement`);var gb=ob,_b=cb,vb=fb,yb=Object.defineProperty,bb=(e,t)=>yb(e,`name`,{value:t,configurable:!0}),xb=!1;function Sb(){let[e,t]=m.useState(xb);return m.useEffect(()=>{xb||(xb=!0,t(!0))},[]),e}bb(Sb,`useIsHydrated`);var Cb=m.useSyncExternalStore;function wb(){return()=>{}}bb(wb,`subscribe`);function Tb(){return Cb(wb,()=>!0,()=>!1)}bb(Tb,`useIsHydratedModern`);var Eb=typeof Cb==`function`?Tb:Sb,Db=Object.defineProperty,Ob=(e,t)=>Db(e,`name`,{value:t,configurable:!0}),kb=`rovingFocusGroup.onEntryFocus`,Ab={bubbles:!1,cancelable:!0},jb=`RovingFocusGroup`,[Mb,Nb,Pb]=w_(jb),[Fb,Ib]=op(jb,[Pb]),[Lb,Rb]=Fb(jb),zb=m.forwardRef(Ob(function(e,t){return(0,h.jsx)(Mb.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)(Mb.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)(Bb,{...e,ref:t})})})},`RovingFocusGroup`)),Bb=m.forwardRef(Ob(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=m.useRef(null),p=rp(t,f),g=R_(a),[_,v]=Sp({prop:o,defaultProp:s??null,onChange:c,caller:jb}),[y,b]=m.useState(!1),x=Yp(l),S=Nb(n),C=m.useRef(!1),[w,T]=m.useState(0);return m.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(kb,x),()=>e.removeEventListener(kb,x)},[x]),(0,h.jsx)(Lb,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:m.useCallback(e=>v(e),[v]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:m.useCallback(()=>T(e=>e-1),[]),children:(0,h.jsx)(Gp.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:J(e.onMouseDown,()=>{C.current=!0}),onFocus:J(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(kb,Ab);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Kb([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:J(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),Vb=`RovingFocusGroupItem`,Hb=m.forwardRef(Ob(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=pp(),l=a||c,u=Rb(Vb,n),d=u.currentTabStopId===l,f=Nb(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:_}=u,v=Eb();return cp(()=>{if(v&&r)return p(),()=>g()},[v,r,p,g]),m.useEffect(()=>{if(!v&&r)return p(),()=>g()},[v,r,p,g]),(0,h.jsx)(Mb.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,h.jsx)(Gp.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:J(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:J(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:J(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Gb(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?qb(n,r+1):n.slice(r+1)}setTimeout(()=>Kb(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),Ub={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Wb(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Ob(Wb,`getDirectionAwareKey`);function Gb(e,t,n){let r=Wb(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ub[r]}Ob(Gb,`getFocusIntent`);function Kb(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Ob(Kb,`focusFirst`);function qb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Ob(qb,`wrapArray`);var Jb=zb,Yb=Hb,Xb=Object.defineProperty,Zb=(e,t)=>Xb(e,`name`,{value:t,configurable:!0}),Qb=[`Enter`,` `],$b=[`ArrowDown`,`PageUp`,`Home`],ex=[`ArrowUp`,`PageDown`,`End`],tx=[...$b,...ex];[...Qb],[...Qb];var nx=`Menu`,[rx,ix,ax]=w_(nx),[ox,sx]=op(nx,[ax,rb,Ib]),cx=rb(),lx=Ib(),[ux,dx]=ox(nx),[fx,px]=ox(nx),mx=Zb(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=cx(t),[c,l]=m.useState(null),u=m.useRef(!1),d=Yp(a),f=R_(i);return m.useEffect(()=>{let e=Zb(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Zb(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),m.useEffect(()=>{if(!n)return;let e=Zb(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,h.jsx)(gb,{...s,children:(0,h.jsx)(ux,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,h.jsx)(fx,{scope:t,onClose:m.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),hx=m.forwardRef(Zb(function(e,t){let{__scopeMenu:n,...r}=e,i=cx(n);return(0,h.jsx)(_b,{...i,...r,ref:t})},`MenuAnchor`)),gx=`MenuPortal`,[_x,vx]=ox(gx,{forceMount:void 0}),yx=Zb(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=dx(gx,t);return(0,h.jsx)(_x,{scope:t,forceMount:n,children:(0,h.jsx)(Mm,{present:n||a.open,children:(0,h.jsx)(Om,{asChild:!0,container:i,children:r})})})},`MenuPortal`),bx=`MenuContent`,[xx,Sx]=ox(bx),Cx=m.forwardRef(Zb(function(e,t){let n=vx(bx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=dx(bx,e.__scopeMenu),o=px(bx,e.__scopeMenu);return(0,h.jsx)(rx.Provider,{scope:e.__scopeMenu,children:(0,h.jsx)(Mm,{present:r||a.open,children:(0,h.jsx)(rx.Slot,{scope:e.__scopeMenu,children:o.modal?(0,h.jsx)(wx,{...i,ref:t}):(0,h.jsx)(Tx,{...i,ref:t})})})})},`MenuContent`)),wx=m.forwardRef(Zb(function(e,t){let n=dx(bx,e.__scopeMenu),r=m.useRef(null),i=rp(t,r);return m.useEffect(()=>{let e=r.current;if(e)return sg(e)},[]),(0,h.jsx)(Dx,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Tx=m.forwardRef(Zb(function(e,t){let n=dx(bx,e.__scopeMenu);return(0,h.jsx)(Dx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Ex=Ap(`MenuContent.ScrollLock`),Dx=m.forwardRef(Zb(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,..._}=e,v=dx(bx,n),y=px(bx,n),b=cx(n),x=lx(n),S=ix(n),[C,w]=m.useState(null),T=m.useRef(null),E=rp(t,T,v.onContentChange),D=m.useRef(0),O=m.useRef(``),k=m.useRef(0),A=m.useRef(null),j=m.useRef(`right`),ee=m.useRef(0),te=g?Qh:m.Fragment,ne=g?{as:Ex,allowPinchZoom:!0}:void 0,re=Zb(e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Gx(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Zb((function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);m.useEffect(()=>()=>window.clearTimeout(D.current),[]),Um();let ie=m.useCallback(e=>j.current===A.current?.side&&qx(e,A.current?.area),[]);return(0,h.jsx)(xx,{scope:n,searchRef:O,onItemEnter:m.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:m.useCallback(e=>{ie(e)||(T.current?.focus(),w(null))},[ie]),onTriggerLeave:m.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:k,onPointerGraceIntentChange:m.useCallback(e=>{A.current=e},[]),children:(0,h.jsx)(te,{...ne,children:(0,h.jsx)(hm,{asChild:!0,trapped:i,onMountAutoFocus:J(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,h.jsx)(rm,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,h.jsx)(Jb,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:J(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,h.jsx)(vb,{role:`menu`,"aria-orientation":`vertical`,"data-state":Bx(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:J(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=T.current;if(e.target!==i||!tx.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);ex.includes(e.key)&&a.reverse(),Ux(a)}),onBlur:J(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:J(e.onPointerMove,Jx(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;j.current=t,ee.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),Ox=m.forwardRef(Zb(function(e,t){let{__scopeMenu:n,...r}=e;return(0,h.jsx)(Gp.div,{...r,ref:t})},`MenuLabel`)),kx=`MenuItem`,Ax=`menu.itemSelect`,jx=m.forwardRef(Zb(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=m.useRef(null),o=px(kx,e.__scopeMenu),s=Sx(kx,e.__scopeMenu),c=rp(t,a),l=m.useRef(!1),u=Zb(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Ax,{bubbles:!0,cancelable:!0});e.addEventListener(Ax,e=>r?.(e),{once:!0}),Kp(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,h.jsx)(Mx,{...i,ref:c,disabled:n,onClick:J(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:J(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Qb.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Mx=m.forwardRef(Zb(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Sx(kx,n),s=lx(n),c=m.useRef(null),l=rp(t,c),[u,d]=m.useState(!1),[f,p]=m.useState(``);return m.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,h.jsx)(rx.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,h.jsx)(Yb,{asChild:!0,...s,focusable:!r,children:(0,h.jsx)(Gp.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:J(e.onPointerMove,Jx(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,Jx(e=>o.onItemLeave(e))),onFocus:J(e.onFocus,()=>d(!0)),onBlur:J(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Nx,Px]=ox(`MenuRadioGroup`,{value:void 0,onValueChange:Zb(()=>{},`onValueChange`)}),[Fx,Ix]=ox(`MenuItemIndicator`,{checked:!1}),Lx=m.forwardRef(Zb(function(e,t){let{__scopeMenu:n,...r}=e;return(0,h.jsx)(Gp.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Rx,zx]=ox(`MenuSub`);function Bx(e){return e?`open`:`closed`}Zb(Bx,`getOpenState`);function Vx(e){return e===`indeterminate`}Zb(Vx,`isIndeterminate`);function Hx(e){return Vx(e)?`indeterminate`:e?`checked`:`unchecked`}Zb(Hx,`getCheckedState`);function Ux(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Zb(Ux,`focusFirst`);function Wx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Zb(Wx,`wrapArray`);function Gx(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Wx(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Zb(Gx,`getNextMatch`);function Kx(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Zb(Kx,`isPointInPolygon`);function qx(e,t){return t?Kx({x:e.clientX,y:e.clientY},t):!1}Zb(qx,`isPointerInGraceArea`);function Jx(e){return t=>t.pointerType===`mouse`?e(t):void 0}Zb(Jx,`whenMouse`);var Yx=mx,Xx=hx,Zx=yx,Qx=Cx,$x=Ox,eS=jx,tS=Lx,nS=Object.defineProperty,rS=(e,t)=>nS(e,`name`,{value:t,configurable:!0}),iS=`DropdownMenu`,[aS,oS]=op(iS,[sx]),sS=sx(),[cS,lS]=aS(iS),uS=rS(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=sS(t),l=m.useRef(null),[u,d]=Sp({prop:i,defaultProp:a??!1,onChange:o,caller:iS});return(0,h.jsx)(cS,{scope:t,triggerId:pp(),triggerRef:l,contentId:pp(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,h.jsx)(Yx,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),dS=`DropdownMenuTrigger`,fS=m.forwardRef(rS(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=lS(dS,n),o=sS(n),s=rp(t,a.triggerRef);return(0,h.jsx)(Xx,{asChild:!0,...o,children:(0,h.jsx)(Gp.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:J(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:J(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),pS=rS(e=>{let{__scopeDropdownMenu:t,...n}=e,r=sS(t);return(0,h.jsx)(Zx,{...r,...n})},`DropdownMenuPortal`),mS=`DropdownMenuContent`,hS=m.forwardRef(rS(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=lS(mS,n),a=sS(n),o=m.useRef(!1);return(0,h.jsx)(Qx,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:J(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),gS=m.forwardRef(rS(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=sS(n);return(0,h.jsx)($x,{...i,...r,ref:t})},`DropdownMenuLabel`)),_S=m.forwardRef(rS(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=sS(n);return(0,h.jsx)(eS,{...i,...r,ref:t})},`DropdownMenuItem`)),vS=m.forwardRef(rS(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=sS(n);return(0,h.jsx)(tS,{...i,...r,ref:t})},`DropdownMenuSeparator`)),yS=uS,bS=fS,xS=pS,SS=hS,CS=gS,wS=_S,TS=vS,ES=`z-50 overflow-hidden rounded-[8px] border border-rule bg-surface py-1 shadow-pop outline-none data-[state=open]:animate-[q-pop_120ms_ease-out] data-[state=closed]:animate-[q-pop-out_100ms_ease-in_forwards]`;function DS({trigger:e,children:t,width:n=220,align:r=`start`,side:i=`bottom`,sideOffset:a=6,open:o,onOpenChange:s}){return(0,h.jsxs)(yS,{open:o,onOpenChange:s,modal:!1,children:[(0,h.jsx)(bS,{asChild:!0,children:e}),(0,h.jsx)(xS,{children:(0,h.jsx)(SS,{align:r,side:i,sideOffset:a,collisionPadding:12,className:ES,style:{width:n},children:t})})]})}var OS=(e,t)=>X(`flex min-h-9 w-full cursor-pointer items-center gap-2.5 border-0 px-3 py-1.5 text-left text-[13.5px] outline-none select-none`,`data-[highlighted]:bg-soft data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,t?`bg-soft`:`bg-transparent`,e?`text-danger-text`:`text-ink`);function kS({children:e,onSelect:t,danger:n,active:r,disabled:i,hint:a}){return(0,h.jsxs)(wS,{disabled:i,onSelect:t,className:OS(n,r),children:[e,a?(0,h.jsx)(`span`,{className:`ml-auto pl-3 text-[12px] text-muted`,children:a}):null]})}function AS(){return(0,h.jsx)(TS,{className:`my-1 h-px bg-rule`})}function jS({children:e}){return(0,h.jsx)(CS,{className:`px-3 pt-1.5 pb-1 text-[12px] text-muted`,children:e})}var MS=[{value:`system`,label:`System`,icon:`monitor`},{value:`light`,label:`Light`,icon:`sun`},{value:`dark`,label:`Dark`,icon:`moon`}];function NS(){let e=n_(),t=r_();return(0,h.jsxs)(DS,{align:`end`,width:180,trigger:(0,h.jsx)(y_,{icon:t===`dark`?`moon`:`sun`,label:`Appearance`}),children:[(0,h.jsx)(jS,{children:`Appearance`}),MS.map(t=>(0,h.jsxs)(kS,{active:e===t.value,onSelect:()=>t_(t.value),children:[(0,h.jsx)(Z,{name:t.icon,size:15,className:`text-ink2`}),t.label,e===t.value?(0,h.jsx)(Z,{name:`check`,size:15,className:`ml-auto text-ink2`}):null]},t.value))]})}function PS({size:e=24}){return(0,h.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 32 32`,"aria-hidden":`true`,className:`shrink-0`,children:[(0,h.jsx)(`rect`,{width:`32`,height:`32`,rx:`7`,className:`fill-primary`}),(0,h.jsx)(`rect`,{x:`7`,y:`7`,width:`8`,height:`11`,rx:`1.5`,className:`fill-primary-ink`}),(0,h.jsx)(`rect`,{x:`17`,y:`7`,width:`8`,height:`6`,rx:`1.5`,fill:`#f0a040`}),(0,h.jsx)(`rect`,{x:`17`,y:`15`,width:`8`,height:`10`,rx:`1.5`,className:`fill-primary-ink`}),(0,h.jsx)(`rect`,{x:`7`,y:`20`,width:`8`,height:`5`,rx:`1.5`,className:`fill-primary-ink`})]})}function FS({name:e}){return(0,h.jsxs)(Lf,{href:`/`,className:`flex min-w-0 items-center gap-2 text-[14px] font-semibold text-ink no-underline`,children:[(0,h.jsx)(PS,{}),(0,h.jsx)(`span`,{className:`truncate`,children:e??`Design`})]})}function IS({children:e,className:t}){return(0,h.jsx)(`header`,{className:X(`sticky top-0 z-30 flex h-[52px] shrink-0 items-center gap-3 border-b border-rule bg-surface px-4`,t),children:e})}var LS=[{to:`/`,label:`Canvases`,match:e=>e===`/`||e.startsWith(`/c/`)},{to:`/system`,label:`Design system`,match:e=>e.startsWith(`/system`)}];function RS(){let e=zg().data,[t]=jf();return(0,h.jsxs)(IS,{children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-6`,children:[(0,h.jsx)(FS,{name:e?.name}),(0,h.jsx)(`nav`,{className:`flex h-[52px] items-stretch gap-0.5 max-md:hidden`,children:LS.map(e=>{let n=e.match(t);return(0,h.jsxs)(Lf,{href:e.to,className:X(`relative flex items-center px-2.5 text-[14px] no-underline transition-colors`,n?`font-medium text-ink`:`text-ink2 hover:text-ink`),children:[e.label,n?(0,h.jsx)($d.span,{layoutId:`app-tab`,className:`absolute inset-x-2.5 bottom-0 h-[2px] bg-ink`,transition:{type:`spring`,stiffness:520,damping:42}}):null]},e.to)})})]}),(0,h.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,h.jsx)(p_,{}),(0,h.jsx)(NS,{})]})]})}var zS=Object.defineProperty,BS=(e,t)=>zS(e,`name`,{value:t,configurable:!0}),VS=`Popover`,[HS,US]=op(VS,[rb]),WS=rb(),[GS,KS]=HS(VS),qS=BS(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=WS(t),c=m.useRef(null),[l,u]=m.useState(!1),[d,f]=Sp({prop:r,defaultProp:i??!1,onChange:a,caller:VS});return(0,h.jsx)(gb,{...s,children:(0,h.jsx)(GS,{scope:t,contentId:pp(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),JS=`PopoverTrigger`,YS=m.forwardRef(BS(function(e,t){let{__scopePopover:n,...r}=e,i=KS(JS,n),a=WS(n),o=rp(t,i.triggerRef),s=(0,h.jsx)(Gp.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":oC(i.open),...r,ref:o,onClick:J(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,h.jsx)(_b,{asChild:!0,...a,children:s})},`PopoverTrigger`)),XS=`PopoverPortal`,[ZS,QS]=HS(XS,{forceMount:void 0}),$S=BS(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=KS(XS,t);return(0,h.jsx)(ZS,{scope:t,forceMount:n,children:(0,h.jsx)(Mm,{present:n||a.open,children:(0,h.jsx)(Om,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),eC=`PopoverContent`,tC=m.forwardRef(BS(function(e,t){let n=QS(eC,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=KS(eC,e.__scopePopover);return(0,h.jsx)(Mm,{present:r||a.open,children:a.modal?(0,h.jsx)(rC,{...i,ref:t}):(0,h.jsx)(iC,{...i,ref:t})})},`PopoverContent`)),nC=Ap(`PopoverContent.RemoveScroll`),rC=m.forwardRef(BS(function(e,t){let n=KS(eC,e.__scopePopover),r=m.useRef(null),i=rp(t,r),a=m.useRef(!1);return m.useEffect(()=>{let e=r.current;if(e)return sg(e)},[]),(0,h.jsx)(Qh,{as:nC,allowPinchZoom:!0,children:(0,h.jsx)(aC,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),iC=m.forwardRef(BS(function(e,t){let n=KS(eC,e.__scopePopover),r=m.useRef(!1),i=m.useRef(!1);return(0,h.jsx)(aC,{...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()}})},`PopoverContentNonModal`)),aC=m.forwardRef(BS(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=KS(eC,n),p=WS(n);return Um(),(0,h.jsx)(hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,h.jsx)(rm,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,h.jsx)(vb,{"data-state":oC(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function oC(e){return e?`open`:`closed`}BS(oC,`getState`);var sC=qS,cC=YS,lC=$S,uC=tC,dC=new qg([]),fC=1;function pC(e,t){let n=fC++;dC.set(r=>[...r.slice(-2),{id:n,title:e,text:t}]),setTimeout(()=>dC.set(e=>e.filter(e=>e.id!==n)),2200)}function mC(){let e=Jg(dC);return(0,h.jsx)(`div`,{className:`pointer-events-none fixed bottom-5 left-1/2 z-[60] flex -translate-x-1/2 flex-col items-center gap-2`,children:(0,h.jsx)(V,{children:e.map(e=>(0,h.jsxs)($d.div,{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:4,transition:{duration:.12}},transition:{type:`spring`,stiffness:520,damping:40},className:`flex max-w-[420px] items-center gap-2.5 rounded-[8px] border border-rule bg-surface px-3 py-2 text-[13px] text-ink shadow-pop`,children:[(0,h.jsx)(Z,{name:`check`,size:15,className:`text-ok-text`}),(0,h.jsx)(`span`,{className:`font-medium`,children:e.title}),e.text?(0,h.jsx)(`span`,{className:`truncate font-mono text-[12px] text-muted`,children:e.text}):null]},e.id))})})}async function hC(e,t=`Copied`){try{await navigator.clipboard.writeText(e),pC(t,e.length>64?void 0:e)}catch{pC(`Could not copy`,`The browser blocked clipboard access`)}}var gC=`design-inspect`;function _C(e){return!!e&&e.tagName.toLowerCase()===gC}function vC(e){return Number.parseFloat(e)||0}function yC(e){return Math.round(e*100)/100}function bC(e){let t=e.tagName.toLowerCase();if(e.id)return`${t}#${e.id}`;let n=xC(e).slice(0,2);return n.length?`${t}.${n.join(`.`)}`:t}function xC(e){let t=e.getAttribute(`class`);return t?t.split(/\s+/).filter(Boolean):[]}function SC(e){let t=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/.exec(e);if(!t)return e;let[n,r,i]=[t[1],t[2],t[3]].map(e=>Number(e).toString(16).padStart(2,`0`)),a=t[4]===void 0?1:Number(t[4]);return a===0?`transparent`:a<1?`#${n}${r}${i} · ${Math.round(a*100)}%`:`#${n}${r}${i}`}function CC(e){return e===`transparent`||/^rgba\(\d+,\s*\d+,\s*\d+,\s*0\)$/.test(e)}var wC=class{maps=new Map;constructor(e,t){let n=e.documentElement.dataset.theme===`dark`,r=e.createElement(`span`);r.style.display=`none`,(e.body??e.documentElement).appendChild(r);let i=e.defaultView,a=(e,t,n,a)=>{r.style.setProperty(t,n);let o=i.getComputedStyle(r).getPropertyValue(t);if(r.style.removeProperty(t),!o)return;let s=this.maps.get(e)??new Map;s.set(o,[...s.get(o)??[],{name:a.name,utility:a.utility}]),this.maps.set(e,s)};for(let e of t){let t=(n?e.dark??e.light:e.light)?.value;t&&!t.includes(`var(`)&&(e.kind===`color`?a(`color`,`color`,t,e):e.kind===`radius`?a(`radius`,`border-top-left-radius`,t,e):e.kind===`shadow`?a(`shadow`,`box-shadow`,t,e):e.kind===`font`?a(`font`,`font-family`,t,e):e.kind===`text`&&a(`text`,`font-size`,t,e))}r.remove()}find(e,t,n=[]){let r=this.maps.get(e)?.get(t);if(r?.length)return(r.find(e=>e.utility&&n.some(t=>t.split(`:`).at(-1).endsWith(`-${e.utility}`)))??r[0]).name}},TC=new Set([`Boundary`,`MotionComponent`,`MotionDOMComponent`,`PresenceChild`,`PopChild`,`PopChildMeasure`,`AnimatePresence`,`LayoutGroup`]);function EC(e){let t=Object.keys(e).find(e=>e.startsWith(`__reactFiber$`));return t?e[t]??null:null}function DC(e){let t=e.type;if(!t||typeof t==`string`)return null;let n=t;return typeof t==`function`?n.displayName||n.name||null:n.displayName?n.displayName:n.render?n.render.name||null:n.type&&typeof n.type==`function`&&n.type.name||null}function OC(e){let t=EC(e);if(!t)return;let n=[],r=t._debugOwner??null;for(;r&&n.length<5;){let e=DC(r);e&&!TC.has(e)&&n.at(-1)!==e&&n.push(e),r=r._debugOwner??null}if(!n.length)for(let e=t.return;e&&n.length<5;e=e.return){let t=DC(e);t&&!TC.has(t)&&n.at(-1)!==t&&n.push(t)}let i,a=t._debugStack?.stack??``;for(let e of a.split(`
|
|
58
|
+
`)){let t=/\/_fs\/([^?:)\s]+\.(?:tsx|jsx|ts|js|mjs|html))/.exec(e);if(t&&!/node_modules|(^|\/)\.cache\/|@fs\//.test(t[1])){i=`.design/${decodeURIComponent(t[1])}`;break}}return n.length||i?{owners:n,file:i}:void 0}function kC(e){for(let t of Array.from(e.childNodes))if(t.nodeType===3&&t.textContent?.trim())return!0;return!1}var AC=[[`display`,`Display`],[`position`,`Position`],[`flex-direction`,`Direction`],[`flex-wrap`,`Wrap`],[`justify-content`,`Justify`],[`align-items`,`Align`],[`gap`,`Gap`],[`grid-template-columns`,`Columns`],[`grid-template-rows`,`Rows`],[`overflow`,`Overflow`],[`z-index`,`Z-index`]];function jC(e,t){let n=e.ownerDocument.defaultView,r=n.getComputedStyle(e),i=e.getBoundingClientRect(),a=(e,t=``)=>[yC(vC(r.getPropertyValue(`${e}-top${t}`))),yC(vC(r.getPropertyValue(`${e}-right${t}`))),yC(vC(r.getPropertyValue(`${e}-bottom${t}`))),yC(vC(r.getPropertyValue(`${e}-left${t}`)))],o=xC(e),s=e=>({value:SC(e),css:e,token:t?.find(`color`,e,o)}),c=r.display,l=c.includes(`flex`),u=c.includes(`grid`),d=[];for(let[e,t]of AC){let n=r.getPropertyValue(e);n&&(![`flex-direction`,`flex-wrap`].includes(e)||l)&&(![`justify-content`,`align-items`,`gap`].includes(e)||l||u)&&(!e.startsWith(`grid-template`)||u&&n!==`none`)&&(e!==`position`||n!==`static`)&&(e!==`flex-wrap`||n!==`nowrap`)&&(e!==`overflow`||n!==`visible`)&&(e!==`z-index`||n!==`auto`)&&(e!==`justify-content`||n!==`normal`)&&(e!==`align-items`||n!==`normal`)&&(e!==`gap`||n!==`normal`)&&d.push([t,n])}let f=kC(e)||[`INPUT`,`TEXTAREA`,`BUTTON`,`SELECT`].includes(e.tagName),p=vC(r.borderTopWidth),m=r.borderTopLeftRadius,h=r.boxShadow,g=[];for(let t=e.parentElement;t&&t!==e.ownerDocument.documentElement&&t.id!==`root`&&t!==e.ownerDocument.body;t=t.parentElement)g.unshift({el:t,label:bC(t)});return{el:e,tag:e.tagName.toLowerCase(),label:bC(e),text:kC(e)?(e.textContent??``).trim().replace(/\s+/g,` `).slice(0,120):void 0,classes:xC(e),attributes:[`href`,`src`,`alt`,`type`,`role`,`aria-label`,`placeholder`,`name`,`for`].map(t=>[t,e.getAttribute(t)]).filter(e=>e[1]!==null&&e[1]!==``),component:OC(e),rect:{x:yC(i.left+n.scrollX),y:yC(i.top+n.scrollY),w:yC(i.width),h:yC(i.height)},margin:a(`margin`),border:a(`border`,`-width`),padding:a(`padding`),layout:d,typography:f?{family:r.fontFamily,familyToken:t?.find(`font`,r.fontFamily,o),size:r.fontSize,sizeToken:t?.find(`text`,r.fontSize,o),weight:r.fontWeight,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,color:s(r.color),align:r.textAlign,transform:r.textTransform===`none`?void 0:r.textTransform}:void 0,appearance:{background:CC(r.backgroundColor)?void 0:s(r.backgroundColor),backgroundImage:r.backgroundImage===`none`?void 0:r.backgroundImage,border:p>0&&r.borderTopStyle!==`none`?{width:r.borderTopWidth,style:r.borderTopStyle,color:s(r.borderTopColor)}:void 0,radius:vC(m)>0?{value:m,token:t?.find(`radius`,m,o)}:void 0,shadow:h===`none`?void 0:{value:h,token:t?.find(`shadow`,h,o)},opacity:r.opacity===`1`?void 0:r.opacity},path:g,children:Array.from(e.children).filter(e=>!_C(e)&&![`SCRIPT`,`STYLE`].includes(e.tagName)).slice(0,40).map(e=>({el:e,label:bC(e)}))}}function MC(e){let t=e.el.ownerDocument.defaultView.getComputedStyle(e.el),n=[`display`,`flex-direction`,`justify-content`,`align-items`,`gap`,`grid-template-columns`,`width`,`height`,`padding`,`margin`,`font-family`,`font-size`,`font-weight`,`line-height`,`letter-spacing`,`color`,`background-color`,`border`,`border-radius`,`box-shadow`,`opacity`].map(e=>[e,t.getPropertyValue(e)]).filter(([e,t])=>t&&![`normal`,`none`,`0px`,`auto`].includes(t)&&(e!==`opacity`||t!==`1`)).map(([e,t])=>` ${e}: ${t};`);return`${e.label} {\n${n.join(`
|
|
59
|
+
`)}\n}`}var NC=`
|
|
60
|
+
:host { all: initial; }
|
|
61
|
+
.m, .p, .c, .sel, .tag, .stag { position: fixed; pointer-events: none; box-sizing: border-box; display: none; }
|
|
62
|
+
.m { border-style: solid; border-color: rgba(246, 178, 107, 0.45); }
|
|
63
|
+
.p { border-style: solid; border-color: rgba(147, 196, 125, 0.5); }
|
|
64
|
+
.c { background: rgba(111, 168, 220, 0.4); }
|
|
65
|
+
.sel { outline: 2px solid #f0a040; outline-offset: -1px; }
|
|
66
|
+
.tag, .stag { font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; background: #1b1f24;
|
|
67
|
+
padding: 4px 6px; border-radius: 4px; white-space: nowrap; }
|
|
68
|
+
.stag { background: #a55700; }
|
|
69
|
+
`,PC=class{doc;host;parts;constructor(e){this.doc=e,this.host=e.createElement(gC),this.host.style.cssText=`position:fixed;inset:0;pointer-events:none;z-index:2147483647;display:block`;let t=this.host.attachShadow({mode:`open`});t.innerHTML=`<style>${NC}</style><div class="m"></div><div class="p"></div><div class="c"></div><div class="sel"></div><div class="tag"></div><div class="stag"></div>`;let n=e=>t.querySelector(`.${e}`);this.parts={m:n(`m`),p:n(`p`),c:n(`c`),sel:n(`sel`),tag:n(`tag`),stag:n(`stag`)},e.documentElement.appendChild(this.host)}place(e,t,n,r,i){e.style.display=`block`,e.style.left=`${t}px`,e.style.top=`${n}px`,e.style.width=`${Math.max(0,r)}px`,e.style.height=`${Math.max(0,i)}px`}hide(...e){for(let t of e)this.parts[t].style.display=`none`}label(e,t,n){e.textContent=t,e.style.display=`block`;let r=n.top>24;e.style.left=`${Math.max(2,n.left)}px`,e.style.top=`${r?n.top-22:n.bottom+4}px`}hover(e){if(!e)return this.hide(`m`,`p`,`c`,`tag`);let t=this.doc.defaultView.getComputedStyle(e),n=e.getBoundingClientRect(),[r,i,a,o]=[`Top`,`Right`,`Bottom`,`Left`].map(e=>vC(t.getPropertyValue(`margin-${e.toLowerCase()}`))),[s,c,l,u]=[`top`,`right`,`bottom`,`left`].map(e=>vC(t.getPropertyValue(`border-${e}-width`))),[d,f,p,m]=[`top`,`right`,`bottom`,`left`].map(e=>vC(t.getPropertyValue(`padding-${e}`)));this.place(this.parts.m,n.left-o,n.top-r,n.width+o+i,n.height+r+a),this.parts.m.style.borderWidth=`${r}px ${i}px ${a}px ${o}px`,this.place(this.parts.p,n.left+u,n.top+s,n.width-u-c,n.height-s-l),this.parts.p.style.borderWidth=`${d}px ${f}px ${p}px ${m}px`,this.place(this.parts.c,n.left+u+m,n.top+s+d,n.width-u-c-m-f,n.height-s-l-d-p),this.label(this.parts.tag,`${bC(e)} ${yC(n.width)} × ${yC(n.height)}`,n)}select(e){if(!e)return this.hide(`sel`,`stag`);let t=e.getBoundingClientRect();this.place(this.parts.sel,t.left,t.top,t.width,t.height),this.label(this.parts.stag,`${yC(t.width)} × ${yC(t.height)}`,t)}destroy(){this.host.remove()}};function FC(e,t){let n=null;try{n=e.contentDocument}catch{return null}if(!n?.documentElement)return null;let r=new PC(n),i=null,a=null,o=0,s=e=>{let t=e;return t?.nodeType!==1||_C(t)||t===n.documentElement||t===n.body?null:t},c=()=>{a&&!a.isConnected&&(a=null,t.onSelect(null)),r.hover(i&&i!==a?i:null),r.select(a),o=e.contentWindow.requestAnimationFrame(c)};o=e.contentWindow.requestAnimationFrame(c);let l=(e,n=!0)=>{a=e,n&&t.onSelect(e)},u=e=>{i=s(e.target)},d=e=>{e.relatedTarget||(i=null)},f=e=>{e.preventDefault(),e.stopImmediatePropagation()},p=e=>{f(e),l(s(e.target))},m=e=>{f(e),e.ctrlKey&&l(s(e.target))},h=e=>{e.key===`Escape`&&(e.stopImmediatePropagation(),a?l(null):t.onEscape())},g={capture:!0};n.addEventListener(`pointermove`,u,g),n.addEventListener(`mouseout`,d,g);for(let e of[`pointerdown`,`mousedown`,`pointerup`,`mouseup`,`dblclick`,`submit`])n.addEventListener(e,f,g);return n.addEventListener(`click`,p,g),n.addEventListener(`contextmenu`,m,g),n.addEventListener(`keydown`,h,g),n.documentElement.style.setProperty(`cursor`,`crosshair`,`important`),{select:l,detach(){e.contentWindow?.cancelAnimationFrame(o),n.removeEventListener(`pointermove`,u,g),n.removeEventListener(`mouseout`,d,g);for(let e of[`pointerdown`,`mousedown`,`pointerup`,`mouseup`,`dblclick`,`submit`])n.removeEventListener(e,f,g);n.removeEventListener(`click`,p,g),n.removeEventListener(`contextmenu`,m,g),n.removeEventListener(`keydown`,h,g),n.documentElement.style.removeProperty(`cursor`),r.destroy()}}}function IC(e,t,n){let r=zg().data,i=Vg(!!r?.system).data?.tokens,[a,o]=(0,m.useState)(null),[s,c]=(0,m.useState)(0),l=(0,m.useRef)(new Map),u=(0,m.useRef)(null);u.current=a;let d=(0,m.useRef)(n.onEscape);d.current=n.onEscape,(0,m.useEffect)(()=>{if(!t)return;let n=l.current,r=[];for(let t of e){let e=()=>{n.get(t)?.detach();let e=FC(t,{onSelect:e=>{for(let[e,r]of n)e!==t&&r.select(null,!1);o(e?{el:e,frame:t}:null)},onEscape:()=>d.current()});if(!e){n.delete(t);return}n.set(t,e);let r=u.current;r?.frame===t&&r.el.isConnected&&e.select(r.el,!1)};e(),t.addEventListener(`load`,e),r.push(()=>{t.removeEventListener(`load`,e),n.get(t)?.detach(),n.delete(t)})}return()=>{for(let e of r)e()}},[e,t]),(0,m.useEffect)(()=>{if(!a)return;let e=setInterval(()=>c(e=>e+1),700);return()=>clearInterval(e)},[a]);let f=(0,m.useMemo)(()=>{if(!a?.el.isConnected)return null;let e=a.el.ownerDocument,t=i?.length?new wC(e,i):null;return jC(a.el,t)},[a,i,s]);return{info:f,frame:f?a?.frame??null:null,select(e){let t=u.current?.frame;if(!e||!t){for(let e of l.current.values())e.select(null,!1);o(null);return}l.current.get(t)?.select(e,!1),o({el:e,frame:t})}}}function LC(e){let[t,n]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let t=e=>e===`Meta`||e===`Control`,r=!1,i=!1,a,o=()=>{r=!1,clearTimeout(a),n(!1)},s=e=>{if(t(e.key)){if(r)return;r=!0,i=!1,a=setTimeout(()=>{r&&!i&&n(!0)},150)}else r&&(i=!0,clearTimeout(a),n(!1))},c=e=>{t(e.key)&&o()},l=e=>{e.addEventListener(`keydown`,s,!0),e.addEventListener(`keyup`,c,!0),e.addEventListener(`blur`,o)},u=e=>{e.removeEventListener(`keydown`,s,!0),e.removeEventListener(`keyup`,c,!0),e.removeEventListener(`blur`,o)};l(window);let d=e.map(e=>{let t=null,n=()=>{t&&u(t);try{t=e.contentWindow,t&&l(t)}catch{t=null}};return n(),e.addEventListener(`load`,n),()=>{e.removeEventListener(`load`,n),t&&u(t)}});return()=>{u(window);for(let e of d)e();clearTimeout(a)}},[e]),t}function RC({title:e,children:t,right:n}){return(0,h.jsxs)(`section`,{className:`border-t border-rule pb-2 first:border-t-0`,children:[(0,h.jsxs)(`div`,{className:`flex h-9 items-center justify-between px-4 text-[12px] font-medium text-muted`,children:[e,n]}),t]})}function zC({label:e,children:t}){return(0,h.jsxs)(`div`,{className:`grid min-h-7 grid-cols-[92px_minmax(0,1fr)] items-center gap-x-3 px-4 py-0.5 text-[12.5px]`,children:[(0,h.jsx)(`span`,{className:`text-muted`,children:e}),(0,h.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-ink`,children:t})]})}function BC({name:e}){return e?(0,h.jsx)(`button`,{type:`button`,onClick:()=>void hC(`var(${e})`,`Token copied`),title:`Copy var()`,className:`shrink-0 cursor-pointer truncate rounded-[4px] border-0 bg-action-soft px-1.5 py-px font-mono text-[11px] text-action`,children:e}):null}function VC({children:e,title:t}){return(0,h.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[12px]`,title:t,children:e})}function HC({label:e,color:t}){return(0,h.jsxs)(zC,{label:e,children:[(0,h.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-[3px] shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]`,style:{background:t.css}}),(0,h.jsx)(VC,{title:t.css,children:t.value}),(0,h.jsx)(BC,{name:t.token})]})}var UC=e=>e?String(e):`–`;function WC({label:e,values:t,className:n,children:r}){let[i,a,o,s]=t;return(0,h.jsxs)(`div`,{className:X(`relative grid grid-cols-[28px_minmax(0,1fr)_28px] grid-rows-[20px_auto_20px] rounded-[4px]`,n),children:[(0,h.jsx)(`span`,{className:`absolute top-1 left-1.5 text-[9.5px] tracking-wide text-muted uppercase`,children:e}),(0,h.jsx)(`span`,{className:`col-start-2 self-center text-center`,children:UC(i)}),(0,h.jsx)(`span`,{className:`row-start-2 self-center text-center`,children:UC(s)}),(0,h.jsx)(`div`,{className:`row-start-2 col-start-2`,children:r}),(0,h.jsx)(`span`,{className:`row-start-2 col-start-3 self-center text-center`,children:UC(a)}),(0,h.jsx)(`span`,{className:`row-start-3 col-start-2 self-center text-center`,children:UC(o)})]})}function GC({info:e}){let t={w:Math.max(0,e.rect.w-e.border[1]-e.border[3]-e.padding[1]-e.padding[3]),h:Math.max(0,e.rect.h-e.border[0]-e.border[2]-e.padding[0]-e.padding[2])};return(0,h.jsx)(`div`,{className:`px-4 pt-1 pb-2 font-mono text-[11px] text-ink2`,children:(0,h.jsx)(WC,{label:`margin`,values:e.margin,className:`border border-dashed border-rule-strong bg-[#f6b26b]/15`,children:(0,h.jsx)(WC,{label:`border`,values:e.border,className:`border border-rule-strong bg-[#f9e27d]/15`,children:(0,h.jsx)(WC,{label:`padding`,values:e.padding,className:`border border-rule-strong bg-[#93c47d]/20`,children:(0,h.jsxs)(`div`,{className:`flex h-8 items-center justify-center rounded-[3px] border border-rule-strong bg-[#6fa8dc]/25 text-ink`,children:[Math.round(t.w*100)/100,` × `,Math.round(t.h*100)/100]})})})})})}function KC({info:e,onSelect:t}){return(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 px-4 pb-2`,children:[e.path.slice(-4).map((e,n)=>(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`button`,{type:`button`,onClick:()=>t(e.el),className:`cursor-pointer rounded-[4px] border-0 bg-soft2 px-1.5 py-0.5 font-mono text-[11px] text-ink2 hover:text-ink`,children:e.label}),(0,h.jsx)(Z,{name:`chevron-right`,size:11,className:`text-muted`})]},n)),(0,h.jsx)(`span`,{className:`rounded-[4px] bg-action-soft px-1.5 py-0.5 font-mono text-[11px] text-action`,children:e.label})]})}function qC({info:e,onSelect:t,onClose:n,active:r}){return(0,h.jsxs)(`aside`,{"data-ui":!0,className:`flex w-[320px] shrink-0 flex-col overflow-hidden border-l border-rule bg-surface`,children:[(0,h.jsxs)(`div`,{className:`flex h-[46px] shrink-0 items-center justify-between border-b border-rule pr-2 pl-4`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2 text-[14px] font-semibold`,children:[(0,h.jsx)(Z,{name:`pointer`,size:15,className:`text-action`}),` Inspect`]}),(0,h.jsx)(y_,{icon:`x`,label:`Close inspector (I)`,onClick:n})]}),e?(0,h.jsxs)(`div`,{className:`min-h-0 grow overflow-y-auto`,children:[(0,h.jsxs)(RC,{title:`Element`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-1 px-4 pb-2`,children:[(0,h.jsx)(`div`,{className:`flex min-w-0 items-baseline gap-1.5`,children:e.component?.owners[0]?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`span`,{className:`truncate font-mono text-[14px] font-medium text-ink`,children:[`<`,e.component.owners[0],`>`]}),(0,h.jsx)(`span`,{className:`truncate font-mono text-[12px] text-muted`,children:e.tag})]}):(0,h.jsx)(`span`,{className:`truncate font-mono text-[14px] font-medium text-ink`,children:e.label})}),e.component&&e.component.owners.length>1?(0,h.jsxs)(`span`,{className:`truncate text-[12px] text-muted`,children:[`in `,e.component.owners.slice(1).join(` ← `)]}):null,e.component?.file?(0,h.jsx)(`button`,{type:`button`,onClick:()=>void hC(e.component.file,`Path copied`),className:`w-fit max-w-full cursor-pointer truncate border-0 bg-transparent p-0 text-left font-mono text-[11.5px] text-muted hover:text-ink2`,title:`Copy path`,children:e.component.file}):null,e.text?(0,h.jsxs)(`span`,{className:`line-clamp-2 text-[12.5px] text-ink2`,children:[`“`,e.text,`”`]}):null]}),(0,h.jsx)(KC,{info:e,onSelect:t})]}),(0,h.jsxs)(RC,{title:`Box`,children:[(0,h.jsx)(GC,{info:e}),(0,h.jsx)(zC,{label:`Size`,children:(0,h.jsxs)(VC,{children:[e.rect.w,` × `,e.rect.h]})}),(0,h.jsx)(zC,{label:`Position`,children:(0,h.jsxs)(VC,{children:[`x `,e.rect.x,` · y `,e.rect.y]})})]}),e.layout.length?(0,h.jsx)(RC,{title:`Layout`,children:e.layout.map(([e,t])=>(0,h.jsx)(zC,{label:e,children:(0,h.jsx)(VC,{title:t,children:t})},e))}):null,e.typography?(0,h.jsxs)(RC,{title:`Typography`,children:[(0,h.jsxs)(zC,{label:`Font`,children:[(0,h.jsx)(VC,{title:e.typography.family,children:e.typography.family.split(`,`)[0]?.replace(/["']/g,``)}),(0,h.jsx)(BC,{name:e.typography.familyToken})]}),(0,h.jsxs)(zC,{label:`Size`,children:[(0,h.jsxs)(VC,{children:[e.typography.size,` / `,e.typography.lineHeight]}),(0,h.jsx)(BC,{name:e.typography.sizeToken})]}),(0,h.jsx)(zC,{label:`Weight`,children:(0,h.jsx)(VC,{children:e.typography.weight})}),e.typography.letterSpacing===`normal`?null:(0,h.jsx)(zC,{label:`Tracking`,children:(0,h.jsx)(VC,{children:e.typography.letterSpacing})}),(0,h.jsx)(HC,{label:`Color`,color:e.typography.color}),e.typography.align===`start`?null:(0,h.jsx)(zC,{label:`Align`,children:(0,h.jsx)(VC,{children:e.typography.align})}),e.typography.transform?(0,h.jsx)(zC,{label:`Transform`,children:(0,h.jsx)(VC,{children:e.typography.transform})}):null]}):null,Object.values(e.appearance).some(Boolean)?(0,h.jsxs)(RC,{title:`Appearance`,children:[e.appearance.background?(0,h.jsx)(HC,{label:`Background`,color:e.appearance.background}):null,e.appearance.backgroundImage?(0,h.jsx)(zC,{label:`Image`,children:(0,h.jsx)(VC,{title:e.appearance.backgroundImage,children:e.appearance.backgroundImage})}):null,e.appearance.border?(0,h.jsxs)(zC,{label:`Border`,children:[(0,h.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-[3px] shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]`,style:{background:e.appearance.border.color.css}}),(0,h.jsxs)(VC,{children:[e.appearance.border.width,` `,e.appearance.border.style,` `,e.appearance.border.color.value]}),(0,h.jsx)(BC,{name:e.appearance.border.color.token})]}):null,e.appearance.radius?(0,h.jsxs)(zC,{label:`Radius`,children:[(0,h.jsx)(VC,{children:e.appearance.radius.value}),(0,h.jsx)(BC,{name:e.appearance.radius.token})]}):null,e.appearance.shadow?(0,h.jsxs)(zC,{label:`Shadow`,children:[(0,h.jsx)(VC,{title:e.appearance.shadow.value,children:e.appearance.shadow.value}),(0,h.jsx)(BC,{name:e.appearance.shadow.token})]}):null,e.appearance.opacity?(0,h.jsx)(zC,{label:`Opacity`,children:(0,h.jsx)(VC,{children:e.appearance.opacity})}):null]}):null,e.classes.length?(0,h.jsx)(RC,{title:`Classes`,right:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void hC(e.classes.join(` `),`Classes copied`),className:`cursor-pointer border-0 bg-transparent text-[12px] text-muted hover:text-ink2`,children:`Copy`}),children:(0,h.jsx)(`div`,{className:`flex flex-wrap gap-1 px-4 pb-1`,children:e.classes.map(e=>(0,h.jsx)(`span`,{className:`rounded-[4px] bg-soft2 px-1.5 py-0.5 font-mono text-[11px] text-ink2`,children:e},e))})}):null,e.attributes.length?(0,h.jsx)(RC,{title:`Attributes`,children:e.attributes.map(([e,t])=>(0,h.jsx)(zC,{label:e,children:(0,h.jsx)(VC,{title:t,children:t})},e))}):null,e.children.length?(0,h.jsx)(RC,{title:`Children · ${e.children.length}`,children:(0,h.jsx)(`div`,{className:`flex flex-col px-2 pb-1`,children:e.children.map((e,n)=>(0,h.jsxs)(`button`,{type:`button`,onClick:()=>t(e.el),className:`flex h-7 cursor-pointer items-center gap-2 rounded-[6px] border-0 bg-transparent px-2 text-left font-mono text-[12px] text-ink2 hover:bg-soft2`,children:[(0,h.jsx)(Z,{name:`chevron-right`,size:12,className:`text-muted`}),(0,h.jsx)(`span`,{className:`truncate`,children:e.label})]},n))})}):null]}):(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-6 py-10 text-center`,children:[(0,h.jsx)(Z,{name:`pointer`,size:22,className:`text-muted`}),(0,h.jsx)(`span`,{className:`text-[13.5px] text-ink2`,children:r?`Click an element in any screen.`:`Hold ${d_} to highlight, click to inspect.`}),(0,h.jsx)(`span`,{className:`text-[12.5px] leading-[1.5] text-muted`,children:`Hover shows margin, padding and content. Clicks go to the inspector, not the screen.`}),(0,h.jsxs)(`span`,{className:`mt-2 flex items-center gap-1.5 text-[12px] text-muted`,children:[(0,h.jsx)(a_,{children:`I`}),` toggle · hold `,(0,h.jsx)(a_,{children:d_}),` · `,(0,h.jsx)(a_,{children:`esc`}),` clear`]})]}),e?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-2 border-t border-rule bg-soft px-4 py-2.5`,children:(0,h.jsx)(g_,{icon:`copy`,onClick:()=>void hC(MC(e),`CSS copied`),className:`grow`,children:`Copy CSS`})}):null]})}var JC={neutral:`bg-soft2 text-ink2`,action:`bg-action-soft text-action`,ok:`bg-ok-soft text-ok-text`,danger:`bg-danger-soft text-danger-text`};function YC({tone:e=`neutral`,children:t,className:n}){return(0,h.jsx)(`span`,{className:X(`inline-flex h-[22px] shrink-0 items-center whitespace-nowrap rounded-[6px] px-2 text-[12px] font-medium`,JC[e],n),children:t})}function XC({value:e,tone:t=`neutral`}){return(0,h.jsx)(`span`,{className:X(`inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-[4px] px-[5px] text-[11.5px] font-semibold tabular`,t===`action`?`bg-action-soft text-action`:t===`danger`?`bg-danger-soft text-danger-text`:`bg-soft2 text-ink2`),children:e})}function ZC({children:e,className:t,style:n}){return(0,h.jsx)(`section`,{className:X(`min-w-0 shrink-0 overflow-hidden rounded-[10px] border border-rule bg-surface`,t),style:n,children:e})}function QC({title:e,count:t,sub:n,right:r,as:i=`h2`}){return(0,h.jsxs)(`div`,{className:`flex min-h-[46px] items-center justify-between gap-3 px-4`,children:[(0,h.jsxs)(i,{className:`m-0 flex min-w-0 items-center gap-2 whitespace-nowrap text-[14px] font-semibold`,children:[e,t===void 0?null:(0,h.jsx)(XC,{value:t}),n?(0,h.jsx)(`span`,{className:`truncate text-[12.5px] font-normal text-muted`,children:n}):null]}),r?(0,h.jsx)(`div`,{className:`flex items-center gap-2`,children:r}):null]})}function $C({items:e,value:t,onChange:n,right:r}){let i=(0,m.useId)();return(0,h.jsxs)(`div`,{className:`flex h-[46px] items-center justify-between gap-3 px-4`,children:[(0,h.jsx)(`div`,{role:`tablist`,className:`flex gap-5`,children:e.map(e=>{let r=e.value===t;return(0,h.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>n(e.value),className:X(`relative flex h-[46px] cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0.5 text-[14px] transition-colors`,r?`font-semibold text-ink`:`font-medium text-ink2 hover:text-ink`),children:[e.label,e.count===void 0?null:(0,h.jsx)(XC,{value:e.count}),r?(0,h.jsx)($d.span,{layoutId:i,className:`absolute inset-x-0 bottom-0 h-[2px] bg-ink`,transition:{type:`spring`,stiffness:520,damping:42}}):null]},e.value)})}),r?(0,h.jsx)(`div`,{className:`flex items-center gap-2`,children:r}):null]})}function ew({align:e,children:t}){return(0,h.jsx)(`div`,{className:X(`flex min-w-0 items-center gap-2`,e===`r`&&`justify-end text-right`,e===`c`&&`justify-center`),children:t})}function tw(e,t){return m.Children.toArray(e).map((e,n)=>(0,h.jsx)(ew,{align:t?.[n]??`l`,children:e},n))}function nw({cols:e,align:t,labels:n}){return(0,h.jsx)(`div`,{className:`grid h-8 items-center gap-x-4 border-t border-rule bg-soft px-4 text-[12.5px] text-muted`,style:{gridTemplateColumns:e},children:n.map((e,n)=>(0,h.jsx)(ew,{align:t?.[n]??`l`,children:(0,h.jsx)(`span`,{className:`whitespace-nowrap`,children:e})},n))})}var rw=(e,t,n)=>X(`grid items-center gap-x-4 border-rule`,!e&&`border-t`,t&&`cursor-pointer transition-colors hover:bg-soft`,n);function iw({cols:e,align:t,minH:n=44,pad:r=`10px 16px`,children:i,first:a,className:o,onClick:s,title:c}){return(0,h.jsx)(`div`,{className:rw(a,!!s,o),style:{gridTemplateColumns:e,minHeight:n,padding:r},onClick:s,title:c,children:tw(i,t)})}function aw({to:e,cols:t,align:n,minH:r=44,pad:i=`10px 16px`,first:a,className:o,children:s}){return(0,h.jsx)(Lf,{href:e,className:X(rw(a,!0,o),`text-inherit no-underline`),style:{gridTemplateColumns:t,minHeight:r,padding:i},children:tw(s,n)})}function ow({label:e,children:t,labelWidth:n=180,minH:r=40,end:i=!1}){return(0,h.jsxs)(`div`,{className:`grid content-center items-baseline gap-x-4 border-t border-rule px-4 py-2`,style:{gridTemplateColumns:`${n}px minmax(0, 1fr)`,minHeight:r},children:[(0,h.jsx)(`span`,{className:`text-[13px] text-muted`,children:e}),(0,h.jsx)(`div`,{className:X(`flex min-w-0 flex-wrap items-center gap-2`,i&&`justify-end`),children:t})]})}function sw({children:e,pad:t=`16px`,gap:n=16,top:r=!0,className:i}){return(0,h.jsx)(`div`,{className:X(`flex flex-col`,r&&`border-t border-rule`,i),style:{padding:t,gap:n},children:e})}function cw({issues:e,className:t}){return(0,h.jsx)(`div`,{className:X(`flex flex-col`,t),children:e.map((e,t)=>(0,h.jsxs)(`div`,{className:`flex items-start gap-2.5 border-t border-rule px-4 py-2.5 text-[13px] first:border-t-0`,children:[(0,h.jsx)(Z,{name:e.severity===`error`?`alert`:`info`,size:15,className:X(`mt-0.5`,e.severity===`error`?`text-danger-text`:`text-action`)}),(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(`span`,{className:`text-ink`,children:e.message}),(0,h.jsxs)(`span`,{className:`font-mono text-[12px] break-all text-muted`,children:[e.file,e.at?` · ${e.at}`:``]})]})]},t))})}function lw({issues:e,title:t=`Problems`}){if(!e.length)return null;let n=e.filter(e=>e.severity===`error`).length;return(0,h.jsxs)(ZC,{className:n?`border-danger/40`:void 0,children:[(0,h.jsx)(QC,{title:t,count:e.length,sub:n?`${n} blocking`:`warnings`}),(0,h.jsx)(`div`,{className:`border-t border-rule`,children:(0,h.jsx)(cw,{issues:e})})]})}var uw=[.2,.7,.2,1];function dw({open:e,side:t,width:n,children:r}){return(0,h.jsx)(V,{initial:!1,children:e?(0,h.jsx)($d.div,{initial:{width:0,opacity:.6},animate:{width:n,opacity:1},exit:{width:0,opacity:.6},transition:{duration:.22,ease:uw},className:X(`flex min-h-0 shrink-0 overflow-hidden`,t===`right`?`justify-start`:`justify-end`),children:(0,h.jsx)(`div`,{className:`flex min-h-0 shrink-0`,style:{width:n},children:r})},`panel`):null})}var fw=new Map;window.addEventListener(`message`,e=>{let t=e.data;t?.source===`design-runtime`&&e.source&&fw.get(e.source)?.(t)});function pw(e,t){let n=null,r=()=>{n&&fw.delete(n),n=e.contentWindow,n&&fw.set(n,t)};return r(),e.addEventListener(`load`,r),()=>{e.removeEventListener(`load`,r),n&&fw.delete(n)}}function mw(e){e?.contentWindow?.postMessage({source:`design-viewer`,type:`canvas`},`*`)}function hw(e,t){e?.contentWindow?.postMessage({source:`design-viewer`,type:`theme`,theme:t},`*`)}function gw(e,t,n){let[r,i=``]=e.split(`?`),a=new URLSearchParams(i);a.set(`theme`,t);for(let[e,t]of Object.entries(n??{}))a.set(e,t);return`${r}?${a.toString()}`}function _w(e){return new URL(e,document.baseURI).toString()}function vw({items:e,value:t,onChange:n,label:r,stretch:i,size:a=`ctrl`}){let o=(0,m.useId)();return(0,h.jsx)(`div`,{role:`group`,"aria-label":r,className:X(`shrink-0 items-center gap-0.5 rounded-[6px] bg-track p-[3px]`,a===`ctrl`?`h-ctrl`:`h-7`,i?`flex`:`inline-flex`),children:e.map(e=>{let r=e.value===t;return(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":r,title:e.title,onClick:()=>n(e.value),className:X(`relative flex h-full cursor-pointer items-center justify-center whitespace-nowrap rounded-[4px] border-0 bg-transparent font-medium transition-colors`,a===`ctrl`?`px-2.5 text-ctrl`:`px-2 text-[12.5px]`,i&&`flex-1`,r?`text-ink`:`text-muted hover:text-ink2`),children:[r?(0,h.jsx)($d.span,{layoutId:o,className:`absolute inset-0 rounded-[4px] bg-surface shadow-[0_1px_2px_rgba(0,0,0,0.10)]`,transition:{type:`spring`,stiffness:520,damping:42}}):null,(0,h.jsx)(`span`,{className:`relative flex items-center gap-1.5`,children:e.label})]},e.value)})})}function yw({children:e,className:t,gap:n=20,wide:r=!1}){return(0,h.jsx)(`main`,{className:X(`mx-auto flex w-full min-h-0 grow flex-col px-8 pt-6 pb-7 animate-[q-fade-in_160ms_ease-out] max-md:px-4 max-md:pt-4`,r?`max-w-[1440px]`:`max-w-[1200px]`,t),style:{gap:n},children:e})}function bw({title:e,sub:t,right:n,badge:r,crumbs:i}){return(0,h.jsxs)(`div`,{className:`flex shrink-0 items-end justify-between gap-6 max-md:flex-col max-md:items-stretch max-md:gap-3`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[i?(0,h.jsx)(`div`,{className:`flex items-center gap-1.5 text-[13px] text-muted`,children:i}):null,(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h1`,{className:`m-0 text-[22px] font-semibold tracking-[-0.01em]`,children:e}),r]}),t?(0,h.jsx)(`div`,{className:`text-[13px] text-muted`,children:t}):null]}),n?(0,h.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:n}):null]})}function xw({items:e,label:t}){return(0,h.jsx)(`nav`,{"aria-label":t,className:`flex flex-col gap-0.5`,children:e.map(e=>(0,h.jsxs)(Lf,{href:e.to,className:e=>X(`flex h-8 items-center gap-2 whitespace-nowrap rounded-[6px] px-3 text-[13.5px] no-underline transition-colors focus-visible:outline-offset-[-2px]`,e?`bg-soft2 font-medium text-ink`:`text-ink2 hover:bg-soft2`),children:[(0,h.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),e.hint?(0,h.jsx)(`span`,{className:`ml-auto text-[12px] font-normal text-muted`,children:e.hint}):null]},e.to))})}function Sw({children:e}){return(0,h.jsx)(`div`,{className:`px-3 pt-4 pb-1 text-[12px] text-muted`,children:e})}function Cw({title:e,text:t,action:n}){return(0,h.jsxs)(ZC,{className:`flex w-[480px] max-w-full flex-col items-center gap-2 px-6 py-8 text-center`,children:[(0,h.jsx)(`h1`,{className:`m-0 text-[16px] font-semibold`,children:e}),t?(0,h.jsx)(`div`,{className:`m-0 max-w-[400px] text-[14px] text-ink2`,children:t}):null,n?(0,h.jsx)(`div`,{className:`mt-3 flex flex-wrap justify-center gap-2`,children:n}):null]})}function ww(e){return(0,h.jsx)(`div`,{className:`flex min-h-[50vh] grow items-center justify-center p-6 max-md:px-4`,children:(0,h.jsx)(Cw,{...e})})}var Tw=Object.defineProperty,Ew=(e,t)=>Tw(e,`name`,{value:t,configurable:!0}),Dw=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Ow=m.forwardRef(Ew(function(e,t){return(0,h.jsx)(Gp.span,{...e,ref:t,style:{...Dw,...e.style}})},`VisuallyHidden`)),kw=Object.defineProperty,Aw=(e,t)=>kw(e,`name`,{value:t,configurable:!0}),[jw,Mw]=op(`Tooltip`,[rb]),Nw=rb(),Pw=`TooltipProvider`,Fw=700,Iw=`tooltip.open`,[Lw,Rw]=jw(Pw),zw=Aw(e=>{let{__scopeTooltip:t,delayDuration:n=Fw,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=m.useRef(!0),s=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,h.jsx)(Lw,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:m.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Bw=`Tooltip`,[Vw,Hw]=jw(Bw),Uw=Aw(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Rw(Bw,e.__scopeTooltip),l=Nw(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),g=pp(),_=m.useRef(0),v=o??c.disableHoverableContent,y=s??c.delayDuration,b=m.useRef(!1),[x,S]=Sp({prop:r,defaultProp:i??!1,onChange:Aw(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Iw))):c.onClose(),a?.(e)},`onChange`),caller:Bw}),C=m.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=m.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=m.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=m.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);m.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=f??g;return(0,h.jsx)(gb,{...l,children:(0,h.jsx)(Vw,{scope:t,contentId:D,setContentId:p,open:x,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:m.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),Ww=`TooltipTrigger`,Gw=m.forwardRef(Aw(function(e,t){let{__scopeTooltip:n,...r}=e,i=Hw(Ww,n),a=Rw(Ww,n),o=Nw(n),s=rp(t,m.useRef(null),i.onTriggerChange),c=m.useRef(!1),l=m.useRef(!1),u=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,h.jsx)(_b,{asChild:!0,...o,children:(0,h.jsx)(Gp.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:J(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:J(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:J(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:J(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:J(e.onBlur,i.onClose),onClick:J(e.onClick,i.onClose)})})},`TooltipTrigger`)),Kw=`TooltipPortal`,[qw,Jw]=jw(Kw,{forceMount:void 0}),Yw=Aw(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Hw(Kw,t);return(0,h.jsx)(qw,{scope:t,forceMount:n,children:(0,h.jsx)(Mm,{present:n||a.open,children:(0,h.jsx)(Om,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Xw=`TooltipContent`,Zw=m.forwardRef(Aw(function(e,t){let n=Jw(Xw,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Hw(Xw,e.__scopeTooltip);return(0,h.jsx)(Mm,{present:r||o.open,children:o.disableHoverableContent?(0,h.jsx)(eT,{side:i,...a,ref:t}):(0,h.jsx)(Qw,{side:i,...a,ref:t})})},`TooltipContent`)),Qw=m.forwardRef(Aw(function(e,t){let n=Hw(Xw,e.__scopeTooltip),r=Rw(Xw,e.__scopeTooltip),i=m.useRef(null),a=rp(t,i),[o,s]=m.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=m.useCallback(()=>{s(null),d(!1)},[d]),p=m.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=nT(r,tT(r,n.getBoundingClientRect())),a=rT(t.getBoundingClientRect()),o=aT([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=Aw(e=>p(e,u),`handleTriggerLeave`),t=Aw(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),m.useEffect(()=>{if(o){let e=Aw(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!iT(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,h.jsx)(eT,{...e,ref:a})},`TooltipContentHoverable`)),$w=Mp(`TooltipContent`),eT=m.forwardRef(Aw(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Hw(Xw,n),u=Nw(n),{onClose:d}=l;m.useEffect(()=>(document.addEventListener(Iw,d),()=>document.removeEventListener(Iw,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=Aw(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return cp(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,h.jsx)(rm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,h.jsxs)(vb,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,h.jsx)($w,{children:r}),i?(0,h.jsx)(Ow,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function tT(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Aw(tT,`getExitSideFromRect`);function nT(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Aw(nT,`getPaddedExitPoints`);function rT(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Aw(rT,`getPointsFromRect`);function iT(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Aw(iT,`isPointInPolygon`);function aT(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),oT(t)}Aw(aT,`getHull`);function oT(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Aw(oT,`getHullPresorted`);var sT=zw,cT=Uw,lT=Gw,uT=Yw,dT=Zw;function fT({children:e}){return(0,h.jsx)(sT,{delayDuration:250,children:e})}var pT=`z-50 max-w-[280px] rounded-[8px] border border-rule bg-surface px-[10px] py-[7px] text-[12.5px] leading-[1.35] text-ink shadow-pop outline-none data-[state=delayed-open]:animate-[q-pop_120ms_ease-out] data-[state=closed]:animate-[q-pop-out_100ms_ease-in_forwards]`;function mT({content:e,children:t,side:n=`top`,align:r=`center`,className:i}){return(0,h.jsxs)(cT,{children:[(0,h.jsx)(lT,{asChild:!0,children:t}),(0,h.jsx)(uT,{children:(0,h.jsx)(dT,{side:n,align:r,sideOffset:6,collisionPadding:12,className:X(pT,i),children:e})})]})}function hT({title:e=`Nothing here`,text:t}){return(0,h.jsx)(ww,{title:e,text:t??`This address does not match a canvas or a page of the design system.`,action:(0,h.jsx)(b_,{to:`/`,children:`All canvases`})})}var gT=.02,_T=e=>Math.min(8,Math.max(gT,e)),vT=class{camera={x:0,y:0,z:1};listeners=new Set;animation=0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}set(e){this.camera={x:e.x,y:e.y,z:_T(e.z)};for(let e of this.listeners)e(this.camera)}interrupt(){cancelAnimationFrame(this.animation),this.animation=0}panBy(e,t){this.interrupt();let{x:n,y:r,z:i}=this.camera;this.set({x:n+e,y:r+t,z:i})}zoomAt(e,t,n){this.interrupt();let{x:r,y:i,z:a}=this.camera,o=_T(a*n),s=(e-r)/a,c=(t-i)/a;this.set({x:e-s*o,y:t-c*o,z:o})}animateTo(e,t=320){this.interrupt();let n={...this.camera},r={...e,z:_T(e.z)};if(t<=0||matchMedia(`(prefers-reduced-motion: reduce)`).matches){this.set(r);return}let i=performance.now(),a=e=>{let o=Math.min(1,(e-i)/t),s=1-(1-o)**3,c=n.z*(r.z/n.z)**s,l=n.z===r.z?s:(c-n.z)/(r.z-n.z);this.set({x:n.x+(r.x-n.x)*l,y:n.y+(r.y-n.y)*l,z:c}),this.animation=o<1?requestAnimationFrame(a):0};this.animation=requestAnimationFrame(a)}toWorld(e,t){let{x:n,y:r,z:i}=this.camera;return{x:(e-n)/i,y:(t-r)/i}}};function yT(e,t,n,r=72,i=1){let a=_T(Math.min((t-r*2)/Math.max(e.w,1),(n-r*2)/Math.max(e.h,1),i));return{z:a,x:t/2-(e.x+e.w/2)*a,y:n/2-(e.y+e.h/2)*a}}function bT(e,t){return e.x<t.x+t.w&&e.x+e.w>t.x&&e.y<t.y+t.h&&e.y+e.h>t.y}var xT=280,ST=96,CT=150,wT=110,TT=720,ET=e=>e.kind===`screen`||e.kind===`url`;function DT(e,t){let n=t[e.id];if(e.kind===`screen`||e.kind===`url`){let t=e.frame.width;if(e.frame.height!==`auto`)return{w:t,h:e.frame.height};let r=e.kind===`screen`?e.measuredHeight:void 0;return{w:t,h:n?.h??r??900}}if(e.kind===`note`)return{w:e.width,h:n?.h??Math.max(80,Math.ceil(e.text.length/38)*26+40)};let r=e.width??n?.w??480;return{w:r,h:n?.w?n.h/n.w*r:n?.h??r*.62}}function OT(e,t){return!e.title&&!e.description?0:t[`section:${e.id}`]?.h??(e.title?56:0)+(e.description?60:0)}function kT(e,t){let n=[],r=[];if(e.layout===`free`){let r=0;for(let i of e.sections)for(let e of i.items){let{w:a,h:o}=DT(e,t),s=e.x??r,c=e.y??0;r=Math.max(r,s+a+ST),n.push({item:e,section:i,x:s,y:c,w:a,h:o})}}else{let i=0;for(let a of e.sections){let e=OT(a,t),o=i,s=i+(e?e+wT:0),c=0,l=0,u=0,d=0;for(let e of a.items){a.columns&&d===a.columns&&(s+=l+CT,c=0,l=0,d=0);let{w:r,h:i}=DT(e,t);n.push({item:e,section:a,x:c,y:s,w:r,h:i}),c+=r+ST,u=Math.max(u,c-ST),l=Math.max(l,i),d++}let f=s+l;r.push({section:a,x:0,y:o,w:Math.max(u,e?TT:0),h:f-o,header:e}),i=f+xT}}let i=0,a=0,o=0,s=0,c=[...n,...r];return c.length&&(i=Math.min(...c.map(e=>e.x)),a=Math.min(...c.map(e=>e.y)),o=Math.max(...c.map(e=>e.x+e.w)),s=Math.max(...c.map(e=>e.y+e.h))),{items:n,sections:r,bounds:{x:i,y:a,w:o-i,h:s-a}}}function AT(e){return e.items.filter(e=>ET(e.item))}function jT(e){return e.kind===`note`?`note`:e.kind===`image`?`image`:e.kind===`url`?`globe`:e.frame.width<600?`smartphone`:e.frame.width<1100?`tablet`:`monitor`}function MT(e,t){return`/c/${encodeURIComponent(e.id)}/p/${encodeURIComponent(t.id)}`}function NT({canvas:e,page:t,store:n,onPick:r}){let i=Jg(n,e=>e.selected),a=Jg(n,e=>e.frames);return(0,h.jsxs)(`aside`,{"data-ui":!0,className:`flex w-[264px] shrink-0 flex-col overflow-hidden border-r border-rule bg-surface`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-rule px-4 py-3.5`,children:[(0,h.jsx)(`div`,{className:`truncate text-[14px] font-semibold`,children:e.title}),e.description?(0,h.jsx)(`div`,{className:`line-clamp-3 text-[12.5px] leading-[1.45] text-muted`,children:e.description}):null]}),(0,h.jsxs)(`div`,{className:`min-h-0 grow overflow-y-auto pb-4`,children:[e.pages.length>1?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`px-4 pt-3 pb-1 text-[12px] text-muted`,children:`Pages`}),(0,h.jsx)(`nav`,{className:`flex flex-col gap-0.5 px-2`,children:e.pages.map(n=>{let r=n.sections.reduce((e,t)=>e+t.items.filter(e=>e.kind===`screen`||e.kind===`url`).length,0);return(0,h.jsxs)(Lf,{href:MT(e,n),className:X(`flex h-8 items-center gap-2 rounded-[6px] px-2.5 text-[13.5px] no-underline transition-colors focus-visible:outline-offset-[-2px]`,n.id===t.id?`bg-soft2 font-medium text-ink`:`text-ink2 hover:bg-soft2`),children:[(0,h.jsx)(Z,{name:`file`,size:15,className:`text-muted`}),(0,h.jsx)(`span`,{className:`min-w-0 grow truncate`,children:n.title}),(0,h.jsx)(`span`,{className:`text-[12px] text-muted tabular`,children:r})]},n.id)})})]}):null,(0,h.jsx)(`div`,{className:`px-4 pt-3 pb-1 text-[12px] text-muted`,children:e.pages.length>1?t.title:`Layers`}),(0,h.jsx)(`div`,{className:`flex flex-col px-2`,children:t.sections.map(e=>(0,h.jsxs)(`div`,{className:`flex flex-col`,children:[e.title?(0,h.jsxs)(`div`,{className:`flex h-7 items-center gap-2 px-2.5 pt-1 text-[12px] font-medium text-ink2`,children:[(0,h.jsx)(`span`,{className:`truncate`,children:e.title}),(0,h.jsx)(XC,{value:e.items.length})]}):null,e.items.map(t=>{let n=(a[t.id]?.errors.length??0)>0||t.kind===`screen`&&t.missing;return(0,h.jsxs)(`button`,{type:`button`,onClick:()=>r(t.id),className:X(`flex h-8 w-full cursor-pointer items-center gap-2 rounded-[6px] border-0 px-2.5 text-left text-[13px] transition-colors focus-visible:outline-offset-[-2px]`,e.title&&`pl-4`,i===t.id?`bg-action-soft text-ink`:`bg-transparent text-ink2 hover:bg-soft2`),children:[(0,h.jsx)(Z,{name:jT(t),size:15,className:`text-muted`}),(0,h.jsx)(`span`,{className:`min-w-0 grow truncate`,children:t.title||(t.kind===`note`?`Note`:t.id)}),n?(0,h.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full bg-danger`}):null]},t.id)})]},e.id))})]})]})}function PT(){return new qg({selected:null,active:null,hovered:null,sizes:{},frames:{},live:[],panning:!1,zoomTiny:!1,frameEls:{},inspecting:!1})}function FT(e,t,n){e.set(e=>{let r=e.sizes[t];return r&&Math.abs(r.h-n.h)<1&&r.w===n.w?e:{...e,sizes:{...e.sizes,[t]:n}}})}function IT(e,t,n){e.set(e=>{let r=e.frames[t]??{ready:!1,errors:[]};return{...e,frames:{...e.frames,[t]:{...r,...n}}}})}function LT(e,t,n){e.set(e=>e.frameEls[t]===n?e:{...e,frameEls:{...e.frameEls,[t]:n}})}function RT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zT=RT();function BT(e){zT=e}var VT={exec:()=>null};function HT(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function $(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(WT.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var UT=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),WT={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:HT(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:HT(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:HT(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:HT(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:HT(e=>RegExp(`^ {0,${e}}(?:</?(?:${aE})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:HT(e=>RegExp(`^ {0,${e}}>`))},GT=/^(?:[ \t]*(?:\n|$))+/,KT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,JT=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,XT=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ZT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,QT=$(ZT).replace(/bull/g,XT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),$T=$(ZT).replace(/bull/g,XT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),eE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,tE=/^[^\n]+/,nE=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rE=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,nE).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iE=$(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,XT).getRegex(),aE=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,oE=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sE=$(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,oE).replace(`tag`,aE).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cE=e=>$(eE).replace(`hr`,JT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,aE).getRegex(),lE=cE(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),uE=cE(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),dE={blockquote:$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,uE).getRegex(),code:KT,def:rE,fences:qT,heading:YT,hr:JT,html:sE,lheading:QT,list:iE,newline:GT,paragraph:lE,table:VT,text:tE},fE=$(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,JT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,aE).getRegex(),pE={...dE,lheading:$T,table:fE,paragraph:$(eE).replace(`hr`,JT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fE).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,aE).getRegex()},mE={...dE,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,oE).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:VT,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(eE).replace(`hr`,JT).replace(`heading`,` *#{1,6} *[^
|
|
70
|
+
]`).replace(`lheading`,QT).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},hE=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,gE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_E=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,vE=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,yE=/[\p{P}\p{S}]/u,bE=/[\s\p{P}\p{S}]/u,xE=/[^\s\p{P}\p{S}]/u,SE=$(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,bE).getRegex(),CE=/[\p{Pi}\p{Ps}"']/u,wE=/(?!~)[\p{P}\p{S}]/u,TE=/(?!~)[\s\p{P}\p{S}]/u,EE=/(?:[^\s\p{P}\p{S}]|~)/u,DE=$(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,UT?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),OE=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kE=$(OE,`u`).replace(/punct/g,yE).getRegex(),AE=$(OE,`u`).replace(/punct/g,wE).getRegex(),jE=$(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,CE).replace(/punct/g,yE).getRegex(),ME=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,NE=$(ME,`gu`).replace(/notPunctSpace/g,xE).replace(/punctSpace/g,bE).replace(/punct/g,yE).getRegex(),PE=$(ME,`gu`).replace(/notPunctSpace/g,EE).replace(/punctSpace/g,TE).replace(/punct/g,wE).getRegex(),FE=$(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,xE).replace(/punctSpace/g,bE).replace(/punct/g,yE).getRegex(),IE=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,xE).replace(/punctSpace/g,bE).replace(/punct/g,yE).getRegex(),LE=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,xE).replace(/punctSpace/g,bE).replace(/punct/g,yE).getRegex(),RE=$(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,yE).getRegex(),zE=$(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,xE).replace(/punctSpace/g,bE).replace(/punct/g,yE).getRegex(),BE=$(/\\(punct)/,`gu`).replace(/punct/g,yE).getRegex(),VE=$(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),HE=$(oE).replace(`(?:-->|$)`,`-->`).getRegex(),UE=$(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,HE).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),WE=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,GE=$(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,WE).getRegex(),KE=$(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,GE).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qE=$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,GE).replace(`ref`,nE).getRegex(),JE=$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,nE).getRegex(),YE=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,XE=$(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,WE).getRegex(),ZE=$(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,XE).replace(`ref`,YE).getRegex()).replace(`nolink`,$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,YE).getRegex()).getRegex(),QE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$E=$(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),eD={_backpedal:VT,anyPunctuation:BE,autolink:VE,blockSkip:DE,br:_E,code:gE,del:VT,delLDelim:VT,delRDelim:VT,emStrongLDelim:kE,emStrongRDelimAst:NE,emStrongRDelimUnd:IE,escape:hE,link:KE,nolink:JE,punctuation:SE,reflink:qE,reflinkSearch:ZE,tag:UE,text:vE,url:VT},tD={...eD,emStrongLDelim:jE,emStrongRDelimAst:FE,emStrongRDelimUnd:LE,link:$(/^!?\[(label)\]\((.*?)\)/).replace(`label`,GE).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,GE).getRegex()},nD={...eD,emStrongRDelimAst:PE,emStrongLDelim:AE,delLDelim:RE,delRDelim:zE,url:$(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,$E).replace(`protocol`,QE).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,QE).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},rD={...nD,br:$(_E).replace(`{2,}`,`*`).getRegex(),text:$(nD.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},iD={normal:dE,gfm:pE,pedantic:mE},aD={normal:eD,gfm:nD,breaks:rD,pedantic:tD},oD={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},sD=e=>oD[e];function cD(e,t){if(t){if(WT.escapeTest.test(e))return e.replace(WT.escapeReplace,sD)}else if(WT.escapeTestNoEncode.test(e))return e.replace(WT.escapeReplaceNoEncode,sD);return e}function lD(e){return e.replace(WT.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function uD(e){try{e=encodeURI(e).replace(WT.percentDecode,`%`)}catch{return null}return e}function dD(e,t){let n=e.replace(WT.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(WT.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(WT.slashPipe,`|`);return n}function fD(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function pD(e){let t=e.split(`
|
|
71
|
+
`),n=t.length-1;for(;n>=0&&WT.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
72
|
+
`)}function mD(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function hD(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function gD(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function _D(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function vD(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
73
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
74
|
+
`)}function yD(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var bD=class{options;rules;lexer;constructor(e){this.options=e||zT}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:pD(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=vD(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=fD(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:fD(t[0],`
|
|
75
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:fD(t[0],`
|
|
76
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=fD(t[0],`
|
|
77
|
+
`).split(`
|
|
78
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
79
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
80
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
81
|
+
${s}`:s,r=r?`${r}
|
|
82
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
83
|
+
`),o=t.raw+`
|
|
84
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
85
|
+
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
86
|
+
${d.join(`
|
|
87
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
88
|
+
`+e.join(`
|
|
89
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
90
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
91
|
+
`,1)[0],l=t[1].length,u=this.options.pedantic?gD(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>gD(e,l)),d=e.split(`
|
|
92
|
+
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
93
|
+
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
94
|
+
`,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
|
|
95
|
+
`+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
|
|
96
|
+
`+d}f=!d.trim(),r+=l+`
|
|
97
|
+
`,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=pD(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=mD(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:fD(t[0],`
|
|
98
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=dD(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
99
|
+
`):[],a={type:`table`,raw:fD(t[0],`
|
|
100
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(dD(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:fD(t[0],`
|
|
101
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
102
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&yD(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=fD(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=hD(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),_D(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&yD(e,n[1],r,this.rules))return;let i=t[mD((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return _D(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:lD(t[0]),escaped:e}}}},xD=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zT,this.options.tokenizer=this.options.tokenizer||new bD,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:WT,block:iD.normal,inline:aD.normal};this.options.pedantic?(t.block=iD.pedantic,t.inline=aD.pedantic):this.options.gfm&&(t.block=iD.gfm,t.inline=this.options.breaks?aD.breaks:aD.gfm),this.tokenizer.rules=t}static get rules(){return{block:iD,inline:aD}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(WT.carriageReturn,`
|
|
103
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(WT.tabCharGlobal,` `).replace(WT.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
104
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
105
|
+
`)?``:`
|
|
106
|
+
`)+i.raw,n.text+=`
|
|
107
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
108
|
+
`)?``:`
|
|
109
|
+
`)+i.raw,n.text+=`
|
|
110
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
111
|
+
`)?``:`
|
|
112
|
+
`)+i.raw,r.text+=`
|
|
113
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
114
|
+
`)?``:`
|
|
115
|
+
`)+i.raw,n.text+=`
|
|
116
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,mD(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,mD(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},SD=class{options;parser;constructor(e){this.options=e||zT}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(WT.notSpaceStart)?.[0],i=e?e.replace(WT.endingNewline,``)+`
|
|
117
|
+
`:``;return r?`<pre><code class="language-`+cD(r)+`">`+(n?i:cD(i,!0))+`</code></pre>
|
|
118
|
+
`:`<pre><code>`+(n?i:cD(i,!0))+`</code></pre>
|
|
119
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
120
|
+
${this.parser.parse(e)}</blockquote>
|
|
121
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
122
|
+
`}hr(e){return`<hr>
|
|
123
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
124
|
+
`+r+`</`+i+`>
|
|
125
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
126
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
127
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
128
|
+
<thead>
|
|
129
|
+
`+t+`</thead>
|
|
130
|
+
`+r+`</table>
|
|
131
|
+
`}tablerow({text:e}){return`<tr>
|
|
132
|
+
${e}</tr>
|
|
133
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
134
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${cD(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?cD(n,!0):this.parser.parseInline(r),o=uD(e);if(o===null)return a;e=cD(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+cD(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=uD(e);if(i===null)return cD(n);e=i;let a=`<img src="${cD(e)}" alt="${cD(n)}"`;return t&&(a+=` title="${cD(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:cD(e.text)}},CD=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},wD=class e{options;renderer;textRenderer;constructor(e){this.options=e||zT,this.options.renderer=this.options.renderer||new SD,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new CD}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},TD=class{options;block;constructor(e){this.options=e||zT}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?xD.lex:xD.lexInline}provideParser(e=this.block){return e?wD.parse:wD.parseInline}},ED=new class{defaults=RT();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=wD;Renderer=SD;TextRenderer=CD;Lexer=xD;Tokenizer=bD;Hooks=TD;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new SD(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new bD(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new TD;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=TD.passThroughHooks.has(n)?e=>{if(this.defaults.async&&TD.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return xD.lex(e,t??this.defaults)}parser(e,t){return wD.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?xD.lex:xD.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?wD.parse:wD.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?xD.lex:xD.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?wD.parse:wD.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
135
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+cD(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function DD(e,t){return ED.parse(e,t)}DD.options=DD.setOptions=function(e){return ED.setOptions(e),DD.defaults=ED.defaults,BT(DD.defaults),DD},DD.getDefaults=RT,DD.defaults=zT;function OD(...e){return ED.use(...e),DD.defaults=ED.defaults,BT(DD.defaults),DD}DD.use=OD,DD.walkTokens=function(e,t){return ED.walkTokens(e,t)},DD.parseInline=ED.parseInline,DD.Parser=wD,DD.parser=wD.parse,DD.Renderer=SD,DD.TextRenderer=CD,DD.Lexer=xD,DD.lexer=xD.lex,DD.Tokenizer=bD,DD.Hooks=TD,DD.parse=DD,DD.options,DD.setOptions,DD.walkTokens,DD.parseInline,wD.parse,xD.lex,DD.use({gfm:!0,breaks:!1});function kD(e){return DD.parse(e,{async:!1}).replace(/<a href=/g,`<a target="_blank" rel="noreferrer" href=`)}function AD({text:e,className:t}){let n=(0,m.useMemo)(()=>kD(e),[e]);return(0,h.jsx)(`div`,{className:X(`prose`,t),dangerouslySetInnerHTML:{__html:n}})}function jD(e,t,n=!0){let r=(0,m.useRef)(null);return(0,m.useLayoutEffect)(()=>{let i=r.current;if(!i||!n)return;let a=new ResizeObserver(()=>FT(e,t,{h:i.offsetHeight}));return a.observe(i),()=>a.disconnect()},[e,t,n]),r}function MD(e){return e<600?`smartphone`:e<1100?`tablet`:`monitor`}var ND=(0,m.memo)(function({placed:e,live:t,theme:n,store:r,events:i,capture:a}){let{item:o,x:s,y:c,w:l,h:u}=e,d=(0,m.useRef)(null),f=(0,m.useCallback)(e=>{d.current=e,LT(r,o.id,e)},[r,o.id]),p=Jg(r,e=>e.frames[o.id]),g=Jg(r,e=>e.active===o.id),_=Jg(r,e=>e.inspecting&&o.kind===`screen`),v=o.frame.height===`auto`,y=o.kind===`screen`?o.theme??n:n,b=o.kind===`screen`?o.rev:o.url,[x]=(0,m.useState)(y),S=o.kind===`screen`?gw(o.url,x,a?{capture:`1`}:void 0):o.url,C=!!p?.ready;(0,m.useEffect)(()=>{t||IT(r,o.id,{ready:!1})},[t,r,o.id]),(0,m.useEffect)(()=>{let e=d.current;if(e&&t&&o.kind===`screen`)return pw(e,t=>{switch(t.type){case`ready`:IT(r,o.id,{ready:!0}),mw(e);break;case`size`:v&&FT(r,o.id,{h:Math.max(200,t.height)});break;case`error`:{let e=r.get().frames[o.id]?.errors??[];e.includes(t.message)||IT(r,o.id,{errors:[...e,t.message]});break}case`updated`:IT(r,o.id,{errors:[]});break;case`go`:i.onGo(o.id,t.target);break;case`wheel`:i.onWheel(e,t);break;case`keydown`:t.code===`Escape`&&i.onEscape()}})},[t,o.id,o.kind,v,r,i,S,b]),(0,m.useEffect)(()=>{o.kind===`screen`&&hw(d.current,y)},[y,o.kind]);let w=o.kind===`screen`?o.snapshots?.[y]??o.snapshots?.[y===`dark`?`light`:`dark`]:void 0;return(0,h.jsxs)(`div`,{"data-item":o.id,className:`absolute overflow-hidden bg-surface`,style:{left:s,top:c,width:l,height:u,boxShadow:`var(--shadow-frame), 0 0 0 1px var(--rule)`},children:[!C&&w?(0,h.jsx)(`img`,{src:w,alt:``,draggable:!1,className:`absolute inset-0 h-full w-full object-cover object-top select-none`}):null,!C&&!w?(0,h.jsx)(PD,{item:o,loading:t&&!(o.kind===`screen`&&o.missing)}):null,t&&!(o.kind===`screen`&&o.missing)?(0,h.jsx)(`iframe`,{ref:f,src:S,title:o.title,allow:`clipboard-read; clipboard-write; fullscreen`,className:X(`absolute top-0 left-0 block border-0 transition-opacity duration-200`,C?`opacity-100`:`opacity-0`),style:{width:l,height:u,colorScheme:y},onLoad:()=>{o.kind===`url`?IT(r,o.id,{ready:!0}):(hw(d.current,y),mw(d.current))}},b):null,g||_?null:(0,h.jsx)(`div`,{"data-shield":o.id,className:`absolute inset-0`})]})});function PD({item:e,loading:t}){let n=e.kind===`screen`&&e.missing;return(0,h.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 bg-soft text-muted`,children:[(0,h.jsx)(Z,{name:n?`alert`:e.kind===`url`?`globe`:MD(e.frame.width),size:Math.max(24,Math.min(96,e.frame.width/12)),strokeWidth:1.25,className:n?`text-danger-text`:void 0}),(0,h.jsx)(`div`,{className:`max-w-[80%] truncate text-center`,style:{fontSize:Math.max(14,e.frame.width/40)},children:n?`Missing file: ${e.kind===`screen`?e.src:``}`:t?`Loading…`:e.title})]})}var FD=(0,m.memo)(function({placed:e,store:t}){let{item:n,x:r,y:i,w:a}=e,o=jD(t,n.id),s=n.tone===`plain`;return(0,h.jsxs)(`div`,{ref:o,"data-item":n.id,className:X(`absolute`,s?``:`rounded-[10px] border border-note-line bg-note px-6 py-5 shadow-frame`),style:{left:r,top:i,width:a},children:[n.title?(0,h.jsx)(`div`,{className:`mb-2 font-semibold text-ink`,style:{fontSize:s?26:19},children:n.title}):null,(0,h.jsx)(AD,{text:n.text,className:s?`prose-plain`:`prose-note`})]})}),ID=(0,m.memo)(function({placed:e,store:t}){let{item:n,x:r,y:i,w:a,h:o}=e;return(0,h.jsx)(`div`,{"data-item":n.id,className:`absolute overflow-hidden rounded-[6px] bg-surface`,style:{left:r,top:i,width:a,height:o,boxShadow:`0 0 0 1px var(--rule)`},children:n.missing?(0,h.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-2 text-danger-text`,children:[(0,h.jsx)(Z,{name:`alert`,size:20}),` Missing image`]}):(0,h.jsx)(`img`,{src:n.url,alt:n.title,draggable:!1,className:`block h-full w-full object-contain select-none`,onLoad:e=>{let r=e.currentTarget;FT(t,n.id,{w:r.naturalWidth,h:r.naturalHeight})}})})}),LD=(0,m.memo)(function({section:e,x:t,y:n,w:r,store:i}){let a=jD(i,`section:${e.id}`);return!e.title&&!e.description?null:(0,h.jsxs)(`div`,{ref:a,className:`absolute`,style:{left:t,top:n,width:Math.min(Math.max(r,720),1400)},children:[e.title?(0,h.jsx)(`div`,{className:`text-[40px] leading-[1.15] font-semibold tracking-[-0.015em] text-ink`,children:e.title}):null,e.description?(0,h.jsx)(`div`,{className:`mt-3 max-w-[1100px]`,children:(0,h.jsx)(AD,{text:e.description,className:`prose-plain`})}):null]})}),RD={phone:{width:390,height:844,label:`Phone`},"phone-sm":{width:375,height:667,label:`Phone S`},"phone-lg":{width:430,height:932,label:`Phone L`},tablet:{width:834,height:1194,label:`Tablet`},"tablet-landscape":{width:1194,height:834,label:`Tablet landscape`},laptop:{width:1280,height:800,label:`Laptop`},desktop:{width:1440,height:900,label:`Desktop`},wide:{width:1920,height:1080,label:`Wide`}};Object.keys(RD);var zD=e=>({"--x":e.x,"--y":e.y,"--w":e.w,"--h":e.h});function BD(e){let t=e.item;if(t.kind!==`screen`&&t.kind!==`url`)return``;let n=t.frame.device?RD[t.frame.device]?.label:void 0,r=`${t.frame.width} × ${t.frame.height===`auto`?`auto`:t.frame.height}`;return n?`${n} · ${r}`:r}function VD({placed:e,store:t}){let n=e.item.id,r=Jg(t,e=>e.selected===n),i=Jg(t,e=>e.frames[n]?.errors.length??0);return(0,h.jsxs)(`div`,{"data-at":``,"data-label":n,style:zD(e),className:X(`frame-label pointer-events-auto flex cursor-default items-center gap-1.5 overflow-hidden pb-1.5 text-[12.5px] leading-none whitespace-nowrap select-none`,r?`text-ink`:`text-muted hover:text-ink2`),children:[i?(0,h.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full bg-danger`,title:`${i} errors`}):null,(0,h.jsx)(`span`,{className:X(`min-w-[3ch] truncate`,r?`font-semibold`:`font-medium`),children:e.item.title}),(0,h.jsx)(`span`,{className:`frame-device min-w-0 shrink-[20] truncate text-[11.5px] text-muted opacity-80`,children:BD(e)})]})}function HD({placed:e,kind:t}){return(0,h.jsx)(`div`,{"data-at":``,style:zD(e),className:X(`frame-outline rounded-[1px]`,t===`hover`?`outline outline-[1.5px] outline-action/60`:`outline-2 outline-action outline`)})}function UD({layout:e,store:t,overlayRef:n}){let r=Jg(t,e=>e.selected),i=Jg(t,e=>e.active),a=Jg(t,e=>e.hovered),o=Jg(t,e=>e.zoomTiny),s=e.items.filter(e=>ET(e.item)),c=t=>t?e.items.find(e=>e.item.id===t):void 0,l=c(r),u=a&&a!==r?c(a):void 0;return(0,h.jsxs)(`div`,{ref:n,className:`canvas-overlay`,"data-tiny":o,children:[s.map(e=>(0,h.jsx)(VD,{placed:e,store:t},e.item.id)),u?(0,h.jsx)(HD,{placed:u,kind:`hover`}):null,l?(0,h.jsx)(HD,{placed:l,kind:i===r?`active`:`selected`}):null]})}var WD=12,GD=20,KD=110;function qD({layout:e,theme:t,store:n,camera:r,events:i,capture:a,apiRef:o,onPlay:s,onSelect:c}){let l=(0,m.useRef)(null),u=(0,m.useRef)(null),d=(0,m.useRef)(null),[f,p]=(0,m.useState)(null),g=Jg(n,e=>e.panning),_=Jg(n,e=>e.selected),v=Jg(n,e=>e.active),y=(0,m.useMemo)(()=>e.items.filter(e=>ET(e.item)),[e]);(0,m.useLayoutEffect)(()=>{let e=l.current,t=u.current,i,a,o=()=>p({...r.camera,w:e.clientWidth,h:e.clientHeight}),s=r=>{t.style.transform=`translate3d(${r.x}px, ${r.y}px, 0) scale(${r.z})`,t.classList.add(`moving`),clearTimeout(i),i=setTimeout(()=>t.classList.remove(`moving`),160);let s=d.current;s&&(s.style.setProperty(`--tx`,String(r.x)),s.style.setProperty(`--ty`,String(r.y)),s.style.setProperty(`--z`,String(r.z)));let c=24*r.z;for(;c<14;)c*=4;for(;c>96;)c/=4;e.style.backgroundSize=`${c}px ${c}px`,e.style.backgroundPosition=`${r.x}px ${r.y}px`;let l=r.z<.09;n.get().zoomTiny!==l&&n.set(e=>({...e,zoomTiny:l})),a??=setTimeout(()=>{a=void 0,o()},90)};s(r.camera),o();let c=r.subscribe(s),f=e.getBoundingClientRect().left,m=new ResizeObserver(()=>{let t=e.getBoundingClientRect().left;if(t!==f){let e=r.camera;r.set({...e,x:e.x-(t-f)}),f=t}o()});return m.observe(e),()=>{c(),m.disconnect(),clearTimeout(i),clearTimeout(a)}},[r,n]),(0,m.useEffect)(()=>{let t=l.current,n=()=>({w:t.clientWidth,h:t.clientHeight});o.current={size:n,fitAll(t=!0){let{w:i,h:a}=n();if(!e.bounds.w)return;let o=yT(e.bounds,i,a,80,1);t?r.animateTo(o):r.set(o)},fitItem(t,i=!0){let a=e.items.find(e=>e.item.id===t);if(!a)return;let{w:o,h:s}=n(),c=yT(a,o,s,64,1);i?r.animateTo(c):r.set(c)},zoomBy(e){let{w:t,h:i}=n(),a=r.camera,o=a.z*e,s=(t/2-a.x)/a.z,c=(i/2-a.y)/a.z;r.animateTo({z:o,x:t/2-s*o,y:i/2-c*o},180)},zoomTo(e){let{w:t,h:i}=n(),a=r.camera,o=(t/2-a.x)/a.z,s=(i/2-a.y)/a.z;r.animateTo({z:e,x:t/2-o*e,y:i/2-s*e},220)}}},[o,r,e]);let b=(0,m.useRef)([]),x=(0,m.useMemo)(()=>{if(a)return new Set(y.map(e=>e.item.id));if(!f)return new Set;let{x:e,y:t,z:n,w:r,h:i}=f,o={x:-e/n,y:-t/n,w:r/n,h:i/n},s={x:o.x-o.w*.25,y:o.y-o.h*.25,w:o.w*1.5,h:o.h*1.5},c=e=>Math.max(0,Math.min(e.x+e.w,o.x+o.w)-Math.max(e.x,o.x))*Math.max(0,Math.min(e.y+e.h,o.y+o.h)-Math.max(e.y,o.y)),l=y.filter(e=>bT(e,s)&&e.w*n>=KD).sort((e,t)=>c(t)-c(e)).slice(0,WD).map(e=>e.item.id),u=[v,_].filter(e=>!!e),d=new Set(y.map(e=>e.item.id)),p=[...new Set([...u,...l,...b.current])].filter(e=>d.has(e)).slice(0,GD);return b.current=p,new Set(p)},[f,y,v,_,a]),S=(0,m.useRef)(null),C=(0,m.useRef)(new Map),w=(0,m.useRef)(null),T=(0,m.useRef)(!1),E=e=>{n.get().panning!==e&&n.set(t=>({...t,panning:e}))};(0,m.useEffect)(()=>{let e=e=>{e.code===`Space`&&!JD(e.target)&&(T.current=!0,l.current?.classList.add(`cursor-grab`),e.preventDefault())},t=e=>{e.code===`Space`&&(T.current=!1,l.current?.classList.remove(`cursor-grab`))};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t)}},[]);let D=e=>{let t=e;return(t?.closest(`[data-shield]`))?.dataset.shield??(t?.closest(`[data-label]`))?.dataset.label??(t?.closest(`[data-item]`))?.dataset.item??null},O=e=>{if(e.target.closest(`[data-ui]`)||e.button!==0&&e.button!==1)return;if(l.current.setPointerCapture(e.pointerId),C.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),r.interrupt(),C.current.size===2){let[e,t]=[...C.current.values()];w.current={dist:Math.hypot(e.x-t.x,e.y-t.y),midX:(e.x+t.x)/2,midY:(e.y+t.y)/2},S.current=null,E(!0);return}let t=e.button===1||T.current;S.current={id:t?null:D(e.target),startX:e.clientX,startY:e.clientY,lastX:e.clientX,lastY:e.clientY,moved:t},t&&E(!0)},k=e=>{if(C.current.has(e.pointerId)&&C.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),w.current&&C.current.size===2){let[e,t]=[...C.current.values()],n=Math.hypot(e.x-t.x,e.y-t.y),i=(e.x+t.x)/2,a=(e.y+t.y)/2,o=l.current.getBoundingClientRect();r.panBy(i-w.current.midX,a-w.current.midY),r.zoomAt(i-o.left,a-o.top,n/Math.max(w.current.dist,1)),w.current={dist:n,midX:i,midY:a};return}let t=S.current;if(!t){if(!n.get().panning){let t=D(e.target);n.get().hovered!==t&&n.set(e=>({...e,hovered:t}))}return}!t.moved&&Math.hypot(e.clientX-t.startX,e.clientY-t.startY)>3&&(t.moved=!0,E(!0)),t.moved&&r.panBy(e.clientX-t.lastX,e.clientY-t.lastY),t.lastX=e.clientX,t.lastY=e.clientY},A=e=>{C.current.delete(e.pointerId),C.current.size<2&&(w.current=null);let t=S.current;S.current=null,t&&!t.moved&&c(t.id,{x:e.clientX,y:e.clientY}),C.current.size||E(!1)};(0,m.useEffect)(()=>{let e=l.current,t=t=>{if(t.target.closest(`[data-ui]`))return;t.preventDefault();let n=e.getBoundingClientRect(),i=t.deltaMode===1?16:t.deltaMode===2?n.height:1;if(t.ctrlKey||t.metaKey){let e=t.deltaY*i,a=Math.abs(e)<40?.012:.0025;r.zoomAt(t.clientX-n.left,t.clientY-n.top,Math.exp(-e*a))}else r.panBy(-t.deltaX*i,-t.deltaY*i)};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[r]);let j=e.sections;return(0,h.jsxs)(`div`,{ref:l,className:X(`canvas-dots relative h-full w-full touch-none overflow-hidden select-none`,g&&`canvas-panning cursor-grabbing`),onPointerDown:O,onPointerMove:k,onPointerUp:A,onPointerCancel:A,onPointerLeave:()=>n.get().hovered&&n.set(e=>({...e,hovered:null})),onDoubleClick:t=>{let n=D(t.target),r=n?e.items.find(e=>e.item.id===n):void 0;r&&ET(r.item)&&s(r.item.id)},children:[(0,h.jsxs)(`div`,{ref:u,className:`canvas-world`,children:[j.map(e=>(0,h.jsx)(LD,{section:e.section,x:e.x,y:e.y,w:e.w,store:n},`section:${e.section.id}`)),e.items.map(e=>{let{item:r}=e;return r.kind===`screen`||r.kind===`url`?(0,h.jsx)(ND,{placed:e,live:x.has(r.id),theme:t,store:n,events:i,capture:a},r.id):r.kind===`note`?(0,h.jsx)(FD,{placed:e,store:n},r.id):(0,h.jsx)(ID,{placed:e,store:n},r.id)})]}),(0,h.jsx)(UD,{layout:e,store:n,overlayRef:d})]})}function JD(e){let t=e;return!!t&&(t.isContentEditable||/^(input|textarea|select)$/i.test(t.tagName))}var YD=new URLSearchParams(window.location.search),XD=YD.has(`capture`),ZD=(e,t)=>`foss-design.camera.${e}.${t}`;function QD(e){try{let t=JSON.parse(sessionStorage.getItem(e)??`null`);if(t&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.z))return t}catch{}return null}function $D(e){let t=r_(),n=YD.get(`theme`),[r,i]=(0,m.useState)(n===`dark`||n===`light`?n:null);return[r??e?.theme??t,i]}function eO({canvasId:e,pageId:t}){let{data:n,error:r,isLoading:i}=Bg(e);if(r)return(0,h.jsx)(hT,{title:`Canvas not found`,text:r.message});if(i||!n)return(0,h.jsx)(`div`,{className:`canvas-dots grow`});let a=t??YD.get(`page`)??void 0,o=n.pages.find(e=>e.id===a)??n.pages[0];return(0,h.jsx)(tO,{canvas:n,page:o},`${n.id}/${o?.id??``}`)}function tO({canvas:e,page:t}){let[,n]=jf(),r=(0,m.useMemo)(()=>PT(),[]),i=(0,m.useMemo)(()=>new vT,[]),a=(0,m.useRef)(null),[o,s]=$D(e),[c,l]=(0,m.useState)(()=>!XD&&window.innerWidth>900),[u,d]=(0,m.useState)(!1),f=Jg(r,e=>e.sizes),p=(0,m.useMemo)(()=>t?kT(t,f):{items:[],sections:[],bounds:{x:0,y:0,w:0,h:0}},[t,f]),g=cO(Jg(r,e=>e.frameEls),p),_=LC(g),v=u||_;(0,m.useEffect)(()=>{r.set(e=>e.inspecting===v?e:{...e,inspecting:v,active:null})},[v,r]);let y=IC(g,v,{onEscape:()=>d(!1)}),b=y.info?.el;(0,m.useEffect)(()=>{b&&d(!0)},[b]),(0,m.useEffect)(()=>{let e=y.frame;if(!e)return;let t=Object.entries(r.get().frameEls).find(([,t])=>t===e)?.[0];t&&r.get().selected!==t&&r.set(e=>({...e,selected:t}))},[y.frame,r]);let x=(0,m.useMemo)(()=>AT(p),[p]),S=ZD(e.id,t?.id??``),C=(0,m.useRef)(!1);(0,m.useEffect)(()=>{if(C.current||!p.bounds.w)return;C.current=!0;let t=Kg(e.id),n=XD?null:QD(S);t?(r.set(e=>({...e,selected:t})),requestAnimationFrame(()=>a.current?.fitItem(t,!1))):n?i.set(n):requestAnimationFrame(()=>a.current?.fitAll(!1))},[p,i,S,e.id,r]),(0,m.useEffect)(()=>{if(XD)return;let e,t=i.subscribe(t=>{clearTimeout(e),e=setTimeout(()=>sessionStorage.setItem(S,JSON.stringify(t)),250)});return()=>{t(),clearTimeout(e)}},[i,S]);let w=(0,m.useCallback)(e=>{let t=e?p.items.find(t=>t.item.id===e)?.item:void 0;r.set(e=>({...e,selected:t?t.id:null,active:t&&ET(t)?t.id:null,hovered:null}))},[p,r]),T=(0,m.useCallback)(e=>{w(e),a.current?.fitItem(e)},[w]),E=(0,m.useCallback)(r=>n(`/c/${encodeURIComponent(e.id)}/play/${encodeURIComponent(r)}${t?`?page=${encodeURIComponent(t.id)}`:``}`),[e.id,t,n]);(0,m.useEffect)(()=>{let t=t=>{let n=t.detail;n.canvas===e.id&&p.items.some(e=>e.item.id===n.item)&&(Kg(e.id),T(n.item))};return window.addEventListener(`design:focus`,t),()=>window.removeEventListener(`design:focus`,t)},[e.id,p,T]);let D=(0,m.useMemo)(()=>({onGo(r,i){let[a,o]=i.includes(`/`)?i.split(`/`):[null,i],s=a?e.pages.filter(e=>e.id===a):[t,...e.pages.filter(e=>e!==t)];for(let r of s)if(r&&r.sections.some(e=>e.items.some(e=>e.id===o))){r===t?T(o):(n(MT(e,r)),window.dispatchEvent(new CustomEvent(`design:focus`,{detail:{canvas:e.id,item:o}})));return}console.warn(`[design] go("${i}"): no such screen`)},onWheel(e,t){let n=e.closest(`.canvas-dots`);if(!n)return;let r=n.getBoundingClientRect(),a=e.getBoundingClientRect(),o=i.camera.z;if(t.zoom){let e=Math.abs(t.deltaY)<40?.012:.0025;i.zoomAt(a.left-r.left+t.x*o,a.top-r.top+t.y*o,Math.exp(-t.deltaY*e))}else i.panBy(-t.deltaX,-t.deltaY)},onEscape(){r.set(e=>({...e,active:null}))}}),[e,t,i,r,T,n]);return(0,m.useEffect)(()=>{if(!XD)return;let e=Date.now(),t=setInterval(()=>{let n=r.get().frames;(x.every(e=>n[e.item.id]?.ready||e.item.kind===`screen`&&e.item.missing)||Date.now()-e>6e4)&&(clearInterval(t),a.current?.fitAll(!1),requestAnimationFrame(()=>requestAnimationFrame(()=>window.__DESIGN_CANVAS_READY__=!0)))},250);return()=>clearInterval(t)},[x,r]),(0,m.useEffect)(()=>{let i=i=>{if(JD(i.target)||document.querySelector(`[role="dialog"]`))return;let o=a.current,s=r.get(),c=i.metaKey||i.ctrlKey;if(i.key===`Escape`)y.info?y.select(null):u?d(!1):s.active?r.set(e=>({...e,active:null})):s.selected&&r.set(e=>({...e,selected:null}));else if(i.key===`i`&&!c&&!i.altKey)d(e=>!e);else if(i.shiftKey&&i.code===`Digit1`)o?.fitAll();else if(i.shiftKey&&i.code===`Digit2`&&s.selected)o?.fitItem(s.selected);else if(i.shiftKey&&i.code===`Digit0`)o?.zoomTo(1);else if((i.key===`=`||i.key===`+`)&&!i.altKey)i.preventDefault(),o?.zoomBy(1.4);else if(i.key===`-`&&!i.altKey)i.preventDefault(),o?.zoomBy(1/1.4);else if(c&&i.key===`0`)i.preventDefault(),o?.zoomTo(1);else if(c&&i.key===`\\`)i.preventDefault(),l(e=>!e);else if([`ArrowRight`,`ArrowDown`,`ArrowLeft`,`ArrowUp`].includes(i.key)&&x.length){i.preventDefault();let e=x.findIndex(e=>e.item.id===s.selected),t=i.key===`ArrowRight`||i.key===`ArrowDown`?1:-1,n=x[e===-1?0:(e+t+x.length)%x.length];r.set(e=>({...e,selected:n.item.id,active:null})),o?.fitItem(n.item.id)}else if(i.key===`Enter`&&s.selected){let e=p.items.find(e=>e.item.id===s.selected)?.item;e&&ET(e)&&E(e.id)}else if(i.key===`]`||i.key===`[`){let r=t?e.pages.indexOf(t):-1,a=e.pages[r+(i.key===`]`?1:-1)];a&&n(MT(e,a))}};return window.addEventListener(`keydown`,i),()=>window.removeEventListener(`keydown`,i)},[r,x,p,E,e,t,n,u,y]),XD?(0,h.jsx)(`div`,{className:`flex h-dvh`,children:(0,h.jsx)(qD,{layout:p,theme:o,store:r,camera:i,events:D,capture:!0,apiRef:a,onPlay:()=>{},onSelect:()=>{}})}):(0,h.jsxs)(`div`,{className:`flex h-dvh flex-col`,children:[(0,h.jsx)(nO,{canvas:e,page:t,theme:o,onTheme:s,sidebar:c,onSidebar:l,inspect:u,onInspect:d,onPlay:()=>{let e=r.get().selected,t=e&&x.find(t=>t.item.id===e)||x[0];t&&E(t.item.id)},canPlay:x.length>0}),(0,h.jsxs)(`div`,{className:`flex min-h-0 grow`,children:[(0,h.jsx)(dw,{open:c&&!!t,side:`left`,width:264,children:t?(0,h.jsx)(NT,{canvas:e,page:t,store:r,onPick:T}):null}),(0,h.jsxs)(`div`,{className:`relative min-w-0 grow`,children:[t&&p.items.length?(0,h.jsx)(qD,{layout:p,theme:o,store:r,camera:i,events:D,capture:!1,apiRef:a,onPlay:E,onSelect:w}):(0,h.jsx)(`div`,{className:`canvas-dots flex h-full`,children:(0,h.jsx)(ww,{title:t?`This page is empty`:`This canvas has no pages`,text:(0,h.jsxs)(h.Fragment,{children:[`Add sections and screens to`,` `,(0,h.jsxs)(`code`,{className:`font-mono text-[13px]`,children:[`.design/canvas/`,e.id,`/canvas.json`]}),`.`]})})}),(0,h.jsx)(rO,{canvas:e,store:r,layoutItems:p.items.map(e=>e.item),theme:o,onPlay:E,inspect:v}),(0,h.jsx)(aO,{camera:i,apiRef:a}),e.issues.length?(0,h.jsx)(oO,{canvas:e}):null]}),(0,h.jsx)(dw,{open:u,side:`right`,width:320,children:(0,h.jsx)(qC,{info:y.info,active:!0,onSelect:e=>y.select(e),onClose:()=>{d(!1),y.select(null)}})})]})]})}function nO({canvas:e,page:t,theme:n,onTheme:r,sidebar:i,onSidebar:a,onPlay:o,canPlay:s,inspect:c,onInspect:l}){let[,u]=jf();return(0,h.jsxs)(IS,{children:[(0,h.jsx)(mT,{content:`All canvases`,children:(0,h.jsx)(Lf,{href:`/`,className:`flex items-center`,"aria-label":`All canvases`,children:(0,h.jsx)(PS,{})})}),(0,h.jsx)(y_,{icon:`panel-left`,label:i?`Hide sidebar (⌘\\)`:`Show sidebar (⌘\\)`,onClick:()=>a(!i)}),(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-[14px]`,children:[(0,h.jsx)(`span`,{className:`truncate font-semibold`,children:e.title}),t&&e.pages.length>1?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Z,{name:`chevron-right`,size:14,className:`shrink-0 text-muted`}),(0,h.jsxs)(DS,{width:240,trigger:(0,h.jsxs)(`button`,{type:`button`,className:`flex h-ctrl cursor-pointer items-center gap-1 rounded-[6px] border-0 bg-transparent px-2 text-[14px] text-ink2 hover:bg-soft2`,children:[(0,h.jsx)(`span`,{className:`truncate`,children:t.title}),(0,h.jsx)(Z,{name:`chevron-down`,size:14,className:`text-muted`})]}),children:[(0,h.jsx)(jS,{children:`Pages`}),e.pages.map(n=>(0,h.jsxs)(kS,{active:n.id===t.id,onSelect:()=>u(MT(e,n)),children:[(0,h.jsx)(Z,{name:`file`,size:15,className:`text-muted`}),n.title]},n.id))]})]}):null]}),(0,h.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,h.jsx)(vw,{label:`Screen theme`,value:n,onChange:r,items:[{value:`light`,label:(0,h.jsx)(Z,{name:`sun`,size:15}),title:`Light screens`},{value:`dark`,label:(0,h.jsx)(Z,{name:`moon`,size:15}),title:`Dark screens`}]}),(0,h.jsx)(sO,{on:c,onChange:l}),(0,h.jsx)(g_,{kind:`secondary`,icon:`play`,onClick:o,disabled:!s,children:`Play`}),(0,h.jsx)(p_,{width:200,label:`Search`}),(0,h.jsx)(NS,{})]})]})}function rO({canvas:e,store:t,layoutItems:n,theme:r,onPlay:i,inspect:a}){let o=Jg(t,e=>e.selected),s=Jg(t,e=>e.active),c=Jg(t,e=>o?e.frames[o]:void 0),l=n.find(e=>e.id===o);if(!l)return null;let u=l.kind===`screen`||l.kind===`url`,d=l.kind===`screen`?_w(gw(l.url,l.theme??r)):l.kind===`url`?l.url:null,f=()=>{let e=document.querySelector(`[data-item="${CSS.escape(l.id)}"] iframe`);try{e?.contentWindow?.location.reload()}catch{e?.setAttribute(`src`,e.getAttribute(`src`)??``)}},p=c?.errors??[];return(0,h.jsx)(`div`,{"data-ui":!0,className:`pointer-events-none absolute inset-x-0 bottom-5 z-20 flex justify-center px-4`,children:(0,h.jsxs)(`div`,{className:`pointer-events-auto flex max-w-full flex-col overflow-hidden rounded-[10px] border border-rule bg-surface shadow-pop animate-[q-pop_120ms_ease-out]`,children:[p.length?(0,h.jsxs)(`div`,{className:`flex max-h-40 items-start gap-2 overflow-y-auto border-b border-rule bg-danger-soft px-3.5 py-2 font-mono text-[12px] whitespace-pre-wrap text-danger-text`,children:[(0,h.jsx)(Z,{name:`alert`,size:14,className:`mt-px`}),(0,h.jsx)(`span`,{className:`min-w-0`,children:p.join(`
|
|
136
|
+
`)})]}):null,(0,h.jsxs)(`div`,{className:`flex h-[44px] items-center gap-1 pr-1.5 pl-3.5`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-[13.5px] font-medium`,children:l.title||l.id}),u&&s===l.id?(0,h.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-[12px] text-muted`,children:[(0,h.jsx)(Z,{name:`pointer`,size:13}),` `,a?`Inspecting`:`Interacting`,` `,(0,h.jsx)(a_,{children:`esc`})]}):u?(0,h.jsx)(`span`,{className:`shrink-0 text-[12px] text-muted`,children:a?`Click an element to inspect it`:`Click the screen to interact`}):null]}),u?(0,h.jsx)(mT,{content:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Play `,(0,h.jsx)(a_,{children:`↵`})]}),children:(0,h.jsx)(y_,{icon:`play`,label:`Play`,onClick:()=>i(l.id)})}):null,d?(0,h.jsx)(mT,{content:`Open in a new tab`,children:(0,h.jsx)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,"aria-label":`Open in a new tab`,className:`inline-flex h-ctrl w-ctrl items-center justify-center rounded-[6px] text-muted hover:bg-soft2 hover:text-ink2`,children:(0,h.jsx)(Z,{name:`external`,size:16})})}):null,u?(0,h.jsx)(mT,{content:`Reload`,children:(0,h.jsx)(y_,{icon:`refresh`,label:`Reload`,onClick:f})}):null,l.kind===`screen`?(0,h.jsx)(mT,{content:`Copy source path`,children:(0,h.jsx)(y_,{icon:`copy`,label:`Copy source path`,onClick:()=>void hC(l.file,`Path copied`)})}):null,(0,h.jsx)(mT,{content:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Zoom to `,(0,h.jsx)(a_,{children:`⇧2`})]}),children:(0,h.jsx)(y_,{icon:`fit`,label:`Zoom to`,onClick:()=>window.dispatchEvent(new CustomEvent(`design:focus`,{detail:{canvas:e.id,item:l.id}}))})})]})]})})}function iO({camera:e}){let[t,n]=(0,m.useState)(e.camera.z);return(0,m.useEffect)(()=>{let t=0;return e.subscribe(e=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>n(e.z))})},[e]),(0,h.jsxs)(h.Fragment,{children:[Math.round(t*100),`%`]})}function aO({camera:e,apiRef:t}){return(0,h.jsxs)(`div`,{"data-ui":!0,className:`absolute right-4 bottom-5 z-20 flex h-[46px] items-center gap-0.5 rounded-[10px] border border-rule bg-surface px-1.5 shadow-pop`,children:[(0,h.jsx)(y_,{icon:`zoom-out`,label:`Zoom out (−)`,onClick:()=>t.current?.zoomBy(1/1.4)}),(0,h.jsxs)(DS,{side:`top`,align:`end`,width:210,trigger:(0,h.jsx)(`button`,{type:`button`,className:`h-ctrl min-w-[56px] cursor-pointer rounded-[6px] border-0 bg-transparent px-1.5 text-[12.5px] font-medium text-ink2 tabular hover:bg-soft2`,children:(0,h.jsx)(iO,{camera:e})}),children:[(0,h.jsx)(kS,{onSelect:()=>t.current?.fitAll(),hint:`⇧1`,children:`Zoom to fit`}),(0,h.jsx)(kS,{onSelect:()=>t.current?.zoomTo(1),hint:`⇧0`,children:`100%`}),(0,h.jsx)(AS,{}),[.25,.5,2].map(e=>(0,h.jsxs)(kS,{onSelect:()=>t.current?.zoomTo(e),children:[e*100,`%`]},e))]}),(0,h.jsx)(y_,{icon:`zoom-in`,label:`Zoom in (+)`,onClick:()=>t.current?.zoomBy(1.4)}),(0,h.jsx)(`div`,{className:`mx-0.5 h-5 w-px bg-rule`}),(0,h.jsx)(y_,{icon:`fit`,label:`Zoom to fit (⇧1)`,onClick:()=>t.current?.fitAll()})]})}function oO({canvas:e}){let t=e.issues.filter(e=>e.severity===`error`).length;return(0,h.jsxs)(sC,{children:[(0,h.jsx)(cC,{asChild:!0,children:(0,h.jsxs)(`button`,{type:`button`,"data-ui":!0,className:`absolute bottom-5 left-4 z-20 flex h-[46px] cursor-pointer items-center gap-2 rounded-[10px] border border-rule bg-surface px-3.5 text-[13px] font-medium shadow-pop hover:bg-soft`,children:[(0,h.jsx)(Z,{name:`alert`,size:15,className:t?`text-danger-text`:`text-action`}),e.issues.length,` `,e.issues.length===1?`problem`:`problems`,` in canvas.json`]})}),(0,h.jsx)(lC,{children:(0,h.jsx)(uC,{side:`top`,align:`start`,sideOffset:8,collisionPadding:12,className:`z-50 max-h-[50vh] w-[460px] max-w-[calc(100vw-24px)] overflow-y-auto rounded-[10px] border border-rule bg-surface shadow-pop outline-none data-[state=open]:animate-[q-pop_120ms_ease-out]`,children:(0,h.jsx)(cw,{issues:e.issues})})})]})}function sO({on:e,onChange:t}){return(0,h.jsx)(mT,{content:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Inspect elements `,(0,h.jsx)(a_,{children:`I`})]}),children:(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(!e),className:e?`inline-flex h-ctrl cursor-pointer items-center gap-1.5 rounded-[6px] border border-action-line bg-action-soft px-ctrl text-ctrl font-medium text-action`:`inline-flex h-ctrl cursor-pointer items-center gap-1.5 rounded-[6px] border border-rule-strong bg-surface px-ctrl text-ctrl font-medium text-ink hover:bg-soft`,children:[(0,h.jsx)(Z,{name:`pointer`,size:15}),`Inspect`]})})}function cO(e,t){let n=(0,m.useRef)([]);return(0,m.useMemo)(()=>{let r=new Set(t.items.filter(e=>e.item.kind===`screen`).map(e=>e.item.id)),i=Object.entries(e).filter(e=>!!e[1]&&r.has(e[0])).map(([,e])=>e);return i.length===n.current.length&&i.every((e,t)=>e===n.current[t])||(n.current=i),n.current},[e,t])}function lO(e,t){return(t?e.pages.filter(e=>e.id===t):e.pages).flatMap(t=>t.sections.flatMap(n=>n.items.filter(e=>e.kind===`screen`||e.kind===`url`).map(r=>({item:r,pageId:t.id,where:[e.pages.length>1?t.title:null,n.title].filter(Boolean).join(` · `)}))))}var uO=(e,t,n)=>`/c/${encodeURIComponent(e)}/play/${encodeURIComponent(t)}?page=${encodeURIComponent(n)}`;function dO({canvasId:e,itemId:t}){let{data:n,error:r,isLoading:i}=Bg(e);return r?(0,h.jsx)(hT,{title:`Canvas not found`,text:r.message}):i||!n?null:(0,h.jsx)(fO,{canvas:n,itemId:t})}function fO({canvas:e,itemId:t}){let[,n]=jf(),r=new URLSearchParams(window.location.search).get(`page`)??(window.location.hash.split(`?`)[1]?new URLSearchParams(window.location.hash.split(`?`)[1]).get(`page`):null),i=(0,m.useMemo)(()=>lO(e,null),[e]),a=i.find(e=>e.item.id===t),o=r??a?.pageId??null,s=(0,m.useMemo)(()=>o?lO(e,o):i,[e,o,i]),c=s.findIndex(e=>e.item.id===t),l=r_(),[u,d]=(0,m.useState)(e.theme??l),[f,p]=(0,m.useState)(`fit`),g=(0,m.useRef)(null),_=(0,m.useRef)(null),[v,y]=(0,m.useState)(null),b=(0,m.useCallback)(e=>{_.current=e,y(e)},[]),[x,S]=(0,m.useState)(!1),[C,w]=(0,m.useState)({w:0,h:0}),[T,E]=(0,m.useState)([]),D=o?`/c/${encodeURIComponent(e.id)}/p/${encodeURIComponent(o)}`:`/c/${encodeURIComponent(e.id)}`,O=t=>{if(!s.length)return;let r=s[(c+t+s.length)%s.length];n(uO(e.id,r.item.id,r.pageId),{replace:!0})};(0,m.useLayoutEffect)(()=>{let e=g.current;if(!e)return;let t=new ResizeObserver(()=>w({w:e.clientWidth,h:e.clientHeight}));return t.observe(e),()=>t.disconnect()},[]),(0,m.useEffect)(()=>{let e=e=>{JD(e.target)||document.querySelector(`[role="dialog"]`)||(e.key===`ArrowRight`?O(1):e.key===`ArrowLeft`?O(-1):e.key===`i`&&!e.metaKey&&!e.ctrlKey&&!e.altKey?S(e=>!e):e.key===`Escape`&&(ie.info?ie.select(null):x?S(!1):n(D)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let k=s[c],A=k?.item,j=A?.kind===`screen`?A.theme??u:u,[ee]=(0,m.useState)(j),te=A?A.kind===`screen`?gw(A.url,ee):A.url:``,ne=(0,m.useMemo)(()=>v&&A?.kind===`screen`?[v]:[],[v,A?.kind]),re=LC(ne),ie=IC(ne,x||re,{onEscape:()=>S(!1)}),ae=ie.info?.el;if((0,m.useEffect)(()=>{ae&&S(!0)},[ae]),(0,m.useEffect)(()=>{let t=_.current;if(t&&A?.kind===`screen`)return E([]),pw(t,t=>{if(t.type===`error`)E(e=>e.includes(t.message)?e:[...e,t.message]);else if(t.type===`updated`)E([]);else if(t.type===`keydown`&&t.code===`Escape`)n(D);else if(t.type===`go`){let[r,a]=t.target.includes(`/`)?t.target.split(`/`):[null,t.target],o=i.find(e=>e.item.id===a&&(!r||e.pageId===r));o&&n(uO(e.id,o.item.id,o.pageId))}})},[A,te,i,e.id,n,D]),(0,m.useEffect)(()=>{A?.kind===`screen`&&hw(_.current,j)},[j,A]),!A)return(0,h.jsx)(hT,{title:`Screen not found`,text:`No screen "${t}" on this canvas.`});let M=A.frame.width,oe=A.frame.height===`auto`?Math.max(C.h-48,400):A.frame.height,se=f===`fit`?Math.min(1,(C.w-48)/M,(C.h-48)/oe):1,ce=M<=C.w-48&&oe<=C.h-48,le=A.kind===`screen`?_w(gw(A.url,j)):A.url;return(0,h.jsxs)(`div`,{className:`flex h-dvh flex-col`,children:[(0,h.jsxs)(IS,{children:[(0,h.jsx)(mT,{content:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Back to canvas `,(0,h.jsx)(a_,{children:`esc`})]}),children:(0,h.jsx)(Lf,{href:D,className:`inline-flex h-ctrl w-ctrl items-center justify-center rounded-[6px] text-muted hover:bg-soft2 hover:text-ink2`,"aria-label":`Back to canvas`,children:(0,h.jsx)(Z,{name:`arrow-left`,size:16})})}),(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate text-[14px] font-semibold`,children:A.title}),(0,h.jsx)(`span`,{className:`truncate text-[12px] text-muted`,children:[e.title,k.where].filter(Boolean).join(` · `)})]}),(0,h.jsxs)(`div`,{className:`mx-auto flex items-center gap-1`,children:[(0,h.jsx)(y_,{icon:`chevron-left`,label:`Previous screen (←)`,onClick:()=>O(-1),disabled:s.length<2}),(0,h.jsxs)(`span`,{className:`min-w-[52px] text-center text-[12.5px] text-muted tabular`,children:[c+1,` / `,s.length]}),(0,h.jsx)(y_,{icon:`chevron-right`,label:`Next screen (→)`,onClick:()=>O(1),disabled:s.length<2})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[ce?null:(0,h.jsx)(vw,{label:`Scale`,value:f,onChange:p,items:[{value:`fit`,label:`Fit`},{value:`actual`,label:`100%`}]}),A.kind===`screen`&&!A.theme?(0,h.jsx)(vw,{label:`Screen theme`,value:u,onChange:d,items:[{value:`light`,label:(0,h.jsx)(Z,{name:`sun`,size:15}),title:`Light`},{value:`dark`,label:(0,h.jsx)(Z,{name:`moon`,size:15}),title:`Dark`}]}):null,A.kind===`screen`?(0,h.jsx)(sO,{on:x,onChange:S}):null,(0,h.jsx)(y_,{icon:`refresh`,label:`Reload`,onClick:()=>{try{_.current?.contentWindow?.location.reload()}catch{}}}),(0,h.jsx)(`a`,{href:le,target:`_blank`,rel:`noreferrer`,title:`Open in a new tab`,className:`inline-flex h-ctrl w-ctrl items-center justify-center rounded-[6px] text-muted hover:bg-soft2 hover:text-ink2`,children:(0,h.jsx)(Z,{name:`external`,size:16})}),(0,h.jsx)(NS,{})]})]}),(0,h.jsxs)(`div`,{className:`flex min-h-0 grow`,children:[(0,h.jsxs)(`div`,{ref:g,className:`canvas-dots relative min-w-0 grow ${f===`actual`?`overflow-auto`:`overflow-hidden`}`,children:[T.length?(0,h.jsxs)(`div`,{className:`absolute inset-x-0 top-0 z-10 flex items-start gap-2 border-b border-rule bg-danger-soft px-4 py-2 font-mono text-[12px] whitespace-pre-wrap text-danger-text`,children:[(0,h.jsx)(Z,{name:`alert`,size:14,className:`mt-px`}),T.join(`
|
|
137
|
+
`)]}):null,(0,h.jsx)(`div`,{className:`flex min-h-full min-w-full items-center justify-center p-6`,style:{width:f===`actual`?M+48:void 0},children:(0,h.jsx)(`div`,{className:`shrink-0 overflow-hidden bg-surface`,style:{width:M*se,height:oe*se,boxShadow:`var(--shadow-frame), 0 0 0 1px var(--rule)`},children:(0,h.jsx)(`iframe`,{ref:b,src:te,title:A.title,allow:`clipboard-read; clipboard-write; fullscreen`,className:`block border-0`,style:{width:M,height:oe,transform:`scale(${se})`,transformOrigin:`0 0`,colorScheme:j},onLoad:()=>A.kind===`screen`&&hw(_.current,j)},`${A.id}:${A.kind===`screen`?A.rev:A.url}`)})})]}),(0,h.jsx)(dw,{open:x,side:`right`,width:320,children:(0,h.jsx)(qC,{info:ie.info,active:!0,onSelect:e=>ie.select(e),onClose:()=>{S(!1),ie.select(null)}})})]})]})}var pO=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],mO=new Intl.RelativeTimeFormat(`en`,{numeric:`auto`});function hO(e){if(!e)return``;let t=(e-Date.now())/1e3;for(let[e,n]of pO)if(Math.abs(t)>=n)return mO.format(Math.round(t/n),e);return`just now`}function gO(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(+(e<10240))} KB`:`${(e/1024/1024).toFixed(1)} MB`}function _O(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}function vO({canvas:e}){return(0,h.jsx)(`div`,{className:`flex h-[54px] w-[86px] shrink-0 items-center justify-center overflow-hidden rounded-[6px] border border-rule bg-soft`,children:e.cover?(0,h.jsx)(`img`,{src:e.cover,alt:``,className:`h-full w-full object-cover object-top`}):(0,h.jsx)(Z,{name:`canvas`,size:18,className:`text-muted`})})}function yO({project:e}){return e.canvases.length?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Canvases`,count:e.canvases.length}),e.canvases.map(e=>(0,h.jsxs)(aw,{to:`/c/${encodeURIComponent(e.id)}`,cols:`86px minmax(0,1fr) auto auto`,align:`llrr`,pad:`10px 16px`,minH:74,children:[(0,h.jsx)(vO,{canvas:e}),(0,h.jsx)(o_,{top:e.title,bottom:(0,h.jsx)(`span`,{className:`truncate`,children:e.description??e.id})}),(0,h.jsxs)(`span`,{className:`flex items-center gap-2 text-[12.5px] whitespace-nowrap text-muted`,children:[e.issues?(0,h.jsx)(YC,{tone:`danger`,children:_O(e.issues,`problem`)}):null,_O(e.screens,`screen`),` · `,_O(e.pages,`page`)]}),(0,h.jsx)(`span`,{className:`w-[92px] text-[12.5px] whitespace-nowrap text-muted`,children:hO(e.updatedAt)})]},e.id))]}):(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Canvases`,count:0}),(0,h.jsx)(sw,{children:(0,h.jsxs)(`div`,{className:`flex flex-col gap-2 py-6 text-center`,children:[(0,h.jsx)(`span`,{className:`text-[14px] text-ink2`,children:`No canvases yet.`}),(0,h.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`Ask your agent to design something, or run `,(0,h.jsx)(Q,{children:`design new <name>`}),` in the project.`]})]})})]})}function bO({project:e}){let t=e.system;return t?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Design system`,right:(0,h.jsx)(b_,{to:`/system`,children:`Open`})}),(0,h.jsxs)(sw,{gap:6,children:[(0,h.jsx)(`span`,{className:`text-[15px] font-semibold`,children:t.name}),t.description?(0,h.jsx)(`span`,{className:`text-[13px] text-ink2`,children:t.description}):null]}),(0,h.jsx)(ow,{label:`Tokens`,labelWidth:120,children:(0,h.jsx)(XC,{value:t.tokens})}),(0,h.jsx)(ow,{label:`Components`,labelWidth:120,children:(0,h.jsx)(XC,{value:t.components})}),(0,h.jsx)(ow,{label:`Guidelines`,labelWidth:120,children:(0,h.jsx)(XC,{value:t.guidelines})}),t.issues?(0,h.jsx)(ow,{label:`Problems`,labelWidth:120,children:(0,h.jsx)(YC,{tone:`danger`,children:t.issues})}):null]}):(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Design system`}),(0,h.jsx)(sw,{children:(0,h.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`No design system yet. Ask your agent to build one from the codebase, or run `,(0,h.jsx)(Q,{children:`design system init`}),`.`]})})]})}function xO(){let{data:e,error:t,isLoading:n}=zg();return t?(0,h.jsx)(ww,{title:`Could not load the project`,text:t.message}):n||!e?null:(0,h.jsxs)(yw,{children:[(0,h.jsx)(bw,{title:e.name,sub:Mg?`Snapshot built with foss-design ${e.version}`:(0,h.jsxs)(Q,{size:12.5,children:[e.root,`/.design`]})}),(0,h.jsx)(lw,{issues:e.issues,title:`Problems in design.json`}),(0,h.jsxs)(`div`,{className:`grid items-start gap-5 max-lg:grid-cols-1!`,style:{gridTemplateColumns:`minmax(0,1fr) 340px`},children:[(0,h.jsx)(yO,{project:e}),(0,h.jsx)(bO,{project:e})]})]})}function SO(e){let t=e.utility;if(t===void 0)return[];let n=t?`-${t}`:``;switch(e.kind){case`color`:return[`bg${n}`,`text${n}`,`border${n}`];case`font`:return[`font${n}`];case`text`:return[`text${n}`];case`weight`:return[`font${n}`];case`leading`:return[`leading${n}`];case`tracking`:return[`tracking${n}`];case`spacing`:return t?[`p${n}`,`gap${n}`]:[`p-1`,`gap-4`,`m-2`];case`radius`:return[`rounded${n}`];case`shadow`:return e.name.startsWith(`--inset-shadow-`)?[`inset-shadow${n}`]:e.name.startsWith(`--drop-shadow-`)?[`drop-shadow${n}`]:e.name.startsWith(`--text-shadow-`)?[`text-shadow${n}`]:[`shadow${n}`];case`blur`:return[`blur${n}`,`backdrop-blur${n}`];case`ease`:return[`ease${n}`];case`animation`:return[`animate${n}`];case`breakpoint`:return e.name.startsWith(`--container-`)?[`@${t}:`,`max-w${n}`]:[`${t}:`];default:return[]}}function CO(e,...t){return e.filter(e=>t.includes(e.kind))}function wO(e){let t=new Map;for(let n of e){let e=t.get(n.group)??[];e.push(n),t.set(n.group,e)}return[...t].map(([e,t])=>({group:e,tokens:t}))}function TO(e){let t=/^(-?[\d.]+)(px|rem|em)?$/.exec(e.trim());if(!t)return null;let n=Number(t[1]);return Number.isFinite(n)?t[2]===`rem`||t[2]===`em`?n*16:n:null}function EO(e,t){return(t===`dark`?e.dark?.value:void 0)??e.light?.value}function DO(){let e=r_(),[t,n]=(0,m.useState)(null);return[t??e,n]}function OO({value:e,onChange:t}){return(0,h.jsx)(vw,{label:`Theme`,size:`sm`,value:e,onChange:t,items:[{value:`light`,label:(0,h.jsx)(Z,{name:`sun`,size:14}),title:`Light`},{value:`dark`,label:(0,h.jsx)(Z,{name:`moon`,size:14}),title:`Dark`}]})}function kO({items:e}){return e.length?(0,h.jsx)(`span`,{className:`flex min-w-0 flex-wrap gap-x-2 gap-y-0.5`,children:e.map(e=>(0,h.jsx)(Q,{size:12,className:`text-muted`,children:e},e))}):null}function AO({title:e,children:t}){return(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:e}),(0,h.jsx)(sw,{children:(0,h.jsx)(`div`,{className:`py-4 text-[13px] text-muted`,children:t})})]})}var jO=`.design/system/tokens.css`;function MO({children:e,className:t}){return(0,h.jsx)(`span`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere] ${t??``}`,children:e})}function NO({asset:e,index:t}){if(e.kind===`image`)return(0,h.jsx)(`span`,{className:`checker flex h-[132px] items-center justify-center overflow-hidden border-b border-rule`,children:(0,h.jsx)(`img`,{src:e.url,alt:``,className:`max-h-[96px] max-w-[80%] object-contain`})});if(e.kind===`font`){let n=`design-asset-font-${t}`;return(0,h.jsxs)(`span`,{className:`flex h-[132px] items-center justify-center border-b border-rule bg-soft`,children:[(0,h.jsx)(`style`,{children:`@font-face{font-family:"${n}";src:url("${e.url.replace(/"/g,`%22`)}")}`}),(0,h.jsx)(`span`,{className:`text-[52px] leading-none text-ink`,style:{fontFamily:`"${n}", var(--font-sans)`},children:`Aa`})]})}return(0,h.jsx)(`span`,{className:`flex h-[132px] items-center justify-center border-b border-rule bg-soft text-muted`,children:(0,h.jsx)(Z,{name:`file`,size:28})})}function PO({system:e}){return e.assets.length?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Assets`,sub:`Click an asset to copy its import path.`}),(0,h.jsx)(`div`,{className:`grid gap-4`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(210px, 1fr))`},children:e.assets.map((e,t)=>(0,h.jsx)(`button`,{type:`button`,title:`Copy the import path`,onClick:()=>hC(`@system/${e.path}`),className:`block cursor-pointer border-0 bg-transparent p-0 text-left`,children:(0,h.jsxs)(ZC,{className:`transition-colors hover:border-rule-strong`,children:[(0,h.jsx)(NO,{asset:e,index:t}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 px-3.5 py-2.5`,children:[(0,h.jsx)(`span`,{className:`truncate text-[13.5px] font-medium text-ink`,children:e.name}),(0,h.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-[12.5px] text-muted`,children:[(0,h.jsx)(`span`,{className:`shrink-0`,children:gO(e.size)}),(0,h.jsx)(Q,{size:12,className:`truncate`,children:e.path})]})]})]})},e.path))})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Assets`}),(0,h.jsxs)(AO,{title:`No assets`,children:[`Put logos, icons, images and font files in `,(0,h.jsx)(Q,{children:`.design/system/assets`}),`; screens import them as`,` `,(0,h.jsx)(Q,{children:`@system/assets/…`}),`.`]})]})}function FO({color:e,label:t,className:n}){return e?(0,h.jsx)(`span`,{title:`${t}: ${e}`,className:X(`checker relative h-[30px] w-[44px] shrink-0 overflow-hidden rounded-[6px]`,n),children:(0,h.jsx)(`span`,{className:`absolute inset-0 rounded-[6px] shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.12)]`,style:{background:e}})}):(0,h.jsx)(`span`,{className:X(`h-[30px] w-[44px] shrink-0`,n)})}function IO({tokens:e}){let t=e.some(e=>e.dark),n=t=>(0,h.jsxs)(`div`,{className:`relative flex h-9 min-w-0 grow overflow-hidden rounded-[6px]`,children:[(0,h.jsx)(`span`,{className:`pointer-events-none absolute inset-0 z-10 rounded-[6px] shadow-[inset_0_0_0_1px_var(--rule-strong)] opacity-60`}),e.map(e=>{let n=t===`dark`?e.dark?.value??e.light?.value:e.light?.value;return(0,h.jsx)(`button`,{type:`button`,title:`${e.name}: ${n}`,onClick:()=>hC(`var(${e.name})`),className:`h-full min-w-0 flex-1 cursor-pointer border-0 p-0 transition-[flex-grow] duration-150 hover:grow-[1.6]`,style:{background:n}},e.name)})]});return(0,h.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t border-rule px-4 py-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t?(0,h.jsx)(`span`,{className:`w-9 shrink-0 text-[12px] text-muted`,children:`Light`}):null,n(`light`)]}),t?(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`span`,{className:`w-9 shrink-0 text-[12px] text-muted`,children:`Dark`}),n(`dark`)]}):null]})}function LO({token:e}){return(0,h.jsxs)(iw,{cols:`100px minmax(170px, 0.9fr) minmax(0, 1.4fr)`,minH:56,title:`Copy the variable`,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(FO,{color:e.light?.value,label:`Light`}),e.dark?(0,h.jsx)(FO,{color:e.dark.value,label:`Dark`}):null]}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),(0,h.jsx)(kO,{items:SO(e).slice(0,2)})]}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-wrap gap-x-3`,children:[(0,h.jsx)(Q,{size:12,className:`text-muted`,children:e.light?.value}),e.dark?(0,h.jsxs)(Q,{size:12,className:`text-muted`,children:[`dark `,e.dark.value]}):null]}),e.description?(0,h.jsx)(`span`,{className:`text-[13px] text-ink2`,children:e.description}):null]})]})}function RO({system:e}){let t=CO(e.tokens,`color`),n=wO(t);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Colors`,sub:t.length?`${t.length} tokens · click a color to copy its variable`:void 0}),n.length?n.map(({group:e,tokens:t})=>(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:e,count:t.length}),(0,h.jsx)(IO,{tokens:t}),t.map(e=>(0,h.jsx)(LO,{token:e},e.name))]},e)):(0,h.jsxs)(AO,{title:`No color tokens`,children:[`Add them to `,(0,h.jsx)(Q,{children:jO}),`: light values in `,(0,h.jsx)(Q,{children:`:root`}),`, dark ones in`,` `,(0,h.jsx)(Q,{children:`:root[data-theme="dark"]`}),`, and map them to Tailwind with `,(0,h.jsx)(Q,{children:`--color-*`}),` in`,` `,(0,h.jsx)(Q,{children:`@theme inline`}),`.`]})]})}function zO({src:e,theme:t,title:n,minHeight:r=120,width:i,className:a}){let o=(0,m.useRef)(null),[s]=(0,m.useState)(()=>({src:e,theme:t})),c=gw(e,s.src===e?s.theme:t),[l,u]=(0,m.useState)(r),[d,f]=(0,m.useState)(!1),[p,g]=(0,m.useState)([]);return(0,m.useEffect)(()=>{let e=o.current;if(e)return f(!1),g([]),pw(e,e=>{e.type===`size`?u(Math.max(r,e.height)):e.type===`ready`?f(!0):e.type===`error`?g(t=>t.includes(e.message)?t:[...t,e.message]):e.type===`updated`&&g([])})},[r,c]),(0,m.useEffect)(()=>{hw(o.current,t)},[t]),(0,h.jsxs)(`div`,{className:X(`relative`,a),style:{width:i},children:[p.length?(0,h.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-rule bg-danger-soft px-4 py-2.5 text-[12.5px] text-danger-text`,children:[(0,h.jsx)(Z,{name:`alert`,size:15,className:`mt-px`}),(0,h.jsx)(`div`,{className:`min-w-0 font-mono break-words`,children:p.join(`
|
|
138
|
+
`)})]}):null,(0,h.jsx)(`iframe`,{ref:o,src:c,title:n,className:X(`block w-full border-0 transition-opacity duration-150`,d?`opacity-100`:`opacity-0`),style:{height:l,colorScheme:t},onLoad:()=>hw(o.current,t)},c),d?null:(0,h.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-muted`,children:(0,h.jsx)(Z,{name:`loader`,size:18})})]})}var BO=`identifier keyword string class property entity jsxliterals sign comment break space`.split(` `),[VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO]=BO.map((e,t)=>t);new Map(BO.map((e,t)=>[e,t]));function QO(e,t){let n=[],r=0,i=[],a=!1;function o(e){n.push({index:r++,value:e.map(([,e])=>e).join(``),tokens:e.map(([e,t])=>({type:BO[e],value:t})),annotations:[]})}for(let e=0;e<t.length;e++){let n=t[e],[r,s]=n;if(r!==XO){if(s.includes(`
|
|
139
|
+
`)){let e=s.split(`
|
|
140
|
+
`);for(let t=0;t<e.length;t++)i.push([r,e[t]]),t<e.length-1&&(o(i),i.length=0)}else i.push(n);a=!1}else a?o([]):(o(i),i.length=0),e===t.length-1&&o([]),a=!0}return i.length&&o(i),{value:e,lines:n}}function $O(e,t){let n={index:e.index,value:e.value,tokens:e.tokens,annotations:e.annotations,className:`sh__line${e.annotations.map(e=>` sh__line--${e}`).join(``)}`,style:{},properties:{}};return t?.(n),n}function ek({type:e,value:t},n,r){let i=n?.[e],a={type:e,value:t,className:`sh__token--${e}${i?` ${i}`:``}`,style:{color:`var(--sh-${e})`},properties:{}};return r?.(a),a}function tk(e,t){let n=t?.cx,r=t?.mark,i=t?.markLine;return!n&&!r&&!i?e.lines.map(e=>{let t=`sh__line${e.annotations.map(e=>` sh__line--${e}`).join(``)}`,n=e.tokens.map(({type:e,value:t})=>`<span class="sh__token--${e}" style="color:var(--sh-${e})">${rk(t)}</span>`).join(``);return`<span class="${rk(t)}">${n}</span>`}).join(`
|
|
141
|
+
`):e.lines.map(e=>{let t=$O(e,i),a=e.tokens.map(e=>{let t=ek(e,n,r);return`<span ${ik({...t.properties,className:t.className,style:t.style})}>${rk(t.value)}</span>`}).join(``);return`<span ${ik({...t.properties,className:t.className,style:t.style})}>${a}</span>`}).join(`
|
|
142
|
+
`)}var nk={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},rk=e=>e.replace(/[&<>"']/g,e=>nk[e]);function ik(e){let t=Object.entries(e.style||{}).map(([e,t])=>`${e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${t}`).join(`;`),n=Object.entries(e).filter(([e,t])=>/^[\w:-]+$/.test(e)&&e!==`className`&&e!==`style`&&t!==!1&&t!=null).map(([e,t])=>t===!0?e:`${e}="${rk(String(t))}"`).join(` `);return`class="${rk(e.className||``)}"${t?` style="${rk(t)}"`:``}${n?` ${n}`:``}`}var ak=new Set(`+-*/%=!&|^~?:.,;()[]{}<>#@\\`.split(``)),ok=()=>0,sk=e=>e===`_`||e===`$`||/[\p{L}\p{N}]/u.test(e);function ck(e,t){for(;t<e.length&&/\s/.test(e[t]);)t++;return e[t]===`:`}function lk(e,t){if(typeof t?.tokenize==`function`)return t.tokenize(e,t);let n=t?.keywords||new Set,r=t?.typeKeywords||new Set,i=t?.onCommentStart||ok,a=t?.onCommentEnd||ok,o=t?.caseInsensitive?e=>e.toLowerCase():e=>e,s=[],c=``;function l(e,t){t&&(s.push([e,t]),e!==ZO&&e!==XO&&(c=t))}for(let s=0;s<e.length;){let u=e[s],d=e[s+1],f=i(u,d,s,e);if(f){let t=s++;for(;s<e.length;){if(a(e[s-1],e[s],s,e,t)==f){s++;break}s++}l(YO,e.slice(t,s));continue}let p=t?.onLiteral?.(u,s,e);if(p){l(UO,e.slice(s,s+p)),s+=p;continue}if(typeof t?.onQuote==`function`&&u===`'`){let n=t.onQuote(u,s,e);if(typeof n==`number`&&n>=1){l(VO,e.slice(s,s+n)),s+=n;continue}}if(u===`"`||u===`'`||t?.templateStrings&&u==="`"){let n=u,r=s++;for(;s<e.length;){if(e[s]===`\\`)s++;else if(e[s]===n){s++;break}s++}let i=e.slice(r,s);l(t?.quotedKeys&&ck(e,s)?GO:UO,i);continue}if(u===`
|
|
143
|
+
`){l(XO,u),s++;continue}if(/[^\S\r\n]/.test(u)){let t=s++;for(;s<e.length&&/[^\S\r\n]/.test(e[s]);)s++;l(ZO,e.slice(t,s));continue}if(sk(u)){let t=s++;for(;s<e.length&&sk(e[s]);)s++;if(/^\d/.test(u)&&e[s]===`.`&&/\d/.test(e[s+1]||``))for(s++;s<e.length&&sk(e[s]);)s++;let i=e.slice(t,s),a=o(i);l(r.has(a)?WO:n.has(a)?HO:c===`.`?GO:/^\d/.test(i)||i===`null`||/^\p{Lu}/u.test(i)?WO:VO,i);continue}if(ak.has(u)){l(JO,u),s++;continue}l(UO,u),s++}return s}function uk(e,t){let n=QO(e,lk(e,t));if(t?.annotateLine)for(let e of n.lines)t.annotateLine(e);return n}var dk=(e,t)=>{let n=e+t;return n===`//`?1:n===`/*`?2:0},fk=(e,t)=>t===`
|
|
144
|
+
`?1:e+t===`*/`?2:0,pk=s({keywords:()=>hk,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>mk}),mk=new Set([`void`,`char`,`short`,`int`,`long`,`float`,`double`,`signed`,`unsigned`,`_Bool`,`_Complex`,`_Imaginary`]),hk=new Set(`auto.break.case.const.continue.default.do.else.enum.extern.for.goto.if.inline.register.restrict.return.sizeof.static.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local`.split(`.`)),gk=s({keywords:()=>_k,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>vk}),_k=new Set(`alignas.alignof.and.and_eq.asm.auto.bitand.bitor.break.case.catch.class.compl.concept.const.consteval.constexpr.constinit.const_cast.continue.co_await.co_return.co_yield.decltype.default.delete.do.dynamic_cast.else.enum.explicit.export.extern.false.for.friend.goto.if.inline.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.private.protected.public.register.reinterpret_cast.requires.return.sizeof.static.static_assert.static_cast.struct.switch.template.this.thread_local.throw.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`)),vk=new Set([`bool`,`char`,`char8_t`,`char16_t`,`char32_t`,`double`,`float`,`int`,`long`,`short`,`signed`,`unsigned`,`void`,`wchar_t`]),yk=s({keywords:()=>bk,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>xk}),bk=new Set(`abstract.as.async.await.base.break.case.catch.checked.class.const.continue.default.delegate.do.else.enum.event.explicit.extern.false.finally.fixed.for.foreach.from.get.global.goto.if.implicit.in.init.interface.internal.into.is.join.let.lock.namespace.new.null.on.operator.orderby.out.override.params.partial.private.protected.public.readonly.record.ref.remove.required.return.sealed.select.set.sizeof.stackalloc.static.struct.switch.this.throw.true.try.typeof.unchecked.unsafe.using.value.virtual.volatile.when.where.while.with.yield`.split(`.`)),xk=new Set([`bool`,`byte`,`char`,`decimal`,`double`,`dynamic`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`uint`,`ulong`,`ushort`,`void`]),Sk=s({keywords:()=>Ck,onCommentEnd:()=>Tk,onCommentStart:()=>wk,onLiteral:()=>Ek,tokenize:()=>Pk}),Ck=new Set([`@media`,`@import`,`@keyframes`,`@font-face`,`@supports`,`@page`,`@counter-style`,`@font-feature-values`,`@viewport`,`@counter-style`,`@font-feature-values`,`@document`]),wk=(e,t)=>+(e+t===`/*`),Tk=(e,t)=>+(e+t===`*/`),Ek=(e,t,n)=>e===`#`&&n.slice(t).match(/^#(?:[\da-f]{8}|[\da-f]{6}|[\da-f]{4}|[\da-f]{3})(?![\w-])/i)?.[0].length||0,Dk=e=>e===ZO||e===XO||e===YO,Ok=([e,t])=>e===VO||e===WO||e===JO&&t===`-`,kk=([e])=>e===VO||e===WO||e===GO,Ak=e=>kk(e)&&!/^\d/.test(e[1]),jk=([e,t])=>e===JO&&t===`-`,Mk=e=>{for(let t=0;t<e.length;t++){let n=t,r=t;if(jk(e[r])){for(;e[r]&&jk(e[r]);)r++;if(!e[r]||!Ak(e[r]))continue;n=r++}else if(Ak(e[r]))r++;else continue;let i=n>t;for(;e[r]&&jk(e[r]);){let t=r;for(;e[r]&&jk(e[r]);)r++;if(!e[r]||!kk(e[r])){r=t;break}i=!0,r++}if(!i)continue;let a=e.slice(t,r).map(([,e])=>e).join(``);e.splice(t,r-t,[e[n][0],a])}},Nk=(e,t)=>{let n=0,r=0;for(let i=t;i<e.length;i++){let[t,a]=e[i];if(t===JO){if(a===`(`)n++;else if(a===`)`)n--;else if(a===`[`)r++;else if(a===`]`)r--;else if(!n&&!r&&a===`{`)return!0;else if(!n&&!r&&(a===`;`||a===`}`))return!1}}return!1},Pk=(e,t)=>{let n=lk(e,{...t,tokenize:void 0});Mk(n);let r=0,i=!1;for(let e=0;e<n.length;e++){let[t,a]=n[e];if(t===JO&&a===`{`){r++,i=!0;continue}if(t===JO&&a===`}`){r--,i=!1;continue}if(t===JO&&a===`;`){i=r>0;continue}if(!i||Dk(t))continue;let o=e,s=e;for(;s<n.length&&Ok(n[s]);)s++;let c=s;for(;c<n.length&&Dk(n[c][0]);)c++;if(s>o&&n[c]?.[0]===JO&&n[c][1]===`:`&&!Nk(n,c+1)){let e=n.slice(o,s).map(([,e])=>e).join(``);n.splice(o,s-o,[GO,e])}i=!1}return n},Fk=s({annotateLine:()=>Lk,keywords:()=>Ik}),Ik=new Set([]),Lk=e=>{let t=``;if(e.value.startsWith(`+`)&&!e.value.startsWith(`+++`))t=`diff-add`;else if(e.value.startsWith(`-`)&&!e.value.startsWith(`---`))t=`diff-remove`;else if(e.value.startsWith(`@@`))t=`diff-hunk`;else if(/^(diff --git|index |--- |\+\+\+ )/.test(e.value)){t=`diff-meta`;for(let t of e.tokens)t.type===`property`&&(t.type=`identifier`)}t&&e.annotations.push(t)},Rk=e=>+(e===`#`),zk=(e,t)=>+(t===`
|
|
145
|
+
`),Bk=s({caseInsensitive:()=>!0,keywords:()=>Vk,onCommentEnd:()=>zk,onCommentStart:()=>Rk}),Vk=new Set([`add`,`arg`,`cmd`,`copy`,`entrypoint`,`env`,`expose`,`from`,`healthcheck`,`label`,`maintainer`,`onbuild`,`run`,`shell`,`stopsignal`,`user`,`volume`,`workdir`]),Hk=s({keywords:()=>Wk,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>Uk}),Uk=new Set([`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int`,`int8`,`int16`,`int32`,`int64`,`rune`,`string`,`uint`,`uint8`,`uint16`,`uint32`,`uint64`,`uintptr`]),Wk=new Set([`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`]),Gk=s({keywords:()=>Kk,onCommentEnd:()=>zk,onCommentStart:()=>Rk,typeKeywords:()=>qk}),Kk=new Set([`directive`,`enum`,`extend`,`fragment`,`implements`,`input`,`interface`,`mutation`,`on`,`query`,`repeatable`,`scalar`,`schema`,`subscription`,`type`,`union`]),qk=new Set([`Boolean`,`Float`,`ID`,`Int`,`String`]),Jk=s({keywords:()=>Yk,onCommentEnd:()=>Zk,onCommentStart:()=>Xk}),Yk=new Set([`false`,`for`,`if`,`in`,`null`,`true`]),Xk=(e,t)=>e===`#`||e+t===`//`?1:e+t===`/*`?2:0,Zk=(e,t)=>t===`
|
|
146
|
+
`?1:e+t===`*/`?2:0,Qk=new Set([`<`,`>`,`{`,`}`,`[`,`]`]),$k=new Set(`for.do.while.if.else.return.function.var.let.const.true.false.undefined.this.new.delete.typeof.in.instanceof.void.break.continue.switch.case.default.throw.try.catch.finally.debugger.with.yield.async.await.class.extends.super.import.export.from.static`.split(`.`)),eA=new Set([...$k,`type`,`interface`,`enum`,`implements`,`readonly`,`abstract`,`declare`,`namespace`,`module`,`private`,`protected`,`public`,`override`,`keyof`,`infer`,`is`,`asserts`,`satisfies`,`as`,`unknown`,`never`,`any`,`number`,`string`,`boolean`,`bigint`,`symbol`,`object`]),tA=new Set([`+`,`-`,`*`,`/`,`%`,`=`,`!`,`&`,`|`,`^`,`~`,`!`,`?`,`:`,`.`,`,`,`;`,`'`,`"`,`.`,`(`,`)`,`[`,`]`,`#`,`@`,`\\`,...Qk]),nA={keywords:$k,onCommentStart:hA,onCommentEnd:gA,jsx:!0,regex:!0,templateStrings:!0};function rA(e){return{...nA,...e}}function iA(e){let t=0;return/\binterface\s+[A-Za-z_$][\w$]*/.test(e)&&(t+=2),/\btype\s+[A-Za-z_$][\w$]*\s*=/.test(e)&&(t+=2),/\benum\s+[A-Za-z_$][\w$]*/.test(e)&&(t+=2),/\b(?:implements|readonly|declare|namespace|satisfies|infer|keyof|asserts)\b/.test(e)&&(t+=2),/:\s*[A-Za-z_$][\w$]*(?:<[^>\n]+>)?(?:\[\])?(?=\s*[,)=;{])/m.test(e)&&(t+=1),/\b(?:const|let|var)\s+[A-Za-z_$][\w$]*\s*:\s*/.test(e)&&(t+=1),/\)\s*:\s*[A-Za-z_$][\w$]*(?:<[^>\n]+>)?(?:\[\])?\s*(?:=>|\{)/.test(e)&&(t+=1),t>=2}function aA(e,t){if(e[t]!==`<`)return!1;let n=0,r=!1;for(let i=t;i<e.length;i++){let t=e[i];if(t===`<`){n++;continue}if(t===`>`){if(n--,n===0){let t=i+1;for(;t<e.length&&/\s/.test(e[t]);)t++;if(!(r&&e[t]===`(`))return!1;let n=e.slice(t,t+320);return/\)\s*(?::[\s\S]{0,120}?)?=>/.test(n)}continue}if(n!==0){if(/[$A-Za-z_]/.test(t)){r=!0;continue}if(!/[\s,\.\=\?\:\|\&\[\]]/.test(t))return!1}}return!1}function oA(e){return/^[^\S\r\n]+$/g.test(e)}function sA(e){return tA.has(e)}function cA(e){return/^[\w$\u0080-\uffff]+$/.test(e||``)}function lA(e){return/^[0-9A-Z\p{Lu}]/u.test(e)||e===`null`}function uA(e){return/^[a-zA-Z]$/.test(e)}function dA(e){return/^[$_A-Za-z\u0080-\uffff]$/.test(e||``)}function fA(e){return dA(e[0])&&cA(e)}function pA(e){return e==="`"}function mA(e){return e===`"`||e===`'`}function hA(e,t){let n=e+t;return n===`/*`?2:+(n===`//`)}function gA(e,t){return e+t===`*/`?2:+(t===`
|
|
147
|
+
`)}function _A(e){return e[0]===`/`&&!hA(e[0],e[1])}function vA(e,t){let n=t+1;for(;n<e.length&&/\s/.test(e[n]);)n++;return e[n]===`:`}function yA(e,t){let n=rA(t),r=n.keywords!==nA.keywords,i=typeof n.typescript==`boolean`?n.typescript:iA(e),a=r?n.keywords:i?eA:$k,{onCommentStart:o,onCommentEnd:s}=n,c=n.typeKeywords instanceof Set?n.typeKeywords:null,l=n.jsx!==!1,u=n.regex!==!1,d=n.templateStrings!==!1,f=n.caseInsensitive?e=>e.toLowerCase():e=>e,p=e=>d&&pA(e),m=``,h=-1,g=[-1,``],_=[-2,``],v=[],y=!1,b=0,x=0,S=0,C=0,w=()=>y&&!x&&!b,T=()=>b,E=()=>w()&&C,D=null,O=0,k=!1,A=0,j=0,ee=()=>D!==null,te=()=>k,ne=()=>j>A,re=()=>j>0&&j===A,ie=()=>ee()||ne();function ae(e){let t=e===`
|
|
148
|
+
`;if(T()){if(ee())return UO;let[,t]=g;if(fA(e)){if(t===`<`||t===`</`)return KO;if(!S&&/^\s+$/.test(v[v.length-1]?.[1]||``))return GO}}if(E())return qO;if(ee()||ne())return UO;if(c&&c.has(f(e)))return g[1]===`.`?VO:WO;if(a.has(f(e)))return g[1]===`.`?VO:HO;if(t)return XO;if(oA(e))return ZO;if(e.split(``).every(sA))return JO;if(lA(e))return T()&&!S?VO:WO;if(fA(e)){let e=g[1]===`.`&&fA(_[1]);if(!ie()&&!e)return VO;if(e)return GO}return UO}let M=(e,t)=>{if(t&&(m=t),m){h=typeof e==`number`?e:ae(m);let t=[h,m];h!==ZO&&h!==XO&&(_=g,g=t),T()&&h===JO&&(m===`{`&&S++,m===`}`&&S--),v.push(t)}m=``};for(let t=0;t<e.length;t++){let r=e[t],i=e[t-1],c=e[t+1],d=i+r,f=r+c;if(typeof n.onQuote==`function`&&r===`'`&&!ee()&&!E()&&!ne()){let i=n.onQuote(r,t,e);if(typeof i==`number`&&i>=1&&!Number.isNaN(i)){let n=Math.min(i,e.length-t),r=t+n;M(),m=e.slice(t,r),M(VO),t=r-1;continue}}if(mA(r)&&!E()&&!ne()){M();let i=!1;if(D&&r===D?(D=null,i=!0):D||(D=r,O=v.length),M(UO,r),n.quotedKeys&&i&&vA(e,t))for(let e=O;e<v.length;e++)v[e][0]=GO;continue}if(p(r)){M(),j+=ne()?-1:1,M(UO,r);continue}if(ne()&&f==="${"){A++,M(UO),M(JO,f),t++;continue}if(re()&&r===`}`){M(),A--,M(JO,r);continue}if(w()&&r===`{`){M(),M(JO,r),x=1;continue}if(y){if(!b&&r===`<`){M(),c===`/`?(b=2,m=f,t++):(b=1,m=r),M(JO);continue}if(b){if(r===`>`&&!`/=`.includes(i)){M(),b===1?(b=0,C++):(b=0,y=!1),M(JO,r);continue}if(f===`/>`||f===`</`){m!==`<`&&m!==`/`&&M(),f===`/>`?b=0:C--,C||(y=!1),m=f,t++,M(JO);continue}if(r===`<`){M(),m=r,M(JO);continue}if(r===`-`&&m&&!ie()&&!E()){let n=t+1;for(;n<e.length&&/[$\w-]/.test(e[n]);)n++;M(GO,m+e.slice(t,n)),t=n-1;continue}if(c===`=`&&!ie()&&!oA(r)){oA(m)&&M();let e=m+r;if(fA(e)){M(GO,e);continue}}}}if(l&&!b&&(r===`<`&&dA(c)||f===`</`)){let n=t-1;for(;n>=0&&/\s/.test(e[n]);)n--;let i=n>=0?e[n]:``,[o,s]=g,l=!1,u=!1;if(m&&!oA(m)){let e=m;lA(e)||e===`true`||e===`false`?l=!0:a.has(e)&&fA(e)?u=!0:fA(e)&&(l=!0)}let d=r===`<`&&/[$\w\]\)]/.test(i)&&(l||!u&&(o===VO||o===WO||o===JO&&(s===`)`||s===`]`))),f=r===`<`&&aA(e,t);!d&&!f&&(b=c===`/`?2:1),r===`<`&&(c===`/`||uA(c))&&!d&&!f&&!ie()&&!E()&&!te()&&(y=!0)}let h=mA(r)||p(r),_=ne(),S=u&&!y&&_A(f),T=E();if(h||_||mA(D))m+=r,r===`\\`&&(m+=e[++t]||``);else if(S){M();let[n,i]=g;if(S&&n!==-1&&!(n===JO&&i!==`)`||n===YO)){m=r,M();continue}k=!0;let a=t++,o=!1,s=!1;for(;t<e.length&&e[t]!==`
|
|
149
|
+
`;t++){let n=e[t];if(n===`\\`){if(e[t+1]===`
|
|
150
|
+
`)break;t++;continue}if(n===`[`&&(s=!0),n===`]`&&(s=!1),n===`/`&&!s){for(o=!0;/^[a-z]$/.test(e[t+1]);)t++;break}}k=!1,a!==t&&o?(m=e.slice(a,t+1),M(UO)):(m=r,M(),t=a)}else if(o(r,c,t,e)){M();let n=t,i=o(r,c,t,e);if(i)for(;t<e.length&&s(e[t-1],e[t],t,e)!=i;t++);m=e.slice(n,t+1),M(YO)}else if(r===` `||r===`
|
|
151
|
+
`){if(r===` `&&(oA(m)||!m||T)){let n=t+1;for(;e[n]===` `;)n++;m+=e.slice(t,n),t=n-1,e[n]===`<`&&M()}else M(),m=r,M()}else x&&r===`}`?(M(),m=r,M(),x--):T&&!Qk.has(r)||ne()||(cA(r)===cA(m[m.length-1])||w())&&!tA.has(r)?m+=r:(d===`</`&&(m=d),M(),d!==`</`&&(m=r),f===`</`||f===`/>`?(m=f,M(),t++):Qk.has(r)&&M()),x&&r===`{`&&x++}return M(),v}var bA=s({tokenize:()=>xA}),xA=yA,SA={keywords:new Set,jsx:!0,regex:!1,templateStrings:!1,onCommentStart:(e,t,n,r)=>r.startsWith(`<!--`,n)?2:0,onCommentEnd:(e,t,n,r)=>r.slice(n-2,n+1)===`-->`?2:0},CA=e=>xA(e,SA),wA=/^<\s*(script|style)\b/i,TA=e=>RegExp(`</\\s*${e}\\s*>`,`ig`);function EA(e,t){let n=``;for(let r=t;r<e.length;r++){let t=e[r];if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r+1}return-1}function DA(e){let t=[],n=0;for(;n<e.length;){if(e.startsWith(`<!--`,n)){let t=e.indexOf(`-->`,n+4);n=t===-1?e.length:t+3;continue}if(e[n]!==`<`){n++;continue}let r=EA(e,n);if(r===-1)break;let i=e.slice(n,r).match(wA);if(!i){n=r;continue}let a=i[1].toLowerCase(),o=TA(a);o.lastIndex=r;let s=o.exec(e);if(!s){n=r;continue}t.push({start:n,openEnd:r,closeStart:s.index,end:o.lastIndex,tag:a}),n=o.lastIndex}return t}function OA(e){let t=[],n=0;for(let r of DA(e)){let{start:i,openEnd:a,closeStart:o,end:s,tag:c}=r;t.push(...CA(e.slice(n,i))),t.push(...CA(e.slice(i,a))),t.push(...c===`style`?Pk(e.slice(a,o)):xA(e.slice(a,o),{jsx:!1})),t.push(...CA(e.slice(o,s))),n=s}return t.push(...CA(e.slice(n))),t}var kA=s({jsx:()=>!0,keywords:()=>AA,onCommentEnd:()=>NA,onCommentStart:()=>MA,regex:()=>!1,templateStrings:()=>!1,tokenize:()=>jA}),AA=new Set([]),jA=OA,MA=(e,t,n,r)=>r.startsWith(`<!--`,n)?2:0,NA=(e,t,n,r)=>r.slice(n-2,n+1)===`-->`?2:0,PA=s({keywords:()=>IA,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>FA}),FA=new Set([`boolean`,`byte`,`char`,`double`,`float`,`int`,`long`,`short`,`void`]),IA=new Set(`abstract.assert.break.case.catch.class.const.continue.default.do.else.enum.extends.final.finally.for.goto.if.implements.import.instanceof.interface.native.new.package.private.protected.public.return.static.strictfp.super.switch.synchronized.this.throw.throws.transient.try.volatile.while`.split(`.`)),LA=s({keywords:()=>RA,onCommentEnd:()=>fk,onCommentStart:()=>dk,quotedKeys:()=>!0}),RA=new Set([`true`,`false`,`null`]),zA=s({keywords:()=>BA,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>VA}),BA=new Set(`as.break.by.catch.class.companion.const.constructor.continue.data.do.else.enum.false.finally.for.fun.get.if.import.in.infix.init.interface.internal.is.lateinit.noinline.null.object.open.operator.out.override.package.private.protected.public.reified.return.sealed.set.suspend.tailrec.this.throw.true.try.typealias.val.var.vararg.when.where.while`.split(`.`)),VA=new Set([`Any`,`Boolean`,`Byte`,`Char`,`Double`,`Float`,`Int`,`Long`,`Nothing`,`Short`,`String`,`Unit`]),HA=s({keywords:()=>UA,onCommentEnd:()=>GA,onCommentStart:()=>WA,onLiteral:()=>KA}),UA=new Set([`and`,`break`,`do`,`else`,`elseif`,`end`,`false`,`for`,`function`,`goto`,`if`,`in`,`local`,`nil`,`not`,`or`,`repeat`,`return`,`then`,`true`,`until`,`while`]);function WA(e,t,n,r){return e===`#`&&n===0&&t===`!`?1:e+t===`--`?/^--\[=*\[/.test(r.slice(n))?2:1:0}function GA(e,t,n,r,i){if(t===`
|
|
152
|
+
`)return 1;if(t!==`]`)return 0;let a=r.slice(i).match(/^--\[(=*)\[/);if(!a)return 0;let o=`]${a[1]}]`;return r.slice(n-o.length+1,n+1)===o?2:0}function KA(e,t,n){if(e!==`[`)return 0;let r=n.slice(t).match(/^\[(=*)\[/);if(!r)return 0;let i=`]${r[1]}]`,a=n.indexOf(i,t+r[0].length);return a===-1?n.length-t:a+i.length-t}var qA=()=>0,JA=()=>0,YA=s({annotateLine:()=>QA,keywords:()=>XA,onCommentEnd:()=>JA,onCommentStart:()=>qA,tokenize:()=>ZA}),XA=new Set([]),ZA=e=>{let t=[],n=``,r=!1,i=(e,n)=>{if(!n)return;let r=t[t.length-1];r?.[0]===e?r[1]+=n:t.push([e,n])};for(let t of e.match(/[^\n]*(?:\n|$)/g)||[]){if(!t)continue;let e=t.endsWith(`
|
|
153
|
+
`)?`
|
|
154
|
+
`:``,a=e?t.slice(0,-1):t,o=[],s=a.match(/^(?: {0,3}>[ \t]?)*/)?.[0]||``;if(!n||r)for(let e of s.matchAll(/>/g))o.push([e.index,e.index+1]);let c=s.length,l=0;for(;l<3&&a[c]===` `;)c++,l++;let u=a.slice(c).match(/^(`{3,}|~{3,})/)?.[1];if(n)u?.[0]===n[0]&&u.length>=n.length&&/^\s*$/.test(a.slice(c+u.length))&&(o.push([c,c+u.length]),n=``,r=!1);else if(u)o.push([c,c+u.length]),n=u,r=s.includes(`>`);else{let e=a.slice(c).match(/^(#{1,6}(?=\s)|(?:[-+*]|\d+[.)])(?=\s)|(?:(?:\*\s*){3,}|(?:-\s*){3,}|(?:_\s*){3,})$)/)?.[1];e&&o.push([c,c+e.length]);for(let e of a.matchAll(/(`+)(.*?)\1|(\*{1,3}|_{1,3}|~{2})(?=\S)(.*?\S)\3/g)){let t=e[1]||e[3];a[e.index-1]===`\\`||t[0]===`_`&&/\w/.test(a[e.index-1]||``)||o.push([e.index,e.index+t.length],[e.index+e[0].length-t.length,e.index+e[0].length])}}let d=0;for(let[e,t]of o.sort((e,t)=>e[0]-t[0]))e<d||(i(VO,a.slice(d,e)),i(JO,a.slice(e,t)),d=t);i(VO,a.slice(d)+e)}return t},QA=e=>{let t=``;/^#{1,6}\s/.test(e.value)?t=`markdown-heading`:/^\s*>/.test(e.value)?t=`markdown-quote`:/^\s*(?:[-*+] |\d+[.)] )/.test(e.value)?t=`markdown-list`:/^\s*```/.test(e.value)&&(t=`markdown-fence`),t&&e.annotations.push(t)},$A=s({keywords:()=>ej,onCommentEnd:()=>rj,onCommentStart:()=>nj,typeKeywords:()=>tj}),ej=new Set(`abstract.and.array.as.break.callable.case.catch.class.clone.const.continue.declare.default.do.echo.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.exit.extends.false.final.finally.fn.for.foreach.from.function.global.goto.if.implements.include.include_once.instanceof.insteadof.interface.isset.list.match.namespace.new.null.or.print.private.protected.public.readonly.require.require_once.return.static.switch.throw.trait.true.try.unset.use.var.while.xor.yield`.split(`.`)),tj=new Set([`bool`,`float`,`int`,`iterable`,`mixed`,`never`,`object`,`string`,`void`]),nj=(e,t)=>e===`#`||e+t===`//`?1:e+t===`/*`?2:0,rj=(e,t)=>t===`
|
|
155
|
+
`?1:e+t===`*/`?2:0,ij=s({tokenize:()=>aj}),aj=e=>[[VO,e]],oj=s({caseInsensitive:()=>!0,keywords:()=>sj,onCommentEnd:()=>lj,onCommentStart:()=>cj}),sj=new Set(`begin.break.catch.class.continue.data.define.do.dynamicparam.else.elseif.end.enum.exit.filter.finally.for.foreach.from.function.if.in.param.process.return.switch.throw.trap.try.until.using.while`.split(`.`)),cj=(e,t)=>e===`#`?1:e+t===`<#`?2:0,lj=(e,t)=>t===`
|
|
156
|
+
`?1:e+t===`#>`?2:0,uj=s({keywords:()=>dj,onCommentEnd:()=>pj,onCommentStart:()=>fj}),dj=new Set(`and.as.assert.async.await.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.nonlocal.not.or.pass.raise.return.try.while.with.yield`.split(`.`)),fj=(e,t)=>+(e===`#`),pj=(e,t)=>+(t===`
|
|
157
|
+
`),mj=s({keywords:()=>hj,onCommentEnd:()=>vj,onCommentStart:()=>_j}),hj=new Set(`BEGIN.END.__ENCODING__.__FILE__.__LINE__.alias.and.begin.break.case.class.def.defined.do.else.elsif.end.ensure.false.for.if.in.module.next.nil.not.or.redo.rescue.retry.return.self.super.then.true.undef.unless.until.when.while.yield`.split(`.`));function gj(e,t){return e>0&&t[e-1]!==`
|
|
158
|
+
`?!1:/^=begin(?:\s|$)/.test(t.slice(e))}function _j(e,t,n,r){return e===`#`?1:e===`=`&&gj(n,r)?2:0}function vj(e,t,n,r){if(t!==`
|
|
159
|
+
`)return 0;let i=r.lastIndexOf(`
|
|
160
|
+
`,n-1)+1,a=r.slice(i,n);return/^=end(?:\s|$)/.test(a)?2:1}var yj=s({keywords:()=>bj,onQuote:()=>xj}),bj=new Set(`as.break.const.continue.crate.else.enum.extern.false.fn.for.if.impl.in.let.loop.match.mod.move.mut.pub.ref.return.self.Self.static.struct.super.trait.true.type.unsafe.use.where.while.async.await.dyn.abstract.become.box.do.final.macro.override.priv.typeof.unsized.virtual.yield.try`.split(`.`));function xj(e,t,n){if(e!==`'`||t+1>=n.length)return 1;let r=n[t+1];if(r===`\\`){let e=t+2;for(;e<n.length;){if(n[e]===`\\`){e+=2;continue}if(n[e]===`'`)return e-t+1;e++}return n.length-t}if(r===`_`)return 2;if(/[a-zA-Z]/.test(r)){let e=t+2;for(;e<n.length&&/[a-zA-Z0-9_]/.test(n[e]);)e++;return e<n.length&&n[e]===`'`?e-t+1:e-t}return 1}var Sj=s({keywords:()=>Cj,onCommentEnd:()=>zk,onCommentStart:()=>Rk}),Cj=new Set([`case`,`coproc`,`do`,`done`,`elif`,`else`,`esac`,`export`,`fi`,`for`,`function`,`if`,`in`,`local`,`readonly`,`return`,`select`,`then`,`time`,`until`,`while`]),wj=s({caseInsensitive:()=>!0,keywords:()=>Tj,onCommentEnd:()=>Oj,onCommentStart:()=>Dj,typeKeywords:()=>Ej}),Tj=new Set(`add.all.alter.and.as.asc.between.by.case.check.column.constraint.create.cross.database.default.delete.desc.distinct.drop.else.end.exists.foreign.from.full.group.having.in.index.inner.insert.into.is.join.key.left.like.limit.not.null.offset.on.or.order.outer.primary.references.right.select.set.table.then.union.unique.update.values.view.when.where.with`.split(`.`)),Ej=new Set([`bigint`,`binary`,`bit`,`blob`,`boolean`,`char`,`date`,`datetime`,`decimal`,`double`,`float`,`int`,`integer`,`interval`,`json`,`numeric`,`real`,`smallint`,`text`,`time`,`timestamp`,`uuid`,`varchar`]),Dj=(e,t)=>{let n=e+t;return n===`--`?1:n===`/*`?2:0},Oj=(e,t)=>t===`
|
|
161
|
+
`?1:e+t===`*/`?2:0,kj=s({keywords:()=>Aj,onCommentEnd:()=>fk,onCommentStart:()=>dk,typeKeywords:()=>jj}),Aj=new Set(`as.associatedtype.break.case.catch.class.continue.convenience.default.defer.deinit.didSet.do.dynamic.else.enum.extension.fallthrough.false.fileprivate.final.for.func.get.guard.if.import.in.indirect.infix.init.inout.internal.is.lazy.let.mutating.nil.nonmutating.open.operator.override.precedencegroup.private.protocol.public.repeat.required.rethrows.return.self.set.some.static.struct.subscript.super.switch.throw.throws.true.try.typealias.unowned.var.weak.where.while.willSet`.split(`.`)),jj=new Set([`Any`,`Bool`,`Character`,`Double`,`Float`,`Int`,`Never`,`String`,`UInt`,`Void`]),Mj=s({keywords:()=>Nj,onCommentEnd:()=>zk,onCommentStart:()=>Rk,quotedKeys:()=>!0}),Nj=new Set([`false`,`true`]),Pj=s({tokenize:()=>Fj}),Fj=(e,t)=>yA(e,{...t,typescript:!0}),Ij=s({jsx:()=>!0,keywords:()=>AA,onCommentEnd:()=>NA,onCommentStart:()=>MA,regex:()=>!1,templateStrings:()=>!1,tokenize:()=>OA}),Lj=s({jsx:()=>!0,keywords:()=>AA,onCommentEnd:()=>NA,onCommentStart:()=>MA,regex:()=>!1,templateStrings:()=>!1,tokenize:()=>OA}),Rj=s({keywords:()=>zj,onCommentEnd:()=>zk,onCommentStart:()=>Rk,quotedKeys:()=>!0}),zj=new Set([`false`,`False`,`FALSE`,`no`,`No`,`NO`,`null`,`Null`,`NULL`,`off`,`Off`,`OFF`,`on`,`On`,`ON`,`true`,`True`,`TRUE`,`yes`,`Yes`,`YES`]),Bj=s({keywords:()=>Vj,onCommentEnd:()=>Wj,onCommentStart:()=>Uj,onLiteral:()=>Gj,typeKeywords:()=>Hj}),Vj=new Set(`addrspace.align.allowzero.and.anyframe.anytype.asm.async.await.break.callconv.catch.comptime.const.continue.defer.else.enum.errdefer.error.export.extern.false.fn.for.if.inline.linksection.noalias.noinline.nosuspend.null.opaque.or.orelse.packed.pub.resume.return.struct.suspend.switch.test.threadlocal.true.try.undefined.union.unreachable.usingnamespace.var.volatile.while`.split(`.`)),Hj=new Set(`anyerror.anyopaque.bool.c_char.c_int.c_long.c_longdouble.c_longlong.c_short.c_uint.c_ulong.c_ulonglong.c_ushort.comptime_float.comptime_int.f16.f32.f64.f80.f128.i8.i16.i32.i64.i128.isize.noreturn.type.u8.u16.u32.u64.u128.usize.void`.split(`.`)),Uj=(e,t)=>+(e+t===`//`),Wj=(e,t)=>+(t===`
|
|
162
|
+
`);function Gj(e,t,n){if(e!==`\\`||n[t+1]!==`\\`)return 0;let r=n.lastIndexOf(`
|
|
163
|
+
`,t-1)+1;if(n.slice(r,t).trim())return 0;let i=n.indexOf(`
|
|
164
|
+
`,t+2);return(i===-1?n.length:i)-t}function Kj(e){return{...e,jsx:!1,regex:!1,templateStrings:!1}}function qj(){return{javascript:bA,typescript:Pj,css:Kj(Sk),python:Kj(uj),c:Kj(pk),go:Kj(Hk),java:Kj(PA),rust:Kj(yj),json:Kj(LA),diff:Kj(Fk),shell:Kj(Sj),cpp:Kj(gk),csharp:Kj(yk),sql:Kj(wj),html:kA,vue:Lj,svelte:Ij,yaml:Kj(Rj),markdown:Kj(YA),plaintext:Kj(ij),ruby:Kj(mj),kotlin:Kj(zA),swift:Kj(kj),php:Kj($A),toml:Kj(Mj),powershell:Kj(oj),dockerfile:Kj(Bk),graphql:Kj(Gk),hcl:Kj(Jk),zig:Kj(Bj),lua:Kj(HA)}}var Jj=qj();function Yj(e){return Jj[e||`javascript`]}function Xj(e,t){let{lang:n,cx:r,mark:i,markLine:a}=t||{};return tk(uk(e,Yj(n)),{cx:r,mark:i,markLine:a})}function Zj({code:e,path:t,className:n}){let r=e.replace(/\n$/,``),i=(0,m.useMemo)(()=>Xj(r),[r]),a=r.split(`
|
|
165
|
+
`).length;return(0,h.jsxs)(`div`,{className:X(`flex min-w-0 flex-col`,n),children:[t?(0,h.jsxs)(`div`,{className:`flex h-10 items-center justify-between gap-3 border-b border-rule bg-soft pr-1.5 pl-4`,children:[(0,h.jsx)(Q,{size:12,className:`truncate text-muted`,title:t,children:t}),(0,h.jsx)(y_,{icon:`copy`,label:`Copy file`,size:15,onClick:()=>hC(e,`Copied the file`)})]}):null,(0,h.jsxs)(`div`,{className:`flex max-h-[640px] min-w-0 overflow-auto font-mono text-[12.5px] leading-[1.6]`,children:[(0,h.jsx)(`pre`,{"aria-hidden":`true`,className:`sticky left-0 m-0 shrink-0 select-none border-r border-rule bg-surface py-3 pr-3 pl-4 text-right text-muted`,children:Array.from({length:a},(e,t)=>t+1).join(`
|
|
166
|
+
`)}),(0,h.jsx)(`pre`,{className:`m-0 min-w-0 grow py-3 pr-6 pl-4 text-ink`,children:(0,h.jsx)(`code`,{dangerouslySetInnerHTML:{__html:i}})})]})]})}var Qj={beta:`action`,experimental:`action`,draft:`action`,deprecated:`danger`,stable:`ok`},$j=`.design/system/components/`;function eM(e){return e.startsWith($j)?`@system/components/${e.slice(26).replace(/\.(tsx|jsx|ts|js)$/,``).replace(/\/index$/,``)}`:null}function tM(e){let t=new Set;for(let n of e.matchAll(/export\s+(?:async\s+)?(?:function|const|class|let)\s+([A-Za-z_$][\w$]*)/g))t.add(n[1]);for(let n of e.matchAll(/export\s*\{([^}]+)\}/g))for(let e of n[1].split(`,`)){let n=e.trim().split(/\s+as\s+/).pop()?.trim();n&&n!=="default"&&t.add(n)}return[...t].filter(e=>/^[A-Z]/.test(e))}function nM({path:e}){let t=eM(e),n=Hg(t?e:null).data;if(!t)return null;let r=n?tM(n):[],i=`import { ${r.length?r.join(`, `):`…`} } from '${t}'`;return(0,h.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-rule py-1.5 pr-1.5 pl-4`,children:[(0,h.jsx)(Q,{size:12.5,className:`min-w-0 truncate text-ink2`,title:i,children:i}),(0,h.jsx)(y_,{icon:`copy`,label:`Copy the import`,size:14,className:`ml-auto`,onClick:()=>hC(i)})]})}function rM({component:e,theme:t,width:n}){return n===`fill`?(0,h.jsx)(zO,{src:e.url,theme:t,title:e.title,minHeight:160}):(0,h.jsx)(`div`,{className:`flex justify-center overflow-x-auto bg-soft p-6`,children:(0,h.jsx)(`div`,{className:`shrink-0 overflow-hidden rounded-[8px] border border-rule bg-surface shadow-frame`,children:(0,h.jsx)(zO,{src:e.url,theme:t,title:e.title,minHeight:160,width:Number(n)})})})}function iM({component:e}){let t=[...e.sources,e.specimen],[n,r]=(0,m.useState)(t[0]),i=t.includes(n)?n:t[0],{data:a,error:o,isLoading:s}=Hg(i);return(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[t.length>1?(0,h.jsx)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-rule px-4 py-2.5`,children:(0,h.jsx)(vw,{label:`File`,size:`sm`,value:i,onChange:r,items:t.map(t=>({value:t,label:t===e.specimen?`${aM(t)} · specimen`:aM(t),title:t}))})}):null,eM(i)?(0,h.jsx)(nM,{path:i}):null,o?(0,h.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-6 text-[13px] text-danger-text`,children:[(0,h.jsx)(Z,{name:`alert`,size:15}),o.message]}):s||a===void 0?(0,h.jsx)(`div`,{className:`flex items-center justify-center py-10 text-muted`,children:(0,h.jsx)(Z,{name:`loader`,size:18})}):(0,h.jsx)(Zj,{code:a,path:i})]})}function aM(e){return e.split(`/`).pop()??e}function oM({system:e,id:t}){let n=e.components.find(e=>e.id===t),[r,i]=(0,m.useState)(`preview`),[a,o]=DO(),[s,c]=(0,m.useState)(`fill`);if(!n)return(0,h.jsx)(hT,{title:`No such component`,text:`There is no specimen "${t}" in .design/system/specimens.`});let l=n.status?.toLowerCase();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:n.title,badge:(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(YC,{children:n.group}),l?(0,h.jsx)(YC,{tone:Qj[l]??`neutral`,children:n.status}):null]}),sub:n.description}),(0,h.jsxs)(ZC,{children:[(0,h.jsx)($C,{value:r,onChange:i,items:[{value:`preview`,label:`Preview`},{value:`code`,label:`Code`,count:n.sources.length+1}],right:r===`preview`?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(vw,{label:`Width`,size:`sm`,value:s,onChange:c,items:[{value:`fill`,label:`Fill`},{value:`768`,label:`768`},{value:`390`,label:`390`}]}),(0,h.jsx)(OO,{value:a,onChange:o}),(0,h.jsx)(x_,{icon:`external`,href:_w(gw(n.url,a)),target:`_blank`,rel:`noreferrer`,children:`Open`})]}):null}),(0,h.jsx)(`div`,{className:`border-t border-rule`,children:r===`preview`?(0,h.jsx)(rM,{component:n,theme:a,width:s}):(0,h.jsx)(iM,{component:n})})]})]})}function sM(e,t){let n=/^\s*#\s+(.+)\r?\n/.exec(e);return n&&n[1].trim()===t?e.slice(n[0].length):e}function cM({system:e,slug:t}){let n=e.guidelines.find(e=>e.slug===t);if(!n)return(0,h.jsx)(hT,{title:`No such guideline`,text:`There is no guideline "${t}" in .design/system/guidelines.`});let r=sM(n.markdown,n.title).trim();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:n.title,sub:`Guideline`}),(0,h.jsx)(ZC,{children:(0,h.jsx)(`div`,{className:`px-6 py-5`,children:r?(0,h.jsx)(AD,{text:r,className:`max-w-[760px]`}):(0,h.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`This guideline is empty. Write it in `,(0,h.jsx)(Q,{children:`.design/system/guidelines`}),`.`]})})})]})}var lM={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};function uM(e){let t=e.trim();if(lM[t])return lM[t];let n=/^cubic-bezier\(\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*\)$/.exec(t);if(!n)return null;let r=n.slice(1).map(Number);return r.every(Number.isFinite)?r:null}function dM(e){let t=/^(-?[\d.]+)(ms|s)$/.exec(e.trim());return t?Number(t[1])*(t[2]===`s`?1e3:1):null}var fM=132,pM=22;function mM({bezier:e}){let[t,n,r,i]=e,a=Math.min(0,n,i),o=Math.max(1,n,i),s=88/(o-a),c=e=>pM+e*88,l=e=>pM+(o-e)*s;return(0,h.jsxs)(`svg`,{width:fM,height:fM,viewBox:`0 0 ${fM} ${fM}`,"aria-hidden":`true`,className:`shrink-0`,children:[(0,h.jsx)(`rect`,{x:c(0),y:l(1),width:88,height:l(0)-l(1),className:`fill-none stroke-rule`}),(0,h.jsx)(`line`,{x1:c(0),y1:l(0),x2:c(t),y2:l(n),className:`stroke-rule-strong`,strokeDasharray:`3 3`}),(0,h.jsx)(`line`,{x1:c(1),y1:l(1),x2:c(r),y2:l(i),className:`stroke-rule-strong`,strokeDasharray:`3 3`}),(0,h.jsx)(`path`,{d:`M ${c(0)} ${l(0)} C ${c(t)} ${l(n)}, ${c(r)} ${l(i)}, ${c(1)} ${l(1)}`,className:`fill-none stroke-ink`,strokeWidth:2,strokeLinecap:`round`}),(0,h.jsx)(`circle`,{cx:c(t),cy:l(n),r:3,className:`fill-action`}),(0,h.jsx)(`circle`,{cx:c(r),cy:l(i),r:3,className:`fill-action`})]})}function hM({token:e,duration:t}){let[n,r]=(0,m.useState)(!1),i=e.light?.value??``,a=uM(i);return(0,h.jsxs)(`button`,{type:`button`,title:`Hover to play; click to copy the variable`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),onClick:()=>hC(`var(${e.name})`),className:`flex min-w-0 cursor-pointer flex-col gap-3 rounded-[8px] border border-transparent bg-transparent p-3 text-left transition-colors hover:border-rule hover:bg-soft`,children:[(0,h.jsx)(`span`,{className:`flex h-[132px] items-center justify-center rounded-[6px] bg-soft`,children:a?(0,h.jsx)(mM,{bezier:a}):(0,h.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`No curve to draw`})}),(0,h.jsx)(`span`,{className:`relative mx-1 h-2 rounded-full bg-soft2`,children:(0,h.jsx)(`span`,{className:`absolute top-1/2 size-3.5 -translate-y-1/2 rounded-full bg-ink`,style:{left:n?`calc(100% - 14px)`:`0px`,transition:`left ${t}ms ${i||`ease`}`}})}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 px-1`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),(0,h.jsx)(kO,{items:SO(e)}),(0,h.jsx)(MO,{children:i}),e.description?(0,h.jsx)(`span`,{className:`text-[12.5px] text-ink2`,children:e.description}):null]})]})}function gM({system:e}){let t=CO(e.tokens,`ease`),n=CO(e.tokens,`duration`),r=CO(e.tokens,`animation`),i=`minmax(170px,1fr) 100px minmax(0,2fr)`,a=`minmax(170px,1fr) minmax(140px,0.7fr) minmax(0,2fr)`;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Motion`,sub:`Hover an easing to see it move.`}),!t.length&&!n.length&&!r.length?(0,h.jsxs)(AO,{title:`No motion tokens`,children:[`Add `,(0,h.jsx)(Q,{children:`--ease-*`}),` and `,(0,h.jsx)(Q,{children:`--animate-*`}),` to the `,(0,h.jsx)(Q,{children:`@theme`}),` block, and durations as`,` `,(0,h.jsx)(Q,{children:`--duration-*`}),`, in `,(0,h.jsx)(Q,{children:jO}),`.`]}):null,t.length?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Easing`,count:t.length}),(0,h.jsx)(`div`,{className:`grid gap-2 border-t border-rule p-3`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(190px, 1fr))`},children:t.map(e=>(0,h.jsx)(hM,{token:e,duration:900},e.name))})]}):null,n.length?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Durations`,count:n.length}),(0,h.jsx)(nw,{cols:i,labels:[`Token`,`Value`,``]}),n.map(e=>{let t=e.light?dM(e.light.value):null;return(0,h.jsxs)(iw,{cols:i,minH:40,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),e.description?(0,h.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.description}):null]}),(0,h.jsx)(Q,{size:12,className:`text-muted`,children:e.light?.value}),t===null?(0,h.jsx)(`span`,{}):(0,h.jsx)(`span`,{className:`h-3 rounded-[3px] bg-action/70`,style:{width:Math.max(2,Math.min(t/2,480))}})]},e.name)})]}):null,r.length?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Animations`,count:r.length,sub:`keyframes live in the system stylesheet`}),(0,h.jsx)(nw,{cols:a,labels:[`Token`,`Class`,`Value`]}),r.map(e=>(0,h.jsxs)(iw,{cols:a,minH:40,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),e.description?(0,h.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.description}):null]}),(0,h.jsx)(kO,{items:SO(e)}),(0,h.jsx)(MO,{children:e.light?.value})]},e.name))]}):null]})}function _M({system:e}){let t=new Set(e.tokens.map(e=>e.kind)),n=[{to:`/system/colors`,label:`Colors`,hint:vM(e,`color`)},{to:`/system/typography`,label:`Typography`},{to:`/system/shape`,label:`Spacing & shape`}];(t.has(`ease`)||t.has(`duration`)||t.has(`animation`))&&n.push({to:`/system/motion`,label:`Motion`}),t.has(`other`)&&n.push({to:`/system/tokens`,label:`Other tokens`,hint:vM(e,`other`)}),e.assets.length&&n.push({to:`/system/assets`,label:`Assets`,hint:e.assets.length});let r=new Map;for(let t of e.components){let e=r.get(t.group)??[];e.push({to:`/system/components/${encodeURIComponent(t.id)}`,label:t.title,hint:t.status}),r.set(t.group,e)}let i=e.guidelines.filter(e=>e.slug!==`overview`);return(0,h.jsxs)(`div`,{className:`flex flex-col max-lg:gap-1 max-lg:[&_nav]:flex-row max-lg:[&_nav]:flex-wrap`,children:[(0,h.jsx)(xw,{label:`Overview`,items:[{to:`/system`,label:`Overview`}]}),(0,h.jsx)(Sw,{children:`Foundations`}),(0,h.jsx)(xw,{label:`Foundations`,items:n}),i.length?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Sw,{children:`Guidelines`}),(0,h.jsx)(xw,{label:`Guidelines`,items:i.map(e=>({to:`/system/guidelines/${encodeURIComponent(e.slug)}`,label:e.title}))})]}):null,[...r].map(([e,t])=>(0,h.jsxs)(`div`,{className:`flex flex-col`,children:[(0,h.jsx)(Sw,{children:e}),(0,h.jsx)(xw,{label:e,items:t})]},e))]})}function vM(e,t){return e.tokens.filter(e=>e.kind===t).length||void 0}function yM({system:e}){let t=CO(e.tokens,`other`),n=`minmax(170px,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr)`;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Other tokens`,sub:`Variables that are not colors, type, spacing, shape or motion.`}),t.length?wO(t).map(({group:e,tokens:t})=>(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:e,count:t.length}),(0,h.jsx)(nw,{cols:n,labels:[`Token`,`Light`,`Dark`,`Description`]}),t.map(e=>(0,h.jsxs)(iw,{cols:n,minH:40,title:`Copy the variable`,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),(0,h.jsx)(MO,{children:e.light?.value}),(0,h.jsx)(MO,{children:e.dark?.value??`—`}),(0,h.jsx)(`span`,{className:`text-[13px] text-ink2`,children:e.description})]},e.name))]},e)):(0,h.jsxs)(AO,{title:`No other tokens`,children:[`Variables in `,(0,h.jsx)(Q,{children:`:root`}),` of `,(0,h.jsx)(Q,{children:jO}),` that are not colors or lengths show here.`]})]})}function bM(e,...t){return e.tokens.filter(e=>t.includes(e.kind)).length}function xM(e){let t=[{to:`/system/colors`,icon:`palette`,title:`Colors`,text:_O(bM(e,`color`),`token`)},{to:`/system/typography`,icon:`type`,title:`Typography`,text:`${_O(bM(e,`font`),`family`,`families`)} · ${_O(bM(e,`text`),`size`)}`},{to:`/system/shape`,icon:`shape`,title:`Spacing & shape`,text:_O(bM(e,`spacing`,`radius`,`shadow`,`blur`,`breakpoint`),`token`)}],n=bM(e,`ease`,`duration`,`animation`);n&&t.push({to:`/system/motion`,icon:`motion`,title:`Motion`,text:_O(n,`token`)}),e.assets.length&&t.push({to:`/system/assets`,icon:`image`,title:`Assets`,text:_O(e.assets.length,`file`)});let r=e.components[0];return r&&t.push({to:`/system/components/${encodeURIComponent(r.id)}`,icon:`component`,title:`Components`,text:_O(e.components.length,`component`)}),t}function SM({system:e}){return(0,h.jsx)(`div`,{className:`grid gap-4`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`},children:xM(e).map(e=>(0,h.jsxs)(Lf,{href:e.to,className:`flex items-center gap-3 rounded-[10px] border border-rule bg-surface px-4 py-3.5 text-inherit no-underline transition-colors hover:border-rule-strong hover:bg-soft`,children:[(0,h.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-[8px] bg-soft2 text-ink2`,children:(0,h.jsx)(Z,{name:e.icon,size:17})}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,h.jsx)(`span`,{className:`text-[14px] font-medium text-ink`,children:e.title}),(0,h.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.text})]})]},e.to))})}function CM({system:e}){let[,t]=jf(),n=[{label:`Color tokens`,value:bM(e,`color`),to:`/system/colors`},{label:`Type tokens`,value:bM(e,`font`,`text`,`weight`,`leading`,`tracking`),to:`/system/typography`},{label:`Spacing & shape tokens`,value:bM(e,`spacing`,`radius`,`shadow`,`blur`,`breakpoint`),to:`/system/shape`},{label:`Motion tokens`,value:bM(e,`ease`,`duration`,`animation`),to:`/system/motion`},{label:`Other tokens`,value:bM(e,`other`),to:`/system/tokens`},{label:`Components`,value:e.components.length},{label:`Guidelines`,value:e.guidelines.length}];return(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`At a glance`}),n.filter(e=>e.value||!e.to||e.to===`/system/colors`).map(e=>(0,h.jsxs)(iw,{cols:`minmax(0,1fr) auto`,align:`lr`,minH:40,pad:`8px 16px`,onClick:e.to&&e.value?()=>t(e.to):void 0,children:[(0,h.jsx)(`span`,{className:`text-[13.5px] text-ink2`,children:e.label}),(0,h.jsx)(XC,{value:e.value})]},e.label)),e.fonts.length?(0,h.jsxs)(iw,{cols:`minmax(0,1fr) auto`,align:`lr`,minH:40,pad:`8px 16px`,children:[(0,h.jsx)(`span`,{className:`text-[13.5px] text-ink2`,children:`Web fonts`}),(0,h.jsx)(`span`,{className:`flex min-w-0 flex-col items-end gap-0.5`,children:e.fonts.map(e=>(0,h.jsx)(Q,{size:12,className:`max-w-[260px] truncate text-muted`,title:e,children:wM(e)},e))})]}):null]})}function wM(e){try{let t=new URL(e),n=t.searchParams.getAll(`family`).map(e=>e.split(`:`)[0].replace(/\+/g,` `));return n.length?n.join(`, `):t.host}catch{return e}}function TM({system:e}){let t=e.guidelines.find(e=>e.slug===`overview`);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:e.name,sub:e.description}),(0,h.jsx)(lw,{issues:e.issues,title:`Problems in the design system`}),(0,h.jsx)(SM,{system:e}),(0,h.jsxs)(`div`,{className:`grid items-start gap-5 max-xl:grid-cols-1!`,style:{gridTemplateColumns:`minmax(0,1fr) 320px`},children:[t?(0,h.jsx)(ZC,{children:(0,h.jsx)(`div`,{className:`px-6 py-5`,children:(0,h.jsx)(AD,{text:t.markdown})})}):(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Overview`}),(0,h.jsxs)(`div`,{className:`border-t border-rule px-4 py-5 text-[13px] text-muted`,children:[`Write the principles every screen follows in `,(0,h.jsx)(Q,{children:`.design/system/guidelines/01-overview.md`}),`; it shows here.`]})]}),(0,h.jsx)(CM,{system:e})]})]})}var EM=[1,2,3,4,6,8,12,16],DM=480;function OM({px:e}){return e===null?(0,h.jsx)(`span`,{className:`text-[12.5px] text-muted`,children:`not a plain length`}):(0,h.jsxs)(`span`,{className:`flex h-3 items-center`,children:[(0,h.jsx)(`span`,{className:`h-3 rounded-[3px] bg-action/70`,style:{width:Math.max(2,Math.min(e,DM))},title:`${e}px`}),e>DM?(0,h.jsx)(`span`,{className:`ml-1.5 text-[12px] text-muted`,children:`…`}):null]})}function kM({tokens:e}){let t=e.find(e=>e.name===`--spacing`),n=e.filter(e=>e!==t),r=t?.light?TO(t.light.value):null,i=`minmax(150px,0.8fr) 110px minmax(0,2fr)`;return(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Spacing`,count:e.length,sub:t?`base ${t.light?.value}`:void 0}),(0,h.jsx)(nw,{cols:i,labels:[`Class or token`,`Value`,``]}),t&&r!==null?EM.map(e=>(0,h.jsxs)(iw,{cols:i,minH:36,pad:`6px 16px`,children:[(0,h.jsxs)(Q,{size:12.5,className:`text-ink`,children:[`p-`,e,` · gap-`,e]}),(0,h.jsxs)(Q,{size:12,className:`text-muted`,children:[r*e,`px`]}),(0,h.jsx)(OM,{px:r*e})]},e)):null,n.map(e=>(0,h.jsxs)(iw,{cols:i,minH:40,pad:`6px 16px`,title:`Copy the variable`,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),e.description?(0,h.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.description}):null]}),(0,h.jsx)(Q,{size:12,className:`text-muted`,children:e.light?.value}),(0,h.jsx)(OM,{px:e.light?TO(e.light.value):null})]},e.name))]})}function AM({token:e,children:t}){return(0,h.jsxs)(`button`,{type:`button`,title:`Copy the variable`,onClick:()=>hC(`var(${e.name})`),className:`flex min-w-0 cursor-pointer flex-col items-stretch gap-2.5 rounded-[8px] border border-transparent bg-transparent p-2 text-left transition-colors hover:border-rule hover:bg-soft`,children:[t,(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 px-1`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),(0,h.jsx)(kO,{items:SO(e)}),(0,h.jsx)(MO,{children:e.light?.value}),e.description?(0,h.jsx)(`span`,{className:`text-[12.5px] text-ink2`,children:e.description}):null]})]})}function jM({title:e,tokens:t,min:n=170,children:r}){return(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:e,count:t.length}),(0,h.jsx)(`div`,{className:`grid gap-2 border-t border-rule p-3`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${n}px, 1fr))`},children:t.map(e=>(0,h.jsx)(AM,{token:e,children:r(e)},e.name))})]})}function MM({tokens:e}){let t=`minmax(170px,1fr) minmax(90px,0.6fr) 110px 90px`;return(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Breakpoints`,count:e.length}),(0,h.jsx)(nw,{cols:t,labels:[`Token`,`Variant`,`Value`,`Pixels`],align:`lllr`}),e.map(e=>{let n=e.light?TO(e.light.value):null;return(0,h.jsxs)(iw,{cols:t,align:`lllr`,minH:40,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),(0,h.jsx)(kO,{items:SO(e)}),(0,h.jsx)(Q,{size:12,className:`text-muted`,children:e.light?.value}),(0,h.jsx)(Q,{size:12,className:`text-muted`,children:n===null?``:`${n}px`})]},e.name)})]})}function NM({system:e}){let t=r_(),n=CO(e.tokens,`spacing`),r=CO(e.tokens,`radius`),i=CO(e.tokens,`shadow`),a=CO(e.tokens,`blur`),o=CO(e.tokens,`breakpoint`),s=!n.length&&!r.length&&!i.length&&!a.length&&!o.length;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Spacing & shape`,sub:`Click a token to copy its variable.`}),s?(0,h.jsxs)(AO,{title:`No spacing or shape tokens`,children:[`Add `,(0,h.jsx)(Q,{children:`--spacing`}),` (the base step), `,(0,h.jsx)(Q,{children:`--spacing-*`}),`, `,(0,h.jsx)(Q,{children:`--radius-*`}),`,`,` `,(0,h.jsx)(Q,{children:`--shadow-*`}),` and `,(0,h.jsx)(Q,{children:`--breakpoint-*`}),` to the `,(0,h.jsx)(Q,{children:`@theme`}),` block in`,` `,(0,h.jsx)(Q,{children:jO}),`.`]}):null,n.length?(0,h.jsx)(kM,{tokens:n}):null,r.length?(0,h.jsx)(jM,{title:`Radii`,tokens:r,children:e=>(0,h.jsx)(`span`,{className:`flex h-[88px] items-center justify-center rounded-[6px] bg-soft`,children:(0,h.jsx)(`span`,{className:`size-14 border border-rule-strong bg-surface`,style:{borderRadius:e.light?.value}})})}):null,i.length?(0,h.jsx)(jM,{title:`Shadows`,tokens:i,min:200,children:e=>(0,h.jsx)(`span`,{className:`flex h-[112px] items-center justify-center rounded-[6px] bg-soft`,children:(0,h.jsx)(`span`,{className:`h-[60px] w-[108px] rounded-[8px] bg-surface`,style:{boxShadow:EO(e,t)}})})}):null,a.length?(0,h.jsx)(jM,{title:`Blur`,tokens:a,children:e=>(0,h.jsxs)(`span`,{className:`relative flex h-[88px] items-center justify-center overflow-hidden rounded-[6px] bg-soft`,children:[(0,h.jsx)(`span`,{className:`absolute left-5 top-4 size-10 rounded-full bg-action`}),(0,h.jsx)(`span`,{className:`absolute right-6 bottom-3 size-12 rounded-[6px] bg-ink2`}),(0,h.jsx)(`span`,{className:`absolute inset-x-6 inset-y-5 rounded-[6px] bg-surface/40`,style:{backdropFilter:`blur(${e.light?.value})`}})]})}):null,o.length?(0,h.jsx)(MM,{tokens:o}):null]})}var PM={font:`Family`,text:`Size`,weight:`Weight`,leading:`Line height`,tracking:`Letter spacing`};function FM(e){return e.kind===`text`?[e.light?.value,e.lineHeight].filter(Boolean).join(` / `):e.light?.value??``}function IM({system:e}){let[t,n]=DO(),r=CO(e.tokens,`font`,`text`,`weight`,`leading`,`tracking`);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(bw,{title:`Typography`,sub:`Set in the design system's own stylesheet, with its fonts.`}),e.typographyUrl?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Specimen`,right:(0,h.jsx)(OO,{value:t,onChange:n})}),(0,h.jsx)(`div`,{className:`border-t border-rule`,children:(0,h.jsx)(zO,{src:e.typographyUrl,theme:t,title:`Typography specimen`,minHeight:200})})]}):null,r.length?(0,h.jsxs)(ZC,{children:[(0,h.jsx)(QC,{title:`Tokens`,count:r.length}),(0,h.jsx)(nw,{cols:`minmax(160px,1fr) 110px minmax(120px,0.8fr) minmax(0,1.4fr)`,labels:[`Token`,`Kind`,`Class`,`Value`]}),r.map(e=>(0,h.jsxs)(iw,{cols:`minmax(160px,1fr) 110px minmax(120px,0.8fr) minmax(0,1.4fr)`,minH:42,title:`Copy the variable`,onClick:()=>hC(`var(${e.name})`),children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsx)(Q,{size:12.5,className:`truncate text-ink`,children:e.name}),e.description?(0,h.jsx)(`span`,{className:`truncate text-[12.5px] text-muted`,children:e.description}):null]}),(0,h.jsx)(`span`,{className:`text-[13px] text-ink2`,children:PM[e.kind]}),(0,h.jsx)(kO,{items:SO(e)}),(0,h.jsx)(MO,{children:FM(e)})]},e.name))]}):(0,h.jsxs)(AO,{title:`No type tokens`,children:[`Add font families (`,(0,h.jsx)(Q,{children:`--font-*`}),`), sizes (`,(0,h.jsx)(Q,{children:`--text-*`}),` with`,` `,(0,h.jsx)(Q,{children:`--text-*--line-height`}),`) and weights (`,(0,h.jsx)(Q,{children:`--font-weight-*`}),`) to the `,(0,h.jsx)(Q,{children:`@theme`}),` `,`block in `,(0,h.jsx)(Q,{children:jO}),`. Web fonts go in `,(0,h.jsx)(Q,{children:`system.json`}),` `,(0,h.jsx)(Q,{children:`fonts`}),`.`]})]})}function LM({system:e}){return(0,h.jsx)(`main`,{className:`mx-auto flex w-full max-w-[1440px] grow animate-[q-fade-in_160ms_ease-out] px-8 pt-6 pb-7 max-md:px-4 max-md:pt-4`,children:(0,h.jsxs)(`div`,{className:`grid w-full items-start gap-6 max-lg:grid-cols-1!`,style:{gridTemplateColumns:`232px minmax(0, 1fr)`},children:[(0,h.jsx)(`aside`,{className:`sticky top-[76px] flex max-h-[calc(100dvh-100px)] flex-col overflow-y-auto pb-4 max-lg:static max-lg:max-h-none max-lg:overflow-visible max-lg:pb-0`,children:(0,h.jsx)(_M,{system:e})}),(0,h.jsx)(`div`,{className:`flex min-w-0 flex-col gap-5`,children:(0,h.jsxs)(zf,{children:[(0,h.jsx)(If,{path:`/system`,children:(0,h.jsx)(TM,{system:e})}),(0,h.jsx)(If,{path:`/system/colors`,children:(0,h.jsx)(RO,{system:e})}),(0,h.jsx)(If,{path:`/system/typography`,children:(0,h.jsx)(IM,{system:e})}),(0,h.jsx)(If,{path:`/system/shape`,children:(0,h.jsx)(NM,{system:e})}),(0,h.jsx)(If,{path:`/system/motion`,children:(0,h.jsx)(gM,{system:e})}),(0,h.jsx)(If,{path:`/system/tokens`,children:(0,h.jsx)(yM,{system:e})}),(0,h.jsx)(If,{path:`/system/assets`,children:(0,h.jsx)(PO,{system:e})}),(0,h.jsx)(If,{path:`/system/guidelines/:slug`,children:t=>(0,h.jsx)(cM,{system:e,slug:decodeURIComponent(t.slug)})}),(0,h.jsx)(If,{path:`/system/components/:id`,children:t=>(0,h.jsx)(oM,{system:e,id:decodeURIComponent(t.id)})}),(0,h.jsx)(If,{children:(0,h.jsx)(hT,{title:`No such page`,text:`This page is not part of the design system.`})})]})})]})})}function RM(){return(0,h.jsx)(ww,{title:`No design system yet`,text:(0,h.jsxs)(h.Fragment,{children:[`Ask your agent to build one from the codebase, or run `,(0,h.jsx)(Q,{children:`design system init`}),` to start from a template in `,(0,h.jsx)(Q,{children:`.design/system`}),`.`]})})}function zM(){let e=zg().data,t=e?e.system!==null:void 0,{data:n,error:r,isLoading:i}=Vg(t===!0);return t===!1||r instanceof Ng&&r.status===404?(0,h.jsx)(RM,{}):r?(0,h.jsx)(ww,{title:`Could not load the design system`,text:r.message}):i||!n?null:(0,h.jsx)(LM,{system:n})}function BM(){let e=zg().data?.name;return(0,m.useEffect)(()=>{e&&(document.title=`${e} · Design`)},[e]),null}function VM(){return(0,h.jsxs)(zf,{children:[(0,h.jsx)(If,{path:`/c/:canvas/play/:item`,children:e=>(0,h.jsx)(dO,{canvasId:e.canvas,itemId:e.item})}),(0,h.jsx)(If,{path:`/c/:canvas/p/:page`,children:e=>(0,h.jsx)(eO,{canvasId:e.canvas,pageId:e.page})}),(0,h.jsx)(If,{path:`/c/:canvas`,children:e=>(0,h.jsx)(eO,{canvasId:e.canvas})}),(0,h.jsxs)(If,{path:`/system/*?`,children:[(0,h.jsx)(RS,{}),(0,h.jsx)(zM,{})]}),(0,h.jsxs)(If,{path:`/`,children:[(0,h.jsx)(RS,{}),(0,h.jsx)(xO,{})]}),(0,h.jsxs)(If,{children:[(0,h.jsx)(RS,{}),(0,h.jsx)(hT,{})]})]})}function HM(){return(0,h.jsx)(hu,{reducedMotion:`user`,children:(0,h.jsxs)(fT,{children:[(0,h.jsx)(BM,{}),Mg?(0,h.jsxs)(Nf,{hook:Kf,hrefs:e=>`#${e}`,children:[(0,h.jsx)(VM,{}),(0,h.jsx)(u_,{})]}):(0,h.jsxs)(Nf,{children:[(0,h.jsx)(VM,{}),(0,h.jsx)(u_,{})]}),(0,h.jsx)(mC,{})]})})}Ug(),(0,Qd.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:Lg,children:(0,h.jsx)(HM,{})})}));
|