@studioindia/designx 1.0.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/README.md +83 -0
- package/bin/designx.js +155 -0
- package/dist/assets/AppPreviewPanel-r56nQGPH.js +8 -0
- package/dist/assets/index-Bym9SmTQ.js +24 -0
- package/dist/assets/index-CAWjWFwD.js +231 -0
- package/dist/assets/index-CBUxOHiU.js +406 -0
- package/dist/assets/index-vZi_8zoX.css +10 -0
- package/dist/assets/xlsx-CkFp8p6R.js +105 -0
- package/dist/fonts/README.md +11 -0
- package/dist/fonts/Roobert-Medium.woff2 +0 -0
- package/dist/fonts/Roobert-Regular.woff2 +0 -0
- package/dist/fonts/Roobert-SemiBold.woff2 +0 -0
- package/dist/index.html +13 -0
- package/package.json +74 -0
- package/server.cjs +48114 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
function Ux(t,a){for(var i=0;i<a.length;i++){const s=a[i];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(s,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();var tN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nN(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var a=t.default;if(typeof a=="function"){var i=function s(){return this instanceof s?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};i.prototype=a.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,o.get?o:{enumerable:!0,get:function(){return t[s]}})}),i}var yf={exports:{}},xl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var f2;function Zx(){if(f2)return xl;f2=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(s,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:s,key:u,ref:o!==void 0?o:null,props:c}}return xl.Fragment=a,xl.jsx=i,xl.jsxs=i,xl}var h2;function Px(){return h2||(h2=1,yf.exports=Zx()),yf.exports}var y=Px(),bf={exports:{}},et={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var m2;function Fx(){if(m2)return et;m2=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),E=Symbol.iterator;function S(C){return C===null||typeof C!="object"?null:(C=E&&C[E]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,M={};function j(C,q,oe){this.props=C,this.context=q,this.refs=M,this.updater=oe||w}j.prototype.isReactComponent={},j.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,q,"setState")},j.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=j.prototype;function L(C,q,oe){this.props=C,this.context=q,this.refs=M,this.updater=oe||w}var B=L.prototype=new R;B.constructor=L,T(B,j.prototype),B.isPureReactComponent=!0;var U=Array.isArray;function le(){}var ne={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function ee(C,q,oe){var me=oe.ref;return{$$typeof:t,type:C,key:q,ref:me!==void 0?me:null,props:oe}}function ae(C,q){return ee(C.type,q,C.props)}function ie(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Q(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(oe){return q[oe]})}var pe=/\/+/g;function fe(C,q){return typeof C=="object"&&C!==null&&C.key!=null?Q(""+C.key):q.toString(36)}function ye(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(le,le):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function H(C,q,oe,me,xe){var Ne=typeof C;(Ne==="undefined"||Ne==="boolean")&&(C=null);var $=!1;if(C===null)$=!0;else switch(Ne){case"bigint":case"string":case"number":$=!0;break;case"object":switch(C.$$typeof){case t:case a:$=!0;break;case b:return $=C._init,H($(C._payload),q,oe,me,xe)}}if($)return xe=xe(C),$=me===""?"."+fe(C,0):me,U(xe)?(oe="",$!=null&&(oe=$.replace(pe,"$&/")+"/"),H(xe,q,oe,"",function(ut){return ut})):xe!=null&&(ie(xe)&&(xe=ae(xe,oe+(xe.key==null||C&&C.key===xe.key?"":(""+xe.key).replace(pe,"$&/")+"/")+$)),q.push(xe)),1;$=0;var ze=me===""?".":me+":";if(U(C))for(var Le=0;Le<C.length;Le++)me=C[Le],Ne=ze+fe(me,Le),$+=H(me,q,oe,Ne,xe);else if(Le=S(C),typeof Le=="function")for(C=Le.call(C),Le=0;!(me=C.next()).done;)me=me.value,Ne=ze+fe(me,Le++),$+=H(me,q,oe,Ne,xe);else if(Ne==="object"){if(typeof C.then=="function")return H(ye(C),q,oe,me,xe);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return $}function X(C,q,oe){if(C==null)return C;var me=[],xe=0;return H(C,me,"","",function(Ne){return q.call(oe,Ne,xe++)}),me}function Y(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(oe){(C._status===0||C._status===-1)&&(C._status=1,C._result=oe)},function(oe){(C._status===0||C._status===-1)&&(C._status=2,C._result=oe)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var ue=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},Se={map:X,forEach:function(C,q,oe){X(C,function(){q.apply(this,arguments)},oe)},count:function(C){var q=0;return X(C,function(){q++}),q},toArray:function(C){return X(C,function(q){return q})||[]},only:function(C){if(!ie(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return et.Activity=v,et.Children=Se,et.Component=j,et.Fragment=i,et.Profiler=o,et.PureComponent=L,et.StrictMode=s,et.Suspense=g,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,et.__COMPILER_RUNTIME={__proto__:null,c:function(C){return ne.H.useMemoCache(C)}},et.cache=function(C){return function(){return C.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(C,q,oe){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var me=T({},C.props),xe=C.key;if(q!=null)for(Ne in q.key!==void 0&&(xe=""+q.key),q)!_.call(q,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&q.ref===void 0||(me[Ne]=q[Ne]);var Ne=arguments.length-2;if(Ne===1)me.children=oe;else if(1<Ne){for(var $=Array(Ne),ze=0;ze<Ne;ze++)$[ze]=arguments[ze+2];me.children=$}return ee(C.type,xe,me)},et.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},et.createElement=function(C,q,oe){var me,xe={},Ne=null;if(q!=null)for(me in q.key!==void 0&&(Ne=""+q.key),q)_.call(q,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(xe[me]=q[me]);var $=arguments.length-2;if($===1)xe.children=oe;else if(1<$){for(var ze=Array($),Le=0;Le<$;Le++)ze[Le]=arguments[Le+2];xe.children=ze}if(C&&C.defaultProps)for(me in $=C.defaultProps,$)xe[me]===void 0&&(xe[me]=$[me]);return ee(C,Ne,xe)},et.createRef=function(){return{current:null}},et.forwardRef=function(C){return{$$typeof:h,render:C}},et.isValidElement=ie,et.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:Y}},et.memo=function(C,q){return{$$typeof:p,type:C,compare:q===void 0?null:q}},et.startTransition=function(C){var q=ne.T,oe={};ne.T=oe;try{var me=C(),xe=ne.S;xe!==null&&xe(oe,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(le,ue)}catch(Ne){ue(Ne)}finally{q!==null&&oe.types!==null&&(q.types=oe.types),ne.T=q}},et.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},et.use=function(C){return ne.H.use(C)},et.useActionState=function(C,q,oe){return ne.H.useActionState(C,q,oe)},et.useCallback=function(C,q){return ne.H.useCallback(C,q)},et.useContext=function(C){return ne.H.useContext(C)},et.useDebugValue=function(){},et.useDeferredValue=function(C,q){return ne.H.useDeferredValue(C,q)},et.useEffect=function(C,q){return ne.H.useEffect(C,q)},et.useEffectEvent=function(C){return ne.H.useEffectEvent(C)},et.useId=function(){return ne.H.useId()},et.useImperativeHandle=function(C,q,oe){return ne.H.useImperativeHandle(C,q,oe)},et.useInsertionEffect=function(C,q){return ne.H.useInsertionEffect(C,q)},et.useLayoutEffect=function(C,q){return ne.H.useLayoutEffect(C,q)},et.useMemo=function(C,q){return ne.H.useMemo(C,q)},et.useOptimistic=function(C,q){return ne.H.useOptimistic(C,q)},et.useReducer=function(C,q,oe){return ne.H.useReducer(C,q,oe)},et.useRef=function(C){return ne.H.useRef(C)},et.useState=function(C){return ne.H.useState(C)},et.useSyncExternalStore=function(C,q,oe){return ne.H.useSyncExternalStore(C,q,oe)},et.useTransition=function(){return ne.H.useTransition()},et.version="19.2.5",et}var p2;function k0(){return p2||(p2=1,bf.exports=Fx()),bf.exports}var d=k0();const gs=e4(d),Ix=Ux({__proto__:null,default:gs},[d]);var vf={exports:{}},El={},xf={exports:{}},Ef={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var g2;function Gx(){return g2||(g2=1,(function(t){function a(H,X){var Y=H.length;H.push(X);e:for(;0<Y;){var ue=Y-1>>>1,Se=H[ue];if(0<o(Se,X))H[ue]=X,H[Y]=Se,Y=ue;else break e}}function i(H){return H.length===0?null:H[0]}function s(H){if(H.length===0)return null;var X=H[0],Y=H.pop();if(Y!==X){H[0]=Y;e:for(var ue=0,Se=H.length,C=Se>>>1;ue<C;){var q=2*(ue+1)-1,oe=H[q],me=q+1,xe=H[me];if(0>o(oe,Y))me<Se&&0>o(xe,oe)?(H[ue]=xe,H[me]=Y,ue=me):(H[ue]=oe,H[q]=Y,ue=q);else if(me<Se&&0>o(xe,Y))H[ue]=xe,H[me]=Y,ue=me;else break e}}return X}function o(H,X){var Y=H.sortIndex-X.sortIndex;return Y!==0?Y:H.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var g=[],p=[],b=1,v=null,E=3,S=!1,w=!1,T=!1,M=!1,j=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function B(H){for(var X=i(p);X!==null;){if(X.callback===null)s(p);else if(X.startTime<=H)s(p),X.sortIndex=X.expirationTime,a(g,X);else break;X=i(p)}}function U(H){if(T=!1,B(H),!w)if(i(g)!==null)w=!0,le||(le=!0,Q());else{var X=i(p);X!==null&&ye(U,X.startTime-H)}}var le=!1,ne=-1,_=5,ee=-1;function ae(){return M?!0:!(t.unstable_now()-ee<_)}function ie(){if(M=!1,le){var H=t.unstable_now();ee=H;var X=!0;try{e:{w=!1,T&&(T=!1,R(ne),ne=-1),S=!0;var Y=E;try{t:{for(B(H),v=i(g);v!==null&&!(v.expirationTime>H&&ae());){var ue=v.callback;if(typeof ue=="function"){v.callback=null,E=v.priorityLevel;var Se=ue(v.expirationTime<=H);if(H=t.unstable_now(),typeof Se=="function"){v.callback=Se,B(H),X=!0;break t}v===i(g)&&s(g),B(H)}else s(g);v=i(g)}if(v!==null)X=!0;else{var C=i(p);C!==null&&ye(U,C.startTime-H),X=!1}}break e}finally{v=null,E=Y,S=!1}X=void 0}}finally{X?Q():le=!1}}}var Q;if(typeof L=="function")Q=function(){L(ie)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,fe=pe.port2;pe.port1.onmessage=ie,Q=function(){fe.postMessage(null)}}else Q=function(){j(ie,0)};function ye(H,X){ne=j(function(){H(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_next=function(H){switch(E){case 1:case 2:case 3:var X=3;break;default:X=E}var Y=E;E=X;try{return H()}finally{E=Y}},t.unstable_requestPaint=function(){M=!0},t.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var Y=E;E=H;try{return X()}finally{E=Y}},t.unstable_scheduleCallback=function(H,X,Y){var ue=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?ue+Y:ue):Y=ue,H){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=Y+Se,H={id:b++,callback:X,priorityLevel:H,startTime:Y,expirationTime:Se,sortIndex:-1},Y>ue?(H.sortIndex=Y,a(p,H),i(g)===null&&H===i(p)&&(T?(R(ne),ne=-1):T=!0,ye(U,Y-ue))):(H.sortIndex=Se,a(g,H),w||S||(w=!0,le||(le=!0,Q()))),H},t.unstable_shouldYield=ae,t.unstable_wrapCallback=function(H){var X=E;return function(){var Y=E;E=X;try{return H.apply(this,arguments)}finally{E=Y}}}})(Ef)),Ef}var y2;function $x(){return y2||(y2=1,xf.exports=Gx()),xf.exports}var Sf={exports:{}},On={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var b2;function qx(){if(b2)return On;b2=1;var t=k0();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(g,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:g,containerInfo:p,implementation:b}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return On.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,On.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return c(g,p,null,b)},On.flushSync=function(g){var p=u.T,b=s.p;try{if(u.T=null,s.p=2,g)return g()}finally{u.T=p,s.p=b,s.d.f()}},On.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(g,p))},On.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},On.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin),E=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:E,fetchPriority:S}):b==="script"&&s.d.X(g,{crossOrigin:v,integrity:E,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},On.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=h(p.as,p.crossOrigin);s.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(g)},On.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin);s.d.L(g,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},On.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=h(p.as,p.crossOrigin);s.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(g)},On.requestFormReset=function(g){s.d.r(g)},On.unstable_batchedUpdates=function(g,p){return g(p)},On.useFormState=function(g,p,b){return u.H.useFormState(g,p,b)},On.useFormStatus=function(){return u.H.useHostTransitionStatus()},On.version="19.2.5",On}var v2;function t4(){if(v2)return Sf.exports;v2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Sf.exports=qx(),Sf.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var x2;function Yx(){if(x2)return El;x2=1;var t=$x(),a=k0(),i=t4();function s(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(s(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(s(188));return n!==e?null:e}for(var r=e,l=n;;){var f=r.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){r=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===r)return g(f),e;if(m===l)return g(f),n;m=m.sibling}throw Error(s(188))}if(r.return!==l.return)r=f,l=m;else{for(var x=!1,A=f.child;A;){if(A===r){x=!0,r=f,l=m;break}if(A===l){x=!0,l=f,r=m;break}A=A.sibling}if(!x){for(A=m.child;A;){if(A===r){x=!0,r=m,l=f;break}if(A===l){x=!0,l=m,r=f;break}A=A.sibling}if(!x)throw Error(s(189))}}if(r.alternate!==l)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,E=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),L=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function fe(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 T:return"Fragment";case j:return"Profiler";case M:return"StrictMode";case U:return"Suspense";case le:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case L:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case B:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return n=e.displayName||null,n!==null?n:fe(e.type)||"Memo";case _:n=e._payload,e=e._init;try{return fe(e(n))}catch{}}return null}var ye=Array.isArray,H=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},ue=[],Se=-1;function C(e){return{current:e}}function q(e){0>Se||(e.current=ue[Se],ue[Se]=null,Se--)}function oe(e,n){Se++,ue[Se]=e.current,e.current=n}var me=C(null),xe=C(null),Ne=C(null),$=C(null);function ze(e,n){switch(oe(Ne,n),oe(xe,e),oe(me,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Vp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Vp(n),e=Hp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(me),oe(me,e)}function Le(){q(me),q(xe),q(Ne)}function ut(e){e.memoizedState!==null&&oe($,e);var n=me.current,r=Hp(n,e.type);n!==r&&(oe(xe,e),oe(me,r))}function he(e){xe.current===e&&(q(me),q(xe)),$.current===e&&(q($),gl._currentValue=Y)}var Nt,Ve;function $e(e){if(Nt===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);Nt=n&&n[1]||"",Ve=-1<r.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Nt+e+Ve}var qt=!1;function Yt(e,n){if(!e||qt)return"";qt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(K){var G=K}Reflect.construct(e,[],se)}else{try{se.call()}catch(K){G=K}e.call(se.prototype)}}else{try{throw Error()}catch(K){G=K}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(K){if(K&&G&&typeof K.stack=="string")return[K.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],A=m[1];if(x&&A){var D=x.split(`
|
|
44
|
+
`),I=A.split(`
|
|
45
|
+
`);for(f=l=0;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(l===D.length||f===I.length)for(l=D.length-1,f=I.length-1;1<=l&&0<=f&&D[l]!==I[f];)f--;for(;1<=l&&0<=f;l--,f--)if(D[l]!==I[f]){if(l!==1||f!==1)do if(l--,f--,0>f||D[l]!==I[f]){var W=`
|
|
46
|
+
`+D[l].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=l&&0<=f);break}}}finally{qt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?$e(r):""}function tn(e,n){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==n&&n!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Yt(e.type,!1);case 11:return Yt(e.type.render,!1);case 1:return Yt(e.type,!0);case 31:return $e("Activity");default:return""}}function Zn(e){try{var n="",r=null;do n+=tn(e,r),r=e,e=e.return;while(e);return n}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var Wa=Object.prototype.hasOwnProperty,Kt=t.unstable_scheduleCallback,sa=t.unstable_cancelCallback,Ba=t.unstable_shouldYield,_n=t.unstable_requestPaint,jt=t.unstable_now,Hn=t.unstable_getCurrentPriorityLevel,bn=t.unstable_ImmediatePriority,Dn=t.unstable_UserBlockingPriority,vn=t.unstable_NormalPriority,En=t.unstable_LowPriority,Sn=t.unstable_IdlePriority,Ca=t.log,Mr=t.unstable_setDisableYieldValue,kn=null,rn=null;function It(e){if(typeof Ca=="function"&&Mr(e),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(kn,e)}catch{}}var sn=Math.clz32?Math.clz32:la,er=Math.log,Ra=Math.LN2;function la(e){return e>>>=0,e===0?32:31-(er(e)/Ra|0)|0}var Yn=256,Kn=262144,oa=4194304;function ln(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function O(e,n,r){var l=e.pendingLanes;if(l===0)return 0;var f=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var A=l&134217727;return A!==0?(l=A&~m,l!==0?f=ln(l):(x&=A,x!==0?f=ln(x):r||(r=A&~e,r!==0&&(f=ln(r))))):(A=l&~m,A!==0?f=ln(A):x!==0?f=ln(x):r||(r=l&~e,r!==0&&(f=ln(r)))),f===0?0:n!==0&&n!==f&&(n&m)===0&&(m=f&-f,r=n&-n,m>=r||m===32&&(r&4194048)!==0)?n:f}function J(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ee(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 qe(){var e=oa;return oa<<=1,(oa&62914560)===0&&(oa=4194304),e}function xt(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function bt(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function je(e,n,r,l,f,m){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var A=e.entanglements,D=e.expirationTimes,I=e.hiddenUpdates;for(r=x&~r;0<r;){var W=31-sn(r),se=1<<W;A[W]=0,D[W]=-1;var G=I[W];if(G!==null)for(I[W]=null,W=0;W<G.length;W++){var K=G[W];K!==null&&(K.lane&=-536870913)}r&=~se}l!==0&&Te(e,l,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~n))}function Te(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-sn(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|r&261930}function Ie(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var l=31-sn(r),f=1<<l;f&n|e[l]&n&&(e[l]|=n),r&=~f}}function N(e,n){var r=n&-n;return r=(r&42)!==0?1:V(r),(r&(e.suspendedLanes|n))!==0?0:r}function V(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 P(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ce(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:i2(e.type))}function de(e,n){var r=X.p;try{return X.p=e,n()}finally{X.p=r}}var _e=Math.random().toString(36).slice(2),be="__reactFiber$"+_e,De="__reactProps$"+_e,Re="__reactContainer$"+_e,we="__reactEvents$"+_e,Fe="__reactListeners$"+_e,Oe="__reactHandles$"+_e,Qe="__reactResources$"+_e,Je="__reactMarker$"+_e;function Et(e){delete e[be],delete e[De],delete e[we],delete e[Fe],delete e[Oe]}function k(e){var n=e[be];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Re]||r[be]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=Fp(e);e!==null;){if(r=e[be])return r;e=Fp(e)}return n}e=r,r=e.parentNode}return null}function ge(e){if(e=e[be]||e[Re]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ce(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(s(33))}function Me(e){var n=e[Qe];return n||(n=e[Qe]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ke(e){e[Je]=!0}var ht=new Set,tt={};function St(e,n){re(e,n),re(e+"Capture",n)}function re(e,n){for(tt[e]=n,e=0;e<n.length;e++)ht.add(n[e])}var Ae=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]*$"),Pe={},nt={};function Tt(e){return Wa.call(nt,e)?!0:Wa.call(Pe,e)?!1:Ae.test(e)?nt[e]=!0:(Pe[e]=!0,!1)}function He(e,n,r){if(Tt(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function We(e,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.setAttribute(n,""+r)}}function wt(e,n,r,l){if(l===null)e.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+l)}}function at(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ot(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ca(e,n,r){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(x){r=""+x,m.call(this,x)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return r},setValue:function(x){r=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ua(e){if(!e._valueTracker){var n=ot(e)?"checked":"value";e._valueTracker=ca(e,n,""+e[n])}}function tr(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),l="";return e&&(l=ot(e)?e.checked?"true":"false":e.value),e=l,e!==r?(n.setValue(e),!0):!1}function on(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ua=/[\n"\\]/g;function Qt(e){return e.replace(Ua,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Na(e,n,r,l,f,m,x,A){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+at(n)):e.value!==""+at(n)&&(e.value=""+at(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?Tr(e,x,at(n)):r!=null?Tr(e,x,at(r)):l!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+at(A):e.removeAttribute("name")}function wn(e,n,r,l,f,m,x,A){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),n!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){ua(e);return}r=r!=null?""+at(r):"",n=n!=null?""+at(n):r,A||n===e.value||(e.value=n),e.defaultValue=n}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=A?e.checked:!!l,e.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),ua(e)}function Tr(e,n,r){n==="number"&&on(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Gt(e,n,r,l){if(e=e.options,n){n={};for(var f=0;f<r.length;f++)n["$"+r[f]]=!0;for(r=0;r<e.length;r++)f=n.hasOwnProperty("$"+e[r].value),e[r].selected!==f&&(e[r].selected=f),f&&l&&(e[r].defaultSelected=!0)}else{for(r=""+at(r),n=null,f=0;f<e.length;f++){if(e[f].value===r){e[f].selected=!0,l&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Cr(e,n,r){if(n!=null&&(n=""+at(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+at(r):""}function Hi(e,n,r,l){if(n==null){if(l!=null){if(r!=null)throw Error(s(92));if(ye(l)){if(1<l.length)throw Error(s(93));l=l[0]}r=l}r==null&&(r=""),n=r}r=at(n),e.defaultValue=r,l=e.textContent,l===r&&l!==""&&l!==null&&(e.value=l),ua(e)}function Xe(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var oo=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 cn(e,n,r){var l=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,r):typeof r!="number"||r===0||oo.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function _t(e,n,r){if(n!=null&&typeof n!="object")throw Error(s(62));if(e=e.style,r!=null){for(var l in r)!r.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var f in n)l=n[f],n.hasOwnProperty(f)&&r[f]!==l&&cn(e,f,l)}else for(var m in n)n.hasOwnProperty(m)&&cn(e,m,n[m])}function Rr(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 nr=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_s=/^[\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 Nr(e){return _s.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ve(){}var Ue=null;function rt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mt=null,Xt=null;function da(e){var n=ge(e);if(n&&(e=n.stateNode)){var r=e[De]||null;e:switch(e=n.stateNode,n.type){case"input":if(Na(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Qt(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var l=r[n];if(l!==e&&l.form===e.form){var f=l[De]||null;if(!f)throw Error(s(90));Na(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<r.length;n++)l=r[n],l.form===e.form&&tr(l)}break e;case"textarea":Cr(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&Gt(e,!!r.multiple,n,!1)}}}var Ds=!1;function co(e,n,r){if(Ds)return e(n,r);Ds=!0;try{var l=e(n);return l}finally{if(Ds=!1,(mt!==null||Xt!==null)&&(Qo(),mt&&(n=mt,e=Xt,Xt=mt=null,da(n),e)))for(n=0;n<e.length;n++)da(e[n])}}function Os(e,n){var r=e.stateNode;if(r===null)return null;var l=r[De]||null;if(l===null)return null;r=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,n,typeof r));return r}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=!1;if(ar)try{var Ls={};Object.defineProperty(Ls,"passive",{get:function(){gu=!0}}),window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{gu=!1}var jr=null,yu=null,uo=null;function H1(){if(uo)return uo;var e,n=yu,r=n.length,l,f="value"in jr?jr.value:jr.textContent,m=f.length;for(e=0;e<r&&n[e]===f[e];e++);var x=r-e;for(l=1;l<=x&&n[r-l]===f[m-l];l++);return uo=f.slice(e,1<l?1-l:void 0)}function fo(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ho(){return!0}function k1(){return!1}function Pn(e){function n(r,l,f,m,x){this._reactName=r,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(r=e[A],this[A]=r?r(m):m[A]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ho:k1,this.isPropagationStopped=k1,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ho)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ho)},persist:function(){},isPersistent:ho}),n}var ui={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mo=Pn(ui),Vs=v({},ui,{view:0,detail:0}),zb=Pn(Vs),bu,vu,Hs,po=v({},Vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eu,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!==Hs&&(Hs&&e.type==="mousemove"?(bu=e.screenX-Hs.screenX,vu=e.screenY-Hs.screenY):vu=bu=0,Hs=e),bu)},movementY:function(e){return"movementY"in e?e.movementY:vu}}),z1=Pn(po),Bb=v({},po,{dataTransfer:0}),Ub=Pn(Bb),Zb=v({},Vs,{relatedTarget:0}),xu=Pn(Zb),Pb=v({},ui,{animationName:0,elapsedTime:0,pseudoElement:0}),Fb=Pn(Pb),Ib=v({},ui,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gb=Pn(Ib),$b=v({},ui,{data:0}),B1=Pn($b),qb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yb={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"},Kb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xb(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Kb[e])?!!n[e]:!1}function Eu(){return Xb}var Qb=v({},Vs,{key:function(e){if(e.key){var n=qb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=fo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eu,charCode:function(e){return e.type==="keypress"?fo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jb=Pn(Qb),Wb=v({},po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),U1=Pn(Wb),ev=v({},Vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eu}),tv=Pn(ev),nv=v({},ui,{propertyName:0,elapsedTime:0,pseudoElement:0}),av=Pn(nv),rv=v({},po,{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}),iv=Pn(rv),sv=v({},ui,{newState:0,oldState:0}),lv=Pn(sv),ov=[9,13,27,32],Su=ar&&"CompositionEvent"in window,ks=null;ar&&"documentMode"in document&&(ks=document.documentMode);var cv=ar&&"TextEvent"in window&&!ks,Z1=ar&&(!Su||ks&&8<ks&&11>=ks),P1=" ",F1=!1;function I1(e,n){switch(e){case"keyup":return ov.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ki=!1;function uv(e,n){switch(e){case"compositionend":return G1(n);case"keypress":return n.which!==32?null:(F1=!0,P1);case"textInput":return e=n.data,e===P1&&F1?null:e;default:return null}}function dv(e,n){if(ki)return e==="compositionend"||!Su&&I1(e,n)?(e=H1(),uo=yu=jr=null,ki=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Z1&&n.locale!=="ko"?null:n.data;default:return null}}var fv={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 $1(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!fv[e.type]:n==="textarea"}function q1(e,n,r,l){mt?Xt?Xt.push(l):Xt=[l]:mt=l,n=rc(n,"onChange"),0<n.length&&(r=new mo("onChange","change",null,r,l),e.push({event:r,listeners:n}))}var zs=null,Bs=null;function hv(e){Np(e,0)}function go(e){var n=Ce(e);if(tr(n))return e}function Y1(e,n){if(e==="change")return n}var K1=!1;if(ar){var wu;if(ar){var Au="oninput"in document;if(!Au){var X1=document.createElement("div");X1.setAttribute("oninput","return;"),Au=typeof X1.oninput=="function"}wu=Au}else wu=!1;K1=wu&&(!document.documentMode||9<document.documentMode)}function Q1(){zs&&(zs.detachEvent("onpropertychange",J1),Bs=zs=null)}function J1(e){if(e.propertyName==="value"&&go(Bs)){var n=[];q1(n,Bs,e,rt(e)),co(hv,n)}}function mv(e,n,r){e==="focusin"?(Q1(),zs=n,Bs=r,zs.attachEvent("onpropertychange",J1)):e==="focusout"&&Q1()}function pv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return go(Bs)}function gv(e,n){if(e==="click")return go(n)}function yv(e,n){if(e==="input"||e==="change")return go(n)}function bv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Xn=typeof Object.is=="function"?Object.is:bv;function Us(e,n){if(Xn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),l=Object.keys(n);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var f=r[l];if(!Wa.call(n,f)||!Xn(e[f],n[f]))return!1}return!0}function W1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,n){var r=W1(e);e=0;for(var l;r;){if(r.nodeType===3){if(l=e+r.textContent.length,e<=n&&l>=n)return{node:r,offset:n-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=W1(r)}}function th(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?th(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=on(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=on(e.document)}return n}function Mu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var vv=ar&&"documentMode"in document&&11>=document.documentMode,zi=null,Tu=null,Zs=null,Cu=!1;function ah(e,n,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Cu||zi==null||zi!==on(l)||(l=zi,"selectionStart"in l&&Mu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zs&&Us(Zs,l)||(Zs=l,l=rc(Tu,"onSelect"),0<l.length&&(n=new mo("onSelect","select",null,n,r),e.push({event:n,listeners:l}),n.target=zi)))}function di(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var Bi={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},Ru={},rh={};ar&&(rh=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function fi(e){if(Ru[e])return Ru[e];if(!Bi[e])return e;var n=Bi[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in rh)return Ru[e]=n[r];return e}var ih=fi("animationend"),sh=fi("animationiteration"),lh=fi("animationstart"),xv=fi("transitionrun"),Ev=fi("transitionstart"),Sv=fi("transitioncancel"),oh=fi("transitionend"),ch=new Map,Nu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nu.push("scrollEnd");function ja(e,n){ch.set(e,n),St(n,[e])}var yo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},fa=[],Ui=0,ju=0;function bo(){for(var e=Ui,n=ju=Ui=0;n<e;){var r=fa[n];fa[n++]=null;var l=fa[n];fa[n++]=null;var f=fa[n];fa[n++]=null;var m=fa[n];if(fa[n++]=null,l!==null&&f!==null){var x=l.pending;x===null?f.next=f:(f.next=x.next,x.next=f),l.pending=f}m!==0&&uh(r,f,m)}}function vo(e,n,r,l){fa[Ui++]=e,fa[Ui++]=n,fa[Ui++]=r,fa[Ui++]=l,ju|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function _u(e,n,r,l){return vo(e,n,r,l),xo(e)}function hi(e,n){return vo(e,null,null,n),xo(e)}function uh(e,n,r){e.lanes|=r;var l=e.alternate;l!==null&&(l.lanes|=r);for(var f=!1,m=e.return;m!==null;)m.childLanes|=r,l=m.alternate,l!==null&&(l.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&n!==null&&(f=31-sn(r),e=m.hiddenUpdates,l=e[f],l===null?e[f]=[n]:l.push(n),n.lane=r|536870912),m):null}function xo(e){if(50<cl)throw cl=0,Ud=null,Error(s(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Zi={};function wv(e,n,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(e,n,r,l){return new wv(e,n,r,l)}function Du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rr(e,n){var r=e.alternate;return r===null?(r=Qn(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function dh(e,n){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Eo(e,n,r,l,f,m){var x=0;if(l=e,typeof e=="function")Du(e)&&(x=1);else if(typeof e=="string")x=Rx(e,r,me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Qn(31,r,n,f),e.elementType=ee,e.lanes=m,e;case T:return mi(r.children,f,m,n);case M:x=8,f|=24;break;case j:return e=Qn(12,r,n,f|2),e.elementType=j,e.lanes=m,e;case U:return e=Qn(13,r,n,f),e.elementType=U,e.lanes=m,e;case le:return e=Qn(19,r,n,f),e.elementType=le,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:x=10;break e;case R:x=9;break e;case B:x=11;break e;case ne:x=14;break e;case _:x=16,l=null;break e}x=29,r=Error(s(130,e===null?"null":typeof e,"")),l=null}return n=Qn(x,r,n,f),n.elementType=e,n.type=l,n.lanes=m,n}function mi(e,n,r,l){return e=Qn(7,e,l,n),e.lanes=r,e}function Ou(e,n,r){return e=Qn(6,e,null,n),e.lanes=r,e}function fh(e){var n=Qn(18,null,null,0);return n.stateNode=e,n}function Lu(e,n,r){return n=Qn(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var hh=new WeakMap;function ha(e,n){if(typeof e=="object"&&e!==null){var r=hh.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Zn(n)},hh.set(e,n),n)}return{value:e,source:n,stack:Zn(n)}}var Pi=[],Fi=0,So=null,Ps=0,ma=[],pa=0,_r=null,Za=1,Pa="";function ir(e,n){Pi[Fi++]=Ps,Pi[Fi++]=So,So=e,Ps=n}function mh(e,n,r){ma[pa++]=Za,ma[pa++]=Pa,ma[pa++]=_r,_r=e;var l=Za;e=Pa;var f=32-sn(l)-1;l&=~(1<<f),r+=1;var m=32-sn(n)+f;if(30<m){var x=f-f%5;m=(l&(1<<x)-1).toString(32),l>>=x,f-=x,Za=1<<32-sn(n)+f|r<<f|l,Pa=m+e}else Za=1<<m|r<<f|l,Pa=e}function Vu(e){e.return!==null&&(ir(e,1),mh(e,1,0))}function Hu(e){for(;e===So;)So=Pi[--Fi],Pi[Fi]=null,Ps=Pi[--Fi],Pi[Fi]=null;for(;e===_r;)_r=ma[--pa],ma[pa]=null,Pa=ma[--pa],ma[pa]=null,Za=ma[--pa],ma[pa]=null}function ph(e,n){ma[pa++]=Za,ma[pa++]=Pa,ma[pa++]=_r,Za=n.id,Pa=n.overflow,_r=e}var An=null,Ut=null,yt=!1,Dr=null,ga=!1,ku=Error(s(519));function Or(e){var n=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fs(ha(n,e)),ku}function gh(e){var n=e.stateNode,r=e.type,l=e.memoizedProps;switch(n[be]=e,n[De]=l,r){case"dialog":ft("cancel",n),ft("close",n);break;case"iframe":case"object":case"embed":ft("load",n);break;case"video":case"audio":for(r=0;r<dl.length;r++)ft(dl[r],n);break;case"source":ft("error",n);break;case"img":case"image":case"link":ft("error",n),ft("load",n);break;case"details":ft("toggle",n);break;case"input":ft("invalid",n),wn(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ft("invalid",n);break;case"textarea":ft("invalid",n),Hi(n,l.value,l.defaultValue,l.children)}r=l.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||l.suppressHydrationWarning===!0||Op(n.textContent,r)?(l.popover!=null&&(ft("beforetoggle",n),ft("toggle",n)),l.onScroll!=null&&ft("scroll",n),l.onScrollEnd!=null&&ft("scrollend",n),l.onClick!=null&&(n.onclick=ve),n=!0):n=!1,n||Or(e,!0)}function yh(e){for(An=e.return;An;)switch(An.tag){case 5:case 31:case 13:ga=!1;return;case 27:case 3:ga=!0;return;default:An=An.return}}function Ii(e){if(e!==An)return!1;if(!yt)return yh(e),yt=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||tf(e.type,e.memoizedProps)),r=!r),r&&Ut&&Or(e),yh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ut=Pp(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ut=Pp(e)}else n===27?(n=Ut,qr(e.type)?(e=lf,lf=null,Ut=e):Ut=n):Ut=An?ba(e.stateNode.nextSibling):null;return!0}function pi(){Ut=An=null,yt=!1}function zu(){var e=Dr;return e!==null&&($n===null?$n=e:$n.push.apply($n,e),Dr=null),e}function Fs(e){Dr===null?Dr=[e]:Dr.push(e)}var Bu=C(null),gi=null,sr=null;function Lr(e,n,r){oe(Bu,n._currentValue),n._currentValue=r}function lr(e){e._currentValue=Bu.current,q(Bu)}function Uu(e,n,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===r)break;e=e.return}}function Zu(e,n,r,l){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var x=f.child;m=m.firstContext;e:for(;m!==null;){var A=m;m=f;for(var D=0;D<n.length;D++)if(A.context===n[D]){m.lanes|=r,A=m.alternate,A!==null&&(A.lanes|=r),Uu(m.return,r,e),l||(x=null);break e}m=A.next}}else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=r,m=x.alternate,m!==null&&(m.lanes|=r),Uu(x,r,e),x=null}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===e){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}}function Gi(e,n,r,l){e=null;for(var f=n,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var x=f.alternate;if(x===null)throw Error(s(387));if(x=x.memoizedProps,x!==null){var A=f.type;Xn(f.pendingProps.value,x.value)||(e!==null?e.push(A):e=[A])}}else if(f===$.current){if(x=f.alternate,x===null)throw Error(s(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(gl):e=[gl])}f=f.return}e!==null&&Zu(n,e,r,l),n.flags|=262144}function wo(e){for(e=e.firstContext;e!==null;){if(!Xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yi(e){gi=e,sr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mn(e){return bh(gi,e)}function Ao(e,n){return gi===null&&yi(e),bh(e,n)}function bh(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},sr===null){if(e===null)throw Error(s(308));sr=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else sr=sr.next=n;return r}var Av=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},Mv=t.unstable_scheduleCallback,Tv=t.unstable_NormalPriority,un={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pu(){return{controller:new Av,data:new Map,refCount:0}}function Is(e){e.refCount--,e.refCount===0&&Mv(Tv,function(){e.controller.abort()})}var Gs=null,Fu=0,$i=0,qi=null;function Cv(e,n){if(Gs===null){var r=Gs=[];Fu=0,$i=$d(),qi={status:"pending",value:void 0,then:function(l){r.push(l)}}}return Fu++,n.then(vh,vh),n}function vh(){if(--Fu===0&&Gs!==null){qi!==null&&(qi.status="fulfilled");var e=Gs;Gs=null,$i=0,qi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Rv(e,n){var r=[],l={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var f=0;f<r.length;f++)(0,r[f])(n)},function(f){for(l.status="rejected",l.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),l}var xh=H.S;H.S=function(e,n){ap=jt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Cv(e,n),xh!==null&&xh(e,n)};var bi=C(null);function Iu(){var e=bi.current;return e!==null?e:kt.pooledCache}function Mo(e,n){n===null?oe(bi,bi.current):oe(bi,n.pool)}function Eh(){var e=Iu();return e===null?null:{parent:un._currentValue,pool:e}}var Yi=Error(s(460)),Gu=Error(s(474)),To=Error(s(542)),Co={then:function(){}};function Sh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wh(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(ve,ve),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Mh(e),e;default:if(typeof n.status=="string")n.then(ve,ve);else{if(e=kt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=l}},function(l){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Mh(e),e}throw xi=n,Yi}}function vi(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(xi=r,Yi):r}}var xi=null;function Ah(){if(xi===null)throw Error(s(459));var e=xi;return xi=null,e}function Mh(e){if(e===Yi||e===To)throw Error(s(483))}var Ki=null,$s=0;function Ro(e){var n=$s;return $s+=1,Ki===null&&(Ki=[]),wh(Ki,e,n)}function qs(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function No(e,n){throw n.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Th(e){function n(Z,z){if(e){var F=Z.deletions;F===null?(Z.deletions=[z],Z.flags|=16):F.push(z)}}function r(Z,z){if(!e)return null;for(;z!==null;)n(Z,z),z=z.sibling;return null}function l(Z){for(var z=new Map;Z!==null;)Z.key!==null?z.set(Z.key,Z):z.set(Z.index,Z),Z=Z.sibling;return z}function f(Z,z){return Z=rr(Z,z),Z.index=0,Z.sibling=null,Z}function m(Z,z,F){return Z.index=F,e?(F=Z.alternate,F!==null?(F=F.index,F<z?(Z.flags|=67108866,z):F):(Z.flags|=67108866,z)):(Z.flags|=1048576,z)}function x(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function A(Z,z,F,te){return z===null||z.tag!==6?(z=Ou(F,Z.mode,te),z.return=Z,z):(z=f(z,F),z.return=Z,z)}function D(Z,z,F,te){var Ge=F.type;return Ge===T?W(Z,z,F.props.children,te,F.key):z!==null&&(z.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===_&&vi(Ge)===z.type)?(z=f(z,F.props),qs(z,F),z.return=Z,z):(z=Eo(F.type,F.key,F.props,null,Z.mode,te),qs(z,F),z.return=Z,z)}function I(Z,z,F,te){return z===null||z.tag!==4||z.stateNode.containerInfo!==F.containerInfo||z.stateNode.implementation!==F.implementation?(z=Lu(F,Z.mode,te),z.return=Z,z):(z=f(z,F.children||[]),z.return=Z,z)}function W(Z,z,F,te,Ge){return z===null||z.tag!==7?(z=mi(F,Z.mode,te,Ge),z.return=Z,z):(z=f(z,F),z.return=Z,z)}function se(Z,z,F){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Ou(""+z,Z.mode,F),z.return=Z,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return F=Eo(z.type,z.key,z.props,null,Z.mode,F),qs(F,z),F.return=Z,F;case w:return z=Lu(z,Z.mode,F),z.return=Z,z;case _:return z=vi(z),se(Z,z,F)}if(ye(z)||Q(z))return z=mi(z,Z.mode,F,null),z.return=Z,z;if(typeof z.then=="function")return se(Z,Ro(z),F);if(z.$$typeof===L)return se(Z,Ao(Z,z),F);No(Z,z)}return null}function G(Z,z,F,te){var Ge=z!==null?z.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ge!==null?null:A(Z,z,""+F,te);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case S:return F.key===Ge?D(Z,z,F,te):null;case w:return F.key===Ge?I(Z,z,F,te):null;case _:return F=vi(F),G(Z,z,F,te)}if(ye(F)||Q(F))return Ge!==null?null:W(Z,z,F,te,null);if(typeof F.then=="function")return G(Z,z,Ro(F),te);if(F.$$typeof===L)return G(Z,z,Ao(Z,F),te);No(Z,F)}return null}function K(Z,z,F,te,Ge){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Z=Z.get(F)||null,A(z,Z,""+te,Ge);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case S:return Z=Z.get(te.key===null?F:te.key)||null,D(z,Z,te,Ge);case w:return Z=Z.get(te.key===null?F:te.key)||null,I(z,Z,te,Ge);case _:return te=vi(te),K(Z,z,F,te,Ge)}if(ye(te)||Q(te))return Z=Z.get(F)||null,W(z,Z,te,Ge,null);if(typeof te.then=="function")return K(Z,z,F,Ro(te),Ge);if(te.$$typeof===L)return K(Z,z,F,Ao(z,te),Ge);No(z,te)}return null}function ke(Z,z,F,te){for(var Ge=null,At=null,Ze=z,st=z=0,gt=null;Ze!==null&&st<F.length;st++){Ze.index>st?(gt=Ze,Ze=null):gt=Ze.sibling;var Mt=G(Z,Ze,F[st],te);if(Mt===null){Ze===null&&(Ze=gt);break}e&&Ze&&Mt.alternate===null&&n(Z,Ze),z=m(Mt,z,st),At===null?Ge=Mt:At.sibling=Mt,At=Mt,Ze=gt}if(st===F.length)return r(Z,Ze),yt&&ir(Z,st),Ge;if(Ze===null){for(;st<F.length;st++)Ze=se(Z,F[st],te),Ze!==null&&(z=m(Ze,z,st),At===null?Ge=Ze:At.sibling=Ze,At=Ze);return yt&&ir(Z,st),Ge}for(Ze=l(Ze);st<F.length;st++)gt=K(Ze,Z,st,F[st],te),gt!==null&&(e&>.alternate!==null&&Ze.delete(gt.key===null?st:gt.key),z=m(gt,z,st),At===null?Ge=gt:At.sibling=gt,At=gt);return e&&Ze.forEach(function(Jr){return n(Z,Jr)}),yt&&ir(Z,st),Ge}function Ye(Z,z,F,te){if(F==null)throw Error(s(151));for(var Ge=null,At=null,Ze=z,st=z=0,gt=null,Mt=F.next();Ze!==null&&!Mt.done;st++,Mt=F.next()){Ze.index>st?(gt=Ze,Ze=null):gt=Ze.sibling;var Jr=G(Z,Ze,Mt.value,te);if(Jr===null){Ze===null&&(Ze=gt);break}e&&Ze&&Jr.alternate===null&&n(Z,Ze),z=m(Jr,z,st),At===null?Ge=Jr:At.sibling=Jr,At=Jr,Ze=gt}if(Mt.done)return r(Z,Ze),yt&&ir(Z,st),Ge;if(Ze===null){for(;!Mt.done;st++,Mt=F.next())Mt=se(Z,Mt.value,te),Mt!==null&&(z=m(Mt,z,st),At===null?Ge=Mt:At.sibling=Mt,At=Mt);return yt&&ir(Z,st),Ge}for(Ze=l(Ze);!Mt.done;st++,Mt=F.next())Mt=K(Ze,Z,st,Mt.value,te),Mt!==null&&(e&&Mt.alternate!==null&&Ze.delete(Mt.key===null?st:Mt.key),z=m(Mt,z,st),At===null?Ge=Mt:At.sibling=Mt,At=Mt);return e&&Ze.forEach(function(Bx){return n(Z,Bx)}),yt&&ir(Z,st),Ge}function Ht(Z,z,F,te){if(typeof F=="object"&&F!==null&&F.type===T&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case S:e:{for(var Ge=F.key;z!==null;){if(z.key===Ge){if(Ge=F.type,Ge===T){if(z.tag===7){r(Z,z.sibling),te=f(z,F.props.children),te.return=Z,Z=te;break e}}else if(z.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===_&&vi(Ge)===z.type){r(Z,z.sibling),te=f(z,F.props),qs(te,F),te.return=Z,Z=te;break e}r(Z,z);break}else n(Z,z);z=z.sibling}F.type===T?(te=mi(F.props.children,Z.mode,te,F.key),te.return=Z,Z=te):(te=Eo(F.type,F.key,F.props,null,Z.mode,te),qs(te,F),te.return=Z,Z=te)}return x(Z);case w:e:{for(Ge=F.key;z!==null;){if(z.key===Ge)if(z.tag===4&&z.stateNode.containerInfo===F.containerInfo&&z.stateNode.implementation===F.implementation){r(Z,z.sibling),te=f(z,F.children||[]),te.return=Z,Z=te;break e}else{r(Z,z);break}else n(Z,z);z=z.sibling}te=Lu(F,Z.mode,te),te.return=Z,Z=te}return x(Z);case _:return F=vi(F),Ht(Z,z,F,te)}if(ye(F))return ke(Z,z,F,te);if(Q(F)){if(Ge=Q(F),typeof Ge!="function")throw Error(s(150));return F=Ge.call(F),Ye(Z,z,F,te)}if(typeof F.then=="function")return Ht(Z,z,Ro(F),te);if(F.$$typeof===L)return Ht(Z,z,Ao(Z,F),te);No(Z,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,z!==null&&z.tag===6?(r(Z,z.sibling),te=f(z,F),te.return=Z,Z=te):(r(Z,z),te=Ou(F,Z.mode,te),te.return=Z,Z=te),x(Z)):r(Z,z)}return function(Z,z,F,te){try{$s=0;var Ge=Ht(Z,z,F,te);return Ki=null,Ge}catch(Ze){if(Ze===Yi||Ze===To)throw Ze;var At=Qn(29,Ze,null,Z.mode);return At.lanes=te,At.return=Z,At}finally{}}}var Ei=Th(!0),Ch=Th(!1),Vr=!1;function $u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Hr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kr(e,n,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ct&2)!==0){var f=l.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),l.pending=n,n=xo(e),uh(e,null,r),n}return vo(e,l,n,r),xo(e)}function Ys(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,r|=l,n.lanes=r,Ie(e,r)}}function Yu(e,n){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var f=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?f=m=x:m=m.next=x,r=r.next}while(r!==null);m===null?f=m=n:m=m.next=n}else f=m=n;r={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var Ku=!1;function Ks(){if(Ku){var e=qi;if(e!==null)throw e}}function Xs(e,n,r,l){Ku=!1;var f=e.updateQueue;Vr=!1;var m=f.firstBaseUpdate,x=f.lastBaseUpdate,A=f.shared.pending;if(A!==null){f.shared.pending=null;var D=A,I=D.next;D.next=null,x===null?m=I:x.next=I,x=D;var W=e.alternate;W!==null&&(W=W.updateQueue,A=W.lastBaseUpdate,A!==x&&(A===null?W.firstBaseUpdate=I:A.next=I,W.lastBaseUpdate=D))}if(m!==null){var se=f.baseState;x=0,W=I=D=null,A=m;do{var G=A.lane&-536870913,K=G!==A.lane;if(K?(pt&G)===G:(l&G)===G){G!==0&&G===$i&&(Ku=!0),W!==null&&(W=W.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ke=e,Ye=A;G=n;var Ht=r;switch(Ye.tag){case 1:if(ke=Ye.payload,typeof ke=="function"){se=ke.call(Ht,se,G);break e}se=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ye.payload,G=typeof ke=="function"?ke.call(Ht,se,G):ke,G==null)break e;se=v({},se,G);break e;case 2:Vr=!0}}G=A.callback,G!==null&&(e.flags|=64,K&&(e.flags|=8192),K=f.callbacks,K===null?f.callbacks=[G]:K.push(G))}else K={lane:G,tag:A.tag,payload:A.payload,callback:A.callback,next:null},W===null?(I=W=K,D=se):W=W.next=K,x|=G;if(A=A.next,A===null){if(A=f.shared.pending,A===null)break;K=A,A=K.next,K.next=null,f.lastBaseUpdate=K,f.shared.pending=null}}while(!0);W===null&&(D=se),f.baseState=D,f.firstBaseUpdate=I,f.lastBaseUpdate=W,m===null&&(f.shared.lanes=0),Pr|=x,e.lanes=x,e.memoizedState=se}}function Rh(e,n){if(typeof e!="function")throw Error(s(191,e));e.call(n)}function Nh(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Rh(r[e],n)}var Xi=C(null),jo=C(0);function jh(e,n){e=gr,oe(jo,e),oe(Xi,n),gr=e|n.baseLanes}function Xu(){oe(jo,gr),oe(Xi,Xi.current)}function Qu(){gr=jo.current,q(Xi),q(jo)}var Jn=C(null),ya=null;function zr(e){var n=e.alternate;oe(nn,nn.current&1),oe(Jn,e),ya===null&&(n===null||Xi.current!==null||n.memoizedState!==null)&&(ya=e)}function Ju(e){oe(nn,nn.current),oe(Jn,e),ya===null&&(ya=e)}function _h(e){e.tag===22?(oe(nn,nn.current),oe(Jn,e),ya===null&&(ya=e)):Br()}function Br(){oe(nn,nn.current),oe(Jn,Jn.current)}function Wn(e){q(Jn),ya===e&&(ya=null),q(nn)}var nn=C(0);function _o(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||rf(r)||sf(r)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var or=0,it=null,Lt=null,dn=null,Do=!1,Qi=!1,Si=!1,Oo=0,Qs=0,Ji=null,Nv=0;function Jt(){throw Error(s(321))}function Wu(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!Xn(e[r],n[r]))return!1;return!0}function ed(e,n,r,l,f,m){return or=m,it=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,H.H=e===null||e.memoizedState===null?mm:pd,Si=!1,m=r(l,f),Si=!1,Qi&&(m=Oh(n,r,l,f)),Dh(e),m}function Dh(e){H.H=el;var n=Lt!==null&&Lt.next!==null;if(or=0,dn=Lt=it=null,Do=!1,Qs=0,Ji=null,n)throw Error(s(300));e===null||fn||(e=e.dependencies,e!==null&&wo(e)&&(fn=!0))}function Oh(e,n,r,l){it=e;var f=0;do{if(Qi&&(Ji=null),Qs=0,Qi=!1,25<=f)throw Error(s(301));if(f+=1,dn=Lt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=pm,m=n(r,l)}while(Qi);return m}function jv(){var e=H.H,n=e.useState()[0];return n=typeof n.then=="function"?Js(n):n,e=e.useState()[0],(Lt!==null?Lt.memoizedState:null)!==e&&(it.flags|=1024),n}function td(){var e=Oo!==0;return Oo=0,e}function nd(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function ad(e){if(Do){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Do=!1}or=0,dn=Lt=it=null,Qi=!1,Qs=Oo=0,Ji=null}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?it.memoizedState=dn=e:dn=dn.next=e,dn}function an(){if(Lt===null){var e=it.alternate;e=e!==null?e.memoizedState:null}else e=Lt.next;var n=dn===null?it.memoizedState:dn.next;if(n!==null)dn=n,Lt=e;else{if(e===null)throw it.alternate===null?Error(s(467)):Error(s(310));Lt=e,e={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},dn===null?it.memoizedState=dn=e:dn=dn.next=e}return dn}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Js(e){var n=Qs;return Qs+=1,Ji===null&&(Ji=[]),e=wh(Ji,e,n),n=it,(dn===null?n.memoizedState:dn.next)===null&&(n=n.alternate,H.H=n===null||n.memoizedState===null?mm:pd),e}function Vo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Js(e);if(e.$$typeof===L)return Mn(e)}throw Error(s(438,String(e)))}function rd(e){var n=null,r=it.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var l=it.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=Lo(),it.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),l=0;l<e;l++)r[l]=ae;return n.index++,r}function cr(e,n){return typeof n=="function"?n(e):n}function Ho(e){var n=an();return id(n,Lt,e)}function id(e,n,r){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=r;var f=e.baseQueue,m=l.pending;if(m!==null){if(f!==null){var x=f.next;f.next=m.next,m.next=x}n.baseQueue=f=m,l.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{n=f.next;var A=x=null,D=null,I=n,W=!1;do{var se=I.lane&-536870913;if(se!==I.lane?(pt&se)===se:(or&se)===se){var G=I.revertLane;if(G===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),se===$i&&(W=!0);else if((or&G)===G){I=I.next,G===$i&&(W=!0);continue}else se={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},D===null?(A=D=se,x=m):D=D.next=se,it.lanes|=G,Pr|=G;se=I.action,Si&&r(m,se),m=I.hasEagerState?I.eagerState:r(m,se)}else G={lane:se,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},D===null?(A=D=G,x=m):D=D.next=G,it.lanes|=se,Pr|=se;I=I.next}while(I!==null&&I!==n);if(D===null?x=m:D.next=A,!Xn(m,e.memoizedState)&&(fn=!0,W&&(r=qi,r!==null)))throw r;e.memoizedState=m,e.baseState=x,e.baseQueue=D,l.lastRenderedState=m}return f===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function sd(e){var n=an(),r=n.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var l=r.dispatch,f=r.pending,m=n.memoizedState;if(f!==null){r.pending=null;var x=f=f.next;do m=e(m,x.action),x=x.next;while(x!==f);Xn(m,n.memoizedState)||(fn=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),r.lastRenderedState=m}return[m,l]}function Lh(e,n,r){var l=it,f=an(),m=yt;if(m){if(r===void 0)throw Error(s(407));r=r()}else r=n();var x=!Xn((Lt||f).memoizedState,r);if(x&&(f.memoizedState=r,fn=!0),f=f.queue,cd(kh.bind(null,l,f,e),[e]),f.getSnapshot!==n||x||dn!==null&&dn.memoizedState.tag&1){if(l.flags|=2048,Wi(9,{destroy:void 0},Hh.bind(null,l,f,r,n),null),kt===null)throw Error(s(349));m||(or&127)!==0||Vh(l,n,r)}return r}function Vh(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=it.updateQueue,n===null?(n=Lo(),it.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function Hh(e,n,r,l){n.value=r,n.getSnapshot=l,zh(n)&&Bh(e)}function kh(e,n,r){return r(function(){zh(n)&&Bh(e)})}function zh(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!Xn(e,r)}catch{return!0}}function Bh(e){var n=hi(e,2);n!==null&&qn(n,e,2)}function ld(e){var n=zn();if(typeof e=="function"){var r=e;if(e=r(),Si){It(!0);try{r()}finally{It(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:e},n}function Uh(e,n,r,l){return e.baseState=r,id(e,Lt,typeof l=="function"?l:cr)}function _v(e,n,r,l,f){if(Bo(e))throw Error(s(485));if(e=n.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};H.T!==null?r(!0):m.isTransition=!1,l(m),r=n.pending,r===null?(m.next=n.pending=m,Zh(n,m)):(m.next=r.next,n.pending=r.next=m)}}function Zh(e,n){var r=n.action,l=n.payload,f=e.state;if(n.isTransition){var m=H.T,x={};H.T=x;try{var A=r(f,l),D=H.S;D!==null&&D(x,A),Ph(e,n,A)}catch(I){od(e,n,I)}finally{m!==null&&x.types!==null&&(m.types=x.types),H.T=m}}else try{m=r(f,l),Ph(e,n,m)}catch(I){od(e,n,I)}}function Ph(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(l){Fh(e,n,l)},function(l){return od(e,n,l)}):Fh(e,n,r)}function Fh(e,n,r){n.status="fulfilled",n.value=r,Ih(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,Zh(e,r)))}function od(e,n,r){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=r,Ih(n),n=n.next;while(n!==l)}e.action=null}function Ih(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Gh(e,n){return n}function $h(e,n){if(yt){var r=kt.formState;if(r!==null){e:{var l=it;if(yt){if(Ut){t:{for(var f=Ut,m=ga;f.nodeType!==8;){if(!m){f=null;break t}if(f=ba(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Ut=ba(f.nextSibling),l=f.data==="F!";break e}}Or(l)}l=!1}l&&(n=r[0])}}return r=zn(),r.memoizedState=r.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gh,lastRenderedState:n},r.queue=l,r=dm.bind(null,it,l),l.dispatch=r,l=ld(!1),m=md.bind(null,it,!1,l.queue),l=zn(),f={state:n,dispatch:null,action:e,pending:null},l.queue=f,r=_v.bind(null,it,f,m,r),f.dispatch=r,l.memoizedState=e,[n,r,!1]}function qh(e){var n=an();return Yh(n,Lt,e)}function Yh(e,n,r){if(n=id(e,n,Gh)[0],e=Ho(cr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Js(n)}catch(x){throw x===Yi?To:x}else l=n;n=an();var f=n.queue,m=f.dispatch;return r!==n.memoizedState&&(it.flags|=2048,Wi(9,{destroy:void 0},Dv.bind(null,f,r),null)),[l,m,e]}function Dv(e,n){e.action=n}function Kh(e){var n=an(),r=Lt;if(r!==null)return Yh(n,r,e);an(),n=n.memoizedState,r=an();var l=r.queue.dispatch;return r.memoizedState=e,[n,l,!1]}function Wi(e,n,r,l){return e={tag:e,create:r,deps:l,inst:n,next:null},n=it.updateQueue,n===null&&(n=Lo(),it.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(l=r.next,r.next=e,e.next=l,n.lastEffect=e),e}function Xh(){return an().memoizedState}function ko(e,n,r,l){var f=zn();it.flags|=e,f.memoizedState=Wi(1|n,{destroy:void 0},r,l===void 0?null:l)}function zo(e,n,r,l){var f=an();l=l===void 0?null:l;var m=f.memoizedState.inst;Lt!==null&&l!==null&&Wu(l,Lt.memoizedState.deps)?f.memoizedState=Wi(n,m,r,l):(it.flags|=e,f.memoizedState=Wi(1|n,m,r,l))}function Qh(e,n){ko(8390656,8,e,n)}function cd(e,n){zo(2048,8,e,n)}function Ov(e){it.flags|=4;var n=it.updateQueue;if(n===null)n=Lo(),it.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function Jh(e){var n=an().memoizedState;return Ov({ref:n,nextImpl:e}),function(){if((Ct&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}function Wh(e,n){return zo(4,2,e,n)}function em(e,n){return zo(4,4,e,n)}function tm(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nm(e,n,r){r=r!=null?r.concat([e]):null,zo(4,4,tm.bind(null,n,e),r)}function ud(){}function am(e,n){var r=an();n=n===void 0?null:n;var l=r.memoizedState;return n!==null&&Wu(n,l[1])?l[0]:(r.memoizedState=[e,n],e)}function rm(e,n){var r=an();n=n===void 0?null:n;var l=r.memoizedState;if(n!==null&&Wu(n,l[1]))return l[0];if(l=e(),Si){It(!0);try{e()}finally{It(!1)}}return r.memoizedState=[l,n],l}function dd(e,n,r){return r===void 0||(or&1073741824)!==0&&(pt&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=ip(),it.lanes|=e,Pr|=e,r)}function im(e,n,r,l){return Xn(r,n)?r:Xi.current!==null?(e=dd(e,r,l),Xn(e,n)||(fn=!0),e):(or&42)===0||(or&1073741824)!==0&&(pt&261930)===0?(fn=!0,e.memoizedState=r):(e=ip(),it.lanes|=e,Pr|=e,n)}function sm(e,n,r,l,f){var m=X.p;X.p=m!==0&&8>m?m:8;var x=H.T,A={};H.T=A,md(e,!1,n,r);try{var D=f(),I=H.S;if(I!==null&&I(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var W=Rv(D,l);Ws(e,n,W,na(e))}else Ws(e,n,l,na(e))}catch(se){Ws(e,n,{then:function(){},status:"rejected",reason:se},na())}finally{X.p=m,x!==null&&A.types!==null&&(x.types=A.types),H.T=x}}function Lv(){}function fd(e,n,r,l){if(e.tag!==5)throw Error(s(476));var f=lm(e).queue;sm(e,f,n,Y,r===null?Lv:function(){return om(e),r(l)})}function lm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:Y},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function om(e){var n=lm(e);n.next===null&&(n=e.alternate.memoizedState),Ws(e,n.next.queue,{},na())}function hd(){return Mn(gl)}function cm(){return an().memoizedState}function um(){return an().memoizedState}function Vv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=na();e=Hr(r);var l=kr(n,e,r);l!==null&&(qn(l,n,r),Ys(l,n,r)),n={cache:Pu()},e.payload=n;return}n=n.return}}function Hv(e,n,r){var l=na();r={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bo(e)?fm(n,r):(r=_u(e,n,r,l),r!==null&&(qn(r,e,l),hm(r,n,l)))}function dm(e,n,r){var l=na();Ws(e,n,r,l)}function Ws(e,n,r,l){var f={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bo(e))fm(n,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var x=n.lastRenderedState,A=m(x,r);if(f.hasEagerState=!0,f.eagerState=A,Xn(A,x))return vo(e,n,f,0),kt===null&&bo(),!1}catch{}finally{}if(r=_u(e,n,f,l),r!==null)return qn(r,e,l),hm(r,n,l),!0}return!1}function md(e,n,r,l){if(l={lane:2,revertLane:$d(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Bo(e)){if(n)throw Error(s(479))}else n=_u(e,r,l,2),n!==null&&qn(n,e,2)}function Bo(e){var n=e.alternate;return e===it||n!==null&&n===it}function fm(e,n){Qi=Do=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function hm(e,n,r){if((r&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,r|=l,n.lanes=r,Ie(e,r)}}var el={readContext:Mn,use:Vo,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};el.useEffectEvent=Jt;var mm={readContext:Mn,use:Vo,useCallback:function(e,n){return zn().memoizedState=[e,n===void 0?null:n],e},useContext:Mn,useEffect:Qh,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,ko(4194308,4,tm.bind(null,n,e),r)},useLayoutEffect:function(e,n){return ko(4194308,4,e,n)},useInsertionEffect:function(e,n){ko(4,2,e,n)},useMemo:function(e,n){var r=zn();n=n===void 0?null:n;var l=e();if(Si){It(!0);try{e()}finally{It(!1)}}return r.memoizedState=[l,n],l},useReducer:function(e,n,r){var l=zn();if(r!==void 0){var f=r(n);if(Si){It(!0);try{r(n)}finally{It(!1)}}}else f=n;return l.memoizedState=l.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},l.queue=e,e=e.dispatch=Hv.bind(null,it,e),[l.memoizedState,e]},useRef:function(e){var n=zn();return e={current:e},n.memoizedState=e},useState:function(e){e=ld(e);var n=e.queue,r=dm.bind(null,it,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:ud,useDeferredValue:function(e,n){var r=zn();return dd(r,e,n)},useTransition:function(){var e=ld(!1);return e=sm.bind(null,it,e.queue,!0,!1),zn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var l=it,f=zn();if(yt){if(r===void 0)throw Error(s(407));r=r()}else{if(r=n(),kt===null)throw Error(s(349));(pt&127)!==0||Vh(l,n,r)}f.memoizedState=r;var m={value:r,getSnapshot:n};return f.queue=m,Qh(kh.bind(null,l,m,e),[e]),l.flags|=2048,Wi(9,{destroy:void 0},Hh.bind(null,l,m,r,n),null),r},useId:function(){var e=zn(),n=kt.identifierPrefix;if(yt){var r=Pa,l=Za;r=(l&~(1<<32-sn(l)-1)).toString(32)+r,n="_"+n+"R_"+r,r=Oo++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=Nv++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:hd,useFormState:$h,useActionState:$h,useOptimistic:function(e){var n=zn();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=md.bind(null,it,!0,r),r.dispatch=n,[e,n]},useMemoCache:rd,useCacheRefresh:function(){return zn().memoizedState=Vv.bind(null,it)},useEffectEvent:function(e){var n=zn(),r={impl:e};return n.memoizedState=r,function(){if((Ct&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}},pd={readContext:Mn,use:Vo,useCallback:am,useContext:Mn,useEffect:cd,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:rm,useReducer:Ho,useRef:Xh,useState:function(){return Ho(cr)},useDebugValue:ud,useDeferredValue:function(e,n){var r=an();return im(r,Lt.memoizedState,e,n)},useTransition:function(){var e=Ho(cr)[0],n=an().memoizedState;return[typeof e=="boolean"?e:Js(e),n]},useSyncExternalStore:Lh,useId:cm,useHostTransitionStatus:hd,useFormState:qh,useActionState:qh,useOptimistic:function(e,n){var r=an();return Uh(r,Lt,e,n)},useMemoCache:rd,useCacheRefresh:um};pd.useEffectEvent=Jh;var pm={readContext:Mn,use:Vo,useCallback:am,useContext:Mn,useEffect:cd,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:rm,useReducer:sd,useRef:Xh,useState:function(){return sd(cr)},useDebugValue:ud,useDeferredValue:function(e,n){var r=an();return Lt===null?dd(r,e,n):im(r,Lt.memoizedState,e,n)},useTransition:function(){var e=sd(cr)[0],n=an().memoizedState;return[typeof e=="boolean"?e:Js(e),n]},useSyncExternalStore:Lh,useId:cm,useHostTransitionStatus:hd,useFormState:Kh,useActionState:Kh,useOptimistic:function(e,n){var r=an();return Lt!==null?Uh(r,Lt,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:rd,useCacheRefresh:um};pm.useEffectEvent=Jh;function gd(e,n,r,l){n=e.memoizedState,r=r(l,n),r=r==null?n:v({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var yd={enqueueSetState:function(e,n,r){e=e._reactInternals;var l=na(),f=Hr(l);f.payload=n,r!=null&&(f.callback=r),n=kr(e,f,l),n!==null&&(qn(n,e,l),Ys(n,e,l))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var l=na(),f=Hr(l);f.tag=1,f.payload=n,r!=null&&(f.callback=r),n=kr(e,f,l),n!==null&&(qn(n,e,l),Ys(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=na(),l=Hr(r);l.tag=2,n!=null&&(l.callback=n),n=kr(e,l,r),n!==null&&(qn(n,e,r),Ys(n,e,r))}};function gm(e,n,r,l,f,m,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,m,x):n.prototype&&n.prototype.isPureReactComponent?!Us(r,l)||!Us(f,m):!0}function ym(e,n,r,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,l),n.state!==e&&yd.enqueueReplaceState(n,n.state,null)}function wi(e,n){var r=n;if("ref"in n){r={};for(var l in n)l!=="ref"&&(r[l]=n[l])}if(e=e.defaultProps){r===n&&(r=v({},r));for(var f in e)r[f]===void 0&&(r[f]=e[f])}return r}function bm(e){yo(e)}function vm(e){console.error(e)}function xm(e){yo(e)}function Uo(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Em(e,n,r){try{var l=e.onCaughtError;l(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function bd(e,n,r){return r=Hr(r),r.tag=3,r.payload={element:null},r.callback=function(){Uo(e,n)},r}function Sm(e){return e=Hr(e),e.tag=3,e}function wm(e,n,r,l){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;e.payload=function(){return f(m)},e.callback=function(){Em(n,r,l)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Em(n,r,l),typeof f!="function"&&(Fr===null?Fr=new Set([this]):Fr.add(this));var A=l.stack;this.componentDidCatch(l.value,{componentStack:A!==null?A:""})})}function kv(e,n,r,l,f){if(r.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=r.alternate,n!==null&&Gi(n,r,f,!0),r=Jn.current,r!==null){switch(r.tag){case 31:case 13:return ya===null?Jo():r.alternate===null&&Wt===0&&(Wt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,l===Co?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([l]):n.add(l),Fd(e,l,f)),!1;case 22:return r.flags|=65536,l===Co?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([l]):r.add(l)),Fd(e,l,f)),!1}throw Error(s(435,r.tag))}return Fd(e,l,f),Jo(),!1}if(yt)return n=Jn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,l!==ku&&(e=Error(s(422),{cause:l}),Fs(ha(e,r)))):(l!==ku&&(n=Error(s(423),{cause:l}),Fs(ha(n,r))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,l=ha(l,r),f=bd(e.stateNode,l,f),Yu(e,f),Wt!==4&&(Wt=2)),!1;var m=Error(s(520),{cause:l});if(m=ha(m,r),ol===null?ol=[m]:ol.push(m),Wt!==4&&(Wt=2),n===null)return!0;l=ha(l,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=f&-f,r.lanes|=e,e=bd(r.stateNode,l,e),Yu(r,e),!1;case 1:if(n=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Fr===null||!Fr.has(m))))return r.flags|=65536,f&=-f,r.lanes|=f,f=Sm(f),wm(f,e,r,l),Yu(r,f),!1}r=r.return}while(r!==null);return!1}var vd=Error(s(461)),fn=!1;function Tn(e,n,r,l){n.child=e===null?Ch(n,null,r,l):Ei(n,e.child,r,l)}function Am(e,n,r,l,f){r=r.render;var m=n.ref;if("ref"in l){var x={};for(var A in l)A!=="ref"&&(x[A]=l[A])}else x=l;return yi(n),l=ed(e,n,r,x,m,f),A=td(),e!==null&&!fn?(nd(e,n,f),ur(e,n,f)):(yt&&A&&Vu(n),n.flags|=1,Tn(e,n,l,f),n.child)}function Mm(e,n,r,l,f){if(e===null){var m=r.type;return typeof m=="function"&&!Du(m)&&m.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=m,Tm(e,n,m,l,f)):(e=Eo(r.type,null,l,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,!Cd(e,f)){var x=m.memoizedProps;if(r=r.compare,r=r!==null?r:Us,r(x,l)&&e.ref===n.ref)return ur(e,n,f)}return n.flags|=1,e=rr(m,l),e.ref=n.ref,e.return=n,n.child=e}function Tm(e,n,r,l,f){if(e!==null){var m=e.memoizedProps;if(Us(m,l)&&e.ref===n.ref)if(fn=!1,n.pendingProps=l=m,Cd(e,f))(e.flags&131072)!==0&&(fn=!0);else return n.lanes=e.lanes,ur(e,n,f)}return xd(e,n,r,l,f)}function Cm(e,n,r,l){var f=l.children,m=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,e!==null){for(l=n.child=e.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,n.child=null;return Rm(e,n,m,r,l)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Mo(n,m!==null?m.cachePool:null),m!==null?jh(n,m):Xu(),_h(n);else return l=n.lanes=536870912,Rm(e,n,m!==null?m.baseLanes|r:r,r,l)}else m!==null?(Mo(n,m.cachePool),jh(n,m),Br(),n.memoizedState=null):(e!==null&&Mo(n,null),Xu(),Br());return Tn(e,n,f,r),n.child}function tl(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Rm(e,n,r,l,f){var m=Iu();return m=m===null?null:{parent:un._currentValue,pool:m},n.memoizedState={baseLanes:r,cachePool:m},e!==null&&Mo(n,null),Xu(),_h(n),e!==null&&Gi(e,n,l,!0),n.childLanes=f,null}function Zo(e,n){return n=Fo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Nm(e,n,r){return Ei(n,e.child,null,r),e=Zo(n,n.pendingProps),e.flags|=2,Wn(n),n.memoizedState=null,e}function zv(e,n,r){var l=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(yt){if(l.mode==="hidden")return e=Zo(n,l),n.lanes=536870912,tl(null,e);if(Ju(n),(e=Ut)?(e=Zp(e,ga),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:_r!==null?{id:Za,overflow:Pa}:null,retryLane:536870912,hydrationErrors:null},r=fh(e),r.return=n,n.child=r,An=n,Ut=null)):e=null,e===null)throw Or(n);return n.lanes=536870912,null}return Zo(n,l)}var m=e.memoizedState;if(m!==null){var x=m.dehydrated;if(Ju(n),f)if(n.flags&256)n.flags&=-257,n=Nm(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(s(558));else if(fn||Gi(e,n,r,!1),f=(r&e.childLanes)!==0,fn||f){if(l=kt,l!==null&&(x=N(l,r),x!==0&&x!==m.retryLane))throw m.retryLane=x,hi(e,x),qn(l,e,x),vd;Jo(),n=Nm(e,n,r)}else e=m.treeContext,Ut=ba(x.nextSibling),An=n,yt=!0,Dr=null,ga=!1,e!==null&&ph(n,e),n=Zo(n,l),n.flags|=4096;return n}return e=rr(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Po(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(s(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function xd(e,n,r,l,f){return yi(n),r=ed(e,n,r,l,void 0,f),l=td(),e!==null&&!fn?(nd(e,n,f),ur(e,n,f)):(yt&&l&&Vu(n),n.flags|=1,Tn(e,n,r,f),n.child)}function jm(e,n,r,l,f,m){return yi(n),n.updateQueue=null,r=Oh(n,l,r,f),Dh(e),l=td(),e!==null&&!fn?(nd(e,n,m),ur(e,n,m)):(yt&&l&&Vu(n),n.flags|=1,Tn(e,n,r,m),n.child)}function _m(e,n,r,l,f){if(yi(n),n.stateNode===null){var m=Zi,x=r.contextType;typeof x=="object"&&x!==null&&(m=Mn(x)),m=new r(l,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=yd,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=l,m.state=n.memoizedState,m.refs={},$u(n),x=r.contextType,m.context=typeof x=="object"&&x!==null?Mn(x):Zi,m.state=n.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(gd(n,r,x,l),m.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&yd.enqueueReplaceState(m,m.state,null),Xs(n,l,m,f),Ks(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){m=n.stateNode;var A=n.memoizedProps,D=wi(r,A);m.props=D;var I=m.context,W=r.contextType;x=Zi,typeof W=="object"&&W!==null&&(x=Mn(W));var se=r.getDerivedStateFromProps;W=typeof se=="function"||typeof m.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,W||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(A||I!==x)&&ym(n,m,l,x),Vr=!1;var G=n.memoizedState;m.state=G,Xs(n,l,m,f),Ks(),I=n.memoizedState,A||G!==I||Vr?(typeof se=="function"&&(gd(n,r,se,l),I=n.memoizedState),(D=Vr||gm(n,r,D,l,G,I,x))?(W||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=I),m.props=l,m.state=I,m.context=x,l=D):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{m=n.stateNode,qu(e,n),x=n.memoizedProps,W=wi(r,x),m.props=W,se=n.pendingProps,G=m.context,I=r.contextType,D=Zi,typeof I=="object"&&I!==null&&(D=Mn(I)),A=r.getDerivedStateFromProps,(I=typeof A=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==se||G!==D)&&ym(n,m,l,D),Vr=!1,G=n.memoizedState,m.state=G,Xs(n,l,m,f),Ks();var K=n.memoizedState;x!==se||G!==K||Vr||e!==null&&e.dependencies!==null&&wo(e.dependencies)?(typeof A=="function"&&(gd(n,r,A,l),K=n.memoizedState),(W=Vr||gm(n,r,W,l,G,K,D)||e!==null&&e.dependencies!==null&&wo(e.dependencies))?(I||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,K,D),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,K,D)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=K),m.props=l,m.state=K,m.context=D,l=W):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(n.flags|=1024),l=!1)}return m=l,Po(e,n),l=(n.flags&128)!==0,m||l?(m=n.stateNode,r=l&&typeof r.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,e!==null&&l?(n.child=Ei(n,e.child,null,f),n.child=Ei(n,null,r,f)):Tn(e,n,r,f),n.memoizedState=m.state,e=n.child):e=ur(e,n,f),e}function Dm(e,n,r,l){return pi(),n.flags|=256,Tn(e,n,r,l),n.child}var Ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sd(e){return{baseLanes:e,cachePool:Eh()}}function wd(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=ta),e}function Om(e,n,r){var l=n.pendingProps,f=!1,m=(n.flags&128)!==0,x;if((x=m)||(x=e!==null&&e.memoizedState===null?!1:(nn.current&2)!==0),x&&(f=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(yt){if(f?zr(n):Br(),(e=Ut)?(e=Zp(e,ga),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:_r!==null?{id:Za,overflow:Pa}:null,retryLane:536870912,hydrationErrors:null},r=fh(e),r.return=n,n.child=r,An=n,Ut=null)):e=null,e===null)throw Or(n);return sf(e)?n.lanes=32:n.lanes=536870912,null}var A=l.children;return l=l.fallback,f?(Br(),f=n.mode,A=Fo({mode:"hidden",children:A},f),l=mi(l,f,r,null),A.return=n,l.return=n,A.sibling=l,n.child=A,l=n.child,l.memoizedState=Sd(r),l.childLanes=wd(e,x,r),n.memoizedState=Ed,tl(null,l)):(zr(n),Ad(n,A))}var D=e.memoizedState;if(D!==null&&(A=D.dehydrated,A!==null)){if(m)n.flags&256?(zr(n),n.flags&=-257,n=Md(e,n,r)):n.memoizedState!==null?(Br(),n.child=e.child,n.flags|=128,n=null):(Br(),A=l.fallback,f=n.mode,l=Fo({mode:"visible",children:l.children},f),A=mi(A,f,r,null),A.flags|=2,l.return=n,A.return=n,l.sibling=A,n.child=l,Ei(n,e.child,null,r),l=n.child,l.memoizedState=Sd(r),l.childLanes=wd(e,x,r),n.memoizedState=Ed,n=tl(null,l));else if(zr(n),sf(A)){if(x=A.nextSibling&&A.nextSibling.dataset,x)var I=x.dgst;x=I,l=Error(s(419)),l.stack="",l.digest=x,Fs({value:l,source:null,stack:null}),n=Md(e,n,r)}else if(fn||Gi(e,n,r,!1),x=(r&e.childLanes)!==0,fn||x){if(x=kt,x!==null&&(l=N(x,r),l!==0&&l!==D.retryLane))throw D.retryLane=l,hi(e,l),qn(x,e,l),vd;rf(A)||Jo(),n=Md(e,n,r)}else rf(A)?(n.flags|=192,n.child=e.child,n=null):(e=D.treeContext,Ut=ba(A.nextSibling),An=n,yt=!0,Dr=null,ga=!1,e!==null&&ph(n,e),n=Ad(n,l.children),n.flags|=4096);return n}return f?(Br(),A=l.fallback,f=n.mode,D=e.child,I=D.sibling,l=rr(D,{mode:"hidden",children:l.children}),l.subtreeFlags=D.subtreeFlags&65011712,I!==null?A=rr(I,A):(A=mi(A,f,r,null),A.flags|=2),A.return=n,l.return=n,l.sibling=A,n.child=l,tl(null,l),l=n.child,A=e.child.memoizedState,A===null?A=Sd(r):(f=A.cachePool,f!==null?(D=un._currentValue,f=f.parent!==D?{parent:D,pool:D}:f):f=Eh(),A={baseLanes:A.baseLanes|r,cachePool:f}),l.memoizedState=A,l.childLanes=wd(e,x,r),n.memoizedState=Ed,tl(e.child,l)):(zr(n),r=e.child,e=r.sibling,r=rr(r,{mode:"visible",children:l.children}),r.return=n,r.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=r,n.memoizedState=null,r)}function Ad(e,n){return n=Fo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Fo(e,n){return e=Qn(22,e,null,n),e.lanes=0,e}function Md(e,n,r){return Ei(n,e.child,null,r),e=Ad(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Lm(e,n,r){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Uu(e.return,n,r)}function Td(e,n,r,l,f,m){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:f,treeForkCount:m}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=l,x.tail=r,x.tailMode=f,x.treeForkCount=m)}function Vm(e,n,r){var l=n.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var x=nn.current,A=(x&2)!==0;if(A?(x=x&1|2,n.flags|=128):x&=1,oe(nn,x),Tn(e,n,l,r),l=yt?Ps:0,!A&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lm(e,r,n);else if(e.tag===19)Lm(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(r=n.child,f=null;r!==null;)e=r.alternate,e!==null&&_o(e)===null&&(f=r),r=r.sibling;r=f,r===null?(f=n.child,n.child=null):(f=r.sibling,r.sibling=null),Td(n,!1,f,r,m,l);break;case"backwards":case"unstable_legacy-backwards":for(r=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&_o(e)===null){n.child=f;break}e=f.sibling,f.sibling=r,r=f,f=e}Td(n,!0,r,null,m,l);break;case"together":Td(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function ur(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),Pr|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(Gi(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,r=rr(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=rr(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function Cd(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&wo(e)))}function Bv(e,n,r){switch(n.tag){case 3:ze(n,n.stateNode.containerInfo),Lr(n,un,e.memoizedState.cache),pi();break;case 27:case 5:ut(n);break;case 4:ze(n,n.stateNode.containerInfo);break;case 10:Lr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ju(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(zr(n),n.flags|=128,null):(r&n.child.childLanes)!==0?Om(e,n,r):(zr(n),e=ur(e,n,r),e!==null?e.sibling:null);zr(n);break;case 19:var f=(e.flags&128)!==0;if(l=(r&n.childLanes)!==0,l||(Gi(e,n,r,!1),l=(r&n.childLanes)!==0),f){if(l)return Vm(e,n,r);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),oe(nn,nn.current),l)break;return null;case 22:return n.lanes=0,Cm(e,n,r,n.pendingProps);case 24:Lr(n,un,e.memoizedState.cache)}return ur(e,n,r)}function Hm(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)fn=!0;else{if(!Cd(e,r)&&(n.flags&128)===0)return fn=!1,Bv(e,n,r);fn=(e.flags&131072)!==0}else fn=!1,yt&&(n.flags&1048576)!==0&&mh(n,Ps,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=vi(n.elementType),n.type=e,typeof e=="function")Du(e)?(l=wi(e,l),n.tag=1,n=_m(null,n,e,l,r)):(n.tag=0,n=xd(null,n,e,l,r));else{if(e!=null){var f=e.$$typeof;if(f===B){n.tag=11,n=Am(null,n,e,l,r);break e}else if(f===ne){n.tag=14,n=Mm(null,n,e,l,r);break e}}throw n=fe(e)||e,Error(s(306,n,""))}}return n;case 0:return xd(e,n,n.type,n.pendingProps,r);case 1:return l=n.type,f=wi(l,n.pendingProps),_m(e,n,l,f,r);case 3:e:{if(ze(n,n.stateNode.containerInfo),e===null)throw Error(s(387));l=n.pendingProps;var m=n.memoizedState;f=m.element,qu(e,n),Xs(n,l,null,r);var x=n.memoizedState;if(l=x.cache,Lr(n,un,l),l!==m.cache&&Zu(n,[un],r,!0),Ks(),l=x.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=Dm(e,n,l,r);break e}else if(l!==f){f=ha(Error(s(424)),n),Fs(f),n=Dm(e,n,l,r);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ut=ba(e.firstChild),An=n,yt=!0,Dr=null,ga=!0,r=Ch(n,null,l,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(pi(),l===f){n=ur(e,n,r);break e}Tn(e,n,l,r)}n=n.child}return n;case 26:return Po(e,n),e===null?(r=qp(n.type,null,n.pendingProps,null))?n.memoizedState=r:yt||(r=n.type,e=n.pendingProps,l=ic(Ne.current).createElement(r),l[be]=n,l[De]=e,Cn(l,r,e),Ke(l),n.stateNode=l):n.memoizedState=qp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return ut(n),e===null&&yt&&(l=n.stateNode=Ip(n.type,n.pendingProps,Ne.current),An=n,ga=!0,f=Ut,qr(n.type)?(lf=f,Ut=ba(l.firstChild)):Ut=f),Tn(e,n,n.pendingProps.children,r),Po(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&yt&&((f=l=Ut)&&(l=px(l,n.type,n.pendingProps,ga),l!==null?(n.stateNode=l,An=n,Ut=ba(l.firstChild),ga=!1,f=!0):f=!1),f||Or(n)),ut(n),f=n.type,m=n.pendingProps,x=e!==null?e.memoizedProps:null,l=m.children,tf(f,m)?l=null:x!==null&&tf(f,x)&&(n.flags|=32),n.memoizedState!==null&&(f=ed(e,n,jv,null,null,r),gl._currentValue=f),Po(e,n),Tn(e,n,l,r),n.child;case 6:return e===null&&yt&&((e=r=Ut)&&(r=gx(r,n.pendingProps,ga),r!==null?(n.stateNode=r,An=n,Ut=null,e=!0):e=!1),e||Or(n)),null;case 13:return Om(e,n,r);case 4:return ze(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Ei(n,null,l,r):Tn(e,n,l,r),n.child;case 11:return Am(e,n,n.type,n.pendingProps,r);case 7:return Tn(e,n,n.pendingProps,r),n.child;case 8:return Tn(e,n,n.pendingProps.children,r),n.child;case 12:return Tn(e,n,n.pendingProps.children,r),n.child;case 10:return l=n.pendingProps,Lr(n,n.type,l.value),Tn(e,n,l.children,r),n.child;case 9:return f=n.type._context,l=n.pendingProps.children,yi(n),f=Mn(f),l=l(f),n.flags|=1,Tn(e,n,l,r),n.child;case 14:return Mm(e,n,n.type,n.pendingProps,r);case 15:return Tm(e,n,n.type,n.pendingProps,r);case 19:return Vm(e,n,r);case 31:return zv(e,n,r);case 22:return Cm(e,n,r,n.pendingProps);case 24:return yi(n),l=Mn(un),e===null?(f=Iu(),f===null&&(f=kt,m=Pu(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=r),f=m),n.memoizedState={parent:l,cache:f},$u(n),Lr(n,un,f)):((e.lanes&r)!==0&&(qu(e,n),Xs(n,null,null,r),Ks()),f=e.memoizedState,m=n.memoizedState,f.parent!==l?(f={parent:l,cache:l},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Lr(n,un,l)):(l=m.cache,Lr(n,un,l),l!==f.cache&&Zu(n,[un],r,!0))),Tn(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function dr(e){e.flags|=4}function Rd(e,n,r,l,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(cp())e.flags|=8192;else throw xi=Co,Gu}else e.flags&=-16777217}function km(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jp(n))if(cp())e.flags|=8192;else throw xi=Co,Gu}function Io(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?qe():536870912,e.lanes|=n,as|=n)}function nl(e,n){if(!yt)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Zt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,l=0;if(n)for(var f=e.child;f!==null;)r|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)r|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=l,e.childLanes=r,n}function Uv(e,n,r){var l=n.pendingProps;switch(Hu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(n),null;case 1:return Zt(n),null;case 3:return r=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),lr(un),Le(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ii(n)?dr(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,zu())),Zt(n),null;case 26:var f=n.type,m=n.memoizedState;return e===null?(dr(n),m!==null?(Zt(n),km(n,m)):(Zt(n),Rd(n,f,null,l,r))):m?m!==e.memoizedState?(dr(n),Zt(n),km(n,m)):(Zt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&dr(n),Zt(n),Rd(n,f,e,l,r)),null;case 27:if(he(n),r=Ne.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&dr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Zt(n),null}e=me.current,Ii(n)?gh(n):(e=Ip(f,l,r),n.stateNode=e,dr(n))}return Zt(n),null;case 5:if(he(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&dr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Zt(n),null}if(m=me.current,Ii(n))gh(n);else{var x=ic(Ne.current);switch(m){case 1:m=x.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=x.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=x.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?x.createElement("select",{is:l.is}):x.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?x.createElement(f,{is:l.is}):x.createElement(f)}}m[be]=n,m[De]=l;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)m.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=m;e:switch(Cn(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&dr(n)}}return Zt(n),Rd(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&dr(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(s(166));if(e=Ne.current,Ii(n)){if(e=n.stateNode,r=n.memoizedProps,l=null,f=An,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}e[be]=n,e=!!(e.nodeValue===r||l!==null&&l.suppressHydrationWarning===!0||Op(e.nodeValue,r)),e||Or(n,!0)}else e=ic(e).createTextNode(l),e[be]=n,n.stateNode=e}return Zt(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(l=Ii(n),r!==null){if(e===null){if(!l)throw Error(s(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[be]=n}else pi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Zt(n),e=!1}else r=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(Wn(n),n):(Wn(n),null);if((n.flags&128)!==0)throw Error(s(558))}return Zt(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ii(n),l!==null&&l.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[be]=n}else pi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Zt(n),f=!1}else f=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Wn(n),n):(Wn(n),null)}return Wn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=l!==null,e=e!==null&&e.memoizedState!==null,r&&(l=n.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),Io(n,n.updateQueue),Zt(n),null);case 4:return Le(),e===null&&Xd(n.stateNode.containerInfo),Zt(n),null;case 10:return lr(n.type),Zt(n),null;case 19:if(q(nn),l=n.memoizedState,l===null)return Zt(n),null;if(f=(n.flags&128)!==0,m=l.rendering,m===null)if(f)nl(l,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(m=_o(e),m!==null){for(n.flags|=128,nl(l,!1),e=m.updateQueue,n.updateQueue=e,Io(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)dh(r,e),r=r.sibling;return oe(nn,nn.current&1|2),yt&&ir(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&jt()>Ko&&(n.flags|=128,f=!0,nl(l,!1),n.lanes=4194304)}else{if(!f)if(e=_o(m),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Io(n,e),nl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!yt)return Zt(n),null}else 2*jt()-l.renderingStartTime>Ko&&r!==536870912&&(n.flags|=128,f=!0,nl(l,!1),n.lanes=4194304);l.isBackwards?(m.sibling=n.child,n.child=m):(e=l.last,e!==null?e.sibling=m:n.child=m,l.last=m)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=jt(),e.sibling=null,r=nn.current,oe(nn,f?r&1|2:r&1),yt&&ir(n,l.treeForkCount),e):(Zt(n),null);case 22:case 23:return Wn(n),Qu(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(r&536870912)!==0&&(n.flags&128)===0&&(Zt(n),n.subtreeFlags&6&&(n.flags|=8192)):Zt(n),r=n.updateQueue,r!==null&&Io(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==r&&(n.flags|=2048),e!==null&&q(bi),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),lr(un),Zt(n),null;case 25:return null;case 30:return null}throw Error(s(156,n.tag))}function Zv(e,n){switch(Hu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return lr(un),Le(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return he(n),null;case 31:if(n.memoizedState!==null){if(Wn(n),n.alternate===null)throw Error(s(340));pi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Wn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));pi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(nn),null;case 4:return Le(),null;case 10:return lr(n.type),null;case 22:case 23:return Wn(n),Qu(),e!==null&&q(bi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return lr(un),null;case 25:return null;default:return null}}function zm(e,n){switch(Hu(n),n.tag){case 3:lr(un),Le();break;case 26:case 27:case 5:he(n);break;case 4:Le();break;case 31:n.memoizedState!==null&&Wn(n);break;case 13:Wn(n);break;case 19:q(nn);break;case 10:lr(n.type);break;case 22:case 23:Wn(n),Qu(),e!==null&&q(bi);break;case 24:lr(un)}}function al(e,n){try{var r=n.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var f=l.next;r=f;do{if((r.tag&e)===e){l=void 0;var m=r.create,x=r.inst;l=m(),x.destroy=l}r=r.next}while(r!==f)}}catch(A){Ot(n,n.return,A)}}function Ur(e,n,r){try{var l=n.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&e)===e){var x=l.inst,A=x.destroy;if(A!==void 0){x.destroy=void 0,f=n;var D=r,I=A;try{I()}catch(W){Ot(f,D,W)}}}l=l.next}while(l!==m)}}catch(W){Ot(n,n.return,W)}}function Bm(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{Nh(n,r)}catch(l){Ot(e,e.return,l)}}}function Um(e,n,r){r.props=wi(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(l){Ot(e,n,l)}}function rl(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof r=="function"?e.refCleanup=r(l):r.current=l}}catch(f){Ot(e,n,f)}}function Fa(e,n){var r=e.ref,l=e.refCleanup;if(r!==null)if(typeof l=="function")try{l()}catch(f){Ot(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){Ot(e,n,f)}else r.current=null}function Zm(e){var n=e.type,r=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&l.focus();break e;case"img":r.src?l.src=r.src:r.srcSet&&(l.srcset=r.srcSet)}}catch(f){Ot(e,e.return,f)}}function Nd(e,n,r){try{var l=e.stateNode;cx(l,e.type,r,n),l[De]=n}catch(f){Ot(e,e.return,f)}}function Pm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qr(e.type)||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pm(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&&qr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _d(e,n,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=ve));else if(l!==4&&(l===27&&qr(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(_d(e,n,r),e=e.sibling;e!==null;)_d(e,n,r),e=e.sibling}function Go(e,n,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(l!==4&&(l===27&&qr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Go(e,n,r),e=e.sibling;e!==null;)Go(e,n,r),e=e.sibling}function Fm(e){var n=e.stateNode,r=e.memoizedProps;try{for(var l=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Cn(n,l,r),n[be]=e,n[De]=r}catch(m){Ot(e,e.return,m)}}var fr=!1,hn=!1,Dd=!1,Im=typeof WeakSet=="function"?WeakSet:Set,xn=null;function Pv(e,n){if(e=e.containerInfo,Wd=fc,e=nh(e),Mu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var f=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var x=0,A=-1,D=-1,I=0,W=0,se=e,G=null;t:for(;;){for(var K;se!==r||f!==0&&se.nodeType!==3||(A=x+f),se!==m||l!==0&&se.nodeType!==3||(D=x+l),se.nodeType===3&&(x+=se.nodeValue.length),(K=se.firstChild)!==null;)G=se,se=K;for(;;){if(se===e)break t;if(G===r&&++I===f&&(A=x),G===m&&++W===l&&(D=x),(K=se.nextSibling)!==null)break;se=G,G=se.parentNode}se=K}r=A===-1||D===-1?null:{start:A,end:D}}else r=null}r=r||{start:0,end:0}}else r=null;for(ef={focusedElem:e,selectionRange:r},fc=!1,xn=n;xn!==null;)if(n=xn,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,xn=e;else for(;xn!==null;){switch(n=xn,m=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)f=e[r],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,r=n,f=m.memoizedProps,m=m.memoizedState,l=r.stateNode;try{var ke=wi(r.type,f);e=l.getSnapshotBeforeUpdate(ke,m),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ye){Ot(r,r.return,Ye)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)af(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":af(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=n.sibling,e!==null){e.return=n.return,xn=e;break}xn=n.return}}function Gm(e,n,r){var l=r.flags;switch(r.tag){case 0:case 11:case 15:mr(e,r),l&4&&al(5,r);break;case 1:if(mr(e,r),l&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(x){Ot(r,r.return,x)}else{var f=wi(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ot(r,r.return,x)}}l&64&&Bm(r),l&512&&rl(r,r.return);break;case 3:if(mr(e,r),l&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{Nh(e,n)}catch(x){Ot(r,r.return,x)}}break;case 27:n===null&&l&4&&Fm(r);case 26:case 5:mr(e,r),n===null&&l&4&&Zm(r),l&512&&rl(r,r.return);break;case 12:mr(e,r);break;case 31:mr(e,r),l&4&&Ym(e,r);break;case 13:mr(e,r),l&4&&Km(e,r),l&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Qv.bind(null,r),yx(e,r))));break;case 22:if(l=r.memoizedState!==null||fr,!l){n=n!==null&&n.memoizedState!==null||hn,f=fr;var m=hn;fr=l,(hn=n)&&!m?pr(e,r,(r.subtreeFlags&8772)!==0):mr(e,r),fr=f,hn=m}break;case 30:break;default:mr(e,r)}}function $m(e){var n=e.alternate;n!==null&&(e.alternate=null,$m(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Et(n)),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 $t=null,Fn=!1;function hr(e,n,r){for(r=r.child;r!==null;)qm(e,n,r),r=r.sibling}function qm(e,n,r){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(kn,r)}catch{}switch(r.tag){case 26:hn||Fa(r,n),hr(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:hn||Fa(r,n);var l=$t,f=Fn;qr(r.type)&&($t=r.stateNode,Fn=!1),hr(e,n,r),hl(r.stateNode),$t=l,Fn=f;break;case 5:hn||Fa(r,n);case 6:if(l=$t,f=Fn,$t=null,hr(e,n,r),$t=l,Fn=f,$t!==null)if(Fn)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(r.stateNode)}catch(m){Ot(r,n,m)}else try{$t.removeChild(r.stateNode)}catch(m){Ot(r,n,m)}break;case 18:$t!==null&&(Fn?(e=$t,Bp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),ds(e)):Bp($t,r.stateNode));break;case 4:l=$t,f=Fn,$t=r.stateNode.containerInfo,Fn=!0,hr(e,n,r),$t=l,Fn=f;break;case 0:case 11:case 14:case 15:Ur(2,r,n),hn||Ur(4,r,n),hr(e,n,r);break;case 1:hn||(Fa(r,n),l=r.stateNode,typeof l.componentWillUnmount=="function"&&Um(r,n,l)),hr(e,n,r);break;case 21:hr(e,n,r);break;case 22:hn=(l=hn)||r.memoizedState!==null,hr(e,n,r),hn=l;break;default:hr(e,n,r)}}function Ym(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ds(e)}catch(r){Ot(n,n.return,r)}}}function Km(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ds(e)}catch(r){Ot(n,n.return,r)}}function Fv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Im),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Im),n;default:throw Error(s(435,e.tag))}}function $o(e,n){var r=Fv(e);n.forEach(function(l){if(!r.has(l)){r.add(l);var f=Jv.bind(null,e,l);l.then(f,f)}})}function In(e,n){var r=n.deletions;if(r!==null)for(var l=0;l<r.length;l++){var f=r[l],m=e,x=n,A=x;e:for(;A!==null;){switch(A.tag){case 27:if(qr(A.type)){$t=A.stateNode,Fn=!1;break e}break;case 5:$t=A.stateNode,Fn=!1;break e;case 3:case 4:$t=A.stateNode.containerInfo,Fn=!0;break e}A=A.return}if($t===null)throw Error(s(160));qm(m,x,f),$t=null,Fn=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Xm(n,e),n=n.sibling}var _a=null;function Xm(e,n){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:In(n,e),Gn(e),l&4&&(Ur(3,e,e.return),al(3,e),Ur(5,e,e.return));break;case 1:In(n,e),Gn(e),l&512&&(hn||r===null||Fa(r,r.return)),l&64&&fr&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?l:r.concat(l))));break;case 26:var f=_a;if(In(n,e),Gn(e),l&512&&(hn||r===null||Fa(r,r.return)),l&4){var m=r!==null?r.memoizedState:null;if(l=e.memoizedState,r===null)if(l===null)if(e.stateNode===null){e:{l=e.type,r=e.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Je]||m[be]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(l),f.head.insertBefore(m,f.querySelector("head > title"))),Cn(m,l,r),m[be]=e,Ke(m),l=m;break e;case"link":var x=Xp("link","href",f).get(l+(r.href||""));if(x){for(var A=0;A<x.length;A++)if(m=x[A],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(A,1);break t}}m=f.createElement(l),Cn(m,l,r),f.head.appendChild(m);break;case"meta":if(x=Xp("meta","content",f).get(l+(r.content||""))){for(A=0;A<x.length;A++)if(m=x[A],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(A,1);break t}}m=f.createElement(l),Cn(m,l,r),f.head.appendChild(m);break;default:throw Error(s(468,l))}m[be]=e,Ke(m),l=m}e.stateNode=l}else Qp(f,e.type,e.stateNode);else e.stateNode=Kp(f,l,e.memoizedProps);else m!==l?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,l===null?Qp(f,e.type,e.stateNode):Kp(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,r.memoizedProps)}break;case 27:In(n,e),Gn(e),l&512&&(hn||r===null||Fa(r,r.return)),r!==null&&l&4&&Nd(e,e.memoizedProps,r.memoizedProps);break;case 5:if(In(n,e),Gn(e),l&512&&(hn||r===null||Fa(r,r.return)),e.flags&32){f=e.stateNode;try{Xe(f,"")}catch(ke){Ot(e,e.return,ke)}}l&4&&e.stateNode!=null&&(f=e.memoizedProps,Nd(e,f,r!==null?r.memoizedProps:f)),l&1024&&(Dd=!0);break;case 6:if(In(n,e),Gn(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,r=e.stateNode;try{r.nodeValue=l}catch(ke){Ot(e,e.return,ke)}}break;case 3:if(oc=null,f=_a,_a=sc(n.containerInfo),In(n,e),_a=f,Gn(e),l&4&&r!==null&&r.memoizedState.isDehydrated)try{ds(n.containerInfo)}catch(ke){Ot(e,e.return,ke)}Dd&&(Dd=!1,Qm(e));break;case 4:l=_a,_a=sc(e.stateNode.containerInfo),In(n,e),Gn(e),_a=l;break;case 12:In(n,e),Gn(e);break;case 31:In(n,e),Gn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$o(e,l)));break;case 13:In(n,e),Gn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Yo=jt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$o(e,l)));break;case 22:f=e.memoizedState!==null;var D=r!==null&&r.memoizedState!==null,I=fr,W=hn;if(fr=I||f,hn=W||D,In(n,e),hn=W,fr=I,Gn(e),l&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(r===null||D||fr||hn||Ai(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){D=r=n;try{if(m=D.stateNode,f)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{A=D.stateNode;var se=D.memoizedProps.style,G=se!=null&&se.hasOwnProperty("display")?se.display:null;A.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ke){Ot(D,D.return,ke)}}}else if(n.tag===6){if(r===null){D=n;try{D.stateNode.nodeValue=f?"":D.memoizedProps}catch(ke){Ot(D,D.return,ke)}}}else if(n.tag===18){if(r===null){D=n;try{var K=D.stateNode;f?Up(K,!0):Up(D.stateNode,!1)}catch(ke){Ot(D,D.return,ke)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(r=l.retryQueue,r!==null&&(l.retryQueue=null,$o(e,r))));break;case 19:In(n,e),Gn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$o(e,l)));break;case 30:break;case 21:break;default:In(n,e),Gn(e)}}function Gn(e){var n=e.flags;if(n&2){try{for(var r,l=e.return;l!==null;){if(Pm(l)){r=l;break}l=l.return}if(r==null)throw Error(s(160));switch(r.tag){case 27:var f=r.stateNode,m=jd(e);Go(e,m,f);break;case 5:var x=r.stateNode;r.flags&32&&(Xe(x,""),r.flags&=-33);var A=jd(e);Go(e,A,x);break;case 3:case 4:var D=r.stateNode.containerInfo,I=jd(e);_d(e,I,D);break;default:throw Error(s(161))}}catch(W){Ot(e,e.return,W)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Qm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Qm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function mr(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Gm(e,n.alternate,n),n=n.sibling}function Ai(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ur(4,n,n.return),Ai(n);break;case 1:Fa(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&Um(n,n.return,r),Ai(n);break;case 27:hl(n.stateNode);case 26:case 5:Fa(n,n.return),Ai(n);break;case 22:n.memoizedState===null&&Ai(n);break;case 30:Ai(n);break;default:Ai(n)}e=e.sibling}}function pr(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,f=e,m=n,x=m.flags;switch(m.tag){case 0:case 11:case 15:pr(f,m,r),al(4,m);break;case 1:if(pr(f,m,r),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Ot(l,l.return,I)}if(l=m,f=l.updateQueue,f!==null){var A=l.stateNode;try{var D=f.shared.hiddenCallbacks;if(D!==null)for(f.shared.hiddenCallbacks=null,f=0;f<D.length;f++)Rh(D[f],A)}catch(I){Ot(l,l.return,I)}}r&&x&64&&Bm(m),rl(m,m.return);break;case 27:Fm(m);case 26:case 5:pr(f,m,r),r&&l===null&&x&4&&Zm(m),rl(m,m.return);break;case 12:pr(f,m,r);break;case 31:pr(f,m,r),r&&x&4&&Ym(f,m);break;case 13:pr(f,m,r),r&&x&4&&Km(f,m);break;case 22:m.memoizedState===null&&pr(f,m,r),rl(m,m.return);break;case 30:break;default:pr(f,m,r)}n=n.sibling}}function Od(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Is(r))}function Ld(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Is(e))}function Da(e,n,r,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Jm(e,n,r,l),n=n.sibling}function Jm(e,n,r,l){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Da(e,n,r,l),f&2048&&al(9,n);break;case 1:Da(e,n,r,l);break;case 3:Da(e,n,r,l),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Is(e)));break;case 12:if(f&2048){Da(e,n,r,l),e=n.stateNode;try{var m=n.memoizedProps,x=m.id,A=m.onPostCommit;typeof A=="function"&&A(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){Ot(n,n.return,D)}}else Da(e,n,r,l);break;case 31:Da(e,n,r,l);break;case 13:Da(e,n,r,l);break;case 23:break;case 22:m=n.stateNode,x=n.alternate,n.memoizedState!==null?m._visibility&2?Da(e,n,r,l):il(e,n):m._visibility&2?Da(e,n,r,l):(m._visibility|=2,es(e,n,r,l,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Od(x,n);break;case 24:Da(e,n,r,l),f&2048&&Ld(n.alternate,n);break;default:Da(e,n,r,l)}}function es(e,n,r,l,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=e,x=n,A=r,D=l,I=x.flags;switch(x.tag){case 0:case 11:case 15:es(m,x,A,D,f),al(8,x);break;case 23:break;case 22:var W=x.stateNode;x.memoizedState!==null?W._visibility&2?es(m,x,A,D,f):il(m,x):(W._visibility|=2,es(m,x,A,D,f)),f&&I&2048&&Od(x.alternate,x);break;case 24:es(m,x,A,D,f),f&&I&2048&&Ld(x.alternate,x);break;default:es(m,x,A,D,f)}n=n.sibling}}function il(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,l=n,f=l.flags;switch(l.tag){case 22:il(r,l),f&2048&&Od(l.alternate,l);break;case 24:il(r,l),f&2048&&Ld(l.alternate,l);break;default:il(r,l)}n=n.sibling}}var sl=8192;function ts(e,n,r){if(e.subtreeFlags&sl)for(e=e.child;e!==null;)Wm(e,n,r),e=e.sibling}function Wm(e,n,r){switch(e.tag){case 26:ts(e,n,r),e.flags&sl&&e.memoizedState!==null&&Nx(r,_a,e.memoizedState,e.memoizedProps);break;case 5:ts(e,n,r);break;case 3:case 4:var l=_a;_a=sc(e.stateNode.containerInfo),ts(e,n,r),_a=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=sl,sl=16777216,ts(e,n,r),sl=l):ts(e,n,r));break;default:ts(e,n,r)}}function ep(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ll(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];xn=l,np(l,e)}ep(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)tp(e),e=e.sibling}function tp(e){switch(e.tag){case 0:case 11:case 15:ll(e),e.flags&2048&&Ur(9,e,e.return);break;case 3:ll(e);break;case 12:ll(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,qo(e)):ll(e);break;default:ll(e)}}function qo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];xn=l,np(l,e)}ep(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ur(8,n,n.return),qo(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,qo(n));break;default:qo(n)}e=e.sibling}}function np(e,n){for(;xn!==null;){var r=xn;switch(r.tag){case 0:case 11:case 15:Ur(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var l=r.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Is(r.memoizedState.cache)}if(l=r.child,l!==null)l.return=r,xn=l;else e:for(r=e;xn!==null;){l=xn;var f=l.sibling,m=l.return;if($m(l),l===r){xn=null;break e}if(f!==null){f.return=m,xn=f;break e}xn=m}}}var Iv={getCacheForType:function(e){var n=Mn(un),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return Mn(un).controller.signal}},Gv=typeof WeakMap=="function"?WeakMap:Map,Ct=0,kt=null,dt=null,pt=0,Dt=0,ea=null,Zr=!1,ns=!1,Vd=!1,gr=0,Wt=0,Pr=0,Mi=0,Hd=0,ta=0,as=0,ol=null,$n=null,kd=!1,Yo=0,ap=0,Ko=1/0,Xo=null,Fr=null,gn=0,Ir=null,rs=null,yr=0,zd=0,Bd=null,rp=null,cl=0,Ud=null;function na(){return(Ct&2)!==0&&pt!==0?pt&-pt:H.T!==null?$d():ce()}function ip(){if(ta===0)if((pt&536870912)===0||yt){var e=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),ta=e}else ta=536870912;return e=Jn.current,e!==null&&(e.flags|=32),ta}function qn(e,n,r){(e===kt&&(Dt===2||Dt===9)||e.cancelPendingCommit!==null)&&(is(e,0),Gr(e,pt,ta,!1)),bt(e,r),((Ct&2)===0||e!==kt)&&(e===kt&&((Ct&2)===0&&(Mi|=r),Wt===4&&Gr(e,pt,ta,!1)),Ia(e))}function sp(e,n,r){if((Ct&6)!==0)throw Error(s(327));var l=!r&&(n&127)===0&&(n&e.expiredLanes)===0||J(e,n),f=l?Yv(e,n):Pd(e,n,!0),m=l;do{if(f===0){ns&&!l&&Gr(e,n,0,!1);break}else{if(r=e.current.alternate,m&&!$v(r)){f=Pd(e,n,!1),m=!1;continue}if(f===2){if(m=n,e.errorRecoveryDisabledLanes&m)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var A=e;f=ol;var D=A.current.memoizedState.isDehydrated;if(D&&(is(A,x).flags|=256),x=Pd(A,x,!1),x!==2){if(Vd&&!D){A.errorRecoveryDisabledLanes|=m,Mi|=m,f=4;break e}m=$n,$n=f,m!==null&&($n===null?$n=m:$n.push.apply($n,m))}f=x}if(m=!1,f!==2)continue}}if(f===1){is(e,0),Gr(e,n,0,!0);break}e:{switch(l=e,m=f,m){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n)break;case 6:Gr(l,n,ta,!Zr);break e;case 2:$n=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(f=Yo+300-jt(),10<f)){if(Gr(l,n,ta,!Zr),O(l,0,!0)!==0)break e;yr=n,l.timeoutHandle=kp(lp.bind(null,l,r,$n,Xo,kd,n,ta,Mi,as,Zr,m,"Throttled",-0,0),f);break e}lp(l,r,$n,Xo,kd,n,ta,Mi,as,Zr,m,null,-0,0)}}break}while(!0);Ia(e)}function lp(e,n,r,l,f,m,x,A,D,I,W,se,G,K){if(e.timeoutHandle=-1,se=n.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ve},Wm(n,m,se);var ke=(m&62914560)===m?Yo-jt():(m&4194048)===m?ap-jt():0;if(ke=jx(se,ke),ke!==null){yr=m,e.cancelPendingCommit=ke(pp.bind(null,e,n,m,r,l,f,x,A,D,W,se,null,G,K)),Gr(e,m,x,!I);return}}pp(e,n,m,r,l,f,x,A,D)}function $v(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var l=0;l<r.length;l++){var f=r[l],m=f.getSnapshot;f=f.value;try{if(!Xn(m(),f))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Gr(e,n,r,l){n&=~Hd,n&=~Mi,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var f=n;0<f;){var m=31-sn(f),x=1<<m;l[m]=-1,f&=~x}r!==0&&Te(e,r,n)}function Qo(){return(Ct&6)===0?(ul(0),!1):!0}function Zd(){if(dt!==null){if(Dt===0)var e=dt.return;else e=dt,sr=gi=null,ad(e),Ki=null,$s=0,e=dt;for(;e!==null;)zm(e.alternate,e),e=e.return;dt=null}}function is(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,fx(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),yr=0,Zd(),kt=e,dt=r=rr(e.current,null),pt=n,Dt=0,ea=null,Zr=!1,ns=J(e,n),Vd=!1,as=ta=Hd=Mi=Pr=Wt=0,$n=ol=null,kd=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var f=31-sn(l),m=1<<f;n|=e[f],l&=~m}return gr=n,bo(),r}function op(e,n){it=null,H.H=el,n===Yi||n===To?(n=Ah(),Dt=3):n===Gu?(n=Ah(),Dt=4):Dt=n===vd?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ea=n,dt===null&&(Wt=1,Uo(e,ha(n,e.current)))}function cp(){var e=Jn.current;return e===null?!0:(pt&4194048)===pt?ya===null:(pt&62914560)===pt||(pt&536870912)!==0?e===ya:!1}function up(){var e=H.H;return H.H=el,e===null?el:e}function dp(){var e=H.A;return H.A=Iv,e}function Jo(){Wt=4,Zr||(pt&4194048)!==pt&&Jn.current!==null||(ns=!0),(Pr&134217727)===0&&(Mi&134217727)===0||kt===null||Gr(kt,pt,ta,!1)}function Pd(e,n,r){var l=Ct;Ct|=2;var f=up(),m=dp();(kt!==e||pt!==n)&&(Xo=null,is(e,n)),n=!1;var x=Wt;e:do try{if(Dt!==0&&dt!==null){var A=dt,D=ea;switch(Dt){case 8:Zd(),x=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(n=!0);var I=Dt;if(Dt=0,ea=null,ss(e,A,D,I),r&&ns){x=0;break e}break;default:I=Dt,Dt=0,ea=null,ss(e,A,D,I)}}qv(),x=Wt;break}catch(W){op(e,W)}while(!0);return n&&e.shellSuspendCounter++,sr=gi=null,Ct=l,H.H=f,H.A=m,dt===null&&(kt=null,pt=0,bo()),x}function qv(){for(;dt!==null;)fp(dt)}function Yv(e,n){var r=Ct;Ct|=2;var l=up(),f=dp();kt!==e||pt!==n?(Xo=null,Ko=jt()+500,is(e,n)):ns=J(e,n);e:do try{if(Dt!==0&&dt!==null){n=dt;var m=ea;t:switch(Dt){case 1:Dt=0,ea=null,ss(e,n,m,1);break;case 2:case 9:if(Sh(m)){Dt=0,ea=null,hp(n);break}n=function(){Dt!==2&&Dt!==9||kt!==e||(Dt=7),Ia(e)},m.then(n,n);break e;case 3:Dt=7;break e;case 4:Dt=5;break e;case 7:Sh(m)?(Dt=0,ea=null,hp(n)):(Dt=0,ea=null,ss(e,n,m,7));break;case 5:var x=null;switch(dt.tag){case 26:x=dt.memoizedState;case 5:case 27:var A=dt;if(x?Jp(x):A.stateNode.complete){Dt=0,ea=null;var D=A.sibling;if(D!==null)dt=D;else{var I=A.return;I!==null?(dt=I,Wo(I)):dt=null}break t}}Dt=0,ea=null,ss(e,n,m,5);break;case 6:Dt=0,ea=null,ss(e,n,m,6);break;case 8:Zd(),Wt=6;break e;default:throw Error(s(462))}}Kv();break}catch(W){op(e,W)}while(!0);return sr=gi=null,H.H=l,H.A=f,Ct=r,dt!==null?0:(kt=null,pt=0,bo(),Wt)}function Kv(){for(;dt!==null&&!Ba();)fp(dt)}function fp(e){var n=Hm(e.alternate,e,gr);e.memoizedProps=e.pendingProps,n===null?Wo(e):dt=n}function hp(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=jm(r,n,n.pendingProps,n.type,void 0,pt);break;case 11:n=jm(r,n,n.pendingProps,n.type.render,n.ref,pt);break;case 5:ad(n);default:zm(r,n),n=dt=dh(n,gr),n=Hm(r,n,gr)}e.memoizedProps=e.pendingProps,n===null?Wo(e):dt=n}function ss(e,n,r,l){sr=gi=null,ad(n),Ki=null,$s=0;var f=n.return;try{if(kv(e,f,n,r,pt)){Wt=1,Uo(e,ha(r,e.current)),dt=null;return}}catch(m){if(f!==null)throw dt=f,m;Wt=1,Uo(e,ha(r,e.current)),dt=null;return}n.flags&32768?(yt||l===1?e=!0:ns||(pt&536870912)!==0?e=!1:(Zr=e=!0,(l===2||l===9||l===3||l===6)&&(l=Jn.current,l!==null&&l.tag===13&&(l.flags|=16384))),mp(n,e)):Wo(n)}function Wo(e){var n=e;do{if((n.flags&32768)!==0){mp(n,Zr);return}e=n.return;var r=Uv(n.alternate,n,gr);if(r!==null){dt=r;return}if(n=n.sibling,n!==null){dt=n;return}dt=n=e}while(n!==null);Wt===0&&(Wt=5)}function mp(e,n){do{var r=Zv(e.alternate,e);if(r!==null){r.flags&=32767,dt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){dt=e;return}dt=e=r}while(e!==null);Wt=6,dt=null}function pp(e,n,r,l,f,m,x,A,D){e.cancelPendingCommit=null;do ec();while(gn!==0);if((Ct&6)!==0)throw Error(s(327));if(n!==null){if(n===e.current)throw Error(s(177));if(m=n.lanes|n.childLanes,m|=ju,je(e,r,m,x,A,D),e===kt&&(dt=kt=null,pt=0),rs=n,Ir=e,yr=r,zd=m,Bd=f,rp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wv(vn,function(){return xp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=H.T,H.T=null,f=X.p,X.p=2,x=Ct,Ct|=4;try{Pv(e,n,r)}finally{Ct=x,X.p=f,H.T=l}}gn=1,gp(),yp(),bp()}}function gp(){if(gn===1){gn=0;var e=Ir,n=rs,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=H.T,H.T=null;var l=X.p;X.p=2;var f=Ct;Ct|=4;try{Xm(n,e);var m=ef,x=nh(e.containerInfo),A=m.focusedElem,D=m.selectionRange;if(x!==A&&A&&A.ownerDocument&&th(A.ownerDocument.documentElement,A)){if(D!==null&&Mu(A)){var I=D.start,W=D.end;if(W===void 0&&(W=I),"selectionStart"in A)A.selectionStart=I,A.selectionEnd=Math.min(W,A.value.length);else{var se=A.ownerDocument||document,G=se&&se.defaultView||window;if(G.getSelection){var K=G.getSelection(),ke=A.textContent.length,Ye=Math.min(D.start,ke),Ht=D.end===void 0?Ye:Math.min(D.end,ke);!K.extend&&Ye>Ht&&(x=Ht,Ht=Ye,Ye=x);var Z=eh(A,Ye),z=eh(A,Ht);if(Z&&z&&(K.rangeCount!==1||K.anchorNode!==Z.node||K.anchorOffset!==Z.offset||K.focusNode!==z.node||K.focusOffset!==z.offset)){var F=se.createRange();F.setStart(Z.node,Z.offset),K.removeAllRanges(),Ye>Ht?(K.addRange(F),K.extend(z.node,z.offset)):(F.setEnd(z.node,z.offset),K.addRange(F))}}}}for(se=[],K=A;K=K.parentNode;)K.nodeType===1&&se.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<se.length;A++){var te=se[A];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}fc=!!Wd,ef=Wd=null}finally{Ct=f,X.p=l,H.T=r}}e.current=n,gn=2}}function yp(){if(gn===2){gn=0;var e=Ir,n=rs,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=H.T,H.T=null;var l=X.p;X.p=2;var f=Ct;Ct|=4;try{Gm(e,n.alternate,n)}finally{Ct=f,X.p=l,H.T=r}}gn=3}}function bp(){if(gn===4||gn===3){gn=0,_n();var e=Ir,n=rs,r=yr,l=rp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?gn=5:(gn=0,rs=Ir=null,vp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Fr=null),P(r),n=n.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(kn,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=H.T,f=X.p,X.p=2,H.T=null;try{for(var m=e.onRecoverableError,x=0;x<l.length;x++){var A=l[x];m(A.value,{componentStack:A.stack})}}finally{H.T=n,X.p=f}}(yr&3)!==0&&ec(),Ia(e),f=e.pendingLanes,(r&261930)!==0&&(f&42)!==0?e===Ud?cl++:(cl=0,Ud=e):cl=0,ul(0)}}function vp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Is(n)))}function ec(){return gp(),yp(),bp(),xp()}function xp(){if(gn!==5)return!1;var e=Ir,n=zd;zd=0;var r=P(yr),l=H.T,f=X.p;try{X.p=32>r?32:r,H.T=null,r=Bd,Bd=null;var m=Ir,x=yr;if(gn=0,rs=Ir=null,yr=0,(Ct&6)!==0)throw Error(s(331));var A=Ct;if(Ct|=4,tp(m.current),Jm(m,m.current,x,r),Ct=A,ul(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(kn,m)}catch{}return!0}finally{X.p=f,H.T=l,vp(e,n)}}function Ep(e,n,r){n=ha(r,n),n=bd(e.stateNode,n,2),e=kr(e,n,2),e!==null&&(bt(e,2),Ia(e))}function Ot(e,n,r){if(e.tag===3)Ep(e,e,r);else for(;n!==null;){if(n.tag===3){Ep(n,e,r);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Fr===null||!Fr.has(l))){e=ha(r,e),r=Sm(2),l=kr(n,r,2),l!==null&&(wm(r,l,n,e),bt(l,2),Ia(l));break}}n=n.return}}function Fd(e,n,r){var l=e.pingCache;if(l===null){l=e.pingCache=new Gv;var f=new Set;l.set(n,f)}else f=l.get(n),f===void 0&&(f=new Set,l.set(n,f));f.has(r)||(Vd=!0,f.add(r),e=Xv.bind(null,e,n,r),n.then(e,e))}function Xv(e,n,r){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,kt===e&&(pt&r)===r&&(Wt===4||Wt===3&&(pt&62914560)===pt&&300>jt()-Yo?(Ct&2)===0&&is(e,0):Hd|=r,as===pt&&(as=0)),Ia(e)}function Sp(e,n){n===0&&(n=qe()),e=hi(e,n),e!==null&&(bt(e,n),Ia(e))}function Qv(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Sp(e,r)}function Jv(e,n){var r=0;switch(e.tag){case 31:case 13:var l=e.stateNode,f=e.memoizedState;f!==null&&(r=f.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(n),Sp(e,r)}function Wv(e,n){return Kt(e,n)}var tc=null,ls=null,Id=!1,nc=!1,Gd=!1,$r=0;function Ia(e){e!==ls&&e.next===null&&(ls===null?tc=ls=e:ls=ls.next=e),nc=!0,Id||(Id=!0,tx())}function ul(e,n){if(!Gd&&nc){Gd=!0;do for(var r=!1,l=tc;l!==null;){if(e!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var x=l.suspendedLanes,A=l.pingedLanes;m=(1<<31-sn(42|e)+1)-1,m&=f&~(x&~A),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Tp(l,m))}else m=pt,m=O(l,l===kt?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||J(l,m)||(r=!0,Tp(l,m));l=l.next}while(r);Gd=!1}}function ex(){wp()}function wp(){nc=Id=!1;var e=0;$r!==0&&dx()&&(e=$r);for(var n=jt(),r=null,l=tc;l!==null;){var f=l.next,m=Ap(l,n);m===0?(l.next=null,r===null?tc=f:r.next=f,f===null&&(ls=r)):(r=l,(e!==0||(m&3)!==0)&&(nc=!0)),l=f}gn!==0&&gn!==5||ul(e),$r!==0&&($r=0)}function Ap(e,n){for(var r=e.suspendedLanes,l=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var x=31-sn(m),A=1<<x,D=f[x];D===-1?((A&r)===0||(A&l)!==0)&&(f[x]=Ee(A,n)):D<=n&&(e.expiredLanes|=A),m&=~A}if(n=kt,r=pt,r=O(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,r===0||e===n&&(Dt===2||Dt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&sa(l),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||J(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(l!==null&&sa(l),P(r)){case 2:case 8:r=Dn;break;case 32:r=vn;break;case 268435456:r=Sn;break;default:r=vn}return l=Mp.bind(null,e),r=Kt(r,l),e.callbackPriority=n,e.callbackNode=r,n}return l!==null&&l!==null&&sa(l),e.callbackPriority=2,e.callbackNode=null,2}function Mp(e,n){if(gn!==0&&gn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ec()&&e.callbackNode!==r)return null;var l=pt;return l=O(e,e===kt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(sp(e,l,n),Ap(e,jt()),e.callbackNode!=null&&e.callbackNode===r?Mp.bind(null,e):null)}function Tp(e,n){if(ec())return null;sp(e,n,!0)}function tx(){hx(function(){(Ct&6)!==0?Kt(bn,ex):wp()})}function $d(){if($r===0){var e=$i;e===0&&(e=Yn,Yn<<=1,(Yn&261888)===0&&(Yn=256)),$r=e}return $r}function Cp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Nr(""+e)}function Rp(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function nx(e,n,r,l,f){if(n==="submit"&&r&&r.stateNode===f){var m=Cp((f[De]||null).action),x=l.submitter;x&&(n=(n=x[De]||null)?Cp(n.formAction):x.getAttribute("formAction"),n!==null&&(m=n,x=null));var A=new mo("action","action",null,l,f);e.push({event:A,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($r!==0){var D=x?Rp(f,x):new FormData(f);fd(r,{pending:!0,data:D,method:f.method,action:m},null,D)}}else typeof m=="function"&&(A.preventDefault(),D=x?Rp(f,x):new FormData(f),fd(r,{pending:!0,data:D,method:f.method,action:m},m,D))},currentTarget:f}]})}}for(var qd=0;qd<Nu.length;qd++){var Yd=Nu[qd],ax=Yd.toLowerCase(),rx=Yd[0].toUpperCase()+Yd.slice(1);ja(ax,"on"+rx)}ja(ih,"onAnimationEnd"),ja(sh,"onAnimationIteration"),ja(lh,"onAnimationStart"),ja("dblclick","onDoubleClick"),ja("focusin","onFocus"),ja("focusout","onBlur"),ja(xv,"onTransitionRun"),ja(Ev,"onTransitionStart"),ja(Sv,"onTransitionCancel"),ja(oh,"onTransitionEnd"),re("onMouseEnter",["mouseout","mouseover"]),re("onMouseLeave",["mouseout","mouseover"]),re("onPointerEnter",["pointerout","pointerover"]),re("onPointerLeave",["pointerout","pointerover"]),St("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),St("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),St("onBeforeInput",["compositionend","keypress","textInput","paste"]),St("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dl="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(" "),ix=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dl));function Np(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var l=e[r],f=l.event;l=l.listeners;e:{var m=void 0;if(n)for(var x=l.length-1;0<=x;x--){var A=l[x],D=A.instance,I=A.currentTarget;if(A=A.listener,D!==m&&f.isPropagationStopped())break e;m=A,f.currentTarget=I;try{m(f)}catch(W){yo(W)}f.currentTarget=null,m=D}else for(x=0;x<l.length;x++){if(A=l[x],D=A.instance,I=A.currentTarget,A=A.listener,D!==m&&f.isPropagationStopped())break e;m=A,f.currentTarget=I;try{m(f)}catch(W){yo(W)}f.currentTarget=null,m=D}}}}function ft(e,n){var r=n[we];r===void 0&&(r=n[we]=new Set);var l=e+"__bubble";r.has(l)||(jp(n,e,2,!1),r.add(l))}function Kd(e,n,r){var l=0;n&&(l|=4),jp(r,e,l,n)}var ac="_reactListening"+Math.random().toString(36).slice(2);function Xd(e){if(!e[ac]){e[ac]=!0,ht.forEach(function(r){r!=="selectionchange"&&(ix.has(r)||Kd(r,!1,e),Kd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ac]||(n[ac]=!0,Kd("selectionchange",!1,n))}}function jp(e,n,r,l){switch(i2(n)){case 2:var f=Ox;break;case 8:f=Lx;break;default:f=ff}r=f.bind(null,n,r,e),f=void 0,!gu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),l?f!==void 0?e.addEventListener(n,r,{capture:!0,passive:f}):e.addEventListener(n,r,!0):f!==void 0?e.addEventListener(n,r,{passive:f}):e.addEventListener(n,r,!1)}function Qd(e,n,r,l,f){var m=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var A=l.stateNode.containerInfo;if(A===f)break;if(x===4)for(x=l.return;x!==null;){var D=x.tag;if((D===3||D===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;A!==null;){if(x=k(A),x===null)return;if(D=x.tag,D===5||D===6||D===26||D===27){l=m=x;continue e}A=A.parentNode}}l=l.return}co(function(){var I=m,W=rt(r),se=[];e:{var G=ch.get(e);if(G!==void 0){var K=mo,ke=e;switch(e){case"keypress":if(fo(r)===0)break e;case"keydown":case"keyup":K=Jb;break;case"focusin":ke="focus",K=xu;break;case"focusout":ke="blur",K=xu;break;case"beforeblur":case"afterblur":K=xu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=z1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Ub;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=tv;break;case ih:case sh:case lh:K=Fb;break;case oh:K=av;break;case"scroll":case"scrollend":K=zb;break;case"wheel":K=iv;break;case"copy":case"cut":case"paste":K=Gb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=U1;break;case"toggle":case"beforetoggle":K=lv}var Ye=(n&4)!==0,Ht=!Ye&&(e==="scroll"||e==="scrollend"),Z=Ye?G!==null?G+"Capture":null:G;Ye=[];for(var z=I,F;z!==null;){var te=z;if(F=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||F===null||Z===null||(te=Os(z,Z),te!=null&&Ye.push(fl(z,te,F))),Ht)break;z=z.return}0<Ye.length&&(G=new K(G,ke,null,r,W),se.push({event:G,listeners:Ye}))}}if((n&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",G&&r!==Ue&&(ke=r.relatedTarget||r.fromElement)&&(k(ke)||ke[Re]))break e;if((K||G)&&(G=W.window===W?W:(G=W.ownerDocument)?G.defaultView||G.parentWindow:window,K?(ke=r.relatedTarget||r.toElement,K=I,ke=ke?k(ke):null,ke!==null&&(Ht=c(ke),Ye=ke.tag,ke!==Ht||Ye!==5&&Ye!==27&&Ye!==6)&&(ke=null)):(K=null,ke=I),K!==ke)){if(Ye=z1,te="onMouseLeave",Z="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Ye=U1,te="onPointerLeave",Z="onPointerEnter",z="pointer"),Ht=K==null?G:Ce(K),F=ke==null?G:Ce(ke),G=new Ye(te,z+"leave",K,r,W),G.target=Ht,G.relatedTarget=F,te=null,k(W)===I&&(Ye=new Ye(Z,z+"enter",ke,r,W),Ye.target=F,Ye.relatedTarget=Ht,te=Ye),Ht=te,K&&ke)t:{for(Ye=sx,Z=K,z=ke,F=0,te=Z;te;te=Ye(te))F++;te=0;for(var Ge=z;Ge;Ge=Ye(Ge))te++;for(;0<F-te;)Z=Ye(Z),F--;for(;0<te-F;)z=Ye(z),te--;for(;F--;){if(Z===z||z!==null&&Z===z.alternate){Ye=Z;break t}Z=Ye(Z),z=Ye(z)}Ye=null}else Ye=null;K!==null&&_p(se,G,K,Ye,!1),ke!==null&&Ht!==null&&_p(se,Ht,ke,Ye,!0)}}e:{if(G=I?Ce(I):window,K=G.nodeName&&G.nodeName.toLowerCase(),K==="select"||K==="input"&&G.type==="file")var At=Y1;else if($1(G))if(K1)At=yv;else{At=pv;var Ze=mv}else K=G.nodeName,!K||K.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?I&&Rr(I.elementType)&&(At=Y1):At=gv;if(At&&(At=At(e,I))){q1(se,At,r,W);break e}Ze&&Ze(e,G,I),e==="focusout"&&I&&G.type==="number"&&I.memoizedProps.value!=null&&Tr(G,"number",G.value)}switch(Ze=I?Ce(I):window,e){case"focusin":($1(Ze)||Ze.contentEditable==="true")&&(zi=Ze,Tu=I,Zs=null);break;case"focusout":Zs=Tu=zi=null;break;case"mousedown":Cu=!0;break;case"contextmenu":case"mouseup":case"dragend":Cu=!1,ah(se,r,W);break;case"selectionchange":if(vv)break;case"keydown":case"keyup":ah(se,r,W)}var st;if(Su)e:{switch(e){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else ki?I1(e,r)&&(gt="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(gt="onCompositionStart");gt&&(Z1&&r.locale!=="ko"&&(ki||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&ki&&(st=H1()):(jr=W,yu="value"in jr?jr.value:jr.textContent,ki=!0)),Ze=rc(I,gt),0<Ze.length&&(gt=new B1(gt,e,null,r,W),se.push({event:gt,listeners:Ze}),st?gt.data=st:(st=G1(r),st!==null&&(gt.data=st)))),(st=cv?uv(e,r):dv(e,r))&&(gt=rc(I,"onBeforeInput"),0<gt.length&&(Ze=new B1("onBeforeInput","beforeinput",null,r,W),se.push({event:Ze,listeners:gt}),Ze.data=st)),nx(se,e,I,r,W)}Np(se,n)})}function fl(e,n,r){return{instance:e,listener:n,currentTarget:r}}function rc(e,n){for(var r=n+"Capture",l=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Os(e,r),f!=null&&l.unshift(fl(e,f,m)),f=Os(e,n),f!=null&&l.push(fl(e,f,m))),e.tag===3)return l;e=e.return}return[]}function sx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _p(e,n,r,l,f){for(var m=n._reactName,x=[];r!==null&&r!==l;){var A=r,D=A.alternate,I=A.stateNode;if(A=A.tag,D!==null&&D===l)break;A!==5&&A!==26&&A!==27||I===null||(D=I,f?(I=Os(r,m),I!=null&&x.unshift(fl(r,I,D))):f||(I=Os(r,m),I!=null&&x.push(fl(r,I,D)))),r=r.return}x.length!==0&&e.push({event:n,listeners:x})}var lx=/\r\n?/g,ox=/\u0000|\uFFFD/g;function Dp(e){return(typeof e=="string"?e:""+e).replace(lx,`
|
|
49
|
+
`).replace(ox,"")}function Op(e,n){return n=Dp(n),Dp(e)===n}function Vt(e,n,r,l,f,m){switch(r){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||Xe(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&Xe(e,""+l);break;case"className":We(e,"class",l);break;case"tabIndex":We(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":We(e,r,l);break;case"style":_t(e,l,m);break;case"data":if(n!=="object"){We(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(r);break}l=Nr(""+l),e.setAttribute(r,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(r,"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}else typeof m=="function"&&(r==="formAction"?(n!=="input"&&Vt(e,n,"name",f.name,f,null),Vt(e,n,"formEncType",f.formEncType,f,null),Vt(e,n,"formMethod",f.formMethod,f,null),Vt(e,n,"formTarget",f.formTarget,f,null)):(Vt(e,n,"encType",f.encType,f,null),Vt(e,n,"method",f.method,f,null),Vt(e,n,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(r);break}l=Nr(""+l),e.setAttribute(r,l);break;case"onClick":l!=null&&(e.onclick=ve);break;case"onScroll":l!=null&&ft("scroll",e);break;case"onScrollEnd":l!=null&&ft("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(r=l.__html,r!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}r=Nr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(r,""+l):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":l===!0?e.setAttribute(r,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(r,l):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(r,l):e.removeAttribute(r);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(r):e.setAttribute(r,l);break;case"popover":ft("beforetoggle",e),ft("toggle",e),He(e,"popover",l);break;case"xlinkActuate":wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":wt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":wt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":wt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":wt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":He(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=nr.get(r)||r,He(e,r,l))}}function Jd(e,n,r,l,f,m){switch(r){case"style":_t(e,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(r=l.__html,r!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"children":typeof l=="string"?Xe(e,l):(typeof l=="number"||typeof l=="bigint")&&Xe(e,""+l);break;case"onScroll":l!=null&&ft("scroll",e);break;case"onScrollEnd":l!=null&&ft("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ve);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!tt.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),n=r.slice(2,f?r.length-7:void 0),m=e[De]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(n,m,f),typeof l=="function")){typeof m!="function"&&m!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,l,f);break e}r in e?e[r]=l:l===!0?e.setAttribute(r,""):He(e,r,l)}}}function Cn(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ft("error",e),ft("load",e);var l=!1,f=!1,m;for(m in r)if(r.hasOwnProperty(m)){var x=r[m];if(x!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Vt(e,n,m,x,r,null)}}f&&Vt(e,n,"srcSet",r.srcSet,r,null),l&&Vt(e,n,"src",r.src,r,null);return;case"input":ft("invalid",e);var A=m=x=f=null,D=null,I=null;for(l in r)if(r.hasOwnProperty(l)){var W=r[l];if(W!=null)switch(l){case"name":f=W;break;case"type":x=W;break;case"checked":D=W;break;case"defaultChecked":I=W;break;case"value":m=W;break;case"defaultValue":A=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(s(137,n));break;default:Vt(e,n,l,W,r,null)}}wn(e,m,A,D,I,x,f,!1);return;case"select":ft("invalid",e),l=x=m=null;for(f in r)if(r.hasOwnProperty(f)&&(A=r[f],A!=null))switch(f){case"value":m=A;break;case"defaultValue":x=A;break;case"multiple":l=A;default:Vt(e,n,f,A,r,null)}n=m,r=x,e.multiple=!!l,n!=null?Gt(e,!!l,n,!1):r!=null&&Gt(e,!!l,r,!0);return;case"textarea":ft("invalid",e),m=f=l=null;for(x in r)if(r.hasOwnProperty(x)&&(A=r[x],A!=null))switch(x){case"value":l=A;break;case"defaultValue":f=A;break;case"children":m=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(91));break;default:Vt(e,n,x,A,r,null)}Hi(e,l,f,m);return;case"option":for(D in r)if(r.hasOwnProperty(D)&&(l=r[D],l!=null))switch(D){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Vt(e,n,D,l,r,null)}return;case"dialog":ft("beforetoggle",e),ft("toggle",e),ft("cancel",e),ft("close",e);break;case"iframe":case"object":ft("load",e);break;case"video":case"audio":for(l=0;l<dl.length;l++)ft(dl[l],e);break;case"image":ft("error",e),ft("load",e);break;case"details":ft("toggle",e);break;case"embed":case"source":case"link":ft("error",e),ft("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(I in r)if(r.hasOwnProperty(I)&&(l=r[I],l!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Vt(e,n,I,l,r,null)}return;default:if(Rr(n)){for(W in r)r.hasOwnProperty(W)&&(l=r[W],l!==void 0&&Jd(e,n,W,l,r,void 0));return}}for(A in r)r.hasOwnProperty(A)&&(l=r[A],l!=null&&Vt(e,n,A,l,r,null))}function cx(e,n,r,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,x=null,A=null,D=null,I=null,W=null;for(K in r){var se=r[K];if(r.hasOwnProperty(K)&&se!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":D=se;default:l.hasOwnProperty(K)||Vt(e,n,K,null,l,se)}}for(var G in l){var K=l[G];if(se=r[G],l.hasOwnProperty(G)&&(K!=null||se!=null))switch(G){case"type":m=K;break;case"name":f=K;break;case"checked":I=K;break;case"defaultChecked":W=K;break;case"value":x=K;break;case"defaultValue":A=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,n));break;default:K!==se&&Vt(e,n,G,K,l,se)}}Na(e,x,A,D,I,W,m,f);return;case"select":K=x=A=G=null;for(m in r)if(D=r[m],r.hasOwnProperty(m)&&D!=null)switch(m){case"value":break;case"multiple":K=D;default:l.hasOwnProperty(m)||Vt(e,n,m,null,l,D)}for(f in l)if(m=l[f],D=r[f],l.hasOwnProperty(f)&&(m!=null||D!=null))switch(f){case"value":G=m;break;case"defaultValue":A=m;break;case"multiple":x=m;default:m!==D&&Vt(e,n,f,m,l,D)}n=A,r=x,l=K,G!=null?Gt(e,!!r,G,!1):!!l!=!!r&&(n!=null?Gt(e,!!r,n,!0):Gt(e,!!r,r?[]:"",!1));return;case"textarea":K=G=null;for(A in r)if(f=r[A],r.hasOwnProperty(A)&&f!=null&&!l.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Vt(e,n,A,null,l,f)}for(x in l)if(f=l[x],m=r[x],l.hasOwnProperty(x)&&(f!=null||m!=null))switch(x){case"value":G=f;break;case"defaultValue":K=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==m&&Vt(e,n,x,f,l,m)}Cr(e,G,K);return;case"option":for(var ke in r)if(G=r[ke],r.hasOwnProperty(ke)&&G!=null&&!l.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:Vt(e,n,ke,null,l,G)}for(D in l)if(G=l[D],K=r[D],l.hasOwnProperty(D)&&G!==K&&(G!=null||K!=null))switch(D){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Vt(e,n,D,G,l,K)}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 Ye in r)G=r[Ye],r.hasOwnProperty(Ye)&&G!=null&&!l.hasOwnProperty(Ye)&&Vt(e,n,Ye,null,l,G);for(I in l)if(G=l[I],K=r[I],l.hasOwnProperty(I)&&G!==K&&(G!=null||K!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,n));break;default:Vt(e,n,I,G,l,K)}return;default:if(Rr(n)){for(var Ht in r)G=r[Ht],r.hasOwnProperty(Ht)&&G!==void 0&&!l.hasOwnProperty(Ht)&&Jd(e,n,Ht,void 0,l,G);for(W in l)G=l[W],K=r[W],!l.hasOwnProperty(W)||G===K||G===void 0&&K===void 0||Jd(e,n,W,G,l,K);return}}for(var Z in r)G=r[Z],r.hasOwnProperty(Z)&&G!=null&&!l.hasOwnProperty(Z)&&Vt(e,n,Z,null,l,G);for(se in l)G=l[se],K=r[se],!l.hasOwnProperty(se)||G===K||G==null&&K==null||Vt(e,n,se,G,l,K)}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 ux(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),l=0;l<r.length;l++){var f=r[l],m=f.transferSize,x=f.initiatorType,A=f.duration;if(m&&A&&Lp(x)){for(x=0,A=f.responseEnd,l+=1;l<r.length;l++){var D=r[l],I=D.startTime;if(I>A)break;var W=D.transferSize,se=D.initiatorType;W&&Lp(se)&&(D=D.responseEnd,x+=W*(D<A?1:(A-I)/(D-I)))}if(--l,n+=8*(m+x)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Wd=null,ef=null;function ic(e){return e.nodeType===9?e:e.ownerDocument}function Vp(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,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function tf(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var nf=null;function dx(){var e=window.event;return e&&e.type==="popstate"?e===nf?!1:(nf=e,!0):(nf=null,!1)}var kp=typeof setTimeout=="function"?setTimeout:void 0,fx=typeof clearTimeout=="function"?clearTimeout:void 0,zp=typeof Promise=="function"?Promise:void 0,hx=typeof queueMicrotask=="function"?queueMicrotask:typeof zp<"u"?function(e){return zp.resolve(null).then(e).catch(mx)}:kp;function mx(e){setTimeout(function(){throw e})}function qr(e){return e==="head"}function Bp(e,n){var r=n,l=0;do{var f=r.nextSibling;if(e.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(l===0){e.removeChild(f),ds(n);return}l--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")l++;else if(r==="html")hl(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,hl(r);for(var m=r.firstChild;m;){var x=m.nextSibling,A=m.nodeName;m[Je]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=x}}else r==="body"&&hl(e.ownerDocument.body);r=f}while(r);ds(n)}function Up(e,n){var r=e;e=0;do{var l=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=l}while(r)}function af(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":af(r),Et(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function px(e,n,r,l){for(;e.nodeType===1;){var f=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Je])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=ba(e.nextSibling),e===null)break}return null}function gx(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=ba(e.nextSibling),e===null))return null;return e}function Zp(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ba(e.nextSibling),e===null))return null;return e}function rf(e){return e.data==="$?"||e.data==="$~"}function sf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function yx(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var l=function(){n(),r.removeEventListener("DOMContentLoaded",l)};r.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ba(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var lf=null;function Pp(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return ba(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function Fp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function Ip(e,n,r){switch(n=ic(r),e){case"html":if(e=n.documentElement,!e)throw Error(s(452));return e;case"head":if(e=n.head,!e)throw Error(s(453));return e;case"body":if(e=n.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function hl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Et(e)}var va=new Map,Gp=new Set;function sc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var br=X.d;X.d={f:bx,r:vx,D:xx,C:Ex,L:Sx,m:wx,X:Mx,S:Ax,M:Tx};function bx(){var e=br.f(),n=Qo();return e||n}function vx(e){var n=ge(e);n!==null&&n.tag===5&&n.type==="form"?om(n):br.r(e)}var os=typeof document>"u"?null:document;function $p(e,n,r){var l=os;if(l&&typeof n=="string"&&n){var f=Qt(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),Gp.has(f)||(Gp.add(f),e={rel:e,crossOrigin:r,href:n},l.querySelector(f)===null&&(n=l.createElement("link"),Cn(n,"link",e),Ke(n),l.head.appendChild(n)))}}function xx(e){br.D(e),$p("dns-prefetch",e,null)}function Ex(e,n){br.C(e,n),$p("preconnect",e,n)}function Sx(e,n,r){br.L(e,n,r);var l=os;if(l&&e&&n){var f='link[rel="preload"][as="'+Qt(n)+'"]';n==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Qt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Qt(r.imageSizes)+'"]')):f+='[href="'+Qt(e)+'"]';var m=f;switch(n){case"style":m=cs(e);break;case"script":m=us(e)}va.has(m)||(e=v({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),va.set(m,e),l.querySelector(f)!==null||n==="style"&&l.querySelector(ml(m))||n==="script"&&l.querySelector(pl(m))||(n=l.createElement("link"),Cn(n,"link",e),Ke(n),l.head.appendChild(n)))}}function wx(e,n){br.m(e,n);var r=os;if(r&&e){var l=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Qt(l)+'"][href="'+Qt(e)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=us(e)}if(!va.has(m)&&(e=v({rel:"modulepreload",href:e},n),va.set(m,e),r.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(pl(m)))return}l=r.createElement("link"),Cn(l,"link",e),Ke(l),r.head.appendChild(l)}}}function Ax(e,n,r){br.S(e,n,r);var l=os;if(l&&e){var f=Me(l).hoistableStyles,m=cs(e);n=n||"default";var x=f.get(m);if(!x){var A={loading:0,preload:null};if(x=l.querySelector(ml(m)))A.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},r),(r=va.get(m))&&of(e,r);var D=x=l.createElement("link");Ke(D),Cn(D,"link",e),D._p=new Promise(function(I,W){D.onload=I,D.onerror=W}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,lc(x,n,l)}x={type:"stylesheet",instance:x,count:1,state:A},f.set(m,x)}}}function Mx(e,n){br.X(e,n);var r=os;if(r&&e){var l=Me(r).hoistableScripts,f=us(e),m=l.get(f);m||(m=r.querySelector(pl(f)),m||(e=v({src:e,async:!0},n),(n=va.get(f))&&cf(e,n),m=r.createElement("script"),Ke(m),Cn(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function Tx(e,n){br.M(e,n);var r=os;if(r&&e){var l=Me(r).hoistableScripts,f=us(e),m=l.get(f);m||(m=r.querySelector(pl(f)),m||(e=v({src:e,async:!0,type:"module"},n),(n=va.get(f))&&cf(e,n),m=r.createElement("script"),Ke(m),Cn(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function qp(e,n,r,l){var f=(f=Ne.current)?sc(f):null;if(!f)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=cs(r.href),r=Me(f).hoistableStyles,l=r.get(n),l||(l={type:"style",instance:null,count:0,state:null},r.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=cs(r.href);var m=Me(f).hoistableStyles,x=m.get(e);if(x||(f=f.ownerDocument||f,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,x),(m=f.querySelector(ml(e)))&&!m._p&&(x.instance=m,x.state.loading=5),va.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},va.set(e,r),m||Cx(f,e,r,x.state))),n&&l===null)throw Error(s(528,""));return x}if(n&&l!==null)throw Error(s(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=us(r),r=Me(f).hoistableScripts,l=r.get(n),l||(l={type:"script",instance:null,count:0,state:null},r.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function cs(e){return'href="'+Qt(e)+'"'}function ml(e){return'link[rel="stylesheet"]['+e+"]"}function Yp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Cx(e,n,r,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),Cn(n,"link",r),Ke(n),e.head.appendChild(n))}function us(e){return'[src="'+Qt(e)+'"]'}function pl(e){return"script[async]"+e}function Kp(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Qt(r.href)+'"]');if(l)return n.instance=l,Ke(l),l;var f=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ke(l),Cn(l,"style",f),lc(l,r.precedence,e),n.instance=l;case"stylesheet":f=cs(r.href);var m=e.querySelector(ml(f));if(m)return n.state.loading|=4,n.instance=m,Ke(m),m;l=Yp(r),(f=va.get(f))&&of(l,f),m=(e.ownerDocument||e).createElement("link"),Ke(m);var x=m;return x._p=new Promise(function(A,D){x.onload=A,x.onerror=D}),Cn(m,"link",l),n.state.loading|=4,lc(m,r.precedence,e),n.instance=m;case"script":return m=us(r.src),(f=e.querySelector(pl(m)))?(n.instance=f,Ke(f),f):(l=r,(f=va.get(m))&&(l=v({},r),cf(l,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ke(f),Cn(f,"link",l),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,lc(l,r.precedence,e));return n.instance}function lc(e,n,r){for(var l=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,x=0;x<l.length;x++){var A=l[x];if(A.dataset.precedence===n)m=A;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function of(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function cf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var oc=null;function Xp(e,n,r){if(oc===null){var l=new Map,f=oc=new Map;f.set(r,l)}else f=oc,l=f.get(r),l||(l=new Map,f.set(r,l));if(l.has(e))return l;for(l.set(e,null),r=r.getElementsByTagName(e),f=0;f<r.length;f++){var m=r[f];if(!(m[Je]||m[be]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(n)||"";x=e+x;var A=l.get(x);A?A.push(m):l.set(x,[m])}}return l}function Qp(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function Rx(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Jp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nx(e,n,r,l){if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=cs(l.href),m=n.querySelector(ml(f));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=cc.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=m,Ke(m);return}m=n.ownerDocument||n,l=Yp(l),(f=va.get(f))&&of(l,f),m=m.createElement("link"),Ke(m);var x=m;x._p=new Promise(function(A,D){x.onload=A,x.onerror=D}),Cn(m,"link",l),r.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=cc.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var uf=0;function jx(e,n){return e.stylesheets&&e.count===0&&dc(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var l=setTimeout(function(){if(e.stylesheets&&dc(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+n);0<e.imgBytes&&uf===0&&(uf=62500*ux());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dc(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>uf?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function cc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var uc=null;function dc(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,uc=new Map,n.forEach(_x,e),uc=null,cc.call(e))}function _x(e,n){if(!(n.state.loading&4)){var r=uc.get(e);if(r)var l=r.get(null);else{r=new Map,uc.set(e,r);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var x=f[m];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),l=x)}l&&r.set(null,l)}f=n.instance,x=f.getAttribute("data-precedence"),m=r.get(x)||l,m===l&&r.set(null,f),r.set(x,f),this.count++,l=cc.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var gl={$$typeof:L,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Dx(e,n,r,l,f,m,x,A,D){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=xt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xt(0),this.hiddenUpdates=xt(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Wp(e,n,r,l,f,m,x,A,D,I,W,se){return e=new Dx(e,n,r,x,D,I,W,se,A),n=1,m===!0&&(n|=24),m=Qn(3,null,null,n),e.current=m,m.stateNode=e,n=Pu(),n.refCount++,e.pooledCache=n,n.refCount++,m.memoizedState={element:l,isDehydrated:r,cache:n},$u(m),e}function e2(e){return e?(e=Zi,e):Zi}function t2(e,n,r,l,f,m){f=e2(f),l.context===null?l.context=f:l.pendingContext=f,l=Hr(n),l.payload={element:r},m=m===void 0?null:m,m!==null&&(l.callback=m),r=kr(e,l,n),r!==null&&(qn(r,e,n),Ys(r,e,n))}function n2(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function df(e,n){n2(e,n),(e=e.alternate)&&n2(e,n)}function a2(e){if(e.tag===13||e.tag===31){var n=hi(e,67108864);n!==null&&qn(n,e,67108864),df(e,67108864)}}function r2(e){if(e.tag===13||e.tag===31){var n=na();n=V(n);var r=hi(e,n);r!==null&&qn(r,e,n),df(e,n)}}var fc=!0;function Ox(e,n,r,l){var f=H.T;H.T=null;var m=X.p;try{X.p=2,ff(e,n,r,l)}finally{X.p=m,H.T=f}}function Lx(e,n,r,l){var f=H.T;H.T=null;var m=X.p;try{X.p=8,ff(e,n,r,l)}finally{X.p=m,H.T=f}}function ff(e,n,r,l){if(fc){var f=hf(l);if(f===null)Qd(e,n,l,hc,r),s2(e,l);else if(Hx(f,e,n,r,l))l.stopPropagation();else if(s2(e,l),n&4&&-1<Vx.indexOf(e)){for(;f!==null;){var m=ge(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=ln(m.pendingLanes);if(x!==0){var A=m;for(A.pendingLanes|=2,A.entangledLanes|=2;x;){var D=1<<31-sn(x);A.entanglements[1]|=D,x&=~D}Ia(m),(Ct&6)===0&&(Ko=jt()+500,ul(0))}}break;case 31:case 13:A=hi(m,2),A!==null&&qn(A,m,2),Qo(),df(m,2)}if(m=hf(l),m===null&&Qd(e,n,l,hc,r),m===f)break;f=m}f!==null&&l.stopPropagation()}else Qd(e,n,l,null,r)}}function hf(e){return e=rt(e),mf(e)}var hc=null;function mf(e){if(hc=null,e=k(e),e!==null){var n=c(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=u(n),e!==null)return e;e=null}else if(r===31){if(e=h(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return hc=e,null}function i2(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Hn()){case bn:return 2;case Dn:return 8;case vn:case En:return 32;case Sn:return 268435456;default:return 32}default:return 32}}var pf=!1,Yr=null,Kr=null,Xr=null,yl=new Map,bl=new Map,Qr=[],Vx="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 s2(e,n){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Kr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":yl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":bl.delete(n.pointerId)}}function vl(e,n,r,l,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:r,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},n!==null&&(n=ge(n),n!==null&&a2(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Hx(e,n,r,l,f){switch(n){case"focusin":return Yr=vl(Yr,e,n,r,l,f),!0;case"dragenter":return Kr=vl(Kr,e,n,r,l,f),!0;case"mouseover":return Xr=vl(Xr,e,n,r,l,f),!0;case"pointerover":var m=f.pointerId;return yl.set(m,vl(yl.get(m)||null,e,n,r,l,f)),!0;case"gotpointercapture":return m=f.pointerId,bl.set(m,vl(bl.get(m)||null,e,n,r,l,f)),!0}return!1}function l2(e){var n=k(e.target);if(n!==null){var r=c(n);if(r!==null){if(n=r.tag,n===13){if(n=u(r),n!==null){e.blockedOn=n,de(e.priority,function(){r2(r)});return}}else if(n===31){if(n=h(r),n!==null){e.blockedOn=n,de(e.priority,function(){r2(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=hf(e.nativeEvent);if(r===null){r=e.nativeEvent;var l=new r.constructor(r.type,r);Ue=l,r.target.dispatchEvent(l),Ue=null}else return n=ge(r),n!==null&&a2(n),e.blockedOn=r,!1;n.shift()}return!0}function o2(e,n,r){mc(e)&&r.delete(n)}function kx(){pf=!1,Yr!==null&&mc(Yr)&&(Yr=null),Kr!==null&&mc(Kr)&&(Kr=null),Xr!==null&&mc(Xr)&&(Xr=null),yl.forEach(o2),bl.forEach(o2)}function pc(e,n){e.blockedOn===n&&(e.blockedOn=null,pf||(pf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kx)))}var gc=null;function c2(e){gc!==e&&(gc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){gc===e&&(gc=null);for(var n=0;n<e.length;n+=3){var r=e[n],l=e[n+1],f=e[n+2];if(typeof l!="function"){if(mf(l||r)===null)continue;break}var m=ge(r);m!==null&&(e.splice(n,3),n-=3,fd(m,{pending:!0,data:f,method:r.method,action:l},l,f))}}))}function ds(e){function n(D){return pc(D,e)}Yr!==null&&pc(Yr,e),Kr!==null&&pc(Kr,e),Xr!==null&&pc(Xr,e),yl.forEach(n),bl.forEach(n);for(var r=0;r<Qr.length;r++){var l=Qr[r];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qr.length&&(r=Qr[0],r.blockedOn===null);)l2(r),r.blockedOn===null&&Qr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(l=0;l<r.length;l+=3){var f=r[l],m=r[l+1],x=f[De]||null;if(typeof m=="function")x||c2(r);else if(x){var A=null;if(m&&m.hasAttribute("formAction")){if(f=m,x=m[De]||null)A=x.formAction;else if(mf(f)!==null)continue}else A=x.action;typeof A=="function"?r[l+1]=A:(r.splice(l,3),l-=3),c2(r)}}}function u2(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(x){return f=x})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),l||setTimeout(r,20)}function r(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function gf(e){this._internalRoot=e}yc.prototype.render=gf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));var r=n.current,l=na();t2(r,l,e,n,null,null)},yc.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;t2(e.current,2,null,e,null,null),Qo(),n[Re]=null}};function yc(e){this._internalRoot=e}yc.prototype.unstable_scheduleHydration=function(e){if(e){var n=ce();e={blockedOn:null,target:e,priority:n};for(var r=0;r<Qr.length&&n!==0&&n<Qr[r].priority;r++);Qr.splice(r,0,e),r===0&&l2(e)}};var d2=a.version;if(d2!=="19.2.5")throw Error(s(527,d2,"19.2.5"));X.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var zx={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bc.isDisabled&&bc.supportsFiber)try{kn=bc.inject(zx),rn=bc}catch{}}return El.createRoot=function(e,n){if(!o(e))throw Error(s(299));var r=!1,l="",f=bm,m=vm,x=xm;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Wp(e,1,!1,null,null,r,l,null,f,m,x,u2),e[Re]=n.current,Xd(e),new gf(n)},El.hydrateRoot=function(e,n,r){if(!o(e))throw Error(s(299));var l=!1,f="",m=bm,x=vm,A=xm,D=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(A=r.onRecoverableError),r.formState!==void 0&&(D=r.formState)),n=Wp(e,1,!0,n,r??null,l,f,D,m,x,A,u2),n.context=e2(null),r=n.current,l=na(),l=V(l),f=Hr(l),f.callback=null,kr(r,f,l),r=l,n.current.lanes=r,bt(n,r),Ia(n),e[Re]=n.current,Xd(e),new yc(n)},El.version="19.2.5",El}var E2;function Kx(){if(E2)return vf.exports;E2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),vf.exports=Yx(),vf.exports}var Xx=Kx();/**
|
|
50
|
+
* react-router v7.14.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var n4=t=>{throw TypeError(t)},Qx=(t,a,i)=>a.has(t)||n4("Cannot "+i),wf=(t,a,i)=>(Qx(t,a,"read from private field"),i?i.call(t):a.get(t)),Jx=(t,a,i)=>a.has(t)?n4("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,i),S2="popstate";function w2(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function Wx(t={}){function a(s,o){var p;let c=(p=o.state)==null?void 0:p.masked,{pathname:u,search:h,hash:g}=c||s.location;return Pl("",{pathname:u,search:h,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function i(s,o){return typeof o=="string"?o:Xa(o)}return t3(a,i,null,t)}function ct(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function pn(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function e3(){return Math.random().toString(36).substring(2,10)}function A2(t,a){return{usr:t.state,key:t.key,idx:a,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Pl(t,a,i=null,s,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?Ja(a):a,state:i,key:a&&a.key||s||e3(),unstable_mask:o}}function Xa({pathname:t="/",search:a="",hash:i=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Ja(t){let a={};if(t){let i=t.indexOf("#");i>=0&&(a.hash=t.substring(i),t=t.substring(0,i));let s=t.indexOf("?");s>=0&&(a.search=t.substring(s),t=t.substring(0,s)),t&&(a.pathname=t)}return a}function t3(t,a,i,s={}){let{window:o=document.defaultView,v5Compat:c=!1}=s,u=o.history,h="POP",g=null,p=b();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function b(){return(u.state||{idx:null}).idx}function v(){h="POP";let M=b(),j=M==null?null:M-p;p=M,g&&g({action:h,location:T.location,delta:j})}function E(M,j){h="PUSH";let R=w2(M)?M:Pl(T.location,M,j);p=b()+1;let L=A2(R,p),B=T.createHref(R.unstable_mask||R);try{u.pushState(L,"",B)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;o.location.assign(B)}c&&g&&g({action:h,location:T.location,delta:1})}function S(M,j){h="REPLACE";let R=w2(M)?M:Pl(T.location,M,j);p=b();let L=A2(R,p),B=T.createHref(R.unstable_mask||R);u.replaceState(L,"",B),c&&g&&g({action:h,location:T.location,delta:0})}function w(M){return a4(M)}let T={get action(){return h},get location(){return t(o,u)},listen(M){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(S2,v),g=M,()=>{o.removeEventListener(S2,v),g=null}},createHref(M){return a(o,M)},createURL:w,encodeLocation(M){let j=w(M);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:E,replace:S,go(M){return u.go(M)}};return T}function a4(t,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ct(i,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:Xa(t);return s=s.replace(/ $/,"%20"),!a&&s.startsWith("//")&&(s=i+s),new URL(s,i)}var Ol,M2=class{constructor(t){if(Jx(this,Ol,new Map),t)for(let[a,i]of t)this.set(a,i)}get(t){if(wf(this,Ol).has(t))return wf(this,Ol).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,a){wf(this,Ol).set(t,a)}};Ol=new WeakMap;var n3=new Set(["lazy","caseSensitive","path","id","index","children"]);function a3(t){return n3.has(t)}var r3=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function i3(t){return r3.has(t)}function s3(t){return t.index===!0}function Fl(t,a,i=[],s={},o=!1){return t.map((c,u)=>{let h=[...i,String(u)],g=typeof c.id=="string"?c.id:h.join("-");if(ct(c.index!==!0||!c.children,"Cannot specify children on an index route"),ct(o||!s[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),s3(c)){let p={...c,id:g};return s[g]=T2(p,a(p)),p}else{let p={...c,id:g,children:void 0};return s[g]=T2(p,a(p)),c.children&&(p.children=Fl(c.children,a,h,s,o)),p}})}function T2(t,a){return Object.assign(t,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...t.lazy,...a.lazy}}:{}})}function ai(t,a,i="/"){return Ll(t,a,i,!1)}function Ll(t,a,i,s){let o=typeof a=="string"?Ja(a):a,c=Ma(o.pathname||"/",i);if(c==null)return null;let u=r4(t);o3(u);let h=null;for(let g=0;h==null&&g<u.length;++g){let p=v3(c);h=y3(u[g],p,s)}return h}function l3(t,a){let{route:i,pathname:s,params:o}=t;return{id:i.id,pathname:s,params:o,data:a[i.id],loaderData:a[i.id],handle:i.handle}}function r4(t,a=[],i=[],s="",o=!1){let c=(u,h,g=o,p)=>{let b={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:h,route:u};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&g)return;ct(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let v=wa([s,b.relativePath]),E=i.concat(b);u.children&&u.children.length>0&&(ct(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),r4(u.children,a,E,v,g)),!(u.path==null&&!u.index)&&a.push({path:v,score:p3(v,u.index),routesMeta:E})};return t.forEach((u,h)=>{var g;if(u.path===""||!((g=u.path)!=null&&g.includes("?")))c(u,h);else for(let p of i4(u.path))c(u,h,!0,p)}),a}function i4(t){let a=t.split("/");if(a.length===0)return[];let[i,...s]=a,o=i.endsWith("?"),c=i.replace(/\?$/,"");if(s.length===0)return o?[c,""]:[c];let u=i4(s.join("/")),h=[];return h.push(...u.map(g=>g===""?c:[c,g].join("/"))),o&&h.push(...u),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function o3(t){t.sort((a,i)=>a.score!==i.score?i.score-a.score:g3(a.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var c3=/^:[\w-]+$/,u3=3,d3=2,f3=1,h3=10,m3=-2,C2=t=>t==="*";function p3(t,a){let i=t.split("/"),s=i.length;return i.some(C2)&&(s+=m3),a&&(s+=d3),i.filter(o=>!C2(o)).reduce((o,c)=>o+(c3.test(c)?u3:c===""?f3:h3),s)}function g3(t,a){return t.length===a.length&&t.slice(0,-1).every((s,o)=>s===a[o])?t[t.length-1]-a[a.length-1]:0}function y3(t,a,i=!1){let{routesMeta:s}=t,o={},c="/",u=[];for(let h=0;h<s.length;++h){let g=s[h],p=h===s.length-1,b=c==="/"?a:a.slice(c.length)||"/",v=Ic({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},b),E=g.route;if(!v&&p&&i&&!s[s.length-1].route.index&&(v=Ic({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!v)return null;Object.assign(o,v.params),u.push({params:o,pathname:wa([c,v.pathname]),pathnameBase:S3(wa([c,v.pathnameBase])),route:E}),v.pathnameBase!=="/"&&(c=wa([c,v.pathnameBase]))}return u}function Ic(t,a){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,s]=b3(t.path,t.caseSensitive,t.end),o=a.match(i);if(!o)return null;let c=o[0],u=c.replace(/(.)\/+$/,"$1"),h=o.slice(1);return{params:s.reduce((p,{paramName:b,isOptional:v},E)=>{if(b==="*"){let w=h[E]||"";u=c.slice(0,c.length-w.length).replace(/(.)\/+$/,"$1")}const S=h[E];return v&&!S?p[b]=void 0:p[b]=(S||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:u,pattern:t}}function b3(t,a=!1,i=!0){pn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,h,g,p,b)=>{if(s.push({paramName:h,isOptional:g!=null}),g){let v=b.charAt(p+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,a?void 0:"i"),s]}function v3(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return pn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Ma(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,s=t.charAt(i);return s&&s!=="/"?null:t.slice(i)||"/"}function x3({basename:t,pathname:a}){return a==="/"?t:wa([t,a])}var s4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z0=t=>s4.test(t);function E3(t,a="/"){let{pathname:i,search:s="",hash:o=""}=typeof t=="string"?Ja(t):t,c;return i?(i=U0(i),i.startsWith("/")?c=R2(i.substring(1),"/"):c=R2(i,a)):c=a,{pathname:c,search:w3(s),hash:A3(o)}}function R2(t,a){let i=Gc(a).split("/");return t.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function Af(t,a,i,s){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function l4(t){return t.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function B0(t){let a=l4(t);return a.map((i,s)=>s===a.length-1?i.pathname:i.pathnameBase)}function su(t,a,i,s=!1){let o;typeof t=="string"?o=Ja(t):(o={...t},ct(!o.pathname||!o.pathname.includes("?"),Af("?","pathname","search",o)),ct(!o.pathname||!o.pathname.includes("#"),Af("#","pathname","hash",o)),ct(!o.search||!o.search.includes("#"),Af("#","search","hash",o)));let c=t===""||o.pathname==="",u=c?"/":o.pathname,h;if(u==null)h=i;else{let v=a.length-1;if(!s&&u.startsWith("..")){let E=u.split("/");for(;E[0]==="..";)E.shift(),v-=1;o.pathname=E.join("/")}h=v>=0?a[v]:"/"}let g=E3(o,h),p=u&&u!=="/"&&u.endsWith("/"),b=(c||u===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(p||b)&&(g.pathname+="/"),g}var U0=t=>t.replace(/\/\/+/g,"/"),wa=t=>U0(t.join("/")),Gc=t=>t.replace(/\/+$/,""),S3=t=>Gc(t).replace(/^\/*/,"/"),w3=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,A3=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Jl=class{constructor(t,a,i,s=!1){this.status=t,this.statusText=a||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Il(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Wl(t){let a=t.map(i=>i.route.path).filter(Boolean);return wa(a)||"/"}var o4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function c4(t,a){let i=t;if(typeof i!="string"||!s4.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,o=!1;if(o4)try{let c=new URL(window.location.href),u=i.startsWith("//")?new URL(c.protocol+i):new URL(i),h=Ma(u.pathname,a);u.origin===c.origin&&h!=null?i=h+u.search+u.hash:o=!0}catch{pn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:i}}var ii=Symbol("Uninstrumented");function M3(t,a){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(o=>o({id:a.id,index:a.index,path:a.path,instrument(c){let u=Object.keys(i);for(let h of u)c[h]&&i[h].push(c[h])}}));let s={};if(typeof a.lazy=="function"&&i.lazy.length>0){let o=ys(i.lazy,a.lazy,()=>{});o&&(s.lazy=o)}if(typeof a.lazy=="object"){let o=a.lazy;["middleware","loader","action"].forEach(c=>{let u=o[c],h=i[`lazy.${c}`];if(typeof u=="function"&&h.length>0){let g=ys(h,u,()=>{});g&&(s.lazy=Object.assign(s.lazy||{},{[c]:g}))}})}return["loader","action"].forEach(o=>{let c=a[o];if(typeof c=="function"&&i[o].length>0){let u=c[ii]??c,h=ys(i[o],u,(...g)=>N2(g[0]));h&&(o==="loader"&&u.hydrate===!0&&(h.hydrate=!0),h[ii]=u,s[o]=h)}}),a.middleware&&a.middleware.length>0&&i.middleware.length>0&&(s.middleware=a.middleware.map(o=>{let c=o[ii]??o,u=ys(i.middleware,c,(...h)=>N2(h[0]));return u?(u[ii]=c,u):o})),s}function T3(t,a){let i={navigate:[],fetch:[]};if(a.forEach(s=>s({instrument(o){let c=Object.keys(o);for(let u of c)o[u]&&i[u].push(o[u])}})),i.navigate.length>0){let s=t.navigate[ii]??t.navigate,o=ys(i.navigate,s,(...c)=>{let[u,h]=c;return{to:typeof u=="number"||typeof u=="string"?u:u?Xa(u):".",...j2(t,h??{})}});o&&(o[ii]=s,t.navigate=o)}if(i.fetch.length>0){let s=t.fetch[ii]??t.fetch,o=ys(i.fetch,s,(...c)=>{let[u,,h,g]=c;return{href:h??".",fetcherKey:u,...j2(t,g??{})}});o&&(o[ii]=s,t.fetch=o)}return t}function ys(t,a,i){return t.length===0?null:async(...s)=>{let o=await u4(t,i(...s),()=>a(...s),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function u4(t,a,i,s){let o=t[s],c;if(o){let u,h=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=u4(t,a,i,s-1),c=await u,ct(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await o(h,a)}catch(g){console.error("An instrumentation function threw an error:",g)}u||await h(),await u}else try{c={type:"success",value:await i()}}catch(u){c={type:"error",value:u}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function N2(t){let{request:a,context:i,params:s,unstable_pattern:o}=t;return{request:C3(a),params:{...s},unstable_pattern:o,context:R3(i)}}function j2(t,a){return{currentUrl:Xa(t.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function C3(t){return{method:t.method,url:t.url,headers:{get:(...a)=>t.headers.get(...a)}}}function R3(t){if(j3(t)){let a={...t};return Object.freeze(a),a}else return{get:a=>t.get(a)}}var N3=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function j3(t){if(t===null||typeof t!="object")return!1;const a=Object.getPrototypeOf(t);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===N3}var d4=["POST","PUT","PATCH","DELETE"],_3=new Set(d4),D3=["GET",...d4],O3=new Set(D3),f4=new Set([301,302,303,307,308]),L3=new Set([307,308]),Mf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},V3={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},H3=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),h4="remix-router-transitions",m4=Symbol("ResetLoaderData");function k3(t){const a=t.window?t.window:typeof window<"u"?window:void 0,i=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";ct(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=t.hydrationRouteProperties||[],o=t.mapRouteProperties||H3,c=o;if(t.unstable_instrumentations){let N=t.unstable_instrumentations;c=V=>({...o(V),...M3(N.map(P=>P.route).filter(Boolean),V)})}let u={},h=Fl(t.routes,c,void 0,u),g,p=t.basename||"/";p.startsWith("/")||(p=`/${p}`);let b=t.dataStrategy||P3,v={unstable_passThroughRequests:!1,...t.future},E=null,S=new Set,w=null,T=null,M=null,j=t.hydrationData!=null,R=ai(h,t.history.location,p),L=!1,B=null,U,le;if(R==null&&!t.patchRoutesOnNavigation){let N=xa(404,{pathname:t.history.location.pathname}),{matches:V,route:P}=vc(h);U=!0,le=!U,R=V,B={[P.id]:N}}else if(R&&!t.hydrationData&&xt(R,h,t.history.location.pathname).active&&(R=null),R)if(R.some(N=>N.route.lazy))U=!1,le=!U;else if(!R.some(N=>Z0(N.route)))U=!0,le=!U;else{let N=t.hydrationData?t.hydrationData.loaderData:null,V=t.hydrationData?t.hydrationData.errors:null,P=R;if(V){let ce=R.findIndex(de=>V[de.route.id]!==void 0);P=P.slice(0,ce+1)}le=!1,U=!0,P.forEach(ce=>{let de=p4(ce.route,N,V);le=le||de.renderFallback,U=U&&!de.shouldLoad})}else{U=!1,le=!U,R=[];let N=xt(null,h,t.history.location.pathname);N.active&&N.matches&&(L=!0,R=N.matches)}let ne,_={historyAction:t.history.action,location:t.history.location,matches:R,initialized:U,renderFallback:le,navigation:Mf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||B,fetchers:new Map,blockers:new Map},ee="POP",ae=null,ie=!1,Q,pe=!1,fe=new Map,ye=null,H=!1,X=!1,Y=new Set,ue=new Map,Se=0,C=-1,q=new Map,oe=new Set,me=new Map,xe=new Map,Ne=new Set,$=new Map,ze,Le=null;function ut(){if(E=t.history.listen(({action:N,location:V,delta:P})=>{if(ze){ze(),ze=void 0;return}pn($.size===0||P!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ce=oa({currentLocation:_.location,nextLocation:V,historyAction:N});if(ce&&P!=null){let de=new Promise(_e=>{ze=_e});t.history.go(P*-1),Kn(ce,{state:"blocked",location:V,proceed(){Kn(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:V}),de.then(()=>t.history.go(P))},reset(){let _e=new Map(_.blockers);_e.set(ce,Sl),Ve({blockers:_e})}}),ae==null||ae.resolve(),ae=null;return}return tn(N,V)}),i){s5(a,fe);let N=()=>l5(a,fe);a.addEventListener("pagehide",N),ye=()=>a.removeEventListener("pagehide",N)}return _.initialized||tn("POP",_.location,{initialHydration:!0}),ne}function he(){E&&E(),ye&&ye(),S.clear(),Q&&Q.abort(),_.fetchers.forEach((N,V)=>kn(V)),_.blockers.forEach((N,V)=>Yn(V))}function Nt(N){return S.add(N),()=>S.delete(N)}function Ve(N,V={}){N.matches&&(N.matches=N.matches.map(de=>{let _e=u[de.route.id],be=de.route;return be.element!==_e.element||be.errorElement!==_e.errorElement||be.hydrateFallbackElement!==_e.hydrateFallbackElement?{...de,route:_e}:de})),_={..._,...N};let P=[],ce=[];_.fetchers.forEach((de,_e)=>{de.state==="idle"&&(Ne.has(_e)?P.push(_e):ce.push(_e))}),Ne.forEach(de=>{!_.fetchers.has(de)&&!ue.has(de)&&P.push(de)}),[...S].forEach(de=>de(_,{deletedFetchers:P,newErrors:N.errors??null,viewTransitionOpts:V.viewTransitionOpts,flushSync:V.flushSync===!0})),P.forEach(de=>kn(de)),ce.forEach(de=>_.fetchers.delete(de))}function $e(N,V,{flushSync:P}={}){var Fe,Oe;let ce=_.actionData!=null&&_.navigation.formMethod!=null&&Ln(_.navigation.formMethod)&&_.navigation.state==="loading"&&((Fe=N.state)==null?void 0:Fe._isRedirect)!==!0,de;V.actionData?Object.keys(V.actionData).length>0?de=V.actionData:de=null:ce?de=_.actionData:de=null;let _e=V.loaderData?Z2(_.loaderData,V.loaderData,V.matches||[],V.errors):_.loaderData,be=_.blockers;be.size>0&&(be=new Map(be),be.forEach((Qe,Je)=>be.set(Je,Sl)));let De=H?!1:qe(N,V.matches||_.matches),Re=ie===!0||_.navigation.formMethod!=null&&Ln(_.navigation.formMethod)&&((Oe=N.state)==null?void 0:Oe._isRedirect)!==!0;g&&(h=g,g=void 0),H||ee==="POP"||(ee==="PUSH"?t.history.push(N,N.state):ee==="REPLACE"&&t.history.replace(N,N.state));let we;if(ee==="POP"){let Qe=fe.get(_.location.pathname);Qe&&Qe.has(N.pathname)?we={currentLocation:_.location,nextLocation:N}:fe.has(N.pathname)&&(we={currentLocation:N,nextLocation:_.location})}else if(pe){let Qe=fe.get(_.location.pathname);Qe?Qe.add(N.pathname):(Qe=new Set([N.pathname]),fe.set(_.location.pathname,Qe)),we={currentLocation:_.location,nextLocation:N}}Ve({...V,actionData:de,loaderData:_e,historyAction:ee,location:N,initialized:!0,renderFallback:!1,navigation:Mf,revalidation:"idle",restoreScrollPosition:De,preventScrollReset:Re,blockers:be},{viewTransitionOpts:we,flushSync:P===!0}),ee="POP",ie=!1,pe=!1,H=!1,X=!1,ae==null||ae.resolve(),ae=null,Le==null||Le.resolve(),Le=null}async function qt(N,V){if(ae==null||ae.resolve(),ae=null,typeof N=="number"){ae||(ae=G2());let Et=ae.promise;return t.history.go(N),Et}let P=n0(_.location,_.matches,p,N,V==null?void 0:V.fromRouteId,V==null?void 0:V.relative),{path:ce,submission:de,error:_e}=_2(!1,P,V),be;V!=null&&V.unstable_mask&&(be={pathname:"",search:"",hash:"",...typeof V.unstable_mask=="string"?Ja(V.unstable_mask):{..._.location.unstable_mask,...V.unstable_mask}});let De=_.location,Re=Pl(De,ce,V&&V.state,void 0,be);Re={...Re,...t.history.encodeLocation(Re)};let we=V&&V.replace!=null?V.replace:void 0,Fe="PUSH";we===!0?Fe="REPLACE":we===!1||de!=null&&Ln(de.formMethod)&&de.formAction===_.location.pathname+_.location.search&&(Fe="REPLACE");let Oe=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,Qe=(V&&V.flushSync)===!0,Je=oa({currentLocation:De,nextLocation:Re,historyAction:Fe});if(Je){Kn(Je,{state:"blocked",location:Re,proceed(){Kn(Je,{state:"proceeding",proceed:void 0,reset:void 0,location:Re}),qt(N,V)},reset(){let Et=new Map(_.blockers);Et.set(Je,Sl),Ve({blockers:Et})}});return}await tn(Fe,Re,{submission:de,pendingError:_e,preventScrollReset:Oe,replace:V&&V.replace,enableViewTransition:V&&V.viewTransition,flushSync:Qe,callSiteDefaultShouldRevalidate:V&&V.unstable_defaultShouldRevalidate})}function Yt(){Le||(Le=G2()),vn(),Ve({revalidation:"loading"});let N=Le.promise;return _.navigation.state==="submitting"?N:_.navigation.state==="idle"?(tn(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),N):(tn(ee||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:pe===!0}),N)}async function tn(N,V,P){Q&&Q.abort(),Q=null,ee=N,H=(P&&P.startUninterruptedRevalidation)===!0,Ee(_.location,_.matches),ie=(P&&P.preventScrollReset)===!0,pe=(P&&P.enableViewTransition)===!0;let ce=g||h,de=P&&P.overrideNavigation,_e=P!=null&&P.initialHydration&&_.matches&&_.matches.length>0&&!L?_.matches:ai(ce,V,p),be=(P&&P.flushSync)===!0;if(_e&&_.initialized&&!X&&X3(_.location,V)&&!(P&&P.submission&&Ln(P.submission.formMethod))){$e(V,{matches:_e},{flushSync:be});return}let De=xt(_e,ce,V.pathname);if(De.active&&De.matches&&(_e=De.matches),!_e){let{error:k,notFoundMatches:ge,route:Ce}=ln(V.pathname);$e(V,{matches:ge,loaderData:{},errors:{[Ce.id]:k}},{flushSync:be});return}Q=new AbortController;let Re=hs(t.history,V,Q.signal,P&&P.submission),we=t.getContext?await t.getContext():new M2,Fe;if(P&&P.pendingError)Fe=[ri(_e).route.id,{type:"error",error:P.pendingError}];else if(P&&P.submission&&Ln(P.submission.formMethod)){let k=await Zn(Re,V,P.submission,_e,we,De.active,P&&P.initialHydration===!0,{replace:P.replace,flushSync:be});if(k.shortCircuited)return;if(k.pendingActionResult){let[ge,Ce]=k.pendingActionResult;if(ra(Ce)&&Il(Ce.error)&&Ce.error.status===404){Q=null,$e(V,{matches:k.matches,loaderData:{},errors:{[ge]:Ce.error}});return}}_e=k.matches||_e,Fe=k.pendingActionResult,de=Tf(V,P.submission),be=!1,De.active=!1,Re=hs(t.history,Re.url,Re.signal)}let{shortCircuited:Oe,matches:Qe,loaderData:Je,errors:Et}=await Wa(Re,V,_e,we,De.active,de,P&&P.submission,P&&P.fetcherSubmission,P&&P.replace,P&&P.initialHydration===!0,be,Fe,P&&P.callSiteDefaultShouldRevalidate);Oe||(Q=null,$e(V,{matches:Qe||_e,...P2(Fe),loaderData:Je,errors:Et}))}async function Zn(N,V,P,ce,de,_e,be,De={}){vn();let Re=r5(V,P);if(Ve({navigation:Re},{flushSync:De.flushSync===!0}),_e){let Oe=await bt(ce,V.pathname,N.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){if(Oe.partialMatches.length===0){let{matches:Je,route:Et}=vc(h);return{matches:Je,pendingActionResult:[Et.id,{type:"error",error:Oe.error}]}}let Qe=ri(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,pendingActionResult:[Qe,{type:"error",error:Oe.error}]}}else if(Oe.matches)ce=Oe.matches;else{let{notFoundMatches:Qe,error:Je,route:Et}=ln(V.pathname);return{matches:Qe,pendingActionResult:[Et.id,{type:"error",error:Je}]}}}let we,Fe=_c(ce,V);if(!Fe.route.action&&!Fe.route.lazy)we={type:"error",error:xa(405,{method:N.method,pathname:V.pathname,routeId:Fe.route.id})};else{let Oe=Es(c,u,N,V,ce,Fe,be?[]:s,de),Qe=await bn(N,V,Oe,de,null);if(we=Qe[Fe.route.id],!we){for(let Je of ce)if(Qe[Je.route.id]){we=Qe[Je.route.id];break}}if(N.signal.aborted)return{shortCircuited:!0}}if(Ni(we)){let Oe;return De&&De.replace!=null?Oe=De.replace:Oe=z2(we.response.headers.get("Location"),new URL(N.url),p,t.history)===_.location.pathname+_.location.search,await Hn(N,we,!0,{submission:P,replace:Oe}),{shortCircuited:!0}}if(ra(we)){let Oe=ri(ce,Fe.route.id);return(De&&De.replace)!==!0&&(ee="PUSH"),{matches:ce,pendingActionResult:[Oe.route.id,we,Fe.route.id]}}return{matches:ce,pendingActionResult:[Fe.route.id,we]}}async function Wa(N,V,P,ce,de,_e,be,De,Re,we,Fe,Oe,Qe){let Je=_e||Tf(V,be),Et=be||De||I2(Je),k=!H&&!we;if(de){if(k){let We=Kt(Oe);Ve({navigation:Je,...We!==void 0?{actionData:We}:{}},{flushSync:Fe})}let He=await bt(P,V.pathname,N.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){if(He.partialMatches.length===0){let{matches:wt,route:at}=vc(h);return{matches:wt,loaderData:{},errors:{[at.id]:He.error}}}let We=ri(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[We]:He.error}}}else if(He.matches)P=He.matches;else{let{error:We,notFoundMatches:wt,route:at}=ln(V.pathname);return{matches:wt,loaderData:{},errors:{[at.id]:We}}}}let ge=g||h,{dsMatches:Ce,revalidatingFetchers:Me}=D2(N,ce,c,u,t.history,_,P,Et,V,we?[]:s,we===!0,X,Y,Ne,me,oe,ge,p,t.patchRoutesOnNavigation!=null,Oe,Qe);if(C=++Se,!t.dataStrategy&&!Ce.some(He=>He.shouldLoad)&&!Ce.some(He=>He.route.middleware&&He.route.middleware.length>0)&&Me.length===0){let He=er();return $e(V,{matches:P,loaderData:{},errors:Oe&&ra(Oe[1])?{[Oe[0]]:Oe[1].error}:null,...P2(Oe),...He?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Fe}),{shortCircuited:!0}}if(k){let He={};if(!de){He.navigation=Je;let We=Kt(Oe);We!==void 0&&(He.actionData=We)}Me.length>0&&(He.fetchers=sa(Me)),Ve(He,{flushSync:Fe})}Me.forEach(He=>{It(He.key),He.controller&&ue.set(He.key,He.controller)});let Ke=()=>Me.forEach(He=>It(He.key));Q&&Q.signal.addEventListener("abort",Ke);let{loaderResults:ht,fetcherResults:tt}=await Dn(Ce,Me,N,V,ce);if(N.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",Ke),Me.forEach(He=>ue.delete(He.key));let St=xc(ht);if(St)return await Hn(N,St.result,!0,{replace:Re}),{shortCircuited:!0};if(St=xc(tt),St)return oe.add(St.key),await Hn(N,St.result,!0,{replace:Re}),{shortCircuited:!0};let{loaderData:re,errors:Ae}=U2(_,P,ht,Oe,Me,tt);we&&_.errors&&(Ae={..._.errors,...Ae});let Pe=er(),nt=Ra(C),Tt=Pe||nt||Me.length>0;return{matches:P,loaderData:re,errors:Ae,...Tt?{fetchers:new Map(_.fetchers)}:{}}}function Kt(N){if(N&&!ra(N[1]))return{[N[0]]:N[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function sa(N){return N.forEach(V=>{let P=_.fetchers.get(V.key),ce=wl(void 0,P?P.data:void 0);_.fetchers.set(V.key,ce)}),new Map(_.fetchers)}async function Ba(N,V,P,ce){It(N);let de=(ce&&ce.flushSync)===!0,_e=g||h,be=n0(_.location,_.matches,p,P,V,ce==null?void 0:ce.relative),De=ai(_e,be,p),Re=xt(De,_e,be);if(Re.active&&Re.matches&&(De=Re.matches),!De){Sn(N,V,xa(404,{pathname:be}),{flushSync:de});return}let{path:we,submission:Fe,error:Oe}=_2(!0,be,ce);if(Oe){Sn(N,V,Oe,{flushSync:de});return}let Qe=t.getContext?await t.getContext():new M2,Je=(ce&&ce.preventScrollReset)===!0;if(Fe&&Ln(Fe.formMethod)){await _n(N,V,we,De,Qe,Re.active,de,Je,Fe,ce&&ce.unstable_defaultShouldRevalidate);return}me.set(N,{routeId:V,path:we}),await jt(N,V,we,De,Qe,Re.active,de,Je,Fe)}async function _n(N,V,P,ce,de,_e,be,De,Re,we){vn(),me.delete(N);let Fe=_.fetchers.get(N);En(N,i5(Re,Fe),{flushSync:be});let Oe=new AbortController,Qe=hs(t.history,P,Oe.signal,Re);if(_e){let ot=await bt(ce,new URL(Qe.url).pathname,Qe.signal,N);if(ot.type==="aborted")return;if(ot.type==="error"){Sn(N,V,ot.error,{flushSync:be});return}else if(ot.matches)ce=ot.matches;else{Sn(N,V,xa(404,{pathname:P}),{flushSync:be});return}}let Je=_c(ce,P);if(!Je.route.action&&!Je.route.lazy){let ot=xa(405,{method:Re.formMethod,pathname:P,routeId:V});Sn(N,V,ot,{flushSync:be});return}ue.set(N,Oe);let Et=Se,k=Es(c,u,Qe,P,ce,Je,s,de),ge=await bn(Qe,P,k,de,N),Ce=ge[Je.route.id];if(!Ce){for(let ot of k)if(ge[ot.route.id]){Ce=ge[ot.route.id];break}}if(Qe.signal.aborted){ue.get(N)===Oe&&ue.delete(N);return}if(Ne.has(N)){if(Ni(Ce)||ra(Ce)){En(N,xr(void 0));return}}else{if(Ni(Ce))if(ue.delete(N),C>Et){En(N,xr(void 0));return}else return oe.add(N),En(N,wl(Re)),Hn(Qe,Ce,!1,{fetcherSubmission:Re,preventScrollReset:De});if(ra(Ce)){Sn(N,V,Ce.error);return}}let Me=_.navigation.location||_.location,Ke=hs(t.history,Me,Oe.signal),ht=g||h,tt=_.navigation.state!=="idle"?ai(ht,_.navigation.location,p):_.matches;ct(tt,"Didn't find any matches after fetcher action");let St=++Se;q.set(N,St);let re=wl(Re,Ce.data);_.fetchers.set(N,re);let{dsMatches:Ae,revalidatingFetchers:Pe}=D2(Ke,de,c,u,t.history,_,tt,Re,Me,s,!1,X,Y,Ne,me,oe,ht,p,t.patchRoutesOnNavigation!=null,[Je.route.id,Ce],we);Pe.filter(ot=>ot.key!==N).forEach(ot=>{let ca=ot.key,ua=_.fetchers.get(ca),tr=wl(void 0,ua?ua.data:void 0);_.fetchers.set(ca,tr),It(ca),ot.controller&&ue.set(ca,ot.controller)}),Ve({fetchers:new Map(_.fetchers)});let nt=()=>Pe.forEach(ot=>It(ot.key));Oe.signal.addEventListener("abort",nt);let{loaderResults:Tt,fetcherResults:He}=await Dn(Ae,Pe,Ke,Me,de);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",nt),q.delete(N),ue.delete(N),Pe.forEach(ot=>ue.delete(ot.key)),_.fetchers.has(N)){let ot=xr(Ce.data);_.fetchers.set(N,ot)}let We=xc(Tt);if(We)return Hn(Ke,We.result,!1,{preventScrollReset:De});if(We=xc(He),We)return oe.add(We.key),Hn(Ke,We.result,!1,{preventScrollReset:De});let{loaderData:wt,errors:at}=U2(_,tt,Tt,void 0,Pe,He);Ra(St),_.navigation.state==="loading"&&St>C?(ct(ee,"Expected pending action"),Q&&Q.abort(),$e(_.navigation.location,{matches:tt,loaderData:wt,errors:at,fetchers:new Map(_.fetchers)})):(Ve({errors:at,loaderData:Z2(_.loaderData,wt,tt,at),fetchers:new Map(_.fetchers)}),X=!1)}async function jt(N,V,P,ce,de,_e,be,De,Re){let we=_.fetchers.get(N);En(N,wl(Re,we?we.data:void 0),{flushSync:be});let Fe=new AbortController,Oe=hs(t.history,P,Fe.signal);if(_e){let Ce=await bt(ce,new URL(Oe.url).pathname,Oe.signal,N);if(Ce.type==="aborted")return;if(Ce.type==="error"){Sn(N,V,Ce.error,{flushSync:be});return}else if(Ce.matches)ce=Ce.matches;else{Sn(N,V,xa(404,{pathname:P}),{flushSync:be});return}}let Qe=_c(ce,P);ue.set(N,Fe);let Je=Se,Et=Es(c,u,Oe,P,ce,Qe,s,de),ge=(await bn(Oe,P,Et,de,N))[Qe.route.id];if(ue.get(N)===Fe&&ue.delete(N),!Oe.signal.aborted){if(Ne.has(N)){En(N,xr(void 0));return}if(Ni(ge))if(C>Je){En(N,xr(void 0));return}else{oe.add(N),await Hn(Oe,ge,!1,{preventScrollReset:De});return}if(ra(ge)){Sn(N,V,ge.error);return}En(N,xr(ge.data))}}async function Hn(N,V,P,{submission:ce,fetcherSubmission:de,preventScrollReset:_e,replace:be}={}){P||(ae==null||ae.resolve(),ae=null),V.response.headers.has("X-Remix-Revalidate")&&(X=!0);let De=V.response.headers.get("Location");ct(De,"Expected a Location header on the redirect Response"),De=z2(De,new URL(N.url),p,t.history);let Re=Pl(_.location,De,{_isRedirect:!0});if(i){let Et=!1;if(V.response.headers.has("X-Remix-Reload-Document"))Et=!0;else if(z0(De)){const k=a4(De,!0);Et=k.origin!==a.location.origin||Ma(k.pathname,p)==null}if(Et){be?a.location.replace(De):a.location.assign(De);return}}Q=null;let we=be===!0||V.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Fe,formAction:Oe,formEncType:Qe}=_.navigation;!ce&&!de&&Fe&&Oe&&Qe&&(ce=I2(_.navigation));let Je=ce||de;if(L3.has(V.response.status)&&Je&&Ln(Je.formMethod))await tn(we,Re,{submission:{...Je,formAction:De},preventScrollReset:_e||ie,enableViewTransition:P?pe:void 0});else{let Et=Tf(Re,ce);await tn(we,Re,{overrideNavigation:Et,fetcherSubmission:de,preventScrollReset:_e||ie,enableViewTransition:P?pe:void 0})}}async function bn(N,V,P,ce,de){var De;let _e,be={};try{_e=await I3(b,N,V,P,de,ce,!1)}catch(Re){return P.filter(we=>we.shouldLoad).forEach(we=>{be[we.route.id]={type:"error",error:Re}}),be}if(N.signal.aborted)return be;if(!Ln(N.method))for(let Re of P){if(((De=_e[Re.route.id])==null?void 0:De.type)==="error")break;!_e.hasOwnProperty(Re.route.id)&&!_.loaderData.hasOwnProperty(Re.route.id)&&(!_.errors||!_.errors.hasOwnProperty(Re.route.id))&&Re.shouldCallHandler()&&(_e[Re.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Re.route.id}`)})}for(let[Re,we]of Object.entries(_e))if(e5(we)){let Fe=we.result;be[Re]={type:"redirect",response:Y3(Fe,N,Re,P,p)}}else be[Re]=await q3(we);return be}async function Dn(N,V,P,ce,de){let _e=bn(P,ce,N,de,null),be=Promise.all(V.map(async we=>{if(we.matches&&we.match&&we.request&&we.controller){let Oe=(await bn(we.request,we.path,we.matches,de,we.key))[we.match.route.id];return{[we.key]:Oe}}else return Promise.resolve({[we.key]:{type:"error",error:xa(404,{pathname:we.path})}})})),De=await _e,Re=(await be).reduce((we,Fe)=>Object.assign(we,Fe),{});return{loaderResults:De,fetcherResults:Re}}function vn(){X=!0,me.forEach((N,V)=>{ue.has(V)&&Y.add(V),It(V)})}function En(N,V,P={}){_.fetchers.set(N,V),Ve({fetchers:new Map(_.fetchers)},{flushSync:(P&&P.flushSync)===!0})}function Sn(N,V,P,ce={}){let de=ri(_.matches,V);kn(N),Ve({errors:{[de.route.id]:P},fetchers:new Map(_.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function Ca(N){return xe.set(N,(xe.get(N)||0)+1),Ne.has(N)&&Ne.delete(N),_.fetchers.get(N)||V3}function Mr(N,V){It(N,V==null?void 0:V.reason),En(N,xr(null))}function kn(N){let V=_.fetchers.get(N);ue.has(N)&&!(V&&V.state==="loading"&&q.has(N))&&It(N),me.delete(N),q.delete(N),oe.delete(N),Ne.delete(N),Y.delete(N),_.fetchers.delete(N)}function rn(N){let V=(xe.get(N)||0)-1;V<=0?(xe.delete(N),Ne.add(N)):xe.set(N,V),Ve({fetchers:new Map(_.fetchers)})}function It(N,V){let P=ue.get(N);P&&(P.abort(V),ue.delete(N))}function sn(N){for(let V of N){let P=Ca(V),ce=xr(P.data);_.fetchers.set(V,ce)}}function er(){let N=[],V=!1;for(let P of oe){let ce=_.fetchers.get(P);ct(ce,`Expected fetcher: ${P}`),ce.state==="loading"&&(oe.delete(P),N.push(P),V=!0)}return sn(N),V}function Ra(N){let V=[];for(let[P,ce]of q)if(ce<N){let de=_.fetchers.get(P);ct(de,`Expected fetcher: ${P}`),de.state==="loading"&&(It(P),q.delete(P),V.push(P))}return sn(V),V.length>0}function la(N,V){let P=_.blockers.get(N)||Sl;return $.get(N)!==V&&$.set(N,V),P}function Yn(N){_.blockers.delete(N),$.delete(N)}function Kn(N,V){let P=_.blockers.get(N)||Sl;ct(P.state==="unblocked"&&V.state==="blocked"||P.state==="blocked"&&V.state==="blocked"||P.state==="blocked"&&V.state==="proceeding"||P.state==="blocked"&&V.state==="unblocked"||P.state==="proceeding"&&V.state==="unblocked",`Invalid blocker state transition: ${P.state} -> ${V.state}`);let ce=new Map(_.blockers);ce.set(N,V),Ve({blockers:ce})}function oa({currentLocation:N,nextLocation:V,historyAction:P}){if($.size===0)return;$.size>1&&pn(!1,"A router only supports one blocker at a time");let ce=Array.from($.entries()),[de,_e]=ce[ce.length-1],be=_.blockers.get(de);if(!(be&&be.state==="proceeding")&&_e({currentLocation:N,nextLocation:V,historyAction:P}))return de}function ln(N){let V=xa(404,{pathname:N}),P=g||h,{matches:ce,route:de}=vc(P);return{notFoundMatches:ce,route:de,error:V}}function O(N,V,P){if(w=N,M=V,T=P||null,!j&&_.navigation===Mf){j=!0;let ce=qe(_.location,_.matches);ce!=null&&Ve({restoreScrollPosition:ce})}return()=>{w=null,M=null,T=null}}function J(N,V){return T&&T(N,V.map(ce=>l3(ce,_.loaderData)))||N.key}function Ee(N,V){if(w&&M){let P=J(N,V);w[P]=M()}}function qe(N,V){if(w){let P=J(N,V),ce=w[P];if(typeof ce=="number")return ce}return null}function xt(N,V,P){if(t.patchRoutesOnNavigation)if(N){if(Object.keys(N[0].params).length>0)return{active:!0,matches:Ll(V,P,p,!0)}}else return{active:!0,matches:Ll(V,P,p,!0)||[]};return{active:!1,matches:null}}async function bt(N,V,P,ce){if(!t.patchRoutesOnNavigation)return{type:"success",matches:N};let de=N;for(;;){let _e=g==null,be=g||h,De=u;try{await t.patchRoutesOnNavigation({signal:P,path:V,matches:de,fetcherKey:ce,patch:(Fe,Oe)=>{P.aborted||O2(Fe,Oe,be,De,c,!1)}})}catch(Fe){return{type:"error",error:Fe,partialMatches:de}}finally{_e&&!P.aborted&&(h=[...h])}if(P.aborted)return{type:"aborted"};let Re=ai(be,V,p),we=null;if(Re){if(Object.keys(Re[0].params).length===0)return{type:"success",matches:Re};if(we=Ll(be,V,p,!0),!(we&&de.length<we.length&&je(de,we.slice(0,de.length))))return{type:"success",matches:Re}}if(we||(we=Ll(be,V,p,!0)),!we||je(de,we))return{type:"success",matches:null};de=we}}function je(N,V){return N.length===V.length&&N.every((P,ce)=>P.route.id===V[ce].route.id)}function Te(N){u={},g=Fl(N,c,void 0,u)}function Ie(N,V,P=!1){let ce=g==null;O2(N,V,g||h,u,c,P),ce&&(h=[...h],Ve({}))}return ne={get basename(){return p},get future(){return v},get state(){return _},get routes(){return h},get window(){return a},initialize:ut,subscribe:Nt,enableScrollRestoration:O,navigate:qt,fetch:Ba,revalidate:Yt,createHref:N=>t.history.createHref(N),encodeLocation:N=>t.history.encodeLocation(N),getFetcher:Ca,resetFetcher:Mr,deleteFetcher:rn,dispose:he,getBlocker:la,deleteBlocker:Yn,patchRoutes:Ie,_internalFetchControllers:ue,_internalSetRoutes:Te,_internalSetStateDoNotUseOrYouWillBreakYourApp(N){Ve(N)}},t.unstable_instrumentations&&(ne=T3(ne,t.unstable_instrumentations.map(N=>N.router).filter(Boolean))),ne}function z3(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function n0(t,a,i,s,o,c){let u,h;if(o){u=[];for(let p of a)if(u.push(p),p.route.id===o){h=p;break}}else u=a,h=a[a.length-1];let g=su(s||".",B0(u),Ma(t.pathname,i)||t.pathname,c==="path");if(s==null&&(g.search=t.search,g.hash=t.hash),(s==null||s===""||s===".")&&h){let p=F0(g.search);if(h.route.index&&!p)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let b=new URLSearchParams(g.search),v=b.getAll("index");b.delete("index"),v.filter(S=>S).forEach(S=>b.append("index",S));let E=b.toString();g.search=E?`?${E}`:""}}return i!=="/"&&(g.pathname=x3({basename:i,pathname:g.pathname})),Xa(g)}function _2(t,a,i){if(!i||!z3(i))return{path:a};if(i.formMethod&&!a5(i.formMethod))return{path:a,error:xa(405,{method:i.formMethod})};let s=()=>({path:a,error:xa(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),u=S4(a);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Ln(c))return s();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((E,[S,w])=>`${E}${S}=${w}
|
|
59
|
+
`,""):String(i.body);return{path:a,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!Ln(c))return s();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:a,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return s()}}}ct(typeof FormData=="function","FormData is not available in this environment");let h,g;if(i.formData)h=r0(i.formData),g=i.formData;else if(i.body instanceof FormData)h=r0(i.body),g=i.body;else if(i.body instanceof URLSearchParams)h=i.body,g=B2(h);else if(i.body==null)h=new URLSearchParams,g=new FormData;else try{h=new URLSearchParams(i.body),g=B2(h)}catch{return s()}let p={formMethod:c,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ln(p.formMethod))return{path:a,submission:p};let b=Ja(a);return t&&b.search&&F0(b.search)&&h.append("index",""),b.search=`?${h}`,{path:Xa(b),submission:p}}function D2(t,a,i,s,o,c,u,h,g,p,b,v,E,S,w,T,M,j,R,L,B){var ye;let U=L?ra(L[1])?L[1].error:L[1].data:void 0,le=o.createURL(c.location),ne=o.createURL(g),_;if(b&&c.errors){let H=Object.keys(c.errors)[0];_=u.findIndex(X=>X.route.id===H)}else if(L&&ra(L[1])){let H=L[0];_=u.findIndex(X=>X.route.id===H)-1}let ee=L?L[1].statusCode:void 0,ae=ee&&ee>=400,ie={currentUrl:le,currentParams:((ye=c.matches[0])==null?void 0:ye.params)||{},nextUrl:ne,nextParams:u[0].params,...h,actionResult:U,actionStatus:ee},Q=Wl(u),pe=u.map((H,X)=>{let{route:Y}=H,ue=null;if(_!=null&&X>_)ue=!1;else if(Y.lazy)ue=!0;else if(!Z0(Y))ue=!1;else if(b){let{shouldLoad:oe}=p4(Y,c.loaderData,c.errors);ue=oe}else B3(c.loaderData,c.matches[X],H)&&(ue=!0);if(ue!==null)return a0(i,s,t,g,Q,H,p,a,ue);let Se=!1;typeof B=="boolean"?Se=B:ae?Se=!1:(v||le.pathname+le.search===ne.pathname+ne.search||le.search!==ne.search||U3(c.matches[X],H))&&(Se=!0);let C={...ie,defaultShouldRevalidate:Se},q=kl(H,C);return a0(i,s,t,g,Q,H,p,a,q,C,B)}),fe=[];return w.forEach((H,X)=>{if(b||!u.some(xe=>xe.route.id===H.routeId)||S.has(X))return;let Y=c.fetchers.get(X),ue=Y&&Y.state!=="idle"&&Y.data===void 0,Se=ai(M,H.path,j);if(!Se){if(R&&ue)return;fe.push({key:X,routeId:H.routeId,path:H.path,matches:null,match:null,request:null,controller:null});return}if(T.has(X))return;let C=_c(Se,H.path),q=new AbortController,oe=hs(o,H.path,q.signal),me=null;if(E.has(X))E.delete(X),me=Es(i,s,oe,H.path,Se,C,p,a);else if(ue)v&&(me=Es(i,s,oe,H.path,Se,C,p,a));else{let xe;typeof B=="boolean"?xe=B:ae?xe=!1:xe=v;let Ne={...ie,defaultShouldRevalidate:xe};kl(C,Ne)&&(me=Es(i,s,oe,H.path,Se,C,p,a,Ne))}me&&fe.push({key:X,routeId:H.routeId,path:H.path,matches:me,match:C,request:oe,controller:q})}),{dsMatches:pe,revalidatingFetchers:fe}}function Z0(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function p4(t,a,i){if(t.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Z0(t))return{shouldLoad:!1,renderFallback:!1};let s=a!=null&&t.id in a,o=i!=null&&i[t.id]!==void 0;if(!s&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof t.loader=="function"&&t.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let c=!s&&!o;return{shouldLoad:c,renderFallback:c}}function B3(t,a,i){let s=!a||i.route.id!==a.route.id,o=!t.hasOwnProperty(i.route.id);return s||o}function U3(t,a){let i=t.route.path;return t.pathname!==a.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==a.params["*"]}function kl(t,a){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(a);if(typeof i=="boolean")return i}return a.defaultShouldRevalidate}function O2(t,a,i,s,o,c){let u;if(t){let p=s[t];ct(p,`No route found to patch children into: routeId = ${t}`),p.children||(p.children=[]),u=p.children}else u=i;let h=[],g=[];if(a.forEach(p=>{let b=u.find(v=>g4(p,v));b?g.push({existingRoute:b,newRoute:p}):h.push(p)}),h.length>0){let p=Fl(h,o,[t||"_","patch",String((u==null?void 0:u.length)||"0")],s);u.push(...p)}if(c&&g.length>0)for(let p=0;p<g.length;p++){let{existingRoute:b,newRoute:v}=g[p],E=b,[S]=Fl([v],o,[],{},!0);Object.assign(E,{element:S.element?S.element:E.element,errorElement:S.errorElement?S.errorElement:E.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:E.hydrateFallbackElement})}}function g4(t,a){var i;return"id"in t&&"id"in a&&t.id===a.id?!0:t.index===a.index&&t.path===a.path&&t.caseSensitive===a.caseSensitive?(!t.children||t.children.length===0)&&(!a.children||a.children.length===0)?!0:((i=t.children)==null?void 0:i.every((s,o)=>{var c;return(c=a.children)==null?void 0:c.some(u=>g4(s,u))}))??!1:!1}var L2=new WeakMap,y4=({key:t,route:a,manifest:i,mapRouteProperties:s})=>{let o=i[a.id];if(ct(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let c=o.lazy[t];if(!c)return;let u=L2.get(o);u||(u={},L2.set(o,u));let h=u[t];if(h)return h;let g=(async()=>{let p=a3(t),v=o[t]!==void 0&&t!=="hasErrorBoundary";if(p)pn(!p,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),u[t]=Promise.resolve();else if(v)pn(!1,`Route "${o.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let E=await c();E!=null&&(Object.assign(o,{[t]:E}),Object.assign(o,s(o)))}typeof o.lazy=="object"&&(o.lazy[t]=void 0,Object.values(o.lazy).every(E=>E===void 0)&&(o.lazy=void 0))})();return u[t]=g,g},V2=new WeakMap;function Z3(t,a,i,s,o){let c=i[t.id];if(ct(c,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let b=V2.get(c);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let v=(async()=>{ct(typeof t.lazy=="function","No lazy route function found");let E=await t.lazy(),S={};for(let w in E){let T=E[w];if(T===void 0)continue;let M=i3(w),R=c[w]!==void 0&&w!=="hasErrorBoundary";M?pn(!M,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?pn(!R,`Route "${c.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=T}Object.assign(c,S),Object.assign(c,{...s(c),lazy:void 0})})();return V2.set(c,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let u=Object.keys(t.lazy),h=[],g;for(let b of u){if(o&&o.includes(b))continue;let v=y4({key:b,route:t,manifest:i,mapRouteProperties:s});v&&(h.push(v),b===a&&(g=v))}let p=h.length>0?Promise.all(h).then(()=>{}):void 0;return p==null||p.catch(()=>{}),g==null||g.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:g}}async function H2(t){let a=t.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(a.map(o=>o.resolve()))).forEach((o,c)=>{i[a[c].route.id]=o}),i}async function P3(t){return t.matches.some(a=>a.route.middleware)?b4(t,()=>H2(t)):H2(t)}function b4(t,a){return F3(t,a,s=>{if(n5(s))throw s;return s},J3,i);function i(s,o,c){if(c)return Promise.resolve(Object.assign(c.value,{[o]:{type:"error",result:s}}));{let{matches:u}=t,h=Math.min(Math.max(u.findIndex(p=>p.route.id===o),0),Math.max(u.findIndex(p=>p.shouldCallHandler()),0)),g=ri(u,u[h].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:s}})}}}async function F3(t,a,i,s,o){let{matches:c,...u}=t,h=c.flatMap(p=>p.route.middleware?p.route.middleware.map(b=>[p.route.id,b]):[]);return await v4(u,h,a,i,s,o)}async function v4(t,a,i,s,o,c,u=0){let{request:h}=t;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let g=a[u];if(!g)return await i();let[p,b]=g,v,E=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await v4(t,a,i,s,o,c,u+1)},v.value}catch(S){return v={value:await c(S,p,v)},v.value}};try{let S=await b(t,E),w=S!=null?s(S):void 0;return o(w)?w:v?w??v.value:(v={value:await E()},v.value)}catch(S){return await c(S,p,v)}}function x4(t,a,i,s,o){let c=y4({key:"middleware",route:s.route,manifest:a,mapRouteProperties:t}),u=Z3(s.route,Ln(i.method)?"action":"loader",a,t,o);return{middleware:c,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function a0(t,a,i,s,o,c,u,h,g,p=null,b){let v=!1,E=x4(t,a,i,c,u);return{...c,_lazyPromises:E,shouldLoad:g,shouldRevalidateArgs:p,shouldCallHandler(S){return v=!0,p?typeof b=="boolean"?kl(c,{...p,defaultShouldRevalidate:b}):typeof S=="boolean"?kl(c,{...p,defaultShouldRevalidate:S}):kl(c,p):g},resolve(S){let{lazy:w,loader:T,middleware:M}=c.route,j=v||g||S&&!Ln(i.method)&&(w||T),R=M&&M.length>0&&!T&&!w;return j&&(Ln(i.method)||!R)?G3({request:i,path:s,unstable_pattern:o,match:c,lazyHandlerPromise:E==null?void 0:E.handler,lazyRoutePromise:E==null?void 0:E.route,handlerOverride:S,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function Es(t,a,i,s,o,c,u,h,g=null){return o.map(p=>p.route.id!==c.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:g,shouldCallHandler:()=>!1,_lazyPromises:x4(t,a,i,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:a0(t,a,i,s,Wl(o),p,u,h,!0,g))}async function I3(t,a,i,s,o,c,u){s.some(b=>{var v;return(v=b._lazyPromises)==null?void 0:v.middleware})&&await Promise.all(s.map(b=>{var v;return(v=b._lazyPromises)==null?void 0:v.middleware}));let h={request:a,unstable_url:E4(a,i),unstable_pattern:Wl(s),params:s[0].params,context:c,matches:s},p=await t({...h,fetcherKey:o,runClientMiddleware:b=>{let v=h;return b4(v,()=>b({...v,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(b=>{var v,E;return[(v=b._lazyPromises)==null?void 0:v.handler,(E=b._lazyPromises)==null?void 0:E.route]}))}catch{}return p}async function G3({request:t,path:a,unstable_pattern:i,match:s,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:u,scopedContext:h}){let g,p,b=Ln(t.method),v=b?"action":"loader",E=S=>{let w,T=new Promise((R,L)=>w=L);p=()=>w(),t.signal.addEventListener("abort",p);let M=R=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${s.route.id}]`)):S({request:t,unstable_url:E4(t,a),unstable_pattern:i,params:s.params,context:h},...R!==void 0?[R]:[]),j=(async()=>{try{return{type:"data",result:await(u?u(L=>M(L)):M())}}catch(R){return{type:"error",result:R}}})();return Promise.race([j,T])};try{let S=b?s.route.action:s.route.loader;if(o||c)if(S){let w,[T]=await Promise.all([E(S).catch(M=>{w=M}),o,c]);if(w!==void 0)throw w;g=T}else{await o;let w=b?s.route.action:s.route.loader;if(w)[g]=await Promise.all([E(w),c]);else if(v==="action"){let T=new URL(t.url),M=T.pathname+T.search;throw xa(405,{method:t.method,pathname:M,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(S)g=await E(S);else{let w=new URL(t.url),T=w.pathname+w.search;throw xa(404,{pathname:T})}}catch(S){return{type:"error",result:S}}finally{p&&t.signal.removeEventListener("abort",p)}return g}async function $3(t){let a=t.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?t.body==null?null:t.json():t.text()}async function q3(t){var s,o,c,u,h;let{result:a,type:i}=t;if(P0(a)){let g;try{g=await $3(a)}catch(p){return{type:"error",error:p}}return i==="error"?{type:"error",error:new Jl(a.status,a.statusText,g),statusCode:a.status,headers:a.headers}:{type:"data",data:g,statusCode:a.status,headers:a.headers}}return i==="error"?F2(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:(s=a.init)==null?void 0:s.status,headers:(o=a.init)!=null&&o.headers?new Headers(a.init.headers):void 0}:{type:"error",error:Q3(a),statusCode:Il(a)?a.status:void 0,headers:(c=a.init)!=null&&c.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:Il(a)?a.status:void 0}:F2(a)?{type:"data",data:a.data,statusCode:(u=a.init)==null?void 0:u.status,headers:(h=a.init)!=null&&h.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function Y3(t,a,i,s,o){let c=t.headers.get("Location");if(ct(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!z0(c)){let u=s.slice(0,s.findIndex(h=>h.route.id===i)+1);c=n0(new URL(a.url),u,o,c),t.headers.set("Location",c)}return t}var k2=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function z2(t,a,i,s){if(z0(t)){let o=t,c=o.startsWith("//")?new URL(a.protocol+o):new URL(o);if(k2.includes(c.protocol))throw new Error("Invalid redirect location");let u=Ma(c.pathname,i)!=null;if(c.origin===a.origin&&u)return U0(c.pathname)+c.search+c.hash}try{let o=s.createURL(t);if(k2.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return t}function hs(t,a,i,s){let o=t.createURL(S4(a)).toString(),c={signal:i};if(s&&Ln(s.formMethod)){let{formMethod:u,formEncType:h}=s;c.method=u.toUpperCase(),h==="application/json"?(c.headers=new Headers({"Content-Type":h}),c.body=JSON.stringify(s.json)):h==="text/plain"?c.body=s.text:h==="application/x-www-form-urlencoded"&&s.formData?c.body=r0(s.formData):c.body=s.formData}return new Request(o,c)}function E4(t,a){let i=new URL(t.url),s=typeof a=="string"?Ja(a):a;if(i.pathname=s.pathname||"/",s.search){let o=new URLSearchParams(s.search),c=o.getAll("index");o.delete("index");for(let u of c.filter(Boolean))o.append("index",u);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=s.hash||"",i}function r0(t){let a=new URLSearchParams;for(let[i,s]of t.entries())a.append(i,typeof s=="string"?s:s.name);return a}function B2(t){let a=new FormData;for(let[i,s]of t.entries())a.append(i,s);return a}function K3(t,a,i,s=!1,o=!1){let c={},u=null,h,g=!1,p={},b=i&&ra(i[1])?i[1].error:void 0;return t.forEach(v=>{if(!(v.route.id in a))return;let E=v.route.id,S=a[E];if(ct(!Ni(S),"Cannot handle redirect results in processLoaderData"),ra(S)){let w=S.error;if(b!==void 0&&(w=b,b=void 0),u=u||{},o)u[E]=w;else{let T=ri(t,E);u[T.route.id]==null&&(u[T.route.id]=w)}s||(c[E]=m4),g||(g=!0,h=Il(S.error)?S.error.status:500),S.headers&&(p[E]=S.headers)}else c[E]=S.data,S.statusCode&&S.statusCode!==200&&!g&&(h=S.statusCode),S.headers&&(p[E]=S.headers)}),b!==void 0&&i&&(u={[i[0]]:b},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:u,statusCode:h||200,loaderHeaders:p}}function U2(t,a,i,s,o,c){let{loaderData:u,errors:h}=K3(a,i,s);return o.filter(g=>!g.matches||g.matches.some(p=>p.shouldLoad)).forEach(g=>{let{key:p,match:b,controller:v}=g;if(v&&v.signal.aborted)return;let E=c[p];if(ct(E,"Did not find corresponding fetcher result"),ra(E)){let S=ri(t.matches,b==null?void 0:b.route.id);h&&h[S.route.id]||(h={...h,[S.route.id]:E.error}),t.fetchers.delete(p)}else if(Ni(E))ct(!1,"Unhandled fetcher revalidation redirect");else{let S=xr(E.data);t.fetchers.set(p,S)}}),{loaderData:u,errors:h}}function Z2(t,a,i,s){let o=Object.entries(a).filter(([,c])=>c!==m4).reduce((c,[u,h])=>(c[u]=h,c),{});for(let c of i){let u=c.route.id;if(!a.hasOwnProperty(u)&&t.hasOwnProperty(u)&&c.route.loader&&(o[u]=t[u]),s&&s.hasOwnProperty(u))break}return o}function P2(t){return t?ra(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ri(t,a){return(a?t.slice(0,t.findIndex(s=>s.route.id===a)+1):[...t]).reverse().find(s=>s.route.hasErrorBoundary===!0)||t[0]}function vc(t){let a=t.length===1?t[0]:t.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function xa(t,{pathname:a,routeId:i,method:s,type:o,message:c}={}){let u="Unknown Server Error",h="Unknown @remix-run/router error";return t===400?(u="Bad Request",s&&a&&i?h=`You made a ${s} request to "${a}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(h="Unable to encode submission body")):t===403?(u="Forbidden",h=`Route "${i}" does not match URL "${a}"`):t===404?(u="Not Found",h=`No route matches URL "${a}"`):t===405&&(u="Method Not Allowed",s&&a&&i?h=`You made a ${s.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:s&&(h=`Invalid request method "${s.toUpperCase()}"`)),new Jl(t||500,u,new Error(h),!0)}function xc(t){let a=Object.entries(t);for(let i=a.length-1;i>=0;i--){let[s,o]=a[i];if(Ni(o))return{key:s,result:o}}}function S4(t){let a=typeof t=="string"?Ja(t):t;return Xa({...a,hash:""})}function X3(t,a){return t.pathname!==a.pathname||t.search!==a.search?!1:t.hash===""?a.hash!=="":t.hash===a.hash?!0:a.hash!==""}function Q3(t){var a,i;return new Jl(((a=t.init)==null?void 0:a.status)??500,((i=t.init)==null?void 0:i.statusText)??"Internal Server Error",t.data)}function J3(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([a,i])=>typeof a=="string"&&W3(i))}function W3(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function e5(t){return P0(t.result)&&f4.has(t.result.status)}function ra(t){return t.type==="error"}function Ni(t){return(t&&t.type)==="redirect"}function F2(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function P0(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function t5(t){return f4.has(t)}function n5(t){return P0(t)&&t5(t.status)&&t.headers.has("Location")}function a5(t){return O3.has(t.toUpperCase())}function Ln(t){return _3.has(t.toUpperCase())}function F0(t){return new URLSearchParams(t).getAll("index").some(a=>a==="")}function _c(t,a){let i=typeof a=="string"?Ja(a).search:a.search;if(t[t.length-1].route.index&&F0(i||""))return t[t.length-1];let s=l4(t);return s[s.length-1]}function I2(t){let{formMethod:a,formAction:i,formEncType:s,text:o,formData:c,json:u}=t;if(!(!a||!i||!s)){if(o!=null)return{formMethod:a,formAction:i,formEncType:s,formData:void 0,json:void 0,text:o};if(c!=null)return{formMethod:a,formAction:i,formEncType:s,formData:c,json:void 0,text:void 0};if(u!==void 0)return{formMethod:a,formAction:i,formEncType:s,formData:void 0,json:u,text:void 0}}}function Tf(t,a){return a?{state:"loading",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r5(t,a){return{state:"submitting",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function wl(t,a){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function i5(t,a){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a?a.data:void 0}}function xr(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function s5(t,a){try{let i=t.sessionStorage.getItem(h4);if(i){let s=JSON.parse(i);for(let[o,c]of Object.entries(s||{}))c&&Array.isArray(c)&&a.set(o,new Set(c||[]))}}catch{}}function l5(t,a){if(a.size>0){let i={};for(let[s,o]of a)i[s]=[...o];try{t.sessionStorage.setItem(h4,JSON.stringify(i))}catch(s){pn(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function G2(){let t,a,i=new Promise((s,o)=>{t=async c=>{s(c);try{await i}catch{}},a=async c=>{o(c);try{await i}catch{}}});return{promise:i,resolve:t,reject:a}}var Li=d.createContext(null);Li.displayName="DataRouter";var eo=d.createContext(null);eo.displayName="DataRouterState";var w4=d.createContext(!1);function A4(){return d.useContext(w4)}var I0=d.createContext({isTransitioning:!1});I0.displayName="ViewTransition";var M4=d.createContext(new Map);M4.displayName="Fetchers";var o5=d.createContext(null);o5.displayName="Await";var Ta=d.createContext(null);Ta.displayName="Navigation";var lu=d.createContext(null);lu.displayName="Location";var ka=d.createContext({outlet:null,matches:[],isDataRoute:!1});ka.displayName="Route";var G0=d.createContext(null);G0.displayName="RouteError";var T4="REACT_ROUTER_ERROR",c5="REDIRECT",u5="ROUTE_ERROR_RESPONSE";function d5(t){if(t.startsWith(`${T4}:${c5}:{`))try{let a=JSON.parse(t.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function f5(t){if(t.startsWith(`${T4}:${u5}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new Jl(a.status,a.statusText,a.data)}catch{}}function h5(t,{relative:a}={}){ct(to(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=d.useContext(Ta),{hash:o,pathname:c,search:u}=ao(t,{relative:a}),h=c;return i!=="/"&&(h=c==="/"?i:wa([i,c])),s.createHref({pathname:h,search:u,hash:o})}function to(){return d.useContext(lu)!=null}function za(){return ct(to(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(lu).location}var C4="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function R4(t){d.useContext(Ta).static||d.useLayoutEffect(t)}function no(){let{isDataRoute:t}=d.useContext(ka);return t?R5():m5()}function m5(){ct(to(),"useNavigate() may be used only in the context of a <Router> component.");let t=d.useContext(Li),{basename:a,navigator:i}=d.useContext(Ta),{matches:s}=d.useContext(ka),{pathname:o}=za(),c=JSON.stringify(B0(s)),u=d.useRef(!1);return R4(()=>{u.current=!0}),d.useCallback((g,p={})=>{if(pn(u.current,C4),!u.current)return;if(typeof g=="number"){i.go(g);return}let b=su(g,JSON.parse(c),o,p.relative==="path");t==null&&a!=="/"&&(b.pathname=b.pathname==="/"?a:wa([a,b.pathname])),(p.replace?i.replace:i.push)(b,p.state,p)},[a,i,c,o,t])}var p5=d.createContext(null);function g5(t){let a=d.useContext(ka).outlet;return d.useMemo(()=>a&&d.createElement(p5.Provider,{value:t},a),[a,t])}function ou(){let{matches:t}=d.useContext(ka),a=t[t.length-1];return a?a.params:{}}function ao(t,{relative:a}={}){let{matches:i}=d.useContext(ka),{pathname:s}=za(),o=JSON.stringify(B0(i));return d.useMemo(()=>su(t,JSON.parse(o),s,a==="path"),[t,o,s,a])}function y5(t,a,i){ct(to(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=d.useContext(Ta),{matches:o}=d.useContext(ka),c=o[o.length-1],u=c?c.params:{},h=c?c.pathname:"/",g=c?c.pathnameBase:"/",p=c&&c.route;{let M=p&&p.path||"";j4(h,!p||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let b=za(),v;v=b;let E=v.pathname||"/",S=E;if(g!=="/"){let M=g.replace(/^\//,"").split("/");S="/"+E.replace(/^\//,"").split("/").slice(M.length).join("/")}let w=ai(t,{pathname:S});return pn(p||w!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),pn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),S5(w&&w.map(M=>Object.assign({},M,{params:Object.assign({},u,M.params),pathname:wa([g,s.encodeLocation?s.encodeLocation(M.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?g:wa([g,s.encodeLocation?s.encodeLocation(M.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),o,i)}function b5(){let t=C5(),a=Il(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:c},"ErrorBoundary")," or"," ",d.createElement("code",{style:c},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},a),i?d.createElement("pre",{style:o},i):null,u)}var v5=d.createElement(b5,null),N4=class extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=f5(t.digest);i&&(t=i)}let a=t!==void 0?d.createElement(ka.Provider,{value:this.props.routeContext},d.createElement(G0.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?d.createElement(x5,{error:t},a):a}};N4.contextType=w4;var Cf=new WeakMap;function x5({children:t,error:a}){let{basename:i}=d.useContext(Ta);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let s=d5(a.digest);if(s){let o=Cf.get(a);if(o)throw o;let c=c4(s.location,i);if(o4&&!Cf.get(a))if(c.isExternal||s.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw Cf.set(a,u),u}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function E5({routeContext:t,match:a,children:i}){let s=d.useContext(Li);return s&&s.static&&s.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(ka.Provider,{value:t},i)}function S5(t,a=[],i){let s=i==null?void 0:i.state;if(t==null){if(!s)return null;if(s.errors)t=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)t=s.matches;else return null}let o=t,c=s==null?void 0:s.errors;if(c!=null){let b=o.findIndex(v=>v.route.id&&(c==null?void 0:c[v.route.id])!==void 0);ct(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,b+1))}let u=!1,h=-1;if(i&&s){u=s.renderFallback;for(let b=0;b<o.length;b++){let v=o[b];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(h=b),v.route.id){let{loaderData:E,errors:S}=s,w=v.route.loader&&!E.hasOwnProperty(v.route.id)&&(!S||S[v.route.id]===void 0);if(v.route.lazy||w){i.isStatic&&(u=!0),h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}}let g=i==null?void 0:i.onError,p=s&&g?(b,v)=>{var E,S;g(b,{location:s.location,params:((S=(E=s.matches)==null?void 0:E[0])==null?void 0:S.params)??{},unstable_pattern:Wl(s.matches),errorInfo:v})}:void 0;return o.reduceRight((b,v,E)=>{let S,w=!1,T=null,M=null;s&&(S=c&&v.route.id?c[v.route.id]:void 0,T=v.route.errorElement||v5,u&&(h<0&&E===0?(j4("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,M=null):h===E&&(w=!0,M=v.route.hydrateFallbackElement||null)));let j=a.concat(o.slice(0,E+1)),R=()=>{let L;return S?L=T:w?L=M:v.route.Component?L=d.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=b,d.createElement(E5,{match:v,routeContext:{outlet:b,matches:j,isDataRoute:s!=null},children:L})};return s&&(v.route.ErrorBoundary||v.route.errorElement||E===0)?d.createElement(N4,{location:s.location,revalidation:s.revalidation,component:T,error:S,children:R(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:p}):R()},null)}function $0(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w5(t){let a=d.useContext(Li);return ct(a,$0(t)),a}function A5(t){let a=d.useContext(eo);return ct(a,$0(t)),a}function M5(t){let a=d.useContext(ka);return ct(a,$0(t)),a}function q0(t){let a=M5(t),i=a.matches[a.matches.length-1];return ct(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function T5(){return q0("useRouteId")}function C5(){var s;let t=d.useContext(G0),a=A5("useRouteError"),i=q0("useRouteError");return t!==void 0?t:(s=a.errors)==null?void 0:s[i]}function R5(){let{router:t}=w5("useNavigate"),a=q0("useNavigate"),i=d.useRef(!1);return R4(()=>{i.current=!0}),d.useCallback(async(o,c={})=>{pn(i.current,C4),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:a,...c}))},[t,a])}var $2={};function j4(t,a,i){!a&&!$2[t]&&($2[t]=!0,pn(!1,i))}var q2={};function Y2(t,a){!t&&!q2[a]&&(q2[a]=!0,console.warn(a))}var N5="useOptimistic",K2=Ix[N5],j5=()=>{};function _5(t){return K2?K2(t):[t,j5]}function D5(t){let a={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&pn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:d.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&pn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:d.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&pn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:d.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var O5=["HydrateFallback","hydrateFallbackElement"],L5=class{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function V5({router:t,flushSync:a,onError:i,unstable_useTransitions:s}){s=A4()||s;let[c,u]=d.useState(t.state),[h,g]=_5(c),[p,b]=d.useState(),[v,E]=d.useState({isTransitioning:!1}),[S,w]=d.useState(),[T,M]=d.useState(),[j,R]=d.useState(),L=d.useRef(new Map),B=d.useCallback((ee,{deletedFetchers:ae,newErrors:ie,flushSync:Q,viewTransitionOpts:pe})=>{ie&&i&&Object.values(ie).forEach(ye=>{var H;return i(ye,{location:ee.location,params:((H=ee.matches[0])==null?void 0:H.params)??{},unstable_pattern:Wl(ee.matches)})}),ee.fetchers.forEach((ye,H)=>{ye.data!==void 0&&L.current.set(H,ye.data)}),ae.forEach(ye=>L.current.delete(ye)),Y2(Q===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let fe=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Y2(pe==null||fe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!pe||!fe){a&&Q?a(()=>u(ee)):s===!1?u(ee):d.startTransition(()=>{s===!0&&g(ye=>X2(ye,ee)),u(ee)});return}if(a&&Q){a(()=>{T&&(S==null||S.resolve(),T.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})});let ye=t.window.document.startViewTransition(()=>{a(()=>u(ee))});ye.finished.finally(()=>{a(()=>{w(void 0),M(void 0),b(void 0),E({isTransitioning:!1})})}),a(()=>M(ye));return}T?(S==null||S.resolve(),T.skipTransition(),R({state:ee,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})):(b(ee),E({isTransitioning:!0,flushSync:!1,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation}))},[t.window,a,T,S,s,g,i]);d.useLayoutEffect(()=>t.subscribe(B),[t,B]);let U=h.initialized;d.useLayoutEffect(()=>{!U&&t.state.initialized&&B(t.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[U,B,t.state]),d.useEffect(()=>{v.isTransitioning&&!v.flushSync&&w(new L5)},[v]),d.useEffect(()=>{if(S&&p&&t.window){let ee=p,ae=S.promise,ie=t.window.document.startViewTransition(async()=>{s===!1?u(ee):d.startTransition(()=>{s===!0&&g(Q=>X2(Q,ee)),u(ee)}),await ae});ie.finished.finally(()=>{w(void 0),M(void 0),b(void 0),E({isTransitioning:!1})}),M(ie)}},[p,S,t.window,s,g]),d.useEffect(()=>{S&&p&&h.location.key===p.location.key&&S.resolve()},[S,T,h.location,p]),d.useEffect(()=>{!v.isTransitioning&&j&&(b(j.state),E({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}),R(void 0))},[v.isTransitioning,j]);let le=d.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ee=>t.navigate(ee),push:(ee,ae,ie)=>t.navigate(ee,{state:ae,preventScrollReset:ie==null?void 0:ie.preventScrollReset}),replace:(ee,ae,ie)=>t.navigate(ee,{replace:!0,state:ae,preventScrollReset:ie==null?void 0:ie.preventScrollReset})}),[t]),ne=t.basename||"/",_=d.useMemo(()=>({router:t,navigator:le,static:!1,basename:ne,onError:i}),[t,le,ne,i]);return d.createElement(d.Fragment,null,d.createElement(Li.Provider,{value:_},d.createElement(eo.Provider,{value:h},d.createElement(M4.Provider,{value:L.current},d.createElement(I0.Provider,{value:v},d.createElement(B5,{basename:ne,location:h.location,navigationType:h.historyAction,navigator:le,unstable_useTransitions:s},d.createElement(H5,{routes:t.routes,future:t.future,state:h,isStatic:!1,onError:i})))))),null)}function X2(t,a){return{...t,navigation:a.navigation.state!=="idle"?a.navigation:t.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:t.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:t.actionData,fetchers:a.fetchers}}var H5=d.memo(k5);function k5({routes:t,future:a,state:i,isStatic:s,onError:o}){return y5(t,void 0,{state:i,isStatic:s,onError:o})}function z5(t){return g5(t.context)}function B5({basename:t="/",children:a=null,location:i,navigationType:s="POP",navigator:o,static:c=!1,unstable_useTransitions:u}){ct(!to(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=d.useMemo(()=>({basename:h,navigator:o,static:c,unstable_useTransitions:u,future:{}}),[h,o,c,u]);typeof i=="string"&&(i=Ja(i));let{pathname:p="/",search:b="",hash:v="",state:E=null,key:S="default",unstable_mask:w}=i,T=d.useMemo(()=>{let M=Ma(p,h);return M==null?null:{location:{pathname:M,search:b,hash:v,state:E,key:S,unstable_mask:w},navigationType:s}},[h,p,b,v,E,S,s,w]);return pn(T!=null,`<Router basename="${h}"> is not able to match the URL "${p}${b}${v}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:d.createElement(Ta.Provider,{value:g},d.createElement(lu.Provider,{children:a,value:T}))}var Dc="get",Oc="application/x-www-form-urlencoded";function cu(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function U5(t){return cu(t)&&t.tagName.toLowerCase()==="button"}function Z5(t){return cu(t)&&t.tagName.toLowerCase()==="form"}function P5(t){return cu(t)&&t.tagName.toLowerCase()==="input"}function F5(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function I5(t,a){return t.button===0&&(!a||a==="_self")&&!F5(t)}var Ec=null;function G5(){if(Ec===null)try{new FormData(document.createElement("form"),0),Ec=!1}catch{Ec=!0}return Ec}var $5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rf(t){return t!=null&&!$5.has(t)?(pn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Oc}"`),null):t}function q5(t,a){let i,s,o,c,u;if(Z5(t)){let h=t.getAttribute("action");s=h?Ma(h,a):null,i=t.getAttribute("method")||Dc,o=Rf(t.getAttribute("enctype"))||Oc,c=new FormData(t)}else if(U5(t)||P5(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(s=g?Ma(g,a):null,i=t.getAttribute("formmethod")||h.getAttribute("method")||Dc,o=Rf(t.getAttribute("formenctype"))||Rf(h.getAttribute("enctype"))||Oc,c=new FormData(h,t),!G5()){let{name:p,type:b,value:v}=t;if(b==="image"){let E=p?`${p}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else p&&c.append(p,v)}}else{if(cu(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Dc,s=null,o=Oc,u=t}return c&&o==="text/plain"&&(u=c,c=void 0),{action:s,method:i.toLowerCase(),encType:o,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Y0(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function _4(t,a,i,s){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${s}`:o.pathname=`${o.pathname}.${s}`:o.pathname==="/"?o.pathname=`_root.${s}`:a&&Ma(o.pathname,a)==="/"?o.pathname=`${Gc(a)}/_root.${s}`:o.pathname=`${Gc(o.pathname)}.${s}`,o}async function Y5(t,a){if(t.id in a)return a[t.id];try{let i=await import(t.module);return a[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function K5(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function X5(t,a,i){let s=await Promise.all(t.map(async o=>{let c=a.routes[o.route.id];if(c){let u=await Y5(c,i);return u.links?u.links():[]}return[]}));return eE(s.flat(1).filter(K5).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Q2(t,a,i,s,o,c){let u=(g,p)=>i[p]?g.route.id!==i[p].route.id:!0,h=(g,p)=>{var b;return i[p].pathname!==g.pathname||((b=i[p].route.path)==null?void 0:b.endsWith("*"))&&i[p].params["*"]!==g.params["*"]};return c==="assets"?a.filter((g,p)=>u(g,p)||h(g,p)):c==="data"?a.filter((g,p)=>{var v;let b=s.routes[g.route.id];if(!b||!b.hasLoader)return!1;if(u(g,p)||h(g,p))return!0;if(g.route.shouldRevalidate){let E=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function Q5(t,a,{includeHydrateFallback:i}={}){return J5(t.map(s=>{let o=a.routes[s.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function J5(t){return[...new Set(t)]}function W5(t){let a={},i=Object.keys(t).sort();for(let s of i)a[s]=t[s];return a}function eE(t,a){let i=new Set;return new Set(a),t.reduce((s,o)=>{let c=JSON.stringify(W5(o));return i.has(c)||(i.add(c),s.push({key:c,link:o})),s},[])}function K0(){let t=d.useContext(Li);return Y0(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function tE(){let t=d.useContext(eo);return Y0(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var X0=d.createContext(void 0);X0.displayName="FrameworkContext";function Q0(){let t=d.useContext(X0);return Y0(t,"You must render this element inside a <HydratedRouter> element"),t}function nE(t,a){let i=d.useContext(X0),[s,o]=d.useState(!1),[c,u]=d.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:p,onMouseLeave:b,onTouchStart:v}=a,E=d.useRef(null);d.useEffect(()=>{if(t==="render"&&u(!0),t==="viewport"){let T=j=>{j.forEach(R=>{u(R.isIntersecting)})},M=new IntersectionObserver(T,{threshold:.5});return E.current&&M.observe(E.current),()=>{M.disconnect()}}},[t]),d.useEffect(()=>{if(s){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[s]);let S=()=>{o(!0)},w=()=>{o(!1),u(!1)};return i?t!=="intent"?[c,E,{}]:[c,E,{onFocus:Al(h,S),onBlur:Al(g,w),onMouseEnter:Al(p,S),onMouseLeave:Al(b,w),onTouchStart:Al(v,S)}]:[!1,E,{}]}function Al(t,a){return i=>{t&&t(i),i.defaultPrevented||a(i)}}function aE({page:t,...a}){let i=A4(),{router:s}=K0(),o=d.useMemo(()=>ai(s.routes,t,s.basename),[s.routes,t,s.basename]);return o?i?d.createElement(iE,{page:t,matches:o,...a}):d.createElement(sE,{page:t,matches:o,...a}):null}function rE(t){let{manifest:a,routeModules:i}=Q0(),[s,o]=d.useState([]);return d.useEffect(()=>{let c=!1;return X5(t,a,i).then(u=>{c||o(u)}),()=>{c=!0}},[t,a,i]),s}function iE({page:t,matches:a,...i}){let s=za(),{future:o}=Q0(),{basename:c}=K0(),u=d.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let h=_4(t,c,o.unstable_trailingSlashAwareDataRequests,"rsc"),g=!1,p=[];for(let b of a)typeof b.route.shouldRevalidate=="function"?g=!0:p.push(b.route.id);return g&&p.length>0&&h.searchParams.set("_routes",p.join(",")),[h.pathname+h.search]},[c,o.unstable_trailingSlashAwareDataRequests,t,s,a]);return d.createElement(d.Fragment,null,u.map(h=>d.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function sE({page:t,matches:a,...i}){let s=za(),{future:o,manifest:c,routeModules:u}=Q0(),{basename:h}=K0(),{loaderData:g,matches:p}=tE(),b=d.useMemo(()=>Q2(t,a,p,c,s,"data"),[t,a,p,c,s]),v=d.useMemo(()=>Q2(t,a,p,c,s,"assets"),[t,a,p,c,s]),E=d.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let T=new Set,M=!1;if(a.forEach(R=>{var B;let L=c.routes[R.route.id];!L||!L.hasLoader||(!b.some(U=>U.route.id===R.route.id)&&R.route.id in g&&((B=u[R.route.id])!=null&&B.shouldRevalidate)||L.hasClientLoader?M=!0:T.add(R.route.id))}),T.size===0)return[];let j=_4(t,h,o.unstable_trailingSlashAwareDataRequests,"data");return M&&T.size>0&&j.searchParams.set("_routes",a.filter(R=>T.has(R.route.id)).map(R=>R.route.id).join(",")),[j.pathname+j.search]},[h,o.unstable_trailingSlashAwareDataRequests,g,s,c,b,a,t,u]),S=d.useMemo(()=>Q5(v,c),[v,c]),w=rE(v);return d.createElement(d.Fragment,null,E.map(T=>d.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...i})),S.map(T=>d.createElement("link",{key:T,rel:"modulepreload",href:T,...i})),w.map(({key:T,link:M})=>d.createElement("link",{key:T,nonce:i.nonce,...M,crossOrigin:M.crossOrigin??i.crossOrigin})))}function lE(...t){return a=>{t.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var oE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oE&&(window.__reactRouterVersion="7.14.1")}catch{}function cE(t,a){return k3({basename:a==null?void 0:a.basename,getContext:a==null?void 0:a.getContext,future:a==null?void 0:a.future,history:Wx({window:a==null?void 0:a.window}),hydrationData:uE(),routes:t,mapRouteProperties:D5,hydrationRouteProperties:O5,dataStrategy:a==null?void 0:a.dataStrategy,patchRoutesOnNavigation:a==null?void 0:a.patchRoutesOnNavigation,window:a==null?void 0:a.window,unstable_instrumentations:a==null?void 0:a.unstable_instrumentations}).initialize()}function uE(){let t=window==null?void 0:window.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:dE(t.errors)}),t}function dE(t){if(!t)return null;let a=Object.entries(t),i={};for(let[s,o]of a)if(o&&o.__type==="RouteErrorResponse")i[s]=new Jl(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let c=window[o.__subType];if(typeof c=="function")try{let u=new c(o.message);u.stack="",i[s]=u}catch{}}if(i[s]==null){let c=new Error(o.message);c.stack="",i[s]=c}}else i[s]=o;return i}var D4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J0=d.forwardRef(function({onClick:a,discover:i="render",prefetch:s="none",relative:o,reloadDocument:c,replace:u,unstable_mask:h,state:g,target:p,to:b,preventScrollReset:v,viewTransition:E,unstable_defaultShouldRevalidate:S,...w},T){let{basename:M,navigator:j,unstable_useTransitions:R}=d.useContext(Ta),L=typeof b=="string"&&D4.test(b),B=c4(b,M);b=B.to;let U=h5(b,{relative:o}),le=za(),ne=null;if(h){let ye=su(h,[],le.unstable_mask?le.unstable_mask.pathname:"/",!0);M!=="/"&&(ye.pathname=ye.pathname==="/"?M:wa([M,ye.pathname])),ne=j.createHref(ye)}let[_,ee,ae]=nE(s,w),ie=pE(b,{replace:u,unstable_mask:h,state:g,target:p,preventScrollReset:v,relative:o,viewTransition:E,unstable_defaultShouldRevalidate:S,unstable_useTransitions:R});function Q(ye){a&&a(ye),ye.defaultPrevented||ie(ye)}let pe=!(B.isExternal||c),fe=d.createElement("a",{...w,...ae,href:(pe?ne:void 0)||B.absoluteURL||U,onClick:pe?Q:a,ref:lE(T,ee),target:p,"data-discover":!L&&i==="render"?"true":void 0});return _&&!L?d.createElement(d.Fragment,null,fe,d.createElement(aE,{page:U})):fe});J0.displayName="Link";var fE=d.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:s="",end:o=!1,style:c,to:u,viewTransition:h,children:g,...p},b){let v=ao(u,{relative:p.relative}),E=za(),S=d.useContext(eo),{navigator:w,basename:T}=d.useContext(Ta),M=S!=null&&xE(v)&&h===!0,j=w.encodeLocation?w.encodeLocation(v).pathname:v.pathname,R=E.pathname,L=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(R=R.toLowerCase(),L=L?L.toLowerCase():null,j=j.toLowerCase()),L&&T&&(L=Ma(L,T)||L);const B=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let U=R===j||!o&&R.startsWith(j)&&R.charAt(B)==="/",le=L!=null&&(L===j||!o&&L.startsWith(j)&&L.charAt(j.length)==="/"),ne={isActive:U,isPending:le,isTransitioning:M},_=U?a:void 0,ee;typeof s=="function"?ee=s(ne):ee=[s,U?"active":null,le?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let ae=typeof c=="function"?c(ne):c;return d.createElement(J0,{...p,"aria-current":_,className:ee,ref:b,style:ae,to:u,viewTransition:h},typeof g=="function"?g(ne):g)});fE.displayName="NavLink";var hE=d.forwardRef(({discover:t="render",fetcherKey:a,navigate:i,reloadDocument:s,replace:o,state:c,method:u=Dc,action:h,onSubmit:g,relative:p,preventScrollReset:b,viewTransition:v,unstable_defaultShouldRevalidate:E,...S},w)=>{let{unstable_useTransitions:T}=d.useContext(Ta),M=bE(),j=vE(h,{relative:p}),R=u.toLowerCase()==="get"?"get":"post",L=typeof h=="string"&&D4.test(h),B=U=>{if(g&&g(U),U.defaultPrevented)return;U.preventDefault();let le=U.nativeEvent.submitter,ne=(le==null?void 0:le.getAttribute("formmethod"))||u,_=()=>M(le||U.currentTarget,{fetcherKey:a,method:ne,navigate:i,replace:o,state:c,relative:p,preventScrollReset:b,viewTransition:v,unstable_defaultShouldRevalidate:E});T&&i!==!1?d.startTransition(()=>_()):_()};return d.createElement("form",{ref:w,method:R,action:j,onSubmit:s?g:B,...S,"data-discover":!L&&t==="render"?"true":void 0})});hE.displayName="Form";function mE(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function O4(t){let a=d.useContext(Li);return ct(a,mE(t)),a}function pE(t,{target:a,replace:i,unstable_mask:s,state:o,preventScrollReset:c,relative:u,viewTransition:h,unstable_defaultShouldRevalidate:g,unstable_useTransitions:p}={}){let b=no(),v=za(),E=ao(t,{relative:u});return d.useCallback(S=>{if(I5(S,a)){S.preventDefault();let w=i!==void 0?i:Xa(v)===Xa(E),T=()=>b(t,{replace:w,unstable_mask:s,state:o,preventScrollReset:c,relative:u,viewTransition:h,unstable_defaultShouldRevalidate:g});p?d.startTransition(()=>T()):T()}},[v,b,E,i,s,o,a,t,c,u,h,g,p])}var gE=0,yE=()=>`__${String(++gE)}__`;function bE(){let{router:t}=O4("useSubmit"),{basename:a}=d.useContext(Ta),i=T5(),s=t.fetch,o=t.navigate;return d.useCallback(async(c,u={})=>{let{action:h,method:g,encType:p,formData:b,body:v}=q5(c,a);if(u.navigate===!1){let E=u.fetcherKey||yE();await s(E,i,u.action||h,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:v,formMethod:u.method||g,formEncType:u.encType||p,flushSync:u.flushSync})}else await o(u.action||h,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:v,formMethod:u.method||g,formEncType:u.encType||p,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[s,o,a,i])}function vE(t,{relative:a}={}){let{basename:i}=d.useContext(Ta),s=d.useContext(ka);ct(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),c={...ao(t||".",{relative:a})},u=za();if(t==null){c.search=u.search;let h=new URLSearchParams(c.search),g=h.getAll("index");if(g.some(b=>b==="")){h.delete("index"),g.filter(v=>v).forEach(v=>h.append("index",v));let b=h.toString();c.search=b?`?${b}`:""}}return(!t||t===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:wa([i,c.pathname])),Xa(c)}function xE(t,{relative:a}={}){let i=d.useContext(I0);ct(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=O4("useViewTransitionState"),o=ao(t,{relative:a});if(!i.isTransitioning)return!1;let c=Ma(i.currentLocation.pathname,s)||i.currentLocation.pathname,u=Ma(i.nextLocation.pathname,s)||i.nextLocation.pathname;return Ic(o.pathname,u)!=null||Ic(o.pathname,c)!=null}var EE=t4();function SE(t){return d.createElement(V5,{flushSync:EE.flushSync,...t})}const wE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),AE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),d.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),ME=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),d.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),TE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),d.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),CE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),RE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M219.23,159.2a196.66,196.66,0,0,0-18-31.2,196.66,196.66,0,0,0,18-31.2c11.84-26.31,11.69-47.48-.43-59.6s-33.29-12.27-59.6-.43a196.66,196.66,0,0,0-31.2,18,196.66,196.66,0,0,0-31.2-18c-26.31-11.84-47.48-11.69-59.6.43s-12.27,33.29-.43,59.6a196.66,196.66,0,0,0,18,31.2,196.66,196.66,0,0,0-18,31.2c-11.84,26.31-11.69,47.48.43,59.6h0C43.33,224.93,51.78,228,62,228c10,0,21.77-2.92,34.76-8.77a196.66,196.66,0,0,0,31.2-18,196.66,196.66,0,0,0,31.2,18c13,5.85,24.74,8.77,34.76,8.77,10.26,0,18.71-3.07,24.84-9.2h0C230.92,206.68,231.07,185.51,219.23,159.2Zm-17.41-105c5.25,5.26,1.79,26-16,53.78-5.61-6.66-11.65-13.25-18.07-19.67S154.7,75.83,148,70.22C175.82,52.39,196.56,48.93,201.82,54.18ZM171.24,128a288.6,288.6,0,0,1-20.51,22.73A288.6,288.6,0,0,1,128,171.24a288.6,288.6,0,0,1-22.73-20.51A288.6,288.6,0,0,1,84.76,128,298.55,298.55,0,0,1,128,84.76a286.83,286.83,0,0,1,22.73,20.51A286.83,286.83,0,0,1,171.24,128ZM54.18,54.18c1.46-1.45,4.1-2.24,7.75-2.24,9.53,0,25.94,5.39,46,18.28-6.66,5.61-13.25,11.65-19.67,18.07S75.83,101.3,70.22,108C52.39,80.18,48.93,59.44,54.18,54.18Zm0,147.64c-5.25-5.26-1.79-26,16-53.78,5.61,6.66,11.65,13.25,18.07,19.67s13,12.46,19.67,18.07C80.18,203.61,59.44,207.07,54.18,201.82Zm147.64,0c-5.26,5.25-26,1.79-53.78-16,6.66-5.61,13.25-11.65,19.67-18.07s12.46-13,18.07-19.67C203.61,175.82,207.07,196.56,201.82,201.82ZM144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.26,210.26c-17.23,17.23-68-5.63-113.46-51.06S28.51,63,45.74,45.74s68,5.63,113.46,51.06S227.49,193,210.26,210.26Z",opacity:"0.2"}),d.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.47,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A302.47,302.47,0,0,0,141.27,70C172.15,49,196.91,43.81,204.55,51.45Zm-153.1,0c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.19,51.45,204.55ZM128,140a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm76.55,64.56c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M193.83,128a195.73,195.73,0,0,0,19.9-33.65c10.74-23.88,11-42.66.8-52.88s-29-9.94-52.88.8A195.73,195.73,0,0,0,128,62.17a195.73,195.73,0,0,0-33.65-19.9c-23.88-10.74-42.66-11-52.88-.8s-9.94,29,.8,52.88A195.73,195.73,0,0,0,62.17,128a195.73,195.73,0,0,0-19.9,33.65c-10.74,23.88-11,42.66-.8,52.88h0c5,5,12,7.47,20.63,7.47,9.1,0,20-2.76,32.25-8.27A195.73,195.73,0,0,0,128,193.83a195.73,195.73,0,0,0,33.65,19.9C173.9,219.24,184.8,222,193.9,222c8.64,0,15.65-2.49,20.63-7.47h0c10.23-10.22,9.94-29-.8-52.88A195.73,195.73,0,0,0,193.83,128ZM206,50c9.28,9.28,2.36,36.29-19.8,68a306.2,306.2,0,0,0-22.78-25.45A306.2,306.2,0,0,0,138,69.76C169.75,47.61,196.77,40.68,206,50Zm-27.19,78A289.17,289.17,0,0,1,155,155a289.17,289.17,0,0,1-27,23.88A289.17,289.17,0,0,1,101,155a290.62,290.62,0,0,1-23.88-27A297.06,297.06,0,0,1,128,77.14,290.74,290.74,0,0,1,155,101,289.17,289.17,0,0,1,178.85,128ZM50,50c2.68-2.69,6.84-4,12.17-4,13.11,0,33.3,8,55.87,23.81A302.94,302.94,0,0,0,92.54,92.54,306.2,306.2,0,0,0,69.76,118C47.6,86.25,40.68,59.24,50,50ZM50,206h0c-9.28-9.28-2.35-36.29,19.8-68a306.2,306.2,0,0,0,22.78,25.45A306.2,306.2,0,0,0,118,186.24C86.25,208.4,59.24,215.32,50,206ZM206,206c-9.28,9.28-36.29,2.35-68-19.81a304.26,304.26,0,0,0,25.45-22.77A306.2,306.2,0,0,0,186.24,138C208.4,169.75,215.32,196.76,206,206Zm-68-78a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.89,162.47A195.58,195.58,0,0,0,191.36,128a195.58,195.58,0,0,0,20.53-34.47c10.38-23.06,10.81-41,1.21-50.63s-27.57-9.17-50.63,1.21A195.58,195.58,0,0,0,128,64.64,195.58,195.58,0,0,0,93.53,44.11C70.47,33.73,52.49,33.3,42.9,42.9s-9.17,27.57,1.21,50.63A195.58,195.58,0,0,0,64.64,128a195.58,195.58,0,0,0-20.53,34.47c-10.38,23.06-10.81,41-1.21,50.63h0C47.5,217.7,54,220,62.12,220c8.78,0,19.41-2.71,31.41-8.11A195.58,195.58,0,0,0,128,191.36a195.58,195.58,0,0,0,34.47,20.53c12,5.4,22.63,8.11,31.41,8.11,8.09,0,14.62-2.3,19.22-6.9h0C222.7,203.51,222.27,185.53,211.89,162.47ZM207.45,48.55c10.27,10.28,3.14,39.05-21.1,72.84A301,301,0,0,0,162,94a301,301,0,0,0-27.43-24.31C168.4,45.4,197.17,38.27,207.45,48.55Zm-26,79.45a293.16,293.16,0,0,1-25,28.38,291.82,291.82,0,0,1-28.38,25,291.82,291.82,0,0,1-28.38-25,293.16,293.16,0,0,1-25-28.38A302.36,302.36,0,0,1,128,74.58a295.83,295.83,0,0,1,28.37,25A293.16,293.16,0,0,1,181.41,128ZM48.55,48.55c3.05-3,7.71-4.55,13.64-4.55,14.11,0,35.41,8.59,59.19,25.65a304.89,304.89,0,0,0-51.73,51.74C45.41,87.6,38.28,58.83,48.55,48.55Zm0,158.9c-10.27-10.28-3.14-39,21.1-72.84A301,301,0,0,0,94,162a301,301,0,0,0,27.43,24.31C87.6,210.59,58.83,217.72,48.55,207.45Zm158.9,0c-10.28,10.27-39,3.14-72.84-21.1A301,301,0,0,0,162,162a301,301,0,0,0,24.31-27.43C210.59,168.4,217.72,197.17,207.45,207.45ZM136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z"}))]]),NE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),d.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),jE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),_E=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,208a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V48a12,12,0,0,1,24,0v85.55L88.1,95a12,12,0,0,1,15.1-.57l56.22,42.16L216.1,87A12,12,0,1,1,231.9,105l-64,56a12,12,0,0,1-15.1.57L96.58,119.44,44,165.45V196H224A12,12,0,0,1,236,208Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,64V208H32V48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),d.createElement("path",{d:"M232,208a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V48a8,8,0,0,1,16,0v94.37L90.73,98a8,8,0,0,1,10.07-.38l58.81,44.11L218.73,90a8,8,0,1,1,10.54,12l-64,56a8,8,0,0,1-10.07.38L96.39,114.29,40,163.63V200H224A8,8,0,0,1,232,208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM200,176a8,8,0,0,1,0,16H56a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v62.92l34.88-29.07a8,8,0,0,1,9.56-.51l43,28.69,43.41-36.18a8,8,0,0,1,10.24,12.3l-48,40a8,8,0,0,1-9.56.51l-43-28.69L64,155.75V176Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230,208a6,6,0,0,1-6,6H32a6,6,0,0,1-6-6V48a6,6,0,0,1,12,0v98.78l54.05-47.3a6,6,0,0,1,7.55-.28l60.11,45.08,60.34-52.8a6,6,0,0,1,7.9,9l-64,56a6,6,0,0,1-7.55.28L96.29,111.72,38,162.72V202H224A6,6,0,0,1,230,208Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,208a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V48a8,8,0,0,1,16,0v94.37L90.73,98a8,8,0,0,1,10.07-.38l58.81,44.11L218.73,90a8,8,0,1,1,10.54,12l-64,56a8,8,0,0,1-10.07.38L96.39,114.29,40,163.63V200H224A8,8,0,0,1,232,208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,208a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V48a4,4,0,0,1,8,0V151.19L93.37,101a4,4,0,0,1,5-.19l61.41,46.05L221.37,93a4,4,0,0,1,5.26,6l-64,56a4,4,0,0,1-5,.19l-61.41-46L36,161.81V204H224A4,4,0,0,1,228,208Z"}))]]),DE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),OE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),LE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z"}))]]),VE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172,164a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,164Zm-12-52H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm60-64V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V48A20,20,0,0,1,56,28H90.53a51.88,51.88,0,0,1,74.94,0H200A20,20,0,0,1,220,48ZM100.29,60h55.42a28,28,0,0,0-55.42,0ZM196,52H178.59A52.13,52.13,0,0,1,180,64v8a12,12,0,0,1-12,12H88A12,12,0,0,1,76,72V64a52.13,52.13,0,0,1,1.41-12H60V212H196Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,48V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96a39.83,39.83,0,0,0-8,24v8h80V64a39.83,39.83,0,0,0-8-24h40A8,8,0,0,1,208,48Z",opacity:"0.2"}),d.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M166,152a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,152Zm-6-38H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm54-66V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V48A14,14,0,0,1,56,34H93.17a45.91,45.91,0,0,1,69.66,0H200A14,14,0,0,1,214,48ZM94,64v2h68V64a34,34,0,0,0-68,0ZM202,48a2,2,0,0,0-2-2H170.33A45.77,45.77,0,0,1,174,64v8a6,6,0,0,1-6,6H88a6,6,0,0,1-6-6V64a45.77,45.77,0,0,1,3.67-18H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200a2,2,0,0,0,2-2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z"}))]]),HE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212ZM163.27,77l-56,24a12,12,0,0,0-6.3,6.3l-24,56A12,12,0,0,0,92.73,179l56-24a12,12,0,0,0,6.3-6.3l24-56A12,12,0,0,0,163.27,77Zm-28.41,57.89-24,10.29,10.29-24,24-10.29Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,32a96,96,0,1,0,96,96A96,96,0,0,0,128,32Zm16,112L80,176l32-64,64-32Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM172.42,72.84l-64,32a8.05,8.05,0,0,0-3.58,3.58l-32,64A8,8,0,0,0,80,184a8.1,8.1,0,0,0,3.58-.84l64-32a8.05,8.05,0,0,0,3.58-3.58l32-64a8,8,0,0,0-10.74-10.74ZM138,138,97.89,158.11,118,118l40.15-20.07Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm51.58,57.79-32,64a4.08,4.08,0,0,1-1.79,1.79l-64,32a4,4,0,0,1-5.37-5.37l32-64a4.08,4.08,0,0,1,1.79-1.79l64-32A4,4,0,0,1,179.58,81.79Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218ZM173.32,74.63l-64,32a6,6,0,0,0-2.69,2.69l-32,64A6,6,0,0,0,80,182a6.06,6.06,0,0,0,2.68-.63l64-32a6,6,0,0,0,2.69-2.69l32-64a6,6,0,0,0-8.05-8.05Zm-33.79,64.9L93.42,162.58l23-46.11,46.11-23Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM172.42,72.84l-64,32a8.05,8.05,0,0,0-3.58,3.58l-32,64A8,8,0,0,0,80,184a8.1,8.1,0,0,0,3.58-.84l64-32a8.05,8.05,0,0,0,3.58-3.58l32-64a8,8,0,0,0-10.74-10.74ZM138,138,97.89,158.11,118,118l40.15-20.07Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220ZM174.21,76.42l-64,32a4.08,4.08,0,0,0-1.79,1.79l-32,64A4,4,0,0,0,80,180a4.05,4.05,0,0,0,1.79-.42l64-32a4.08,4.08,0,0,0,1.79-1.79l32-64a4,4,0,0,0-5.37-5.37ZM141,141l-52.08,26L115,115l52.08-26Z"}))]]),kE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M196,35.52C177.62,25.51,153.48,20,128,20S78.38,25.51,60,35.52C39.37,46.79,28,62.58,28,80v96c0,17.42,11.37,33.21,32,44.48,18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52c20.66-11.27,32-27.06,32-44.48V80C228,62.58,216.63,46.79,196,35.52ZM204,128c0,17-31.21,36-76,36s-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94ZM128,44c44.79,0,76,19,76,36s-31.21,36-76,36S52,97,52,80,83.21,44,128,44Zm0,168c-44.79,0-76-19-76-36v-8.46a88.9,88.9,0,0,0,8,4.94c18.35,10,42.49,15.52,68,15.52s49.62-5.51,68-15.52a88.9,88.9,0,0,0,8-4.94V176C204,193,172.79,212,128,212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,80c0,26.51-39.4,48-88,48S40,106.51,40,80s39.4-48,88-48S216,53.49,216,80Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64Zm-21.61,74.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26C75.29,26,34,49.72,34,80v96c0,30.28,41.29,54,94,54s94-23.72,94-54V80C222,49.72,180.71,26,128,26Zm0,12c44.45,0,82,19.23,82,42s-37.55,42-82,42S46,102.77,46,80,83.55,38,128,38Zm82,138c0,22.77-37.55,42-82,42s-82-19.23-82-42V154.79C62,171.16,92.37,182,128,182s66-10.84,82-27.21Zm0-48c0,22.77-37.55,42-82,42s-82-19.23-82-42V106.79C62,123.16,92.37,134,128,134s66-10.84,82-27.21Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"}))]]),zE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),BE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),UE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),ZE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),PE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),FE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z",opacity:"0.2"}),d.createElement("path",{d:"M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z"}))]]),IE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z",opacity:"0.2"}),d.createElement("path",{d:"M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z"}))]]),GE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),$E=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),qE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,164a36.07,36.07,0,0,0-33.94,24H72a28,28,0,0,1,0-56h96a44,44,0,0,0,0-88H72a12,12,0,0,0,0,24h96a20,20,0,0,1,0,40H72a52,52,0,0,0,0,104h94.06A36,36,0,1,0,200,164Zm0,48a12,12,0,1,1,12-12A12,12,0,0,1,200,212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,200a24,24,0,1,1-24-24A24,24,0,0,1,224,200Z",opacity:"0.2"}),d.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,200a28,28,0,0,1-54.83,8H72a48,48,0,0,1,0-96h96a24,24,0,0,0,0-48H72a8,8,0,0,1,0-16h96a40,40,0,0,1,0,80H72a32,32,0,0,0,0,64H173.17A28,28,0,0,1,228,200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,170a30.05,30.05,0,0,0-29.4,24H72a34,34,0,0,1,0-68h96a38,38,0,0,0,0-76H72a6,6,0,0,0,0,12h96a26,26,0,0,1,0,52H72a46,46,0,0,0,0,92h98.6A30,30,0,1,0,200,170Zm0,48a18,18,0,1,1,18-18A18,18,0,0,1,200,218Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,172a28,28,0,0,0-27.71,24H72a36,36,0,0,1,0-72h96a36,36,0,0,0,0-72H72a4,4,0,0,0,0,8h96a28,28,0,0,1,0,56H72a44,44,0,0,0,0,88H172.29A28,28,0,1,0,200,172Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,200,220Z"}))]]),YE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.15,70.54,185.46,25.86a20,20,0,0,0-28.28,0L33.86,149.17A19.86,19.86,0,0,0,28,163.31V208a20,20,0,0,0,20,20H216a12,12,0,0,0,0-24H125L230.15,98.83A20,20,0,0,0,230.15,70.54ZM136,81l11,11L76,163,65,152ZM52,204V173l15.52,15.51h0L83,204Zm52-13L93,180l71-71,11,11Zm88-88L153,64l18.34-18.34,39,39Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),d.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188,164,103.31,180.69,120,96,204.69ZM68,176.69,51.31,160,136,75.31,152.69,92Zm-20,2.62L76.69,208H48Zm144-70.62L147.32,64l24-24L216,84.69Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM79.32,188l90.34-90.34,16.69,16.68L96,204.69Zm79-101.66h0L68,176.69,51.31,160l90.35-90.34ZM48,179.31,76.69,208H48Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.91,74.79,181.22,30.1a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H216a6,6,0,0,0,0-12H110.49L225.91,94.59A14,14,0,0,0,225.91,74.79ZM76.49,188,164,100.48,183.52,120,96,207.51ZM68,179.52,48.49,160,136,72.49,155.52,92ZM46,208V174.48L81.52,210H48A2,2,0,0,1,46,208ZM217.42,86.1,192,111.52,144.49,64,169.9,38.59a2,2,0,0,1,2.83,0l44.69,44.68A2,2,0,0,1,217.42,86.1Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.32,73.37,182.63,28.69a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H216a8,8,0,0,0,0-16H115.32l112-112A16,16,0,0,0,227.32,73.37ZM136,75.31,152.69,92,68,176.69,51.31,160ZM48,208V179.31L76.69,208Zm48-3.31L79.32,188,164,103.31,180.69,120Zm96-96L147.32,64l24-24L216,84.69Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L39.51,154.83A12,12,0,0,0,36,163.31V208a12,12,0,0,0,12,12H216a4,4,0,0,0,0-8H105.66L224.49,93.17A12,12,0,0,0,224.49,76.2ZM73.66,188,164,97.66,186.35,120,96,210.34ZM68,182.34,45.66,160,136,69.66,158.35,92ZM44,208V169.66l21.17,21.17h0L86.34,212H48A4,4,0,0,1,44,208ZM218.83,87.51,192,114.34,141.66,64l26.83-26.83a4,4,0,0,1,5.66,0l44.68,44.69A4,4,0,0,1,218.83,87.51Z"}))]]),KE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z",opacity:"0.2"}),d.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z"}))]]),XE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",opacity:"0.2"}),d.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z"}))]]),QE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),JE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,116h48a20,20,0,0,0,20-20V48a20,20,0,0,0-20-20H160a20,20,0,0,0-20,20V60H128a28,28,0,0,0-28,28v28H76v-4A20,20,0,0,0,56,92H24A20,20,0,0,0,4,112v32a20,20,0,0,0,20,20H56a20,20,0,0,0,20-20v-4h24v28a28,28,0,0,0,28,28h12v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V160a20,20,0,0,0-20-20H160a20,20,0,0,0-20,20v12H128a4,4,0,0,1-4-4V88a4,4,0,0,1,4-4h12V96A20,20,0,0,0,160,116ZM52,140H28V116H52Zm112,24h40v40H164Zm0-112h40V92H164Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M64,112v32a8,8,0,0,1-8,8H24a8,8,0,0,1-8-8V112a8,8,0,0,1,8-8H56A8,8,0,0,1,64,112ZM208,40H160a8,8,0,0,0-8,8V96a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V48A8,8,0,0,0,208,40Zm0,112H160a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152Z",opacity:"0.2"}),d.createElement("path",{d:"M160,112h48a16,16,0,0,0,16-16V48a16,16,0,0,0-16-16H160a16,16,0,0,0-16,16V64H128a24,24,0,0,0-24,24v32H72v-8A16,16,0,0,0,56,96H24A16,16,0,0,0,8,112v32a16,16,0,0,0,16,16H56a16,16,0,0,0,16-16v-8h32v32a24,24,0,0,0,24,24h16v16a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V160a16,16,0,0,0-16-16H160a16,16,0,0,0-16,16v16H128a8,8,0,0,1-8-8V88a8,8,0,0,1,8-8h16V96A16,16,0,0,0,160,112ZM56,144H24V112H56v32Zm104,16h48v48H160Zm0-112h48V96H160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,96V80H128a8,8,0,0,0-8,8v80a8,8,0,0,0,8,8h16V160a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16v48a16,16,0,0,1-16,16H160a16,16,0,0,1-16-16V192H128a24,24,0,0,1-24-24V136H72v8a16,16,0,0,1-16,16H24A16,16,0,0,1,8,144V112A16,16,0,0,1,24,96H56a16,16,0,0,1,16,16v8h32V88a24,24,0,0,1,24-24h16V48a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V96a16,16,0,0,1-16,16H160A16,16,0,0,1,144,96Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,110h48a14,14,0,0,0,14-14V48a14,14,0,0,0-14-14H160a14,14,0,0,0-14,14V66H128a22,22,0,0,0-22,22v34H70V112A14,14,0,0,0,56,98H24a14,14,0,0,0-14,14v32a14,14,0,0,0,14,14H56a14,14,0,0,0,14-14V134h36v34a22,22,0,0,0,22,22h18v18a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V160a14,14,0,0,0-14-14H160a14,14,0,0,0-14,14v18H128a10,10,0,0,1-10-10V88a10,10,0,0,1,10-10h18V96A14,14,0,0,0,160,110ZM58,144a2,2,0,0,1-2,2H24a2,2,0,0,1-2-2V112a2,2,0,0,1,2-2H56a2,2,0,0,1,2,2Zm100,16a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2v48a2,2,0,0,1-2,2H160a2,2,0,0,1-2-2Zm0-112a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2V96a2,2,0,0,1-2,2H160a2,2,0,0,1-2-2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,112h48a16,16,0,0,0,16-16V48a16,16,0,0,0-16-16H160a16,16,0,0,0-16,16V64H128a24,24,0,0,0-24,24v32H72v-8A16,16,0,0,0,56,96H24A16,16,0,0,0,8,112v32a16,16,0,0,0,16,16H56a16,16,0,0,0,16-16v-8h32v32a24,24,0,0,0,24,24h16v16a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V160a16,16,0,0,0-16-16H160a16,16,0,0,0-16,16v16H128a8,8,0,0,1-8-8V88a8,8,0,0,1,8-8h16V96A16,16,0,0,0,160,112ZM56,144H24V112H56v32Zm104,16h48v48H160Zm0-112h48V96H160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,108h48a12,12,0,0,0,12-12V48a12,12,0,0,0-12-12H160a12,12,0,0,0-12,12V68H128a20,20,0,0,0-20,20v36H68V112a12,12,0,0,0-12-12H24a12,12,0,0,0-12,12v32a12,12,0,0,0,12,12H56a12,12,0,0,0,12-12V132h40v36a20,20,0,0,0,20,20h20v20a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V160a12,12,0,0,0-12-12H160a12,12,0,0,0-12,12v20H128a12,12,0,0,1-12-12V88a12,12,0,0,1,12-12h20V96A12,12,0,0,0,160,108ZM60,144a4,4,0,0,1-4,4H24a4,4,0,0,1-4-4V112a4,4,0,0,1,4-4H56a4,4,0,0,1,4,4Zm96,16a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4v48a4,4,0,0,1-4,4H160a4,4,0,0,1-4-4Zm0-112a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V96a4,4,0,0,1-4,4H160a4,4,0,0,1-4-4Z"}))]]),WE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z"}))]]),eS=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20ZM79.57,196.57a60,60,0,0,1,96.86,0,83.72,83.72,0,0,1-96.86,0ZM100,120a28,28,0,1,1,28,28A28,28,0,0,1,100,120ZM194,179.94a83.48,83.48,0,0,0-29-23.42,52,52,0,1,0-74,0,83.48,83.48,0,0,0-29,23.42,84,84,0,1,1,131.9,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172,120a44,44,0,1,1-44-44A44.05,44.05,0,0,1,172,120Zm60,8A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88.09,88.09,0,0,0-91.47-87.93C77.43,41.89,39.87,81.12,40,128.25a87.65,87.65,0,0,0,22.24,58.16A79.71,79.71,0,0,1,84,165.1a4,4,0,0,1,4.83.32,59.83,59.83,0,0,0,78.28,0,4,4,0,0,1,4.83-.32,79.71,79.71,0,0,1,21.79,21.31A87.62,87.62,0,0,0,216,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26ZM71.44,198a66,66,0,0,1,113.12,0,89.8,89.8,0,0,1-113.12,0ZM94,120a34,34,0,1,1,34,34A34,34,0,0,1,94,120Zm99.51,69.64a77.53,77.53,0,0,0-40-31.38,46,46,0,1,0-51,0,77.53,77.53,0,0,0-40,31.38,90,90,0,1,1,131,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28ZM68.87,198.42a68,68,0,0,1,118.26,0,91.8,91.8,0,0,1-118.26,0Zm124.3-5.55a75.61,75.61,0,0,0-44.51-34,44,44,0,1,0-41.32,0,75.61,75.61,0,0,0-44.51,34,92,92,0,1,1,130.34,0ZM128,156a36,36,0,1,1,36-36A36,36,0,0,1,128,156Z"}))]]),tS=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),nS=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),vt=d.forwardRef((t,a)=>{const{alt:i,color:s,size:o,weight:c,mirrored:u,children:h,weights:g,...p}=t,{color:b="currentColor",size:v,weight:E="regular",mirrored:S=!1,...w}=d.useContext(nS);return d.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:o??v,height:o??v,fill:s??b,viewBox:"0 0 256 256",transform:u||S?"scale(-1, 1)":void 0,...w,...p},!!i&&d.createElement("title",null,i),h,g.get(c??E))});vt.displayName="IconBase";const L4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:wE}));L4.displayName="ArrowClockwiseIcon";const aS=L4,V4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:AE}));V4.displayName="ArrowLeftIcon";const rS=V4,H4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:ME}));H4.displayName="ArrowRightIcon";const iS=H4,k4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:TE}));k4.displayName="ArrowSquareOutIcon";const sS=k4,z4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:CE}));z4.displayName="ArrowUpIcon";const B4=z4,U4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:RE}));U4.displayName="AtomIcon";const lS=U4,Z4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:NE}));Z4.displayName="CaretDownIcon";const P4=Z4,F4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:jE}));F4.displayName="CaretUpIcon";const oS=F4,I4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:_E}));I4.displayName="ChartLineIcon";const cS=I4,G4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:DE}));G4.displayName="CheckIcon";const uS=G4,$4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:OE}));$4.displayName="CheckCircleIcon";const ws=$4,q4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:LE}));q4.displayName="CircleNotchIcon";const Gl=q4,Y4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:VE}));Y4.displayName="ClipboardTextIcon";const Lc=Y4,K4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:HE}));K4.displayName="CompassIcon";const dS=K4,X4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:kE}));X4.displayName="DatabaseIcon";const $c=X4,Q4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:zE}));Q4.displayName="DownloadSimpleIcon";const J2=Q4,J4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:BE}));J4.displayName="EyeIcon";const fS=J4,W4=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:UE}));W4.displayName="FileIcon";const hS=W4,e8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:ZE}));e8.displayName="FileCodeIcon";const mS=e8,t8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:PE}));t8.displayName="FileTextIcon";const n8=t8,a8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:FE}));a8.displayName="FolderIcon";const W2=a8,r8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:IE}));r8.displayName="GithubLogoIcon";const pS=r8,i8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:GE}));i8.displayName="InfoIcon";const gS=i8,s8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:$E}));s8.displayName="LightningIcon";const yS=s8,l8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:qE}));l8.displayName="PathIcon";const bS=l8,o8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:YE}));o8.displayName="PencilLineIcon";const vS=o8,c8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:KE}));c8.displayName="PlayIcon";const xS=c8,u8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:XE}));u8.displayName="SparkleIcon";const i0=u8,d8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:QE}));d8.displayName="TrashIcon";const ES=d8,f8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:JE}));f8.displayName="TreeStructureIcon";const SS=f8,h8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:WE}));h8.displayName="UploadSimpleIcon";const wS=h8,m8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:eS}));m8.displayName="UserCircleIcon";const AS=m8,p8=d.forwardRef((t,a)=>d.createElement(vt,{ref:a,...t,weights:tS}));p8.displayName="XIcon";const W0=p8,eg=t=>{let a;const i=new Set,s=(p,b)=>{const v=typeof p=="function"?p(a):p;if(!Object.is(v,a)){const E=a;a=b??(typeof v!="object"||v===null)?v:Object.assign({},a,v),i.forEach(S=>S(a,E))}},o=()=>a,h={setState:s,getState:o,getInitialState:()=>g,subscribe:p=>(i.add(p),()=>i.delete(p))},g=a=t(s,o,h);return h},MS=(t=>t?eg(t):eg),TS=t=>t;function CS(t,a=TS){const i=gs.useSyncExternalStore(t.subscribe,gs.useCallback(()=>a(t.getState()),[t,a]),gs.useCallback(()=>a(t.getInitialState()),[t,a]));return gs.useDebugValue(i),i}const tg=t=>{const a=MS(t),i=s=>CS(a,s);return Object.assign(i,a),i},Ar=(t=>t?tg(t):tg);async function Vi(t,a){const i=await fetch(t,{headers:{"Content-Type":"application/json"},...a});if(!i.ok)throw new Error(`[persistence] ${(a==null?void 0:a.method)??"GET"} ${t} → ${i.status}`);return i.json()}async function RS(){try{return await Vi("/api/data/projects")}catch{return[]}}function g8(t){Vi(`/api/data/projects/${t.slug}`,{method:"PUT",body:JSON.stringify(t)}).catch(()=>{})}function NS(t){Vi("/api/data/projects",{method:"POST",body:JSON.stringify(t)}).catch(()=>{})}function y8(t){Vi(`/api/data/projects/${t}`,{method:"DELETE"}).catch(()=>{})}function jS(t,a){Vi(`/api/data/projects/${t}/conversation`,{method:"PUT",body:JSON.stringify(a)}).catch(()=>{})}function ng(t,a){Vi(`/api/data/projects/${t}/artifacts`,{method:"PUT",body:JSON.stringify(a)}).catch(()=>{})}function _S(t,a){Vi(`/api/data/projects/${t}/session`,{method:"PUT",body:JSON.stringify(a)}).catch(()=>{})}async function DS(t,a){const i=new FormData;for(const c of a)i.append("files",c);const s=await fetch(`/api/data/projects/${t}/uploads`,{method:"POST",body:i});if(!s.ok)throw new Error(`Upload failed: ${s.status}`);return(await s.json()).uploaded}async function OS(t,a){const i=await fetch(`/api/data/projects/${t}/export`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:a})});if(!i.ok)throw new Error(`Export failed: ${i.status}`);return await i.json()}const b8="enigma_projects";function LS(){try{const t=localStorage.getItem(b8);if(!t)return[];const a=JSON.parse(t);return Array.isArray(a)?a:[]}catch{return[]}}function Nf(t){try{localStorage.setItem(b8,JSON.stringify(t))}catch{console.error("Failed to save projects")}}function VS(t,a){for(const i of a){const s=t.find(o=>o.slug===i.slug);s?JSON.stringify(i)!==JSON.stringify(s)&&g8(i):NS(i)}for(const i of t)a.find(s=>s.slug===i.slug)||y8(i.slug)}const Bt=Ar(t=>({projects:LS(),selectedSlug:null,sidebarCollapsed:!1,contextPanelOpen:!1,contextPanelContent:null,setProjects:a=>{const i=Bt.getState().projects;Nf(a),VS(i,a),t({projects:a})},selectProject:a=>{try{localStorage.setItem("enigma_selected_project",a)}catch{console.error("Failed to save selected project")}t({selectedSlug:a})},clearProject:()=>{try{localStorage.removeItem("enigma_selected_project")}catch{console.error("Failed to clear selected project")}t({selectedSlug:null})},removeProject:a=>t(i=>{const s=i.projects.filter(o=>o.slug!==a);Nf(s),y8(a);try{localStorage.getItem("enigma_selected_project")===a&&localStorage.removeItem("enigma_selected_project")}catch{console.error("Failed to clear removed selected project")}return{projects:s,selectedSlug:i.selectedSlug===a?null:i.selectedSlug}}),restoreLastProject:()=>{try{const a=localStorage.getItem("enigma_selected_project");if(a)return t({selectedSlug:a}),a}catch{console.error("Failed to restore selected project")}return null},updateProject:(a,i)=>t(s=>{const o=s.projects.map(u=>u.slug===a?{...u,...i,last_active_at:new Date().toISOString()}:u);Nf(o);const c=o.find(u=>u.slug===a);return c&&g8(c),{projects:o}}),toggleSidebar:()=>t(a=>({sidebarCollapsed:!a.sidebarCollapsed})),openContextPanel:a=>t({contextPanelOpen:!0,contextPanelContent:a}),closeContextPanel:()=>t({contextPanelOpen:!1,contextPanelContent:null})}));function HS(t,a){let i;try{i=t()}catch{return}return{getItem:o=>{var c;const u=g=>g===null?null:JSON.parse(g,void 0),h=(c=i.getItem(o))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(o,c)=>i.setItem(o,JSON.stringify(c,void 0)),removeItem:o=>i.removeItem(o)}}const s0=t=>a=>{try{const i=t(a);return i instanceof Promise?i:{then(s){return s0(s)(i)},catch(s){return this}}}catch(i){return{then(s){return this},catch(s){return s0(s)(i)}}}},kS=(t,a)=>(i,s,o)=>{let c={storage:HS(()=>window.localStorage),partialize:M=>M,version:0,merge:(M,j)=>({...j,...M}),...a},u=!1,h=0;const g=new Set,p=new Set;let b=c.storage;if(!b)return t((...M)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),i(...M)},s,o);const v=()=>{const M=c.partialize({...s()});return b.setItem(c.name,{state:M,version:c.version})},E=o.setState;o.setState=(M,j)=>(E(M,j),v());const S=t((...M)=>(i(...M),v()),s,o);o.getInitialState=()=>S;let w;const T=()=>{var M,j;if(!b)return;const R=++h;u=!1,g.forEach(B=>{var U;return B((U=s())!=null?U:S)});const L=((j=c.onRehydrateStorage)==null?void 0:j.call(c,(M=s())!=null?M:S))||void 0;return s0(b.getItem.bind(b))(c.name).then(B=>{if(B)if(typeof B.version=="number"&&B.version!==c.version){if(c.migrate){const U=c.migrate(B.state,B.version);return U instanceof Promise?U.then(le=>[!0,le]):[!0,U]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,B.state];return[!1,void 0]}).then(B=>{var U;if(R!==h)return;const[le,ne]=B;if(w=c.merge(ne,(U=s())!=null?U:S),i(w,!0),le)return v()}).then(()=>{R===h&&(L==null||L(s(),void 0),w=s(),u=!0,p.forEach(B=>B(w)))}).catch(B=>{R===h&&(L==null||L(void 0,B))})};return o.persist={setOptions:M=>{c={...c,...M},M.storage&&(b=M.storage)},clearStorage:()=>{b==null||b.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>T(),hasHydrated:()=>u,onHydrate:M=>(g.add(M),()=>{g.delete(M)}),onFinishHydration:M=>(p.add(M),()=>{p.delete(M)})},c.skipHydration||T(),w||S},v8=kS,jf={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_GITHUB_CLIENT_ID:"01ab8ac9400c4e429b23"};function e1(t){var c,u,h,g;const a=typeof import.meta<"u"&&typeof jf=="object"&&jf?jf:void 0,i=(a==null?void 0:a[t])??(a==null?void 0:a[`VITE_${t}`]);if(typeof i=="string"&&i.trim().length>0)return i.trim();const s=globalThis,o=((u=(c=s.process)==null?void 0:c.env)==null?void 0:u[t])??((g=(h=s.process)==null?void 0:h.env)==null?void 0:g[`VITE_${t}`]);return typeof o=="string"?o.trim():""}const zS="vscode/1.99.0",BS="copilot-chat/0.28.0",US="copilot/1.280.0",ZS=e1("COPILOT_EDITOR_VERSION")||zS,PS=e1("COPILOT_CHAT_PLUGIN_VERSION")||BS,ag=e1("COPILOT_AUTH_PLUGIN_VERSION")||US,FS="vscode-chat",IS="conversation-panel",GS="DesignX/0.1";function l0(t,a={}){const{pluginVersion:i=PS,includeIntegrationId:s=!0,includeOpenAIIntent:o=!0}=a,c={Authorization:t,"User-Agent":GS};return c["Editor-Version"]=ZS,i&&(c["Editor-Plugin-Version"]=i),o&&(c["OpenAI-Intent"]=IS),s&&(c["Copilot-Integration-Id"]=FS),c}const $S="read:user user:email",rg="2025-04-01",_f=2;function ig(t){return new Promise(a=>window.setTimeout(a,t))}function qS(t){if(!t)return null;const a=Number(t);if(Number.isFinite(a)&&a>0)return Math.round(a*1e3);const i=Date.parse(t);if(Number.isNaN(i))return null;const s=i-Date.now();return s>0?s:null}function YS(t,a,i){let s=null;try{s=i.length>0?JSON.parse(i):null}catch{s=null}const c=(s&&typeof s.message=="string"?s.message:null)??(i.trim()||`HTTP ${t}`),u=s&&typeof s.documentation_url=="string"?s.documentation_url:null;return t===404?{status:t,classification:"endpoint_not_found_or_no_entitlement",requestId:a,docsUrl:u,message:c}:t===401?{status:t,classification:"invalid_or_expired_github_token",requestId:a,docsUrl:u,message:c}:t===403?{status:t,classification:"forbidden_by_policy_or_entitlement",requestId:a,docsUrl:u,message:c}:t===429?{status:t,classification:"rate_limited",requestId:a,docsUrl:u,message:c}:t>=500||t===0?{status:t,classification:"server_or_network_error",requestId:a,docsUrl:u,message:c}:{status:t,classification:"unknown_failure",requestId:a,docsUrl:u,message:c}}function sg(t){const a=t.requestId?` requestId=${t.requestId}`:"",i=t.docsUrl?` docs=${t.docsUrl}`:"";return new Error(`Copilot token exchange failed (${t.status}). ${t.classification}. ${t.message}${a}${i}`)}async function KS(t){const a=await fetch("/api/github-auth/login/device/code",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:t,scope:$S})});if(!a.ok)throw new Error(`Device flow init failed: ${a.status}`);return a.json()}function XS(t,a,i){let s=i;return new Promise((o,c)=>{const u=async()=>{const g=await(await fetch("/api/github-auth/login/oauth/access_token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:t,device_code:a,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(g.access_token){o(g.access_token);return}switch(g.error){case"authorization_pending":setTimeout(u,s*1e3);break;case"slow_down":s+=5,setTimeout(u,s*1e3);break;case"expired_token":c(new Error("expired_token"));break;case"access_denied":c(new Error("access_denied"));break;default:setTimeout(u,s*1e3)}};setTimeout(u,s*1e3)})}async function x8(t){const a=crypto.randomUUID(),i=[{auth:`token ${t}`,headers:{...l0(`token ${t}`,{pluginVersion:ag,includeOpenAIIntent:!1}),Accept:"application/json","X-GitHub-Api-Version":rg,"X-Request-Id":a}},{auth:`Bearer ${t}`,headers:{...l0(`Bearer ${t}`,{pluginVersion:ag,includeOpenAIIntent:!1}),Accept:"application/json","X-GitHub-Api-Version":rg,"X-Request-Id":a}}],s=new Set;let o={status:0,classification:"unknown_failure",requestId:null,docsUrl:null,message:"No response received."};for(const c of i){const u=`${c.auth}|${c.headers["Editor-Version"]??""}|${c.headers["Editor-Plugin-Version"]??""}`;if(!s.has(u)){s.add(u);for(let h=0;h<=_f;h+=1){let g;try{g=await fetch("/api/github-api/copilot_internal/v2/token",{headers:c.headers})}catch(E){if(o={status:0,classification:"server_or_network_error",requestId:null,docsUrl:null,message:E instanceof Error?E.message:"Network error"},h<_f){await ig(700*(h+1));continue}break}if(g.ok)return g.json();const p=await g.text(),b=YS(g.status,g.headers.get("x-github-request-id"),p);if(o=b,(g.status===429||g.status>=500)&&h<_f){const E=qS(g.headers.get("retry-after"));await ig(E??700*(h+1));continue}if(g.status!==404)throw sg(b);break}}}throw sg(o)}async function QS(t){const a=await fetch("/api/github-api/user",{headers:{Authorization:`token ${t}`}});if(!a.ok)throw new Error(`GitHub user fetch failed: ${a.status}`);const i=await a.json();return{login:i.login,name:i.name??null,avatar_url:i.avatar_url}}const Sr=Ar()(v8((t,a)=>({githubToken:null,copilotToken:null,copilotTokenExpiresAt:null,user:null,setAuth:(i,s,o,c)=>t({githubToken:i,copilotToken:s,copilotTokenExpiresAt:o,user:c}),ensureFreshCopilotToken:async(i=!1)=>{const{githubToken:s,copilotToken:o,copilotTokenExpiresAt:c}=a();if(!s)throw new Error("Not authenticated");const u=Date.now(),h=!!o&&o!==s&&!!c&&c>u+6e4;if(!i&&h)return o;try{const g=await x8(s),p=new Date(g.expires_at).getTime();return t({copilotToken:g.token,copilotTokenExpiresAt:p}),g.token}catch{if(o&&o!==s)return o;throw t({copilotToken:null,copilotTokenExpiresAt:null}),new Error("Copilot session token refresh failed. Reconnect Copilot.")}},disconnect:()=>t({githubToken:null,copilotToken:null,copilotTokenExpiresAt:null,user:null})}),{name:"dx-auth"}));async function lg(t=!1){return Sr.getState().ensureFreshCopilotToken(t)}function E8(t){var a,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(a=0;a<o;a++)t[a]&&(i=E8(t[a]))&&(s&&(s+=" "),s+=i)}else for(i in t)t[i]&&(s&&(s+=" "),s+=i);return s}function JS(){for(var t,a,i=0,s="",o=arguments.length;i<o;i++)(t=arguments[i])&&(a=E8(t))&&(s&&(s+=" "),s+=a);return s}const t1="-",WS=t=>{const a=t9(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{const h=u.split(t1);return h[0]===""&&h.length!==1&&h.shift(),S8(h,a)||e9(u)},getConflictingClassGroupIds:(u,h)=>{const g=i[u]||[];return h&&s[u]?[...g,...s[u]]:g}}},S8=(t,a)=>{var u;if(t.length===0)return a.classGroupId;const i=t[0],s=a.nextPart.get(i),o=s?S8(t.slice(1),s):void 0;if(o)return o;if(a.validators.length===0)return;const c=t.join(t1);return(u=a.validators.find(({validator:h})=>h(c)))==null?void 0:u.classGroupId},og=/^\[(.+)\]$/,e9=t=>{if(og.test(t)){const a=og.exec(t)[1],i=a==null?void 0:a.substring(0,a.indexOf(":"));if(i)return"arbitrary.."+i}},t9=t=>{const{theme:a,prefix:i}=t,s={nextPart:new Map,validators:[]};return a9(Object.entries(t.classGroups),i).forEach(([c,u])=>{o0(u,s,c,a)}),s},o0=(t,a,i,s)=>{t.forEach(o=>{if(typeof o=="string"){const c=o===""?a:cg(a,o);c.classGroupId=i;return}if(typeof o=="function"){if(n9(o)){o0(o(s),a,i,s);return}a.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([c,u])=>{o0(u,cg(a,c),i,s)})})},cg=(t,a)=>{let i=t;return a.split(t1).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},n9=t=>t.isThemeGetter,a9=(t,a)=>a?t.map(([i,s])=>{const o=s.map(c=>typeof c=="string"?a+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([u,h])=>[a+u,h])):c);return[i,o]}):t,r9=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,i=new Map,s=new Map;const o=(c,u)=>{i.set(c,u),a++,a>t&&(a=0,s=i,i=new Map)};return{get(c){let u=i.get(c);if(u!==void 0)return u;if((u=s.get(c))!==void 0)return o(c,u),u},set(c,u){i.has(c)?i.set(c,u):o(c,u)}}},w8="!",i9=t=>{const{separator:a,experimentalParseClassName:i}=t,s=a.length===1,o=a[0],c=a.length,u=h=>{const g=[];let p=0,b=0,v;for(let M=0;M<h.length;M++){let j=h[M];if(p===0){if(j===o&&(s||h.slice(M,M+c)===a)){g.push(h.slice(b,M)),b=M+c;continue}if(j==="/"){v=M;continue}}j==="["?p++:j==="]"&&p--}const E=g.length===0?h:h.substring(b),S=E.startsWith(w8),w=S?E.substring(1):E,T=v&&v>b?v-b:void 0;return{modifiers:g,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:T}};return i?h=>i({className:h,parseClassName:u}):u},s9=t=>{if(t.length<=1)return t;const a=[];let i=[];return t.forEach(s=>{s[0]==="["?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a},l9=t=>({cache:r9(t.cacheSize),parseClassName:i9(t),...WS(t)}),o9=/\s+/,c9=(t,a)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:o}=a,c=[],u=t.trim().split(o9);let h="";for(let g=u.length-1;g>=0;g-=1){const p=u[g],{modifiers:b,hasImportantModifier:v,baseClassName:E,maybePostfixModifierPosition:S}=i(p);let w=!!S,T=s(w?E.substring(0,S):E);if(!T){if(!w){h=p+(h.length>0?" "+h:h);continue}if(T=s(E),!T){h=p+(h.length>0?" "+h:h);continue}w=!1}const M=s9(b).join(":"),j=v?M+w8:M,R=j+T;if(c.includes(R))continue;c.push(R);const L=o(T,w);for(let B=0;B<L.length;++B){const U=L[B];c.push(j+U)}h=p+(h.length>0?" "+h:h)}return h};function u9(){let t=0,a,i,s="";for(;t<arguments.length;)(a=arguments[t++])&&(i=A8(a))&&(s&&(s+=" "),s+=i);return s}const A8=t=>{if(typeof t=="string")return t;let a,i="";for(let s=0;s<t.length;s++)t[s]&&(a=A8(t[s]))&&(i&&(i+=" "),i+=a);return i};function ug(t,...a){let i,s,o,c=u;function u(g){const p=a.reduce((b,v)=>v(b),t());return i=l9(p),s=i.cache.get,o=i.cache.set,c=h,h(g)}function h(g){const p=s(g);if(p)return p;const b=c9(g,i);return o(g,b),b}return function(){return c(u9.apply(null,arguments))}}const Pt=t=>{const a=i=>i[t]||[];return a.isThemeGetter=!0,a},M8=/^\[(?:([a-z-]+):)?(.+)\]$/i,d9=/^\d+\/\d+$/,f9=new Set(["px","full","screen"]),h9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m9=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,g9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vr=t=>Ss(t)||f9.has(t)||d9.test(t),Wr=t=>Cs(t,"length",M9),Ss=t=>!!t&&!Number.isNaN(Number(t)),Df=t=>Cs(t,"number",Ss),Ml=t=>!!t&&Number.isInteger(Number(t)),b9=t=>t.endsWith("%")&&Ss(t.slice(0,-1)),lt=t=>M8.test(t),ei=t=>h9.test(t),v9=new Set(["length","size","percentage"]),x9=t=>Cs(t,v9,T8),E9=t=>Cs(t,"position",T8),S9=new Set(["image","url"]),w9=t=>Cs(t,S9,C9),A9=t=>Cs(t,"",T9),Tl=()=>!0,Cs=(t,a,i)=>{const s=M8.exec(t);return s?s[1]?typeof a=="string"?s[1]===a:a.has(s[1]):i(s[2]):!1},M9=t=>m9.test(t)&&!p9.test(t),T8=()=>!1,T9=t=>g9.test(t),C9=t=>y9.test(t),dg=()=>{const t=Pt("colors"),a=Pt("spacing"),i=Pt("blur"),s=Pt("brightness"),o=Pt("borderColor"),c=Pt("borderRadius"),u=Pt("borderSpacing"),h=Pt("borderWidth"),g=Pt("contrast"),p=Pt("grayscale"),b=Pt("hueRotate"),v=Pt("invert"),E=Pt("gap"),S=Pt("gradientColorStops"),w=Pt("gradientColorStopPositions"),T=Pt("inset"),M=Pt("margin"),j=Pt("opacity"),R=Pt("padding"),L=Pt("saturate"),B=Pt("scale"),U=Pt("sepia"),le=Pt("skew"),ne=Pt("space"),_=Pt("translate"),ee=()=>["auto","contain","none"],ae=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",lt,a],Q=()=>[lt,a],pe=()=>["",vr,Wr],fe=()=>["auto",Ss,lt],ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],ue=()=>["","0",lt],Se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[Ss,lt];return{cacheSize:500,separator:":",theme:{colors:[Tl],spacing:[vr,Wr],blur:["none","",ei,lt],brightness:C(),borderColor:[t],borderRadius:["none","","full",ei,lt],borderSpacing:Q(),borderWidth:pe(),contrast:C(),grayscale:ue(),hueRotate:C(),invert:ue(),gap:Q(),gradientColorStops:[t],gradientColorStopPositions:[b9,Wr],inset:ie(),margin:ie(),opacity:C(),padding:Q(),saturate:C(),scale:C(),sepia:ue(),skew:C(),space:Q(),translate:Q()},classGroups:{aspect:[{aspect:["auto","square","video",lt]}],container:["container"],columns:[{columns:[ei]}],"break-after":[{"break-after":Se()}],"break-before":[{"break-before":Se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ye(),lt]}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ml,lt]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",lt]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",Ml,lt]}],"grid-cols":[{"grid-cols":[Tl]}],"col-start-end":[{col:["auto",{span:["full",Ml,lt]},lt]}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":[Tl]}],"row-start-end":[{row:["auto",{span:[Ml,lt]},lt]}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",lt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",lt]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[M]}],mx:[{mx:[M]}],my:[{my:[M]}],ms:[{ms:[M]}],me:[{me:[M]}],mt:[{mt:[M]}],mr:[{mr:[M]}],mb:[{mb:[M]}],ml:[{ml:[M]}],"space-x":[{"space-x":[ne]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ne]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",lt,a]}],"min-w":[{"min-w":[lt,a,"min","max","fit"]}],"max-w":[{"max-w":[lt,a,"none","full","min","max","fit","prose",{screen:[ei]},ei]}],h:[{h:[lt,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[lt,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[lt,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[lt,a,"auto","min","max","fit"]}],"font-size":[{text:["base",ei,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Df]}],"font-family":[{font:[Tl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",lt]}],"line-clamp":[{"line-clamp":["none",Ss,Df]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vr,lt]}],"list-image":[{"list-image":["none",lt]}],"list-style-type":[{list:["none","disc","decimal",lt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vr,Wr]}],"underline-offset":[{"underline-offset":["auto",vr,lt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ye(),E9]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",x9]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},w9]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[vr,lt]}],"outline-w":[{outline:[vr,Wr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[vr,Wr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ei,A9]}],"shadow-color":[{shadow:[Tl]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",ei,lt]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[v]}],saturate:[{saturate:[L]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",lt]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",lt]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",lt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[Ml,lt]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[le]}],"skew-y":[{"skew-y":[le]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",lt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",lt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",lt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[vr,Wr,Df]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},R9=(t,{cacheSize:a,prefix:i,separator:s,experimentalParseClassName:o,extend:c={},override:u={}})=>{Vl(t,"cacheSize",a),Vl(t,"prefix",i),Vl(t,"separator",s),Vl(t,"experimentalParseClassName",o);for(const h in u)N9(t[h],u[h]);for(const h in c)j9(t[h],c[h]);return t},Vl=(t,a,i)=>{i!==void 0&&(t[a]=i)},N9=(t,a)=>{if(a)for(const i in a)Vl(t,i,a[i])},j9=(t,a)=>{if(a)for(const i in a){const s=a[i];s!==void 0&&(t[i]=(t[i]||[]).concat(s))}},_9=(t,...a)=>typeof t=="function"?ug(dg,t,...a):ug(()=>R9(dg(),t),...a),D9=_9({extend:{classGroups:{"font-size":[{text:["display-hero","display-secondary","section-heading","card-heading","feature-title","sub-heading","body-large","body","body-standard","body-medium","button","button-large","button-small","nav-link","caption","small","uppercase-label"]}]}}});function Ya(...t){return D9(JS(t))}const C8="enigma_artifacts_v1";function O9(){try{const t=localStorage.getItem(C8);if(!t)return{};const a=JSON.parse(t);return typeof a=="object"&&a!==null?a:{}}catch{return{}}}function Of(t){try{localStorage.setItem(C8,JSON.stringify(t))}catch{}}const $l=Ar(t=>({byProject:O9(),upsertArtifacts:(a,i)=>{t(s=>{const c=[...s.byProject[a]??[]];for(const h of i){const g=c.findIndex(p=>p.id===h.id);g>=0?c[g]=h:c.push(h)}const u={...s.byProject,[a]:c};return Of(u),ng(a,c),{byProject:u}})},finalizeProjectArtifacts:a=>{t(i=>{const s=i.byProject[a];if(!s)return i;const o={...i.byProject,[a]:s.map(c=>({...c,isStreaming:!1}))};return Of(o),ng(a,o[a]),{byProject:o}})},clearProjectArtifacts:a=>{t(i=>{const{[a]:s,...o}=i.byProject;return Of(o),{byProject:o}})}}));async function L9(t,a,i){const s=await fetch("/api/kb/jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectSlug:t,source:i,files:a.map(o=>({id:o.id,name:o.name,size:o.size,type:o.type}))})});if(!s.ok)throw new Error("Failed to start KB processing.");return await s.json()}async function R8(t){const a=await fetch(`/api/kb/jobs/${t}`);if(!a.ok)throw new Error("Failed to load KB processing status.");return await a.json()}async function Lf(t,a){const i=await fetch(`/api/kb/jobs/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error("Failed to update KB processing status.");return await i.json()}const N8="enigma_kb_jobs",c0=new Map;function V9(){try{const t=localStorage.getItem(N8);if(!t)return{};const a=JSON.parse(t);return typeof a=="object"&&a?a:{}}catch{return{}}}function H9(t){try{localStorage.setItem(N8,JSON.stringify(t))}catch{console.error("Failed to save KB jobs")}}function qc(t){const a=c0.get(t);a!==void 0&&(window.clearTimeout(a),c0.delete(t))}function Ga(t){return H9(t),t}function u0(t,a){return{projectSlug:t.projectSlug,jobId:t.id,source:t.source,status:t.status,progress:t.progress,stageLabel:t.stageLabel,filesCount:t.fileCount,createdAt:t.createdAt,updatedAt:t.updatedAt,contextRefreshPending:t.status==="applied"?!1:(a==null?void 0:a.contextRefreshPending)??t.status==="ready",autoApplyToContext:(a==null?void 0:a.autoApplyToContext)??!0,error:t.error??(a==null?void 0:a.error)??null}}function d0(t,a=900){qc(t);const i=window.setTimeout(async()=>{const s=Vn.getState().jobsByProject[t];if(s!=null&&s.jobId){try{const o=await R8(s.jobId);Vn.setState(u=>{const h=u.jobsByProject[t];if(!h)return u;const g=u0(o,h);return{jobsByProject:Ga({...u.jobsByProject,[t]:g})}});const c=Vn.getState().jobsByProject[t];if(c&&(c.status==="queued"||c.status==="processing")){d0(t);return}}catch{Vn.getState().markContextRefreshDeferred(t,"KB status channel was interrupted. Re-run extraction to try again.")}qc(t)}},a);c0.set(t,i)}const Vn=Ar((t,a)=>({jobsByProject:V9(),queueKbJob:async(i,s,o,c=!0)=>{if(qc(i),s.length===0){t(u=>{const h={...u.jobsByProject};return delete h[i],{jobsByProject:Ga(h)}});return}t(u=>{const h=u.jobsByProject[i];return{jobsByProject:Ga({...u.jobsByProject,[i]:{projectSlug:i,jobId:(h==null?void 0:h.jobId)??null,source:o,status:"queued",progress:8,stageLabel:"Queued KB intake for orchestrator preprocessing.",filesCount:s.length,createdAt:(h==null?void 0:h.createdAt)??null,updatedAt:new Date().toISOString(),contextRefreshPending:!0,autoApplyToContext:c,error:null}})}});try{const u=await L9(i,s,o);t(h=>({jobsByProject:Ga({...h.jobsByProject,[i]:{...u0(u,h.jobsByProject[i]),autoApplyToContext:c,contextRefreshPending:!0}})})),d0(i)}catch(u){t(h=>({jobsByProject:Ga({...h.jobsByProject,[i]:{projectSlug:i,jobId:null,source:o,status:"failed",progress:0,stageLabel:"KB preprocessing could not start.",filesCount:s.length,createdAt:null,updatedAt:new Date().toISOString(),contextRefreshPending:!0,autoApplyToContext:c,error:u instanceof Error?u.message:"Failed to start KB preprocessing."}})}))}},resumeProjectJob:async i=>{const s=a().jobsByProject[i];if(s!=null&&s.jobId&&!(s.status!=="queued"&&s.status!=="processing"))try{const o=await R8(s.jobId);t(u=>({jobsByProject:Ga({...u.jobsByProject,[i]:u0(o,u.jobsByProject[i])})}));const c=a().jobsByProject[i];c&&(c.status==="queued"||c.status==="processing")&&d0(i)}catch{a().markContextRefreshDeferred(i,"KB status channel was interrupted. Re-run extraction to try again.")}},markContextRefreshStarted:i=>{t(o=>{const c=o.jobsByProject[i];return c?{jobsByProject:Ga({...o.jobsByProject,[i]:{...c,status:"refreshing-context",progress:100,stageLabel:"Applying the prepared KB package to the active project context.",updatedAt:new Date().toISOString(),error:null}})}:o});const s=a().jobsByProject[i];s!=null&&s.jobId&&Lf(s.jobId,{status:"refreshing-context",progress:100,stageLabel:"Applying the prepared KB package to the active project context.",error:null}).catch(()=>{console.error("Failed to persist KB context-refresh start state")})},markContextRefreshCompleted:i=>{t(o=>{const c=o.jobsByProject[i];return c?{jobsByProject:Ga({...o.jobsByProject,[i]:{...c,status:"applied",progress:100,stageLabel:"Project context refreshed from the latest KB package.",updatedAt:new Date().toISOString(),contextRefreshPending:!1,error:null}})}:o});const s=a().jobsByProject[i];s!=null&&s.jobId&&Lf(s.jobId,{status:"applied",progress:100,stageLabel:"Project context refreshed from the latest KB package.",error:null}).catch(()=>{console.error("Failed to persist KB context-refresh completion state")})},markContextRefreshDeferred:(i,s)=>{t(c=>{const u=c.jobsByProject[i];return u?{jobsByProject:Ga({...c.jobsByProject,[i]:{...u,status:u.jobId?"ready":"failed",progress:u.jobId?100:0,stageLabel:u.jobId?"KB package ready for project-context refresh.":"KB preprocessing could not finish.",updatedAt:new Date().toISOString(),contextRefreshPending:!!u.jobId,autoApplyToContext:!1,error:s}})}:c});const o=a().jobsByProject[i];o!=null&&o.jobId&&Lf(o.jobId,{status:"ready",progress:100,stageLabel:"KB package ready for project-context refresh.",error:s}).catch(()=>{console.error("Failed to persist deferred KB context-refresh state")})},clearProjectJob:i=>{qc(i),t(s=>{const o={...s.jobsByProject};return delete o[i],{jobsByProject:Ga(o)}})}})),j8="enigma_project_sessions",fg="enigma_current_project";function k9(){try{const t=localStorage.getItem(j8);if(!t)return new Map;const a=JSON.parse(t);return new Map(Object.entries(a))}catch{return new Map}}function hg(t){try{const a=Object.fromEntries(t);localStorage.setItem(j8,JSON.stringify(a))}catch{console.error("Failed to save project sessions to localStorage")}}const Yc=Ar((t,a)=>({sessions:k9(),saveProjectSession:(i,s)=>t(o=>{const c=new Map(o.sessions),h={...c.get(i)||{slug:i,lastActiveAt:new Date().toISOString(),currentPhaseNumber:0,messages:[],isStreaming:!1,activeGateKey:null,inputDraft:""},...s,slug:i,lastActiveAt:new Date().toISOString()};return c.set(i,h),hg(c),_S(i,h),{sessions:c}}),getProjectSession:i=>a().sessions.get(i)||null,clearProjectSession:i=>t(s=>{const o=new Map(s.sessions);return o.delete(i),hg(o),{sessions:o}}),setCurrentProject:i=>{try{localStorage.setItem(fg,i)}catch{console.error("Failed to save current project")}},getCurrentProject:()=>{try{return localStorage.getItem(fg)}catch{return null}}})),uu=new Map;function z9(t,a){uu.set(t,a)}function B9(t){return uu.get(t)??null}function U9(t){uu.delete(t)}function Z9(t){for(const a of t)uu.delete(a)}const P9={1:"bg-lemon-500",2:"bg-slushie-500",3:"bg-ube-300",4:"bg-matcha-300",5:"bg-blueberry-800",6:"bg-pomegranate-400",7:"bg-ube-800"},F9={1:"Onboarding",2:"Discover",3:"Ideate",4:"Design",5:"Plan",6:"Deliver",7:"Measure"};function I9({project:t,isActive:a}){const i=no(),s=Bt(S=>S.removeProject),o=Bt(S=>S.clearProject),c=$l(S=>S.clearProjectArtifacts),u=Vn(S=>S.clearProjectJob),h=Yc(S=>S.clearProjectSession),g=P9[t.current_phase]??"bg-border",p=F9[t.current_phase]??`Phase ${t.current_phase}`,b=t.status==="onboarding";function v(){i(b?`/setup/${t.slug}`:`/project/${t.slug}`)}function E(S){if(S.stopPropagation(),S.preventDefault(),!!window.confirm(`Delete "${t.name}"?`)){try{localStorage.removeItem(`enigma_stream_${t.slug}`)}catch{}Z9(t.kb_files.map(w=>w.id)),c(t.slug),u(t.slug),h(t.slug),s(t.slug),a&&(o(),i("/"))}}return y.jsxs("div",{className:"group relative",children:[y.jsxs("button",{onClick:v,"aria-current":a?"page":void 0,"aria-label":`${t.name}, ${p} phase${t.status==="gate-pending"?", gate review pending":""}`,className:Ya("w-full flex items-center gap-3 px-3 py-2.5 pr-8 rounded-card text-left cursor-pointer transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary",a?"bg-card border border-border shadow-clay text-text-primary":"text-text-secondary hover:bg-[rgba(0,0,0,0.04)] hover:text-text-primary"),children:[y.jsx("span",{className:Ya("w-2 h-2 rounded-full flex-shrink-0",g),"aria-hidden":"true"}),y.jsxs("span",{className:"flex-1 min-w-0",children:[y.jsx("span",{className:"block text-button-small font-medium truncate",children:t.name}),y.jsx("span",{className:"block text-small text-text-tertiary truncate",children:p})]}),t.status==="gate-pending"&&y.jsx("span",{className:"flex-shrink-0 w-1.5 h-1.5 rounded-full bg-lemon-500","aria-hidden":"true",title:"Gate review pending"})]}),y.jsx("button",{type:"button",onClick:E,"aria-label":`Delete ${t.name}`,className:Ya("absolute right-1.5 top-1/2 -translate-y-1/2","w-6 h-6 flex items-center justify-center rounded-card","opacity-0 group-hover:opacity-100 transition-opacity duration-100","text-text-tertiary hover:text-pomegranate-400","focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary"),children:y.jsx(ES,{size:13,"aria-hidden":"true"})})]})}function G9(){const t=Bt(g=>g.projects),a=Bt(g=>g.clearProject),{pathname:i}=za(),s=no(),o=Sr(g=>g.user),c=Sr(g=>g.disconnect),u=i.startsWith("/project/")||i.startsWith("/setup/")?i.split("/")[2]??null:null;function h(){sessionStorage.setItem("enigma_skip_restore_once","true"),a(),s("/setup")}return y.jsxs("nav",{"aria-label":"Projects navigation",className:"w-[260px] flex-shrink-0 flex flex-col h-full border-r border-border bg-canvas",children:[y.jsx("div",{className:"h-14 flex items-center px-4 border-b border-border",children:y.jsx(J0,{to:"/",className:`text-feature-title font-features-display text-text-primary font-semibold
|
|
62
|
+
tracking-tight hover:opacity-80 transition-opacity focus-visible:outline-none
|
|
63
|
+
focus-visible:ring-2 focus-visible:ring-text-primary rounded-sharp`,"aria-label":"DesignX — go to home",children:"DesignX"})}),y.jsx("div",{className:"px-3 pt-3",children:y.jsxs("button",{type:"button",onClick:h,className:`flex items-center gap-2 w-full px-3 py-2.5 rounded-card
|
|
64
|
+
bg-card border border-border shadow-clay
|
|
65
|
+
text-button-small font-medium text-text-primary
|
|
66
|
+
hover:-translate-y-0.5 hover:shadow-hover-subtle
|
|
67
|
+
transition-all duration-100
|
|
68
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary`,"aria-label":"Start a new project",children:[y.jsx(vS,{size:14,weight:"bold","aria-hidden":"true"}),"New Project"]})}),y.jsx("hr",{className:"mx-3 mt-3 border-border","aria-hidden":"true"}),y.jsx("div",{className:"flex-1 overflow-y-auto py-2 px-2",children:t.length===0?y.jsx("p",{className:"px-3 py-2 text-small text-text-tertiary",role:"status",children:"No projects yet"}):y.jsx("ul",{role:"list",className:"space-y-0.5",children:t.map(g=>y.jsx("li",{role:"listitem",children:y.jsx(I9,{project:g,isActive:g.slug===u})},g.id))})}),o&&y.jsx("div",{className:"p-3",children:y.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1.5 rounded-card",children:[y.jsx("img",{src:o.avatar_url,alt:`${o.login}'s avatar`,className:"w-5 h-5 rounded-full flex-shrink-0"}),y.jsxs("span",{className:"text-caption text-text-secondary truncate flex-1",children:["@",o.login]}),y.jsx("button",{onClick:c,"aria-label":"Disconnect GitHub Copilot",className:`text-small text-text-tertiary hover:text-pomegranate-400 transition-colors
|
|
69
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary rounded-sharp`,children:"Disconnect"})]})})]})}const $9="modulepreload",q9=function(t){return"/"+t},mg={},Kc=function(a,i,s){let o=Promise.resolve();if(i&&i.length>0){let u=function(p){return Promise.all(p.map(b=>Promise.resolve(b).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),g=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));o=u(i.map(p=>{if(p=q9(p),p in mg)return;mg[p]=!0;const b=p.endsWith(".css"),v=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${v}`))return;const E=document.createElement("link");if(E.rel=b?"stylesheet":$9,b||(E.as="script"),E.crossOrigin="",E.href=p,g&&E.setAttribute("nonce",g),document.head.appendChild(E),b)return new Promise((S,w)=>{E.addEventListener("load",S),E.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return o.then(u=>{for(const h of u||[])h.status==="rejected"&&c(h.reason);return a().catch(c)})},n1=d.createContext({});function a1(t){const a=d.useRef(null);return a.current===null&&(a.current=t()),a.current}const Y9=typeof window<"u",_8=Y9?d.useLayoutEffect:d.useEffect,du=d.createContext(null);function r1(t,a){t.indexOf(a)===-1&&t.push(a)}function Xc(t,a){const i=t.indexOf(a);i>-1&&t.splice(i,1)}const Qa=(t,a,i)=>i>a?a:i<t?t:i;let i1=()=>{};const li={},D8=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function O8(t){return typeof t=="object"&&t!==null}const L8=t=>/^0[^.\s]+$/u.test(t);function V8(t){let a;return()=>(a===void 0&&(a=t()),a)}const Aa=t=>t,K9=(t,a)=>i=>a(t(i)),ro=(...t)=>t.reduce(K9),ql=(t,a,i)=>{const s=a-t;return s===0?1:(i-t)/s};class s1{constructor(){this.subscriptions=[]}add(a){return r1(this.subscriptions,a),()=>Xc(this.subscriptions,a)}notify(a,i,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](a,i,s);else for(let c=0;c<o;c++){const u=this.subscriptions[c];u&&u(a,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ia=t=>t*1e3,Sa=t=>t/1e3;function H8(t,a){return a?t*(1e3/a):0}const k8=(t,a,i)=>(((1-3*i+3*a)*t+(3*i-6*a))*t+3*a)*t,X9=1e-7,Q9=12;function J9(t,a,i,s,o){let c,u,h=0;do u=a+(i-a)/2,c=k8(u,s,o)-t,c>0?i=u:a=u;while(Math.abs(c)>X9&&++h<Q9);return u}function io(t,a,i,s){if(t===a&&i===s)return Aa;const o=c=>J9(c,0,1,t,i);return c=>c===0||c===1?c:k8(o(c),a,s)}const z8=t=>a=>a<=.5?t(2*a)/2:(2-t(2*(1-a)))/2,B8=t=>a=>1-t(1-a),U8=io(.33,1.53,.69,.99),l1=B8(U8),Z8=z8(l1),P8=t=>t>=1?1:(t*=2)<1?.5*l1(t):.5*(2-Math.pow(2,-10*(t-1))),o1=t=>1-Math.sin(Math.acos(t)),F8=B8(o1),I8=z8(o1),W9=io(.42,0,1,1),ew=io(0,0,.58,1),G8=io(.42,0,.58,1),tw=t=>Array.isArray(t)&&typeof t[0]!="number",$8=t=>Array.isArray(t)&&typeof t[0]=="number",nw={linear:Aa,easeIn:W9,easeInOut:G8,easeOut:ew,circIn:o1,circInOut:I8,circOut:F8,backIn:l1,backInOut:Z8,backOut:U8,anticipate:P8},aw=t=>typeof t=="string",pg=t=>{if($8(t)){i1(t.length===4);const[a,i,s,o]=t;return io(a,i,s,o)}else if(aw(t))return nw[t];return t},Sc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rw(t,a){let i=new Set,s=new Set,o=!1,c=!1;const u=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function g(b){u.has(b)&&(p.schedule(b),t()),b(h)}const p={schedule:(b,v=!1,E=!1)=>{const w=E&&o?i:s;return v&&u.add(b),w.add(b),b},cancel:b=>{s.delete(b),u.delete(b)},process:b=>{if(h=b,o){c=!0;return}o=!0;const v=i;i=s,s=v,i.forEach(g),i.clear(),o=!1,c&&(c=!1,p.process(b))}};return p}const iw=40;function q8(t,a){let i=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,u=Sc.reduce((L,B)=>(L[B]=rw(c),L),{}),{setup:h,read:g,resolveKeyframes:p,preUpdate:b,update:v,preRender:E,render:S,postRender:w}=u,T=()=>{const L=li.useManualTiming,B=L?o.timestamp:performance.now();i=!1,L||(o.delta=s?1e3/60:Math.max(Math.min(B-o.timestamp,iw),1)),o.timestamp=B,o.isProcessing=!0,h.process(o),g.process(o),p.process(o),b.process(o),v.process(o),E.process(o),S.process(o),w.process(o),o.isProcessing=!1,i&&a&&(s=!1,t(T))},M=()=>{i=!0,s=!0,o.isProcessing||t(T)};return{schedule:Sc.reduce((L,B)=>{const U=u[B];return L[B]=(le,ne=!1,_=!1)=>(i||M(),U.schedule(le,ne,_)),L},{}),cancel:L=>{for(let B=0;B<Sc.length;B++)u[Sc[B]].cancel(L)},state:o,steps:u}}const{schedule:zt,cancel:oi,state:Rn,steps:Vf}=q8(typeof requestAnimationFrame<"u"?requestAnimationFrame:Aa,!0);let Vc;function sw(){Vc=void 0}const Bn={now:()=>(Vc===void 0&&Bn.set(Rn.isProcessing||li.useManualTiming?Rn.timestamp:performance.now()),Vc),set:t=>{Vc=t,queueMicrotask(sw)}},Y8=t=>a=>typeof a=="string"&&a.startsWith(t),K8=Y8("--"),lw=Y8("var(--"),c1=t=>lw(t)?ow.test(t.split("/*")[0].trim()):!1,ow=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gg(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Rs={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yl={...Rs,transform:t=>Qa(0,1,t)},wc={...Rs,default:1},zl=t=>Math.round(t*1e5)/1e5,u1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cw(t){return t==null}const uw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,d1=(t,a)=>i=>!!(typeof i=="string"&&uw.test(i)&&i.startsWith(t)||a&&!cw(i)&&Object.prototype.hasOwnProperty.call(i,a)),X8=(t,a,i)=>s=>{if(typeof s!="string")return s;const[o,c,u,h]=s.match(u1);return{[t]:parseFloat(o),[a]:parseFloat(c),[i]:parseFloat(u),alpha:h!==void 0?parseFloat(h):1}},dw=t=>Qa(0,255,t),Hf={...Rs,transform:t=>Math.round(dw(t))},ji={test:d1("rgb","red"),parse:X8("red","green","blue"),transform:({red:t,green:a,blue:i,alpha:s=1})=>"rgba("+Hf.transform(t)+", "+Hf.transform(a)+", "+Hf.transform(i)+", "+zl(Yl.transform(s))+")"};function fw(t){let a="",i="",s="",o="";return t.length>5?(a=t.substring(1,3),i=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(a=t.substring(1,2),i=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),a+=a,i+=i,s+=s,o+=o),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const f0={test:d1("#"),parse:fw,transform:ji.transform},so=t=>({test:a=>typeof a=="string"&&a.endsWith(t)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${t}`}),ti=so("deg"),Ka=so("%"),Be=so("px"),hw=so("vh"),mw=so("vw"),yg={...Ka,parse:t=>Ka.parse(t)/100,transform:t=>Ka.transform(t*100)},bs={test:d1("hsl","hue"),parse:X8("hue","saturation","lightness"),transform:({hue:t,saturation:a,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+Ka.transform(zl(a))+", "+Ka.transform(zl(i))+", "+zl(Yl.transform(s))+")"},mn={test:t=>ji.test(t)||f0.test(t)||bs.test(t),parse:t=>ji.test(t)?ji.parse(t):bs.test(t)?bs.parse(t):f0.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ji.transform(t):bs.transform(t),getAnimatableNone:t=>{const a=mn.parse(t);return a.alpha=0,mn.transform(a)}},pw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gw(t){var a,i;return isNaN(t)&&typeof t=="string"&&(((a=t.match(u1))==null?void 0:a.length)||0)+(((i=t.match(pw))==null?void 0:i.length)||0)>0}const Q8="number",J8="color",yw="var",bw="var(",bg="${}",vw=/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 As(t){const a=t.toString(),i=[],s={color:[],number:[],var:[]},o=[];let c=0;const h=a.replace(vw,g=>(mn.test(g)?(s.color.push(c),o.push(J8),i.push(mn.parse(g))):g.startsWith(bw)?(s.var.push(c),o.push(yw),i.push(g)):(s.number.push(c),o.push(Q8),i.push(parseFloat(g))),++c,bg)).split(bg);return{values:i,split:h,indexes:s,types:o}}function xw(t){return As(t).values}function W8({split:t,types:a}){const i=t.length;return s=>{let o="";for(let c=0;c<i;c++)if(o+=t[c],s[c]!==void 0){const u=a[c];u===Q8?o+=zl(s[c]):u===J8?o+=mn.transform(s[c]):o+=s[c]}return o}}function Ew(t){return W8(As(t))}const Sw=t=>typeof t=="number"?0:mn.test(t)?mn.getAnimatableNone(t):t,ww=(t,a)=>typeof t=="number"?a!=null&&a.trim().endsWith("/")?t:0:Sw(t);function Aw(t){const a=As(t);return W8(a)(a.values.map((s,o)=>ww(s,a.split[o])))}const Ha={test:gw,parse:xw,createTransformer:Ew,getAnimatableNone:Aw};function kf(t,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(a-t)*6*i:i<1/2?a:i<2/3?t+(a-t)*(2/3-i)*6:t}function Mw({hue:t,saturation:a,lightness:i,alpha:s}){t/=360,a/=100,i/=100;let o=0,c=0,u=0;if(!a)o=c=u=i;else{const h=i<.5?i*(1+a):i+a-i*a,g=2*i-h;o=kf(g,h,t+1/3),c=kf(g,h,t),u=kf(g,h,t-1/3)}return{red:Math.round(o*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:s}}function Qc(t,a){return i=>i>0?a:t}const Ft=(t,a,i)=>t+(a-t)*i,zf=(t,a,i)=>{const s=t*t,o=i*(a*a-s)+s;return o<0?0:Math.sqrt(o)},Tw=[f0,ji,bs],Cw=t=>Tw.find(a=>a.test(t));function vg(t){const a=Cw(t);if(!a)return!1;let i=a.parse(t);return a===bs&&(i=Mw(i)),i}const xg=(t,a)=>{const i=vg(t),s=vg(a);if(!i||!s)return Qc(t,a);const o={...i};return c=>(o.red=zf(i.red,s.red,c),o.green=zf(i.green,s.green,c),o.blue=zf(i.blue,s.blue,c),o.alpha=Ft(i.alpha,s.alpha,c),ji.transform(o))},h0=new Set(["none","hidden"]);function Rw(t,a){return h0.has(t)?i=>i<=0?t:a:i=>i>=1?a:t}function Nw(t,a){return i=>Ft(t,a,i)}function f1(t){return typeof t=="number"?Nw:typeof t=="string"?c1(t)?Qc:mn.test(t)?xg:Dw:Array.isArray(t)?e6:typeof t=="object"?mn.test(t)?xg:jw:Qc}function e6(t,a){const i=[...t],s=i.length,o=t.map((c,u)=>f1(c)(c,a[u]));return c=>{for(let u=0;u<s;u++)i[u]=o[u](c);return i}}function jw(t,a){const i={...t,...a},s={};for(const o in i)t[o]!==void 0&&a[o]!==void 0&&(s[o]=f1(t[o])(t[o],a[o]));return o=>{for(const c in s)i[c]=s[c](o);return i}}function _w(t,a){const i=[],s={color:0,var:0,number:0};for(let o=0;o<a.values.length;o++){const c=a.types[o],u=t.indexes[c][s[c]],h=t.values[u]??0;i[o]=h,s[c]++}return i}const Dw=(t,a)=>{const i=Ha.createTransformer(a),s=As(t),o=As(a);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?h0.has(t)&&!o.values.length||h0.has(a)&&!s.values.length?Rw(t,a):ro(e6(_w(s,o),o.values),i):Qc(t,a)};function t6(t,a,i){return typeof t=="number"&&typeof a=="number"&&typeof i=="number"?Ft(t,a,i):f1(t)(t,a)}const Ow=t=>{const a=({timestamp:i})=>t(i);return{start:(i=!0)=>zt.update(a,i),stop:()=>oi(a),now:()=>Rn.isProcessing?Rn.timestamp:Bn.now()}},n6=(t,a,i=10)=>{let s="";const o=Math.max(Math.round(a/i),2);for(let c=0;c<o;c++)s+=Math.round(t(c/(o-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jc=2e4;function h1(t){let a=0;const i=50;let s=t.next(a);for(;!s.done&&a<Jc;)a+=i,s=t.next(a);return a>=Jc?1/0:a}function Lw(t,a=100,i){const s=i({...t,keyframes:[0,a]}),o=Math.min(h1(s),Jc);return{type:"keyframes",ease:c=>s.next(o*c).value/a,duration:Sa(o)}}const en={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 m0(t,a){return t*Math.sqrt(1-a*a)}const Vw=12;function Hw(t,a,i){let s=i;for(let o=1;o<Vw;o++)s=s-t(s)/a(s);return s}const Bf=.001;function kw({duration:t=en.duration,bounce:a=en.bounce,velocity:i=en.velocity,mass:s=en.mass}){let o,c,u=1-a;u=Qa(en.minDamping,en.maxDamping,u),t=Qa(en.minDuration,en.maxDuration,Sa(t)),u<1?(o=p=>{const b=p*u,v=b*t,E=b-i,S=m0(p,u),w=Math.exp(-v);return Bf-E/S*w},c=p=>{const v=p*u*t,E=v*i+i,S=Math.pow(u,2)*Math.pow(p,2)*t,w=Math.exp(-v),T=m0(Math.pow(p,2),u);return(-o(p)+Bf>0?-1:1)*((E-S)*w)/T}):(o=p=>{const b=Math.exp(-p*t),v=(p-i)*t+1;return-Bf+b*v},c=p=>{const b=Math.exp(-p*t),v=(i-p)*(t*t);return b*v});const h=5/t,g=Hw(o,c,h);if(t=ia(t),isNaN(g))return{stiffness:en.stiffness,damping:en.damping,duration:t};{const p=Math.pow(g,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const zw=["duration","bounce"],Bw=["stiffness","damping","mass"];function Eg(t,a){return a.some(i=>t[i]!==void 0)}function Uw(t){let a={velocity:en.velocity,stiffness:en.stiffness,damping:en.damping,mass:en.mass,isResolvedFromDuration:!1,...t};if(!Eg(t,Bw)&&Eg(t,zw))if(a.velocity=0,t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(i*1.2),o=s*s,c=2*Qa(.05,1,1-(t.bounce||0))*Math.sqrt(o);a={...a,mass:en.mass,stiffness:o,damping:c}}else{const i=kw({...t,velocity:0});a={...a,...i,mass:en.mass},a.isResolvedFromDuration=!0}return a}function Wc(t=en.visualDuration,a=en.bounce){const i=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:a}:t;let{restSpeed:s,restDelta:o}=i;const c=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],h={done:!1,value:c},{stiffness:g,damping:p,mass:b,duration:v,velocity:E,isResolvedFromDuration:S}=Uw({...i,velocity:-Sa(i.velocity||0)}),w=E||0,T=p/(2*Math.sqrt(g*b)),M=u-c,j=Sa(Math.sqrt(g/b)),R=Math.abs(M)<5;s||(s=R?en.restSpeed.granular:en.restSpeed.default),o||(o=R?en.restDelta.granular:en.restDelta.default);let L,B,U,le,ne,_;if(T<1)U=m0(j,T),le=(w+T*j*M)/U,L=ae=>{const ie=Math.exp(-T*j*ae);return u-ie*(le*Math.sin(U*ae)+M*Math.cos(U*ae))},ne=T*j*le+M*U,_=T*j*M-le*U,B=ae=>Math.exp(-T*j*ae)*(ne*Math.sin(U*ae)+_*Math.cos(U*ae));else if(T===1){L=ie=>u-Math.exp(-j*ie)*(M+(w+j*M)*ie);const ae=w+j*M;B=ie=>Math.exp(-j*ie)*(j*ae*ie-w)}else{const ae=j*Math.sqrt(T*T-1);L=fe=>{const ye=Math.exp(-T*j*fe),H=Math.min(ae*fe,300);return u-ye*((w+T*j*M)*Math.sinh(H)+ae*M*Math.cosh(H))/ae};const ie=(w+T*j*M)/ae,Q=T*j*ie-M*ae,pe=T*j*M-ie*ae;B=fe=>{const ye=Math.exp(-T*j*fe),H=Math.min(ae*fe,300);return ye*(Q*Math.sinh(H)+pe*Math.cosh(H))}}const ee={calculatedDuration:S&&v||null,velocity:ae=>ia(B(ae)),next:ae=>{if(!S&&T<1){const Q=Math.exp(-T*j*ae),pe=Math.sin(U*ae),fe=Math.cos(U*ae),ye=u-Q*(le*pe+M*fe),H=ia(Q*(ne*pe+_*fe));return h.done=Math.abs(H)<=s&&Math.abs(u-ye)<=o,h.value=h.done?u:ye,h}const ie=L(ae);if(S)h.done=ae>=v;else{const Q=ia(B(ae));h.done=Math.abs(Q)<=s&&Math.abs(u-ie)<=o}return h.value=h.done?u:ie,h},toString:()=>{const ae=Math.min(h1(ee),Jc),ie=n6(Q=>ee.next(ae*Q).value,ae,30);return ae+"ms "+ie},toTransition:()=>{}};return ee}Wc.applyToOptions=t=>{const a=Lw(t,100,Wc);return t.ease=a.ease,t.duration=ia(a.duration),t.type="keyframes",t};const Zw=5;function a6(t,a,i){const s=Math.max(a-Zw,0);return H8(i-t(s),a-s)}function p0({keyframes:t,velocity:a=0,power:i=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:c=500,modifyTarget:u,min:h,max:g,restDelta:p=.5,restSpeed:b}){const v=t[0],E={done:!1,value:v},S=_=>h!==void 0&&_<h||g!==void 0&&_>g,w=_=>h===void 0?g:g===void 0||Math.abs(h-_)<Math.abs(g-_)?h:g;let T=i*a;const M=v+T,j=u===void 0?M:u(M);j!==M&&(T=j-v);const R=_=>-T*Math.exp(-_/s),L=_=>j+R(_),B=_=>{const ee=R(_),ae=L(_);E.done=Math.abs(ee)<=p,E.value=E.done?j:ae};let U,le;const ne=_=>{S(E.value)&&(U=_,le=Wc({keyframes:[E.value,w(E.value)],velocity:a6(L,_,E.value),damping:o,stiffness:c,restDelta:p,restSpeed:b}))};return ne(0),{calculatedDuration:null,next:_=>{let ee=!1;return!le&&U===void 0&&(ee=!0,B(_),ne(_)),U!==void 0&&_>=U?le.next(_-U):(!ee&&B(_),E)}}}function Pw(t,a,i){const s=[],o=i||li.mix||t6,c=t.length-1;for(let u=0;u<c;u++){let h=o(t[u],t[u+1]);if(a){const g=Array.isArray(a)?a[u]||Aa:a;h=ro(g,h)}s.push(h)}return s}function Fw(t,a,{clamp:i=!0,ease:s,mixer:o}={}){const c=t.length;if(i1(c===a.length),c===1)return()=>a[0];if(c===2&&a[0]===a[1])return()=>a[1];const u=t[0]===t[1];t[0]>t[c-1]&&(t=[...t].reverse(),a=[...a].reverse());const h=Pw(a,s,o),g=h.length,p=b=>{if(u&&b<t[0])return a[0];let v=0;if(g>1)for(;v<t.length-2&&!(b<t[v+1]);v++);const E=ql(t[v],t[v+1],b);return h[v](E)};return i?b=>p(Qa(t[0],t[c-1],b)):p}function Iw(t,a){const i=t[t.length-1];for(let s=1;s<=a;s++){const o=ql(0,a,s);t.push(Ft(i,1,o))}}function Gw(t){const a=[0];return Iw(a,t.length-1),a}function $w(t,a){return t.map(i=>i*a)}function qw(t,a){return t.map(()=>a||G8).splice(0,t.length-1)}function Bl({duration:t=300,keyframes:a,times:i,ease:s="easeInOut"}){const o=tw(s)?s.map(pg):pg(s),c={done:!1,value:a[0]},u=$w(i&&i.length===a.length?i:Gw(a),t),h=Fw(u,a,{ease:Array.isArray(o)?o:qw(a,o)});return{calculatedDuration:t,next:g=>(c.value=h(g),c.done=g>=t,c)}}const Yw=t=>t!==null;function fu(t,{repeat:a,repeatType:i="loop"},s,o=1){const c=t.filter(Yw),h=o<0||a&&i!=="loop"&&a%2===1?0:c.length-1;return!h||s===void 0?c[h]:s}const Kw={decay:p0,inertia:p0,tween:Bl,keyframes:Bl,spring:Wc};function r6(t){typeof t.type=="string"&&(t.type=Kw[t.type])}class m1{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,i){return this.finished.then(a,i)}}const Xw=t=>t/100;class eu extends m1{constructor(a){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=()=>{var s,o;const{motionValue:i}=this.options;i&&i.updatedAt!==Bn.now()&&this.tick(Bn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(s=this.options).onStop)==null||o.call(s))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;r6(a);const{type:i=Bl,repeat:s=0,repeatDelay:o=0,repeatType:c,velocity:u=0}=a;let{keyframes:h}=a;const g=i||Bl;g!==Bl&&typeof h[0]!="number"&&(this.mixKeyframes=ro(Xw,t6(h[0],h[1])),h=[0,100]);const p=g({...a,keyframes:h});c==="mirror"&&(this.mirroredGenerator=g({...a,keyframes:[...h].reverse(),velocity:-u})),p.calculatedDuration===null&&(p.calculatedDuration=h1(p));const{calculatedDuration:b}=p;this.calculatedDuration=b,this.resolvedDuration=b+o,this.totalDuration=this.resolvedDuration*(s+1)-o,this.generator=p}updateTime(a){const i=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(a,i=!1){const{generator:s,totalDuration:o,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:h,calculatedDuration:g}=this;if(this.startTime===null)return s.next(0);const{delay:p=0,keyframes:b,repeat:v,repeatType:E,repeatDelay:S,type:w,onUpdate:T,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-o/this.speed,this.startTime)),i?this.currentTime=a:this.updateTime(a);const j=this.currentTime-p*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let L=this.currentTime,B=s;if(v){const _=Math.min(this.currentTime,o)/h;let ee=Math.floor(_),ae=_%1;!ae&&_>=1&&(ae=1),ae===1&&ee--,ee=Math.min(ee,v+1),!!(ee%2)&&(E==="reverse"?(ae=1-ae,S&&(ae-=S/h)):E==="mirror"&&(B=u)),L=Qa(0,1,ae)*h}let U;R?(this.delayState.value=b[0],U=this.delayState):U=B.next(L),c&&!R&&(U.value=c(U.value));let{done:le}=U;!R&&g!==null&&(le=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const ne=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&le);return ne&&w!==p0&&(U.value=fu(b,this.options,M,this.speed)),T&&T(U.value),ne&&this.finish(),U}then(a,i){return this.finished.then(a,i)}get duration(){return Sa(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Sa(a)}get time(){return Sa(this.currentTime)}set time(a){a=ia(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const i=this.generator.next(a).value;return a6(s=>this.generator.next(s).value,a,i)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;i&&this.driver&&this.updateTime(Bn.now()),this.playbackSpeed=a,i&&this.driver&&(this.time=Sa(this.currentTime))}play(){var o,c;if(this.isStopped)return;const{driver:a=Ow,startTime:i}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),(c=(o=this.options).onPlay)==null||c.call(o);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),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(Bn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,i;this.notifyFinished(),this.teardown(),this.state="finished",(i=(a=this.options).onComplete)==null||i.call(a)}cancel(){var a,i;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(i=(a=this.options).onCancel)==null||i.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var i;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(i=this.driver)==null||i.stop(),a.observe(this)}}function Qw(t){for(let a=1;a<t.length;a++)t[a]??(t[a]=t[a-1])}const _i=t=>t*180/Math.PI,g0=t=>{const a=_i(Math.atan2(t[1],t[0]));return y0(a)},Jw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:g0,rotateZ:g0,skewX:t=>_i(Math.atan(t[1])),skewY:t=>_i(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},y0=t=>(t=t%360,t<0&&(t+=360),t),Sg=g0,wg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ag=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ww={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wg,scaleY:Ag,scale:t=>(wg(t)+Ag(t))/2,rotateX:t=>y0(_i(Math.atan2(t[6],t[5]))),rotateY:t=>y0(_i(Math.atan2(-t[2],t[0]))),rotateZ:Sg,rotate:Sg,skewX:t=>_i(Math.atan(t[4])),skewY:t=>_i(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function b0(t){return t.includes("scale")?1:0}function v0(t,a){if(!t||t==="none")return b0(a);const i=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,o;if(i)s=Ww,o=i;else{const h=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Jw,o=h}if(!o)return b0(a);const c=s[a],u=o[1].split(",").map(tA);return typeof c=="function"?c(u):u[c]}const eA=(t,a)=>{const{transform:i="none"}=getComputedStyle(t);return v0(i,a)};function tA(t){return parseFloat(t.trim())}const Ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],js=new Set(Ns),Mg=t=>t===Rs||t===Be,nA=new Set(["x","y","z"]),aA=Ns.filter(t=>!nA.has(t));function rA(t){const a=[];return aA.forEach(i=>{const s=t.getValue(i);s!==void 0&&(a.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),a}const si={width:({x:t},{paddingLeft:a="0",paddingRight:i="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(a)-parseFloat(i)},height:({y:t},{paddingTop:a="0",paddingBottom:i="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(a)-parseFloat(i)},top:(t,{top:a})=>parseFloat(a),left:(t,{left:a})=>parseFloat(a),bottom:({y:t},{top:a})=>parseFloat(a)+(t.max-t.min),right:({x:t},{left:a})=>parseFloat(a)+(t.max-t.min),x:(t,{transform:a})=>v0(a,"x"),y:(t,{transform:a})=>v0(a,"y")};si.translateX=si.x;si.translateY=si.y;const Di=new Set;let x0=!1,E0=!1,S0=!1;function i6(){if(E0){const t=Array.from(Di).filter(s=>s.needsMeasurement),a=new Set(t.map(s=>s.element)),i=new Map;a.forEach(s=>{const o=rA(s);o.length&&(i.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),a.forEach(s=>{s.render();const o=i.get(s);o&&o.forEach(([c,u])=>{var h;(h=s.getValue(c))==null||h.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}E0=!1,x0=!1,Di.forEach(t=>t.complete(S0)),Di.clear()}function s6(){Di.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(E0=!0)})}function iA(){S0=!0,s6(),i6(),S0=!1}class p1{constructor(a,i,s,o,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=s,this.motionValue=o,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Di.add(this),x0||(x0=!0,zt.read(s6),zt.resolveKeyframes(i6))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:s,motionValue:o}=this;if(a[0]===null){const c=o==null?void 0:o.get(),u=a[a.length-1];if(c!==void 0)a[0]=c;else if(s&&i){const h=s.readValue(i,u);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=u),o&&c===void 0&&o.set(a[0])}Qw(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Di.delete(this)}cancel(){this.state==="scheduled"&&(Di.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sA=t=>t.startsWith("--");function l6(t,a,i){sA(a)?t.style.setProperty(a,i):t.style[a]=i}const lA={};function o6(t,a){const i=V8(t);return()=>lA[a]??i()}const oA=o6(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),c6=o6(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hl=([t,a,i,s])=>`cubic-bezier(${t}, ${a}, ${i}, ${s})`,Tg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hl([0,.65,.55,1]),circOut:Hl([.55,0,1,.45]),backIn:Hl([.31,.01,.66,-.59]),backOut:Hl([.33,1.53,.69,.99])};function u6(t,a){if(t)return typeof t=="function"?c6()?n6(t,a):"ease-out":$8(t)?Hl(t):Array.isArray(t)?t.map(i=>u6(i,a)||Tg.easeOut):Tg[t]}function cA(t,a,i,{delay:s=0,duration:o=300,repeat:c=0,repeatType:u="loop",ease:h="easeOut",times:g}={},p=void 0){const b={[a]:i};g&&(b.offset=g);const v=u6(h,o);Array.isArray(v)&&(b.easing=v);const E={delay:s,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return p&&(E.pseudoElement=p),t.animate(b,E)}function d6(t){return typeof t=="function"&&"applyToOptions"in t}function uA({type:t,...a}){return d6(t)&&c6()?t.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class f6 extends m1{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:i,name:s,keyframes:o,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:h,onComplete:g}=a;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=a,i1(typeof a.type!="string");const p=uA(a);this.animation=cA(i,s,o,p,c),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const b=fu(o,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(b),l6(i,s,b),this.animation.cancel()}g==null||g(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,i;(i=(a=this.animation).finish)==null||i.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var i,s,o;const a=(i=this.options)==null?void 0:i.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((o=(s=this.animation).commitStyles)==null||o.call(s))}get duration(){var i,s;const a=((s=(i=this.animation.effect)==null?void 0:i.getComputedTiming)==null?void 0:s.call(i).duration)||0;return Sa(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Sa(a)}get time(){return Sa(Number(this.animation.currentTime)||0)}set time(a){const i=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ia(a),i&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:i,rangeEnd:s,observe:o}){var c;return this.allowFlatten&&((c=this.animation.effect)==null||c.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&oA()?(this.animation.timeline=a,i&&(this.animation.rangeStart=i),s&&(this.animation.rangeEnd=s),Aa):o(this)}}const h6={anticipate:P8,backInOut:Z8,circInOut:I8};function dA(t){return t in h6}function fA(t){typeof t.ease=="string"&&dA(t.ease)&&(t.ease=h6[t.ease])}const Uf=10;class hA extends f6{constructor(a){fA(a),r6(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:i,onUpdate:s,onComplete:o,element:c,...u}=this.options;if(!i)return;if(a!==void 0){i.set(a);return}const h=new eu({...u,autoplay:!1}),g=Math.max(Uf,Bn.now()-this.startTime),p=Qa(0,Uf,g-Uf),b=h.sample(g).value,{name:v}=this.options;c&&v&&l6(c,v,b),i.setWithVelocity(h.sample(Math.max(0,g-p)).value,b,p),h.stop()}}const Cg=(t,a)=>a==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ha.test(t)||t==="0")&&!t.startsWith("url("));function mA(t){const a=t[0];if(t.length===1)return!0;for(let i=0;i<t.length;i++)if(t[i]!==a)return!0}function pA(t,a,i,s){const o=t[0];if(o===null)return!1;if(a==="display"||a==="visibility")return!0;const c=t[t.length-1],u=Cg(o,a),h=Cg(c,a);return!u||!h?!1:mA(t)||(i==="spring"||d6(i))&&s}function w0(t){t.duration=0,t.type="keyframes"}const m6=new Set(["opacity","clipPath","filter","transform"]),gA=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function yA(t){for(let a=0;a<t.length;a++)if(typeof t[a]=="string"&&gA.test(t[a]))return!0;return!1}const bA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),vA=V8(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function xA(t){var v;const{motionValue:a,name:i,repeatDelay:s,repeatType:o,damping:c,type:u,keyframes:h}=t;if(!(((v=a==null?void 0:a.owner)==null?void 0:v.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:b}=a.owner.getProps();return vA()&&i&&(m6.has(i)||bA.has(i)&&yA(h))&&(i!=="transform"||!b)&&!p&&!s&&o!=="mirror"&&c!==0&&u!=="inertia"}const EA=40;class SA extends m1{constructor({autoplay:a=!0,delay:i=0,type:s="keyframes",repeat:o=0,repeatDelay:c=0,repeatType:u="loop",keyframes:h,name:g,motionValue:p,element:b,...v}){var w;super(),this.stop=()=>{var T,M;this._animation&&(this._animation.stop(),(T=this.stopTimeline)==null||T.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=Bn.now();const E={autoplay:a,delay:i,type:s,repeat:o,repeatDelay:c,repeatType:u,name:g,motionValue:p,element:b,...v},S=(b==null?void 0:b.KeyframeResolver)||p1;this.keyframeResolver=new S(h,(T,M,j)=>this.onKeyframesResolved(T,M,E,!j),g,p,b),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(a,i,s,o){var j,R;this.keyframeResolver=void 0;const{name:c,type:u,velocity:h,delay:g,isHandoff:p,onUpdate:b}=s;this.resolvedAt=Bn.now();let v=!0;pA(a,c,u,h)||(v=!1,(li.instantAnimations||!g)&&(b==null||b(fu(a,s,i))),a[0]=a[a.length-1],w0(s),s.repeat=0);const S={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>EA?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:a},w=v&&!p&&xA(S),T=(R=(j=S.motionValue)==null?void 0:j.owner)==null?void 0:R.current;let M;if(w)try{M=new hA({...S,element:T})}catch{M=new eu(S)}else M=new eu(S);M.finished.then(()=>{this.notifyFinished()}).catch(Aa),this.pendingTimeline&&(this.stopTimeline=M.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=M}get finished(){return this._animation?this.animation.finished:this._finished}then(a,i){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),iA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function p6(t,a,i,s=0,o=1){const c=Array.from(t).sort((p,b)=>p.sortNodePosition(b)).indexOf(a),u=t.size,h=(u-1)*s;return typeof i=="function"?i(c,u):o===1?c*s:h-c*s}const wA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function AA(t){const a=wA.exec(t);if(!a)return[,];const[,i,s,o]=a;return[`--${i??s}`,o]}function g6(t,a,i=1){const[s,o]=AA(t);if(!s)return;const c=window.getComputedStyle(a).getPropertyValue(s);if(c){const u=c.trim();return D8(u)?parseFloat(u):u}return c1(o)?g6(o,a,i+1):o}const MA={type:"spring",stiffness:500,damping:25,restSpeed:10},TA=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),CA={type:"keyframes",duration:.8},RA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},NA=(t,{keyframes:a})=>a.length>2?CA:js.has(t)?t.startsWith("scale")?TA(a[1]):MA:RA;function y6(t,a){if(t!=null&&t.inherit&&a){const{inherit:i,...s}=t;return{...a,...s}}return t}function g1(t,a){const i=(t==null?void 0:t[a])??(t==null?void 0:t.default)??t;return i!==t?y6(i,t):i}const jA=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function _A(t){for(const a in t)if(!jA.has(a))return!0;return!1}const y1=(t,a,i,s={},o,c)=>u=>{const h=g1(s,t)||{},g=h.delay||s.delay||0;let{elapsed:p=0}=s;p=p-ia(g);const b={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-p,onUpdate:E=>{a.set(E),h.onUpdate&&h.onUpdate(E)},onComplete:()=>{u(),h.onComplete&&h.onComplete()},name:t,motionValue:a,element:c?void 0:o};_A(h)||Object.assign(b,NA(t,b)),b.duration&&(b.duration=ia(b.duration)),b.repeatDelay&&(b.repeatDelay=ia(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let v=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(w0(b),b.delay===0&&(v=!0)),(li.instantAnimations||li.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(v=!0,w0(b),b.delay=0),b.allowFlatten=!h.type&&!h.ease,v&&!c&&a.get()!==void 0){const E=fu(b.keyframes,h);if(E!==void 0){zt.update(()=>{b.onUpdate(E),b.onComplete()});return}}return h.isSync?new eu(b):new SA(b)};function Rg(t){const a=[{},{}];return t==null||t.values.forEach((i,s)=>{a[0][s]=i.get(),a[1][s]=i.getVelocity()}),a}function b1(t,a,i,s){if(typeof a=="function"){const[o,c]=Rg(s);a=a(i!==void 0?i:t.custom,o,c)}if(typeof a=="string"&&(a=t.variants&&t.variants[a]),typeof a=="function"){const[o,c]=Rg(s);a=a(i!==void 0?i:t.custom,o,c)}return a}function Oi(t,a,i){const s=t.getProps();return b1(s,a,i!==void 0?i:s.custom,t)}const b6=new Set(["width","height","top","left","right","bottom",...Ns]),Ng=30,DA=t=>!isNaN(parseFloat(t));class OA{constructor(a,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var c;const o=Bn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((c=this.events.change)==null||c.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Bn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=DA(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new s1);const s=this.events[a].add(i);return a==="change"?()=>{s(),zt.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-s}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Ng)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Ng);return H8(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,i;(a=this.dependents)==null||a.clear(),(i=this.events.destroy)==null||i.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ms(t,a){return new OA(t,a)}const A0=t=>Array.isArray(t);function LA(t,a,i){t.hasValue(a)?t.getValue(a).set(i):t.addValue(a,Ms(i))}function VA(t){return A0(t)?t[t.length-1]||0:t}function HA(t,a){const i=Oi(t,a);let{transitionEnd:s={},transition:o={},...c}=i||{};c={...c,...s};for(const u in c){const h=VA(c[u]);LA(t,u,h)}}const Nn=t=>!!(t&&t.getVelocity);function kA(t){return!!(Nn(t)&&t.add)}function M0(t,a){const i=t.getValue("willChange");if(kA(i))return i.add(a);if(!i&&li.WillChange){const s=new li.WillChange("auto");t.addValue("willChange",s),s.add(a)}}function v1(t){return t.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const zA="framerAppearId",v6="data-"+v1(zA);function x6(t){return t.props[v6]}function BA({protectedKeys:t,needsAnimating:a},i){const s=t.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,s}function E6(t,a,{delay:i=0,transitionOverride:s,type:o}={}){let{transition:c,transitionEnd:u,...h}=a;const g=t.getDefaultTransition();c=c?y6(c,g):g;const p=c==null?void 0:c.reduceMotion;s&&(c=s);const b=[],v=o&&t.animationState&&t.animationState.getState()[o];for(const E in h){const S=t.getValue(E,t.latestValues[E]??null),w=h[E];if(w===void 0||v&&BA(v,E))continue;const T={delay:i,...g1(c||{},E)},M=S.get();if(M!==void 0&&!S.isAnimating()&&!Array.isArray(w)&&w===M&&!T.velocity){zt.update(()=>S.set(w));continue}let j=!1;if(window.MotionHandoffAnimation){const B=x6(t);if(B){const U=window.MotionHandoffAnimation(B,E,zt);U!==null&&(T.startTime=U,j=!0)}}M0(t,E);const R=p??t.shouldReduceMotion;S.start(y1(E,S,w,R&&b6.has(E)?{type:!1}:T,t,j));const L=S.animation;L&&b.push(L)}if(u){const E=()=>zt.update(()=>{u&&HA(t,u)});b.length?Promise.all(b).then(E):E()}return b}function T0(t,a,i={}){var g;const s=Oi(t,a,i.type==="exit"?(g=t.presenceContext)==null?void 0:g.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(o=i.transitionOverride);const c=s?()=>Promise.all(E6(t,s,i)):()=>Promise.resolve(),u=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:b=0,staggerChildren:v,staggerDirection:E}=o;return UA(t,a,p,b,v,E,i)}:()=>Promise.resolve(),{when:h}=o;if(h){const[p,b]=h==="beforeChildren"?[c,u]:[u,c];return p().then(()=>b())}else return Promise.all([c(),u(i.delay)])}function UA(t,a,i=0,s=0,o=0,c=1,u){const h=[];for(const g of t.variantChildren)g.notify("AnimationStart",a),h.push(T0(g,a,{...u,delay:i+(typeof s=="function"?0:s)+p6(t.variantChildren,g,s,o,c)}).then(()=>g.notify("AnimationComplete",a)));return Promise.all(h)}function ZA(t,a,i={}){t.notify("AnimationStart",a);let s;if(Array.isArray(a)){const o=a.map(c=>T0(t,c,i));s=Promise.all(o)}else if(typeof a=="string")s=T0(t,a,i);else{const o=typeof a=="function"?Oi(t,a,i.custom):a;s=Promise.all(E6(t,o,i))}return s.then(()=>{t.notify("AnimationComplete",a)})}const PA={test:t=>t==="auto",parse:t=>t},S6=t=>a=>a.test(t),w6=[Rs,Be,Ka,ti,mw,hw,PA],jg=t=>w6.find(S6(t));function FA(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||L8(t):!0}const IA=new Set(["brightness","contrast","saturate","opacity"]);function GA(t){const[a,i]=t.slice(0,-1).split("(");if(a==="drop-shadow")return t;const[s]=i.match(u1)||[];if(!s)return t;const o=i.replace(s,"");let c=IA.has(a)?1:0;return s!==i&&(c*=100),a+"("+c+o+")"}const $A=/\b([a-z-]*)\(.*?\)/gu,C0={...Ha,getAnimatableNone:t=>{const a=t.match($A);return a?a.map(GA).join(" "):t}},R0={...Ha,getAnimatableNone:t=>{const a=Ha.parse(t);return Ha.createTransformer(t)(a.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},_g={...Rs,transform:Math.round},qA={rotate:ti,rotateX:ti,rotateY:ti,rotateZ:ti,scale:wc,scaleX:wc,scaleY:wc,scaleZ:wc,skew:ti,skewX:ti,skewY:ti,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:Yl,originX:yg,originY:yg,originZ:Be},x1={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,inset:Be,insetBlock:Be,insetBlockStart:Be,insetBlockEnd:Be,insetInline:Be,insetInlineStart:Be,insetInlineEnd:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,paddingBlock:Be,paddingBlockStart:Be,paddingBlockEnd:Be,paddingInline:Be,paddingInlineStart:Be,paddingInlineEnd:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,marginBlock:Be,marginBlockStart:Be,marginBlockEnd:Be,marginInline:Be,marginInlineStart:Be,marginInlineEnd:Be,fontSize:Be,backgroundPositionX:Be,backgroundPositionY:Be,...qA,zIndex:_g,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:_g},YA={...x1,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:C0,WebkitFilter:C0,mask:R0,WebkitMask:R0},A6=t=>YA[t],KA=new Set([C0,R0]);function M6(t,a){let i=A6(t);return KA.has(i)||(i=Ha),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const XA=new Set(["auto","none","0"]);function QA(t,a,i){let s=0,o;for(;s<t.length&&!o;){const c=t[s];typeof c=="string"&&!XA.has(c)&&As(c).values.length&&(o=t[s]),s++}if(o&&i)for(const c of a)t[c]=M6(i,o)}class JA extends p1{constructor(a,i,s,o,c){super(a,i,s,o,c,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let b=0;b<a.length;b++){let v=a[b];if(typeof v=="string"&&(v=v.trim(),c1(v))){const E=g6(v,i.current);E!==void 0&&(a[b]=E),b===a.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!b6.has(s)||a.length!==2)return;const[o,c]=a,u=jg(o),h=jg(c),g=gg(o),p=gg(c);if(g!==p&&si[s]){this.needsMeasurement=!0;return}if(u!==h)if(Mg(u)&&Mg(h))for(let b=0;b<a.length;b++){const v=a[b];typeof v=="string"&&(a[b]=parseFloat(v))}else si[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,s=[];for(let o=0;o<a.length;o++)(a[o]===null||FA(a[o]))&&s.push(o);s.length&&QA(a,s,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:s}=this;if(!a||!a.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=si[s](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&a.getValue(s,o).jump(o,!1)}measureEndState(){var h;const{element:a,name:i,unresolvedKeyframes:s}=this;if(!a||!a.current)return;const o=a.getValue(i);o&&o.jump(this.measuredOrigin,!1);const c=s.length-1,u=s[c];s[c]=si[i](a.measureViewportBox(),window.getComputedStyle(a.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),(h=this.removedTransforms)!=null&&h.length&&this.removedTransforms.forEach(([g,p])=>{a.getValue(g).set(p)}),this.resolveNoneKeyframes()}}function T6(t,a,i){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const o=(i==null?void 0:i[t])??s.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(s=>s!=null)}const C6=(t,a)=>a&&typeof t=="number"?a.transform(t):t;function Hc(t){return O8(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:E1}=q8(queueMicrotask,!1),La={x:!1,y:!1};function R6(){return La.x||La.y}function WA(t){return t==="x"||t==="y"?La[t]?null:(La[t]=!0,()=>{La[t]=!1}):La.x||La.y?null:(La.x=La.y=!0,()=>{La.x=La.y=!1})}function N6(t,a){const i=T6(t),s=new AbortController,o={passive:!0,...a,signal:s.signal};return[i,o,()=>s.abort()]}function e7(t){return!(t.pointerType==="touch"||R6())}function t7(t,a,i={}){const[s,o,c]=N6(t,i);return s.forEach(u=>{let h=!1,g=!1,p;const b=()=>{u.removeEventListener("pointerleave",w)},v=M=>{p&&(p(M),p=void 0),b()},E=M=>{h=!1,window.removeEventListener("pointerup",E),window.removeEventListener("pointercancel",E),g&&(g=!1,v(M))},S=()=>{h=!0,window.addEventListener("pointerup",E,o),window.addEventListener("pointercancel",E,o)},w=M=>{if(M.pointerType!=="touch"){if(h){g=!0;return}v(M)}},T=M=>{if(!e7(M))return;g=!1;const j=a(u,M);typeof j=="function"&&(p=j,u.addEventListener("pointerleave",w,o))};u.addEventListener("pointerenter",T,o),u.addEventListener("pointerdown",S,o)}),c}const j6=(t,a)=>a?t===a?!0:j6(t,a.parentElement):!1,S1=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,n7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function a7(t){return n7.has(t.tagName)||t.isContentEditable===!0}const r7=new Set(["INPUT","SELECT","TEXTAREA"]);function i7(t){return r7.has(t.tagName)||t.isContentEditable===!0}const kc=new WeakSet;function Dg(t){return a=>{a.key==="Enter"&&t(a)}}function Zf(t,a){t.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const s7=(t,a)=>{const i=t.currentTarget;if(!i)return;const s=Dg(()=>{if(kc.has(i))return;Zf(i,"down");const o=Dg(()=>{Zf(i,"up")}),c=()=>Zf(i,"cancel");i.addEventListener("keyup",o,a),i.addEventListener("blur",c,a)});i.addEventListener("keydown",s,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),a)};function Og(t){return S1(t)&&!R6()}const Lg=new WeakSet;function l7(t,a,i={}){const[s,o,c]=N6(t,i),u=h=>{const g=h.currentTarget;if(!Og(h)||Lg.has(h))return;kc.add(g),i.stopPropagation&&Lg.add(h);const p=a(g,h),b=(S,w)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",E),kc.has(g)&&kc.delete(g),Og(S)&&typeof p=="function"&&p(S,{success:w})},v=S=>{b(S,g===window||g===document||i.useGlobalTarget||j6(g,S.target))},E=S=>{b(S,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",E,o)};return s.forEach(h=>{(i.useGlobalTarget?window:h).addEventListener("pointerdown",u,o),Hc(h)&&(h.addEventListener("focus",p=>s7(p,o)),!a7(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),c}function w1(t){return O8(t)&&"ownerSVGElement"in t}const zc=new WeakMap;let ni;const _6=(t,a,i)=>(s,o)=>o&&o[0]?o[0][t+"Size"]:w1(s)&&"getBBox"in s?s.getBBox()[a]:s[i],o7=_6("inline","width","offsetWidth"),c7=_6("block","height","offsetHeight");function u7({target:t,borderBoxSize:a}){var i;(i=zc.get(t))==null||i.forEach(s=>{s(t,{get width(){return o7(t,a)},get height(){return c7(t,a)}})})}function d7(t){t.forEach(u7)}function f7(){typeof ResizeObserver>"u"||(ni=new ResizeObserver(d7))}function h7(t,a){ni||f7();const i=T6(t);return i.forEach(s=>{let o=zc.get(s);o||(o=new Set,zc.set(s,o)),o.add(a),ni==null||ni.observe(s)}),()=>{i.forEach(s=>{const o=zc.get(s);o==null||o.delete(a),o!=null&&o.size||ni==null||ni.unobserve(s)})}}const Bc=new Set;let vs;function m7(){vs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Bc.forEach(a=>a(t))},window.addEventListener("resize",vs)}function p7(t){return Bc.add(t),vs||m7(),()=>{Bc.delete(t),!Bc.size&&typeof vs=="function"&&(window.removeEventListener("resize",vs),vs=void 0)}}function Vg(t,a){return typeof t=="function"?p7(t):h7(t,a)}function g7(t){return w1(t)&&t.tagName==="svg"}const y7=[...w6,mn,Ha],b7=t=>y7.find(S6(t)),Hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),xs=()=>({x:Hg(),y:Hg()}),kg=()=>({min:0,max:0}),yn=()=>({x:kg(),y:kg()}),v7=new WeakMap;function hu(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Kl(t){return typeof t=="string"||Array.isArray(t)}const A1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],M1=["initial",...A1];function mu(t){return hu(t.animate)||M1.some(a=>Kl(t[a]))}function D6(t){return!!(mu(t)||t.variants)}function x7(t,a,i){for(const s in a){const o=a[s],c=i[s];if(Nn(o))t.addValue(s,o);else if(Nn(c))t.addValue(s,Ms(o,{owner:t}));else if(c!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,Ms(u!==void 0?u:o,{owner:t}))}}for(const s in i)a[s]===void 0&&t.removeValue(s);return a}const N0={current:null},O6={current:!1},E7=typeof window<"u";function S7(){if(O6.current=!0,!!E7)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),a=()=>N0.current=t.matches;t.addEventListener("change",a),a()}else N0.current=!1}const zg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let tu={};function L6(t){tu=t}function w7(){return tu}class A7{scrapeMotionValuesFromProps(a,i,s){return{}}constructor({parent:a,props:i,presenceContext:s,reducedMotionConfig:o,skipAnimations:c,blockInitialAnimation:u,visualState:h},g={}){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=p1,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=()=>{const S=Bn.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,zt.render(this.render,!1,!0))};const{latestValues:p,renderState:b}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=i.initial?{...p}:{},this.renderState=b,this.parent=a,this.props=i,this.presenceContext=s,this.depth=a?a.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=c,this.options=g,this.blockInitialAnimation=!!u,this.isControllingVariants=mu(i),this.isVariantNode=D6(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,...E}=this.scrapeMotionValuesFromProps(i,{},this);for(const S in E){const w=E[S];p[S]!==void 0&&Nn(w)&&w.set(p[S])}}mount(a){var i,s;if(this.hasBeenMounted)for(const o in this.initialValues)(i=this.values.get(o))==null||i.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=a,v7.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,c)=>this.bindToMotionValue(c,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(O6.current||S7(),this.shouldReduceMotion=N0.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),oi(this.notifyUpdate),oi(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const s=this.features[i];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,i){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),i.accelerate&&m6.has(a)&&this.current instanceof HTMLElement){const{factory:u,keyframes:h,times:g,ease:p,duration:b}=i.accelerate,v=new f6({element:this.current,name:a,keyframes:h,times:g,ease:p,duration:ia(b)}),E=u(v);this.valueSubscriptions.set(a,()=>{E(),v.cancel()});return}const s=js.has(a);s&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",u=>{this.latestValues[a]=u,this.props.onUpdate&&zt.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{o(),c&&c(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in tu){const i=tu[a];if(!i)continue;const{isEnabled:s,Feature:o}=i;if(!this.features[a]&&o&&s(this.props)&&(this.features[a]=new o(this)),this.features[a]){const c=this.features[a];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yn()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<zg.length;s++){const o=zg[s];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const c="on"+o,u=a[c];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=x7(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]: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(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const s=this.values.get(a);i!==s&&(s&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let s=this.values.get(a);return s===void 0&&i!==void 0&&(s=Ms(i===null?void 0:i,{owner:this}),this.addValue(a,s)),s}readValue(a,i){let s=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return s!=null&&(typeof s=="string"&&(D8(s)||L8(s))?s=parseFloat(s):!b7(s)&&Ha.test(i)&&(s=M6(a,i)),this.setBaseTarget(a,Nn(s)?s.get():s)),Nn(s)?s.get():s}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var c;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const u=b1(this.props,i,(c=this.presenceContext)==null?void 0:c.custom);u&&(s=u[a])}if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,a);return o!==void 0&&!Nn(o)?o:this.initialValues[a]!==void 0&&s===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new s1),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}scheduleRenderMicrotask(){E1.render(this.render)}}class V6 extends A7{constructor(){super(...arguments),this.KeyframeResolver=JA}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){const s=a.style;return s?s[i]:void 0}removeValueFromRenderState(a,{vars:i,style:s}){delete i[a],delete s[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Nn(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}class ci{constructor(a){this.isMounted=!1,this.node=a}update(){}}function H6({top:t,left:a,right:i,bottom:s}){return{x:{min:a,max:i},y:{min:t,max:s}}}function M7({x:t,y:a}){return{top:a.min,right:t.max,bottom:a.max,left:t.min}}function T7(t,a){if(!a)return t;const i=a({x:t.left,y:t.top}),s=a({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function Pf(t){return t===void 0||t===1}function j0({scale:t,scaleX:a,scaleY:i}){return!Pf(t)||!Pf(a)||!Pf(i)}function Ri(t){return j0(t)||k6(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function k6(t){return Bg(t.x)||Bg(t.y)}function Bg(t){return t&&t!=="0%"}function nu(t,a,i){const s=t-i,o=a*s;return i+o}function Ug(t,a,i,s,o){return o!==void 0&&(t=nu(t,o,s)),nu(t,i,s)+a}function _0(t,a=0,i=1,s,o){t.min=Ug(t.min,a,i,s,o),t.max=Ug(t.max,a,i,s,o)}function z6(t,{x:a,y:i}){_0(t.x,a.translate,a.scale,a.originPoint),_0(t.y,i.translate,i.scale,i.originPoint)}const Zg=.999999999999,Pg=1.0000000000001;function C7(t,a,i,s=!1){var h;const o=i.length;if(!o)return;a.x=a.y=1;let c,u;for(let g=0;g<o;g++){c=i[g],u=c.projectionDelta;const{visualElement:p}=c.options;p&&p.props.style&&p.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(qa(t.x,-c.scroll.offset.x),qa(t.y,-c.scroll.offset.y)),u&&(a.x*=u.x.scale,a.y*=u.y.scale,z6(t,u)),s&&Ri(c.latestValues)&&Uc(t,c.latestValues,(h=c.layout)==null?void 0:h.layoutBox))}a.x<Pg&&a.x>Zg&&(a.x=1),a.y<Pg&&a.y>Zg&&(a.y=1)}function qa(t,a){t.min+=a,t.max+=a}function Fg(t,a,i,s,o=.5){const c=Ft(t.min,t.max,o);_0(t,a,i,c,s)}function Ig(t,a){return typeof t=="string"?parseFloat(t)/100*(a.max-a.min):t}function Uc(t,a,i){const s=i??t;Fg(t.x,Ig(a.x,s.x),a.scaleX,a.scale,a.originX),Fg(t.y,Ig(a.y,s.y),a.scaleY,a.scale,a.originY)}function B6(t,a){return H6(T7(t.getBoundingClientRect(),a))}function R7(t,a,i){const s=B6(t,i),{scroll:o}=a;return o&&(qa(s.x,o.offset.x),qa(s.y,o.offset.y)),s}const N7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},j7=Ns.length;function _7(t,a,i){let s="",o=!0;for(let c=0;c<j7;c++){const u=Ns[c],h=t[u];if(h===void 0)continue;let g=!0;if(typeof h=="number")g=h===(u.startsWith("scale")?1:0);else{const p=parseFloat(h);g=u.startsWith("scale")?p===1:p===0}if(!g||i){const p=C6(h,x1[u]);if(!g){o=!1;const b=N7[u]||u;s+=`${b}(${p}) `}i&&(a[u]=p)}}return s=s.trim(),i?s=i(a,o?"":s):o&&(s="none"),s}function T1(t,a,i){const{style:s,vars:o,transformOrigin:c}=t;let u=!1,h=!1;for(const g in a){const p=a[g];if(js.has(g)){u=!0;continue}else if(K8(g)){o[g]=p;continue}else{const b=C6(p,x1[g]);g.startsWith("origin")?(h=!0,c[g]=b):s[g]=b}}if(a.transform||(u||i?s.transform=_7(a,t.transform,i):s.transform&&(s.transform="none")),h){const{originX:g="50%",originY:p="50%",originZ:b=0}=c;s.transformOrigin=`${g} ${p} ${b}`}}function U6(t,{style:a,vars:i},s,o){const c=t.style;let u;for(u in a)c[u]=a[u];o==null||o.applyProjectionStyles(c,s);for(u in i)c.setProperty(u,i[u])}function Gg(t,a){return a.max===a.min?0:t/(a.max-a.min)*100}const Cl={correct:(t,a)=>{if(!a.target)return t;if(typeof t=="string")if(Be.test(t))t=parseFloat(t);else return t;const i=Gg(t,a.target.x),s=Gg(t,a.target.y);return`${i}% ${s}%`}},D7={correct:(t,{treeScale:a,projectionDelta:i})=>{const s=t,o=Ha.parse(t);if(o.length>5)return s;const c=Ha.createTransformer(t),u=typeof o[0]!="number"?1:0,h=i.x.scale*a.x,g=i.y.scale*a.y;o[0+u]/=h,o[1+u]/=g;const p=Ft(h,g,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),c(o)}},D0={borderRadius:{...Cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cl,borderTopRightRadius:Cl,borderBottomLeftRadius:Cl,borderBottomRightRadius:Cl,boxShadow:D7};function Z6(t,{layout:a,layoutId:i}){return js.has(t)||t.startsWith("origin")||(a||i!==void 0)&&(!!D0[t]||t==="opacity")}function C1(t,a,i){var u;const s=t.style,o=a==null?void 0:a.style,c={};if(!s)return c;for(const h in s)(Nn(s[h])||o&&Nn(o[h])||Z6(h,t)||((u=i==null?void 0:i.getValue(h))==null?void 0:u.liveStyle)!==void 0)&&(c[h]=s[h]);return c}function O7(t){return window.getComputedStyle(t)}class L7 extends V6{constructor(){super(...arguments),this.type="html",this.renderInstance=U6}readValueFromInstance(a,i){var s;if(js.has(i))return(s=this.projection)!=null&&s.isProjecting?b0(i):eA(a,i);{const o=O7(a),c=(K8(i)?o.getPropertyValue(i):o[i])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(a,{transformPagePoint:i}){return B6(a,i)}build(a,i,s){T1(a,i,s.transformTemplate)}scrapeMotionValuesFromProps(a,i,s){return C1(a,i,s)}}const V7={offset:"stroke-dashoffset",array:"stroke-dasharray"},H7={offset:"strokeDashoffset",array:"strokeDasharray"};function k7(t,a,i=1,s=0,o=!0){t.pathLength=1;const c=o?V7:H7;t[c.offset]=`${-s}`,t[c.array]=`${a} ${i}`}const z7=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function P6(t,{attrX:a,attrY:i,attrScale:s,pathLength:o,pathSpacing:c=1,pathOffset:u=0,...h},g,p,b){if(T1(t,h,p),g){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:v,style:E}=t;v.transform&&(E.transform=v.transform,delete v.transform),(E.transform||v.transformOrigin)&&(E.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),E.transform&&(E.transformBox=(b==null?void 0:b.transformBox)??"fill-box",delete v.transformBox);for(const S of z7)v[S]!==void 0&&(E[S]=v[S],delete v[S]);a!==void 0&&(v.x=a),i!==void 0&&(v.y=i),s!==void 0&&(v.scale=s),o!==void 0&&k7(v,o,c,u,!1)}const F6=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"]),I6=t=>typeof t=="string"&&t.toLowerCase()==="svg";function B7(t,a,i,s){U6(t,a,void 0,s);for(const o in a.attrs)t.setAttribute(F6.has(o)?o:v1(o),a.attrs[o])}function G6(t,a,i){const s=C1(t,a,i);for(const o in t)if(Nn(t[o])||Nn(a[o])){const c=Ns.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[c]=t[o]}return s}class U7 extends V6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yn}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(js.has(i)){const s=A6(i);return s&&s.default||0}return i=F6.has(i)?i:v1(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,s){return G6(a,i,s)}build(a,i,s){P6(a,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(a,i,s,o){B7(a,i,s,o)}mount(a){this.isSVGTag=I6(a.tagName),super.mount(a)}}const Z7=M1.length;function $6(t){if(!t)return;if(!t.isControllingVariants){const i=t.parent?$6(t.parent)||{}:{};return t.props.initial!==void 0&&(i.initial=t.props.initial),i}const a={};for(let i=0;i<Z7;i++){const s=M1[i],o=t.props[s];(Kl(o)||o===!1)&&(a[s]=o)}return a}function q6(t,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(a[s]!==t[s])return!1;return!0}const P7=[...A1].reverse(),F7=A1.length;function I7(t){return a=>Promise.all(a.map(({animation:i,options:s})=>ZA(t,i,s)))}function G7(t){let a=I7(t),i=$g(),s=!0,o=!1;const c=p=>(b,v)=>{var S;const E=Oi(t,v,p==="exit"?(S=t.presenceContext)==null?void 0:S.custom:void 0);if(E){const{transition:w,transitionEnd:T,...M}=E;b={...b,...M,...T}}return b};function u(p){a=p(t)}function h(p){const{props:b}=t,v=$6(t.parent)||{},E=[],S=new Set;let w={},T=1/0;for(let j=0;j<F7;j++){const R=P7[j],L=i[R],B=b[R]!==void 0?b[R]:v[R],U=Kl(B),le=R===p?L.isActive:null;le===!1&&(T=j);let ne=B===v[R]&&B!==b[R]&&U;if(ne&&(s||o)&&t.manuallyAnimateOnMount&&(ne=!1),L.protectedKeys={...w},!L.isActive&&le===null||!B&&!L.prevProp||hu(B)||typeof B=="boolean")continue;if(R==="exit"&&L.isActive&&le!==!0){L.prevResolvedValues&&(w={...w,...L.prevResolvedValues});continue}const _=$7(L.prevProp,B);let ee=_||R===p&&L.isActive&&!ne&&U||j>T&&U,ae=!1;const ie=Array.isArray(B)?B:[B];let Q=ie.reduce(c(R),{});le===!1&&(Q={});const{prevResolvedValues:pe={}}=L,fe={...pe,...Q},ye=Y=>{ee=!0,S.has(Y)&&(ae=!0,S.delete(Y)),L.needsAnimating[Y]=!0;const ue=t.getValue(Y);ue&&(ue.liveStyle=!1)};for(const Y in fe){const ue=Q[Y],Se=pe[Y];if(w.hasOwnProperty(Y))continue;let C=!1;A0(ue)&&A0(Se)?C=!q6(ue,Se):C=ue!==Se,C?ue!=null?ye(Y):S.add(Y):ue!==void 0&&S.has(Y)?ye(Y):L.protectedKeys[Y]=!0}L.prevProp=B,L.prevResolvedValues=Q,L.isActive&&(w={...w,...Q}),(s||o)&&t.blockInitialAnimation&&(ee=!1);const H=ne&&_;ee&&(!H||ae)&&E.push(...ie.map(Y=>{const ue={type:R};if(typeof Y=="string"&&(s||o)&&!H&&t.manuallyAnimateOnMount&&t.parent){const{parent:Se}=t,C=Oi(Se,Y);if(Se.enteringChildren&&C){const{delayChildren:q}=C.transition||{};ue.delay=p6(Se.enteringChildren,t,q)}}return{animation:Y,options:ue}}))}if(S.size){const j={};if(typeof b.initial!="boolean"){const R=Oi(t,Array.isArray(b.initial)?b.initial[0]:b.initial);R&&R.transition&&(j.transition=R.transition)}S.forEach(R=>{const L=t.getBaseTarget(R),B=t.getValue(R);B&&(B.liveStyle=!0),j[R]=L??null}),E.push({animation:j})}let M=!!E.length;return s&&(b.initial===!1||b.initial===b.animate)&&!t.manuallyAnimateOnMount&&(M=!1),s=!1,o=!1,M?a(E):Promise.resolve()}function g(p,b){var E;if(i[p].isActive===b)return Promise.resolve();(E=t.variantChildren)==null||E.forEach(S=>{var w;return(w=S.animationState)==null?void 0:w.setActive(p,b)}),i[p].isActive=b;const v=h(p);for(const S in i)i[S].protectedKeys={};return v}return{animateChanges:h,setActive:g,setAnimateFunction:u,getState:()=>i,reset:()=>{i=$g(),o=!0}}}function $7(t,a){return typeof a=="string"?a!==t:Array.isArray(a)?!q6(a,t):!1}function Ti(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $g(){return{animate:Ti(!0),whileInView:Ti(),whileHover:Ti(),whileTap:Ti(),whileDrag:Ti(),whileFocus:Ti(),exit:Ti()}}function O0(t,a){t.min=a.min,t.max=a.max}function Oa(t,a){O0(t.x,a.x),O0(t.y,a.y)}function qg(t,a){t.translate=a.translate,t.scale=a.scale,t.originPoint=a.originPoint,t.origin=a.origin}const Y6=1e-4,q7=1-Y6,Y7=1+Y6,K6=.01,K7=0-K6,X7=0+K6;function Un(t){return t.max-t.min}function Q7(t,a,i){return Math.abs(t-a)<=i}function Yg(t,a,i,s=.5){t.origin=s,t.originPoint=Ft(a.min,a.max,t.origin),t.scale=Un(i)/Un(a),t.translate=Ft(i.min,i.max,t.origin)-t.originPoint,(t.scale>=q7&&t.scale<=Y7||isNaN(t.scale))&&(t.scale=1),(t.translate>=K7&&t.translate<=X7||isNaN(t.translate))&&(t.translate=0)}function Ul(t,a,i,s){Yg(t.x,a.x,i.x,s?s.originX:void 0),Yg(t.y,a.y,i.y,s?s.originY:void 0)}function Kg(t,a,i,s=0){const o=s?Ft(i.min,i.max,s):i.min;t.min=o+a.min,t.max=t.min+Un(a)}function J7(t,a,i,s){Kg(t.x,a.x,i.x,s==null?void 0:s.x),Kg(t.y,a.y,i.y,s==null?void 0:s.y)}function Xg(t,a,i,s=0){const o=s?Ft(i.min,i.max,s):i.min;t.min=a.min-o,t.max=t.min+Un(a)}function au(t,a,i,s){Xg(t.x,a.x,i.x,s==null?void 0:s.x),Xg(t.y,a.y,i.y,s==null?void 0:s.y)}function Qg(t,a,i,s,o){return t-=a,t=nu(t,1/i,s),o!==void 0&&(t=nu(t,1/o,s)),t}function W7(t,a=0,i=1,s=.5,o,c=t,u=t){if(Ka.test(a)&&(a=parseFloat(a),a=Ft(u.min,u.max,a/100)-u.min),typeof a!="number")return;let h=Ft(c.min,c.max,s);t===c&&(h-=a),t.min=Qg(t.min,a,i,h,o),t.max=Qg(t.max,a,i,h,o)}function Jg(t,a,[i,s,o],c,u){W7(t,a[i],a[s],a[o],a.scale,c,u)}const eM=["x","scaleX","originX"],tM=["y","scaleY","originY"];function Wg(t,a,i,s){Jg(t.x,a,eM,i?i.x:void 0,s?s.x:void 0),Jg(t.y,a,tM,i?i.y:void 0,s?s.y:void 0)}function ey(t){return t.translate===0&&t.scale===1}function X6(t){return ey(t.x)&&ey(t.y)}function ty(t,a){return t.min===a.min&&t.max===a.max}function nM(t,a){return ty(t.x,a.x)&&ty(t.y,a.y)}function ny(t,a){return Math.round(t.min)===Math.round(a.min)&&Math.round(t.max)===Math.round(a.max)}function Q6(t,a){return ny(t.x,a.x)&&ny(t.y,a.y)}function ay(t){return Un(t.x)/Un(t.y)}function ry(t,a){return t.translate===a.translate&&t.scale===a.scale&&t.originPoint===a.originPoint}function $a(t){return[t("x"),t("y")]}function aM(t,a,i){let s="";const o=t.x.translate/a.x,c=t.y.translate/a.y,u=(i==null?void 0:i.z)||0;if((o||c||u)&&(s=`translate3d(${o}px, ${c}px, ${u}px) `),(a.x!==1||a.y!==1)&&(s+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:p,rotate:b,rotateX:v,rotateY:E,skewX:S,skewY:w}=i;p&&(s=`perspective(${p}px) ${s}`),b&&(s+=`rotate(${b}deg) `),v&&(s+=`rotateX(${v}deg) `),E&&(s+=`rotateY(${E}deg) `),S&&(s+=`skewX(${S}deg) `),w&&(s+=`skewY(${w}deg) `)}const h=t.x.scale*a.x,g=t.y.scale*a.y;return(h!==1||g!==1)&&(s+=`scale(${h}, ${g})`),s||"none"}const J6=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],rM=J6.length,iy=t=>typeof t=="string"?parseFloat(t):t,sy=t=>typeof t=="number"||Be.test(t);function iM(t,a,i,s,o,c){o?(t.opacity=Ft(0,i.opacity??1,sM(s)),t.opacityExit=Ft(a.opacity??1,0,lM(s))):c&&(t.opacity=Ft(a.opacity??1,i.opacity??1,s));for(let u=0;u<rM;u++){const h=J6[u];let g=ly(a,h),p=ly(i,h);if(g===void 0&&p===void 0)continue;g||(g=0),p||(p=0),g===0||p===0||sy(g)===sy(p)?(t[h]=Math.max(Ft(iy(g),iy(p),s),0),(Ka.test(p)||Ka.test(g))&&(t[h]+="%")):t[h]=p}(a.rotate||i.rotate)&&(t.rotate=Ft(a.rotate||0,i.rotate||0,s))}function ly(t,a){return t[a]!==void 0?t[a]:t.borderRadius}const sM=W6(0,.5,F8),lM=W6(.5,.95,Aa);function W6(t,a,i){return s=>s<t?0:s>a?1:i(ql(t,a,s))}function oM(t,a,i){const s=Nn(t)?t:Ms(t);return s.start(y1("",s,a,i)),s.animation}function Xl(t,a,i,s={passive:!0}){return t.addEventListener(a,i,s),()=>t.removeEventListener(a,i)}const cM=(t,a)=>t.depth-a.depth;class uM{constructor(){this.children=[],this.isDirty=!1}add(a){r1(this.children,a),this.isDirty=!0}remove(a){Xc(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(cM),this.isDirty=!1,this.children.forEach(a)}}function dM(t,a){const i=Bn.now(),s=({timestamp:o})=>{const c=o-i;c>=a&&(oi(s),t(c-a))};return zt.setup(s,!0),()=>oi(s)}function Zc(t){return Nn(t)?t.get():t}class fM{constructor(){this.members=[]}add(a){r1(this.members,a);for(let i=this.members.length-1;i>=0;i--){const s=this.members[i];if(s===a||s===this.lead||s===this.prevLead)continue;const o=s.instance;(!o||o.isConnected===!1)&&!s.snapshot&&(Xc(this.members,s),s.unmount())}a.scheduleRender()}remove(a){if(Xc(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){var i;for(let s=this.members.indexOf(a)-1;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1&&((i=o.instance)==null?void 0:i.isConnected)!==!1)return this.promote(o),!0}return!1}promote(a,i){var o;const s=this.lead;if(a!==s&&(this.prevLead=s,this.lead=a,a.show(),s)){s.updateSnapshot(),a.scheduleRender();const{layoutDependency:c}=s.options,{layoutDependency:u}=a.options;(c===void 0||c!==u)&&(a.resumeFrom=s,i&&(s.preserveOpacity=!0),s.snapshot&&(a.snapshot=s.snapshot,a.snapshot.latestValues=s.animationValues||s.latestValues),(o=a.root)!=null&&o.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var i,s,o,c,u;(s=(i=a.options).onExitComplete)==null||s.call(i),(u=(o=a.resumingFrom)==null?void 0:(c=o.options).onExitComplete)==null||u.call(c)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const Pc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ff=["","X","Y","Z"],hM=1e3;let mM=0;function If(t,a,i,s){const{latestValues:o}=a;o[t]&&(i[t]=o[t],a.setStaticValue(t,0),s&&(s[t]=0))}function eb(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:a}=t.options;if(!a)return;const i=x6(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:c}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",zt,!(o||c))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&eb(s)}function tb({attachResizeListener:t,defaultParent:a,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},h=a==null?void 0:a()){this.id=mM++,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,this.nodes.forEach(yM),this.nodes.forEach(wM),this.nodes.forEach(AM),this.nodes.forEach(bM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new uM)}addEventListener(u,h){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new s1),this.eventHandlers.get(u).add(h)}notifyListeners(u,...h){const g=this.eventHandlers.get(u);g&&g.notify(...h)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=w1(u)&&!g7(u),this.instance=u;const{layoutId:h,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(g||h)&&(this.isLayoutDirty=!0),t){let b,v=0;const E=()=>this.root.updateBlockedByResize=!1;zt.read(()=>{v=window.innerWidth}),t(u,()=>{const S=window.innerWidth;S!==v&&(v=S,this.root.updateBlockedByResize=!0,b&&b(),b=dM(E,250),Pc.hasAnimatedSinceResize&&(Pc.hasAnimatedSinceResize=!1,this.nodes.forEach(uy)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:v,hasRelativeLayoutChanged:E,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||p.getDefaultTransition()||NM,{onLayoutAnimationStart:T,onLayoutAnimationComplete:M}=p.getProps(),j=!this.targetLayout||!Q6(this.targetLayout,S),R=!v&&E;if(this.options.layoutRoot||this.resumeFrom||R||v&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...g1(w,"layout"),onPlay:T,onComplete:M};(p.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(b,R)}else v||uy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),oi(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(MM),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&eb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const v=this.path[b];v.shouldResetTransform=!0,(typeof v.latestValues.x=="string"||typeof v.latestValues.y=="string")&&(v.isLayoutDirty=!0),v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:h,layout:g}=this.options;if(h===void 0&&!g)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const g=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),g&&this.nodes.forEach(xM),this.nodes.forEach(oy);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(EM),this.nodes.forEach(SM),this.nodes.forEach(pM),this.nodes.forEach(gM)):this.nodes.forEach(cy),this.clearAllSnapshots();const h=Bn.now();Rn.delta=Qa(0,1e3/60,h-Rn.timestamp),Rn.timestamp=h,Rn.isProcessing=!0,Vf.update.process(Rn),Vf.preRender.process(Rn),Vf.render.process(Rn),Rn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,E1.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vM),this.sharedNodes.forEach(TM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Un(this.snapshot.measuredBox.x)&&!Un(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 g=0;g<this.path.length;g++)this.path[g].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=yn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(h=!1),h&&this.instance){const g=s(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:g,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!o)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!X6(this.projectionDelta),g=this.getTransformTemplate(),p=g?g(this.latestValues,""):void 0,b=p!==this.prevTransformTemplateValue;u&&this.instance&&(h||Ri(this.latestValues)||b)&&(o(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const h=this.measurePageBox();let g=this.removeElementScroll(h);return u&&(g=this.removeTransform(g)),jM(g),{animationId:this.root.animationId,measuredBox:h,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var p;const{visualElement:u}=this.options;if(!u)return yn();const h=u.measureViewportBox();if(!(((p=this.scroll)==null?void 0:p.wasRoot)||this.path.some(_M))){const{scroll:b}=this.root;b&&(qa(h.x,b.offset.x),qa(h.y,b.offset.y))}return h}removeElementScroll(u){var g;const h=yn();if(Oa(h,u),(g=this.scroll)!=null&&g.wasRoot)return h;for(let p=0;p<this.path.length;p++){const b=this.path[p],{scroll:v,options:E}=b;b!==this.root&&v&&E.layoutScroll&&(v.wasRoot&&Oa(h,u),qa(h.x,v.offset.x),qa(h.y,v.offset.y))}return h}applyTransform(u,h=!1,g){var b,v;const p=g||yn();Oa(p,u);for(let E=0;E<this.path.length;E++){const S=this.path[E];!h&&S.options.layoutScroll&&S.scroll&&S!==S.root&&(qa(p.x,-S.scroll.offset.x),qa(p.y,-S.scroll.offset.y)),Ri(S.latestValues)&&Uc(p,S.latestValues,(b=S.layout)==null?void 0:b.layoutBox)}return Ri(this.latestValues)&&Uc(p,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),p}removeTransform(u){var g;const h=yn();Oa(h,u);for(let p=0;p<this.path.length;p++){const b=this.path[p];if(!Ri(b.latestValues))continue;let v;b.instance&&(j0(b.latestValues)&&b.updateSnapshot(),v=yn(),Oa(v,b.measurePageBox())),Wg(h,b.latestValues,(g=b.snapshot)==null?void 0:g.layoutBox,v)}return Ri(this.latestValues)&&Wg(h,this.latestValues),h}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}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!==Rn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var S;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==h;if(!(u||g&&this.isSharedProjectionDirty||this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:v}=this.options;if(!this.layout||!(b||v))return;this.resolvedRelativeTargetAt=Rn.timestamp;const E=this.getClosestProjectingParent();E&&this.linkedParentVersion!==E.layoutVersion&&!E.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&E&&E.layout?this.createRelativeTarget(E,this.layout.layoutBox,E.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yn(),this.targetWithTransforms=yn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),J7(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Oa(this.target,this.layout.layoutBox),z6(this.target,this.targetDelta)):Oa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?this.createRelativeTarget(E,this.target,E.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||j0(this.parent.latestValues)||k6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,h,g){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yn(),this.relativeTargetOrigin=yn(),au(this.relativeTargetOrigin,h,g,this.options.layoutAnchor||void 0),Oa(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const u=this.getLead(),h=!!this.resumingFrom||this!==u;let g=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(g=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Rn.timestamp&&(g=!1),g)return;const{layout:p,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||b))return;Oa(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,E=this.treeScale.y;C7(this.layoutCorrected,this.treeScale,this.path,h),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=yn());const{target:S}=u;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qg(this.prevProjectionDelta.x,this.projectionDelta.x),qg(this.prevProjectionDelta.y,this.projectionDelta.y)),Ul(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==E||!ry(this.projectionDelta.x,this.prevProjectionDelta.x)||!ry(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),u){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xs(),this.projectionDelta=xs(),this.projectionDeltaWithTransform=xs()}setAnimationOrigin(u,h=!1){const g=this.snapshot,p=g?g.latestValues:{},b={...this.latestValues},v=xs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const E=yn(),S=g?g.source:void 0,w=this.layout?this.layout.source:void 0,T=S!==w,M=this.getStack(),j=!M||M.members.length<=1,R=!!(T&&!j&&this.options.crossfade===!0&&!this.path.some(RM));this.animationProgress=0;let L;this.mixTargetDelta=B=>{const U=B/1e3;dy(v.x,u.x,U),dy(v.y,u.y,U),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(au(E,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),CM(this.relativeTarget,this.relativeTargetOrigin,E,U),L&&nM(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=yn()),Oa(L,this.relativeTarget)),T&&(this.animationValues=b,iM(b,p,this.latestValues,U,R,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var h,g,p;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(p=(g=this.resumingFrom)==null?void 0:g.currentAnimation)==null||p.stop(),this.pendingAnimation&&(oi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zt.update(()=>{Pc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ms(0)),this.motionValue.jump(0,!1),this.currentAnimation=oM(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),u.onUpdate&&u.onUpdate(b)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:h,target:g,layout:p,latestValues:b}=u;if(!(!h||!g||!p)){if(this!==u&&this.layout&&p&&nb(this.options.animationType,this.layout.layoutBox,p.layoutBox)){g=this.target||yn();const v=Un(this.layout.layoutBox.x);g.x.min=u.target.x.min,g.x.max=g.x.min+v;const E=Un(this.layout.layoutBox.y);g.y.min=u.target.y.min,g.y.max=g.y.min+E}Oa(h,g),Uc(h,b),Ul(this.projectionDeltaWithTransform,this.layoutCorrected,h,b)}}registerSharedNode(u,h){this.sharedNodes.has(u)||this.sharedNodes.set(u,new fM),this.sharedNodes.get(u).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var h;const{layoutId:u}=this.options;return u?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:u}=this.options;return u?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:h,preserveFollowOpacity:g}={}){const p=this.getStack();p&&p.promote(this,g),u&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let h=!1;const{latestValues:g}=u;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(h=!0),!h)return;const p={};g.z&&If("z",u,p,this.animationValues);for(let b=0;b<Ff.length;b++)If(`rotate${Ff[b]}`,u,p,this.animationValues),If(`skew${Ff[b]}`,u,p,this.animationValues);u.render();for(const b in p)u.setStaticValue(b,p[b]),this.animationValues&&(this.animationValues[b]=p[b]);u.scheduleRender()}applyProjectionStyles(u,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const g=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Zc(h==null?void 0:h.pointerEvents)||"",u.transform=g?g(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Zc(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!Ri(this.latestValues)&&(u.transform=g?g({},""):"none",this.hasProjected=!1);return}u.visibility="";const b=p.animationValues||p.latestValues;this.applyTransformsToTarget();let v=aM(this.projectionDeltaWithTransform,this.treeScale,b);g&&(v=g(b,v)),u.transform=v;const{x:E,y:S}=this.projectionDelta;u.transformOrigin=`${E.origin*100}% ${S.origin*100}% 0`,p.animationValues?u.opacity=p===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:u.opacity=p===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const w in D0){if(b[w]===void 0)continue;const{correct:T,applyTo:M,isCSSVariable:j}=D0[w],R=v==="none"?b[w]:T(b[w],p);if(M){const L=M.length;for(let B=0;B<L;B++)u[M[B]]=R}else j?this.options.visualElement.renderState.vars[w]=R:u[w]=R}this.options.layoutId&&(u.pointerEvents=p===this?Zc(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var h;return(h=u.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(oy),this.root.sharedNodes.clear()}}}function pM(t){t.updateLayout()}function gM(t){var i;const a=((i=t.resumeFrom)==null?void 0:i.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:c}=t.options,u=a.source!==t.layout.source;if(c==="size")$a(v=>{const E=u?a.measuredBox[v]:a.layoutBox[v],S=Un(E);E.min=s[v].min,E.max=E.min+S});else if(c==="x"||c==="y"){const v=c==="x"?"y":"x";O0(u?a.measuredBox[v]:a.layoutBox[v],s[v])}else nb(c,a.layoutBox,s)&&$a(v=>{const E=u?a.measuredBox[v]:a.layoutBox[v],S=Un(s[v]);E.max=E.min+S,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[v].max=t.relativeTarget[v].min+S)});const h=xs();Ul(h,s,a.layoutBox);const g=xs();u?Ul(g,t.applyTransform(o,!0),a.measuredBox):Ul(g,s,a.layoutBox);const p=!X6(h);let b=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:E,layout:S}=v;if(E&&S){const w=t.options.layoutAnchor||void 0,T=yn();au(T,a.layoutBox,E.layoutBox,w);const M=yn();au(M,s,S.layoutBox,w),Q6(T,M)||(b=!0),v.options.layoutRoot&&(t.relativeTarget=M,t.relativeTargetOrigin=T,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:g,layoutDelta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:b})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function yM(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function bM(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function vM(t){t.clearSnapshot()}function oy(t){t.clearMeasurements()}function xM(t){t.isLayoutDirty=!0,t.updateLayout()}function cy(t){t.isLayoutDirty=!1}function EM(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function SM(t){const{visualElement:a}=t.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),t.resetTransform()}function uy(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wM(t){t.resolveTargetDelta()}function AM(t){t.calcProjection()}function MM(t){t.resetSkewAndRotation()}function TM(t){t.removeLeadSnapshot()}function dy(t,a,i){t.translate=Ft(a.translate,0,i),t.scale=Ft(a.scale,1,i),t.origin=a.origin,t.originPoint=a.originPoint}function fy(t,a,i,s){t.min=Ft(a.min,i.min,s),t.max=Ft(a.max,i.max,s)}function CM(t,a,i,s){fy(t.x,a.x,i.x,s),fy(t.y,a.y,i.y,s)}function RM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const NM={duration:.45,ease:[.4,0,.1,1]},hy=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),my=hy("applewebkit/")&&!hy("chrome/")?Math.round:Aa;function py(t){t.min=my(t.min),t.max=my(t.max)}function jM(t){py(t.x),py(t.y)}function nb(t,a,i){return t==="position"||t==="preserve-aspect"&&!Q7(ay(a),ay(i),.2)}function _M(t){var a;return t!==t.root&&((a=t.scroll)==null?void 0:a.wasRoot)}const DM=tb({attachResizeListener:(t,a)=>Xl(t,"resize",a),measureScroll:()=>{var t,a;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Gf={current:void 0},ab=tb({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Gf.current){const t=new DM({});t.mount(window),t.setOptions({layoutScroll:!0}),Gf.current=t}return Gf.current},resetTransform:(t,a)=>{t.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),R1=d.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function gy(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function OM(...t){return a=>{let i=!1;const s=t.map(o=>{const c=gy(o,a);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let o=0;o<s.length;o++){const c=s[o];typeof c=="function"?c():gy(t[o],null)}}}}function LM(...t){return d.useCallback(OM(...t),t)}class VM extends d.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(Hc(i)&&a.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=i.offsetParent,o=Hc(s)&&s.offsetWidth||0,c=Hc(s)&&s.offsetHeight||0,u=getComputedStyle(i),h=this.props.sizeRef.current;h.height=parseFloat(u.height),h.width=parseFloat(u.width),h.top=i.offsetTop,h.left=i.offsetLeft,h.right=o-h.width-h.left,h.bottom=c-h.height-h.top}return null}componentDidUpdate(){}render(){return this.props.children}}function HM({children:t,isPresent:a,anchorX:i,anchorY:s,root:o,pop:c}){var E;const u=d.useId(),h=d.useRef(null),g=d.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:p}=d.useContext(R1),b=((E=t.props)==null?void 0:E.ref)??(t==null?void 0:t.ref),v=LM(h,b);return d.useInsertionEffect(()=>{const{width:S,height:w,top:T,left:M,right:j,bottom:R}=g.current;if(a||c===!1||!h.current||!S||!w)return;const L=i==="left"?`left: ${M}`:`right: ${j}`,B=s==="bottom"?`bottom: ${R}`:`top: ${T}`;h.current.dataset.motionPopId=u;const U=document.createElement("style");p&&(U.nonce=p);const le=o??document.head;return le.appendChild(U),U.sheet&&U.sheet.insertRule(`
|
|
70
|
+
[data-motion-pop-id="${u}"] {
|
|
71
|
+
position: absolute !important;
|
|
72
|
+
width: ${S}px !important;
|
|
73
|
+
height: ${w}px !important;
|
|
74
|
+
${L}px !important;
|
|
75
|
+
${B}px !important;
|
|
76
|
+
}
|
|
77
|
+
`),()=>{var ne;(ne=h.current)==null||ne.removeAttribute("data-motion-pop-id"),le.contains(U)&&le.removeChild(U)}},[a]),y.jsx(VM,{isPresent:a,childRef:h,sizeRef:g,pop:c,children:c===!1?t:d.cloneElement(t,{ref:v})})}const kM=({children:t,initial:a,isPresent:i,onExitComplete:s,custom:o,presenceAffectsLayout:c,mode:u,anchorX:h,anchorY:g,root:p})=>{const b=a1(zM),v=d.useId();let E=!0,S=d.useMemo(()=>(E=!1,{id:v,initial:a,isPresent:i,custom:o,onExitComplete:w=>{b.set(w,!0);for(const T of b.values())if(!T)return;s&&s()},register:w=>(b.set(w,!1),()=>b.delete(w))}),[i,b,s]);return c&&E&&(S={...S}),d.useMemo(()=>{b.forEach((w,T)=>b.set(T,!1))},[i]),d.useEffect(()=>{!i&&!b.size&&s&&s()},[i]),t=y.jsx(HM,{pop:u==="popLayout",isPresent:i,anchorX:h,anchorY:g,root:p,children:t}),y.jsx(du.Provider,{value:S,children:t})};function zM(){return new Map}function rb(t=!0){const a=d.useContext(du);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=a,c=d.useId();d.useEffect(()=>{if(t)return o(c)},[t]);const u=d.useCallback(()=>t&&s&&s(c),[c,s,t]);return!i&&s?[!1,u]:[!0]}const Ac=t=>t.key||"";function yy(t){const a=[];return d.Children.forEach(t,i=>{d.isValidElement(i)&&a.push(i)}),a}const BM=({children:t,custom:a,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:c="sync",propagate:u=!1,anchorX:h="left",anchorY:g="top",root:p})=>{const[b,v]=rb(u),E=d.useMemo(()=>yy(t),[t]),S=u&&!b?[]:E.map(Ac),w=d.useRef(!0),T=d.useRef(E),M=a1(()=>new Map),j=d.useRef(new Set),[R,L]=d.useState(E),[B,U]=d.useState(E);_8(()=>{w.current=!1,T.current=E;for(let _=0;_<B.length;_++){const ee=Ac(B[_]);S.includes(ee)?(M.delete(ee),j.current.delete(ee)):M.get(ee)!==!0&&M.set(ee,!1)}},[B,S.length,S.join("-")]);const le=[];if(E!==R){let _=[...E];for(let ee=0;ee<B.length;ee++){const ae=B[ee],ie=Ac(ae);S.includes(ie)||(_.splice(ee,0,ae),le.push(ae))}return c==="wait"&&le.length&&(_=le),U(yy(_)),L(E),null}const{forceRender:ne}=d.useContext(n1);return y.jsx(y.Fragment,{children:B.map(_=>{const ee=Ac(_),ae=u&&!b?!1:E===B||S.includes(ee),ie=()=>{if(j.current.has(ee))return;if(M.has(ee))j.current.add(ee),M.set(ee,!0);else return;let Q=!0;M.forEach(pe=>{pe||(Q=!1)}),Q&&(ne==null||ne(),U(T.current),u&&(v==null||v()),s&&s())};return y.jsx(kM,{isPresent:ae,initial:!w.current||i?void 0:!1,custom:a,presenceAffectsLayout:o,mode:c,root:p,onExitComplete:ae?void 0:ie,anchorX:h,anchorY:g,children:_},ee)})})},ib=d.createContext({strict:!1}),by={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"]};let vy=!1;function UM(){if(vy)return;const t={};for(const a in by)t[a]={isEnabled:i=>by[a].some(s=>!!i[s])};L6(t),vy=!0}function sb(){return UM(),w7()}function ZM(t){const a=sb();for(const i in t)a[i]={...a[i],...t[i]};L6(a)}const PM=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"]);function ru(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||PM.has(t)}let lb=t=>!ru(t);function FM(t){typeof t=="function"&&(lb=a=>a.startsWith("on")?!ru(a):t(a))}try{FM(require("@emotion/is-prop-valid").default)}catch{}function IM(t,a,i){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||Nn(t[o])||(lb(o)||i===!0&&ru(o)||!a&&!ru(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}const pu=d.createContext({});function GM(t,a){if(mu(t)){const{initial:i,animate:s}=t;return{initial:i===!1||Kl(i)?i:void 0,animate:Kl(s)?s:void 0}}return t.inherit!==!1?a:{}}function $M(t){const{initial:a,animate:i}=GM(t,d.useContext(pu));return d.useMemo(()=>({initial:a,animate:i}),[xy(a),xy(i)])}function xy(t){return Array.isArray(t)?t.join(" "):t}const N1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ob(t,a,i){for(const s in a)!Nn(a[s])&&!Z6(s,i)&&(t[s]=a[s])}function qM({transformTemplate:t},a){return d.useMemo(()=>{const i=N1();return T1(i,a,t),Object.assign({},i.vars,i.style)},[a])}function YM(t,a){const i=t.style||{},s={};return ob(s,i,t),Object.assign(s,qM(t,a)),s}function KM(t,a){const i={},s=YM(t,a);return t.drag&&t.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const cb=()=>({...N1(),attrs:{}});function XM(t,a,i,s){const o=d.useMemo(()=>{const c=cb();return P6(c,a,I6(s),t.transformTemplate,t.style),{...c.attrs,style:{...c.style}}},[a]);if(t.style){const c={};ob(c,t.style,t),o.style={...c,...o.style}}return o}const QM=["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 j1(t){return typeof t!="string"||t.includes("-")?!1:!!(QM.indexOf(t)>-1||/[A-Z]/u.test(t))}function JM(t,a,i,{latestValues:s},o,c=!1,u){const g=(u??j1(t)?XM:KM)(a,s,o,t),p=IM(a,typeof t=="string",c),b=t!==d.Fragment?{...p,...g,ref:i}:{},{children:v}=a,E=d.useMemo(()=>Nn(v)?v.get():v,[v]);return d.createElement(t,{...b,children:E})}function WM({scrapeMotionValuesFromProps:t,createRenderState:a},i,s,o){return{latestValues:eT(i,s,o,t),renderState:a()}}function eT(t,a,i,s){const o={},c=s(t,{});for(const E in c)o[E]=Zc(c[E]);let{initial:u,animate:h}=t;const g=mu(t),p=D6(t);a&&p&&!g&&t.inherit!==!1&&(u===void 0&&(u=a.initial),h===void 0&&(h=a.animate));let b=i?i.initial===!1:!1;b=b||u===!1;const v=b?h:u;if(v&&typeof v!="boolean"&&!hu(v)){const E=Array.isArray(v)?v:[v];for(let S=0;S<E.length;S++){const w=b1(t,E[S]);if(w){const{transitionEnd:T,transition:M,...j}=w;for(const R in j){let L=j[R];if(Array.isArray(L)){const B=b?L.length-1:0;L=L[B]}L!==null&&(o[R]=L)}for(const R in T)o[R]=T[R]}}}return o}const ub=t=>(a,i)=>{const s=d.useContext(pu),o=d.useContext(du),c=()=>WM(t,a,s,o);return i?c():a1(c)},tT=ub({scrapeMotionValuesFromProps:C1,createRenderState:N1}),nT=ub({scrapeMotionValuesFromProps:G6,createRenderState:cb}),aT=Symbol.for("motionComponentSymbol");function rT(t,a,i){const s=d.useRef(i);d.useInsertionEffect(()=>{s.current=i});const o=d.useRef(null);return d.useCallback(c=>{var h;c&&((h=t.onMount)==null||h.call(t,c));const u=s.current;if(typeof u=="function")if(c){const g=u(c);typeof g=="function"&&(o.current=g)}else o.current?(o.current(),o.current=null):u(c);else u&&(u.current=c);a&&(c?a.mount(c):a.unmount())},[a])}const db=d.createContext({});function ms(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function iT(t,a,i,s,o,c){var L,B;const{visualElement:u}=d.useContext(pu),h=d.useContext(ib),g=d.useContext(du),p=d.useContext(R1),b=p.reducedMotion,v=p.skipAnimations,E=d.useRef(null),S=d.useRef(!1);s=s||h.renderer,!E.current&&s&&(E.current=s(t,{visualState:a,parent:u,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b,skipAnimations:v,isSVG:c}),S.current&&E.current&&(E.current.manuallyAnimateOnMount=!0));const w=E.current,T=d.useContext(db);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&sT(E.current,i,o,T);const M=d.useRef(!1);d.useInsertionEffect(()=>{w&&M.current&&w.update(i,g)});const j=i[v6],R=d.useRef(!!j&&typeof window<"u"&&!((L=window.MotionHandoffIsComplete)!=null&&L.call(window,j))&&((B=window.MotionHasOptimisedAnimation)==null?void 0:B.call(window,j)));return _8(()=>{S.current=!0,w&&(M.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),R.current&&w.animationState&&w.animationState.animateChanges())}),d.useEffect(()=>{w&&(!R.current&&w.animationState&&w.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,j)}),R.current=!1),w.enteringChildren=void 0)}),w}function sT(t,a,i,s){const{layoutId:o,layout:c,drag:u,dragConstraints:h,layoutScroll:g,layoutRoot:p,layoutAnchor:b,layoutCrossfade:v}=a;t.projection=new i(t.latestValues,a["data-framer-portal-id"]?void 0:fb(t.parent)),t.projection.setOptions({layoutId:o,layout:c,alwaysMeasureLayout:!!u||h&&ms(h),visualElement:t,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:v,layoutScroll:g,layoutRoot:p,layoutAnchor:b})}function fb(t){if(t)return t.options.allowProjection!==!1?t.projection:fb(t.parent)}function $f(t,{forwardMotionProps:a=!1,type:i}={},s,o){s&&ZM(s);const c=i?i==="svg":j1(t),u=c?nT:tT;function h(p,b){let v;const E={...d.useContext(R1),...p,layoutId:lT(p)},{isStatic:S}=E,w=$M(p),T=u(p,S);if(!S&&typeof window<"u"){oT();const M=cT(E);v=M.MeasureLayout,w.visualElement=iT(t,T,E,o,M.ProjectionNode,c)}return y.jsxs(pu.Provider,{value:w,children:[v&&w.visualElement?y.jsx(v,{visualElement:w.visualElement,...E}):null,JM(t,p,rT(T,w.visualElement,b),T,S,a,c)]})}h.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const g=d.forwardRef(h);return g[aT]=t,g}function lT({layoutId:t}){const a=d.useContext(n1).id;return a&&t!==void 0?a+"-"+t:t}function oT(t,a){d.useContext(ib).strict}function cT(t){const a=sb(),{drag:i,layout:s}=a;if(!i&&!s)return{};const o={...i,...s};return{MeasureLayout:i!=null&&i.isEnabled(t)||s!=null&&s.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function uT(t,a){if(typeof Proxy>"u")return $f;const i=new Map,s=(c,u)=>$f(c,u,t,a),o=(c,u)=>s(c,u);return new Proxy(o,{get:(c,u)=>u==="create"?s:(i.has(u)||i.set(u,$f(u,void 0,t,a)),i.get(u))})}const dT=(t,a)=>a.isSVG??j1(t)?new U7(a):new L7(a,{allowProjection:t!==d.Fragment});class fT extends ci{constructor(a){super(a),a.animationState||(a.animationState=G7(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();hu(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let hT=0;class mT extends ci{constructor(){super(...arguments),this.id=hT++,this.isExitComplete=!1}update(){var c;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===s)return;if(a&&s===!1){if(this.isExitComplete){const{initial:u,custom:h}=this.node.getProps();if(typeof u=="string"){const g=Oi(this.node,u,h);if(g){const{transition:p,transitionEnd:b,...v}=g;for(const E in v)(c=this.node.getValue(E))==null||c.jump(v[E])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!a);i&&!a&&o.then(()=>{this.isExitComplete=!0,i(this.id)})}mount(){const{register:a,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const pT={animation:{Feature:fT},exit:{Feature:mT}};function lo(t){return{point:{x:t.pageX,y:t.pageY}}}const gT=t=>a=>S1(a)&&t(a,lo(a));function Zl(t,a,i,s){return Xl(t,a,gT(i),s)}const hb=({current:t})=>t?t.ownerDocument.defaultView:null,Ey=(t,a)=>Math.abs(t-a);function yT(t,a){const i=Ey(t.x,a.x),s=Ey(t.y,a.y);return Math.sqrt(i**2+s**2)}const Sy=new Set(["auto","scroll"]);class mb{constructor(a,i,{transformPagePoint:s,contextWindow:o=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:h}={}){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=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Mc(this.lastRawMoveEventInfo,this.transformPagePoint));const S=qf(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,T=yT(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!T)return;const{point:M}=S,{timestamp:j}=Rn;this.history.push({...M,timestamp:j});const{onStart:R,onMove:L}=this.handlers;w||(R&&R(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,S)},this.handlePointerMove=(S,w)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Mc(w,this.transformPagePoint),zt.update(this.updatePoint,!0)},this.handlePointerUp=(S,w)=>{this.end();const{onEnd:T,onSessionEnd:M,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=qf(S.type==="pointercancel"?this.lastMoveEventInfo:Mc(w,this.transformPagePoint),this.history);this.startEvent&&T&&T(S,R),M&&M(S,R)},!S1(a))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=u,this.contextWindow=o||window;const g=lo(a),p=Mc(g,this.transformPagePoint),{point:b}=p,{timestamp:v}=Rn;this.history=[{...b,timestamp:v}];const{onSessionStart:E}=i;E&&E(a,qf(p,this.history)),this.removeListeners=ro(Zl(this.contextWindow,"pointermove",this.handlePointerMove),Zl(this.contextWindow,"pointerup",this.handlePointerUp),Zl(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let i=a.parentElement;for(;i;){const s=getComputedStyle(i);(Sy.has(s.overflowX)||Sy.has(s.overflowY))&&this.scrollPositions.set(i,{x:i.scrollLeft,y:i.scrollTop}),i=i.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(a){const i=this.scrollPositions.get(a);if(!i)return;const s=a===window,o=s?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},c={x:o.x-i.x,y:o.y-i.y};c.x===0&&c.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(a,o),zt.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),oi(this.updatePoint)}}function Mc(t,a){return a?{point:a(t.point)}:t}function wy(t,a){return{x:t.x-a.x,y:t.y-a.y}}function qf({point:t},a){return{point:t,delta:wy(t,pb(a)),offset:wy(t,bT(a)),velocity:vT(a,.1)}}function bT(t){return t[0]}function pb(t){return t[t.length-1]}function vT(t,a){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=pb(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>ia(a)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>ia(a)*2&&(s=t[1]);const c=Sa(o.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const u={x:(o.x-s.x)/c,y:(o.y-s.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function xT(t,{min:a,max:i},s){return a!==void 0&&t<a?t=s?Ft(a,t,s.min):Math.max(t,a):i!==void 0&&t>i&&(t=s?Ft(i,t,s.max):Math.min(t,i)),t}function Ay(t,a,i){return{min:a!==void 0?t.min+a:void 0,max:i!==void 0?t.max+i-(t.max-t.min):void 0}}function ET(t,{top:a,left:i,bottom:s,right:o}){return{x:Ay(t.x,i,o),y:Ay(t.y,a,s)}}function My(t,a){let i=a.min-t.min,s=a.max-t.max;return a.max-a.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function ST(t,a){return{x:My(t.x,a.x),y:My(t.y,a.y)}}function wT(t,a){let i=.5;const s=Un(t),o=Un(a);return o>s?i=ql(a.min,a.max-s,t.min):s>o&&(i=ql(t.min,t.max-o,a.min)),Qa(0,1,i)}function AT(t,a){const i={};return a.min!==void 0&&(i.min=a.min-t.min),a.max!==void 0&&(i.max=a.max-t.min),i}const L0=.35;function MT(t=L0){return t===!1?t=0:t===!0&&(t=L0),{x:Ty(t,"left","right"),y:Ty(t,"top","bottom")}}function Ty(t,a,i){return{min:Cy(t,a),max:Cy(t,i)}}function Cy(t,a){return typeof t=="number"?t:t[a]||0}const TT=new WeakMap;class CT{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const c=v=>{i&&this.snapToCursor(lo(v).point),this.stopAnimation()},u=(v,E)=>{const{drag:S,dragPropagation:w,onDragStart:T}=this.getProps();if(S&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=WA(S),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=E,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$a(j=>{let R=this.getAxisMotionValue(j).get()||0;if(Ka.test(R)){const{projection:L}=this.visualElement;if(L&&L.layout){const B=L.layout.layoutBox[j];B&&(R=Un(B)*(parseFloat(R)/100))}}this.originPoint[j]=R}),T&&zt.update(()=>T(v,E),!1,!0),M0(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},h=(v,E)=>{this.latestPointerEvent=v,this.latestPanInfo=E;const{dragPropagation:S,dragDirectionLock:w,onDirectionLock:T,onDrag:M}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:j}=E;if(w&&this.currentDirection===null){this.currentDirection=NT(j),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",E.point,j),this.updateAxis("y",E.point,j),this.visualElement.render(),M&&zt.update(()=>M(v,E),!1,!0)},g=(v,E)=>{this.latestPointerEvent=v,this.latestPanInfo=E,this.stop(v,E),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:b}=this.getProps();this.panSession=new mb(a,{onSessionStart:c,onStart:u,onMove:h,onSessionEnd:g,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:s,contextWindow:hb(this.visualElement),element:this.visualElement.current})}stop(a,i){const s=a||this.latestPointerEvent,o=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!o||!s)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&zt.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,i,s){const{drag:o}=this.getProps();if(!s||!Tc(a,o,this.currentDirection))return;const c=this.getAxisMotionValue(a);let u=this.originPoint[a]+s[a];this.constraints&&this.constraints[a]&&(u=xT(u,this.constraints[a],this.elastic[a])),c.set(u)}resolveConstraints(){var c;const{dragConstraints:a,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(c=this.visualElement.projection)==null?void 0:c.layout,o=this.constraints;a&&ms(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&s?this.constraints=ET(s.layoutBox,a):this.constraints=!1,this.elastic=MT(i),o!==this.constraints&&!ms(a)&&s&&this.constraints&&!this.hasMutatedConstraints&&$a(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=AT(s.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!ms(a))return!1;const s=a.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const c=R7(s,o.root,this.visualElement.getTransformPagePoint());let u=ST(o.layout.layoutBox,c);if(i){const h=i(M7(u));this.hasMutatedConstraints=!!h,h&&(u=H6(h))}return u}startAnimation(a){const{drag:i,dragMomentum:s,dragElastic:o,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:h}=this.getProps(),g=this.constraints||{},p=$a(b=>{if(!Tc(b,i,this.currentDirection))return;let v=g&&g[b]||{};(u===!0||u===b)&&(v={min:0,max:0});const E=o?200:1e6,S=o?40:1e7,w={type:"inertia",velocity:s?a[b]:0,bounceStiffness:E,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...c,...v};return this.startAxisValueAnimation(b,w)});return Promise.all(p).then(h)}startAxisValueAnimation(a,i){const s=this.getAxisMotionValue(a);return M0(this.visualElement,a),s.start(y1(a,s,0,i,this.visualElement,!1))}stopAnimation(){$a(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,s=this.visualElement.getProps(),o=s[i];return o||this.visualElement.getValue(a,(s.initial?s.initial[a]:void 0)||0)}snapToCursor(a){$a(i=>{const{drag:s}=this.getProps();if(!Tc(i,s,this.currentDirection))return;const{projection:o}=this.visualElement,c=this.getAxisMotionValue(i);if(o&&o.layout){const{min:u,max:h}=o.layout.layoutBox[i],g=c.get()||0;c.set(a[i]-Ft(u,h,.5)+g)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!ms(i)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};$a(u=>{const h=this.getAxisMotionValue(u);if(h&&this.constraints!==!1){const g=h.get();o[u]=wT({min:g,max:g},this.constraints[u])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),$a(u=>{if(!Tc(u,a,null))return;const h=this.getAxisMotionValue(u),{min:g,max:p}=this.constraints[u];h.set(Ft(g,p,o[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;TT.set(this.visualElement,this);const a=this.visualElement.current,i=Zl(a,"pointerdown",p=>{const{drag:b,dragListener:v=!0}=this.getProps(),E=p.target,S=E!==a&&i7(E);b&&v&&!S&&this.start(p)});let s;const o=()=>{const{dragConstraints:p}=this.getProps();ms(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),s||(s=RT(a,p.current,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),zt.read(o);const h=Xl(window,"resize",()=>this.scalePositionWithinConstraints()),g=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:b})=>{this.isDragging&&b&&($a(v=>{const E=this.getAxisMotionValue(v);E&&(this.originPoint[v]+=p[v].translate,E.set(E.get()+p[v].translate))}),this.visualElement.render())}));return()=>{h(),i(),u(),g&&g(),s&&s()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:c=!1,dragElastic:u=L0,dragMomentum:h=!0}=a;return{...a,drag:i,dragDirectionLock:s,dragPropagation:o,dragConstraints:c,dragElastic:u,dragMomentum:h}}}function Ry(t){let a=!0;return()=>{if(a){a=!1;return}t()}}function RT(t,a,i){const s=Vg(t,Ry(i)),o=Vg(a,Ry(i));return()=>{s(),o()}}function Tc(t,a,i){return(a===!0||a===t)&&(i===null||i===t)}function NT(t,a=10){let i=null;return Math.abs(t.y)>a?i="y":Math.abs(t.x)>a&&(i="x"),i}class jT extends ci{constructor(a){super(a),this.removeGroupControls=Aa,this.removeListeners=Aa,this.controls=new CT(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Aa}update(){const{dragControls:a}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};a!==i&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Yf=t=>(a,i)=>{t&&zt.update(()=>t(a,i),!1,!0)};class _T extends ci{constructor(){super(...arguments),this.removePointerDownListener=Aa}onPointerDown(a){this.session=new mb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hb(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:Yf(a),onStart:Yf(i),onMove:Yf(s),onEnd:(c,u)=>{delete this.session,o&&zt.postRender(()=>o(c,u))}}}mount(){this.removePointerDownListener=Zl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Kf=!1;class DT extends d.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:s,layoutId:o}=this.props,{projection:c}=a;c&&(i.group&&i.group.add(c),s&&s.register&&o&&s.register(c),Kf&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Pc.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:s,drag:o,isPresent:c}=this.props,{projection:u}=s;return u&&(u.isPresent=c,a.layoutDependency!==i&&u.setOptions({...u.options,layoutDependency:i}),Kf=!0,o||a.layoutDependency!==i||i===void 0||a.isPresent!==c?u.willUpdate():this.safeToRemove(),a.isPresent!==c&&(c?u.promote():u.relegate()||zt.postRender(()=>{const h=u.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:i}=this.props,{projection:s}=a;s&&(s.options.layoutAnchor=i,s.root.didUpdate(),E1.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:o}=a;Kf=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function gb(t){const[a,i]=rb(),s=d.useContext(n1);return y.jsx(DT,{...t,layoutGroup:s,switchLayoutGroup:d.useContext(db),isPresent:a,safeToRemove:i})}const OT={pan:{Feature:_T},drag:{Feature:jT,ProjectionNode:ab,MeasureLayout:gb}};function Ny(t,a,i){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,c=s[o];c&&zt.postRender(()=>c(a,lo(a)))}class LT extends ci{mount(){const{current:a}=this.node;a&&(this.unmount=t7(a,(i,s)=>(Ny(this.node,s,"Start"),o=>Ny(this.node,o,"End"))))}unmount(){}}class VT extends ci{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!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=ro(Xl(this.node.current,"focus",()=>this.onFocus()),Xl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jy(t,a,i){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),c=s[o];c&&zt.postRender(()=>c(a,lo(a)))}class HT extends ci{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:i,propagate:s}=this.node.props;this.unmount=l7(a,(o,c)=>(jy(this.node,c,"Start"),(u,{success:h})=>jy(this.node,u,h?"End":"Cancel")),{useGlobalTarget:i,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const V0=new WeakMap,Xf=new WeakMap,kT=t=>{const a=V0.get(t.target);a&&a(t)},zT=t=>{t.forEach(kT)};function BT({root:t,...a}){const i=t||document;Xf.has(i)||Xf.set(i,{});const s=Xf.get(i),o=JSON.stringify(a);return s[o]||(s[o]=new IntersectionObserver(zT,{root:t,...a})),s[o]}function UT(t,a,i){const s=BT(a);return V0.set(t,i),s.observe(t),()=>{V0.delete(t),s.unobserve(t)}}const ZT={some:0,all:1};class PT extends ci{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var g;(g=this.stopObserver)==null||g.call(this);const{viewport:a={}}=this.node.getProps(),{root:i,margin:s,amount:o="some",once:c}=a,u={root:i?i.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:ZT[o]},h=p=>{const{isIntersecting:b}=p;if(this.isInView===b||(this.isInView=b,c&&!b&&this.hasEnteredView))return;b&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",b);const{onViewportEnter:v,onViewportLeave:E}=this.node.getProps(),S=b?v:E;S&&S(p)};this.stopObserver=UT(this.node.current,u,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(FT(a,i))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function FT({viewport:t={}},{viewport:a={}}={}){return i=>t[i]!==a[i]}const IT={inView:{Feature:PT},tap:{Feature:HT},focus:{Feature:VT},hover:{Feature:LT}},GT={layout:{ProjectionNode:ab,MeasureLayout:gb}},$T={...pT,...IT,...OT,...GT},qT=uT($T,dT),aa=Ar((t,a)=>({runs:new Map,activeRunId:null,isModalOpen:!1,startRun:(i,s,o,c)=>{t(u=>{const h=new Map(u.runs);return h.set(i,{runId:i,agentId:s,agentName:o,projectSlug:c,status:"queued",messages:[],startedAt:Date.now()}),{runs:h,activeRunId:i,isModalOpen:!0}})},appendMessage:(i,s)=>{t(o=>{const c=new Map(o.runs),u=c.get(i);return u&&(u.messages.push(s),u.status==="queued"&&(u.status="running"),c.set(i,u)),{runs:c}})},completeRun:(i,s)=>{t(o=>{const c=new Map(o.runs),u=c.get(i);return u&&(u.status="completed",u.completedAt=Date.now(),s&&(u.artefactSummary=s),c.set(i,u)),{runs:c}})},failRun:(i,s)=>{t(o=>{const c=new Map(o.runs),u=c.get(i);return u&&(u.status="failed",u.error=s,u.completedAt=Date.now(),c.set(i,u)),{runs:c}})},syncRun:(i,s)=>{t(o=>{const c=new Map(o.runs),u=c.get(i);return u?(c.set(i,{...u,...s}),{runs:c}):{runs:c}})},discardRun:i=>{t(s=>{const o=new Map(s.runs);return o.delete(i),{runs:o,activeRunId:s.activeRunId===i?null:s.activeRunId,isModalOpen:s.activeRunId===i?!1:s.isModalOpen}})},setActiveRunId:i=>t({activeRunId:i}),setModalOpen:i=>t({isModalOpen:i}),getRun:i=>a().runs.get(i),getAllRuns:()=>Array.from(a().runs.values()).sort((i,s)=>s.startedAt-i.startedAt)})),_y=[".md",".mdx",".markdown",".pdf",".docx",".pptx",".xlsx",".xls",".csv",".tsv",".txt",".text",".rst",".json",".yaml",".yml",".xml",".html",".htm",".toml",".js",".jsx",".ts",".tsx",".py",".css",".scss",".less",".sql",".sh",".bash",".zsh",".bat",".ps1",".ini",".cfg",".conf",".env",".log"],Dy=50,YT=new Set([".md",".mdx",".markdown",".txt",".text",".rst",".json",".yaml",".yml",".xml",".html",".htm",".toml",".js",".jsx",".ts",".tsx",".py",".css",".scss",".less",".sql",".sh",".bash",".zsh",".bat",".ps1",".ini",".cfg",".conf",".env",".log",".csv",".tsv"]);function KT(t){const a=t.lastIndexOf(".");return a>=0?t.slice(a).toLowerCase():""}function Oy(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(0)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function yb({files:t,onChange:a,showFileList:i=!0,projectSlug:s}){const o=d.useRef(null),[c,u]=d.useState(!1),[h,g]=d.useState(!1),[p,b]=d.useState(null),[v,E]=d.useState("none"),[S,w]=d.useState(!1),[T,M]=d.useState(null),[j,R]=d.useState(""),[L,B]=d.useState(""),[U,le]=d.useState(null);d.useEffect(()=>()=>{U&&URL.revokeObjectURL(U)},[U]);function ne(ie){var pe;if(!ie)return;const Q=[];for(const fe of Array.from(ie)){if(fe.size>Dy*1024*1024)continue;const ye="."+((pe=fe.name.split(".").pop())==null?void 0:pe.toLowerCase());if(!_y.includes(ye)||t.some(X=>X.name===fe.name))continue;const H=crypto.randomUUID();Q.push({id:H,name:fe.name,size:fe.size,type:fe.type}),z9(H,fe)}if(Q.length&&(a([...t,...Q]),s)){const ye=Array.from(ie).filter(H=>Q.some(X=>X.name===H.name));ye.length&&DS(s,ye).catch(()=>{})}}function _(ie){U9(ie),a(t.filter(Q=>Q.id!==ie))}async function ee(ie){const Q=B9(ie.id);if(g(!0),b(ie),E("none"),M(null),R(""),B(""),U&&(URL.revokeObjectURL(U),le(null)),!Q){M("Preview unavailable for this file in the current session. Re-attach the file to preview it.");return}w(!0);const pe=KT(ie.name);try{if(Q.type.startsWith("image/")){const fe=URL.createObjectURL(Q);le(fe),E("image");return}if(Q.type.startsWith("audio/")){const fe=URL.createObjectURL(Q);le(fe),E("audio");return}if(Q.type.startsWith("video/")){const fe=URL.createObjectURL(Q);le(fe),E("video");return}if(pe===".pdf"){const fe=URL.createObjectURL(Q);le(fe),E("pdf");return}if(pe===".docx"){const ye=await(await Kc(()=>import("./index-CAWjWFwD.js").then(H=>H.i),[])).convertToHtml({arrayBuffer:await Q.arrayBuffer()});B(`<!doctype html><html><body style="font-family:ui-sans-serif,system-ui;padding:16px;line-height:1.5">${ye.value}</body></html>`),E("srcdoc");return}if(pe===".xlsx"||pe===".xls"){const fe=await Kc(()=>import("./xlsx-CkFp8p6R.js"),[]),ye=fe.read(await Q.arrayBuffer(),{type:"array"}),H=ye.SheetNames[0],X=ye.Sheets[H],Y=fe.utils.sheet_to_html(X);B(`<!doctype html><html><body style="font-family:ui-sans-serif,system-ui;padding:12px">${Y}</body></html>`),E("srcdoc");return}if(YT.has(pe)||Q.type.startsWith("text/")){const fe=await Q.text(),ye=pe===".json"?JSON.stringify(JSON.parse(fe),null,2):fe;R(ye.slice(0,25e4)),E("text");return}M("This file type is attached successfully, but in-app preview is not available yet for this format.")}catch(fe){const ye=fe instanceof Error?fe.message:"Unable to preview this file.";M(ye)}finally{w(!1)}}function ae(){g(!1),b(null),E("none"),M(null),R(""),B(""),U&&(URL.revokeObjectURL(U),le(null))}return y.jsxs("div",{className:"space-y-3 mt-4",children:[y.jsxs("div",{role:"button",tabIndex:0,"aria-label":"Upload knowledge base files — click or drag and drop",onClick:()=>{var ie;return(ie=o.current)==null?void 0:ie.click()},onKeyDown:ie=>{var Q;(ie.key==="Enter"||ie.key===" ")&&((Q=o.current)==null||Q.click())},onDragOver:ie=>{ie.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:ie=>{ie.preventDefault(),u(!1),ne(ie.dataTransfer.files)},className:["flex flex-col items-center justify-center gap-2 rounded-card border-2 border-dashed","px-4 py-6 cursor-pointer transition-colors duration-100 select-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary",c?"border-text-primary bg-border-secondary":"border-border hover:border-text-tertiary hover:bg-border-secondary"].join(" "),children:[y.jsx(wS,{size:24,className:c?"text-text-primary":"text-text-tertiary","aria-hidden":"true"}),y.jsxs("p",{className:"text-caption text-text-secondary text-center",children:["Drop files here or ",y.jsx("span",{className:"text-text-primary font-medium",children:"click to browse"})]}),y.jsxs("p",{className:"text-small text-text-tertiary",children:["Office, text, data, markup, code, and config files · max ",Dy," MB"]})]}),y.jsx("input",{ref:o,type:"file",multiple:!0,accept:_y.join(","),className:"sr-only",tabIndex:-1,"aria-hidden":"true",onChange:ie=>ne(ie.target.files)}),i&&t.length>0&&y.jsx("ul",{role:"list","aria-label":"Knowledge base files",className:"space-y-1.5",children:t.map(ie=>y.jsxs("li",{className:`flex items-center gap-2.5 px-3 py-2 rounded-card border border-border
|
|
78
|
+
bg-card shadow-clay`,children:[y.jsx(hS,{size:14,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsx("span",{className:"flex-1 text-caption text-text-primary font-mono truncate",children:ie.name}),y.jsx("span",{className:"text-small text-text-tertiary flex-shrink-0",children:Oy(ie.size)}),y.jsx("button",{onClick:Q=>{Q.stopPropagation(),ee(ie)},"aria-label":`Preview ${ie.name}`,className:`flex-shrink-0 text-text-tertiary hover:text-text-primary
|
|
79
|
+
transition-colors focus-visible:outline-none focus-visible:ring-2
|
|
80
|
+
focus-visible:ring-text-primary rounded`,children:y.jsx(fS,{size:12,weight:"bold","aria-hidden":"true"})}),y.jsx("button",{onClick:Q=>{Q.stopPropagation(),_(ie.id)},"aria-label":`Remove ${ie.name}`,className:`flex-shrink-0 text-text-tertiary hover:text-text-primary
|
|
81
|
+
transition-colors focus-visible:outline-none focus-visible:ring-2
|
|
82
|
+
focus-visible:ring-text-primary rounded`,children:y.jsx(W0,{size:12,weight:"bold","aria-hidden":"true"})})]},ie.id))}),h&&y.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-[rgba(0,0,0,0.35)] px-4",role:"dialog","aria-modal":"true","aria-label":p?`Preview ${p.name}`:"File preview",children:y.jsxs("div",{className:"w-full max-w-5xl h-[80vh] rounded-feature border border-border bg-canvas shadow-clay flex flex-col overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"text-body-standard font-medium text-text-primary truncate",children:p==null?void 0:p.name}),y.jsx("p",{className:"text-small text-text-tertiary",children:p?Oy(p.size):""})]}),y.jsx("button",{type:"button",onClick:ae,className:"rounded-card border border-border px-3 py-1.5 text-small text-text-secondary hover:text-text-primary",children:"Close"})]}),y.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[S&&y.jsx("p",{className:"text-small text-text-secondary",children:"Loading preview…"}),!S&&T&&y.jsx("p",{className:"text-small text-text-secondary",children:T}),!S&&!T&&v==="text"&&y.jsx("pre",{className:"whitespace-pre-wrap break-words text-small text-text-primary font-mono",children:j}),!S&&!T&&v==="srcdoc"&&y.jsx("iframe",{title:"Document preview",srcDoc:L,className:"w-full h-full min-h-[56vh] border border-border rounded-card",sandbox:""}),!S&&!T&&v==="pdf"&&U&&y.jsx("iframe",{title:"PDF preview",src:U,className:"w-full h-full min-h-[56vh] border border-border rounded-card"}),!S&&!T&&v==="image"&&U&&y.jsx("img",{src:U,alt:(p==null?void 0:p.name)??"Image preview",className:"max-w-full h-auto rounded-card border border-border"}),!S&&!T&&v==="audio"&&U&&y.jsx("audio",{controls:!0,src:U,className:"w-full"}),!S&&!T&&v==="video"&&U&&y.jsx("video",{controls:!0,src:U,className:"max-w-full h-auto rounded-card border border-border"})]})]})})]})}const XT=[[/store|zustand/i,"ts"],[/hook|use[A-Z]/i,"ts"],[/service|api|client|fetch/i,"ts"],[/type|interface|model|schema/i,"ts"],[/config|constants?|env/i,"ts"],[/component|button|card|modal|drawer|header|footer|layout|page|screen|view/i,"tsx"],[/app$/i,"tsx"]];function QT(t){for(const[a,i]of XT)if(a.test(t))return i;return"ts"}function JT(t){const a=t.replace(/\s*[\-—]\s*[\w/ ]+$/,"").replace(/[^a-zA-Z0-9 ]/g,"").trim().split(/\s+/).map((s,o)=>o===0?s.toLowerCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase()).join(""),i=QT(t);return/component|button|card|modal|drawer|header|footer|layout|page|screen|view/i.test(t)?`src/components/${a}.${i}`:/store|zustand/i.test(t)?`src/stores/${a}.${i}`:/hook|use[A-Z]/i.test(t)?`src/hooks/${a}.${i}`:/service|api|client|fetch/i.test(t)?`src/lib/${a}.${i}`:/type|interface|model|schema/i.test(t)?`src/types/${a}.${i}`:/route|router|navigation/i.test(t)?`src/router/${a}.${i}`:`src/${a}.${i}`}function WT(t){const a=[],i=/```(\w*)\n([\s\S]*?)```/g;let s;for(;(s=i.exec(t))!==null;){const o=s[1]||"text",c=s[2],u=c.split(`
|
|
83
|
+
`).find(h=>h.trim())??"";a.push({lang:o,code:c,firstLine:u})}return a}function eC(t){return/tsx?|jsx?|ts|js|css|scss|json|html|sh|bash|yaml|yml/i.test(t)}const tC=/(?:\*\*file(?:name)?:\*\*\s*`([^`]+)`|^\/\/\s*(src\/[^\s]+))/im;function nC(t){const a=tC.exec(t);return a?a[1]??a[2]??null:null}function Ly(t){const a=/^(?:\/\/|#)\s*(src\/[^\s]+\.[a-z]+)/i.exec(t);return a?a[1]:null}function aC(t,a="Generated App"){const i={};for(const s of t){if(s.phase!==6)continue;const o=WT(s.content);if(o.length===0)continue;const c=nC(s.content)??Ly(o[0].firstLine),u=c??JT(s.title),h=o.find(p=>eC(p.lang))??o[0];let g=h.code;!c&&Ly(h.firstLine)&&(g=g.replace(/^[^\n]+\n/,"")),i[u]=g.trimEnd()}return i["package.json"]||(i["package.json"]=JSON.stringify({name:a.toLowerCase().replace(/\s+/g,"-"),version:"0.0.1",private:!0,scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{react:"^19.0.0","react-dom":"^19.0.0","react-router-dom":"^7.5.0",zustand:"^5.0.12",axios:"^1.7.9"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^5.7.2",vite:"^6.0.5"}},null,2)),i["vite.config.ts"]||(i["vite.config.ts"]=`import { defineConfig } from 'vite'
|
|
84
|
+
import react from '@vitejs/plugin-react'
|
|
85
|
+
|
|
86
|
+
export default defineConfig({
|
|
87
|
+
plugins: [react()],
|
|
88
|
+
})
|
|
89
|
+
`),i["index.html"]||(i["index.html"]=`<!doctype html>
|
|
90
|
+
<html lang="en">
|
|
91
|
+
<head>
|
|
92
|
+
<meta charset="UTF-8" />
|
|
93
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
94
|
+
<title>${a}</title>
|
|
95
|
+
</head>
|
|
96
|
+
<body>
|
|
97
|
+
<div id="root"></div>
|
|
98
|
+
<script type="module" src="/src/main.tsx"><\/script>
|
|
99
|
+
</body>
|
|
100
|
+
</html>
|
|
101
|
+
`),i["src/main.tsx"]||(i["src/main.tsx"]=`import { StrictMode } from 'react'
|
|
102
|
+
import { createRoot } from 'react-dom/client'
|
|
103
|
+
import App from './App'
|
|
104
|
+
|
|
105
|
+
createRoot(document.getElementById('root')!).render(
|
|
106
|
+
<StrictMode>
|
|
107
|
+
<App />
|
|
108
|
+
</StrictMode>,
|
|
109
|
+
)
|
|
110
|
+
`),i["tsconfig.json"]||(i["tsconfig.json"]=JSON.stringify({compilerOptions:{target:"ES2020",useDefineForClassFields:!0,lib:["ES2020","DOM","DOM.Iterable"],module:"ESNext",skipLibCheck:!0,moduleResolution:"bundler",allowImportingTsExtensions:!0,isolatedModules:!0,moduleDetection:"force",noEmit:!0,jsx:"react-jsx",strict:!0},include:["src"]},null,2)),i}const rC=d.lazy(()=>Kc(()=>import("./AppPreviewPanel-r56nQGPH.js"),[])),iC=[];function Vy(t){switch(t){case"persona":return AS;case"journey-map":return bS;case"feature-tree":return SS;case"data-model":return mS;case"brief":return gS;case"extraction-ledger":return $c;case"competitive-analysis":return cS;case"insights":return i0;case"flow":return dS;default:return n8}}function Hy(t){switch(t){case"persona":return"Persona";case"journey-map":return"Journey Map";case"feature-tree":return"Feature Tree";case"data-model":return"Data Model";case"brief":return"Brief";case"extraction-ledger":return"KB Ledger";case"competitive-analysis":return"Competitive";case"insights":return"Insights";case"flow":return"User Flow";default:return"Document"}}function bb(t,a){const i=URL.createObjectURL(t),s=document.createElement("a");s.href=i,s.download=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)}function ps(t){return t.replace(/\\/g,"\\\\").replace(/{/g,"\\{").replace(/}/g,"\\}")}function Qf(t){return ps(t).replace(/\*\*([^*]+)\*\*/g,"{\\b $1}").replace(/\*([^*]+)\*/g,"{\\i $1}")}function sC(t,a){const i=a.split(`
|
|
111
|
+
`);let s=`{\\pard\\sb240\\sa120\\b\\fs36 ${ps(t)}\\b0\\par
|
|
112
|
+
\\pard\\par
|
|
113
|
+
`;for(const o of i)o.startsWith("## ")?s+=`\\pard\\sb240\\sa100\\b\\fs28 ${ps(o.slice(3))}\\b0\\par
|
|
114
|
+
`:o.startsWith("### ")?s+=`\\pard\\sb160\\sa80\\b\\fs24 ${ps(o.slice(4))}\\b0\\par
|
|
115
|
+
`:o.startsWith("#### ")?s+=`\\pard\\sb120\\sa60\\b\\fs22 ${ps(o.slice(5))}\\b0\\par
|
|
116
|
+
`:o.startsWith("- ")||o.startsWith("* ")?s+=`\\pard\\li360\\fi-180\\sa60\\bullet\\tx360 ${Qf(o.slice(2))}\\par
|
|
117
|
+
`:/^\d+\. /.test(o)?s+=`\\pard\\li360\\sa60 ${Qf(o.replace(/^\d+\. /,""))}\\par
|
|
118
|
+
`:o.startsWith("> ")?s+=`\\pard\\li360\\sa100\\i ${ps(o.slice(2))}\\i0\\par
|
|
119
|
+
`:o.trim()?s+=`\\pard\\sa100 ${Qf(o)}\\par
|
|
120
|
+
`:s+=`\\pard\\par
|
|
121
|
+
`;return`{\\rtf1\\ansi\\ansicpg1252\\deff0{\\fonttbl{\\f0\\froman\\fcharset0 Times New Roman;}{\\f1\\fswiss\\fcharset0 Arial;}}\\widowctrl\\hyphauto\\f0\\fs24
|
|
122
|
+
${s}}`}function lC(t){const a=sC(t.title,t.content);bb(new Blob([a],{type:"application/rtf"}),`${t.title}.rtf`)}async function oC(t){const{Document:a,Packer:i,Paragraph:s,TextRun:o,HeadingLevel:c,AlignmentType:u,LevelFormat:h,NumberFormat:g}=await Kc(async()=>{const{Document:S,Packer:w,Paragraph:T,TextRun:M,HeadingLevel:j,AlignmentType:R,LevelFormat:L,NumberFormat:B}=await import("./index-Bym9SmTQ.js");return{Document:S,Packer:w,Paragraph:T,TextRun:M,HeadingLevel:j,AlignmentType:R,LevelFormat:L,NumberFormat:B}},[]),p=[];p.push(new s({text:t.title,heading:c.TITLE,spacing:{after:240}}));const b=t.content.split(`
|
|
123
|
+
`);for(const S of b)if(S.startsWith("## "))p.push(new s({text:S.slice(3).trim(),heading:c.HEADING_2}));else if(S.startsWith("### "))p.push(new s({text:S.slice(4).trim(),heading:c.HEADING_3}));else if(S.startsWith("#### "))p.push(new s({text:S.slice(5).trim(),heading:c.HEADING_4}));else if(S.startsWith("- ")||S.startsWith("* "))p.push(new s({text:S.slice(2).trim(),bullet:{level:0}}));else if(/^\d+\. /.test(S))p.push(new s({text:S.replace(/^\d+\. /,"").trim(),numbering:{reference:"default-numbering",level:0}}));else if(S.startsWith("> "))p.push(new s({children:[new o({text:S.slice(2).trim(),italics:!0,color:"666666"})],indent:{left:720}}));else if(S.trim()){const w=[],T=S.split(/(\*\*[^*]+\*\*)/g);for(const M of T)M.startsWith("**")&&M.endsWith("**")?w.push(new o({text:M.slice(2,-2),bold:!0})):M&&w.push(new o({text:M}));p.push(new s({children:w}))}else p.push(new s({text:""}));const v=new a({numbering:{config:[{reference:"default-numbering",levels:[{level:0,format:h.DECIMAL,text:"%1.",alignment:u.LEFT}]}]},sections:[{children:p}]}),E=await i.toBlob(v);bb(E,`${t.title}.docx`)}function Rl(t){return t.split(/(\*\*[^*]+\*\*|`[^`]+`|\*[^*]+\*)/g).map((i,s)=>i.startsWith("**")&&i.endsWith("**")?y.jsx("strong",{className:"font-semibold",children:i.slice(2,-2)},s):i.startsWith("`")&&i.endsWith("`")?y.jsx("code",{className:"font-mono text-[0.8em] bg-border-secondary px-1 rounded",children:i.slice(1,-1)},s):i.startsWith("*")&&i.endsWith("*")&&i.length>2?y.jsx("em",{children:i.slice(1,-1)},s):i)}function cC(t){const a=t.split(`
|
|
124
|
+
`),i=[];let s=0,o=[];function c(){o.length>0&&(i.push(y.jsx("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:o.map((u,h)=>y.jsx("li",{className:"text-small text-text-primary leading-snug",children:Rl(u)},h))},`ul-${s}`)),o=[])}for(;s<a.length;){const u=a[s],h=u.trim();if(u.startsWith("### ")||u.startsWith("#### ")){c();const g=u.startsWith("#### ")?5:4,p=u.startsWith("#### ")?u.slice(5):u.slice(4);i.push(y.jsx("h4",{className:`font-semibold mt-3 mb-1 text-text-primary text-[${g===4?"0.85":"0.8"}rem]`,children:Rl(p)},s))}else u.startsWith("## ")?(c(),i.push(y.jsx("h3",{className:"font-semibold text-[0.9rem] mt-4 mb-1.5 text-text-primary",children:Rl(u.slice(3))},s))):u.startsWith("- ")||u.startsWith("* ")?o.push(u.slice(2)):u.startsWith("> ")?(c(),i.push(y.jsx("blockquote",{className:"border-l-2 border-border pl-3 text-text-secondary italic text-small my-2",children:Rl(u.slice(2))},s))):h==="---"?(c(),i.push(y.jsx("hr",{className:"my-2 border-border"},s))):h===""?c():(c(),i.push(y.jsx("p",{className:"text-small text-text-primary mb-1.5 leading-relaxed",children:Rl(u)},s)));s++}return c(),i}function uC(){const t=Bt(he=>he.contextPanelOpen),a=Bt(he=>he.contextPanelContent),i=Bt(he=>he.closeContextPanel),s=Bt(he=>he.selectedSlug),o=Bt(he=>he.projects.find(Nt=>Nt.slug===s)),c=Bt(he=>he.updateProject),u=Vn(he=>s?he.jobsByProject[s]??null:null),h=aa(he=>he.runs),g=aa(he=>he.setActiveRunId),p=aa(he=>he.setModalOpen),b=aa(he=>he.discardRun),v=Vn(he=>he.queueKbJob),E=Vn(he=>he.resumeProjectJob),S=Vn(he=>he.clearProjectJob),w=Sr(he=>!!he.copilotToken),T=$l(he=>he.byProject),M=(s?T[s]:void 0)??iC,[j,R]=d.useState("kb"),[L,B]=d.useState(null),[U,le]=d.useState(!1),[ne,_]=d.useState(!1),[ee,ae]=d.useState(new Set),[ie,Q]=d.useState(new Set),pe=d.useRef(new Set),fe=d.useRef(null),ye=d.useMemo(()=>Array.from(h.values()).sort((he,Nt)=>Nt.startedAt-he.startedAt),[h]),H=s?ye.filter(he=>he.projectSlug===s):[],X=L?M.find(he=>he.id===L)??null:null;d.useEffect(()=>{a==="kb"?R("kb"):a==="artefacts"&&R("artifacts")},[a]),d.useEffect(()=>{t||B(null)},[t]),d.useEffect(()=>{var he;t&&((he=fe.current)==null||he.focus())},[t]),d.useEffect(()=>{s&&E(s)},[E,s]),d.useEffect(()=>{function he(Nt){if(Nt.key==="Escape"&&t){if(L){B(null);return}i()}}return document.addEventListener("keydown",he),()=>document.removeEventListener("keydown",he)},[t,i,L]);async function Y(he){if(o){if(c(o.slug,{kb_files:he}),he.length===0){S(o.slug);return}await v(o.slug,he,"upload",!0)}}const ue=d.useCallback(async he=>{_(!0);try{await oC(he)}finally{_(!1)}},[]),Se=!!u&&u.status!=="idle",C=M.filter(he=>he.isStreaming).length,q=M.some(he=>he.phase===6),[oe,me]=d.useState(!1),[xe,Ne]=d.useState(null);d.useEffect(()=>{const he=new Set(M.map(Ve=>Ve.id)),Nt=[];for(const Ve of he)pe.current.has(Ve)||Nt.push(Ve);pe.current=he,Nt.length!==0&&(Q(Ve=>new Set([...Ve,...Nt])),Nt.forEach(Ve=>{window.setTimeout(()=>{Q($e=>{const qt=new Set($e);return qt.delete(Ve),qt})},1600)}))},[M]);function $({id:he,label:Nt,count:Ve,icon:$e}){const qt=j===he&&!L;return y.jsxs("button",{type:"button",onClick:()=>{R(he),B(null)},className:["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-card text-small font-medium transition-colors",qt?"bg-border-secondary text-text-primary":"text-text-tertiary hover:text-text-secondary hover:bg-border-secondary/50"].join(" "),children:[y.jsx($e,{size:13,"aria-hidden":"true"}),Nt,Ve!==void 0&&Ve>0&&y.jsx("span",{className:["ml-0.5 min-w-[18px] h-[18px] rounded-full text-caption flex items-center justify-center px-1",qt?"bg-text-primary text-white":"bg-border-secondary text-text-secondary"].join(" "),children:Ve})]},he)}function ze(){if(M.length===0&&H.length===0)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center py-16",children:[y.jsx(W2,{size:32,className:"text-text-tertiary mb-3","aria-hidden":"true"}),y.jsx("p",{className:"text-body-standard text-text-secondary",children:"No artefacts yet"}),y.jsx("p",{className:"text-caption text-text-tertiary mt-1",children:"Artefacts appear as the pipeline generates them"})]});const he=M.reduce((Ve,$e)=>(Ve.has($e.phase)||Ve.set($e.phase,{name:$e.phaseName,color:$e.phaseColor,items:[]}),Ve.get($e.phase).items.push($e),Ve),new Map),Nt=Array.from(he.entries()).sort(([Ve],[$e])=>Ve-$e);return y.jsxs("div",{className:"space-y-4 p-4",children:[C>0&&y.jsxs("div",{className:"flex items-center gap-2 text-small text-text-tertiary",children:[y.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-lemon-500 animate-pulse flex-shrink-0"}),"Generating ",C," artefact",C>1?"s":"","…"]}),q&&C===0&&y.jsxs("button",{type:"button",onClick:()=>le(!0),className:"w-full flex items-center gap-2 px-3 py-2.5 rounded-card border border-border bg-card hover:shadow-hover-subtle transition-all group",children:[y.jsx(xS,{size:14,className:"text-text-tertiary group-hover:text-text-primary transition-colors flex-shrink-0","aria-hidden":"true"}),y.jsxs("div",{className:"flex-1 text-left min-w-0",children:[y.jsx("p",{className:"text-small font-medium text-text-primary",children:"Preview app"}),y.jsx("p",{className:"text-caption text-text-tertiary",children:"Open generated code in StackBlitz"})]})]}),q&&C===0&&o&&y.jsxs("button",{type:"button",disabled:oe,onClick:async()=>{me(!0),Ne(null);try{const Ve=M.filter(Yt=>Yt.phase===6),$e=aC(Ve),qt=await OS(o.slug,$e);Ne({dir:qt.exportDir})}catch{}finally{me(!1)}},className:"w-full flex items-center gap-2 px-3 py-2.5 rounded-card border border-border bg-card hover:shadow-hover-subtle transition-all group disabled:opacity-50",children:[y.jsx(J2,{size:14,className:"text-text-tertiary group-hover:text-text-primary transition-colors flex-shrink-0","aria-hidden":"true"}),y.jsxs("div",{className:"flex-1 text-left min-w-0",children:[y.jsx("p",{className:"text-small font-medium text-text-primary",children:oe?"Exporting…":xe?"Exported":"Export to disk"}),y.jsx("p",{className:"text-caption text-text-tertiary truncate",children:xe?xe.dir:"Save code to ~/.designx/projects/"})]})]}),H.length>0&&y.jsxs("div",{children:[y.jsxs("p",{className:"text-caption font-medium text-text-tertiary uppercase tracking-wider px-1 mb-2",children:["Agent Runs (",H.length,")"]}),y.jsx("ul",{role:"list",className:"space-y-1.5",children:H.map(Ve=>y.jsxs("li",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-card border border-border bg-card",children:[y.jsx(i0,{size:14,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"text-caption text-text-primary truncate",children:Ve.agentName}),y.jsx("p",{className:"text-caption text-text-tertiary truncate",children:Ve.status})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{type:"button",onClick:()=>{g(Ve.runId),p(!0)},className:"rounded-card border border-border px-2 py-1 text-caption text-text-secondary hover:text-text-primary",children:"View"}),y.jsx("button",{type:"button",onClick:()=>b(Ve.runId),className:"rounded-card border border-border px-2 py-1 text-caption text-text-secondary hover:text-text-primary",children:"Discard"})]})]},Ve.runId))})]}),Nt.map(([Ve,$e])=>{const qt=ee.has(Ve);return y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>ae(Yt=>{const tn=new Set(Yt);return tn.has(Ve)?tn.delete(Ve):tn.add(Ve),tn}),className:"w-full flex items-center gap-2 px-1 mb-2 group",children:[y.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:$e.color}}),y.jsx("p",{className:"text-caption font-medium text-text-tertiary uppercase tracking-wider flex-1 text-left",children:$e.name}),y.jsx("span",{className:"text-caption text-text-tertiary",children:$e.items.length}),y.jsx("span",{className:"text-caption text-text-tertiary ml-1",children:qt?"›":"⌄"})]}),!qt&&y.jsx("ul",{role:"list",className:"space-y-1.5",children:$e.items.map(Yt=>{const tn=Vy(Yt.type),Zn=ie.has(Yt.id);return y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:()=>B(Yt.id),style:Zn?{"--spotlight-color":Yt.phaseColor}:void 0,className:["w-full flex items-center gap-2.5 px-3 py-2.5 rounded-card border border-border bg-card hover:shadow-clay transition-all text-left group",Zn?"artifact-spotlight":""].join(" "),children:[y.jsx(tn,{size:14,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsxs("p",{className:"text-small text-text-primary truncate leading-snug group-hover:text-text-primary",children:[Yt.title,Yt.isStreaming&&y.jsx("span",{className:"ml-1.5 inline-block w-1 h-3 bg-lemon-500 animate-pulse align-middle"})]}),y.jsx("p",{className:"text-caption text-text-tertiary",children:Hy(Yt.type)})]})]})},Yt.id)})})]},Ve)})]})}function Le(he){const Nt=Vy(he.type);return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4 pb-3 border-b border-border flex-shrink-0",children:[y.jsx("div",{className:"w-7 h-7 rounded-card border border-border flex items-center justify-center text-text-secondary",children:y.jsx(Nt,{size:14,"aria-hidden":"true"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"text-small font-medium text-text-primary leading-tight truncate",children:he.title}),y.jsxs("p",{className:"text-caption text-text-tertiary",children:[Hy(he.type)," · ",he.phaseName,he.isStreaming&&y.jsx("span",{className:"ml-1.5 text-lemon-500",children:"● live"})]})]})]}),y.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-border flex-shrink-0",children:[y.jsx(J2,{size:13,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsx("span",{className:"text-caption text-text-tertiary mr-1",children:"Export"}),y.jsx("button",{type:"button",onClick:()=>lC(he),className:"rounded-card border border-border px-2.5 py-1 text-caption text-text-secondary hover:text-text-primary hover:shadow-hover-subtle transition-all",children:"RTF"}),y.jsx("button",{type:"button",onClick:()=>void ue(he),disabled:ne,className:"rounded-card border border-border px-2.5 py-1 text-caption text-text-secondary hover:text-text-primary hover:shadow-hover-subtle transition-all disabled:opacity-40",children:ne?"Exporting…":"DOCX"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto px-4 py-4 prose-sm max-w-none",children:cC(he.content)})]})}function ut(){return y.jsx("div",{className:"space-y-4 p-4",children:y.jsxs("div",{className:"rounded-card border border-border bg-card px-4 py-4 shadow-clay",children:[y.jsxs("div",{className:"flex items-start gap-3",children:[y.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-card bg-border-secondary text-text-primary flex-shrink-0",children:y.jsx($c,{size:18,"aria-hidden":"true"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"text-body-medium font-medium text-text-primary",children:"Project KB"}),y.jsx("p",{className:"mt-1 text-caption text-text-secondary",children:"Keep source documents attached, add or remove files, then refresh the project context when sources change."})]})]}),y.jsx("div",{className:"mt-4 rounded-card border border-border bg-canvas px-3 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{children:[y.jsxs("p",{className:"text-small font-medium text-text-primary",children:[(o==null?void 0:o.kb_files.length)??0," file",(o==null?void 0:o.kb_files.length)===1?"":"s"," attached"]}),y.jsx("p",{className:"mt-0.5 text-small text-text-tertiary",children:"Changes persist with the project and feed the next context refresh."})]}),y.jsxs("button",{type:"button",onClick:()=>o&&void v(o.slug,o.kb_files,"manual",!0),disabled:!o||o.kb_files.length===0||(u==null?void 0:u.status)==="queued"||(u==null?void 0:u.status)==="processing"||(u==null?void 0:u.status)==="refreshing-context",className:"flex items-center gap-1.5 rounded-card border border-border px-3 py-2 text-small font-medium text-text-primary transition-all duration-100 hover:-translate-y-0.5 hover:shadow-hover-subtle disabled:cursor-not-allowed disabled:opacity-40",children:[y.jsx(i0,{size:14,"aria-hidden":"true"}),"Re-run extraction"]})]})}),Se&&y.jsxs("div",{className:"mt-4 rounded-card border border-border bg-canvas px-3 py-3",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{children:[y.jsx("p",{className:"text-small font-medium text-text-primary",children:(u==null?void 0:u.status)==="queued"?"Knowledge base queued":(u==null?void 0:u.status)==="processing"?"Preparing knowledge base":(u==null?void 0:u.status)==="ready"?"Knowledge base ready":(u==null?void 0:u.status)==="refreshing-context"?"Refreshing project context":(u==null?void 0:u.status)==="applied"?"Project context refreshed":"KB processing needs attention"}),y.jsx("p",{className:"mt-0.5 text-small text-text-tertiary",children:(u==null?void 0:u.error)??(u==null?void 0:u.stageLabel)})]}),y.jsxs("span",{className:"text-small font-medium text-text-secondary",children:[Math.max(1,Math.min(100,Math.round((u==null?void 0:u.progress)??0))),"%"]})]}),y.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-border-secondary",children:y.jsx("div",{className:["h-full rounded-full bg-text-primary transition-all duration-500",(u==null?void 0:u.status)==="queued"||(u==null?void 0:u.status)==="processing"||(u==null?void 0:u.status)==="refreshing-context"?"animate-pulse":""].join(" "),style:{width:`${Math.max(8,Math.min(100,(u==null?void 0:u.progress)??0))}%`}})})]}),y.jsx(yb,{files:(o==null?void 0:o.kb_files)??[],onChange:Y,projectSlug:o==null?void 0:o.slug}),!w&&(u==null?void 0:u.status)==="ready"&&y.jsx("p",{className:"text-small text-text-tertiary mt-3",children:"Connect Copilot to apply the prepared KB package to the active project context."})]})})}return y.jsx(BM,{children:t&&y.jsxs(qT.aside,{initial:{x:"100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"w-[380px] flex-shrink-0 flex flex-col border-l border-border bg-canvas overflow-hidden h-full",role:"complementary","aria-label":X?X.title:j==="kb"?"Knowledge Base":"Artefacts",children:[y.jsxs("div",{className:"h-12 flex items-center justify-between px-3 border-b border-border flex-shrink-0",children:[X?y.jsxs("div",{className:"flex items-center gap-1 w-full min-w-0",children:[y.jsxs("button",{type:"button",onClick:()=>B(null),className:"flex items-center gap-1 text-small text-text-tertiary hover:text-text-primary transition-colors flex-shrink-0 px-1","aria-label":"Back to artefacts list",children:[y.jsx(rS,{size:14,"aria-hidden":"true"}),"Back"]}),y.jsx("span",{className:"text-small text-text-secondary truncate flex-1 ml-1",children:X.title})]}):y.jsxs("div",{className:"flex items-center gap-1",children:[$({id:"kb",label:"Knowledge Base",icon:$c}),$({id:"artifacts",label:"Artefacts",count:M.length,icon:W2})]}),y.jsx("button",{ref:fe,onClick:i,"aria-label":"Close panel",className:"ml-2 flex-shrink-0 w-7 h-7 flex items-center justify-center rounded-card text-text-tertiary hover:text-text-primary hover:bg-border-secondary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary",children:y.jsx(W0,{size:15,"aria-hidden":"true"})})]}),y.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:X?Le(X):j==="kb"?y.jsx("div",{className:"flex-1 overflow-y-auto",children:ut()}):y.jsx("div",{className:"flex-1 overflow-y-auto",children:ze()})}),U&&s&&y.jsx(d.Suspense,{fallback:null,children:y.jsx("div",{className:"absolute inset-0 z-20",children:y.jsx(rC,{artifacts:M,projectName:(o==null?void 0:o.name)??s,onClose:()=>le(!1)})})})]})})}function dC({children:t}){return y.jsxs("div",{className:"flex h-dvh overflow-hidden bg-canvas",children:[y.jsx(G9,{}),y.jsx("main",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",id:"main-content",children:t}),y.jsx(uC,{})]})}const Fc=[{id:"name",question:"What are we designing?",hint:"Give your project a name — a product, feature, or concept.",inputType:"text",placeholder:"e.g. Fintech onboarding flow, Patient portal redesign…"},{id:"domain",question:"Which domain does this fall under?",hint:"Shapes research patterns and design heuristics.",inputType:"select",options:[{value:"fintech",label:"Fintech"},{value:"medtech",label:"MedTech"},{value:"saas",label:"SaaS"},{value:"healthcare",label:"Healthcare"},{value:"e-commerce",label:"E-commerce"},{value:"enterprise",label:"Enterprise"},{value:"education",label:"Education"},{value:"other",label:"Other"}]},{id:"nature",question:"Are we starting fresh or building on something existing?",hint:"This determines how the pipeline handles research and architecture.",inputType:"select",options:[{value:"greenfield",label:"Greenfield",description:"Brand new product — starting from scratch"},{value:"brownfield",label:"Brownfield",description:"Existing product — evolving, redesigning, or extending it"}]},{id:"application_type",question:"What type of application is this?",hint:"Determines the design patterns and component libraries the pipeline uses.",inputType:"select",options:[{value:"responsive-website",label:"Responsive Website",description:"Multi-page site, marketing, or content-heavy product"},{value:"mobile-app",label:"Mobile App",description:"iOS, Android, or cross-platform native app"},{value:"chatbot",label:"Chatbot / Conversational",description:"Chat-first interface or assistant-driven product"},{value:"agent-platform",label:"Agent Platform",description:"Multi-agent workflow orchestration product"},{value:"dashboard",label:"Dashboard / Analytics",description:"Data-heavy interfaces, charts, operational tools"},{value:"custom",label:"Custom",description:"Doesn't fit the above — let's figure it out"}]},{id:"preset",question:"How far should the pipeline go?",hint:"Your preset determines which phases run.",inputType:"select",options:[{value:"end-to-end",label:"End-to-End",description:"Research → Ideate → Design → Plan → Build → Measure"},{value:"research-sprint",label:"Research Sprint",description:"Research → Design only, no build phase"}]},{id:"control_mode",question:"How hands-on do you want to be?",hint:"You can change this at any time during the project.",inputType:"select",options:[{value:"human-in-loop",label:"Review each gate",description:"Pause at every decision point — you approve before moving on"},{value:"autonomous",label:"Let it run",description:"Auto-advance when confident, stop only at critical decisions"}]}],ky=5,fC=Fc.length+1,Ql="enigma_setup_drafts";function hC(t){try{const a=localStorage.getItem(Ql);return a?JSON.parse(a)[t]??null:null}catch{return null}}function zy(t,a){try{const i=localStorage.getItem(Ql),s=i?JSON.parse(i):{};s[t]=a,localStorage.setItem(Ql,JSON.stringify(s))}catch{console.error(`Failed to save setup draft for ${t}`)}}function mC(t){try{const a=localStorage.getItem(Ql);if(!a)return;const i=JSON.parse(a);delete i[t],localStorage.setItem(Ql,JSON.stringify(i))}catch{console.error(`Failed to clear setup draft for ${t}`)}}function pC(t){const a=Date.now(),i=[{id:crypto.randomUUID(),type:"agent",timestamp:a,content:"Let's set up your project. I'll ask a few questions to understand what we're building and how to configure the pipeline."}];return t.forEach((s,o)=>{const c=a+(o+1)*2;i.push({id:crypto.randomUUID(),type:"agent",timestamp:c,content:s.question}),i.push({id:crypto.randomUUID(),type:"user",timestamp:c+1,content:s.displayValue})}),i.push({id:crypto.randomUUID(),type:"system",timestamp:a+(t.length+1)*2,content:"Onboarding completed. Project moved to Discover."}),i}function gC(t,a){try{localStorage.setItem(`enigma_stream_${t}`,JSON.stringify({messages:pC(a),activeGateKey:null,inputDraft:""}))}catch{console.error(`Failed to save onboarding transcript for ${t}`)}}function Nl({children:t}){return y.jsxs("div",{className:"flex gap-3",children:[y.jsx("div",{className:`flex-shrink-0 w-7 h-7 rounded-card bg-lemon-500 flex items-center
|
|
125
|
+
justify-center text-small font-semibold text-lemon-800`,"aria-hidden":"true",children:"DX"}),y.jsx("div",{className:"flex-1 min-w-0 pt-0.5",children:t})]})}function yC({text:t}){return y.jsx("div",{className:"flex justify-end",children:y.jsx("div",{className:"rounded-feature rounded-br-sharp bg-text-primary text-text-inverse px-4 py-2.5 text-body-standard shadow-clay max-w-[80%]",children:t})})}function vb(){const{slug:t}=ou(),{pathname:a}=za(),[i,s]=d.useState(0),[o,c]=d.useState([]),[u,h]=d.useState({}),[g,p]=d.useState([]),[b,v]=d.useState(""),[E,S]=d.useState(!1),[w,T]=d.useState(null),M=d.useRef(null),j=d.useRef(null),R=no(),L=Bt($=>$.setProjects),B=Bt($=>$.projects),U=Bt($=>$.selectProject),le=Bt($=>$.clearProject),ne=Bt($=>$.updateProject),_=Bt($=>$.openContextPanel),ee=Vn($=>$.queueKbJob),ae=Vn($=>$.clearProjectJob),ie=$l($=>$.clearProjectArtifacts),Q=Yc($=>$.clearProjectSession),pe=t?B.find($=>$.slug===t):null,fe=!!pe&&pe.status==="onboarding";function ye(){s(0),c([]),h({}),p([]),v(""),S(!1),T(null)}const H=i===ky,X=i>=fC,Y=(()=>{if(!(H||X))return i<ky?Fc[i]:Fc[i-1]})();d.useEffect(()=>{var $;($=M.current)==null||$.scrollIntoView({behavior:"smooth",block:"end"})},[i,E]),d.useEffect(()=>{var $;(Y==null?void 0:Y.inputType)==="text"&&(($=j.current)==null||$.focus())},[i]),d.useEffect(()=>{if(!pe||pe.status!=="onboarding")return;const $=hC(pe.slug);if($){s($.currentStepIndex),c($.completedSteps),h($.answers),p($.kbFiles),T(pe.slug),U(pe.slug);return}const ze={name:pe.name},Le=[{stepId:"name",question:Fc[0].question,displayValue:pe.name}];h(ze),c(Le),s(1),p(pe.kb_files??[]),T(pe.slug),U(pe.slug)},[pe,U]),d.useEffect(()=>{if(a.startsWith("/setup")){sessionStorage.getItem("enigma_skip_restore_once")&&sessionStorage.removeItem("enigma_skip_restore_once");return}if(!sessionStorage.getItem("enigma_restoration_attempted")){sessionStorage.setItem("enigma_restoration_attempted","true");try{const ze=localStorage.getItem("enigma_selected_project");if(ze&&B.length>0&&B.some(ut=>ut.slug===ze)){const ut=setTimeout(()=>{U(ze),R(`/project/${ze}`)},300);return()=>clearTimeout(ut)}}catch{}}},[a,B,R,t,U]),d.useEffect(()=>{if(a.startsWith("/setup")){if(!t){ye();return}if(!pe){ye(),le(),R("/setup",{replace:!0});return}pe.status!=="onboarding"&&R(`/project/${pe.slug}`,{replace:!0})}},[a,t,pe,le,R]);function ue($){return $.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Se($){const ze=$||"new-project";let Le=ze,ut=2;for(;B.some(he=>he.slug===Le);)Le=`${ze}-${ut}`,ut+=1;return Le}function C($){const ze=ue($),Le=Se(ze);ie(Le),ae(Le),Q(Le);try{localStorage.removeItem(`enigma_stream_${Le}`)}catch{}const ut=new Date().toISOString(),he={id:crypto.randomUUID(),slug:Le,name:$,description:null,domain:"other",nature:"greenfield",application_type:"responsive-website",preset:"end-to-end",control_mode:"human-in-loop",current_phase:1,status:"onboarding",created_at:ut,last_active_at:ut,tech_framework:null,tech_language:null,kb_files:[]};return L([he,...B]),U(Le),T(Le),Le}function q($,ze,Le){const ut={...u,[$.id]:ze},he=[...o,{stepId:$.id,question:$.question,displayValue:Le}],Nt=i+1;h(ut),c(he);let Ve=w;if($.id==="name")w?ne(w,{name:ze}):Ve=C(ze);else if(Ve){const $e={};$.id==="domain"&&($e.domain=ze),$.id==="nature"&&($e.nature=ze),$.id==="application_type"&&($e.application_type=ze),$.id==="preset"&&($e.preset=ze),$.id==="control_mode"&&($e.control_mode=ze),Object.keys($e).length>0&&ne(Ve,$e)}Ve&&zy(Ve,{currentStepIndex:Nt,completedSteps:he,answers:ut,kbFiles:g}),v(""),s(Nt)}function oe(){if(!Y||Y.inputType!=="text")return;const $=b.trim();$&&q(Y,$,$)}function me($){!Y||Y.inputType!=="select"||q(Y,$.value,$.label)}function xe(){const $=g.length>0?`${g.length} file${g.length>1?"s":""} added`:"Skipped",ze=[...o,{stepId:"kb",question:"Do you have a knowledge base to attach?",displayValue:$}],Le=i+1;c(ze),w&&(ne(w,{kb_files:g}),zy(w,{currentStepIndex:Le,completedSteps:ze,answers:u,kbFiles:g})),s(Le)}async function Ne($){if(p($),!!w){if(ne(w,{kb_files:$}),$.length===0){ae(w);return}U(w),_("kb"),await ee(w,$,"upload",!0)}}return d.useEffect(()=>{if(!X||E)return;S(!0);const $=w??C(u.name??"New Project"),ze=async()=>{try{const Le=await fetch("/api/projects/scaffold",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectSlug:$,projectName:u.name??"New Project",domain:u.domain??"other",nature:u.nature??"greenfield",application_type:u.application_type??"responsive-website",preset:u.preset??"end-to-end",control_mode:u.control_mode??"human-in-loop"})});if(!Le.ok){const ut=await Le.json();console.error("Failed to scaffold project:",ut)}}catch(Le){console.error("Error scaffolding project:",Le)}gC($,o),ne($,{name:u.name??"New Project",domain:u.domain??"other",nature:u.nature??"greenfield",application_type:u.application_type??"responsive-website",preset:u.preset??"end-to-end",control_mode:u.control_mode??"human-in-loop",kb_files:g,current_phase:2,status:"active"}),mC($),U($),R(`/project/${$}`)};setTimeout(()=>{ze()},900)},[X,E,w,u,g,R,U,ne]),y.jsxs("div",{className:"flex flex-col h-full",role:"main","aria-label":"New project setup",children:[y.jsx("div",{className:"flex-1 overflow-y-auto","aria-live":"polite","aria-atomic":"false",children:y.jsxs("div",{className:"mx-auto max-w-[640px] px-6 py-10 space-y-5 pb-36",children:[y.jsx(Nl,{children:y.jsx("p",{className:"text-body text-text-primary leading-relaxed",children:fe?"You are resuming a saved draft. I will continue from the last unanswered step and preserve the answers already captured.":"Let's set up your project. I'll ask a few questions to understand what we're building and how to configure the pipeline."})}),o.map($=>y.jsxs("div",{className:"space-y-2",children:[y.jsx(Nl,{children:y.jsx("p",{className:"text-body-standard text-text-tertiary",children:$.question})}),y.jsx(yC,{text:$.displayValue})]},$.stepId)),Y&&!H&&!X&&y.jsx("div",{className:"space-y-4",children:y.jsxs(Nl,{children:[y.jsx("p",{className:"text-body text-text-primary leading-relaxed",children:Y.question}),Y.hint&&y.jsx("p",{className:"mt-1 text-caption text-text-secondary",children:Y.hint}),Y.inputType==="select"&&Y.options&&y.jsx("div",{className:"mt-4 flex flex-col gap-2",role:"group","aria-label":`Options for: ${Y.question}`,children:Y.options.map($=>y.jsxs("button",{onClick:()=>me($),className:`w-full text-left px-4 py-3 rounded-card border border-border bg-card
|
|
126
|
+
shadow-clay hover:-translate-y-0.5 hover:shadow-hover-subtle
|
|
127
|
+
transition-all duration-100
|
|
128
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary`,"aria-label":$.description?`${$.label} — ${$.description}`:$.label,children:[y.jsx("span",{className:"block text-button-small font-medium text-text-primary",children:$.label}),$.description&&y.jsx("span",{className:"block text-small text-text-secondary mt-0.5",children:$.description})]},$.value))})]})}),H&&!X&&y.jsx("div",{className:"space-y-4",children:y.jsxs(Nl,{children:[y.jsx("p",{className:"text-body text-text-primary leading-relaxed",children:"Do you have existing documents — research notes, briefs, specs — to attach as a knowledge base?"}),y.jsx("p",{className:"mt-1 text-caption text-text-secondary",children:"Accepted: .md, .pdf, .docx, .xlsx, .csv, .txt · Optional"}),y.jsx(yb,{files:g,onChange:Ne,showFileList:!1}),y.jsx("p",{className:"mt-3 text-small text-text-secondary",children:g.length>0?`${g.length} document${g.length===1?"":"s"} uploaded`:"No documents uploaded yet"}),y.jsx("div",{className:"mt-4",children:y.jsx("button",{onClick:xe,className:`px-4 py-2 rounded-card bg-text-primary text-text-inverse
|
|
129
|
+
text-button-small font-medium shadow-clay
|
|
130
|
+
hover:-translate-y-0.5 hover:shadow-hover-subtle transition-all duration-100
|
|
131
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary`,children:g.length>0?`Continue with ${g.length} file${g.length>1?"s":""}`:"Skip for now"})})]})}),E&&y.jsx(Nl,{children:y.jsxs("p",{className:"text-body text-text-primary leading-relaxed flex items-center gap-2",children:[y.jsx(ws,{size:16,className:"text-matcha-600 flex-shrink-0",weight:"fill","aria-hidden":"true"}),"Creating your project…"]})}),y.jsx("div",{ref:M,"aria-hidden":"true"})]})}),(Y==null?void 0:Y.inputType)==="text"&&!X&&y.jsx("div",{className:"sticky bottom-0 bg-canvas",children:y.jsx("div",{className:"mx-auto max-w-[640px] px-6 py-4",children:y.jsxs("div",{className:`flex items-end gap-2 rounded-feature border border-border
|
|
132
|
+
bg-card shadow-clay px-4 py-3
|
|
133
|
+
focus-within:border-text-primary transition-colors`,children:[y.jsx("input",{ref:j,value:b,onChange:$=>v($.target.value),onKeyDown:$=>{$.key==="Enter"&&oe()},placeholder:Y.placeholder,"aria-label":Y.question,className:`flex-1 bg-transparent text-body-standard text-text-primary
|
|
134
|
+
placeholder:text-text-secondary font-primary outline-none
|
|
135
|
+
min-h-[24px] leading-relaxed`}),y.jsx("button",{onClick:oe,disabled:!b.trim(),"aria-label":"Submit answer","aria-disabled":!b.trim(),className:`flex-shrink-0 w-8 h-8 rounded-standard flex items-center justify-center
|
|
136
|
+
bg-text-primary text-text-inverse
|
|
137
|
+
disabled:opacity-30 disabled:cursor-not-allowed
|
|
138
|
+
enabled:hover:-rotate-6 enabled:hover:-translate-y-1
|
|
139
|
+
enabled:hover:shadow-hover-hard
|
|
140
|
+
transition-all duration-100
|
|
141
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-inverse`,children:y.jsx(B4,{size:14,weight:"bold","aria-hidden":"true"})})]})})})]})}function bC(){return y.jsx(vb,{})}function By(){return y.jsx(vb,{})}const Rt=Ar((t,a)=>({messages:[],isStreaming:!1,activeGateKey:null,inputDraft:"",onGateResolved:null,currentProjectSlug:null,setCurrentProjectSlug:i=>t({currentProjectSlug:i}),saveStreamToStorage:i=>{try{const s=a(),o={messages:s.messages,activeGateKey:s.activeGateKey,inputDraft:s.inputDraft},c=`enigma_stream_${i}`;localStorage.setItem(c,JSON.stringify(o)),jS(i,o)}catch{console.error(`Failed to save stream for project ${i}`)}},loadStreamFromStorage:i=>{try{const s=`enigma_stream_${i}`,o=localStorage.getItem(s);if(o){const c=JSON.parse(o);return t({messages:c.messages||[],activeGateKey:c.activeGateKey||null,inputDraft:c.inputDraft||""}),!0}}catch{console.error(`Failed to load stream for project ${i}`)}return!1},appendMessage:i=>t(s=>({messages:[...s.messages,i],activeGateKey:i.type==="gate"&&i.gateStatus==="pending"?i.gateKey??null:s.activeGateKey})),updateLastAgent:i=>t(s=>{const o=[...s.messages];for(let c=o.length-1;c>=0;c--)if(o[c].type==="agent")return o[c]={...o[c],content:i},{messages:o};return{}}),updateArtifactProgress:(i,s,o)=>t(c=>({messages:c.messages.map(u=>u.id===i?{...u,artifactProgress:s,...o!==void 0?{agentNote:o}:{}}:u)})),resolveGate:(i,s,o)=>{var c,u;t(h=>({messages:h.messages.map(g=>g.type==="gate"&&g.gateKey===i?{...g,gateStatus:s}:g),activeGateKey:null})),(u=(c=a()).onGateResolved)==null||u.call(c,i,s,o)},setOnGateResolved:i=>t({onGateResolved:i}),setInputDraft:i=>t({inputDraft:i}),setStreaming:i=>t({isStreaming:i}),clearStream:()=>t({messages:[],isStreaming:!1,activeGateKey:null})}));function vC({content:t}){return y.jsx("div",{className:"flex justify-end",children:y.jsx("div",{className:`max-w-[75%] rounded-feature rounded-br-sharp bg-text-primary text-text-inverse
|
|
142
|
+
px-4 py-3 text-body-standard shadow-clay whitespace-pre-wrap`,children:t})})}var Jf,Uy;function xC(){if(Uy)return Jf;Uy=1;function t(O){return O instanceof Map?O.clear=O.delete=O.set=function(){throw new Error("map is read-only")}:O instanceof Set&&(O.add=O.clear=O.delete=function(){throw new Error("set is read-only")}),Object.freeze(O),Object.getOwnPropertyNames(O).forEach(J=>{const Ee=O[J],qe=typeof Ee;(qe==="object"||qe==="function")&&!Object.isFrozen(Ee)&&t(Ee)}),O}class a{constructor(J){J.data===void 0&&(J.data={}),this.data=J.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(O){return O.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(O,...J){const Ee=Object.create(null);for(const qe in O)Ee[qe]=O[qe];return J.forEach(function(qe){for(const xt in qe)Ee[xt]=qe[xt]}),Ee}const o="</span>",c=O=>!!O.scope,u=(O,{prefix:J})=>{if(O.startsWith("language:"))return O.replace("language:","language-");if(O.includes(".")){const Ee=O.split(".");return[`${J}${Ee.shift()}`,...Ee.map((qe,xt)=>`${qe}${"_".repeat(xt+1)}`)].join(" ")}return`${J}${O}`};class h{constructor(J,Ee){this.buffer="",this.classPrefix=Ee.classPrefix,J.walk(this)}addText(J){this.buffer+=i(J)}openNode(J){if(!c(J))return;const Ee=u(J.scope,{prefix:this.classPrefix});this.span(Ee)}closeNode(J){c(J)&&(this.buffer+=o)}value(){return this.buffer}span(J){this.buffer+=`<span class="${J}">`}}const g=(O={})=>{const J={children:[]};return Object.assign(J,O),J};class p{constructor(){this.rootNode=g(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(J){this.top.children.push(J)}openNode(J){const Ee=g({scope:J});this.add(Ee),this.stack.push(Ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(J){return this.constructor._walk(J,this.rootNode)}static _walk(J,Ee){return typeof Ee=="string"?J.addText(Ee):Ee.children&&(J.openNode(Ee),Ee.children.forEach(qe=>this._walk(J,qe)),J.closeNode(Ee)),J}static _collapse(J){typeof J!="string"&&J.children&&(J.children.every(Ee=>typeof Ee=="string")?J.children=[J.children.join("")]:J.children.forEach(Ee=>{p._collapse(Ee)}))}}class b extends p{constructor(J){super(),this.options=J}addText(J){J!==""&&this.add(J)}startScope(J){this.openNode(J)}endScope(){this.closeNode()}__addSublanguage(J,Ee){const qe=J.root;Ee&&(qe.scope=`language:${Ee}`),this.add(qe)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function v(O){return O?typeof O=="string"?O:O.source:null}function E(O){return T("(?=",O,")")}function S(O){return T("(?:",O,")*")}function w(O){return T("(?:",O,")?")}function T(...O){return O.map(Ee=>v(Ee)).join("")}function M(O){const J=O[O.length-1];return typeof J=="object"&&J.constructor===Object?(O.splice(O.length-1,1),J):{}}function j(...O){return"("+(M(O).capture?"":"?:")+O.map(qe=>v(qe)).join("|")+")"}function R(O){return new RegExp(O.toString()+"|").exec("").length-1}function L(O,J){const Ee=O&&O.exec(J);return Ee&&Ee.index===0}const B=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function U(O,{joinWith:J}){let Ee=0;return O.map(qe=>{Ee+=1;const xt=Ee;let bt=v(qe),je="";for(;bt.length>0;){const Te=B.exec(bt);if(!Te){je+=bt;break}je+=bt.substring(0,Te.index),bt=bt.substring(Te.index+Te[0].length),Te[0][0]==="\\"&&Te[1]?je+="\\"+String(Number(Te[1])+xt):(je+=Te[0],Te[0]==="("&&Ee++)}return je}).map(qe=>`(${qe})`).join(J)}const le=/\b\B/,ne="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",ae="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ie="\\b(0b[01]+)",Q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",pe=(O={})=>{const J=/^#![ ]*\//;return O.binary&&(O.begin=T(J,/.*\b/,O.binary,/\b.*/)),s({scope:"meta",begin:J,end:/$/,relevance:0,"on:begin":(Ee,qe)=>{Ee.index!==0&&qe.ignoreMatch()}},O)},fe={begin:"\\\\[\\s\\S]",relevance:0},ye={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[fe]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[fe]},X={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Y=function(O,J,Ee={}){const qe=s({scope:"comment",begin:O,end:J,contains:[]},Ee);qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const xt=j("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return qe.contains.push({begin:T(/[ ]+/,"(",xt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),qe},ue=Y("//","$"),Se=Y("/\\*","\\*/"),C=Y("#","$"),q={scope:"number",begin:ee,relevance:0},oe={scope:"number",begin:ae,relevance:0},me={scope:"number",begin:ie,relevance:0},xe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[fe,{begin:/\[/,end:/\]/,relevance:0,contains:[fe]}]},Ne={scope:"title",begin:ne,relevance:0},$={scope:"title",begin:_,relevance:0},ze={begin:"\\.\\s*"+_,relevance:0};var ut=Object.freeze({__proto__:null,APOS_STRING_MODE:ye,BACKSLASH_ESCAPE:fe,BINARY_NUMBER_MODE:me,BINARY_NUMBER_RE:ie,COMMENT:Y,C_BLOCK_COMMENT_MODE:Se,C_LINE_COMMENT_MODE:ue,C_NUMBER_MODE:oe,C_NUMBER_RE:ae,END_SAME_AS_BEGIN:function(O){return Object.assign(O,{"on:begin":(J,Ee)=>{Ee.data._beginMatch=J[1]},"on:end":(J,Ee)=>{Ee.data._beginMatch!==J[1]&&Ee.ignoreMatch()}})},HASH_COMMENT_MODE:C,IDENT_RE:ne,MATCH_NOTHING_RE:le,METHOD_GUARD:ze,NUMBER_MODE:q,NUMBER_RE:ee,PHRASAL_WORDS_MODE:X,QUOTE_STRING_MODE:H,REGEXP_MODE:xe,RE_STARTERS_RE:Q,SHEBANG:pe,TITLE_MODE:Ne,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:$});function he(O,J){O.input[O.index-1]==="."&&J.ignoreMatch()}function Nt(O,J){O.className!==void 0&&(O.scope=O.className,delete O.className)}function Ve(O,J){J&&O.beginKeywords&&(O.begin="\\b("+O.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",O.__beforeBegin=he,O.keywords=O.keywords||O.beginKeywords,delete O.beginKeywords,O.relevance===void 0&&(O.relevance=0))}function $e(O,J){Array.isArray(O.illegal)&&(O.illegal=j(...O.illegal))}function qt(O,J){if(O.match){if(O.begin||O.end)throw new Error("begin & end are not supported with match");O.begin=O.match,delete O.match}}function Yt(O,J){O.relevance===void 0&&(O.relevance=1)}const tn=(O,J)=>{if(!O.beforeMatch)return;if(O.starts)throw new Error("beforeMatch cannot be used with starts");const Ee=Object.assign({},O);Object.keys(O).forEach(qe=>{delete O[qe]}),O.keywords=Ee.keywords,O.begin=T(Ee.beforeMatch,E(Ee.begin)),O.starts={relevance:0,contains:[Object.assign(Ee,{endsParent:!0})]},O.relevance=0,delete Ee.beforeMatch},Zn=["of","and","for","in","not","or","if","then","parent","list","value"],Wa="keyword";function Kt(O,J,Ee=Wa){const qe=Object.create(null);return typeof O=="string"?xt(Ee,O.split(" ")):Array.isArray(O)?xt(Ee,O):Object.keys(O).forEach(function(bt){Object.assign(qe,Kt(O[bt],J,bt))}),qe;function xt(bt,je){J&&(je=je.map(Te=>Te.toLowerCase())),je.forEach(function(Te){const Ie=Te.split("|");qe[Ie[0]]=[bt,sa(Ie[0],Ie[1])]})}}function sa(O,J){return J?Number(J):Ba(O)?0:1}function Ba(O){return Zn.includes(O.toLowerCase())}const _n={},jt=O=>{console.error(O)},Hn=(O,...J)=>{console.log(`WARN: ${O}`,...J)},bn=(O,J)=>{_n[`${O}/${J}`]||(console.log(`Deprecated as of ${O}. ${J}`),_n[`${O}/${J}`]=!0)},Dn=new Error;function vn(O,J,{key:Ee}){let qe=0;const xt=O[Ee],bt={},je={};for(let Te=1;Te<=J.length;Te++)je[Te+qe]=xt[Te],bt[Te+qe]=!0,qe+=R(J[Te-1]);O[Ee]=je,O[Ee]._emit=bt,O[Ee]._multi=!0}function En(O){if(Array.isArray(O.begin)){if(O.skip||O.excludeBegin||O.returnBegin)throw jt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Dn;if(typeof O.beginScope!="object"||O.beginScope===null)throw jt("beginScope must be object"),Dn;vn(O,O.begin,{key:"beginScope"}),O.begin=U(O.begin,{joinWith:""})}}function Sn(O){if(Array.isArray(O.end)){if(O.skip||O.excludeEnd||O.returnEnd)throw jt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Dn;if(typeof O.endScope!="object"||O.endScope===null)throw jt("endScope must be object"),Dn;vn(O,O.end,{key:"endScope"}),O.end=U(O.end,{joinWith:""})}}function Ca(O){O.scope&&typeof O.scope=="object"&&O.scope!==null&&(O.beginScope=O.scope,delete O.scope)}function Mr(O){Ca(O),typeof O.beginScope=="string"&&(O.beginScope={_wrap:O.beginScope}),typeof O.endScope=="string"&&(O.endScope={_wrap:O.endScope}),En(O),Sn(O)}function kn(O){function J(je,Te){return new RegExp(v(je),"m"+(O.case_insensitive?"i":"")+(O.unicodeRegex?"u":"")+(Te?"g":""))}class Ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Te,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,Te]),this.matchAt+=R(Te)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Te=this.regexes.map(Ie=>Ie[1]);this.matcherRe=J(U(Te,{joinWith:"|"}),!0),this.lastIndex=0}exec(Te){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(Te);if(!Ie)return null;const N=Ie.findIndex((P,ce)=>ce>0&&P!==void 0),V=this.matchIndexes[N];return Ie.splice(0,N),Object.assign(Ie,V)}}class qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Te){if(this.multiRegexes[Te])return this.multiRegexes[Te];const Ie=new Ee;return this.rules.slice(Te).forEach(([N,V])=>Ie.addRule(N,V)),Ie.compile(),this.multiRegexes[Te]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Te,Ie){this.rules.push([Te,Ie]),Ie.type==="begin"&&this.count++}exec(Te){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let N=Ie.exec(Te);if(this.resumingScanAtSamePosition()&&!(N&&N.index===this.lastIndex)){const V=this.getMatcher(0);V.lastIndex=this.lastIndex+1,N=V.exec(Te)}return N&&(this.regexIndex+=N.position+1,this.regexIndex===this.count&&this.considerAll()),N}}function xt(je){const Te=new qe;return je.contains.forEach(Ie=>Te.addRule(Ie.begin,{rule:Ie,type:"begin"})),je.terminatorEnd&&Te.addRule(je.terminatorEnd,{type:"end"}),je.illegal&&Te.addRule(je.illegal,{type:"illegal"}),Te}function bt(je,Te){const Ie=je;if(je.isCompiled)return Ie;[Nt,qt,Mr,tn].forEach(V=>V(je,Te)),O.compilerExtensions.forEach(V=>V(je,Te)),je.__beforeBegin=null,[Ve,$e,Yt].forEach(V=>V(je,Te)),je.isCompiled=!0;let N=null;return typeof je.keywords=="object"&&je.keywords.$pattern&&(je.keywords=Object.assign({},je.keywords),N=je.keywords.$pattern,delete je.keywords.$pattern),N=N||/\w+/,je.keywords&&(je.keywords=Kt(je.keywords,O.case_insensitive)),Ie.keywordPatternRe=J(N,!0),Te&&(je.begin||(je.begin=/\B|\b/),Ie.beginRe=J(Ie.begin),!je.end&&!je.endsWithParent&&(je.end=/\B|\b/),je.end&&(Ie.endRe=J(Ie.end)),Ie.terminatorEnd=v(Ie.end)||"",je.endsWithParent&&Te.terminatorEnd&&(Ie.terminatorEnd+=(je.end?"|":"")+Te.terminatorEnd)),je.illegal&&(Ie.illegalRe=J(je.illegal)),je.contains||(je.contains=[]),je.contains=[].concat(...je.contains.map(function(V){return It(V==="self"?je:V)})),je.contains.forEach(function(V){bt(V,Ie)}),je.starts&&bt(je.starts,Te),Ie.matcher=xt(Ie),Ie}if(O.compilerExtensions||(O.compilerExtensions=[]),O.contains&&O.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return O.classNameAliases=s(O.classNameAliases||{}),bt(O)}function rn(O){return O?O.endsWithParent||rn(O.starts):!1}function It(O){return O.variants&&!O.cachedVariants&&(O.cachedVariants=O.variants.map(function(J){return s(O,{variants:null},J)})),O.cachedVariants?O.cachedVariants:rn(O)?s(O,{starts:O.starts?s(O.starts):null}):Object.isFrozen(O)?s(O):O}var sn="11.11.1";class er extends Error{constructor(J,Ee){super(J),this.name="HTMLInjectionError",this.html=Ee}}const Ra=i,la=s,Yn=Symbol("nomatch"),Kn=7,oa=function(O){const J=Object.create(null),Ee=Object.create(null),qe=[];let xt=!0;const bt="Could not find the language '{}', did you forget to load/include a language module?",je={disableAutodetect:!0,name:"Plain text",contains:[]};let Te={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ie(re){return Te.noHighlightRe.test(re)}function N(re){let Ae=re.className+" ";Ae+=re.parentNode?re.parentNode.className:"";const Pe=Te.languageDetectRe.exec(Ae);if(Pe){const nt=k(Pe[1]);return nt||(Hn(bt.replace("{}",Pe[1])),Hn("Falling back to no-highlight mode for this block.",re)),nt?Pe[1]:"no-highlight"}return Ae.split(/\s+/).find(nt=>Ie(nt)||k(nt))}function V(re,Ae,Pe){let nt="",Tt="";typeof Ae=="object"?(nt=re,Pe=Ae.ignoreIllegals,Tt=Ae.language):(bn("10.7.0","highlight(lang, code, ...args) has been deprecated."),bn("10.7.0",`Please use highlight(code, options) instead.
|
|
143
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Tt=re,nt=Ae),Pe===void 0&&(Pe=!0);const He={code:nt,language:Tt};tt("before:highlight",He);const We=He.result?He.result:P(He.language,He.code,Pe);return We.code=He.code,tt("after:highlight",We),We}function P(re,Ae,Pe,nt){const Tt=Object.create(null);function He(ve,Ue){return ve.keywords[Ue]}function We(){if(!Xe.keywords){cn.addText(_t);return}let ve=0;Xe.keywordPatternRe.lastIndex=0;let Ue=Xe.keywordPatternRe.exec(_t),rt="";for(;Ue;){rt+=_t.substring(ve,Ue.index);const mt=Gt.case_insensitive?Ue[0].toLowerCase():Ue[0],Xt=He(Xe,mt);if(Xt){const[da,Ds]=Xt;if(cn.addText(rt),rt="",Tt[mt]=(Tt[mt]||0)+1,Tt[mt]<=Kn&&(Rr+=Ds),da.startsWith("_"))rt+=Ue[0];else{const co=Gt.classNameAliases[da]||da;ot(Ue[0],co)}}else rt+=Ue[0];ve=Xe.keywordPatternRe.lastIndex,Ue=Xe.keywordPatternRe.exec(_t)}rt+=_t.substring(ve),cn.addText(rt)}function wt(){if(_t==="")return;let ve=null;if(typeof Xe.subLanguage=="string"){if(!J[Xe.subLanguage]){cn.addText(_t);return}ve=P(Xe.subLanguage,_t,!0,oo[Xe.subLanguage]),oo[Xe.subLanguage]=ve._top}else ve=de(_t,Xe.subLanguage.length?Xe.subLanguage:null);Xe.relevance>0&&(Rr+=ve.relevance),cn.__addSublanguage(ve._emitter,ve.language)}function at(){Xe.subLanguage!=null?wt():We(),_t=""}function ot(ve,Ue){ve!==""&&(cn.startScope(Ue),cn.addText(ve),cn.endScope())}function ca(ve,Ue){let rt=1;const mt=Ue.length-1;for(;rt<=mt;){if(!ve._emit[rt]){rt++;continue}const Xt=Gt.classNameAliases[ve[rt]]||ve[rt],da=Ue[rt];Xt?ot(da,Xt):(_t=da,We(),_t=""),rt++}}function ua(ve,Ue){return ve.scope&&typeof ve.scope=="string"&&cn.openNode(Gt.classNameAliases[ve.scope]||ve.scope),ve.beginScope&&(ve.beginScope._wrap?(ot(_t,Gt.classNameAliases[ve.beginScope._wrap]||ve.beginScope._wrap),_t=""):ve.beginScope._multi&&(ca(ve.beginScope,Ue),_t="")),Xe=Object.create(ve,{parent:{value:Xe}}),Xe}function tr(ve,Ue,rt){let mt=L(ve.endRe,rt);if(mt){if(ve["on:end"]){const Xt=new a(ve);ve["on:end"](Ue,Xt),Xt.isMatchIgnored&&(mt=!1)}if(mt){for(;ve.endsParent&&ve.parent;)ve=ve.parent;return ve}}if(ve.endsWithParent)return tr(ve.parent,Ue,rt)}function on(ve){return Xe.matcher.regexIndex===0?(_t+=ve[0],1):(Nr=!0,0)}function Ua(ve){const Ue=ve[0],rt=ve.rule,mt=new a(rt),Xt=[rt.__beforeBegin,rt["on:begin"]];for(const da of Xt)if(da&&(da(ve,mt),mt.isMatchIgnored))return on(Ue);return rt.skip?_t+=Ue:(rt.excludeBegin&&(_t+=Ue),at(),!rt.returnBegin&&!rt.excludeBegin&&(_t=Ue)),ua(rt,ve),rt.returnBegin?0:Ue.length}function Qt(ve){const Ue=ve[0],rt=Ae.substring(ve.index),mt=tr(Xe,ve,rt);if(!mt)return Yn;const Xt=Xe;Xe.endScope&&Xe.endScope._wrap?(at(),ot(Ue,Xe.endScope._wrap)):Xe.endScope&&Xe.endScope._multi?(at(),ca(Xe.endScope,ve)):Xt.skip?_t+=Ue:(Xt.returnEnd||Xt.excludeEnd||(_t+=Ue),at(),Xt.excludeEnd&&(_t=Ue));do Xe.scope&&cn.closeNode(),!Xe.skip&&!Xe.subLanguage&&(Rr+=Xe.relevance),Xe=Xe.parent;while(Xe!==mt.parent);return mt.starts&&ua(mt.starts,ve),Xt.returnEnd?0:Ue.length}function Na(){const ve=[];for(let Ue=Xe;Ue!==Gt;Ue=Ue.parent)Ue.scope&&ve.unshift(Ue.scope);ve.forEach(Ue=>cn.openNode(Ue))}let wn={};function Tr(ve,Ue){const rt=Ue&&Ue[0];if(_t+=ve,rt==null)return at(),0;if(wn.type==="begin"&&Ue.type==="end"&&wn.index===Ue.index&&rt===""){if(_t+=Ae.slice(Ue.index,Ue.index+1),!xt){const mt=new Error(`0 width match regex (${re})`);throw mt.languageName=re,mt.badRule=wn.rule,mt}return 1}if(wn=Ue,Ue.type==="begin")return Ua(Ue);if(Ue.type==="illegal"&&!Pe){const mt=new Error('Illegal lexeme "'+rt+'" for mode "'+(Xe.scope||"<unnamed>")+'"');throw mt.mode=Xe,mt}else if(Ue.type==="end"){const mt=Qt(Ue);if(mt!==Yn)return mt}if(Ue.type==="illegal"&&rt==="")return _t+=`
|
|
144
|
+
`,1;if(_s>1e5&&_s>Ue.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _t+=rt,rt.length}const Gt=k(re);if(!Gt)throw jt(bt.replace("{}",re)),new Error('Unknown language: "'+re+'"');const Cr=kn(Gt);let Hi="",Xe=nt||Cr;const oo={},cn=new Te.__emitter(Te);Na();let _t="",Rr=0,nr=0,_s=0,Nr=!1;try{if(Gt.__emitTokens)Gt.__emitTokens(Ae,cn);else{for(Xe.matcher.considerAll();;){_s++,Nr?Nr=!1:Xe.matcher.considerAll(),Xe.matcher.lastIndex=nr;const ve=Xe.matcher.exec(Ae);if(!ve)break;const Ue=Ae.substring(nr,ve.index),rt=Tr(Ue,ve);nr=ve.index+rt}Tr(Ae.substring(nr))}return cn.finalize(),Hi=cn.toHTML(),{language:re,value:Hi,relevance:Rr,illegal:!1,_emitter:cn,_top:Xe}}catch(ve){if(ve.message&&ve.message.includes("Illegal"))return{language:re,value:Ra(Ae),illegal:!0,relevance:0,_illegalBy:{message:ve.message,index:nr,context:Ae.slice(nr-100,nr+100),mode:ve.mode,resultSoFar:Hi},_emitter:cn};if(xt)return{language:re,value:Ra(Ae),illegal:!1,relevance:0,errorRaised:ve,_emitter:cn,_top:Xe};throw ve}}function ce(re){const Ae={value:Ra(re),illegal:!1,relevance:0,_top:je,_emitter:new Te.__emitter(Te)};return Ae._emitter.addText(re),Ae}function de(re,Ae){Ae=Ae||Te.languages||Object.keys(J);const Pe=ce(re),nt=Ae.filter(k).filter(Ce).map(at=>P(at,re,!1));nt.unshift(Pe);const Tt=nt.sort((at,ot)=>{if(at.relevance!==ot.relevance)return ot.relevance-at.relevance;if(at.language&&ot.language){if(k(at.language).supersetOf===ot.language)return 1;if(k(ot.language).supersetOf===at.language)return-1}return 0}),[He,We]=Tt,wt=He;return wt.secondBest=We,wt}function _e(re,Ae,Pe){const nt=Ae&&Ee[Ae]||Pe;re.classList.add("hljs"),re.classList.add(`language-${nt}`)}function be(re){let Ae=null;const Pe=N(re);if(Ie(Pe))return;if(tt("before:highlightElement",{el:re,language:Pe}),re.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",re);return}if(re.children.length>0&&(Te.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(re)),Te.throwUnescapedHTML))throw new er("One of your code blocks includes unescaped HTML.",re.innerHTML);Ae=re;const nt=Ae.textContent,Tt=Pe?V(nt,{language:Pe,ignoreIllegals:!0}):de(nt);re.innerHTML=Tt.value,re.dataset.highlighted="yes",_e(re,Pe,Tt.language),re.result={language:Tt.language,re:Tt.relevance,relevance:Tt.relevance},Tt.secondBest&&(re.secondBest={language:Tt.secondBest.language,relevance:Tt.secondBest.relevance}),tt("after:highlightElement",{el:re,result:Tt,text:nt})}function De(re){Te=la(Te,re)}const Re=()=>{Oe(),bn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function we(){Oe(),bn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Fe=!1;function Oe(){function re(){Oe()}if(document.readyState==="loading"){Fe||window.addEventListener("DOMContentLoaded",re,!1),Fe=!0;return}document.querySelectorAll(Te.cssSelector).forEach(be)}function Qe(re,Ae){let Pe=null;try{Pe=Ae(O)}catch(nt){if(jt("Language definition for '{}' could not be registered.".replace("{}",re)),xt)jt(nt);else throw nt;Pe=je}Pe.name||(Pe.name=re),J[re]=Pe,Pe.rawDefinition=Ae.bind(null,O),Pe.aliases&&ge(Pe.aliases,{languageName:re})}function Je(re){delete J[re];for(const Ae of Object.keys(Ee))Ee[Ae]===re&&delete Ee[Ae]}function Et(){return Object.keys(J)}function k(re){return re=(re||"").toLowerCase(),J[re]||J[Ee[re]]}function ge(re,{languageName:Ae}){typeof re=="string"&&(re=[re]),re.forEach(Pe=>{Ee[Pe.toLowerCase()]=Ae})}function Ce(re){const Ae=k(re);return Ae&&!Ae.disableAutodetect}function Me(re){re["before:highlightBlock"]&&!re["before:highlightElement"]&&(re["before:highlightElement"]=Ae=>{re["before:highlightBlock"](Object.assign({block:Ae.el},Ae))}),re["after:highlightBlock"]&&!re["after:highlightElement"]&&(re["after:highlightElement"]=Ae=>{re["after:highlightBlock"](Object.assign({block:Ae.el},Ae))})}function Ke(re){Me(re),qe.push(re)}function ht(re){const Ae=qe.indexOf(re);Ae!==-1&&qe.splice(Ae,1)}function tt(re,Ae){const Pe=re;qe.forEach(function(nt){nt[Pe]&&nt[Pe](Ae)})}function St(re){return bn("10.7.0","highlightBlock will be removed entirely in v12.0"),bn("10.7.0","Please use highlightElement now."),be(re)}Object.assign(O,{highlight:V,highlightAuto:de,highlightAll:Oe,highlightElement:be,highlightBlock:St,configure:De,initHighlighting:Re,initHighlightingOnLoad:we,registerLanguage:Qe,unregisterLanguage:Je,listLanguages:Et,getLanguage:k,registerAliases:ge,autoDetection:Ce,inherit:la,addPlugin:Ke,removePlugin:ht}),O.debugMode=function(){xt=!1},O.safeMode=function(){xt=!0},O.versionString=sn,O.regex={concat:T,lookahead:E,either:j,optional:w,anyNumberOfTimes:S};for(const re in ut)typeof ut[re]=="object"&&t(ut[re]);return Object.assign(O,ut),O},ln=oa({});return ln.newInstance=()=>oa({}),Jf=ln,ln.HighlightJS=ln,ln.default=ln,Jf}var EC=xC();const jn=e4(EC),Zy="[A-Za-z$_][0-9A-Za-z$_]*",SC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],wC=["true","false","null","undefined","NaN","Infinity"],xb=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Eb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Sb=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],AC=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],MC=[].concat(Sb,xb,Eb);function _1(t){const a=t.regex,i=(Y,{after:ue})=>{const Se="</"+Y[0].slice(1);return Y.input.indexOf(Se,ue)!==-1},s=Zy,o={begin:"<>",end:"</>"},c=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,ue)=>{const Se=Y[0].length+Y.index,C=Y.input[Se];if(C==="<"||C===","){ue.ignoreMatch();return}C===">"&&(i(Y,{after:Se})||ue.ignoreMatch());let q;const oe=Y.input.substring(Se);if(q=oe.match(/^\s*=/)){ue.ignoreMatch();return}if((q=oe.match(/^\s+extends\s+/))&&q.index===0){ue.ignoreMatch();return}}},h={$pattern:Zy,keyword:SC,literal:wC,built_in:MC,"variable.language":AC},g="[0-9](_?[0-9])*",p=`\\.(${g})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",v={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${g})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:h,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},T={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},M={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},R={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},L=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,S,w,T,M,{match:/\$\d+/},v];E.contains=L.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(L)});const B=[].concat(R,E.contains),U=B.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(B)}]),le={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:U},ne={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,a.concat(s,"(",a.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:a.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...xb,...Eb]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ae={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[le],illegal:/%/},ie={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(Y){return a.concat("(?!",Y.join("|"),")")}const pe={match:a.concat(/\b/,Q([...Sb,"super","import"].map(Y=>`${Y}\\s*\\(`)),s,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},fe={begin:a.concat(/\./,a.lookahead(a.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ye={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},le]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[le]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,S,w,T,M,R,{match:/\$\d+/},v,_,{scope:"attr",match:s+a.lookahead(":"),relevance:0},X,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,t.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:U}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:c},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},ae,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[le,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},fe,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[le]},pe,ie,ne,ye,{match:/\$[(.]/}]}}const iu="[A-Za-z$_][0-9A-Za-z$_]*",wb=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ab=["true","false","null","undefined","NaN","Infinity"],Mb=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Tb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Cb=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Rb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Nb=[].concat(Cb,Mb,Tb);function TC(t){const a=t.regex,i=(Y,{after:ue})=>{const Se="</"+Y[0].slice(1);return Y.input.indexOf(Se,ue)!==-1},s=iu,o={begin:"<>",end:"</>"},c=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,ue)=>{const Se=Y[0].length+Y.index,C=Y.input[Se];if(C==="<"||C===","){ue.ignoreMatch();return}C===">"&&(i(Y,{after:Se})||ue.ignoreMatch());let q;const oe=Y.input.substring(Se);if(q=oe.match(/^\s*=/)){ue.ignoreMatch();return}if((q=oe.match(/^\s+extends\s+/))&&q.index===0){ue.ignoreMatch();return}}},h={$pattern:iu,keyword:wb,literal:Ab,built_in:Nb,"variable.language":Rb},g="[0-9](_?[0-9])*",p=`\\.(${g})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",v={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${g})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:h,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},w={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},T={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},M={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]},R={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},L=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,S,w,T,M,{match:/\$\d+/},v];E.contains=L.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(L)});const B=[].concat(R,E.contains),U=B.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(B)}]),le={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:U},ne={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,a.concat(s,"(",a.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:a.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Mb,...Tb]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ae={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[le],illegal:/%/},ie={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(Y){return a.concat("(?!",Y.join("|"),")")}const pe={match:a.concat(/\b/,Q([...Cb,"super","import"].map(Y=>`${Y}\\s*\\(`)),s,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},fe={begin:a.concat(/\./,a.lookahead(a.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ye={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},le]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",X={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[le]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,S,w,T,M,R,{match:/\$\d+/},v,_,{scope:"attr",match:s+a.lookahead(":"),relevance:0},X,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,t.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:U}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:c},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},ae,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[le,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},fe,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[le]},pe,ie,ne,ye,{match:/\$[(.]/}]}}function D1(t){const a=t.regex,i=TC(t),s=iu,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],c={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},u={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[i.exports.CLASS_REFERENCE]},h={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},g=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:iu,keyword:wb.concat(g),literal:Ab,built_in:Nb.concat(o),"variable.language":Rb},b={className:"meta",begin:"@"+s},v=(T,M,j)=>{const R=T.contains.findIndex(L=>L.label===M);if(R===-1)throw new Error("can not find mode to replace");T.contains.splice(R,1,j)};Object.assign(i.keywords,p),i.exports.PARAMS_CONTAINS.push(b);const E=i.contains.find(T=>T.scope==="attr"),S=Object.assign({},E,{match:a.concat(s,a.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,E,S]),i.contains=i.contains.concat([b,c,u,S]),v(i,"shebang",t.SHEBANG()),v(i,"use_strict",h);const w=i.contains.find(T=>T.label==="func.def");return w.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function jb(t){const a=t.regex,i=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],h={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},g={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:h,illegal:/#/},b={begin:/\{\{/,relevance:0},v={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,g],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,g],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,g,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,g,b,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,b,p]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},E="[0-9](_?[0-9])*",S=`(\\b(${E}))?\\.(${E})|\\b(${E})\\.`,w=`\\b|${s.join("|")}`,T={className:"number",relevance:0,variants:[{begin:`(\\b(${E})|(${S}))[eE][+-]?(${E})[jJ]?(?=${w})`},{begin:`(${S})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${w})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${w})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${w})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${w})`},{begin:`\\b(${E})[jJ](?=${w})`}]},M={className:"comment",begin:a.lookahead(/# type:/),end:/$/,keywords:h,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},j={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:["self",g,T,v,t.HASH_COMMENT_MODE]}]};return p.contains=[v,T,g],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:h,illegal:/(<\/|\?)|=>/,contains:[g,T,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},v,M,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[j]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[T,j,v]}]}}const CC=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),RC=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],NC=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],jC=[...RC,...NC],_C=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),DC=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),OC=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),LC=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function _b(t){const a=t.regex,i=CC(t),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",c=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",h=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,s,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+u,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+DC.join("|")+")"},{begin:":(:)?("+OC.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+LC.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...h,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...h,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:a.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:c},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:_C.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...h,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+jC.join("|")+")\\b"}]}}function O1(t){const a=t.regex,i={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:a.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),u={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},h={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,i,o]};o.contains.push(h);const g={match:/\\"/},p={className:"string",begin:/'/,end:/'/},b={match:/\\'/},v={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,i]},E=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],S=t.SHEBANG({binary:`(${E.join("|")})`,relevance:10}),w={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},T=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],M=["true","false"],j={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],L=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],U=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:T,literal:M,built_in:[...R,...L,"set","shopt",...B,...U]},contains:[S,t.SHEBANG(),w,v,c,u,j,h,g,p,b,i]}}function VC(t){const a={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},i={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],o={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[a,i,t.QUOTE_STRING_MODE,o,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Db(t){const a=t.regex,i=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=t.inherit(c,{begin:/\(/,end:/\)/}),h=t.inherit(t.APOS_STRING_MODE,{className:"string"}),g=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,g,h,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,u,g,h]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[g]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:a.concat(/</,a.lookahead(a.concat(i,a.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:p}]},{className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}jn.registerLanguage("javascript",_1);jn.registerLanguage("js",_1);jn.registerLanguage("jsx",_1);jn.registerLanguage("typescript",D1);jn.registerLanguage("ts",D1);jn.registerLanguage("tsx",D1);jn.registerLanguage("python",jb);jn.registerLanguage("py",jb);jn.registerLanguage("css",_b);jn.registerLanguage("scss",_b);jn.registerLanguage("bash",O1);jn.registerLanguage("sh",O1);jn.registerLanguage("shell",O1);jn.registerLanguage("json",VC);jn.registerLanguage("xml",Db);jn.registerLanguage("html",Db);function HC(t){const a=[],i=/```([a-z:_-]*)\n([\s\S]*?)```/g;let s=0,o;for(;(o=i.exec(t))!==null;){const u=t.slice(s,o.index);u.trim()&&a.push({kind:"markdown",content:u});const h=o[1],g=o[2];if(h==="json:persona")try{a.push({kind:"persona",data:JSON.parse(g)})}catch{a.push({kind:"code",lang:"json",content:g})}else if(h==="json:journey-map")try{a.push({kind:"journey-map",data:JSON.parse(g)})}catch{a.push({kind:"code",lang:"json",content:g})}else if(h==="json:feature-tree")try{a.push({kind:"feature-tree",data:JSON.parse(g)})}catch{a.push({kind:"code",lang:"json",content:g})}else a.push({kind:"code",lang:h||"text",content:g});s=o.index+o[0].length}const c=t.slice(s);return c.trim()&&a.push({kind:"markdown",content:c}),a}function Ci(t){return t.split(/(\*\*[^*]+\*\*|`[^`]+`|\*[^*]+\*)/g).map((i,s)=>i.startsWith("**")&&i.endsWith("**")?y.jsx("strong",{className:"font-semibold",children:i.slice(2,-2)},s):i.startsWith("`")&&i.endsWith("`")?y.jsx("code",{className:"font-mono text-[0.82em] bg-border-secondary px-1 rounded",children:i.slice(1,-1)},s):i.startsWith("*")&&i.endsWith("*")&&i.length>2?y.jsx("em",{children:i.slice(1,-1)},s):i)}function Py(t){const a=t.split(`
|
|
145
|
+
`),i=[];let s=0,o=[],c=[];function u(){o.length>0&&(i.push(y.jsx("ul",{className:"list-disc pl-5 mb-3 space-y-0.5",children:o.map((h,g)=>y.jsx("li",{className:"text-body text-text-primary",children:Ci(h)},g))},`ul-${s}`)),o=[]),c.length>0&&(i.push(y.jsx("ol",{className:"list-decimal pl-5 mb-3 space-y-0.5",children:c.map((h,g)=>y.jsx("li",{className:"text-body text-text-primary",children:Ci(h)},g))},`ol-${s}`)),c=[])}for(;s<a.length;){const h=a[s],g=h.trim();h.startsWith("#### ")?(u(),i.push(y.jsx("h4",{className:"text-small font-semibold mt-3 mb-1 text-text-primary",children:Ci(h.slice(5))},s))):h.startsWith("### ")?(u(),i.push(y.jsx("h3",{className:"text-sub-heading font-medium mt-4 mb-1.5 text-text-primary",children:Ci(h.slice(4))},s))):h.startsWith("## ")?(u(),i.push(y.jsx("h2",{className:"text-feature-title font-semibold font-features-display mt-5 mb-2 text-text-primary",children:Ci(h.slice(3))},s))):h.startsWith("> ")?(u(),i.push(y.jsx("blockquote",{className:"border-l-2 border-border pl-4 text-text-secondary italic text-body my-2",children:Ci(h.slice(2))},s))):h.startsWith("- ")||h.startsWith("* ")?(c.length>0&&u(),o.push(h.slice(2))):/^\d+\. /.test(h)?(o.length>0&&u(),c.push(h.replace(/^\d+\. /,""))):g==="---"||g==="***"?(u(),i.push(y.jsx("hr",{className:"my-3 border-border"},s))):g===""?u():(u(),i.push(y.jsx("p",{className:"text-body text-text-primary mb-2 leading-relaxed",children:Ci(h)},s))),s++}return u(),i}const kC={curious:"🤔",positive:"😊",happy:"😊",excited:"🤩",neutral:"😐",negative:"😞",frustrated:"😤",confused:"😕",anxious:"😰"};function zC(t){return kC[t.toLowerCase()]??"😐"}function BC({data:t}){const a=t.name.split(" ").map(i=>i[0]).join("").slice(0,2).toUpperCase();return y.jsxs("div",{className:"rounded-feature border border-border bg-card shadow-clay overflow-hidden my-3 w-full",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-border bg-canvas flex items-center gap-3",children:[y.jsx("div",{className:"w-10 h-10 rounded-full bg-lemon-500 flex items-center justify-center text-sm font-bold text-lemon-800 flex-shrink-0",children:a}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsxs("p",{className:"font-semibold text-text-primary text-body leading-tight",children:[t.name,t.age?`, ${t.age}`:""]}),y.jsx("p",{className:"text-small text-text-secondary truncate",children:t.role})]}),t.sourced&&y.jsx("span",{className:"flex-shrink-0 text-caption px-2 py-0.5 rounded-full border border-border text-text-tertiary",children:"SOURCED"})]}),y.jsxs("div",{className:"grid grid-cols-2 divide-x divide-border border-b border-border",children:[y.jsxs("div",{className:"p-3",children:[y.jsx("p",{className:"text-caption font-medium text-text-tertiary uppercase tracking-wider mb-2",children:"Goals"}),y.jsx("ul",{className:"space-y-1.5",children:(t.goals??[]).map((i,s)=>y.jsxs("li",{className:"flex gap-1.5 text-small text-text-primary",children:[y.jsx("span",{className:"text-green-500 flex-shrink-0 mt-0.5",children:"✓"}),y.jsx("span",{children:i})]},s))})]}),y.jsxs("div",{className:"p-3",children:[y.jsx("p",{className:"text-caption font-medium text-text-tertiary uppercase tracking-wider mb-2",children:"Pain Points"}),y.jsx("ul",{className:"space-y-1.5",children:(t.pains??[]).map((i,s)=>y.jsxs("li",{className:"flex gap-1.5 text-small text-text-primary",children:[y.jsx("span",{className:"text-pomegranate-400 flex-shrink-0 mt-0.5",children:"✗"}),y.jsx("span",{children:i})]},s))})]})]}),t.behaviors&&t.behaviors.length>0&&y.jsxs("div",{className:"px-4 py-3 border-b border-border",children:[y.jsx("p",{className:"text-caption font-medium text-text-tertiary uppercase tracking-wider mb-2",children:"Behaviours"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.behaviors.map((i,s)=>y.jsx("span",{className:"px-2 py-0.5 rounded-full bg-border-secondary text-small text-text-secondary",children:i},s))})]}),t.quote&&y.jsx("div",{className:"px-4 py-3",children:y.jsxs("p",{className:"text-body italic text-text-secondary leading-relaxed",children:["“",t.quote,"”"]})})]})}function UC({data:t}){return y.jsxs("div",{className:"rounded-feature border border-border bg-card shadow-clay overflow-hidden my-3 w-full",children:[y.jsx("div",{className:"px-4 py-2.5 border-b border-border bg-canvas",children:y.jsxs("p",{className:"text-small font-medium text-text-primary",children:["Journey Map — ",y.jsx("span",{className:"text-text-secondary",children:t.persona})]})}),y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"inline-flex min-w-full",children:(t.stages??[]).map((a,i)=>y.jsxs("div",{className:"min-w-[140px] flex-1 border-r border-border last:border-r-0 flex flex-col",children:[y.jsx("div",{className:"px-3 py-2 border-b border-border bg-border-secondary",children:y.jsx("p",{className:"text-caption font-medium text-text-primary text-center leading-tight",children:a.name})}),y.jsx("div",{className:"px-3 py-2 text-center text-base border-b border-border",children:zC(a.emotion)}),y.jsxs("div",{className:"px-3 py-2 border-b border-border flex-1",children:[y.jsx("p",{className:"text-caption text-text-tertiary mb-1 font-medium",children:"Touchpoints"}),(a.touchpoints??[]).map((s,o)=>y.jsxs("p",{className:"text-caption text-text-primary leading-snug",children:["· ",s]},o))]}),a.pains&&a.pains.length>0&&y.jsxs("div",{className:"px-3 py-2",children:[y.jsx("p",{className:"text-caption text-text-tertiary mb-1 font-medium",children:"Pains"}),a.pains.map((s,o)=>y.jsxs("p",{className:"text-caption text-pomegranate-400 leading-snug",children:["· ",s]},o))]})]},i))})})]})}function ZC({data:t}){const a=[{label:"MVP",items:t.mvp??[],color:"text-green-600"},{label:"Phase 2",items:t.phase2??[],color:"text-blue-500"},{label:"Backlog",items:t.backlog??[],color:"text-text-tertiary"}];return y.jsxs("div",{className:"rounded-feature border border-border bg-card shadow-clay overflow-hidden my-3 w-full",children:[y.jsx("div",{className:"px-4 py-2.5 border-b border-border bg-canvas",children:y.jsx("p",{className:"text-small font-medium text-text-primary",children:"Feature Tree"})}),y.jsx("div",{className:"grid grid-cols-3 divide-x divide-border",children:a.map(({label:i,items:s,color:o})=>y.jsxs("div",{className:"p-3",children:[y.jsx("p",{className:`text-caption font-medium uppercase tracking-wider mb-2 ${o}`,children:i}),y.jsxs("ul",{className:"space-y-1.5",children:[s.map((c,u)=>y.jsx("li",{className:"text-caption text-text-primary leading-snug",children:c},u)),s.length===0&&y.jsx("li",{className:"text-caption text-text-tertiary italic",children:"None yet"})]})]},i))})]})}function PC({lang:t,content:a}){const[i,s]=d.useState(!1),o=d.useMemo(()=>{if(!t||t==="text")return null;try{return jn.highlight(a,{language:t,ignoreIllegals:!0}).value}catch{return null}},[t,a]);function c(){navigator.clipboard.writeText(a).then(()=>{s(!0),window.setTimeout(()=>s(!1),1500)})}const u=t&&t!=="text";return y.jsxs("div",{className:"my-3 relative",children:[u&&y.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border border-b-0 border-border rounded-t-card bg-border-secondary",children:[y.jsx("span",{className:"text-caption text-text-tertiary font-mono",children:t}),y.jsx("button",{type:"button",onClick:c,className:"text-caption text-text-tertiary hover:text-text-primary transition-colors",children:i?"Copied!":"Copy"})]}),y.jsx("pre",{className:["overflow-auto border border-border bg-canvas p-3 text-small font-mono text-text-primary",u?"rounded-b-card rounded-tr-card":"rounded-card"].join(" "),children:o?y.jsx("code",{className:"hljs",dangerouslySetInnerHTML:{__html:o}}):y.jsx("code",{children:a})})]})}function FC({content:t,agentName:a,isStreaming:i}){const s=d.useMemo(()=>i?null:HC(t),[t,i]),o=d.useMemo(()=>Py(t),[t]);return y.jsxs("article",{className:"flex gap-3",children:[y.jsx("div",{className:"flex-shrink-0 w-7 h-7 rounded-card bg-lemon-500 flex items-center justify-center text-small font-semibold text-lemon-800",children:"DX"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[a&&y.jsx("p",{className:"text-uppercase-label text-text-tertiary mb-2",children:a}),y.jsx("div",{className:"text-body text-text-primary leading-relaxed",children:i||!s?o:s.map((c,u)=>c.kind==="markdown"?y.jsx(gs.Fragment,{children:Py(c.content)},u):c.kind==="persona"?y.jsx(BC,{data:c.data},u):c.kind==="journey-map"?y.jsx(UC,{data:c.data},u):c.kind==="feature-tree"?y.jsx(ZC,{data:c.data},u):c.kind==="code"?y.jsx(PC,{lang:c.lang,content:c.content},u):null)}),i&&y.jsx("span",{className:"inline-block w-1.5 h-4 bg-text-primary animate-pulse ml-1 align-middle"})]})]})}function IC({phaseName:t,phaseColor:a,items:i,agentNote:s,isStreaming:o}){const[c,u]=d.useState(!1),h=i.filter(v=>v.status==="done").length,g=i.length,p=o&&g===0?"Working…":o?`Generating ${g} artifact${g!==1?"s":""}…`:`Generated ${g} artifact${g!==1?"s":""}`,b=a??"#3bd3fd";return y.jsxs("article",{className:"flex gap-3",children:[y.jsx("div",{className:"flex-shrink-0 w-7 h-7 rounded-card bg-lemon-500 flex items-center justify-center text-small font-semibold text-lemon-800",children:"DX"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[t&&y.jsx("p",{className:"text-uppercase-label text-text-tertiary mb-2",children:t}),y.jsxs("div",{className:"rounded-feature border border-border bg-card overflow-hidden shadow-clay",children:[y.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border",children:[y.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:b}}),y.jsx("p",{className:"text-small font-medium text-text-primary flex-1 leading-snug",children:p}),o&&h<g&&y.jsx(Gl,{size:14,className:"text-text-tertiary animate-spin flex-shrink-0","aria-label":"Generating"}),!o&&g>0&&y.jsx(ws,{size:14,weight:"fill",className:"text-status-success flex-shrink-0","aria-label":"Complete"})]}),g>0&&y.jsx("div",{className:"divide-y divide-border max-h-[256px] overflow-y-auto",children:i.map(v=>y.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[v.status==="done"?y.jsx(ws,{size:13,weight:"fill",className:"text-status-success flex-shrink-0"}):y.jsx(Gl,{size:13,className:"text-text-tertiary animate-spin flex-shrink-0"}),y.jsx("p",{className:"text-small text-text-primary truncate",children:v.title})]},v.id))}),s&&s.length>0&&y.jsxs("div",{className:"border-t border-border",children:[y.jsxs("button",{type:"button",onClick:()=>u(v=>!v),className:"w-full flex items-center gap-2 px-4 py-2.5 text-left hover:bg-border-secondary/30 transition-colors",children:[c?y.jsx(oS,{size:11,className:"text-text-tertiary flex-shrink-0"}):y.jsx(P4,{size:11,className:"text-text-tertiary flex-shrink-0"}),y.jsx("span",{className:"text-caption text-text-tertiary",children:"Agent note"})]}),c&&y.jsx("div",{className:"px-4 pb-3 text-caption text-text-secondary leading-relaxed whitespace-pre-wrap",children:s})]})]})]})]})}const GC={1:{bg:"#fef3c7",text:"#92400e"},2:{bg:"#e0f8ff",text:"#0c6a82"},3:{bg:"#ede9ff",text:"#43089f"},4:{bg:"#dcfce7",text:"#02492a"},5:{bg:"#dbeafe",text:"#01418d"},6:{bg:"#ffe4e6",text:"#be123c"},7:{bg:"#ede9ff",text:"#32037d"}};function $C({phaseNumber:t,phaseName:a,size:i="sm"}){const s=GC[t]??{bg:"#f4f4f5",text:"#71717a"};return y.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-pill font-medium ${i==="sm"?"text-small px-2 py-0.5":"text-caption px-2.5 py-1"}`,style:{backgroundColor:s.bg,color:s.text},children:[y.jsx("span",{className:"font-semibold",children:t}),a]})}function qC({phaseNumber:t,phaseName:a,direction:i}){return y.jsxs("div",{className:"flex items-center gap-3 py-2",children:[y.jsx("div",{className:"flex-1 h-px bg-border"}),y.jsx($C,{phaseNumber:t,phaseName:a}),y.jsx("span",{className:"text-caption text-text-tertiary",children:i==="entering"?"started":"complete"}),y.jsx("div",{className:"flex-1 h-px bg-border"})]})}const YC={primary:"bg-text-primary text-white shadow-clay hover:enabled:-rotate-6 hover:enabled:-translate-y-1 hover:enabled:shadow-hover-lemon",secondary:"bg-card text-text-primary border border-border shadow-clay hover:enabled:-rotate-6 hover:enabled:-translate-y-1 hover:enabled:shadow-hover-hard",ghost:"bg-transparent text-text-secondary border border-transparent hover:border-border hover:text-text-primary transition-colors"},KC={sm:"text-button-small px-3 py-1.5 rounded-card",md:"text-button px-5 py-2.5 rounded-card",lg:"text-button-large px-6 py-3 rounded-feature"};function Va({variant:t="primary",size:a="md",className:i,children:s,disabled:o,...c}){return y.jsx("button",{disabled:o,"aria-disabled":o,className:Ya("inline-flex items-center gap-2 font-medium cursor-pointer","transition-all duration-100","disabled:opacity-30 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary",YC[t],KC[a],i),...c,children:s})}function XC({gateKey:t,phaseName:a,phaseNumber:i,gateSummary:s,gateStatus:o,summaryArtefacts:c=[],gateVariant:u="standard",gateNextStep:h}){const g=Rt(w=>w.resolveGate),[p,b]=d.useState(!1),[v,E]=d.useState("");if(o==="approved"){const w=u==="type-selection"?`${a} — path chosen`:`${a} — approved`;return y.jsxs("div",{role:"status","aria-label":`Gate ${t} approved`,className:`rounded-feature border border-matcha-300 bg-card shadow-clay px-5 py-3
|
|
146
|
+
flex items-center gap-3 opacity-80`,children:[y.jsx(ws,{size:16,className:"text-matcha-600 flex-shrink-0",weight:"fill","aria-hidden":"true"}),y.jsx("span",{className:"text-body-standard text-matcha-600 font-medium",children:w}),y.jsxs("span",{className:"text-caption text-text-tertiary ml-auto",children:["Gate ",t]})]})}if(o==="rejected")return y.jsxs("div",{role:"status","aria-label":`Gate ${t} — revisions requested`,className:`rounded-feature border border-border-secondary bg-canvas shadow-clay px-5 py-3
|
|
147
|
+
flex items-center gap-3 opacity-70`,children:[y.jsx(Lc,{size:16,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsxs("span",{className:"text-body-standard text-text-secondary font-medium",children:[a," — revisions requested"]}),y.jsxs("span",{className:"text-caption text-text-tertiary ml-auto",children:["Gate ",t]})]});if(u==="type-selection")return y.jsxs("section",{"aria-label":"Choose your ideation path",className:"rounded-feature border-2 border-ube-300 bg-card shadow-clay overflow-hidden",children:[y.jsxs("div",{className:"bg-ube-300 px-5 py-3 flex items-center gap-3",children:[y.jsx(Lc,{size:18,className:"text-text-primary flex-shrink-0",weight:"duotone","aria-hidden":"true"}),y.jsxs("div",{children:[y.jsx("p",{className:"text-body-medium text-text-primary font-semibold",children:"Choose Your Path"}),y.jsxs("p",{className:"text-caption text-text-primary opacity-60",children:["Gate ",t," · ",a]})]})]}),y.jsxs("div",{className:"px-5 py-5 space-y-3",children:[s&&y.jsx("p",{className:"text-body text-text-primary",children:s}),y.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[y.jsxs("button",{onClick:()=>g(t,"approved","fast-track"),className:`text-left px-4 py-4 rounded-card border-2 border-lemon-500 bg-card
|
|
148
|
+
shadow-clay hover:-translate-y-0.5 hover:shadow-hover-subtle
|
|
149
|
+
transition-all duration-100
|
|
150
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-lemon-500`,"aria-label":"Choose Fast Track — 2–3 focused concepts, 3–4 week sprint",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[y.jsx(yS,{size:16,className:"text-lemon-700",weight:"fill","aria-hidden":"true"}),y.jsx("span",{className:"text-button-small font-semibold text-text-primary",children:"Fast Track"}),y.jsx("span",{className:"text-caption text-text-tertiary ml-auto",children:"Type 1"})]}),y.jsx("p",{className:"text-small text-text-secondary",children:"2–3 focused concepts → north star convergence. Best for tight timelines."})]}),y.jsxs("button",{onClick:()=>g(t,"approved","experimental"),className:`text-left px-4 py-4 rounded-card border-2 border-ube-300 bg-card
|
|
151
|
+
shadow-clay hover:-translate-y-0.5 hover:shadow-hover-subtle
|
|
152
|
+
transition-all duration-100
|
|
153
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ube-300`,"aria-label":"Choose Experimental — 4–5 divergent concepts, 6–8 week sprint",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[y.jsx(lS,{size:16,className:"text-ube-800",weight:"fill","aria-hidden":"true"}),y.jsx("span",{className:"text-button-small font-semibold text-text-primary",children:"Experimental"}),y.jsx("span",{className:"text-caption text-text-tertiary ml-auto",children:"Type 2"})]}),y.jsx("p",{className:"text-small text-text-secondary",children:"4–5 divergent concepts → feedback loop → convergence. Best for innovation-heavy work."})]})]})]})]});const S=u==="review"?`${a} — ready for sign-off`:`${a} — ready for review`;return y.jsxs("section",{"aria-label":`Gate ${t}: ${a} ready for review`,className:"rounded-feature border-2 border-lemon-500 bg-card shadow-clay overflow-hidden",children:[y.jsxs("div",{className:"bg-lemon-500 px-5 py-3 flex items-center gap-3",children:[y.jsx(Lc,{size:18,className:"text-text-primary flex-shrink-0",weight:"duotone","aria-hidden":"true"}),y.jsxs("div",{children:[y.jsx("p",{className:"text-body-medium text-text-primary font-semibold",children:S}),y.jsxs("p",{className:"text-caption text-text-primary opacity-60",children:["Gate ",t]})]})]}),y.jsxs("div",{className:"px-5 py-4 space-y-4",children:[s&&y.jsx("p",{className:"text-body text-text-primary",children:s}),c.length>0&&y.jsx("ul",{role:"list","aria-label":"Produced artefacts",className:"space-y-1.5",children:c.map(w=>y.jsxs("li",{className:"flex items-center gap-2",children:[y.jsx(n8,{size:13,className:"text-text-tertiary flex-shrink-0","aria-hidden":"true"}),y.jsx("span",{className:"text-caption text-text-secondary font-mono truncate",children:w})]},w))}),h&&!p&&y.jsxs("div",{className:"flex items-start gap-2 pt-1 border-t border-border-secondary",children:[y.jsx(iS,{size:13,className:"text-text-tertiary flex-shrink-0 mt-0.5","aria-hidden":"true"}),y.jsxs("p",{className:"text-caption text-text-tertiary",children:[y.jsx("span",{className:"font-medium text-text-secondary",children:"Next:"})," ",h]})]}),p?y.jsxs("div",{className:"space-y-2",role:"form","aria-label":"Submit revisions",children:[y.jsx("label",{htmlFor:`feedback-${t}`,className:"sr-only",children:"Describe the revisions you need"}),y.jsx("textarea",{id:`feedback-${t}`,value:v,onChange:w=>E(w.target.value),rows:3,placeholder:"What would you like changed or improved?","aria-required":"true",className:`w-full rounded-card border border-border bg-canvas px-4 py-3
|
|
154
|
+
text-body-standard text-text-primary resize-none
|
|
155
|
+
focus:outline-none focus:border-text-primary transition-colors
|
|
156
|
+
placeholder:text-text-secondary`}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Va,{variant:"primary",size:"sm",onClick:()=>{v.trim()&&(g(t,"rejected"),b(!1),E(""))},children:"Send revisions"}),y.jsx(Va,{variant:"ghost",size:"sm",onClick:()=>b(!1),children:"Cancel"})]})]}):y.jsxs("div",{className:"flex items-center gap-3 flex-wrap pt-1",children:[y.jsxs(Va,{variant:"primary",size:"md",onClick:()=>g(t,"approved"),children:[y.jsx(ws,{size:15,weight:"bold","aria-hidden":"true"}),"Approve & Continue"]}),y.jsx(Va,{variant:"ghost",size:"md",onClick:()=>b(!0),children:"Request Revisions"})]})]})]})}function QC({phaseNumber:t,phaseName:a,phaseColor:i="#dad4c8",summaryArtefacts:s=[]}){const o=Bt(c=>c.openContextPanel);return y.jsxs("div",{className:"rounded-feature border border-border bg-card shadow-clay overflow-hidden",children:[y.jsx("div",{className:"h-1.5",style:{backgroundColor:i}}),y.jsxs("div",{className:"px-5 py-4",children:[y.jsxs("p",{className:"text-feature-title font-features-display text-text-primary font-semibold",children:[a," complete"]}),y.jsxs("p",{className:"text-caption text-text-secondary mt-1",children:["Phase ",t," · ",s.length," artefact",s.length!==1?"s":""," produced"]}),s.length>0&&y.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:s.map(c=>y.jsx("span",{className:"text-small rounded-pill border border-border px-2.5 py-1 text-text-secondary font-mono",children:c.split("/").pop()},c))}),y.jsx("button",{className:`mt-3 text-caption text-text-tertiary hover:text-text-primary
|
|
157
|
+
flex items-center gap-1 transition-colors`,onClick:()=>o("artefacts"),children:"View all artefacts →"})]})]})}function JC({thinkingText:t,thinkingProgress:a=0}){return y.jsxs("div",{className:"flex items-start gap-3",children:[y.jsx("div",{className:`flex-shrink-0 w-7 h-7 rounded-card bg-lemon-500 flex items-center
|
|
158
|
+
justify-center text-small font-semibold text-lemon-800`,children:"DX"}),y.jsxs("div",{className:"flex-1 space-y-2 pt-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Gl,{size:14,className:"text-text-secondary animate-spin"}),y.jsx("span",{className:"text-caption text-text-secondary",children:t??"Working…"})]}),a>0&&y.jsx("div",{className:"h-0.5 rounded-pill bg-border overflow-hidden w-48",children:y.jsx("div",{className:"h-full bg-text-primary rounded-pill transition-all duration-300",style:{width:`${a}%`}})})]})]})}function Ob({message:t,isCurrentlyStreaming:a}){switch(t.type){case"user":return y.jsx(vC,{content:t.content??""});case"agent":return y.jsx(FC,{content:t.content??"",agentName:t.agentName,isStreaming:a??!1});case"artifact-progress":return y.jsx(IC,{phaseName:t.phaseName,phaseColor:t.phaseColor,items:t.artifactProgress??[],agentNote:t.agentNote,isStreaming:a??!1});case"phase-transition":return y.jsx(qC,{phaseNumber:t.phaseNumber??1,phaseName:t.phaseName??"",direction:t.direction??"entering"});case"gate":return y.jsx(XC,{gateKey:t.gateKey??"",phaseName:t.phaseName??"",phaseNumber:t.phaseNumber??1,gateSummary:t.gateSummary,gateStatus:t.gateStatus??"pending",summaryArtefacts:t.summaryArtefacts,gateVariant:t.gateVariant,gateNextStep:t.gateNextStep});case"phase-summary":return y.jsx(QC,{phaseNumber:t.phaseNumber??1,phaseName:t.phaseName??"",phaseColor:t.phaseColor,summaryArtefacts:t.summaryArtefacts});case"thinking":return y.jsx(JC,{thinkingText:t.thinkingText,thinkingProgress:t.thinkingProgress});case"system":return y.jsx("div",{className:"text-center",children:y.jsx("span",{className:"text-caption text-text-tertiary",children:t.content})});default:return null}}function WC({messages:t}){const a=d.useRef(null),s=Rt(o=>o.isStreaming)?t.reduceRight((o,c)=>o??(c.type==="agent"||c.type==="artifact-progress"?c.id:null),null):null;return d.useEffect(()=>{var o;(o=a.current)==null||o.scrollIntoView({behavior:"smooth"})},[t.length]),y.jsx("div",{className:"flex-1 overflow-y-auto",role:"log","aria-label":"Project stream","aria-live":"polite","aria-atomic":"false",children:y.jsxs("div",{className:"mx-auto max-w-[720px] px-4 py-6 space-y-4 pb-32",children:[t.length===0&&y.jsx("p",{className:"text-body-standard text-text-tertiary text-center py-12",role:"status",children:"No messages yet."}),t.map(o=>y.jsx(Ob,{message:o,isCurrentlyStreaming:(o.type==="agent"||o.type==="artifact-progress")&&o.id===s},o.id)),y.jsx("div",{ref:a,"aria-hidden":"true"})]})})}function eR({onSubmit:t,disabled:a=!1,placeholder:i="Type a command or ask anything…",label:s="Send a message"}){const[o,c]=d.useState(""),u=d.useRef(null);function h(b){c(b.target.value);const v=b.target;v.style.height="auto",v.style.height=Math.min(v.scrollHeight,160)+"px"}function g(b){b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())}function p(){const b=o.trim();!b||a||(t(b),c(""),u.current&&(u.current.style.height="auto"))}return y.jsx("div",{className:"sticky bottom-0 bg-canvas",role:"form","aria-label":s,children:y.jsxs("div",{className:"mx-auto max-w-[720px] px-4 py-3",children:[y.jsxs("div",{className:`flex items-end gap-2 rounded-feature border border-border
|
|
159
|
+
bg-card shadow-clay px-4 py-3
|
|
160
|
+
focus-within:border-text-primary transition-colors`,children:[y.jsx("textarea",{ref:u,value:o,onChange:h,onKeyDown:g,disabled:a,placeholder:i,"aria-label":i,rows:1,className:`flex-1 resize-none bg-transparent text-body-standard text-text-primary
|
|
161
|
+
placeholder:text-text-secondary font-primary outline-none leading-relaxed
|
|
162
|
+
min-h-[24px] max-h-[160px] disabled:opacity-40`}),y.jsx("button",{onClick:p,disabled:!o.trim()||a,"aria-label":"Send message","aria-disabled":!o.trim()||a,className:`flex-shrink-0 w-8 h-8 rounded-standard flex items-center justify-center
|
|
163
|
+
bg-text-primary text-text-inverse
|
|
164
|
+
disabled:opacity-30 disabled:cursor-not-allowed
|
|
165
|
+
enabled:hover:-rotate-6 enabled:hover:-translate-y-1
|
|
166
|
+
enabled:hover:shadow-hover-hard
|
|
167
|
+
transition-all duration-100
|
|
168
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-inverse`,children:y.jsx(B4,{size:14,weight:"bold","aria-hidden":"true"})})]}),y.jsx("p",{className:"sr-only",children:"Press Enter to send. Shift+Enter for a new line."})]})})}const tR="01ab8ac9400c4e429b23",Fy="01ab8ac9400c4e429b23".trim()||tR;function nR(){const t=Sr(B=>B.setAuth),[a,i]=d.useState("idle"),[s,o]=d.useState(""),[c,u]=d.useState("https://github.com/login/device"),[h,g]=d.useState(0),[p,b]=d.useState(""),[v,E]=d.useState(!1),S=d.useRef(!1);d.useEffect(()=>{if(a!=="awaiting"||h<=0)return;const B=setInterval(()=>g(U=>U-1),1e3);return()=>clearInterval(B)},[a,h]);async function w(){i("awaiting"),b(""),S.current=!1;try{const B=await KS(Fy);o(B.user_code),u(B.verification_uri),g(B.expires_in);const U=await XS(Fy,B.device_code,B.interval);if(S.current)return;i("connecting");const le=await QS(U),ne=await x8(U),_=ne.token,ee=new Date(ne.expires_at).getTime();t(U,_,ee,le)}catch(B){if(S.current)return;const U=B instanceof Error?B.message:String(B);b(U==="expired_token"?"Code expired. Try again.":U==="access_denied"?"Access denied on GitHub.":U),i("error")}}function T(){S.current=!0,i("idle"),o(""),b("")}async function M(){await navigator.clipboard.writeText(s),E(!0),setTimeout(()=>E(!1),2e3)}const j=Math.floor(h/60),R=h%60,L=`${j}:${R.toString().padStart(2,"0")}`;return a==="connecting"?y.jsx("div",{className:"sticky bottom-0 bg-canvas border-t border-border","aria-live":"polite","aria-label":"Authorising with GitHub",children:y.jsxs("div",{className:"mx-auto max-w-[640px] px-6 py-4 flex items-center gap-3",children:[y.jsx(Gl,{size:18,className:"text-text-tertiary animate-spin flex-shrink-0","aria-hidden":"true"}),y.jsx("p",{className:"text-body-standard text-text-secondary",children:"Authorising with GitHub…"})]})}):a==="awaiting"?y.jsx("div",{className:"sticky bottom-0 bg-canvas border-t border-border",role:"region","aria-label":"GitHub device authorisation","aria-live":"polite",children:y.jsxs("div",{className:"mx-auto max-w-[640px] px-6 py-4 space-y-3",children:[y.jsxs("div",{className:"rounded-card bg-lemon-500 px-4 py-3 flex items-center gap-4",children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("p",{className:"text-caption text-text-primary opacity-70 mb-1",children:["Enter this code at"," ",y.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"underline hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary rounded-sharp",children:["github.com/login/device",y.jsx(sS,{size:11,className:"inline ml-0.5 -mt-0.5","aria-hidden":"true"})]})]}),y.jsx("p",{className:"font-mono text-section-heading font-bold text-text-primary tracking-widest","aria-label":`Your code is ${s}`,children:s})]}),y.jsxs("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[y.jsxs("button",{onClick:M,"aria-label":v?"Code copied":"Copy code to clipboard",className:`flex items-center gap-1.5 px-3 py-1.5 rounded-card bg-white/50 hover:bg-white/80
|
|
169
|
+
text-caption text-text-primary transition-colors
|
|
170
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary`,children:[v?y.jsx(ws,{size:13,weight:"fill","aria-hidden":"true"}):y.jsx(Lc,{size:13,"aria-hidden":"true"}),v?"Copied":"Copy"]}),h>0&&y.jsxs("p",{className:"text-small text-text-primary opacity-60","aria-live":"off",children:["Expires ",L]})]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Gl,{size:14,className:"text-text-tertiary animate-spin flex-shrink-0","aria-hidden":"true"}),y.jsx("p",{className:"text-caption text-text-secondary flex-1",children:"Waiting for authorisation — EPAM SSO will handle authentication automatically."}),y.jsx("button",{onClick:T,className:`text-caption text-text-tertiary hover:text-text-primary transition-colors
|
|
171
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary rounded-sharp`,children:"Cancel"})]})]})}):y.jsx("div",{className:"sticky bottom-0 bg-canvas border-t border-border",role:"region","aria-label":"Connect GitHub Copilot",children:y.jsx("div",{className:"mx-auto max-w-[640px] px-6 py-4",children:y.jsxs("div",{className:`flex items-center gap-4 rounded-feature border border-border
|
|
172
|
+
bg-card shadow-clay px-5 py-4`,children:[y.jsx(pS,{size:28,className:"text-text-primary flex-shrink-0",weight:"fill","aria-hidden":"true"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("p",{className:"text-body-standard text-text-primary font-medium",children:"Connect GitHub Copilot"}),y.jsx("p",{className:"text-caption text-text-secondary mt-0.5",children:a==="error"&&p?p:"Uses your EPAM GitHub account — no password needed."})]}),y.jsx(Va,{variant:"primary",size:"sm",onClick:w,"aria-label":"Connect your GitHub Copilot account",children:"Connect"})]})})})}const aR=[{id:"auto",label:"Auto",vendor:"copilot"},{id:"gpt-5.5",label:"GPT-5.5",vendor:"openai"},{id:"gpt-5.4",label:"GPT-5.4",vendor:"openai"},{id:"gpt-5.4-mini",label:"GPT-5.4 mini",vendor:"openai"},{id:"gpt-5-mini",label:"GPT-5 mini",vendor:"openai"},{id:"gpt-5.3-codex",label:"GPT-5.3-Codex",vendor:"openai"},{id:"gpt-5.2-codex",label:"GPT-5.2-Codex",vendor:"openai"},{id:"gpt-4.1",label:"GPT-4.1",vendor:"openai"},{id:"gpt-4.1-mini",label:"GPT-4.1 Mini",vendor:"openai"},{id:"gpt-4.1-nano",label:"GPT-4.1 Nano",vendor:"openai"},{id:"gpt-4o",label:"GPT-4o",vendor:"openai"},{id:"gpt-4o-mini",label:"GPT-4o Mini",vendor:"openai"},{id:"o1",label:"o1",vendor:"openai"},{id:"o1-mini",label:"o1 Mini",vendor:"openai"},{id:"o3-mini",label:"o3 Mini",vendor:"openai"},{id:"o4-mini",label:"o4 Mini",vendor:"openai"},{id:"claude-opus-4.7",label:"Claude Opus 4.7",vendor:"anthropic"},{id:"claude-opus-4.6",label:"Claude Opus 4.6",vendor:"anthropic"},{id:"claude-opus-4.5",label:"Claude Opus 4.5",vendor:"anthropic"},{id:"claude-sonnet-4.6",label:"Claude Sonnet 4.6",vendor:"anthropic"},{id:"claude-sonnet-4.5",label:"Claude Sonnet 4.5",vendor:"anthropic"},{id:"claude-haiku-4.5",label:"Claude Haiku 4.5",vendor:"anthropic"},{id:"claude-sonnet-4",label:"Claude Sonnet 4",vendor:"anthropic"},{id:"claude-3.7-sonnet",label:"Claude 3.7 Sonnet",vendor:"anthropic"},{id:"gemini-2.5-pro",label:"Gemini 2.5 Pro",vendor:"google"},{id:"gemini-2.0-flash",label:"Gemini 2.0 Flash",vendor:"google"},{id:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro (Preview)",vendor:"google"},{id:"gemini-3-flash-preview",label:"Gemini 3 Flash (Preview)",vendor:"google"},{id:"claude-sonnet-4-5",label:"Claude Sonnet 4.5",vendor:"anthropic"},{id:"claude-3.5-sonnet",label:"Claude 3.5 Sonnet",vendor:"anthropic"},{id:"claude-3-5-sonnet",label:"Claude 3.5 Sonnet",vendor:"anthropic"}],wr="claude-sonnet-4.6";function rR(){const t=new Set,a=[{id:"auto",label:"Auto",vendor:"copilot"}];for(const i of aR){if(i.id==="auto")continue;const s=i.label.toLowerCase().trim();t.has(s)||(t.add(s),a.push({id:i.id,label:i.label,vendor:i.vendor,isDefault:i.id===wr}))}return a}const jl=rR();function _l(t){const a=new Map;a.set("auto",{id:"auto",label:"Auto",vendor:"copilot"});for(const s of t)!(s!=null&&s.id)||!(s!=null&&s.label)||a.set(s.id,{...s,isDefault:s.id===wr});const i=a.get(wr);return i&&a.set(wr,{...i,isDefault:!0}),Array.from(a.values())}function Wf(t,a){var i,s;return a.some(o=>o.id===t)?t:a.some(o=>o.id===wr)?wr:((i=a.find(o=>o.isDefault))==null?void 0:i.id)??((s=a[0])==null?void 0:s.id)??"auto"}const Ea=Ar()(v8(t=>({model:wr,availableModels:jl,discoveryStatus:"idle",discoveryError:null,setModel:a=>t({model:a}),setAvailableModels:a=>t(i=>{const s=_l(a);return{availableModels:s,model:Wf(i.model,s),discoveryStatus:"ready",discoveryError:null}}),setDiscoveryLoading:()=>t(a=>({discoveryStatus:"loading",discoveryError:null,availableModels:a.availableModels.length>0?a.availableModels:_l(jl)})),setDiscoveryError:a=>t(i=>({discoveryStatus:"error",discoveryError:a,availableModels:i.availableModels.length>0?i.availableModels:_l(jl),model:Wf(i.model,i.availableModels.length>0?i.availableModels:_l(jl))})),resetAvailableModels:()=>t(a=>{const i=_l(jl);return{availableModels:i,model:Wf(a.model,i),discoveryStatus:"idle",discoveryError:null}})}),{name:"dx-model",version:2,migrate:(t,a)=>{if(!t||typeof t!="object")return{model:wr};const i=t;return a<2&&i.model==="auto"?{...i,model:wr}:i},partialize:t=>({model:t.model})})),Iy=["copilot","anthropic","openai","google","xai","mistral","meta","other"];function iR(t){switch(t){case"copilot":return"GitHub Copilot";case"anthropic":return"Anthropic";case"openai":return"OpenAI";case"google":return"Google";case"xai":return"xAI";case"meta":return"Meta";case"mistral":return"Mistral";default:return t.charAt(0).toUpperCase()+t.slice(1)}}function e0(t){return t==="anthropic"?"✦":""}function sR(){const t=Ea(w=>w.model),a=Ea(w=>w.availableModels),i=Ea(w=>w.discoveryStatus),s=Ea(w=>w.discoveryError),o=Ea(w=>w.setModel),[c,u]=d.useState(!1),[h,g]=d.useState(!1),[p,b]=d.useState(320),v=d.useRef(null),E=a.find(w=>w.id===t)??a[0],S=d.useMemo(()=>{const w=new Map;for(const T of a){const M=w.get(T.vendor)??[];M.push(T),w.set(T.vendor,M)}return Array.from(w.entries()).sort(([T],[M])=>{const j=Iy.indexOf(T),R=Iy.indexOf(M),L=j===-1?Number.MAX_SAFE_INTEGER:j,B=R===-1?Number.MAX_SAFE_INTEGER:R;return L-B||T.localeCompare(M)})},[a]);return d.useEffect(()=>{function w(T){v.current&&!v.current.contains(T.target)&&u(!1)}return c&&document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[c]),d.useEffect(()=>{function w(T){T.key==="Escape"&&u(!1)}return c&&document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[c]),d.useLayoutEffect(()=>{if(!c||!v.current)return;function w(){var U;const T=(U=v.current)==null?void 0:U.getBoundingClientRect();if(!T)return;const M=16,j=320,R=window.innerHeight-T.bottom-M,L=T.top-M,B=R<220&&L>R;g(B),b(Math.max(180,Math.min(j,B?L:R)))}return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,!0),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}},[c]),y.jsxs("div",{ref:v,className:"relative",children:[y.jsxs("button",{onClick:()=>u(w=>!w),"aria-haspopup":"listbox","aria-expanded":c,"aria-label":`Model: ${E.label}`,className:Ya("flex items-center gap-1.5 px-2.5 py-1.5 rounded-card text-caption","border border-border-secondary bg-card shadow-clay","hover:border-border transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary"),children:[e0(E.vendor)&&y.jsx("span",{className:"text-ube-800 text-small font-bold leading-none","aria-hidden":"true",children:e0(E.vendor)}),y.jsx("span",{className:"text-text-secondary font-medium",children:E.label}),y.jsx(P4,{size:10,className:Ya("text-text-tertiary transition-transform duration-100",c&&"rotate-180"),"aria-hidden":"true"})]}),c&&y.jsxs("ul",{role:"listbox","aria-label":"Select model",className:Ya("absolute right-0 z-50 min-w-[240px]",h?"bottom-full mb-2":"top-full mt-1","rounded-card border border-border bg-card shadow-hover-subtle overflow-y-auto overscroll-contain"),style:{maxHeight:`${p}px`},children:[S.map(([w,T],M)=>y.jsxs("li",{role:"presentation",children:[y.jsx("div",{className:Ya("px-3 pt-2.5 pb-1",M>0&&"border-t border-border-secondary mt-1 pt-3"),children:y.jsx("span",{className:"text-small text-text-tertiary uppercase tracking-wide font-semibold",children:iR(w)})}),y.jsx("ul",{children:T.map(j=>y.jsx("li",{role:"option","aria-selected":j.id===t,children:y.jsxs("button",{onClick:()=>{o(j.id),u(!1)},className:Ya("w-full flex items-center gap-2.5 px-3 py-2 text-left","text-body-standard transition-colors duration-100",j.id===t?"text-text-primary bg-border-secondary":"text-text-secondary hover:text-text-primary hover:bg-border-secondary"),children:[y.jsx("span",{className:"text-ube-800 text-small font-bold leading-none w-3","aria-hidden":"true",children:e0(j.vendor)}),y.jsx("span",{className:"flex-1",children:j.label}),j.id===t&&y.jsx(uS,{size:12,className:"text-text-primary flex-shrink-0",weight:"bold","aria-hidden":"true"})]})},j.id))})]},w)),i==="loading"&&y.jsx("li",{role:"presentation",className:"px-3 py-2 text-small text-text-tertiary border-t border-border-secondary mt-1",children:"Detecting Copilot models…"}),i==="error"&&s&&y.jsxs("li",{role:"presentation",className:"px-3 py-2 text-small text-text-tertiary border-t border-border-secondary mt-1",children:["Using fallback models. ",s]}),y.jsx("li",{role:"presentation",className:"h-1"})]})]})}const Gy={"claude-sonnet-4.6":{input:3,output:15},"claude-sonnet-4.5":{input:3,output:15},"claude-sonnet-4-5":{input:3,output:15},"claude-3-5-sonnet":{input:3,output:15},"claude-opus-4.7":{input:15,output:75},"claude-opus-4.6":{input:15,output:75},"claude-opus-4.5":{input:15,output:75},"claude-haiku-4.5":{input:.25,output:1.25},"claude-3-opus":{input:15,output:75},"claude-3-haiku":{input:.25,output:1.25},"gpt-5.5":{input:2.5,output:10},"gpt-5.4":{input:2.5,output:10},"gpt-5.4-mini":{input:.15,output:.6},"gpt-5-mini":{input:.15,output:.6},"gpt-5.3-codex":{input:2.5,output:10},"gpt-5.2-codex":{input:2.5,output:10},"gpt-4.1":{input:2,output:8},"gpt-4.1-mini":{input:.4,output:1.6},"gpt-4.1-nano":{input:.1,output:.4},"gpt-4o":{input:2.5,output:10},"gpt-4o-mini":{input:.15,output:.6},o1:{input:15,output:60},"o1-mini":{input:3,output:12},"o3-mini":{input:1.1,output:4.4},"o4-mini":{input:1.1,output:4.4},"claude-3.7-sonnet":{input:3,output:15},"claude-3.5-sonnet":{input:3,output:15},"claude-sonnet-4":{input:3,output:15},"gemini-2.0-flash":{input:.1,output:.4},"gpt-4":{input:30,output:60}};function lR(t,a,i){const s=Gy[i]??Gy["gpt-4o"];return t/1e6*s.input+a/1e6*s.output}const $y={input:0,output:0,total:0},H0=Ar((t,a)=>({sessionTokens:{...$y},sessionCostUsd:0,lastMessageTokens:null,addUsage:(i,s,o)=>{const c=a().sessionTokens,u=lR(i,s,o);t({sessionTokens:{input:c.input+i,output:c.output+s,total:c.total+i+s},sessionCostUsd:a().sessionCostUsd+u,lastMessageTokens:{input:i,output:s}})},reset:()=>t({sessionTokens:{...$y},sessionCostUsd:0,lastMessageTokens:null})}));function Cc(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function oR(t){return t<.01?"<$0.01":`~$${t.toFixed(2)}`}function cR(){const{sessionTokens:t,sessionCostUsd:a,lastMessageTokens:i}=H0(),s=Ea(o=>o.model);return t.total===0?null:y.jsx("div",{className:"flex items-center justify-end px-4 py-1","aria-label":"Token usage",children:y.jsxs("div",{title:[`Model: ${s}`,`Input: ${Cc(t.input)} tokens`,`Output: ${Cc(t.output)} tokens`,i?`Last message: +${Cc(i.input+i.output)}`:""].filter(Boolean).join(`
|
|
173
|
+
`),className:Ya("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-pill","border border-border-secondary bg-canvas","text-small text-text-tertiary select-none cursor-default","transition-opacity duration-200"),children:[y.jsxs("span",{className:"font-mono",children:[Cc(t.total)," tokens"]}),y.jsx("span",{className:"text-border-primary","aria-hidden":"true",children:"·"}),y.jsx("span",{className:"font-mono",children:oR(a)})]})})}const L1="auto",uR={auto:["claude-sonnet-4.6",null],"claude-sonnet-4.6":["claude-sonnet-4.6","claude-sonnet-4.5","claude-sonnet-4-5",null],"claude-sonnet-4.5":["claude-sonnet-4.5","claude-sonnet-4-5",null],"claude-sonnet-4-5":["claude-sonnet-4-5","claude-sonnet-4.5",null],"claude-opus-4.7":["claude-opus-4.7","claude-opus-4.6","claude-opus-4.5",null],"claude-opus-4.6":["claude-opus-4.6","claude-opus-4.5",null],"claude-opus-4.5":["claude-opus-4.5",null],"claude-haiku-4.5":["claude-haiku-4.5","claude-sonnet-4.5",null],"claude-3-5-sonnet":["claude-3-5-sonnet","claude-3.5-sonnet","claude-sonnet-4.5",null],"claude-3.5-sonnet":["claude-3.5-sonnet","claude-3-5-sonnet","claude-sonnet-4.5",null],"gpt-4o":["gpt-4o",null],"gpt-4o-mini":["gpt-4o-mini",null],"gpt-5.5":["gpt-5.5","gpt-5.4","gpt-5-mini",null],"gpt-5.4":["gpt-5.4","gpt-5-mini",null],"gpt-5.4-mini":["gpt-5.4-mini","gpt-5-mini",null],"gpt-5-mini":["gpt-5-mini","gpt-4o",null],"gpt-5.3-codex":["gpt-5.3-codex","gpt-5.2-codex","gpt-5-mini",null],"gpt-5.2-codex":["gpt-5.2-codex","gpt-5-mini",null]},qy=2,dR="dx.copilot.lastRequest",Rc="dx.copilot.lastError",fR="dx.copilot.lastStream",Lb=900*1024,Nc=3e4,Yy=5*6e4,jc=Lb;function hR(t){return new Promise(a=>window.setTimeout(a,t))}function mR(t){if(!t)return null;const a=Number(t);if(Number.isFinite(a)&&a>0)return Math.round(a*1e3);const i=Date.parse(t);if(Number.isNaN(i))return null;const s=i-Date.now();return s>0?s:null}function pR(t,a){return t!==400?!1:a.includes("model_not_supported")||a.includes("requested model is not supported")}function gR(t,a){return t!==400?!1:/unknown integration/i.test(a)}function yR(t,a){return t===413?!0:/payload too large|entity too large/i.test(a)}function bR(t){const a=t??L1;return a==="auto"?["claude-sonnet-4.6",null]:uR[a]??[a,null]}function Ky(t,a=L1){const i={messages:t,stream:!0,temperature:.7,max_tokens:4096};return a!=="auto"&&(i.model=a),new TextEncoder().encode(JSON.stringify(i)).length}function fs(t,a){try{sessionStorage.setItem(t,JSON.stringify(a))}catch{}}function Xy(t,a,i=!1,s=4096){const o=t.slice(1,-1),c=i?[0]:[20,14,10,6,4,2,0],u=t[t.length-1],h=t[0];for(const b of c){const v=o.slice(-b),S={messages:[h,...v,u],stream:!0,temperature:.7,max_tokens:s};a&&(S.model=a);const w=JSON.stringify(S),T=new TextEncoder().encode(w).length;if(T<=Lb||b===0)return{bodyPayload:S,serializedBody:w,requestBytes:T,historyMessagesUsed:v.length,compacted:v.length!==o.length}}const g={messages:t,stream:!0,temperature:.7,max_tokens:s};a&&(g.model=a);const p=JSON.stringify(g);return{bodyPayload:g,serializedBody:p,requestBytes:new TextEncoder().encode(p).length,historyMessagesUsed:Math.max(t.length-2,0),compacted:!1}}async function vR(t,a){let i;try{const s=new Promise(o=>{i=window.setTimeout(()=>o(null),a)});return await Promise.race([t.read(),s])}finally{i!==void 0&&window.clearTimeout(i)}}async function xR(t,a,i,s,o=L1,c,u,h,g,p){var S,w,T,M,j;let b="",v=a,E=!1;for(const[R,L]of bR(o).entries()){let B=Xy(t,L,!1,g);const U=crypto.randomUUID();let le=!1;fs(dR,{requestId:U,at:new Date().toISOString(),model:L,messageCount:t.length,requestBytes:B.requestBytes,historyChars:t.reduce((C,q)=>C+q.content.length,0),historyMessagesUsed:B.historyMessagesUsed,compacted:B.compacted});const ne=L===null&&R>0;let _=null,ee="";for(let C=0;C<=qy;C+=1){if(_=await fetch("/api/copilot/chat/completions",{method:"POST",signal:u,headers:{"Content-Type":"application/json","X-Request-Id":U,...ne?{"X-DesignX-Auto-Fallback":"1"}:{},...l0(`Bearer ${v}`)},body:B.serializedBody}),_.status===413&&!le){le=!0,B=Xy(t,L,!0,g);continue}if(_.status!==429||(ee=await _.text(),C>=qy))break;const oe=mR(_.headers.get("retry-after"))??1200*(C+1);await hR(oe)}if(!_)throw new Error("Copilot API error: no response received.");if(!_.ok){const C=_.status===429?ee||await _.text():await _.text();if(fs(Rc,{requestId:U,at:new Date().toISOString(),status:_.status,body:C.slice(0,2e3),responseRequestId:_.headers.get("x-request-id"),historyMessagesUsed:B.historyMessagesUsed,compacted:B.compacted}),b=`Copilot API error (${_.status}): ${C}`,gR(_.status,C)&&h&&!E){E=!0,v=await h();continue}if(_.status===429)throw new Error(`Copilot API rate limit reached (429). Please wait a moment and retry. ${C}`.trim());if(yR(_.status,C))throw new Error(`Copilot request still too large after compaction (${B.requestBytes} bytes). ${C}`);if(pR(_.status,C))continue;throw new Error(b)}if(!_.body)throw new Error("No response body from Copilot API");const ae=_.body.getReader(),ie=new TextDecoder;let Q="";const pe=Date.now();let fe=pe,ye=0,H=0,X=0,Y=0,ue=0,Se=!1;for(;;){if(Date.now()-pe>Yy){await ae.cancel("max stream duration exceeded").catch(()=>{});const xe=`Copilot stream exceeded ${Math.round(Yy/1e3)}s and was stopped.`;throw fs(Rc,{requestId:U,at:new Date().toISOString(),status:"stream-max-duration",body:xe,responseRequestId:_.headers.get("x-request-id")}),new Error(xe)}if(Date.now()-fe>Nc){await ae.cancel("no meaningful stream progress").catch(()=>{});const xe=`Copilot stream stalled (no token progress for ${Math.round(Nc/1e3)}s).`;throw fs(Rc,{requestId:U,at:new Date().toISOString(),status:"stream-no-progress",body:xe,responseRequestId:_.headers.get("x-request-id")}),new Error(xe)}let C;try{C=await vR(ae,Nc)}catch(xe){const Ne=xe instanceof Error?xe.message:String(xe);if(/premature close|ERR_STREAM_PREMATURE_CLOSE/i.test(Ne)){if(ye>0){s();return}throw new Error("Stream closed by server before any data was received.")}throw xe}if(!C){await ae.cancel("idle timeout").catch(()=>{});const xe=`Copilot stream stalled (no chunks for ${Math.round(Nc/1e3)}s).`;throw fs(Rc,{requestId:U,at:new Date().toISOString(),status:"stream-stalled",body:xe,responseRequestId:_.headers.get("x-request-id")}),new Error(xe)}const{done:q,value:oe}=C;if(q)break;ye+=1,Q+=ie.decode(oe,{stream:!0});const me=Q.split(`
|
|
174
|
+
`);Q=me.pop()??"";for(const xe of me){const Ne=xe.trim();if(Ne){if(Ne==="data: [DONE]"){X+=1;continue}if(Ne.startsWith("data: ")){H+=1;try{const $=JSON.parse(Ne.slice(6)),ze=(T=(w=(S=$==null?void 0:$.choices)==null?void 0:S[0])==null?void 0:w.delta)==null?void 0:T.content;ze&&(/\S/.test(ze)?(fe=Date.now(),Y+=1):ue+=1,i(ze));const Le=(j=(M=$==null?void 0:$.choices)==null?void 0:M[0])==null?void 0:j.finish_reason;Le&&(fe=Date.now(),Le==="length"&&(Se=!0)),$!=null&&$.usage&&c&&(fe=Date.now(),c({prompt_tokens:$.usage.prompt_tokens??0,completion_tokens:$.usage.completion_tokens??0,total_tokens:$.usage.total_tokens??0}))}catch{}}}}}fs(fR,{requestId:U,at:new Date().toISOString(),durationMs:Date.now()-pe,networkChunkCount:ye,dataEventCount:H,doneEventCount:X,visibleDeltaCount:Y,whitespaceOnlyDeltaCount:ue,responseRequestId:_.headers.get("x-request-id")}),s(),Se&&(p==null||p());return}throw new Error(b||"Copilot API error: no supported model available")}function Qy(t){return Array.isArray(t)?t.filter(a=>!!a&&typeof a=="object"&&typeof a.id=="string"&&typeof a.label=="string"&&typeof a.vendor=="string"&&(typeof a.verified!="boolean"||a.verified===!0)):[]}async function ER(t,a={}){const i={Authorization:`Bearer ${t}`},s=Date.now(),o=a.forceRefresh?"&force=1":"";let c=await fetch(`/api/copilot/models/full?ts=${s}${o}`,{cache:"no-store",headers:i});!c.ok&&c.status!==401&&(c=await fetch(`/api/copilot/models?ts=${s}${o}`,{cache:"no-store",headers:i}));const u=await c.json().catch(()=>({}));if(!c.ok)throw new Error(u.error??`Copilot model discovery failed (${c.status}).`);const h=Qy(u.models);if(h.length>0)return h;const g=await fetch(`/api/copilot/models?ts=${s}-fallback${o}`,{cache:"no-store",headers:i}),p=await g.json().catch(()=>({}));if(!g.ok)throw new Error(p.error??`Copilot model discovery failed (${g.status}).`);return Qy(p.models)}const SR=/^(D[1-4]|R[34]|VDG|Type Selection|Choose Your Path|Checkpoint[\s\-]?1)[\s\u2014\-]/i,wR=/integration guide|changelog|change log|readme|backend selection|handover|index|architecture|spec pack/i;function AR(t){const a=t.toLowerCase();return/persona|user profile|user archetype/.test(a)?"persona":/journey map|customer journey|user journey|experience map/.test(a)?"journey-map":/feature tree|feature list/.test(a)?"feature-tree":/data model|entity model|schema/.test(a)?"data-model":/user flow|onboarding flow|navigation flow/.test(a)?"flow":/brief|project brief|research brief|complexity/.test(a)?"brief":/extraction ledger|kb ledger|knowledge base extraction/.test(a)?"extraction-ledger":/competitive|competitor|market analysis/.test(a)?"competitive-analysis":/insight|key finding/.test(a)?"insights":"document"}function MR(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40)}function Dl(t,a,i,s=!1){const o=t.split(`
|
|
175
|
+
`),c=[];let u=null;for(const g of o)if(g.startsWith("## ")){const p=g.slice(3).trim();if(u!=null&&u.lines.some(b=>b.trim())&&c.push({...u,isStreaming:!1}),SR.test(p)){u=null;continue}if(s&&a.id===6&&!wR.test(p)){u=null;continue}u={title:p,lines:[]}}else u&&u.lines.push(g);u!=null&&u.lines.some(g=>g.trim())&&c.push({...u,isStreaming:!0});const h=Date.now();return c.map((g,p)=>({id:`${i}-ph${a.id}-${MR(g.title)}`,projectSlug:i,title:g.title,type:AR(g.title),content:g.lines.join(`
|
|
176
|
+
`).trimEnd(),phase:a.id,phaseName:a.name,phaseColor:a.color,createdAt:h+p,updatedAt:h+p,isStreaming:g.isStreaming}))}const Vb=[{id:2,key:"discover",name:"Discover",color:"#3bd3fd",agents:["Strategist","Researcher"],gates:[{key:"D1",label:"Discovery Gate",nextStep:"Type Selection — choose between Fast Track and Experimental ideation",variant:"standard"}],activeFor:["end-to-end","research-sprint"]},{id:3,key:"ideate",name:"Ideate",color:"#c1b0ff",agents:["Ideation Designer","Visual Designer"],gates:[{key:"type-selection",label:"Choose Your Path",nextStep:"Ideation phase will begin based on your choice",variant:"type-selection"},{key:"checkpoint-1",label:"Concept Review",nextStep:"Concept Refinement — your chosen concept develops into a north star",variant:"review"},{key:"D2",label:"Ideation Gate",nextStep:"Design Phase — visual direction, design system, and component library",variant:"standard"}],activeFor:["end-to-end"]},{id:4,key:"design",name:"Design",color:"#84e7a5",agents:["Architect","Visual Designer","Content Designer"],gates:[{key:"VDG",label:"Visual Direction Gate",nextStep:"Design System — tokens, component library, and screen designs",variant:"standard"},{key:"D3",label:"Design Gate",nextStep:"Planning Phase — stories, API contracts, and sprint plan",variant:"standard"}],activeFor:["end-to-end","research-sprint"]},{id:5,key:"plan",name:"Plan",color:"#01418d",agents:["Story Writer"],gates:[{key:"D4",label:"Planning Gate",nextStep:"Deliver Phase — working prototype",variant:"standard"}],activeFor:["end-to-end"]},{id:6,key:"deliver",name:"Deliver",color:"#fc7981",agents:["Builder"],gates:[{key:"R3",label:"Build Review",nextStep:"Measure Phase — quality assessment and final sign-off",variant:"review"}],activeFor:["end-to-end"]},{id:7,key:"measure",name:"Measure",color:"#43089f",agents:["Quality Assessor"],gates:[{key:"R4",label:"Quality Sign-off",nextStep:"Project complete — all phases finished",variant:"review"}],activeFor:["end-to-end"]}];function TR(t){return Vb.filter(a=>a.activeFor.includes(t))}function V1(t){return Vb.find(a=>a.id===t)}function CR(t,a){var i;return(i=V1(t))==null?void 0:i.gates.find(s=>s.key===a)}function RR(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(0)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function NR(t){switch(t.key){case"discover":return`You are leading the **Discover phase** as Strategist and Researcher.
|
|
177
|
+
|
|
178
|
+
**KB Artifact Discovery — run before generating any artefact from scratch:**
|
|
179
|
+
Scan every KB file listed in the Knowledge Base section for:
|
|
180
|
+
- Existing personas, user profiles, or user archetypes
|
|
181
|
+
- Existing journey maps or experience maps
|
|
182
|
+
- Existing research briefs, competitive analyses, or insight reports
|
|
183
|
+
If found: extract and adapt to the required output format below, label as SOURCED.
|
|
184
|
+
If not found: generate from scratch based on KB content and domain knowledge, label as SYNTHESISED.
|
|
185
|
+
|
|
186
|
+
**Deliverables (produce all of these):**
|
|
187
|
+
1. Knowledge base extraction ledger — list every KB file and what evidence you drew from it
|
|
188
|
+
2. Complexity assessment — rate LOW / MODERATE / HIGH / CRITICAL across: interaction, domain, data, integration. Justify each.
|
|
189
|
+
3. Project brief — objectives, user needs, constraints, success metrics, assumptions
|
|
190
|
+
4. Personas (2–4) — use the structured format below for each persona
|
|
191
|
+
5. Journey maps — one per persona, use the structured format below
|
|
192
|
+
6. Key insights (10–15) — each labelled REAL (sourced from KB) or SYNTHESISED (inferred)
|
|
193
|
+
7. Competitive analysis — include when domain signals indicate market context matters
|
|
194
|
+
|
|
195
|
+
**Rules:**
|
|
196
|
+
- Every claim must be labelled REAL or SYNTHESISED
|
|
197
|
+
- Do not begin personas until the brief is drafted
|
|
198
|
+
- Use the project name and domain throughout — no generic placeholders
|
|
199
|
+
|
|
200
|
+
**Required output format for each persona (place directly in the ## Personas section):**
|
|
201
|
+
Output each persona as a JSON block immediately after a brief intro sentence:
|
|
202
|
+
\`\`\`json:persona
|
|
203
|
+
{
|
|
204
|
+
"name": "Full Name",
|
|
205
|
+
"age": 30,
|
|
206
|
+
"role": "Job Title / Role",
|
|
207
|
+
"goals": ["specific goal 1", "specific goal 2", "specific goal 3"],
|
|
208
|
+
"pains": ["pain point 1", "pain point 2", "pain point 3"],
|
|
209
|
+
"behaviors": ["behavior pattern 1", "behavior pattern 2"],
|
|
210
|
+
"quote": "A direct quote capturing their core frustration or motivation.",
|
|
211
|
+
"sourced": false
|
|
212
|
+
}
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
**Required output format for each journey map (place directly in the ## Journey Maps section):**
|
|
216
|
+
\`\`\`json:journey-map
|
|
217
|
+
{
|
|
218
|
+
"persona": "Persona Name",
|
|
219
|
+
"stages": [
|
|
220
|
+
{
|
|
221
|
+
"name": "Stage Name",
|
|
222
|
+
"touchpoints": ["touchpoint 1", "touchpoint 2"],
|
|
223
|
+
"emotion": "curious",
|
|
224
|
+
"pains": ["pain at this stage"],
|
|
225
|
+
"opportunities": ["opportunity here"]
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
\`\`\`
|
|
230
|
+
Emotion values: curious · positive · neutral · negative · frustrated
|
|
231
|
+
|
|
232
|
+
**Gate signal (required):**
|
|
233
|
+
When all deliverables above are complete, output a section headed exactly:
|
|
234
|
+
\`\`\`
|
|
235
|
+
## D1 — Discovery Gate
|
|
236
|
+
\`\`\`
|
|
237
|
+
Then list every artefact produced as bullet points. This is the signal to pause for approval.`;case"ideate":return`You are leading the **Ideate phase** as Ideation Designer with Visual Designer collaboration.
|
|
238
|
+
|
|
239
|
+
**Step 1 — Type Selection (mandatory first step):**
|
|
240
|
+
Output a section headed exactly:
|
|
241
|
+
\`\`\`
|
|
242
|
+
## Type Selection — Choose Your Path
|
|
243
|
+
\`\`\`
|
|
244
|
+
Describe both options clearly:
|
|
245
|
+
- **Fast Track (Type 1):** 2–3 focused concepts → direct north star convergence. Best for tight timelines (3–4 week sprint).
|
|
246
|
+
- **Experimental (Type 2):** 4–5 divergent concepts → user feedback loop → convergence. Best for innovation-heavy work (6–8 week sprint).
|
|
247
|
+
|
|
248
|
+
Wait for the user to choose before continuing.
|
|
249
|
+
|
|
250
|
+
**After type selection:**
|
|
251
|
+
1. Generate 6–8 "How Might We" questions grounded in research insights
|
|
252
|
+
2. Develop concepts per type count (Type 1: 2–3, Type 2: 4–5). For each: concept story, key screens, visual direction notes
|
|
253
|
+
3. For Type 2 only: output \`## Checkpoint 1 — Concept Review\` and wait for feedback before converging
|
|
254
|
+
4. Converge on a north star concept with full specification
|
|
255
|
+
5. Produce the feature tree (categorised by priority: MVP / Phase 2 / Backlog) — use the structured format below
|
|
256
|
+
|
|
257
|
+
**Required output format for the feature tree (place directly in the ## Feature Tree section):**
|
|
258
|
+
\`\`\`json:feature-tree
|
|
259
|
+
{
|
|
260
|
+
"mvp": ["Feature 1 — brief description", "Feature 2 — brief description"],
|
|
261
|
+
"phase2": ["Feature 3 — brief description"],
|
|
262
|
+
"backlog": ["Feature 4 — brief description"]
|
|
263
|
+
}
|
|
264
|
+
\`\`\`
|
|
265
|
+
|
|
266
|
+
**Gate signal:**
|
|
267
|
+
\`\`\`
|
|
268
|
+
## D2 — Ideation Gate
|
|
269
|
+
\`\`\`
|
|
270
|
+
List all artefacts. Wait for approval.`;case"design":return`You are leading the **Design phase** as Architect, Visual Designer, and Content Designer.
|
|
271
|
+
|
|
272
|
+
**Architect deliverables:**
|
|
273
|
+
- Information architecture (sitemap with all sections and screens)
|
|
274
|
+
- Screen inventory (every screen, its purpose, entry points)
|
|
275
|
+
- User flows (key journeys: onboarding, core task, error recovery)
|
|
276
|
+
- Data model (entities, relationships, key attributes)
|
|
277
|
+
|
|
278
|
+
**Visual Designer — Stage 1 (produce first, then pause):**
|
|
279
|
+
- Visual Direction Brief: typography, colour palette, spacing scale, motion principles, visual tone
|
|
280
|
+
|
|
281
|
+
**Gate signal after Stage 1:**
|
|
282
|
+
\`\`\`
|
|
283
|
+
## VDG — Visual Direction Gate
|
|
284
|
+
\`\`\`
|
|
285
|
+
Wait for approval before continuing to Stage 2.
|
|
286
|
+
|
|
287
|
+
**Visual Designer — Stage 2 (after VDG approval):**
|
|
288
|
+
- Design tokens (typography scale, colour tokens, spacing, radius, shadow)
|
|
289
|
+
- Component library (component name, variants, states, usage notes)
|
|
290
|
+
- Screen designs (annotated screens for all key flows)
|
|
291
|
+
|
|
292
|
+
**Content Designer deliverables:**
|
|
293
|
+
- Content strategy (voice, tone, reading levels)
|
|
294
|
+
- Terminology guide (product vocabulary, do/don't pairs)
|
|
295
|
+
- Key content patterns (empty states, errors, success messages)
|
|
296
|
+
|
|
297
|
+
**Final gate signal:**
|
|
298
|
+
\`\`\`
|
|
299
|
+
## D3 — Design Gate
|
|
300
|
+
\`\`\`
|
|
301
|
+
List all artefacts. Wait for approval.`;case"plan":return`You are leading the **Plan phase** as Story Writer.
|
|
302
|
+
|
|
303
|
+
**Deliverables:**
|
|
304
|
+
1. Story map — all features grouped by user journey (columns = journeys, rows = story types)
|
|
305
|
+
2. User stories — for every item in the story map. Format: "As a [user], I want to [action] so that [outcome]." Include acceptance criteria (3–5 per story, testable and specific).
|
|
306
|
+
3. API contracts — for key integrations: endpoint, method, request schema, response schema, error cases
|
|
307
|
+
4. Sprint plan — stories grouped into sprints, ordered by dependency and priority
|
|
308
|
+
|
|
309
|
+
**Rules:**
|
|
310
|
+
- Every spec element from previous phases must be covered by at least one story
|
|
311
|
+
- No stories that weren't in the spec
|
|
312
|
+
- ACs must be testable — no "it should feel" or "it should be easy"
|
|
313
|
+
|
|
314
|
+
**Gate signal:**
|
|
315
|
+
\`\`\`
|
|
316
|
+
## D4 — Planning Gate
|
|
317
|
+
\`\`\`
|
|
318
|
+
List all artefacts. Wait for approval.`;case"deliver":return`You are leading the **Deliver phase** as Builder.
|
|
319
|
+
|
|
320
|
+
**Process:**
|
|
321
|
+
1. Classify all stories from the sprint plan into types: foundation → feature → integration → polish
|
|
322
|
+
2. Build in that order — foundation first, polish last
|
|
323
|
+
3. Follow design tokens and components exactly — no improvisation on visual decisions
|
|
324
|
+
4. After each story type: verify build compiles and core flows work
|
|
325
|
+
5. Produce: integration guide (how to run and configure the app) and changelog
|
|
326
|
+
|
|
327
|
+
**Multi-batch generation rules:**
|
|
328
|
+
- Use a \`## Heading\` for every artifact (component, file, guide, etc.)
|
|
329
|
+
- Generate as many artifacts as you can fit — the system will automatically continue if you run out of space
|
|
330
|
+
- If you are prompted to continue, pick up exactly where you left off — do not restart or repeat already-generated artifacts
|
|
331
|
+
- **Only output \`## R3 — Build Review\` once ALL artifacts for this phase are complete** — not before
|
|
332
|
+
|
|
333
|
+
**Gate signal:**
|
|
334
|
+
\`\`\`
|
|
335
|
+
## R3 — Build Review
|
|
336
|
+
\`\`\`
|
|
337
|
+
Summarise what was built, what was deferred, and any known issues. Wait for sign-off.`;case"measure":return`You are leading the **Measure phase** as Quality Assessor.
|
|
338
|
+
|
|
339
|
+
**Assessment areas:**
|
|
340
|
+
1. Prototype vs research success criteria — does it solve the problems identified in the brief?
|
|
341
|
+
2. Visual QA — does every screen follow the design system (tokens, components, spacing)?
|
|
342
|
+
3. Accessibility audit — keyboard navigation, colour contrast, ARIA labels, focus states
|
|
343
|
+
4. Dead elements — unused components, orphaned screens, placeholder content
|
|
344
|
+
5. UX gap analysis — flows with missing error handling, unclear empty states, ambiguous CTAs
|
|
345
|
+
|
|
346
|
+
**Output:** Quality Assessment Report with findings per area, severity ratings (critical / major / minor), and a clear recommendation: accept, fix and accept, or re-run.
|
|
347
|
+
|
|
348
|
+
**Gate signal:**
|
|
349
|
+
\`\`\`
|
|
350
|
+
## R4 — Quality Sign-off
|
|
351
|
+
\`\`\`
|
|
352
|
+
Present findings and recommendation. Wait for final approval.`;default:return`Execute the ${t.name} phase deliverables according to the Enigma v2 framework.`}}function jR(t,a){const i=t.control_mode==="human-in-loop",s=t.kb_files.length>0?`The following files are attached as your knowledge base:
|
|
353
|
+
${t.kb_files.map(c=>`- **${c.name}** (${RR(c.size)})`).join(`
|
|
354
|
+
`)}
|
|
355
|
+
|
|
356
|
+
Reference these files throughout your analysis. If you need the content of a specific file, ask the user to paste it.`:"No knowledge base files have been attached. Work from the project context and ask the user for relevant information as needed.",o=i?"**Control mode: Human-in-loop.** At each gate heading, stop and present your work clearly. The user will review and approve before you continue. Do not proceed past a gate without explicit approval.":"**Control mode: Autonomous.** Work through all deliverables without pausing. Output every required gate heading exactly, and under each gate list the concrete artefacts you produced as explicit backticked paths such as `spec/02-discover/project-brief.md`. Continue immediately after the gate block unless you genuinely cannot proceed without user input.";return{role:"system",content:`You are **Enigma v2** — an AI-powered product design pipeline assistant.
|
|
357
|
+
|
|
358
|
+
## Active Phase
|
|
359
|
+
**${a.name}** (Phase ${a.id} of ${t.preset==="end-to-end"?"7":"4"})
|
|
360
|
+
Agents: ${a.agents.join(", ")}
|
|
361
|
+
|
|
362
|
+
## Project Context
|
|
363
|
+
- **Name:** ${t.name}
|
|
364
|
+
- **Domain:** ${t.domain}
|
|
365
|
+
- **Nature:** ${t.nature==="greenfield"?"Greenfield (new product, starting from scratch)":"Brownfield (existing product, evolving or redesigning)"}
|
|
366
|
+
- **Application type:** ${t.application_type}
|
|
367
|
+
- **Pipeline:** ${t.preset==="end-to-end"?"End-to-End (Research → Ideate → Design → Plan → Build → Measure)":"Research Sprint (Research → Design only, no build phase)"}
|
|
368
|
+
|
|
369
|
+
## Control Mode
|
|
370
|
+
${o}
|
|
371
|
+
|
|
372
|
+
## Knowledge Base
|
|
373
|
+
${s}
|
|
374
|
+
|
|
375
|
+
## Phase Instructions
|
|
376
|
+
${NR(a)}
|
|
377
|
+
|
|
378
|
+
## Response Style
|
|
379
|
+
- Use clear markdown with headers (\`##\`) and bullet lists
|
|
380
|
+
- Be specific — use the project name, domain, and context throughout every response
|
|
381
|
+
- When referencing produced artefacts, use paths as they would appear in \`spec/\` (e.g. \`spec/02-brief.md\`)
|
|
382
|
+
- At each gate, name every produced artefact as a concrete path in backticks so the workspace can track it
|
|
383
|
+
- Keep responses focused on the current phase — do not jump ahead
|
|
384
|
+
- Do not use placeholder names or generic examples — everything must be grounded in this specific project`}}const Hb=[{pattern:/(?:^|\n)#+\s*type[\s-]?selection|choose your path|fast[\s-]?track.*experimental|experimental.*fast[\s-]?track/im,key:"type-selection"},{pattern:/(?:^|\n)#+\s*(?:VDG|visual direction gate)|visual direction brief.*ready/im,key:"VDG"},{pattern:/(?:^|\n)#+\s*concept[\s-]?review|checkpoint[\s-]?1|concepts.*ready.*review/im,key:"checkpoint-1"},{pattern:/(?:^|\n)#+\s*D1[\s—\-]|discovery gate|brief.*ready.*review|research.*brief.*complete/im,key:"D1"},{pattern:/(?:^|\n)#+\s*D2[\s—\-]|ideation gate|north star.*ready.*approval/im,key:"D2"},{pattern:/(?:^|\n)#+\s*D3[\s—\-]|design gate|feature handover.*ready/im,key:"D3"},{pattern:/(?:^|\n)#+\s*D4[\s—\-]|planning gate|sprint plan.*ready.*approval/im,key:"D4"},{pattern:/(?:^|\n)#+\s*R3[\s—\-]|build review|prototype.*ready.*review/im,key:"R3"},{pattern:/(?:^|\n)#+\s*R4[\s—\-]|quality sign[\s-]?off|quality assessment.*complete/im,key:"R4"}];function _R(t){const a=[],i=t.match(/`[a-z0-9_\-/.]+\.[a-z]{2,5}`/gi)??[];a.push(...i.map(o=>o.replace(/`/g,"")));const s=t.match(/(?:^|\n)[•\-*]\s+([A-Z0-9][^:\n]{3,50})/gm)??[];return a.push(...s.map(o=>o.replace(/^[\n•\-*]\s+/,"").trim()).filter(o=>o.length>=4&&o.length<=60).slice(0,6)),[...new Set(a)].slice(0,8)}function DR(t){var i,s;const a=t.split(`
|
|
385
|
+
`).filter(o=>o.trim());for(let o=0;o<a.length-1;o++)if(Hb.some(c=>c.pattern.test(a[o]))){const c=(i=a[o+1])==null?void 0:i.trim();if(c&&c.length>20&&!c.startsWith("#")&&!c.startsWith("---"))return c.replace(/^[*_]{1,2}|[*_]{1,2}$|\-\s*/g,"").slice(0,240)}return((s=a.find(o=>o.length>30&&!o.startsWith("#")&&!o.startsWith("---")))==null?void 0:s.slice(0,240))??""}function OR(t){for(const{pattern:a,key:i}of Hb)if(a.test(t))return{key:i,summary:DR(t),artefacts:_R(t)};return null}function Er(t){return V1(t.current_phase)??TR(t.preset)[0]}function LR(t,a){const s={D1:t.preset==="research-sprint"?4:3,D2:4,D3:t.preset==="research-sprint"?"complete":5,D4:6,R3:7,R4:"complete","type-selection":t.current_phase,"checkpoint-1":t.current_phase,VDG:t.current_phase}[a];return s===void 0?null:s==="complete"?"complete":s===t.current_phase?Er(t):V1(s)??null}function Jy(t){const a=Er(t);return jR(t,a)}function VR(t,a){return t==="type-selection"?`I choose **${a==="fast-track"?"Fast Track (Type 1)":"Experimental (Type 2)"}**. Please proceed with ideation using this approach.`:t==="VDG"?"Visual direction approved. Please continue with design tokens, component library, and screen designs.":t==="checkpoint-1"?"Concept feedback noted. Please continue refining toward the north star concept.":t==="R3"?"Build approved. Please proceed with quality assessment.":"Approved. Please continue to the next step."}const Ts=[{id:"strategist",name:"Strategist",emoji:"🧠",role:"Strategy",description:"Market positioning & business strategy",phase:2,prerequisites:["Project brief"],estimatedMinutes:12},{id:"researcher",name:"Researcher",emoji:"🔍",role:"Research",description:"User research & insights synthesis",phase:2,prerequisites:["KB briefing or knowledge base"],estimatedMinutes:15},{id:"ideation-designer",name:"Ideation Designer",emoji:"💡",role:"Design",description:"Concept exploration & ideation",phase:3,prerequisites:["Strategist output","Research insights"],estimatedMinutes:18},{id:"visual-designer",name:"Visual Designer",emoji:"🎨",role:"Visual Design",description:"Visual direction & design system",phase:3,prerequisites:["Concepts from Ideation Designer"],estimatedMinutes:20},{id:"architect",name:"Architect",emoji:"🏗️",role:"Architecture",description:"Technical architecture & information design",phase:3,prerequisites:["Strategist brief"],estimatedMinutes:25},{id:"content-designer",name:"Content Designer",emoji:"✍️",role:"Content",description:"Copy, voice & terminology system",phase:3,prerequisites:["Project context"],estimatedMinutes:14},{id:"story-writer",name:"Story Writer",emoji:"📖",role:"Stories",description:"User stories & acceptance criteria",phase:3,prerequisites:["Architect flows","Feature tree"],estimatedMinutes:22},{id:"visual-designer-refined",name:"Visual Designer (Refined)",emoji:"🎨✨",role:"Visual Design",description:"Production design tokens & components",phase:4,prerequisites:["Visual concepts from Phase 3"],estimatedMinutes:25},{id:"content-designer-refined",name:"Content Designer (Refined)",emoji:"✍️✨",role:"Content",description:"Refined copy & brand voice",phase:4,prerequisites:["Phase 3 content baseline"],estimatedMinutes:18},{id:"builder",name:"Builder",emoji:"⚙️",role:"Development",description:"Working application & code generation",phase:6,prerequisites:["Complete design spec","Approved stories"],estimatedMinutes:45},{id:"quality-assessor",name:"Quality Assessor",emoji:"✅",role:"QA",description:"Quality assessment & metrics",phase:7,prerequisites:["Built application","Test coverage"],estimatedMinutes:20}];function HR(t){return Ts.filter(a=>a.phase===t).sort((a,i)=>a.name.localeCompare(i.name))}function kR(){const t=new Set(Ts.map(a=>a.phase));return Array.from(t).sort((a,i)=>a-i)}function zR(t){return{2:"DISCOVER",3:"IDEATE",4:"DESIGN",5:"PLAN",6:"DELIVER",7:"MEASURE"}[t]||`PHASE ${t}`}function BR(t){return{2:"bg-emerald-50 text-emerald-700",3:"bg-cyan-50 text-cyan-700",4:"bg-yellow-50 text-yellow-700",5:"bg-purple-50 text-purple-700",6:"bg-rose-50 text-rose-700",7:"bg-blue-50 text-blue-700"}[t]||"bg-gray-50 text-gray-700"}function kb(t,a){const i=[],s=Ts.find(o=>o.id===t||o.id===t.replace("-refined",""));if(!s)return i;if(!a)return i.push({severity:"warning",message:"No project loaded. Agent will run with minimal context."}),i;if(s.prerequisites&&s.prerequisites.length>0){const o=s.prerequisites.join(" or ");i.push({severity:"info",message:`This agent works best with: ${o}. Continue anyway?`})}return s.phase>=4&&i.push({severity:"info",message:`${s.name} is typically used in Phase ${s.phase}. You can run it now for experimentation.`}),i}async function UR(t,a){const i=await fetch("/api/agents/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectSlug:t,agentId:a})});if(!i.ok){const s=await i.json().catch(()=>({error:"Failed to queue agent run."}));throw new Error(s.error||"Failed to queue agent run.")}return i.json()}async function ZR(t){const a=await fetch(`/api/agents/runs/${encodeURIComponent(t)}`);if(!a.ok){const i=await a.json().catch(()=>({error:"Failed to fetch agent run."}));throw new Error(i.error||"Failed to fetch agent run.")}return a.json()}async function PR(t){const a=await fetch(`/api/agents/runs/${encodeURIComponent(t)}/merge`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!a.ok){const i=await a.json().catch(()=>({error:"Failed to apply agent run."}));throw new Error(i.error||"Failed to apply agent run.")}}async function FR(t){const a=await fetch(`/api/agents/runs/${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok&&a.status!==204){const i=await a.json().catch(()=>({error:"Failed to discard agent run."}));throw new Error(i.error||"Failed to discard agent run.")}}function IR({isOpen:t,agentId:a,onApprove:i,onCancel:s}){const[o,c]=d.useState(!1),{slug:u}=ou(),h=Bt(v=>u?v.projects.find(E=>E.slug===u):null);if(!t)return null;const g=Ts.find(v=>v.id===a);if(!g)return null;const p=kb(a,h),b=()=>{o&&localStorage.setItem(`agent-warnings-ignored-${a}`,"true"),i()};return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50 rounded-lg",children:y.jsxs("div",{className:"bg-canvas rounded-lg shadow-lg max-w-md w-96 p-6 space-y-4",children:[y.jsxs("div",{className:"flex items-start gap-3",children:[y.jsx("span",{className:"text-3xl",children:g.emoji}),y.jsxs("div",{className:"flex-1",children:[y.jsx("h2",{className:"text-title-compact font-medium text-text-primary",children:g.name}),y.jsx("p",{className:"text-caption text-text-secondary mt-0.5",children:g.role})]})]}),y.jsx("div",{className:"bg-surface-secondary rounded p-4 space-y-3",children:p.map((v,E)=>y.jsxs("div",{className:"flex gap-3",children:[y.jsx("span",{className:"text-lg flex-shrink-0",children:v.severity==="warning"?"⚠️":"ℹ️"}),y.jsx("p",{className:"text-body-compact text-text-primary",children:v.message})]},E))}),y.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[y.jsx("input",{type:"checkbox",checked:o,onChange:v=>c(v.target.checked),className:"w-4 h-4 rounded border border-text-secondary"}),y.jsx("span",{className:"text-caption text-text-secondary",children:"Don't show this warning again"})]}),y.jsxs("div",{className:"flex gap-3 pt-2",children:[y.jsx("button",{onClick:s,className:"flex-1 px-4 py-2 rounded border border-text-secondary text-text-primary hover:bg-surface-secondary transition-colors text-label font-medium",children:"Cancel"}),y.jsx("button",{onClick:b,className:"flex-1 px-4 py-2 rounded bg-text-primary text-canvas hover:bg-text-secondary transition-colors text-label font-medium",children:"Continue"})]})]})})}function GR({isStreaming:t=!1}){const[a,i]=d.useState(!1),[s,o]=d.useState(null),[c,u]=d.useState(!1),h=d.useRef(null),{slug:g}=ou(),p=Bt(j=>g?j.projects.find(R=>R.slug===g):null),{startRun:b,failRun:v,syncRun:E}=aa();d.useEffect(()=>{function j(R){h.current&&!h.current.contains(R.target)&&i(!1)}if(a)return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[a]);const S=j=>{o(j),kb(j,p).length>0?u(!0):w(j)},w=async j=>{const R=Ts.find(L=>L.id===j);if(!(!R||!p))try{const L=await UR(p.slug,j);b(L.runId,j,R.name,p.slug),E(L.runId,{status:L.status,messages:L.messages,artefactSummary:L.artefactSummary,error:L.error??void 0}),i(!1)}catch(L){const B=`${j}-${Date.now()}`;b(B,j,R.name,p.slug),v(B,L instanceof Error?L.message:"Failed to start agent run."),i(!1)}},T=async()=>{s&&await w(s),u(!1)},M=()=>{u(!1),o(null)};return y.jsxs("div",{ref:h,className:"fixed bottom-6 right-6 z-40",children:[s&&y.jsx(IR,{isOpen:c,agentId:s,onApprove:T,onCancel:M}),y.jsxs("div",{className:"relative",children:[!a&&y.jsxs("button",{onClick:()=>i(!0),disabled:t,className:`flex items-center gap-2 px-4 py-2 rounded-full border-2 border-dashed transition-all ${t?"opacity-50 cursor-not-allowed border-text-tertiary":"border-text-secondary hover:border-text-primary bg-canvas hover:bg-surface-secondary"}`,title:t?"Cannot open Agent Lab while streaming":"Open Agent Lab",children:[y.jsx("span",{className:"text-lg",children:"🤖"}),y.jsxs("span",{className:"text-caption font-medium text-text-secondary",children:[Ts.length," agents"]})]}),a&&y.jsxs("div",{className:"absolute bottom-16 right-0 w-72 max-h-[600px] bg-canvas border-2 border-dashed border-text-secondary rounded-lg shadow-lg flex flex-col overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-text-tertiary bg-surface-primary",children:[y.jsx("h3",{className:"text-label font-medium",children:"Agent Lab"}),y.jsx("button",{onClick:()=>i(!1),className:"text-text-tertiary hover:text-text-primary transition-colors",title:"Close",children:"✕"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto",children:kR().map(j=>{const R=HR(j);return y.jsxs("div",{className:"px-2 py-3 first:pt-3",children:[y.jsx("div",{className:`px-3 py-1.5 rounded ${BR(j)} text-xs font-semibold uppercase tracking-wide mb-2`,children:zR(j)}),y.jsx("div",{className:"space-y-1",children:R.map(L=>y.jsx("button",{onClick:()=>S(L.id),disabled:t,className:`w-full text-left px-3 py-2 rounded transition-all group ${t?"opacity-50 cursor-not-allowed":"hover:bg-surface-secondary hover:shadow-sm"}`,children:y.jsxs("div",{className:"flex items-start justify-between",children:[y.jsxs("div",{className:"flex-1",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[y.jsx("span",{className:"text-base",children:L.emoji}),y.jsx("span",{className:"text-body-compact font-medium text-text-primary",children:L.name})]}),y.jsx("p",{className:"text-caption text-text-tertiary ml-6",children:L.description})]}),y.jsx("button",{onClick:B=>{B.stopPropagation(),S(L.id)},disabled:t,className:"ml-2 px-2 py-1 text-xs font-medium bg-surface-secondary hover:bg-surface-tertiary text-text-primary rounded transition-colors flex-shrink-0 disabled:opacity-50 disabled:cursor-not-allowed group-hover:bg-text-primary group-hover:text-canvas",title:`Run ${L.name}`,children:"▶"})]})},L.id))})]},j)})}),y.jsx("div",{className:"px-4 py-2 border-t border-text-tertiary bg-surface-primary text-xs text-text-tertiary",children:"Individual agent runs are isolated. Changes require explicit merge."})]})]})]})}function $R(){const t=aa(T=>T.activeRunId),a=aa(T=>T.isModalOpen),i=aa(T=>T.runs),s=aa(T=>T.setModalOpen),o=aa(T=>T.discardRun),c=aa(T=>T.syncRun),u=aa(T=>T.completeRun),h=aa(T=>T.failRun),g=d.useRef(null),p=t?i.get(t)??null:null,b=p==null?void 0:p.status,v=(p==null?void 0:p.messages.length)??0;if(d.useEffect(()=>{var T;!a||!p||(T=g.current)==null||T.scrollIntoView({behavior:"smooth"})},[a,p,v]),d.useEffect(()=>{if(!t||!b||b==="completed"||b==="failed")return;const T=window.setInterval(async()=>{try{const M=await ZR(t);c(t,{status:M.status,messages:M.messages,artefactSummary:M.artefactSummary,error:M.error??void 0}),M.status==="completed"&&u(t,M.artefactSummary),M.status==="failed"&&M.error&&h(t,M.error)}catch(M){h(t,M instanceof Error?M.message:"Failed to refresh run status.")}},700);return()=>window.clearInterval(T)},[t,u,h,b,c]),!a||!p)return null;const E=()=>{s(!1)},S=async()=>{try{await PR(p.runId),s(!1)}catch(T){h(p.runId,T instanceof Error?T.message:"Failed to apply run.")}},w=()=>{(async()=>{try{await FR(p.runId)}finally{o(p.runId),s(!1)}})()};return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 bg-black/20 z-50 pointer-events-none"}),y.jsxs("div",{className:"fixed right-0 top-0 bottom-0 w-1/2 bg-canvas border-l-2 border-text-tertiary z-50 flex flex-col overflow-hidden pointer-events-auto",children:[y.jsxs("div",{className:"px-6 py-4 border-b border-text-tertiary bg-surface-primary flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsxs("h2",{className:"text-title-compact font-medium text-text-primary flex items-center gap-2",children:[y.jsx("span",{className:"text-lg",children:"⚙️"}),p.agentName]}),y.jsxs("p",{className:"text-caption text-text-secondary mt-1",children:["Project: ",p.projectSlug," • Run ID: ",p.runId.split("-").pop()]})]}),y.jsx("button",{onClick:E,className:"text-text-tertiary hover:text-text-primary transition-colors text-lg",title:"Close modal",children:"✕"})]}),y.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:[p.messages.length===0&&p.status==="queued"&&y.jsx("p",{className:"text-body-standard text-text-tertiary text-center py-8",children:"Preparing agent..."}),p.messages.map(T=>y.jsx(Ob,{message:T},T.id)),p.status==="running"&&y.jsx("div",{className:"flex items-center gap-2 py-4",children:y.jsx("span",{className:"text-caption text-text-secondary",children:"Agent is thinking..."})}),p.status==="completed"&&y.jsxs("div",{className:"bg-surface-secondary rounded-lg p-4 mt-4",children:[y.jsxs("p",{className:"text-caption font-medium text-text-primary flex items-center gap-2",children:[y.jsx("span",{children:"✅"}),"Agent run completed"]}),p.artefactSummary&&y.jsxs("div",{className:"mt-3 text-caption text-text-secondary",children:[y.jsx("p",{className:"font-medium mb-1",children:"Generated:"}),y.jsx("ul",{className:"list-disc list-inside space-y-0.5",children:p.artefactSummary.map((T,M)=>y.jsx("li",{children:T},M))})]})]}),p.status==="failed"&&y.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mt-4",children:[y.jsxs("p",{className:"text-caption font-medium text-red-700 flex items-center gap-2",children:[y.jsx("span",{children:"❌"}),"Agent run failed"]}),p.error&&y.jsx("p",{className:"text-caption text-red-600 mt-2",children:p.error})]}),y.jsx("div",{ref:g})]}),y.jsxs("div",{className:"px-6 py-4 border-t border-text-tertiary bg-surface-primary flex gap-3",children:[y.jsx("button",{onClick:w,className:"flex-1 px-4 py-2 rounded border border-text-secondary text-text-primary hover:bg-surface-secondary transition-colors text-label font-medium",children:"Discard"}),y.jsx("button",{onClick:()=>{},className:"flex-1 px-4 py-2 rounded border border-text-secondary text-text-primary hover:bg-surface-secondary transition-colors text-label font-medium",children:"View Spec"}),y.jsx("button",{onClick:S,disabled:p.status!=="completed",className:"flex-1 px-4 py-2 rounded bg-text-primary text-canvas hover:bg-text-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors text-label font-medium",children:"Apply Changes"})]})]})]})}const Wy="dx.context.autoCompact",t0=8,qR=8;function YR(){var de,_e,be,De,Re,we,Fe,Oe,Qe,Je,Et;const{slug:t}=ou(),a=no(),i=Rt(k=>k.messages),s=Rt(k=>k.isStreaming),o=Rt(k=>k.clearStream),c=Rt(k=>k.appendMessage),u=Rt(k=>k.updateLastAgent),h=Rt(k=>k.updateArtifactProgress),g=Rt(k=>k.setStreaming),p=Rt(k=>k.setOnGateResolved),b=Rt(k=>k.setCurrentProjectSlug),v=Rt(k=>k.saveStreamToStorage),E=Rt(k=>k.loadStreamFromStorage),S=Yc(k=>k.saveProjectSession),w=Yc(k=>k.setCurrentProject),T=Bt(k=>k.selectProject),M=Bt(k=>k.openContextPanel),j=Bt(k=>k.updateProject),R=Bt(k=>k.projects.find(ge=>ge.slug===t)),L=Vn(k=>t?k.jobsByProject[t]??null:null),B=Vn(k=>k.resumeProjectJob),U=Vn(k=>k.markContextRefreshStarted),le=Vn(k=>k.markContextRefreshCompleted),ne=Vn(k=>k.markContextRefreshDeferred),_=Sr(k=>k.githubToken),ee=Sr(k=>k.copilotToken),ae=Sr(k=>k.copilotTokenExpiresAt),ie=Sr(k=>!!k.copilotToken&&k.copilotToken!==k.githubToken),Q=Ea(k=>k.model),pe=Ea(k=>k.discoveryStatus),fe=Ea(k=>k.setAvailableModels),ye=Ea(k=>k.setDiscoveryLoading),H=Ea(k=>k.setDiscoveryError),X=Ea(k=>k.resetAvailableModels),Y=H0(k=>k.addUsage),ue=H0(k=>k.reset),Se=$l(k=>k.upsertArtifacts),C=$l(k=>k.finalizeProjectArtifacts),[q,oe]=d.useState(!1),[me,xe]=d.useState(!1),[Ne,$]=d.useState(null),[ze,Le]=d.useState(null),[ut,he]=d.useState(null),[Nt,Ve]=d.useState(null),[$e,qt]=d.useState(null),[Yt,tn]=d.useState(()=>Date.now()),[Zn,Wa]=d.useState(()=>{try{return localStorage.getItem(Wy)!=="0"}catch{return!0}}),Kt=d.useRef(""),sa=d.useRef(!1),Ba=d.useRef(!1),_n=d.useRef(null),jt=d.useRef(null),Hn=d.useRef(0),bn=d.useRef(new Set),Dn=d.useRef(new Set),vn=d.useRef(null),En=d.useRef(0),Sn=d.useRef(R);d.useEffect(()=>{Sn.current=R},[R]);const Ca=d.useRef(Q);d.useEffect(()=>{Ca.current=Q},[Q]);const Mr=$e?Math.max(0,Math.ceil(($e-Yt)/1e3)):0,kn=Mr>0;d.useEffect(()=>{try{localStorage.setItem(Wy,Zn?"1":"0")}catch{}},[Zn]),d.useEffect(()=>{if(!$e)return;const k=window.setInterval(()=>{tn(Date.now())},1e3);return()=>window.clearInterval(k)},[$e]),d.useEffect(()=>{$e&&Date.now()>=$e&&qt(null)},[Yt,$e]);function rn(k){return k instanceof Error?/\(429\)|rate limit|too many requests/i.test(k.message):!1}const It=d.useCallback(async(k=!1)=>{if(!ee){X();return}ye();try{const ge=await ER(ee,{forceRefresh:k});if(ge.length===0){H("Copilot returned no models for this account.");return}fe(ge)}catch(ge){const Ce=ge instanceof Error?ge.message:"Copilot model discovery failed.";console.warn("[copilot-models]",Ce),H(Ce)}},[ee,X,fe,H,ye]);d.useEffect(()=>{let k=!1;return(async()=>k||await It(!1))(),()=>{k=!0}},[ee,ae,It]);const sn=ee&&_&&ee!==_?"Copilot session token":"GitHub fallback token";function er(k=20){return Rt.getState().messages.filter(ge=>ge.type==="user"||ge.type==="agent"||ge.type==="artifact-progress").slice(-k).map(ge=>({role:ge.type==="user"?"user":"assistant",content:ge.content??""}))}const Ra=d.useCallback((k="manual")=>{const Ce=Rt.getState().messages,Me=Ce.filter(He=>He.type==="user"||He.type==="agent");if(Me.length<=t0)return k==="manual"&&c({id:crypto.randomUUID(),type:"system",timestamp:Date.now(),content:"Context is already compact enough. No older turns were compressed."}),!1;const Ke=Me.length-t0;let ht=0,tt=-1,St=0;const re=[],Ae=[];for(const He of Ce){if(!(He.type==="user"||He.type==="agent")){Ae.push(He);continue}ht<Ke?(tt===-1&&(tt=Ae.length),St+=1,re.push(He)):Ae.push(He),ht+=1}const Pe=re.slice(-12).map(He=>{const We=He.type==="user"?"User":"Assistant",wt=(He.content??"").replace(/\s+/g," ").trim(),at=wt.length>140?`${wt.slice(0,140)}...`:wt;return`- ${We}: ${at}`}),nt={id:crypto.randomUUID(),type:"system",timestamp:Date.now(),content:[`Context compacted (${k}).`,`Compressed ${St} older turns and kept the latest ${t0}.`,"Recent compacted context snapshot:",...Pe].join(`
|
|
386
|
+
`)},Tt=tt===-1?0:tt;return Ae.splice(Tt,0,nt),Rt.setState({messages:Ae}),!0},[c]),la=d.useMemo(()=>{if(!R)return{requestBytes:0,budgetBytes:jc,ratio:0};const k=Jy(R),ge=i.filter(Me=>Me.type==="user"||Me.type==="agent").map(Me=>({role:Me.type==="user"?"user":"assistant",content:Me.content??""})),Ce=Ky([k,...ge,{role:"user",content:"(next prompt)"}],Ca.current);return{requestBytes:Ce,budgetBytes:jc,ratio:Ce/jc}},[i,R]);function Yn(k){const ge=Er(k),Ce=Dl(Kt.current,ge,k.slug,!1),Me=Dl(Kt.current,ge,k.slug,!0);if(Me.length>0&&Se(k.slug,Me),_n.current){const Ke=Ce.map(ht=>({id:ht.id,title:ht.title,status:ht.isStreaming?"generating":"done"}));h(_n.current,Ke)}}function Kn(k,ge,Ce){Kt.current+=k;const Me=Kt.current;if(Me.startsWith("## ")||Me.includes(`
|
|
387
|
+
## `)){if(!_n.current){const ht=Me.indexOf(`
|
|
388
|
+
## `),tt=ht>0?Me.slice(0,ht).trim():"",St=crypto.randomUUID();_n.current=St;const re=Er(Ce);Rt.setState(Ae=>({messages:Ae.messages.filter(Pe=>Pe.id!==ge&&!(Pe.type==="agent"&&!Pe.agentName))})),c({id:St,type:"artifact-progress",timestamp:Date.now(),phaseNumber:re.id,phaseName:re.name,phaseColor:re.color,artifactProgress:[],agentNote:tt||void 0}),sa.current=!0}Yn(Ce)}else sa.current?u(Kt.current):(Rt.setState(ht=>({messages:ht.messages.filter(tt=>tt.id!==ge)})),c({id:crypto.randomUUID(),type:"agent",timestamp:Date.now(),content:Kt.current}),sa.current=!0)}function oa(k,ge){Rt.setState(Ce=>({messages:Ce.messages.filter(Me=>Me.id!==ge)})),g(!1),c({id:crypto.randomUUID(),type:"system",timestamp:Date.now(),content:k instanceof Error?k.message:"Something went wrong. Please try again."})}function ln(k){if(!k||Ba.current)return;const ge=OR(Kt.current);if(!ge)return;Ba.current=!0;const Ce=CR(k.current_phase,ge.key),Me=Er(k);if(k.control_mode==="autonomous"){!Rt.getState().messages.some(tt=>tt.type==="agent")&&Kt.current&&c({id:crypto.randomUUID(),type:"agent",timestamp:Date.now(),content:Kt.current});const ht=ge.key==="type-selection"?"fast-track":void 0;O(ge.key,ht,k,ge.artefacts)}else c({id:crypto.randomUUID(),type:"gate",timestamp:Date.now(),gateKey:ge.key,gateSummary:ge.summary??void 0,gateStatus:"pending",summaryArtefacts:ge.artefacts,phaseNumber:Me.id,phaseName:Me.name,phaseColor:Me.color,gateVariant:(Ce==null?void 0:Ce.variant)??"standard",gateNextStep:Ce==null?void 0:Ce.nextStep})}const O=d.useCallback((k,ge,Ce,Me)=>{const Ke=Ce??Sn.current;if(!Ke)return;const ht=Me??Rt.getState().messages.filter(nt=>nt.type==="gate"&&nt.gateKey===k).flatMap(nt=>nt.summaryArtefacts??[]),tt=Er(Ke),St=LR(Ke,k);if(c({id:crypto.randomUUID(),type:"phase-summary",timestamp:Date.now(),phaseNumber:tt.id,phaseName:tt.name,phaseColor:tt.color,summaryArtefacts:ht}),St==="complete"){j(Ke.slug,{status:"complete"}),c({id:crypto.randomUUID(),type:"system",timestamp:Date.now(),content:"Project complete. All phases finished."});return}const re=St;re&&re.id!==tt.id&&(j(Ke.slug,{current_phase:re.id}),c({id:crypto.randomUUID(),type:"phase-transition",timestamp:Date.now()+1,phaseNumber:re.id,phaseName:re.name,phaseColor:re.color,direction:"entering"}));const Ae=VR(k,ge),Pe=re&&re.id!==tt.id?{...Ke,current_phase:re.id}:Ke;J(Pe,Ae,!0)},[]);async function J(k,ge,Ce=!1,Me){var Tt,He;Kt.current="",sa.current=!1,Ba.current=!1,_n.current=null,vn.current=null,jt.current=new AbortController,Ce||(En.current=0);const Ke=crypto.randomUUID();c({id:Ke,type:"thinking",timestamp:Date.now(),thinkingText:Ce?"Continuing…":"Processing…",thinkingProgress:15}),g(!0),tn(Date.now());let ht="",tt=null,St=0;const re=150,Ae=()=>{if(!ht)return;const We=ht;ht="",St=Date.now(),Kn(We,Ke,k)},Pe=()=>{tt!==null&&(window.clearTimeout(tt),tt=null)},nt=()=>{if(tt!==null)return;const We=ht.includes(`
|
|
389
|
+
`),wt=Date.now()-St,at=We?0:Math.max(0,re-wt);tt=window.setTimeout(()=>{tt=null,Ae()},at)};try{const We=await lg(),wt=Jy(k),at=20;let ot=(Me==null?void 0:Me.includeHistory)===!1?[]:er(at);if((Me==null?void 0:Me.includeHistory)!==!1){const on=Ky([wt,...ot,{role:"user",content:ge}],Ca.current);Zn&&on>jc&&Ra("auto")&&(ot=er(at))}const ca=Ca.current,ua=Er(k),tr=ua.id===6||ua.id===7?16e3:4096;await xR([wt,...ot,{role:"user",content:ge}],We,on=>{ht+=on,tt!==null&&ht.includes(`
|
|
390
|
+
`)&&Pe(),nt()},()=>{var on;if(Pe(),Ae(),jt.current=null,g(!1),Yn(k),C(k.slug),_n.current){const Ua=Er(k),Qt=Dl(Kt.current,Ua,k.slug,!1),Na=Dl(Kt.current,Ua,k.slug,!0);h(_n.current,Qt.map(Gt=>({id:Gt.id,title:Gt.title,status:"done"})));const wn=_n.current,Tr=Qt.length>0?`[${Ua.name} build — generated ${Qt.length} artifact(s):
|
|
391
|
+
${Qt.map(Gt=>`- ${Gt.title}`).join(`
|
|
392
|
+
`)}]`:`[${Ua.name} build batch complete]`;Rt.setState(Gt=>({messages:Gt.messages.map(Cr=>Cr.id===wn?{...Cr,content:Tr}:Cr)})),Na.length>0&&Se(k.slug,Na)}ln(k),(on=Me==null?void 0:Me.onComplete)==null||on.call(Me)},ca,on=>Y(on.prompt_tokens,on.completion_tokens,ca),jt.current.signal,()=>lg(!0),tr,()=>{if(!_n.current||Ba.current)return;const on=Er(k),Qt=Dl(Kt.current,on,k.slug,!1).map(wn=>wn.title),Na=Qt.length>0?`
|
|
393
|
+
|
|
394
|
+
Already completed:
|
|
395
|
+
${Qt.map(wn=>`- ${wn}`).join(`
|
|
396
|
+
`)}`:"";if(En.current<qR){En.current+=1;const wn=`Continue generating the remaining ${on.name} phase artifacts from where you left off.${Na}
|
|
397
|
+
|
|
398
|
+
Pick up with the next artifact. When ALL artifacts for this phase are complete, output:
|
|
399
|
+
## R3 — Build Review`;J(k,wn,!0)}else{const wn=`You have generated all the artifacts for the ${on.name} phase.${Na}
|
|
400
|
+
|
|
401
|
+
Please now output the build review gate to complete the phase:
|
|
402
|
+
|
|
403
|
+
## R3 — Build Review
|
|
404
|
+
|
|
405
|
+
Summarise what was built, what was deferred, and any known issues.`;J(k,wn,!0)}})}catch(We){if(Pe(),Ae(),jt.current=null,We instanceof DOMException&&We.name==="AbortError"){Rt.setState(wt=>({messages:wt.messages.filter(at=>at.id!==Ke)})),g(!1),c({id:crypto.randomUUID(),type:"system",timestamp:Date.now(),content:"Run paused. Add instructions when ready, then continue from the current project state."}),(Tt=Me==null?void 0:Me.onAbort)==null||Tt.call(Me);return}rn(We)&&(vn.current=()=>{J(k,ge,Ce,Me)},qt(Date.now()+2e4)),(He=Me==null?void 0:Me.onError)==null||He.call(Me),oa(We,Ke)}}d.useEffect(()=>{const k=i.filter(ge=>ge.type==="phase-summary"||ge.type==="gate").flatMap(ge=>ge.summaryArtefacts??[]).filter((ge,Ce,Me)=>Me.indexOf(ge)===Ce).length;k>0&&Hn.current===0&&M("artefacts"),Hn.current=k},[i,M]),d.useEffect(()=>{t&&B(t)},[B,t]),d.useEffect(()=>{if(!t||(T(t),b(t),w(t),ue(),!R))return;if(R.status==="onboarding"){a(`/setup/${t}`,{replace:!0});return}E(t)||o()},[t,a]),d.useEffect(()=>{if(!t||!R||!ie||i.length>0||R.status==="onboarding"||R.status==="complete"||L!=null&&L.contextRefreshPending&&L.autoApplyToContext||bn.current.has(t)||Rt.getState().isStreaming)return;bn.current.add(t);const k="Proceed with the current phase and produce the next best output based on the project context.";c({id:crypto.randomUUID(),type:"user",timestamp:Date.now(),content:"Proceed with the current phase."}),J(R,k,!0)},[c,ie,s,L,i.length,R,t]),d.useEffect(()=>{const k=()=>{t&&(v(t),S(t,{messages:Rt.getState().messages,isStreaming:Rt.getState().isStreaming,activeGateKey:Rt.getState().activeGateKey,inputDraft:Rt.getState().inputDraft,currentPhaseNumber:(R==null?void 0:R.current_phase)??0}))};return window.addEventListener("beforeunload",k),()=>{window.removeEventListener("beforeunload",k),k()}},[t,R,v,S]),d.useEffect(()=>{t&&(v(t),S(t,{messages:i,isStreaming:s,activeGateKey:Rt.getState().activeGateKey,inputDraft:Rt.getState().inputDraft,currentPhaseNumber:(R==null?void 0:R.current_phase)??0}))},[t,i,s,R,S,v]),d.useEffect(()=>(p((k,ge,Ce)=>{ge==="approved"&&O(k,Ce)}),()=>p(null)),[O,p]),d.useEffect(()=>{if(!R||!L||L.status!=="ready"||!L.contextRefreshPending||!L.autoApplyToContext||!ie||R.kb_files.length===0||Dn.current.has(R.slug)||Rt.getState().isStreaming)return;const k=["Refresh the project context from the currently attached knowledge base files.","Rebuild the knowledge base extraction ledger, note any additions or removals reflected by the current file list, and use that refreshed context for subsequent work.","Current project selections:",`- Project name: ${R.name}`,`- Domain: ${R.domain}`,`- Product nature: ${R.nature}`,`- Application type: ${R.application_type}`,`- Preset: ${R.preset}`,`- Control mode: ${R.control_mode}`,`- Current phase: ${R.current_phase}`].join(`
|
|
406
|
+
`);Dn.current.add(R.slug),U(R.slug),M("kb"),c({id:crypto.randomUUID(),type:"user",timestamp:Date.now(),content:"Apply the prepared KB package to the active project context."}),J(R,k,!0,{onComplete:()=>{Dn.current.delete(R.slug),le(R.slug)},onAbort:()=>{Dn.current.delete(R.slug),ne(R.slug,"KB package is ready, but project-context refresh was paused.")},onError:()=>{Dn.current.delete(R.slug),ne(R.slug,"KB package is ready, but project-context refresh failed.")},includeHistory:!1})},[c,ie,s,L,le,ne,U,M,R]);async function Ee(k){R&&(c({id:crypto.randomUUID(),type:"user",timestamp:Date.now(),content:k}),await J(R,k))}async function qe(){if(!(!ee||me)){oe(!0),xe(!0),$(null);try{const k={Authorization:`Bearer ${ee}`},[ge,Ce,Me]=await Promise.all([fetch(`/api/copilot/models/debug?ts=${Date.now()}`,{cache:"no-store",headers:k}),fetch(`/api/copilot/models/compare-integration?ts=${Date.now()}`,{cache:"no-store",headers:k}),fetch(`/api/copilot/telemetry?ts=${Date.now()}`,{cache:"no-store"})]),Ke=await ge.json().catch(()=>({}));if(!ge.ok)throw new Error(Ke.error??`Models debug request failed (${ge.status}).`);Le(Ke);const ht=await Ce.json().catch(()=>({}));if(!Ce.ok)throw new Error(ht.error??`Compare integration request failed (${Ce.status}).`);he(ht);const tt=await Me.json().catch(()=>({}));Me.ok&&Ve(tt)}catch(k){Le(null),he(null),Ve(null),$(k instanceof Error?k.message:"Unable to load models debug data.")}finally{xe(!1)}}}function xt(){oe(!1),$(null),Le(null),he(null),Ve(null)}function bt(){var k;(k=jt.current)==null||k.abort()}const je=(R==null?void 0:R.kb_files.length)??0,Te=je===0?"Knowledge Base":`Knowledge Base · ${je} file${je===1?"":"s"}`,Ie=la.budgetBytes>0?la.requestBytes/la.budgetBytes:0,N=Ie>=1?"critical":Ie>=.8?"warn":"safe",V=N==="critical"?"border-red-300 text-red-700":N==="warn"?"border-amber-300 text-amber-700":"border-emerald-300 text-emerald-700",P=`${Math.min(100,Math.round(Ie*100))}%`,ce=k=>k>=1024*1024?`${(k/(1024*1024)).toFixed(2)} MB`:k>=1024?`${(k/1024).toFixed(1)} KB`:`${k} B`;return y.jsxs(y.Fragment,{children:[y.jsx(WC,{messages:i}),ie?y.jsxs("div",{className:"flex-shrink-0",children:[y.jsxs("div",{className:"mx-auto max-w-[720px] px-4 flex items-center justify-between pt-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(cR,{}),y.jsx(Va,{variant:"ghost",size:"sm",onClick:qe,disabled:me,children:me?"Loading Debug…":"Models Debug"}),y.jsx(Va,{variant:"ghost",size:"sm",onClick:()=>{It(!0)},disabled:pe==="loading",children:pe==="loading"?"Refreshing Models…":"Refresh Models"}),y.jsxs("button",{type:"button",onClick:()=>M("kb"),"aria-label":Te,title:Te,className:"inline-flex items-center gap-1.5 rounded-card border border-border px-3 py-1.5 text-small font-medium text-text-secondary transition-all duration-100 hover:-translate-y-0.5 hover:text-text-primary hover:shadow-hover-subtle",children:[y.jsx($c,{size:14,"aria-hidden":"true"}),y.jsx("span",{className:"truncate max-w-[220px]",children:Te})]}),s&&y.jsx(Va,{variant:"secondary",size:"sm",onClick:bt,children:"Stop & Add Instructions"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("span",{className:"rounded-card border border-border px-2 py-1 text-xs text-text-secondary",children:["Auth: ",sn]}),y.jsx(sR,{})]})]}),q&&y.jsx("div",{className:"mx-auto mt-2 max-w-[720px] px-4",children:y.jsxs("div",{className:"rounded-card border border-border bg-card p-3 text-small text-text-secondary",children:[y.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[y.jsx("p",{className:"font-medium text-text-primary",children:"Temporary Copilot Models Debug"}),y.jsx(Va,{variant:"ghost",size:"sm",onClick:xt,children:"Hide"})]}),Ne&&y.jsx("p",{className:"rounded-card border border-border bg-background px-2 py-1 text-text-primary",children:Ne}),!Ne&&ze&&y.jsxs("div",{className:"space-y-2",children:[y.jsxs("p",{children:["Upstream status: ",y.jsx("span",{className:"font-medium text-text-primary",children:((de=ze.upstream)==null?void 0:de.status)??"n/a"})]}),y.jsxs("p",{children:["Models: ",y.jsx("span",{className:"font-medium text-text-primary",children:((_e=ze.policy)==null?void 0:_e.modelCount)??0})," | Picker disabled:"," ",y.jsx("span",{className:"font-medium text-text-primary",children:((be=ze.policy)==null?void 0:be.disabledInPickerCount)??0})," | Preview:"," ",y.jsx("span",{className:"font-medium text-text-primary",children:((De=ze.policy)==null?void 0:De.previewCount)??0})]}),y.jsxs("p",{children:["Vendors:"," ",y.jsx("span",{className:"font-medium text-text-primary",children:Object.entries(((Re=ze.policy)==null?void 0:Re.vendorCounts)??{}).map(([k,ge])=>`${k}: ${ge}`).join(" | ")||"n/a"})]}),y.jsxs("details",{children:[y.jsx("summary",{className:"cursor-pointer text-text-primary",children:"Upstream response headers"}),y.jsx("pre",{className:"mt-2 overflow-auto rounded-card border border-border bg-background p-2 text-xs text-text-primary",children:JSON.stringify(((we=ze.upstream)==null?void 0:we.headers)??{},null,2)})]}),y.jsxs("details",{children:[y.jsx("summary",{className:"cursor-pointer text-text-primary",children:"Per-model policy snapshot"}),y.jsx("pre",{className:"mt-2 overflow-auto rounded-card border border-border bg-background p-2 text-xs text-text-primary",children:JSON.stringify(((Fe=ze.policy)==null?void 0:Fe.models)??[],null,2)})]}),ut&&y.jsxs("details",{children:[y.jsx("summary",{className:"cursor-pointer text-text-primary",children:"Integration comparison (Anthropic visibility)"}),y.jsxs("div",{className:"mt-2 space-y-2 text-xs text-text-primary",children:[y.jsxs("p",{children:["With integration: ",((Oe=ut.withIntegration)==null?void 0:Oe.total)??0," models | vendors:"," ",Object.entries(((Qe=ut.withIntegration)==null?void 0:Qe.vendorCounts)??{}).map(([k,ge])=>`${k}:${ge}`).join(" | ")||"n/a"]}),y.jsxs("p",{children:["Without integration: ",((Je=ut.withoutIntegration)==null?void 0:Je.total)??0," models | vendors:"," ",Object.entries(((Et=ut.withoutIntegration)==null?void 0:Et.vendorCounts)??{}).map(([k,ge])=>`${k}:${ge}`).join(" | ")||"n/a"]}),y.jsx("pre",{className:"overflow-auto rounded-card border border-border bg-background p-2 text-xs text-text-primary",children:JSON.stringify({onlyWithIntegration:ut.onlyWithIntegration??[],onlyWithoutIntegration:ut.onlyWithoutIntegration??[]},null,2)})]})]}),Nt&&y.jsxs("details",{children:[y.jsx("summary",{className:"cursor-pointer text-text-primary",children:"Copilot telemetry counters"}),y.jsx("pre",{className:"mt-2 overflow-auto rounded-card border border-border bg-background p-2 text-xs text-text-primary",children:JSON.stringify(Nt,null,2)})]})]})]})}),$e&&y.jsx("div",{className:"mx-auto mt-2 max-w-[720px] px-4",children:y.jsxs("div",{className:"rounded-card border border-border bg-card px-3 py-2 text-small text-text-secondary flex items-center justify-between gap-3",children:[y.jsxs("span",{children:["Copilot is rate-limited. ",kn?`Retry available in ${Mr}s.`:"You can retry now."]}),y.jsx(Va,{variant:"secondary",size:"sm",disabled:kn||!vn.current||s,onClick:()=>{var k;qt(null),(k=vn.current)==null||k.call(vn)},children:"Retry"})]})}),y.jsx("div",{className:"mx-auto mt-2 max-w-[720px] px-4",children:y.jsxs("div",{className:"rounded-card border border-border bg-card px-3 py-2",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"text-small font-medium text-text-primary",children:"Context Tracker"}),y.jsxs("p",{className:"text-xs text-text-secondary",children:["Estimated request size ",ce(la.requestBytes)," / ",ce(la.budgetBytes)]})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`rounded-card border px-2 py-0.5 text-xs font-medium ${V}`,children:N.toUpperCase()}),y.jsx(Va,{variant:"secondary",size:"sm",disabled:s,onClick:()=>{Ra("manual")},children:"Compact now"}),y.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-text-secondary",children:[y.jsx("input",{type:"checkbox",checked:Zn,onChange:k=>Wa(k.target.checked),className:"h-3.5 w-3.5 rounded border-border"}),"Auto compact"]})]})]}),y.jsx("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-background",children:y.jsx("div",{className:`h-full ${N==="critical"?"bg-red-500":N==="warn"?"bg-amber-500":"bg-emerald-500"}`,style:{width:P}})})]})}),y.jsx(eR,{onSubmit:Ee,disabled:s||kn})]}):y.jsx(nR,{}),y.jsx(GR,{isStreaming:s}),y.jsx($R,{})]})}function KR(){return y.jsx(dC,{children:y.jsx(z5,{})})}const XR=cE([{element:y.jsx(KR,{}),children:[{path:"/",element:y.jsx(bC,{})},{path:"/setup",element:y.jsx(By,{})},{path:"/setup/:slug",element:y.jsx(By,{})},{path:"/project/:slug",element:y.jsx(YR,{})}]}]),QR=600*1e3;function JR(){const[t,a]=d.useState(null),[i,s]=d.useState(!1),[o,c]=d.useState(!1),u=d.useRef(null);async function h(){try{const p=await fetch("/api/update-available");if(!p.ok)return;const b=await p.json();b.available&&b.latest&&b.current&&a({available:!0,latest:b.latest,current:b.current})}catch{}}if(d.useEffect(()=>{const p=setTimeout(()=>void h(),5e3);return u.current=setInterval(()=>void h(),QR),()=>{clearTimeout(p),u.current&&clearInterval(u.current)}},[]),!t||i)return null;async function g(){c(!0);try{await fetch("/api/relaunch",{method:"POST"}),setTimeout(()=>window.location.reload(),2e3)}catch{c(!1)}}return y.jsxs("div",{role:"status","aria-live":"polite",className:"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-3 px-4 py-3 rounded-card border border-lemon-500 bg-lemon-800 text-text-primary shadow-lg",children:[y.jsx(aS,{size:14,className:"text-lemon-400 flex-shrink-0","aria-hidden":"true"}),y.jsxs("p",{className:"text-small",children:[y.jsxs("span",{className:"font-medium",children:["DesignX ",t.latest," is available"]}),y.jsxs("span",{className:"text-text-secondary",children:[" — you are on ",t.current]})]}),y.jsx("button",{type:"button",onClick:()=>void g(),disabled:o,className:"ml-1 px-2.5 py-1 rounded-card bg-lemon-500 text-lemon-800 text-small font-medium hover:bg-lemon-400 transition-colors disabled:opacity-60",children:o?"Relaunching…":"Relaunch to update"}),y.jsx("button",{type:"button","aria-label":"Dismiss update notification",onClick:()=>s(!0),className:"ml-1 text-text-tertiary hover:text-text-primary transition-colors",children:y.jsx(W0,{size:12,"aria-hidden":"true"})})]})}function WR(){const t=d.useRef(!1);d.useEffect(()=>{t.current||(t.current=!0,(async()=>{const a=await RS();if(a.length===0)return;const i=Bt.getState().projects,s=[...a,...i.filter(u=>!a.find(h=>h.slug===u.slug))],o=a.map(u=>u.slug).sort().join(),c=i.map(u=>u.slug).sort().join();if(o!==c){Bt.setState({projects:s});try{localStorage.setItem("enigma_projects",JSON.stringify(s))}catch{}}})())},[])}function eN(){return WR(),y.jsxs(y.Fragment,{children:[y.jsx(SE,{router:XR}),y.jsx(JR,{})]})}Xx.createRoot(document.getElementById("root")).render(y.jsx(d.StrictMode,{children:y.jsx(eN,{})}));export{aC as a,W0 as b,xS as c,tN as d,e4 as e,nN as g,y as j,sS as n,vt as p,d as r,Gl as s};
|