@venturewild/workspace 0.4.0 → 0.4.1
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.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var _s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Lh={exports:{}},pl={},Fh={exports:{}},_e={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 Aa=Symbol.for("react.element"),Qx=Symbol.for("react.portal"),Jx=Symbol.for("react.fragment"),Zx=Symbol.for("react.strict_mode"),ev=Symbol.for("react.profiler"),tv=Symbol.for("react.provider"),nv=Symbol.for("react.context"),rv=Symbol.for("react.forward_ref"),iv=Symbol.for("react.suspense"),av=Symbol.for("react.memo"),sv=Symbol.for("react.lazy"),Md=Symbol.iterator;function lv(e){return e===null||typeof e!="object"?null:(e=Md&&e[Md]||e["@@iterator"],typeof e=="function"?e:null)}var Mh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$h=Object.assign,Bh={};function Ii(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Mh}Ii.prototype.isReactComponent={};Ii.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ii.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hh(){}Hh.prototype=Ii.prototype;function oc(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||Mh}var uc=oc.prototype=new Hh;uc.constructor=oc;$h(uc,Ii.prototype);uc.isPureReactComponent=!0;var $d=Array.isArray,Uh=Object.prototype.hasOwnProperty,cc={current:null},Wh={key:!0,ref:!0,__self:!0,__source:!0};function Vh(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)Uh.call(t,r)&&!Wh.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Aa,type:e,key:a,ref:s,props:i,_owner:cc.current}}function ov(e,t){return{$$typeof:Aa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Aa}function uv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Bd=/\/+/g;function ql(e,t){return typeof e=="object"&&e!==null&&e.key!=null?uv(""+e.key):t.toString(36)}function gs(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Aa:case Qx:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+ql(s,0):r,$d(i)?(n="",e!=null&&(n=e.replace(Bd,"$&/")+"/"),gs(i,t,n,"",function(c){return c})):i!=null&&(dc(i)&&(i=ov(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Bd,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",$d(e))for(var l=0;l<e.length;l++){a=e[l];var u=r+ql(a,l);s+=gs(a,t,n,u,i)}else if(u=lv(e),typeof u=="function")for(e=u.call(e),l=0;!(a=e.next()).done;)a=a.value,u=r+ql(a,l++),s+=gs(a,t,n,u,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Wa(e,t,n){if(e==null)return e;var r=[],i=0;return gs(e,r,"","",function(a){return t.call(n,a,i++)}),r}function cv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var $t={current:null},ys={transition:null},dv={ReactCurrentDispatcher:$t,ReactCurrentBatchConfig:ys,ReactCurrentOwner:cc};function qh(){throw Error("act(...) is not supported in production builds of React.")}_e.Children={map:Wa,forEach:function(e,t,n){Wa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wa(e,function(){t++}),t},toArray:function(e){return Wa(e,function(t){return t})||[]},only:function(e){if(!dc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_e.Component=Ii;_e.Fragment=Jx;_e.Profiler=ev;_e.PureComponent=oc;_e.StrictMode=Zx;_e.Suspense=iv;_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dv;_e.act=qh;_e.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$h({},e.props),i=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=cc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Uh.call(t,u)&&!Wh.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:Aa,type:e.type,key:i,ref:a,props:r,_owner:s}};_e.createContext=function(e){return e={$$typeof:nv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:tv,_context:e},e.Consumer=e};_e.createElement=Vh;_e.createFactory=function(e){var t=Vh.bind(null,e);return t.type=e,t};_e.createRef=function(){return{current:null}};_e.forwardRef=function(e){return{$$typeof:rv,render:e}};_e.isValidElement=dc;_e.lazy=function(e){return{$$typeof:sv,_payload:{_status:-1,_result:e},_init:cv}};_e.memo=function(e,t){return{$$typeof:av,type:e,compare:t===void 0?null:t}};_e.startTransition=function(e){var t=ys.transition;ys.transition={};try{e()}finally{ys.transition=t}};_e.unstable_act=qh;_e.useCallback=function(e,t){return $t.current.useCallback(e,t)};_e.useContext=function(e){return $t.current.useContext(e)};_e.useDebugValue=function(){};_e.useDeferredValue=function(e){return $t.current.useDeferredValue(e)};_e.useEffect=function(e,t){return $t.current.useEffect(e,t)};_e.useId=function(){return $t.current.useId()};_e.useImperativeHandle=function(e,t,n){return $t.current.useImperativeHandle(e,t,n)};_e.useInsertionEffect=function(e,t){return $t.current.useInsertionEffect(e,t)};_e.useLayoutEffect=function(e,t){return $t.current.useLayoutEffect(e,t)};_e.useMemo=function(e,t){return $t.current.useMemo(e,t)};_e.useReducer=function(e,t,n){return $t.current.useReducer(e,t,n)};_e.useRef=function(e){return $t.current.useRef(e)};_e.useState=function(e){return $t.current.useState(e)};_e.useSyncExternalStore=function(e,t,n){return $t.current.useSyncExternalStore(e,t,n)};_e.useTransition=function(){return $t.current.useTransition()};_e.version="18.3.1";Fh.exports=_e;var b=Fh.exports;const En=_a(b);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 fv=b,pv=Symbol.for("react.element"),hv=Symbol.for("react.fragment"),mv=Object.prototype.hasOwnProperty,gv=fv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yv={key:!0,ref:!0,__self:!0,__source:!0};function Gh(e,t,n){var r,i={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)mv.call(t,r)&&!yv.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pv,type:e,key:a,ref:s,props:i,_owner:gv.current}}pl.Fragment=hv;pl.jsx=Gh;pl.jsxs=Gh;Lh.exports=pl;var o=Lh.exports,Ko={},Yh={exports:{}},an={},Xh={exports:{}},Kh={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
*/(function(e){function t(I,Q){var N=I.length;I.push(Q);e:for(;0<N;){var te=N-1>>>1,le=I[te];if(0<i(le,Q))I[te]=Q,I[N]=le,N=te;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var Q=I[0],N=I.pop();if(N!==Q){I[0]=N;e:for(var te=0,le=I.length,E=le>>>1;te<E;){var pe=2*(te+1)-1,je=I[pe],se=pe+1,G=I[se];if(0>i(je,N))se<le&&0>i(G,je)?(I[te]=G,I[se]=N,te=se):(I[te]=je,I[pe]=N,te=pe);else if(se<le&&0>i(G,N))I[te]=G,I[se]=N,te=se;else break e}}return Q}function i(I,Q){var N=I.sortIndex-Q.sortIndex;return N!==0?N:I.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],c=[],f=1,d=null,p=3,h=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(I){for(var Q=n(c);Q!==null;){if(Q.callback===null)r(c);else if(Q.startTime<=I)r(c),Q.sortIndex=Q.expirationTime,t(u,Q);else break;Q=n(c)}}function j(I){if(v=!1,m(I),!g)if(n(u)!==null)g=!0,ie(k);else{var Q=n(c);Q!==null&&ce(j,Q.startTime-I)}}function k(I,Q){g=!1,v&&(v=!1,y(z),z=-1),h=!0;var N=p;try{for(m(Q),d=n(u);d!==null&&(!(d.expirationTime>Q)||I&&!M());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var le=te(d.expirationTime<=Q);Q=e.unstable_now(),typeof le=="function"?d.callback=le:d===n(u)&&r(u),m(Q)}else r(u);d=n(u)}if(d!==null)var E=!0;else{var pe=n(c);pe!==null&&ce(j,pe.startTime-Q),E=!1}return E}finally{d=null,p=N,h=!1}}var S=!1,T=null,z=-1,D=5,C=-1;function M(){return!(e.unstable_now()-C<D)}function H(){if(T!==null){var I=e.unstable_now();C=I;var Q=!0;try{Q=T(!0,I)}finally{Q?L():(S=!1,T=null)}}else S=!1}var L;if(typeof x=="function")L=function(){x(H)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,K=$.port2;$.port1.onmessage=H,L=function(){K.postMessage(null)}}else L=function(){w(H,0)};function ie(I){T=I,S||(S=!0,L())}function ce(I,Q){z=w(function(){I(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,ie(k))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(I){switch(p){case 1:case 2:case 3:var Q=3;break;default:Q=p}var N=p;p=Q;try{return I()}finally{p=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,Q){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var N=p;p=I;try{return Q()}finally{p=N}},e.unstable_scheduleCallback=function(I,Q,N){var te=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?te+N:te):N=te,I){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=N+le,I={id:f++,callback:Q,priorityLevel:I,startTime:N,expirationTime:le,sortIndex:-1},N>te?(I.sortIndex=N,t(c,I),n(u)===null&&I===n(c)&&(v?(y(z),z=-1):v=!0,ce(j,N-te))):(I.sortIndex=le,t(u,I),g||h||(g=!0,ie(k))),I},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(I){var Q=p;return function(){var N=p;p=Q;try{return I.apply(this,arguments)}finally{p=N}}}})(Kh);Xh.exports=Kh;var xv=Xh.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 vv=b,rn=xv;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qh=new Set,ha={};function qr(e,t){ji(e,t),ji(e+"Capture",t)}function ji(e,t){for(ha[e]=t,e=0;e<t.length;e++)Qh.add(t[e])}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qo=Object.prototype.hasOwnProperty,bv=/^[: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]*$/,Hd={},Ud={};function wv(e){return Qo.call(Ud,e)?!0:Qo.call(Hd,e)?!1:bv.test(e)?Ud[e]=!0:(Hd[e]=!0,!1)}function kv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Sv(e,t,n,r){if(t===null||typeof t>"u"||kv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bt(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new Bt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new Bt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new Bt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new Bt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Et[e]=new Bt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new Bt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new Bt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new Bt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new Bt(e,5,!1,e.toLowerCase(),null,!1,!1)});var fc=/[\-:]([a-z])/g;function pc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fc,pc);Et[t]=new Bt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fc,pc);Et[t]=new Bt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fc,pc);Et[t]=new Bt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new Bt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new Bt(e,1,!1,e.toLowerCase(),null,!0,!0)});function hc(e,t,n,r){var i=Et.hasOwnProperty(t)?Et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Sv(t,n,i,r)&&(n=null),r||i===null?wv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Kn=vv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Va=Symbol.for("react.element"),ni=Symbol.for("react.portal"),ri=Symbol.for("react.fragment"),mc=Symbol.for("react.strict_mode"),Jo=Symbol.for("react.profiler"),Jh=Symbol.for("react.provider"),Zh=Symbol.for("react.context"),gc=Symbol.for("react.forward_ref"),Zo=Symbol.for("react.suspense"),eu=Symbol.for("react.suspense_list"),yc=Symbol.for("react.memo"),nr=Symbol.for("react.lazy"),em=Symbol.for("react.offscreen"),Wd=Symbol.iterator;function Fi(e){return e===null||typeof e!="object"?null:(e=Wd&&e[Wd]||e["@@iterator"],typeof e=="function"?e:null)}var ut=Object.assign,Gl;function Ki(e){if(Gl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gl=t&&t[1]||""}return`
|
|
34
|
+
`+Gl+e}var Yl=!1;function Xl(e,t){if(!e||Yl)return"";Yl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
|
+
`),a=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,l=a.length-1;1<=s&&0<=l&&i[s]!==a[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==a[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==a[l]){var u=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{Yl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ki(e):""}function jv(e){switch(e.tag){case 5:return Ki(e.type);case 16:return Ki("Lazy");case 13:return Ki("Suspense");case 19:return Ki("SuspenseList");case 0:case 2:case 15:return e=Xl(e.type,!1),e;case 11:return e=Xl(e.type.render,!1),e;case 1:return e=Xl(e.type,!0),e;default:return""}}function tu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ri:return"Fragment";case ni:return"Portal";case Jo:return"Profiler";case mc:return"StrictMode";case Zo:return"Suspense";case eu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zh:return(e.displayName||"Context")+".Consumer";case Jh:return(e._context.displayName||"Context")+".Provider";case gc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yc:return t=e.displayName||null,t!==null?t:tu(e.type)||"Memo";case nr:t=e._payload,e=e._init;try{return tu(e(t))}catch{}}return null}function Nv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tu(t);case 8:return t===mc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ev(e){var t=tm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qa(e){e._valueTracker||(e._valueTracker=Ev(e))}function nm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function As(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}}function nu(e,t){var n=t.checked;return ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rm(e,t){t=t.checked,t!=null&&hc(e,"checked",t,!1)}function ru(e,t){rm(e,t);var n=gr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?iu(e,t.type,n):t.hasOwnProperty("defaultValue")&&iu(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function iu(e,t,n){(t!=="number"||As(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qi=Array.isArray;function mi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function au(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(Qi(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gr(n)}}function im(e,t){var n=gr(t.value),r=gr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Yd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function am(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function su(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?am(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ga,sm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ga=Ga||document.createElement("div"),Ga.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ga.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ma(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ta={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cv=["Webkit","ms","Moz","O"];Object.keys(ta).forEach(function(e){Cv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ta[t]=ta[e]})});function lm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ta.hasOwnProperty(e)&&ta[e]?(""+t).trim():t+"px"}function om(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=lm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Tv=ut({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lu(e,t){if(t){if(Tv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function ou(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 uu=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cu=null,gi=null,yi=null;function Xd(e){if(e=La(e)){if(typeof cu!="function")throw Error(W(280));var t=e.stateNode;t&&(t=xl(t),cu(e.stateNode,e.type,t))}}function um(e){gi?yi?yi.push(e):yi=[e]:gi=e}function cm(){if(gi){var e=gi,t=yi;if(yi=gi=null,Xd(e),t)for(e=0;e<t.length;e++)Xd(t[e])}}function dm(e,t){return e(t)}function fm(){}var Kl=!1;function pm(e,t,n){if(Kl)return e(t,n);Kl=!0;try{return dm(e,t,n)}finally{Kl=!1,(gi!==null||yi!==null)&&(fm(),cm())}}function ga(e,t){var n=e.stateNode;if(n===null)return null;var r=xl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var du=!1;if(qn)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){du=!0}}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{du=!1}function zv(e,t,n,r,i,a,s,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var na=!1,Ds=null,Os=!1,fu=null,Rv={onError:function(e){na=!0,Ds=e}};function Pv(e,t,n,r,i,a,s,l,u){na=!1,Ds=null,zv.apply(Rv,arguments)}function Iv(e,t,n,r,i,a,s,l,u){if(Pv.apply(this,arguments),na){if(na){var c=Ds;na=!1,Ds=null}else throw Error(W(198));Os||(Os=!0,fu=c)}}function Gr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function hm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Kd(e){if(Gr(e)!==e)throw Error(W(188))}function _v(e){var t=e.alternate;if(!t){if(t=Gr(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Kd(i),e;if(a===r)return Kd(i),t;a=a.sibling}throw Error(W(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function mm(e){return e=_v(e),e!==null?gm(e):null}function gm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gm(e);if(t!==null)return t;e=e.sibling}return null}var ym=rn.unstable_scheduleCallback,Qd=rn.unstable_cancelCallback,Av=rn.unstable_shouldYield,Dv=rn.unstable_requestPaint,ft=rn.unstable_now,Ov=rn.unstable_getCurrentPriorityLevel,vc=rn.unstable_ImmediatePriority,xm=rn.unstable_UserBlockingPriority,Ls=rn.unstable_NormalPriority,Lv=rn.unstable_LowPriority,vm=rn.unstable_IdlePriority,hl=null,An=null;function Fv(e){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(hl,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:Bv,Mv=Math.log,$v=Math.LN2;function Bv(e){return e>>>=0,e===0?32:31-(Mv(e)/$v|0)|0}var Ya=64,Xa=4194304;function Ji(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Ji(l):(a&=s,a!==0&&(r=Ji(a)))}else s=n&~i,s!==0?r=Ji(s):a!==0&&(r=Ji(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Sn(t),i=1<<n,r|=e[n],t&=~i;return r}function Hv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-Sn(a),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=Hv(l,t)):u<=t&&(e.expiredLanes|=l),a&=~l}}function pu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bm(){var e=Ya;return Ya<<=1,!(Ya&4194240)&&(Ya=64),e}function Ql(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Da(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sn(t),e[t]=n}function Wv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Sn(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function bc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var He=0;function wm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var km,wc,Sm,jm,Nm,hu=!1,Ka=[],or=null,ur=null,cr=null,ya=new Map,xa=new Map,ir=[],Vv="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 submit".split(" ");function Jd(e,t){switch(e){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":ur=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xa.delete(t.pointerId)}}function $i(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=La(t),t!==null&&wc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function qv(e,t,n,r,i){switch(t){case"focusin":return or=$i(or,e,t,n,r,i),!0;case"dragenter":return ur=$i(ur,e,t,n,r,i),!0;case"mouseover":return cr=$i(cr,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return ya.set(a,$i(ya.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,xa.set(a,$i(xa.get(a)||null,e,t,n,r,i)),!0}return!1}function Em(e){var t=Pr(e.target);if(t!==null){var n=Gr(t);if(n!==null){if(t=n.tag,t===13){if(t=hm(n),t!==null){e.blockedOn=t,Nm(e.priority,function(){Sm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);uu=r,n.target.dispatchEvent(r),uu=null}else return t=La(n),t!==null&&wc(t),e.blockedOn=n,!1;t.shift()}return!0}function Zd(e,t,n){xs(e)&&n.delete(t)}function Gv(){hu=!1,or!==null&&xs(or)&&(or=null),ur!==null&&xs(ur)&&(ur=null),cr!==null&&xs(cr)&&(cr=null),ya.forEach(Zd),xa.forEach(Zd)}function Bi(e,t){e.blockedOn===t&&(e.blockedOn=null,hu||(hu=!0,rn.unstable_scheduleCallback(rn.unstable_NormalPriority,Gv)))}function va(e){function t(i){return Bi(i,e)}if(0<Ka.length){Bi(Ka[0],e);for(var n=1;n<Ka.length;n++){var r=Ka[n];r.blockedOn===e&&(r.blockedOn=null)}}for(or!==null&&Bi(or,e),ur!==null&&Bi(ur,e),cr!==null&&Bi(cr,e),ya.forEach(t),xa.forEach(t),n=0;n<ir.length;n++)r=ir[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ir.length&&(n=ir[0],n.blockedOn===null);)Em(n),n.blockedOn===null&&ir.shift()}var xi=Kn.ReactCurrentBatchConfig,Ms=!0;function Yv(e,t,n,r){var i=He,a=xi.transition;xi.transition=null;try{He=1,kc(e,t,n,r)}finally{He=i,xi.transition=a}}function Xv(e,t,n,r){var i=He,a=xi.transition;xi.transition=null;try{He=4,kc(e,t,n,r)}finally{He=i,xi.transition=a}}function kc(e,t,n,r){if(Ms){var i=mu(e,t,n,r);if(i===null)lo(e,t,r,$s,n),Jd(e,r);else if(qv(i,e,t,n,r))r.stopPropagation();else if(Jd(e,r),t&4&&-1<Vv.indexOf(e)){for(;i!==null;){var a=La(i);if(a!==null&&km(a),a=mu(e,t,n,r),a===null&&lo(e,t,r,$s,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else lo(e,t,r,null,n)}}var $s=null;function mu(e,t,n,r){if($s=null,e=xc(r),e=Pr(e),e!==null)if(t=Gr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $s=e,null}function Cm(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ov()){case vc:return 1;case xm:return 4;case Ls:case Lv:return 16;case vm:return 536870912;default:return 16}default:return 16}}var sr=null,Sc=null,vs=null;function Tm(){if(vs)return vs;var e,t=Sc,n=t.length,r,i="value"in sr?sr.value:sr.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[a-r];r++);return vs=i.slice(e,1<r?1-r:void 0)}function bs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function ef(){return!1}function sn(e){function t(n,r,i,a,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Qa:ef,this.isPropagationStopped=ef,this}return ut(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var _i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jc=sn(_i),Oa=ut({},_i,{view:0,detail:0}),Kv=sn(Oa),Jl,Zl,Hi,ml=ut({},Oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nc,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!==Hi&&(Hi&&e.type==="mousemove"?(Jl=e.screenX-Hi.screenX,Zl=e.screenY-Hi.screenY):Zl=Jl=0,Hi=e),Jl)},movementY:function(e){return"movementY"in e?e.movementY:Zl}}),tf=sn(ml),Qv=ut({},ml,{dataTransfer:0}),Jv=sn(Qv),Zv=ut({},Oa,{relatedTarget:0}),eo=sn(Zv),eb=ut({},_i,{animationName:0,elapsedTime:0,pseudoElement:0}),tb=sn(eb),nb=ut({},_i,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rb=sn(nb),ib=ut({},_i,{data:0}),nf=sn(ib),ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sb={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"},lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ob(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lb[e])?!!t[e]:!1}function Nc(){return ob}var ub=ut({},Oa,{key:function(e){if(e.key){var t=ab[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nc,charCode:function(e){return e.type==="keypress"?bs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cb=sn(ub),db=ut({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rf=sn(db),fb=ut({},Oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nc}),pb=sn(fb),hb=ut({},_i,{propertyName:0,elapsedTime:0,pseudoElement:0}),mb=sn(hb),gb=ut({},ml,{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}),yb=sn(gb),xb=[9,13,27,32],Ec=qn&&"CompositionEvent"in window,ra=null;qn&&"documentMode"in document&&(ra=document.documentMode);var vb=qn&&"TextEvent"in window&&!ra,zm=qn&&(!Ec||ra&&8<ra&&11>=ra),af=" ",sf=!1;function Rm(e,t){switch(e){case"keyup":return xb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ii=!1;function bb(e,t){switch(e){case"compositionend":return Pm(t);case"keypress":return t.which!==32?null:(sf=!0,af);case"textInput":return e=t.data,e===af&&sf?null:e;default:return null}}function wb(e,t){if(ii)return e==="compositionend"||!Ec&&Rm(e,t)?(e=Tm(),vs=Sc=sr=null,ii=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zm&&t.locale!=="ko"?null:t.data;default:return null}}var kb={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 lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kb[e.type]:t==="textarea"}function Im(e,t,n,r){um(r),t=Bs(t,"onChange"),0<t.length&&(n=new jc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ia=null,ba=null;function Sb(e){Um(e,0)}function gl(e){var t=li(e);if(nm(t))return e}function jb(e,t){if(e==="change")return t}var _m=!1;if(qn){var to;if(qn){var no="oninput"in document;if(!no){var of=document.createElement("div");of.setAttribute("oninput","return;"),no=typeof of.oninput=="function"}to=no}else to=!1;_m=to&&(!document.documentMode||9<document.documentMode)}function uf(){ia&&(ia.detachEvent("onpropertychange",Am),ba=ia=null)}function Am(e){if(e.propertyName==="value"&&gl(ba)){var t=[];Im(t,ba,e,xc(e)),pm(Sb,t)}}function Nb(e,t,n){e==="focusin"?(uf(),ia=t,ba=n,ia.attachEvent("onpropertychange",Am)):e==="focusout"&&uf()}function Eb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gl(ba)}function Cb(e,t){if(e==="click")return gl(t)}function Tb(e,t){if(e==="input"||e==="change")return gl(t)}function zb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cn=typeof Object.is=="function"?Object.is:zb;function wa(e,t){if(Cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Qo.call(t,i)||!Cn(e[i],t[i]))return!1}return!0}function cf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var n=cf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cf(n)}}function Dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Om(){for(var e=window,t=As();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=As(e.document)}return t}function Cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Rb(e){var t=Om(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dm(n.ownerDocument.documentElement,n)){if(r!==null&&Cc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=df(n,a);var s=df(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Pb=qn&&"documentMode"in document&&11>=document.documentMode,ai=null,gu=null,aa=null,yu=!1;function ff(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yu||ai==null||ai!==As(r)||(r=ai,"selectionStart"in r&&Cc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),aa&&wa(aa,r)||(aa=r,r=Bs(gu,"onSelect"),0<r.length&&(t=new jc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ai)))}function Ja(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionend:Ja("Transition","TransitionEnd")},ro={},Lm={};qn&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function yl(e){if(ro[e])return ro[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lm)return ro[e]=t[n];return e}var Fm=yl("animationend"),Mm=yl("animationiteration"),$m=yl("animationstart"),Bm=yl("transitionend"),Hm=new Map,pf="abort auxClick 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(" ");function vr(e,t){Hm.set(e,t),qr(t,[e])}for(var io=0;io<pf.length;io++){var ao=pf[io],Ib=ao.toLowerCase(),_b=ao[0].toUpperCase()+ao.slice(1);vr(Ib,"on"+_b)}vr(Fm,"onAnimationEnd");vr(Mm,"onAnimationIteration");vr($m,"onAnimationStart");vr("dblclick","onDoubleClick");vr("focusin","onFocus");vr("focusout","onBlur");vr(Bm,"onTransitionEnd");ji("onMouseEnter",["mouseout","mouseover"]);ji("onMouseLeave",["mouseout","mouseover"]);ji("onPointerEnter",["pointerout","pointerover"]);ji("onPointerLeave",["pointerout","pointerover"]);qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zi="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(" "),Ab=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zi));function hf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Iv(r,t,void 0,e),e.currentTarget=null}function Um(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==a&&i.isPropagationStopped())break e;hf(i,l,c),a=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,c=l.currentTarget,l=l.listener,u!==a&&i.isPropagationStopped())break e;hf(i,l,c),a=u}}}if(Os)throw e=fu,Os=!1,fu=null,e}function Ke(e,t){var n=t[ku];n===void 0&&(n=t[ku]=new Set);var r=e+"__bubble";n.has(r)||(Wm(t,e,2,!1),n.add(r))}function so(e,t,n){var r=0;t&&(r|=4),Wm(n,e,r,t)}var Za="_reactListening"+Math.random().toString(36).slice(2);function ka(e){if(!e[Za]){e[Za]=!0,Qh.forEach(function(n){n!=="selectionchange"&&(Ab.has(n)||so(n,!1,e),so(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Za]||(t[Za]=!0,so("selectionchange",!1,t))}}function Wm(e,t,n,r){switch(Cm(t)){case 1:var i=Yv;break;case 4:i=Xv;break;default:i=kc}n=i.bind(null,t,n,e),i=void 0,!du||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function lo(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Pr(l),s===null)return;if(u=s.tag,u===5||u===6){r=a=s;continue e}l=l.parentNode}}r=r.return}pm(function(){var c=a,f=xc(n),d=[];e:{var p=Hm.get(e);if(p!==void 0){var h=jc,g=e;switch(e){case"keypress":if(bs(n)===0)break e;case"keydown":case"keyup":h=cb;break;case"focusin":g="focus",h=eo;break;case"focusout":g="blur",h=eo;break;case"beforeblur":case"afterblur":h=eo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=tf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=pb;break;case Fm:case Mm:case $m:h=tb;break;case Bm:h=mb;break;case"scroll":h=Kv;break;case"wheel":h=yb;break;case"copy":case"cut":case"paste":h=rb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=rf}var v=(t&4)!==0,w=!v&&e==="scroll",y=v?p!==null?p+"Capture":null:p;v=[];for(var x=c,m;x!==null;){m=x;var j=m.stateNode;if(m.tag===5&&j!==null&&(m=j,y!==null&&(j=ga(x,y),j!=null&&v.push(Sa(x,j,m)))),w)break;x=x.return}0<v.length&&(p=new h(p,g,null,n,f),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==uu&&(g=n.relatedTarget||n.fromElement)&&(Pr(g)||g[Gn]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=c,g=g?Pr(g):null,g!==null&&(w=Gr(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=c),h!==g)){if(v=tf,j="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=rf,j="onPointerLeave",y="onPointerEnter",x="pointer"),w=h==null?p:li(h),m=g==null?p:li(g),p=new v(j,x+"leave",h,n,f),p.target=w,p.relatedTarget=m,j=null,Pr(f)===c&&(v=new v(y,x+"enter",g,n,f),v.target=m,v.relatedTarget=w,j=v),w=j,h&&g)t:{for(v=h,y=g,x=0,m=v;m;m=Xr(m))x++;for(m=0,j=y;j;j=Xr(j))m++;for(;0<x-m;)v=Xr(v),x--;for(;0<m-x;)y=Xr(y),m--;for(;x--;){if(v===y||y!==null&&v===y.alternate)break t;v=Xr(v),y=Xr(y)}v=null}else v=null;h!==null&&mf(d,p,h,v,!1),g!==null&&w!==null&&mf(d,w,g,v,!0)}}e:{if(p=c?li(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var k=jb;else if(lf(p))if(_m)k=Tb;else{k=Eb;var S=Nb}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=Cb);if(k&&(k=k(e,c))){Im(d,k,n,f);break e}S&&S(e,p,c),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&iu(p,"number",p.value)}switch(S=c?li(c):window,e){case"focusin":(lf(S)||S.contentEditable==="true")&&(ai=S,gu=c,aa=null);break;case"focusout":aa=gu=ai=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,ff(d,n,f);break;case"selectionchange":if(Pb)break;case"keydown":case"keyup":ff(d,n,f)}var T;if(Ec)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else ii?Rm(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(zm&&n.locale!=="ko"&&(ii||z!=="onCompositionStart"?z==="onCompositionEnd"&&ii&&(T=Tm()):(sr=f,Sc="value"in sr?sr.value:sr.textContent,ii=!0)),S=Bs(c,z),0<S.length&&(z=new nf(z,e,null,n,f),d.push({event:z,listeners:S}),T?z.data=T:(T=Pm(n),T!==null&&(z.data=T)))),(T=vb?bb(e,n):wb(e,n))&&(c=Bs(c,"onBeforeInput"),0<c.length&&(f=new nf("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=T))}Um(d,t)})}function Sa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Bs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ga(e,n),a!=null&&r.unshift(Sa(e,a,i)),a=ga(e,t),a!=null&&r.push(Sa(e,a,i))),e=e.return}return r}function Xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mf(e,t,n,r,i){for(var a=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,i?(u=ga(n,a),u!=null&&s.unshift(Sa(n,u,l))):i||(u=ga(n,a),u!=null&&s.push(Sa(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Db=/\r\n?/g,Ob=/\u0000|\uFFFD/g;function gf(e){return(typeof e=="string"?e:""+e).replace(Db,`
|
|
38
|
+
`).replace(Ob,"")}function es(e,t,n){if(t=gf(t),gf(e)!==t&&n)throw Error(W(425))}function Hs(){}var xu=null,vu=null;function bu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=typeof setTimeout=="function"?setTimeout:void 0,Lb=typeof clearTimeout=="function"?clearTimeout:void 0,yf=typeof Promise=="function"?Promise:void 0,Fb=typeof queueMicrotask=="function"?queueMicrotask:typeof yf<"u"?function(e){return yf.resolve(null).then(e).catch(Mb)}:wu;function Mb(e){setTimeout(function(){throw e})}function oo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),va(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);va(t)}function dr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),_n="__reactFiber$"+Ai,ja="__reactProps$"+Ai,Gn="__reactContainer$"+Ai,ku="__reactEvents$"+Ai,$b="__reactListeners$"+Ai,Bb="__reactHandles$"+Ai;function Pr(e){var t=e[_n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gn]||n[_n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[_n])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function La(e){return e=e[_n]||e[Gn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function li(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function xl(e){return e[ja]||null}var Su=[],oi=-1;function br(e){return{current:e}}function Qe(e){0>oi||(e.current=Su[oi],Su[oi]=null,oi--)}function Ye(e,t){oi++,Su[oi]=e.current,e.current=t}var yr={},At=br(yr),Gt=br(!1),Fr=yr;function Ni(e,t){var n=e.type.contextTypes;if(!n)return yr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Yt(e){return e=e.childContextTypes,e!=null}function Us(){Qe(Gt),Qe(At)}function vf(e,t,n){if(At.current!==yr)throw Error(W(168));Ye(At,t),Ye(Gt,n)}function Vm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(W(108,Nv(e)||"Unknown",i));return ut({},n,r)}function Ws(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yr,Fr=At.current,Ye(At,e),Ye(Gt,Gt.current),!0}function bf(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=Vm(e,t,Fr),r.__reactInternalMemoizedMergedChildContext=e,Qe(Gt),Qe(At),Ye(At,e)):Qe(Gt),Ye(Gt,n)}var $n=null,vl=!1,uo=!1;function qm(e){$n===null?$n=[e]:$n.push(e)}function Hb(e){vl=!0,qm(e)}function wr(){if(!uo&&$n!==null){uo=!0;var e=0,t=He;try{var n=$n;for(He=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$n=null,vl=!1}catch(i){throw $n!==null&&($n=$n.slice(e+1)),ym(vc,wr),i}finally{He=t,uo=!1}}return null}var ui=[],ci=0,Vs=null,qs=0,un=[],cn=0,Mr=null,Hn=1,Un="";function Cr(e,t){ui[ci++]=qs,ui[ci++]=Vs,Vs=e,qs=t}function Gm(e,t,n){un[cn++]=Hn,un[cn++]=Un,un[cn++]=Mr,Mr=e;var r=Hn;e=Un;var i=32-Sn(r)-1;r&=~(1<<i),n+=1;var a=32-Sn(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Hn=1<<32-Sn(t)+i|n<<i|r,Un=a+e}else Hn=1<<a|n<<i|r,Un=e}function Tc(e){e.return!==null&&(Cr(e,1),Gm(e,1,0))}function zc(e){for(;e===Vs;)Vs=ui[--ci],ui[ci]=null,qs=ui[--ci],ui[ci]=null;for(;e===Mr;)Mr=un[--cn],un[cn]=null,Un=un[--cn],un[cn]=null,Hn=un[--cn],un[cn]=null}var tn=null,en=null,et=!1,kn=null;function Ym(e,t){var n=fn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function wf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,tn=e,en=dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tn=e,en=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Mr!==null?{id:Hn,overflow:Un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=fn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tn=e,en=null,!0):!1;default:return!1}}function ju(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Nu(e){if(et){var t=en;if(t){var n=t;if(!wf(e,t)){if(ju(e))throw Error(W(418));t=dr(n.nextSibling);var r=tn;t&&wf(e,t)?Ym(r,n):(e.flags=e.flags&-4097|2,et=!1,tn=e)}}else{if(ju(e))throw Error(W(418));e.flags=e.flags&-4097|2,et=!1,tn=e}}}function kf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function ts(e){if(e!==tn)return!1;if(!et)return kf(e),et=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=en)){if(ju(e))throw Xm(),Error(W(418));for(;t;)Ym(e,t),t=dr(t.nextSibling)}if(kf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){en=dr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}en=null}}else en=tn?dr(e.stateNode.nextSibling):null;return!0}function Xm(){for(var e=en;e;)e=dr(e.nextSibling)}function Ei(){en=tn=null,et=!1}function Rc(e){kn===null?kn=[e]:kn.push(e)}var Ub=Kn.ReactCurrentBatchConfig;function Ui(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(s){var l=i.refs;s===null?delete l[a]:l[a]=s},t._stringRef=a,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function ns(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sf(e){var t=e._init;return t(e._payload)}function Km(e){function t(y,x){if(e){var m=y.deletions;m===null?(y.deletions=[x],y.flags|=16):m.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=mr(y,x),y.index=0,y.sibling=null,y}function a(y,x,m){return y.index=m,e?(m=y.alternate,m!==null?(m=m.index,m<x?(y.flags|=2,x):m):(y.flags|=2,x)):(y.flags|=1048576,x)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,m,j){return x===null||x.tag!==6?(x=yo(m,y.mode,j),x.return=y,x):(x=i(x,m),x.return=y,x)}function u(y,x,m,j){var k=m.type;return k===ri?f(y,x,m.props.children,j,m.key):x!==null&&(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===nr&&Sf(k)===x.type)?(j=i(x,m.props),j.ref=Ui(y,x,m),j.return=y,j):(j=Cs(m.type,m.key,m.props,null,y.mode,j),j.ref=Ui(y,x,m),j.return=y,j)}function c(y,x,m,j){return x===null||x.tag!==4||x.stateNode.containerInfo!==m.containerInfo||x.stateNode.implementation!==m.implementation?(x=xo(m,y.mode,j),x.return=y,x):(x=i(x,m.children||[]),x.return=y,x)}function f(y,x,m,j,k){return x===null||x.tag!==7?(x=Or(m,y.mode,j,k),x.return=y,x):(x=i(x,m),x.return=y,x)}function d(y,x,m){if(typeof x=="string"&&x!==""||typeof x=="number")return x=yo(""+x,y.mode,m),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Va:return m=Cs(x.type,x.key,x.props,null,y.mode,m),m.ref=Ui(y,null,x),m.return=y,m;case ni:return x=xo(x,y.mode,m),x.return=y,x;case nr:var j=x._init;return d(y,j(x._payload),m)}if(Qi(x)||Fi(x))return x=Or(x,y.mode,m,null),x.return=y,x;ns(y,x)}return null}function p(y,x,m,j){var k=x!==null?x.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return k!==null?null:l(y,x,""+m,j);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Va:return m.key===k?u(y,x,m,j):null;case ni:return m.key===k?c(y,x,m,j):null;case nr:return k=m._init,p(y,x,k(m._payload),j)}if(Qi(m)||Fi(m))return k!==null?null:f(y,x,m,j,null);ns(y,m)}return null}function h(y,x,m,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return y=y.get(m)||null,l(x,y,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Va:return y=y.get(j.key===null?m:j.key)||null,u(x,y,j,k);case ni:return y=y.get(j.key===null?m:j.key)||null,c(x,y,j,k);case nr:var S=j._init;return h(y,x,m,S(j._payload),k)}if(Qi(j)||Fi(j))return y=y.get(m)||null,f(x,y,j,k,null);ns(x,j)}return null}function g(y,x,m,j){for(var k=null,S=null,T=x,z=x=0,D=null;T!==null&&z<m.length;z++){T.index>z?(D=T,T=null):D=T.sibling;var C=p(y,T,m[z],j);if(C===null){T===null&&(T=D);break}e&&T&&C.alternate===null&&t(y,T),x=a(C,x,z),S===null?k=C:S.sibling=C,S=C,T=D}if(z===m.length)return n(y,T),et&&Cr(y,z),k;if(T===null){for(;z<m.length;z++)T=d(y,m[z],j),T!==null&&(x=a(T,x,z),S===null?k=T:S.sibling=T,S=T);return et&&Cr(y,z),k}for(T=r(y,T);z<m.length;z++)D=h(T,y,z,m[z],j),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?z:D.key),x=a(D,x,z),S===null?k=D:S.sibling=D,S=D);return e&&T.forEach(function(M){return t(y,M)}),et&&Cr(y,z),k}function v(y,x,m,j){var k=Fi(m);if(typeof k!="function")throw Error(W(150));if(m=k.call(m),m==null)throw Error(W(151));for(var S=k=null,T=x,z=x=0,D=null,C=m.next();T!==null&&!C.done;z++,C=m.next()){T.index>z?(D=T,T=null):D=T.sibling;var M=p(y,T,C.value,j);if(M===null){T===null&&(T=D);break}e&&T&&M.alternate===null&&t(y,T),x=a(M,x,z),S===null?k=M:S.sibling=M,S=M,T=D}if(C.done)return n(y,T),et&&Cr(y,z),k;if(T===null){for(;!C.done;z++,C=m.next())C=d(y,C.value,j),C!==null&&(x=a(C,x,z),S===null?k=C:S.sibling=C,S=C);return et&&Cr(y,z),k}for(T=r(y,T);!C.done;z++,C=m.next())C=h(T,y,z,C.value,j),C!==null&&(e&&C.alternate!==null&&T.delete(C.key===null?z:C.key),x=a(C,x,z),S===null?k=C:S.sibling=C,S=C);return e&&T.forEach(function(H){return t(y,H)}),et&&Cr(y,z),k}function w(y,x,m,j){if(typeof m=="object"&&m!==null&&m.type===ri&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Va:e:{for(var k=m.key,S=x;S!==null;){if(S.key===k){if(k=m.type,k===ri){if(S.tag===7){n(y,S.sibling),x=i(S,m.props.children),x.return=y,y=x;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===nr&&Sf(k)===S.type){n(y,S.sibling),x=i(S,m.props),x.ref=Ui(y,S,m),x.return=y,y=x;break e}n(y,S);break}else t(y,S);S=S.sibling}m.type===ri?(x=Or(m.props.children,y.mode,j,m.key),x.return=y,y=x):(j=Cs(m.type,m.key,m.props,null,y.mode,j),j.ref=Ui(y,x,m),j.return=y,y=j)}return s(y);case ni:e:{for(S=m.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===m.containerInfo&&x.stateNode.implementation===m.implementation){n(y,x.sibling),x=i(x,m.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=xo(m,y.mode,j),x.return=y,y=x}return s(y);case nr:return S=m._init,w(y,x,S(m._payload),j)}if(Qi(m))return g(y,x,m,j);if(Fi(m))return v(y,x,m,j);ns(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,x!==null&&x.tag===6?(n(y,x.sibling),x=i(x,m),x.return=y,y=x):(n(y,x),x=yo(m,y.mode,j),x.return=y,y=x),s(y)):n(y,x)}return w}var Ci=Km(!0),Qm=Km(!1),Gs=br(null),Ys=null,di=null,Pc=null;function Ic(){Pc=di=Ys=null}function _c(e){var t=Gs.current;Qe(Gs),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vi(e,t){Ys=e,Pc=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qt=!0),e.firstContext=null)}function hn(e){var t=e._currentValue;if(Pc!==e)if(e={context:e,memoizedValue:t,next:null},di===null){if(Ys===null)throw Error(W(308));di=e,Ys.dependencies={lanes:0,firstContext:e}}else di=di.next=e;return t}var Ir=null;function Ac(e){Ir===null?Ir=[e]:Ir.push(e)}function Jm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ac(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yn(e,r)}function Yn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rr=!1;function Dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ac(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yn(e,n)}function ws(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bc(e,n)}}function jf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Xs(e,t,n,r){var i=e.updateQueue;rr=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,c=u.next;u.next=null,s===null?a=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=u))}if(a!==null){var d=i.baseState;s=0,f=c=u=null,l=a;do{var p=l.lane,h=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(p=t,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,p=typeof g=="function"?g.call(h,d,p):g,p==null)break e;d=ut({},d,p);break e;case 2:rr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else h={eventTime:h,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=h,u=d):f=f.next=h,s|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Br|=s,e.lanes=s,e.memoizedState=d}}function Nf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(W(191,i));i.call(r)}}}var Fa={},Dn=br(Fa),Na=br(Fa),Ea=br(Fa);function _r(e){if(e===Fa)throw Error(W(174));return e}function Oc(e,t){switch(Ye(Ea,t),Ye(Na,e),Ye(Dn,Fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:su(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=su(t,e)}Qe(Dn),Ye(Dn,t)}function Ti(){Qe(Dn),Qe(Na),Qe(Ea)}function eg(e){_r(Ea.current);var t=_r(Dn.current),n=su(t,e.type);t!==n&&(Ye(Na,e),Ye(Dn,n))}function Lc(e){Na.current===e&&(Qe(Dn),Qe(Na))}var lt=br(0);function Ks(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=[];function Fc(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var ks=Kn.ReactCurrentDispatcher,fo=Kn.ReactCurrentBatchConfig,$r=0,ot=null,xt=null,kt=null,Qs=!1,sa=!1,Ca=0,Wb=0;function zt(){throw Error(W(321))}function Mc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cn(e[n],t[n]))return!1;return!0}function $c(e,t,n,r,i,a){if($r=a,ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ks.current=e===null||e.memoizedState===null?Yb:Xb,e=n(r,i),sa){a=0;do{if(sa=!1,Ca=0,25<=a)throw Error(W(301));a+=1,kt=xt=null,t.updateQueue=null,ks.current=Kb,e=n(r,i)}while(sa)}if(ks.current=Js,t=xt!==null&&xt.next!==null,$r=0,kt=xt=ot=null,Qs=!1,t)throw Error(W(300));return e}function Bc(){var e=Ca!==0;return Ca=0,e}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?ot.memoizedState=kt=e:kt=kt.next=e,kt}function mn(){if(xt===null){var e=ot.alternate;e=e!==null?e.memoizedState:null}else e=xt.next;var t=kt===null?ot.memoizedState:kt.next;if(t!==null)kt=t,xt=e;else{if(e===null)throw Error(W(310));xt=e,e={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},kt===null?ot.memoizedState=kt=e:kt=kt.next=e}return kt}function Ta(e,t){return typeof t=="function"?t(e):t}function po(e){var t=mn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=xt,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var l=s=null,u=null,c=a;do{var f=c.lane;if(($r&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=d,s=r):u=u.next=d,ot.lanes|=f,Br|=f}c=c.next}while(c!==null&&c!==a);u===null?s=r:u.next=l,Cn(r,t.memoizedState)||(qt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,ot.lanes|=a,Br|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ho(e){var t=mn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Cn(a,t.memoizedState)||(qt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function tg(){}function ng(e,t){var n=ot,r=mn(),i=t(),a=!Cn(r.memoizedState,i);if(a&&(r.memoizedState=i,qt=!0),r=r.queue,Hc(ag.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||kt!==null&&kt.memoizedState.tag&1){if(n.flags|=2048,za(9,ig.bind(null,n,r,i,t),void 0,null),St===null)throw Error(W(349));$r&30||rg(n,t,i)}return i}function rg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ot.updateQueue,t===null?(t={lastEffect:null,stores:null},ot.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ig(e,t,n,r){t.value=n,t.getSnapshot=r,sg(t)&&lg(e)}function ag(e,t,n){return n(function(){sg(t)&&lg(e)})}function sg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cn(e,n)}catch{return!0}}function lg(e){var t=Yn(e,1);t!==null&&jn(t,e,1,-1)}function Ef(e){var t=zn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=Gb.bind(null,ot,e),[t.memoizedState,e]}function za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ot.updateQueue,t===null?(t={lastEffect:null,stores:null},ot.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function og(){return mn().memoizedState}function Ss(e,t,n,r){var i=zn();ot.flags|=e,i.memoizedState=za(1|t,n,void 0,r===void 0?null:r)}function bl(e,t,n,r){var i=mn();r=r===void 0?null:r;var a=void 0;if(xt!==null){var s=xt.memoizedState;if(a=s.destroy,r!==null&&Mc(r,s.deps)){i.memoizedState=za(t,n,a,r);return}}ot.flags|=e,i.memoizedState=za(1|t,n,a,r)}function Cf(e,t){return Ss(8390656,8,e,t)}function Hc(e,t){return bl(2048,8,e,t)}function ug(e,t){return bl(4,2,e,t)}function cg(e,t){return bl(4,4,e,t)}function dg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fg(e,t,n){return n=n!=null?n.concat([e]):null,bl(4,4,dg.bind(null,t,e),n)}function Uc(){}function pg(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hg(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mg(e,t,n){return $r&21?(Cn(n,t)||(n=bm(),ot.lanes|=n,Br|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,qt=!0),e.memoizedState=n)}function Vb(e,t){var n=He;He=n!==0&&4>n?n:4,e(!0);var r=fo.transition;fo.transition={};try{e(!1),t()}finally{He=n,fo.transition=r}}function gg(){return mn().memoizedState}function qb(e,t,n){var r=hr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yg(e))xg(t,n);else if(n=Jm(e,t,n,r),n!==null){var i=Mt();jn(n,e,r,i),vg(n,t,r)}}function Gb(e,t,n){var r=hr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yg(e))xg(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,l=a(s,n);if(i.hasEagerState=!0,i.eagerState=l,Cn(l,s)){var u=t.interleaved;u===null?(i.next=i,Ac(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Jm(e,t,i,r),n!==null&&(i=Mt(),jn(n,e,r,i),vg(n,t,r))}}function yg(e){var t=e.alternate;return e===ot||t!==null&&t===ot}function xg(e,t){sa=Qs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bc(e,n)}}var Js={readContext:hn,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},Yb={readContext:hn,useCallback:function(e,t){return zn().memoizedState=[e,t===void 0?null:t],e},useContext:hn,useEffect:Cf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ss(4194308,4,dg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ss(4,2,e,t)},useMemo:function(e,t){var n=zn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qb.bind(null,ot,e),[r.memoizedState,e]},useRef:function(e){var t=zn();return e={current:e},t.memoizedState=e},useState:Ef,useDebugValue:Uc,useDeferredValue:function(e){return zn().memoizedState=e},useTransition:function(){var e=Ef(!1),t=e[0];return e=Vb.bind(null,e[1]),zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ot,i=zn();if(et){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),St===null)throw Error(W(349));$r&30||rg(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Cf(ag.bind(null,r,a,e),[e]),r.flags|=2048,za(9,ig.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=zn(),t=St.identifierPrefix;if(et){var n=Un,r=Hn;n=(r&~(1<<32-Sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ca++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Wb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xb={readContext:hn,useCallback:pg,useContext:hn,useEffect:Hc,useImperativeHandle:fg,useInsertionEffect:ug,useLayoutEffect:cg,useMemo:hg,useReducer:po,useRef:og,useState:function(){return po(Ta)},useDebugValue:Uc,useDeferredValue:function(e){var t=mn();return mg(t,xt.memoizedState,e)},useTransition:function(){var e=po(Ta)[0],t=mn().memoizedState;return[e,t]},useMutableSource:tg,useSyncExternalStore:ng,useId:gg,unstable_isNewReconciler:!1},Kb={readContext:hn,useCallback:pg,useContext:hn,useEffect:Hc,useImperativeHandle:fg,useInsertionEffect:ug,useLayoutEffect:cg,useMemo:hg,useReducer:ho,useRef:og,useState:function(){return ho(Ta)},useDebugValue:Uc,useDeferredValue:function(e){var t=mn();return xt===null?t.memoizedState=e:mg(t,xt.memoizedState,e)},useTransition:function(){var e=ho(Ta)[0],t=mn().memoizedState;return[e,t]},useMutableSource:tg,useSyncExternalStore:ng,useId:gg,unstable_isNewReconciler:!1};function bn(e,t){if(e&&e.defaultProps){t=ut({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Cu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ut({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Mt(),i=hr(e),a=Wn(r,i);a.payload=t,n!=null&&(a.callback=n),t=fr(e,a,i),t!==null&&(jn(t,e,i,r),ws(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Mt(),i=hr(e),a=Wn(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=fr(e,a,i),t!==null&&(jn(t,e,i,r),ws(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Mt(),r=hr(e),i=Wn(n,r);i.tag=2,t!=null&&(i.callback=t),t=fr(e,i,r),t!==null&&(jn(t,e,r,n),ws(t,e,r))}};function Tf(e,t,n,r,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,s):t.prototype&&t.prototype.isPureReactComponent?!wa(n,r)||!wa(i,a):!0}function bg(e,t,n){var r=!1,i=yr,a=t.contextType;return typeof a=="object"&&a!==null?a=hn(a):(i=Yt(t)?Fr:At.current,r=t.contextTypes,a=(r=r!=null)?Ni(e,i):yr),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function zf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wl.enqueueReplaceState(t,t.state,null)}function Tu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Dc(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=hn(a):(a=Yt(t)?Fr:At.current,i.context=Ni(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Cu(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&wl.enqueueReplaceState(i,i.state,null),Xs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function zi(e,t){try{var n="",r=t;do n+=jv(r),r=r.return;while(r);var i=n}catch(a){i=`
|
|
39
|
+
Error generating stack: `+a.message+`
|
|
40
|
+
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function mo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function zu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Qb=typeof WeakMap=="function"?WeakMap:Map;function wg(e,t,n){n=Wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){el||(el=!0,Mu=r),zu(e,t)},n}function kg(e,t,n){n=Wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){zu(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){zu(e,t),typeof r!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Rf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qb;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=dw.bind(null,e,t,n),t.then(e,e))}function Pf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function If(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Wn(-1,1),t.tag=2,fr(n,t,1))),n.lanes|=1),e)}var Jb=Kn.ReactCurrentOwner,qt=!1;function Lt(e,t,n,r){t.child=e===null?Qm(t,null,n,r):Ci(t,e.child,n,r)}function _f(e,t,n,r,i){n=n.render;var a=t.ref;return vi(t,i),r=$c(e,t,n,r,a,i),n=Bc(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(et&&n&&Tc(t),t.flags|=1,Lt(e,t,r,i),t.child)}function Af(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!Qc(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Sg(e,t,a,r,i)):(e=Cs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var s=a.memoizedProps;if(n=n.compare,n=n!==null?n:wa,n(s,r)&&e.ref===t.ref)return Xn(e,t,i)}return t.flags|=1,e=mr(a,r),e.ref=t.ref,e.return=t,t.child=e}function Sg(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wa(a,r)&&e.ref===t.ref)if(qt=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(qt=!0);else return t.lanes=e.lanes,Xn(e,t,i)}return Ru(e,t,n,r,i)}function jg(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(pi,Zt),Zt|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ye(pi,Zt),Zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Ye(pi,Zt),Zt|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ye(pi,Zt),Zt|=r;return Lt(e,t,i,n),t.child}function Ng(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ru(e,t,n,r,i){var a=Yt(n)?Fr:At.current;return a=Ni(t,a),vi(t,i),n=$c(e,t,n,r,a,i),r=Bc(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xn(e,t,i)):(et&&r&&Tc(t),t.flags|=1,Lt(e,t,n,i),t.child)}function Df(e,t,n,r,i){if(Yt(n)){var a=!0;Ws(t)}else a=!1;if(vi(t,i),t.stateNode===null)js(e,t),bg(t,n,r),Tu(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=hn(c):(c=Yt(n)?Fr:At.current,c=Ni(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==c)&&zf(t,s,r,c),rr=!1;var p=t.memoizedState;s.state=p,Xs(t,r,s,i),u=t.memoizedState,l!==r||p!==u||Gt.current||rr?(typeof f=="function"&&(Cu(t,n,f,r),u=t.memoizedState),(l=rr||Tf(t,n,l,r,p,u,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Zm(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:bn(t.type,l),s.props=c,d=t.pendingProps,p=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=hn(u):(u=Yt(n)?Fr:At.current,u=Ni(t,u));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||p!==u)&&zf(t,s,r,u),rr=!1,p=t.memoizedState,s.state=p,Xs(t,r,s,i);var g=t.memoizedState;l!==d||p!==g||Gt.current||rr?(typeof h=="function"&&(Cu(t,n,h,r),g=t.memoizedState),(c=rr||Tf(t,n,c,r,p,g,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Pu(e,t,n,r,a,i)}function Pu(e,t,n,r,i,a){Ng(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&bf(t,n,!1),Xn(e,t,a);r=t.stateNode,Jb.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ci(t,e.child,null,a),t.child=Ci(t,null,l,a)):Lt(e,t,l,a),t.memoizedState=r.state,i&&bf(t,n,!0),t.child}function Eg(e){var t=e.stateNode;t.pendingContext?vf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vf(e,t.context,!1),Oc(e,t.containerInfo)}function Of(e,t,n,r,i){return Ei(),Rc(i),t.flags|=256,Lt(e,t,n,r),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0};function _u(e){return{baseLanes:e,cachePool:null,transitions:null}}function Cg(e,t,n){var r=t.pendingProps,i=lt.current,a=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ye(lt,i&1),e===null)return Nu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,a?(r=t.mode,a=t.child,s={mode:"hidden",children:s},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=s):a=jl(s,r,0,null),e=Or(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=_u(n),t.memoizedState=Iu,e):Wc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Zb(e,t,s,r,l,i,n);if(a){a=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=mr(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=mr(l,a):(a=Or(a,s,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,s=e.child.memoizedState,s=s===null?_u(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Iu,r}return a=e.child,e=a.sibling,r=mr(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wc(e,t){return t=jl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rs(e,t,n,r){return r!==null&&Rc(r),Ci(t,e.child,null,n),e=Wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zb(e,t,n,r,i,a,s){if(n)return t.flags&256?(t.flags&=-257,r=mo(Error(W(422))),rs(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=jl({mode:"visible",children:r.children},i,0,null),a=Or(a,i,s,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Ci(t,e.child,null,s),t.child.memoizedState=_u(s),t.memoizedState=Iu,a);if(!(t.mode&1))return rs(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,a=Error(W(419)),r=mo(a,r,void 0),rs(e,t,s,r)}if(l=(s&e.childLanes)!==0,qt||l){if(r=St,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Yn(e,i),jn(r,e,i,-1))}return Kc(),r=mo(Error(W(421))),rs(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=fw.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,en=dr(i.nextSibling),tn=t,et=!0,kn=null,e!==null&&(un[cn++]=Hn,un[cn++]=Un,un[cn++]=Mr,Hn=e.id,Un=e.overflow,Mr=t),t=Wc(t,r.children),t.flags|=4096,t)}function Lf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Eu(e.return,t,n)}function go(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Tg(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Lt(e,t,r.children,n),r=lt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,n,t);else if(e.tag===19)Lf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ye(lt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ks(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),go(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ks(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}go(t,!0,n,null,a);break;case"together":go(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function js(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Br|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=mr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ew(e,t,n){switch(t.tag){case 3:Eg(t),Ei();break;case 5:eg(t);break;case 1:Yt(t.type)&&Ws(t);break;case 4:Oc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ye(Gs,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ye(lt,lt.current&1),t.flags|=128,null):n&t.child.childLanes?Cg(e,t,n):(Ye(lt,lt.current&1),e=Xn(e,t,n),e!==null?e.sibling:null);Ye(lt,lt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ye(lt,lt.current),r)break;return null;case 22:case 23:return t.lanes=0,jg(e,t,n)}return Xn(e,t,n)}var zg,Au,Rg,Pg;zg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Au=function(){};Rg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_r(Dn.current);var a=null;switch(n){case"input":i=nu(e,i),r=nu(e,r),a=[];break;case"select":i=ut({},i,{value:void 0}),r=ut({},r,{value:void 0}),a=[];break;case"textarea":i=au(e,i),r=au(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Hs)}lu(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ha.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(a||(a=[]),a.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(a=a||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ha.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&Ke("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}};Pg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wi(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function tw(e,t,n){var r=t.pendingProps;switch(zc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(t),null;case 1:return Yt(t.type)&&Us(),Rt(t),null;case 3:return r=t.stateNode,Ti(),Qe(Gt),Qe(At),Fc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ts(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(Hu(kn),kn=null))),Au(e,t),Rt(t),null;case 5:Lc(t);var i=_r(Ea.current);if(n=t.type,e!==null&&t.stateNode!=null)Rg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Rt(t),null}if(e=_r(Dn.current),ts(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[_n]=t,r[ja]=a,e=(t.mode&1)!==0,n){case"dialog":Ke("cancel",r),Ke("close",r);break;case"iframe":case"object":case"embed":Ke("load",r);break;case"video":case"audio":for(i=0;i<Zi.length;i++)Ke(Zi[i],r);break;case"source":Ke("error",r);break;case"img":case"image":case"link":Ke("error",r),Ke("load",r);break;case"details":Ke("toggle",r);break;case"input":Vd(r,a),Ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Ke("invalid",r);break;case"textarea":Gd(r,a),Ke("invalid",r)}lu(n,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="children"?typeof l=="string"?r.textContent!==l&&(a.suppressHydrationWarning!==!0&&es(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&es(r.textContent,l,e),i=["children",""+l]):ha.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ke("scroll",r)}switch(n){case"input":qa(r),qd(r,a,!0);break;case"textarea":qa(r),Yd(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Hs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=am(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[_n]=t,e[ja]=r,zg(e,t,!1,!1),t.stateNode=e;e:{switch(s=ou(n,r),n){case"dialog":Ke("cancel",e),Ke("close",e),i=r;break;case"iframe":case"object":case"embed":Ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Zi.length;i++)Ke(Zi[i],e);i=r;break;case"source":Ke("error",e),i=r;break;case"img":case"image":case"link":Ke("error",e),Ke("load",e),i=r;break;case"details":Ke("toggle",e),i=r;break;case"input":Vd(e,r),i=nu(e,r),Ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ut({},r,{value:void 0}),Ke("invalid",e);break;case"textarea":Gd(e,r),i=au(e,r),Ke("invalid",e);break;default:i=r}lu(n,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var u=l[a];a==="style"?om(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&sm(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ma(e,u):typeof u=="number"&&ma(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ha.hasOwnProperty(a)?u!=null&&a==="onScroll"&&Ke("scroll",e):u!=null&&hc(e,a,u,s))}switch(n){case"input":qa(e),qd(e,r,!1);break;case"textarea":qa(e),Yd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gr(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?mi(e,!!r.multiple,a,!1):r.defaultValue!=null&&mi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Hs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Rt(t),null;case 6:if(e&&t.stateNode!=null)Pg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=_r(Ea.current),_r(Dn.current),ts(t)){if(r=t.stateNode,n=t.memoizedProps,r[_n]=t,(a=r.nodeValue!==n)&&(e=tn,e!==null))switch(e.tag){case 3:es(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&es(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_n]=t,t.stateNode=r}return Rt(t),null;case 13:if(Qe(lt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(et&&en!==null&&t.mode&1&&!(t.flags&128))Xm(),Ei(),t.flags|=98560,a=!1;else if(a=ts(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(W(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(W(317));a[_n]=t}else Ei(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rt(t),a=!1}else kn!==null&&(Hu(kn),kn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||lt.current&1?vt===0&&(vt=3):Kc())),t.updateQueue!==null&&(t.flags|=4),Rt(t),null);case 4:return Ti(),Au(e,t),e===null&&ka(t.stateNode.containerInfo),Rt(t),null;case 10:return _c(t.type._context),Rt(t),null;case 17:return Yt(t.type)&&Us(),Rt(t),null;case 19:if(Qe(lt),a=t.memoizedState,a===null)return Rt(t),null;if(r=(t.flags&128)!==0,s=a.rendering,s===null)if(r)Wi(a,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ks(e),s!==null){for(t.flags|=128,Wi(a,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,s=a.alternate,s===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ye(lt,lt.current&1|2),t.child}e=e.sibling}a.tail!==null&&ft()>Ri&&(t.flags|=128,r=!0,Wi(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ks(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wi(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!et)return Rt(t),null}else 2*ft()-a.renderingStartTime>Ri&&n!==1073741824&&(t.flags|=128,r=!0,Wi(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ft(),t.sibling=null,n=lt.current,Ye(lt,r?n&1|2:n&1),t):(Rt(t),null);case 22:case 23:return Xc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function nw(e,t){switch(zc(t),t.tag){case 1:return Yt(t.type)&&Us(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ti(),Qe(Gt),Qe(At),Fc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lc(t),null;case 13:if(Qe(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qe(lt),null;case 4:return Ti(),null;case 10:return _c(t.type._context),null;case 22:case 23:return Xc(),null;case 24:return null;default:return null}}var is=!1,It=!1,rw=typeof WeakSet=="function"?WeakSet:Set,ae=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ct(e,t,r)}else n.current=null}function Du(e,t,n){try{n()}catch(r){ct(e,t,r)}}var Ff=!1;function iw(e,t){if(xu=Ms,e=Om(),Cc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==a||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(l=s),p===a&&++f===r&&(u=s),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(vu={focusedElem:e,selectionRange:n},Ms=!1,ae=t;ae!==null;)if(t=ae,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ae=e;else for(;ae!==null;){t=ae;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:bn(t.type,v),w);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(j){ct(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,ae=e;break}ae=t.return}return g=Ff,Ff=!1,g}function la(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Du(t,n,a)}i=i.next}while(i!==r)}}function kl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ig(e){var t=e.alternate;t!==null&&(e.alternate=null,Ig(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_n],delete t[ja],delete t[ku],delete t[$b],delete t[Bb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _g(e){return e.tag===5||e.tag===3||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_g(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.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 Lu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Hs));else if(r!==4&&(e=e.child,e!==null))for(Lu(e,t,n),e=e.sibling;e!==null;)Lu(e,t,n),e=e.sibling}function Fu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fu(e,t,n),e=e.sibling;e!==null;)Fu(e,t,n),e=e.sibling}var jt=null,wn=!1;function Jn(e,t,n){for(n=n.child;n!==null;)Ag(e,t,n),n=n.sibling}function Ag(e,t,n){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(hl,n)}catch{}switch(n.tag){case 5:It||fi(n,t);case 6:var r=jt,i=wn;jt=null,Jn(e,t,n),jt=r,wn=i,jt!==null&&(wn?(e=jt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jt.removeChild(n.stateNode));break;case 18:jt!==null&&(wn?(e=jt,n=n.stateNode,e.nodeType===8?oo(e.parentNode,n):e.nodeType===1&&oo(e,n),va(e)):oo(jt,n.stateNode));break;case 4:r=jt,i=wn,jt=n.stateNode.containerInfo,wn=!0,Jn(e,t,n),jt=r,wn=i;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&Du(n,t,s),i=i.next}while(i!==r)}Jn(e,t,n);break;case 1:if(!It&&(fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ct(n,t,l)}Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Jn(e,t,n),It=r):Jn(e,t,n);break;default:Jn(e,t,n)}}function $f(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rw),t.forEach(function(r){var i=pw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:jt=l.stateNode,wn=!1;break e;case 3:jt=l.stateNode.containerInfo,wn=!0;break e;case 4:jt=l.stateNode.containerInfo,wn=!0;break e}l=l.return}if(jt===null)throw Error(W(160));Ag(a,s,i),jt=null,wn=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){ct(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dg(t,e),t=t.sibling}function Dg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),Tn(e),r&4){try{la(3,e,e.return),kl(3,e)}catch(v){ct(e,e.return,v)}try{la(5,e,e.return)}catch(v){ct(e,e.return,v)}}break;case 1:xn(t,e),Tn(e),r&512&&n!==null&&fi(n,n.return);break;case 5:if(xn(t,e),Tn(e),r&512&&n!==null&&fi(n,n.return),e.flags&32){var i=e.stateNode;try{ma(i,"")}catch(v){ct(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,s=n!==null?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&rm(i,a),ou(l,s);var c=ou(l,a);for(s=0;s<u.length;s+=2){var f=u[s],d=u[s+1];f==="style"?om(i,d):f==="dangerouslySetInnerHTML"?sm(i,d):f==="children"?ma(i,d):hc(i,f,d,c)}switch(l){case"input":ru(i,a);break;case"textarea":im(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?mi(i,!!a.multiple,h,!1):p!==!!a.multiple&&(a.defaultValue!=null?mi(i,!!a.multiple,a.defaultValue,!0):mi(i,!!a.multiple,a.multiple?[]:"",!1))}i[ja]=a}catch(v){ct(e,e.return,v)}}break;case 6:if(xn(t,e),Tn(e),r&4){if(e.stateNode===null)throw Error(W(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){ct(e,e.return,v)}}break;case 3:if(xn(t,e),Tn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{va(t.containerInfo)}catch(v){ct(e,e.return,v)}break;case 4:xn(t,e),Tn(e);break;case 13:xn(t,e),Tn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Gc=ft())),r&4&&$f(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||f,xn(t,e),It=c):xn(t,e),Tn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(ae=e,f=e.child;f!==null;){for(d=ae=f;ae!==null;){switch(p=ae,h=p.child,p.tag){case 0:case 11:case 14:case 15:la(4,p,p.return);break;case 1:fi(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){ct(r,n,v)}}break;case 5:fi(p,p.return);break;case 22:if(p.memoizedState!==null){Hf(d);continue}}h!==null?(h.return=p,ae=h):Hf(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=d.stateNode,u=d.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=lm("display",s))}catch(v){ct(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){ct(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:xn(t,e),Tn(e),r&4&&$f(e);break;case 21:break;default:xn(t,e),Tn(e)}}function Tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_g(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ma(i,""),r.flags&=-33);var a=Mf(e);Fu(e,a,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Mf(e);Lu(e,l,s);break;default:throw Error(W(161))}}catch(u){ct(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function aw(e,t,n){ae=e,Og(e)}function Og(e,t,n){for(var r=(e.mode&1)!==0;ae!==null;){var i=ae,a=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||is;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||It;l=is;var c=It;if(is=s,(It=u)&&!c)for(ae=i;ae!==null;)s=ae,u=s.child,s.tag===22&&s.memoizedState!==null?Uf(i):u!==null?(u.return=s,ae=u):Uf(i);for(;a!==null;)ae=a,Og(a),a=a.sibling;ae=i,is=l,It=c}Bf(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ae=a):Bf(e)}}function Bf(e){for(;ae!==null;){var t=ae;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:It||kl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:bn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Nf(t,a,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Nf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&va(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}It||t.flags&512&&Ou(t)}catch(p){ct(t,t.return,p)}}if(t===e){ae=null;break}if(n=t.sibling,n!==null){n.return=t.return,ae=n;break}ae=t.return}}function Hf(e){for(;ae!==null;){var t=ae;if(t===e){ae=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ae=n;break}ae=t.return}}function Uf(e){for(;ae!==null;){var t=ae;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kl(4,t)}catch(u){ct(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){ct(t,i,u)}}var a=t.return;try{Ou(t)}catch(u){ct(t,a,u)}break;case 5:var s=t.return;try{Ou(t)}catch(u){ct(t,s,u)}}}catch(u){ct(t,t.return,u)}if(t===e){ae=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ae=l;break}ae=t.return}}var sw=Math.ceil,Zs=Kn.ReactCurrentDispatcher,Vc=Kn.ReactCurrentOwner,pn=Kn.ReactCurrentBatchConfig,Me=0,St=null,gt=null,Nt=0,Zt=0,pi=br(0),vt=0,Ra=null,Br=0,Sl=0,qc=0,oa=null,Vt=null,Gc=0,Ri=1/0,Mn=null,el=!1,Mu=null,pr=null,as=!1,lr=null,tl=0,ua=0,$u=null,Ns=-1,Es=0;function Mt(){return Me&6?ft():Ns!==-1?Ns:Ns=ft()}function hr(e){return e.mode&1?Me&2&&Nt!==0?Nt&-Nt:Ub.transition!==null?(Es===0&&(Es=bm()),Es):(e=He,e!==0||(e=window.event,e=e===void 0?16:Cm(e.type)),e):1}function jn(e,t,n,r){if(50<ua)throw ua=0,$u=null,Error(W(185));Da(e,n,r),(!(Me&2)||e!==St)&&(e===St&&(!(Me&2)&&(Sl|=n),vt===4&&ar(e,Nt)),Xt(e,r),n===1&&Me===0&&!(t.mode&1)&&(Ri=ft()+500,vl&&wr()))}function Xt(e,t){var n=e.callbackNode;Uv(e,t);var r=Fs(e,e===St?Nt:0);if(r===0)n!==null&&Qd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Qd(n),t===1)e.tag===0?Hb(Wf.bind(null,e)):qm(Wf.bind(null,e)),Fb(function(){!(Me&6)&&wr()}),n=null;else{switch(wm(r)){case 1:n=vc;break;case 4:n=xm;break;case 16:n=Ls;break;case 536870912:n=vm;break;default:n=Ls}n=Wg(n,Lg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Lg(e,t){if(Ns=-1,Es=0,Me&6)throw Error(W(327));var n=e.callbackNode;if(bi()&&e.callbackNode!==n)return null;var r=Fs(e,e===St?Nt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nl(e,r);else{t=r;var i=Me;Me|=2;var a=Mg();(St!==e||Nt!==t)&&(Mn=null,Ri=ft()+500,Dr(e,t));do try{uw();break}catch(l){Fg(e,l)}while(!0);Ic(),Zs.current=a,Me=i,gt!==null?t=0:(St=null,Nt=0,t=vt)}if(t!==0){if(t===2&&(i=pu(e),i!==0&&(r=i,t=Bu(e,i))),t===1)throw n=Ra,Dr(e,0),ar(e,r),Xt(e,ft()),n;if(t===6)ar(e,r);else{if(i=e.current.alternate,!(r&30)&&!lw(i)&&(t=nl(e,r),t===2&&(a=pu(e),a!==0&&(r=a,t=Bu(e,a))),t===1))throw n=Ra,Dr(e,0),ar(e,r),Xt(e,ft()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Tr(e,Vt,Mn);break;case 3:if(ar(e,r),(r&130023424)===r&&(t=Gc+500-ft(),10<t)){if(Fs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Mt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=wu(Tr.bind(null,e,Vt,Mn),t);break}Tr(e,Vt,Mn);break;case 4:if(ar(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Sn(r);a=1<<s,s=t[s],s>i&&(i=s),r&=~a}if(r=i,r=ft()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sw(r/1960))-r,10<r){e.timeoutHandle=wu(Tr.bind(null,e,Vt,Mn),r);break}Tr(e,Vt,Mn);break;case 5:Tr(e,Vt,Mn);break;default:throw Error(W(329))}}}return Xt(e,ft()),e.callbackNode===n?Lg.bind(null,e):null}function Bu(e,t){var n=oa;return e.current.memoizedState.isDehydrated&&(Dr(e,t).flags|=256),e=nl(e,t),e!==2&&(t=Vt,Vt=n,t!==null&&Hu(t)),e}function Hu(e){Vt===null?Vt=e:Vt.push.apply(Vt,e)}function lw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cn(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ar(e,t){for(t&=~qc,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sn(t),r=1<<n;e[n]=-1,t&=~r}}function Wf(e){if(Me&6)throw Error(W(327));bi();var t=Fs(e,0);if(!(t&1))return Xt(e,ft()),null;var n=nl(e,t);if(e.tag!==0&&n===2){var r=pu(e);r!==0&&(t=r,n=Bu(e,r))}if(n===1)throw n=Ra,Dr(e,0),ar(e,t),Xt(e,ft()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tr(e,Vt,Mn),Xt(e,ft()),null}function Yc(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(Ri=ft()+500,vl&&wr())}}function Hr(e){lr!==null&&lr.tag===0&&!(Me&6)&&bi();var t=Me;Me|=1;var n=pn.transition,r=He;try{if(pn.transition=null,He=1,e)return e()}finally{He=r,pn.transition=n,Me=t,!(Me&6)&&wr()}}function Xc(){Zt=pi.current,Qe(pi)}function Dr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Lb(n)),gt!==null)for(n=gt.return;n!==null;){var r=n;switch(zc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Us();break;case 3:Ti(),Qe(Gt),Qe(At),Fc();break;case 5:Lc(r);break;case 4:Ti();break;case 13:Qe(lt);break;case 19:Qe(lt);break;case 10:_c(r.type._context);break;case 22:case 23:Xc()}n=n.return}if(St=e,gt=e=mr(e.current,null),Nt=Zt=t,vt=0,Ra=null,qc=Sl=Br=0,Vt=oa=null,Ir!==null){for(t=0;t<Ir.length;t++)if(n=Ir[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var s=a.next;a.next=i,r.next=s}n.pending=r}Ir=null}return e}function Fg(e,t){do{var n=gt;try{if(Ic(),ks.current=Js,Qs){for(var r=ot.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Qs=!1}if($r=0,kt=xt=ot=null,sa=!1,Ca=0,Vc.current=null,n===null||n.return===null){vt=1,Ra=t,gt=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Nt,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Pf(s);if(h!==null){h.flags&=-257,If(h,s,l,a,t),h.mode&1&&Rf(a,c,t),t=h,u=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}else{if(!(t&1)){Rf(a,c,t),Kc();break e}u=Error(W(426))}}else if(et&&l.mode&1){var w=Pf(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),If(w,s,l,a,t),Rc(zi(u,l));break e}}a=u=zi(u,l),vt!==4&&(vt=2),oa===null?oa=[a]:oa.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=wg(a,u,t);jf(a,y);break e;case 1:l=u;var x=a.type,m=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(pr===null||!pr.has(m)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=kg(a,l,t);jf(a,j);break e}}a=a.return}while(a!==null)}Bg(n)}catch(k){t=k,gt===n&&n!==null&&(gt=n=n.return);continue}break}while(!0)}function Mg(){var e=Zs.current;return Zs.current=Js,e===null?Js:e}function Kc(){(vt===0||vt===3||vt===2)&&(vt=4),St===null||!(Br&268435455)&&!(Sl&268435455)||ar(St,Nt)}function nl(e,t){var n=Me;Me|=2;var r=Mg();(St!==e||Nt!==t)&&(Mn=null,Dr(e,t));do try{ow();break}catch(i){Fg(e,i)}while(!0);if(Ic(),Me=n,Zs.current=r,gt!==null)throw Error(W(261));return St=null,Nt=0,vt}function ow(){for(;gt!==null;)$g(gt)}function uw(){for(;gt!==null&&!Av();)$g(gt)}function $g(e){var t=Ug(e.alternate,e,Zt);e.memoizedProps=e.pendingProps,t===null?Bg(e):gt=t,Vc.current=null}function Bg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=nw(n,t),n!==null){n.flags&=32767,gt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{vt=6,gt=null;return}}else if(n=tw(n,t,Zt),n!==null){gt=n;return}if(t=t.sibling,t!==null){gt=t;return}gt=t=e}while(t!==null);vt===0&&(vt=5)}function Tr(e,t,n){var r=He,i=pn.transition;try{pn.transition=null,He=1,cw(e,t,n,r)}finally{pn.transition=i,He=r}return null}function cw(e,t,n,r){do bi();while(lr!==null);if(Me&6)throw Error(W(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Wv(e,a),e===St&&(gt=St=null,Nt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||as||(as=!0,Wg(Ls,function(){return bi(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=pn.transition,pn.transition=null;var s=He;He=1;var l=Me;Me|=4,Vc.current=null,iw(e,n),Dg(n,e),Rb(vu),Ms=!!xu,vu=xu=null,e.current=n,aw(n),Dv(),Me=l,He=s,pn.transition=a}else e.current=n;if(as&&(as=!1,lr=e,tl=i),a=e.pendingLanes,a===0&&(pr=null),Fv(n.stateNode),Xt(e,ft()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(el)throw el=!1,e=Mu,Mu=null,e;return tl&1&&e.tag!==0&&bi(),a=e.pendingLanes,a&1?e===$u?ua++:(ua=0,$u=e):ua=0,wr(),null}function bi(){if(lr!==null){var e=wm(tl),t=pn.transition,n=He;try{if(pn.transition=null,He=16>e?16:e,lr===null)var r=!1;else{if(e=lr,lr=null,tl=0,Me&6)throw Error(W(331));var i=Me;for(Me|=4,ae=e.current;ae!==null;){var a=ae,s=a.child;if(ae.flags&16){var l=a.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(ae=c;ae!==null;){var f=ae;switch(f.tag){case 0:case 11:case 15:la(8,f,a)}var d=f.child;if(d!==null)d.return=f,ae=d;else for(;ae!==null;){f=ae;var p=f.sibling,h=f.return;if(Ig(f),f===c){ae=null;break}if(p!==null){p.return=h,ae=p;break}ae=h}}}var g=a.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}ae=a}}if(a.subtreeFlags&2064&&s!==null)s.return=a,ae=s;else e:for(;ae!==null;){if(a=ae,a.flags&2048)switch(a.tag){case 0:case 11:case 15:la(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,ae=y;break e}ae=a.return}}var x=e.current;for(ae=x;ae!==null;){s=ae;var m=s.child;if(s.subtreeFlags&2064&&m!==null)m.return=s,ae=m;else e:for(s=x;ae!==null;){if(l=ae,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:kl(9,l)}}catch(k){ct(l,l.return,k)}if(l===s){ae=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,ae=j;break e}ae=l.return}}if(Me=i,wr(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(hl,e)}catch{}r=!0}return r}finally{He=n,pn.transition=t}}return!1}function Vf(e,t,n){t=zi(n,t),t=wg(e,t,1),e=fr(e,t,1),t=Mt(),e!==null&&(Da(e,1,t),Xt(e,t))}function ct(e,t,n){if(e.tag===3)Vf(e,e,n);else for(;t!==null;){if(t.tag===3){Vf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pr===null||!pr.has(r))){e=zi(n,e),e=kg(t,e,1),t=fr(t,e,1),e=Mt(),t!==null&&(Da(t,1,e),Xt(t,e));break}}t=t.return}}function dw(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Mt(),e.pingedLanes|=e.suspendedLanes&n,St===e&&(Nt&n)===n&&(vt===4||vt===3&&(Nt&130023424)===Nt&&500>ft()-Gc?Dr(e,0):qc|=n),Xt(e,t)}function Hg(e,t){t===0&&(e.mode&1?(t=Xa,Xa<<=1,!(Xa&130023424)&&(Xa=4194304)):t=1);var n=Mt();e=Yn(e,t),e!==null&&(Da(e,t,n),Xt(e,n))}function fw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hg(e,n)}function pw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),Hg(e,n)}var Ug;Ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)qt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qt=!1,ew(e,t,n);qt=!!(e.flags&131072)}else qt=!1,et&&t.flags&1048576&&Gm(t,qs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;js(e,t),e=t.pendingProps;var i=Ni(t,At.current);vi(t,n),i=$c(null,t,r,e,i,n);var a=Bc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Yt(r)?(a=!0,Ws(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Dc(t),i.updater=wl,t.stateNode=i,i._reactInternals=t,Tu(t,r,e,n),t=Pu(null,t,r,!0,a,n)):(t.tag=0,et&&a&&Tc(t),Lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(js(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=mw(r),e=bn(r,e),i){case 0:t=Ru(null,t,r,e,n);break e;case 1:t=Df(null,t,r,e,n);break e;case 11:t=_f(null,t,r,e,n);break e;case 14:t=Af(null,t,r,bn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),Ru(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),Df(e,t,r,i,n);case 3:e:{if(Eg(t),e===null)throw Error(W(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Zm(e,t),Xs(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=zi(Error(W(423)),t),t=Of(e,t,r,n,i);break e}else if(r!==i){i=zi(Error(W(424)),t),t=Of(e,t,r,n,i);break e}else for(en=dr(t.stateNode.containerInfo.firstChild),tn=t,et=!0,kn=null,n=Qm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ei(),r===i){t=Xn(e,t,n);break e}Lt(e,t,r,n)}t=t.child}return t;case 5:return eg(t),e===null&&Nu(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,bu(r,i)?s=null:a!==null&&bu(r,a)&&(t.flags|=32),Ng(e,t),Lt(e,t,s,n),t.child;case 6:return e===null&&Nu(t),null;case 13:return Cg(e,t,n);case 4:return Oc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ci(t,null,r,n):Lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),_f(e,t,r,i,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ye(Gs,r._currentValue),r._currentValue=s,a!==null)if(Cn(a.value,s)){if(a.children===i.children&&!Gt.current){t=Xn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=Wn(-1,n&-n),u.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Eu(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(W(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Eu(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vi(t,n),i=hn(i),r=r(i),t.flags|=1,Lt(e,t,r,n),t.child;case 14:return r=t.type,i=bn(r,t.pendingProps),i=bn(r.type,i),Af(e,t,r,i,n);case 15:return Sg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bn(r,i),js(e,t),t.tag=1,Yt(r)?(e=!0,Ws(t)):e=!1,vi(t,n),bg(t,r,i),Tu(t,r,i,n),Pu(null,t,r,!0,e,n);case 19:return Tg(e,t,n);case 22:return jg(e,t,n)}throw Error(W(156,t.tag))};function Wg(e,t){return ym(e,t)}function hw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,t,n,r){return new hw(e,t,n,r)}function Qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mw(e){if(typeof e=="function")return Qc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gc)return 11;if(e===yc)return 14}return 2}function mr(e,t){var n=e.alternate;return n===null?(n=fn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cs(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")Qc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ri:return Or(n.children,i,a,t);case mc:s=8,i|=8;break;case Jo:return e=fn(12,n,t,i|2),e.elementType=Jo,e.lanes=a,e;case Zo:return e=fn(13,n,t,i),e.elementType=Zo,e.lanes=a,e;case eu:return e=fn(19,n,t,i),e.elementType=eu,e.lanes=a,e;case em:return jl(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jh:s=10;break e;case Zh:s=9;break e;case gc:s=11;break e;case yc:s=14;break e;case nr:s=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=fn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Or(e,t,n,r){return e=fn(7,e,r,t),e.lanes=n,e}function jl(e,t,n,r){return e=fn(22,e,r,t),e.elementType=em,e.lanes=n,e.stateNode={isHidden:!1},e}function yo(e,t,n){return e=fn(6,e,null,t),e.lanes=n,e}function xo(e,t,n){return t=fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jc(e,t,n,r,i,a,s,l,u){return e=new gw(e,t,n,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=fn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dc(a),e}function yw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ni,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vg(e){if(!e)return yr;e=e._reactInternals;e:{if(Gr(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(Yt(n))return Vm(e,n,t)}return t}function qg(e,t,n,r,i,a,s,l,u){return e=Jc(n,r,!0,e,i,a,s,l,u),e.context=Vg(null),n=e.current,r=Mt(),i=hr(n),a=Wn(r,i),a.callback=t??null,fr(n,a,i),e.current.lanes=i,Da(e,i,r),Xt(e,r),e}function Nl(e,t,n,r){var i=t.current,a=Mt(),s=hr(i);return n=Vg(n),t.context===null?t.context=n:t.pendingContext=n,t=Wn(a,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fr(i,t,s),e!==null&&(jn(e,i,s,a),ws(e,i,s)),s}function rl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function qf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zc(e,t){qf(e,t),(e=e.alternate)&&qf(e,t)}function xw(){return null}var Gg=typeof reportError=="function"?reportError:function(e){console.error(e)};function ed(e){this._internalRoot=e}El.prototype.render=ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Nl(e,t,null,null)};El.prototype.unmount=ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hr(function(){Nl(null,e,null,null)}),t[Gn]=null}};function El(e){this._internalRoot=e}El.prototype.unstable_scheduleHydration=function(e){if(e){var t=jm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ir.length&&t!==0&&t<ir[n].priority;n++);ir.splice(n,0,e),n===0&&Em(e)}};function td(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gf(){}function vw(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var c=rl(s);a.call(c)}}var s=qg(t,r,e,0,null,!1,!1,"",Gf);return e._reactRootContainer=s,e[Gn]=s.current,ka(e.nodeType===8?e.parentNode:e),Hr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=rl(u);l.call(c)}}var u=Jc(e,0,!1,null,null,!1,!1,"",Gf);return e._reactRootContainer=u,e[Gn]=u.current,ka(e.nodeType===8?e.parentNode:e),Hr(function(){Nl(t,u,n,r)}),u}function Tl(e,t,n,r,i){var a=n._reactRootContainer;if(a){var s=a;if(typeof i=="function"){var l=i;i=function(){var u=rl(s);l.call(u)}}Nl(t,s,e,i)}else s=vw(n,t,e,i,r);return rl(s)}km=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ji(t.pendingLanes);n!==0&&(bc(t,n|1),Xt(t,ft()),!(Me&6)&&(Ri=ft()+500,wr()))}break;case 13:Hr(function(){var r=Yn(e,1);if(r!==null){var i=Mt();jn(r,e,1,i)}}),Zc(e,1)}};wc=function(e){if(e.tag===13){var t=Yn(e,134217728);if(t!==null){var n=Mt();jn(t,e,134217728,n)}Zc(e,134217728)}};Sm=function(e){if(e.tag===13){var t=hr(e),n=Yn(e,t);if(n!==null){var r=Mt();jn(n,e,t,r)}Zc(e,t)}};jm=function(){return He};Nm=function(e,t){var n=He;try{return He=e,t()}finally{He=n}};cu=function(e,t,n){switch(t){case"input":if(ru(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xl(r);if(!i)throw Error(W(90));nm(r),ru(r,i)}}}break;case"textarea":im(e,n);break;case"select":t=n.value,t!=null&&mi(e,!!n.multiple,t,!1)}};dm=Yc;fm=Hr;var bw={usingClientEntryPoint:!1,Events:[La,li,xl,um,cm,Yc]},Vi={findFiberByHostInstance:Pr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ww={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=mm(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||xw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ss.isDisabled&&ss.supportsFiber)try{hl=ss.inject(ww),An=ss}catch{}}an.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bw;an.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!td(t))throw Error(W(200));return yw(e,t,null,n)};an.createRoot=function(e,t){if(!td(e))throw Error(W(299));var n=!1,r="",i=Gg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jc(e,1,!1,null,null,n,!1,r,i),e[Gn]=t.current,ka(e.nodeType===8?e.parentNode:e),new ed(t)};an.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=mm(t),e=e===null?null:e.stateNode,e};an.flushSync=function(e){return Hr(e)};an.hydrate=function(e,t,n){if(!Cl(t))throw Error(W(200));return Tl(null,e,t,!0,n)};an.hydrateRoot=function(e,t,n){if(!td(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",s=Gg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=qg(t,null,e,1,n??null,i,!1,a,s),e[Gn]=t.current,ka(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new El(t)};an.render=function(e,t,n){if(!Cl(t))throw Error(W(200));return Tl(null,e,t,!1,n)};an.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(W(40));return e._reactRootContainer?(Hr(function(){Tl(null,null,e,!1,function(){e._reactRootContainer=null,e[Gn]=null})}),!0):!1};an.unstable_batchedUpdates=Yc;an.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cl(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Tl(e,t,n,!1,r)};an.version="18.3.1-next-f1338f8080-20240426";function Yg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yg)}catch(e){console.error(e)}}Yg(),Yh.exports=an;var Xg=Yh.exports;const Kg=_a(Xg);var Yf=Xg;Ko.createRoot=Yf.createRoot,Ko.hydrateRoot=Yf.hydrateRoot;function kw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Sw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nw={};function Xf(e,t){return(Nw.jsx?jw:Sw).test(e)}const Ew=/[ \t\n\f\r]/g;function Cw(e){return typeof e=="object"?e.type==="text"?Kf(e.value):!1:Kf(e)}function Kf(e){return e.replace(Ew,"")===""}class Ma{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ma.prototype.normal={};Ma.prototype.property={};Ma.prototype.space=void 0;function Qg(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ma(n,r,t)}function Uu(e){return e.toLowerCase()}class Kt{constructor(t,n){this.attribute=n,this.property=t}}Kt.prototype.attribute="";Kt.prototype.booleanish=!1;Kt.prototype.boolean=!1;Kt.prototype.commaOrSpaceSeparated=!1;Kt.prototype.commaSeparated=!1;Kt.prototype.defined=!1;Kt.prototype.mustUseProperty=!1;Kt.prototype.number=!1;Kt.prototype.overloadedBoolean=!1;Kt.prototype.property="";Kt.prototype.spaceSeparated=!1;Kt.prototype.space=void 0;let Tw=0;const Ee=Yr(),mt=Yr(),Wu=Yr(),V=Yr(),Ge=Yr(),wi=Yr(),Jt=Yr();function Yr(){return 2**++Tw}const Vu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:mt,commaOrSpaceSeparated:Jt,commaSeparated:wi,number:V,overloadedBoolean:Wu,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),vo=Object.keys(Vu);class nd extends Kt{constructor(t,n,r,i){let a=-1;if(super(t,n),Qf(this,"space",i),typeof r=="number")for(;++a<vo.length;){const s=vo[a];Qf(this,vo[a],(r&Vu[s])===Vu[s])}}}nd.prototype.defined=!0;function Qf(e,t,n){n&&(e[t]=n)}function Di(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new nd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Uu(r)]=r,n[Uu(a.attribute)]=r}return new Ma(t,n,e.space)}const Jg=Di({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:Ge,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:V,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:Ge,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:mt,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zg(e,t){return t in e?e[t]:t}function ey(e,t){return Zg(e,t.toLowerCase())}const zw=Di({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wi,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Ge,autoFocus:Ee,autoPlay:Ee,blocking:Ge,capture:null,charSet:null,checked:Ee,cite:null,className:Ge,cols:V,colSpan:null,content:null,contentEditable:mt,controls:Ee,controlsList:Ge,coords:V|wi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Wu,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Ge,height:V,hidden:Wu,high:V,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Ee,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:V,pattern:null,ping:Ge,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Ge,required:Ee,reversed:Ee,rows:V,rowSpan:V,sandbox:Ge,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:mt,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:ey}),Rw=Di({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Jt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Ge,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:wi,g2:wi,glyphName:wi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zg}),ty=Di({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ny=Di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ey}),ry=Di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Iw=/[A-Z]/g,Jf=/-[a-z]/g,_w=/^data[-\w.:]+$/i;function Aw(e,t){const n=Uu(t);let r=t,i=Kt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_w.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Jf,Ow);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Jf.test(a)){let s=a.replace(Iw,Dw);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=nd}return new i(r,t)}function Dw(e){return"-"+e.toLowerCase()}function Ow(e){return e.charAt(1).toUpperCase()}const Lw=Qg([Jg,zw,ty,ny,ry],"html"),rd=Qg([Jg,Rw,ty,ny,ry],"svg");function Fw(e){return e.join(" ").trim()}var id={},Zf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Mw=/\n/g,$w=/^\s*/,Bw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hw=/^:\s*/,Uw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ww=/^[;\s]*/,Vw=/^\s+|\s+$/g,qw=`
|
|
41
|
+
`,ep="/",tp="*",Rr="",Gw="comment",Yw="declaration";function Xw(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(Mw);v&&(n+=v.length);var w=g.lastIndexOf(qw);r=~w?g.length-w:r+g.length}function a(){var g={line:n,column:r};return function(v){return v.position=new s(g),c(),v}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function u(g){var v=g.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){u($w)}function f(g){var v;for(g=g||[];v=d();)v!==!1&&g.push(v);return g}function d(){var g=a();if(!(ep!=e.charAt(0)||tp!=e.charAt(1))){for(var v=2;Rr!=e.charAt(v)&&(tp!=e.charAt(v)||ep!=e.charAt(v+1));)++v;if(v+=2,Rr===e.charAt(v-1))return l("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,g({type:Gw,comment:w})}}function p(){var g=a(),v=u(Bw);if(v){if(d(),!u(Hw))return l("property missing ':'");var w=u(Uw),y=g({type:Yw,property:np(v[0].replace(Zf,Rr)),value:w?np(w[0].replace(Zf,Rr)):Rr});return u(Ww),y}}function h(){var g=[];f(g);for(var v;v=p();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function np(e){return e?e.replace(Vw,Rr):Rr}var Kw=Xw,Qw=_s&&_s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(id,"__esModule",{value:!0});id.default=Zw;const Jw=Qw(Kw);function Zw(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Jw.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:l}=a;i?t(s,l,a):l&&(n=n||{},n[s]=l)}),n}var zl={};Object.defineProperty(zl,"__esModule",{value:!0});zl.camelCase=void 0;var ek=/^--[a-zA-Z0-9_-]+$/,tk=/-([a-z])/g,nk=/^[^-]+$/,rk=/^-(webkit|moz|ms|o|khtml)-/,ik=/^-(ms)-/,ak=function(e){return!e||nk.test(e)||ek.test(e)},sk=function(e,t){return t.toUpperCase()},rp=function(e,t){return"".concat(t,"-")},lk=function(e,t){return t===void 0&&(t={}),ak(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(ik,rp):e=e.replace(rk,rp),e.replace(tk,sk))};zl.camelCase=lk;var ok=_s&&_s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uk=ok(id),ck=zl;function qu(e,t){var n={};return!e||typeof e!="string"||(0,uk.default)(e,function(r,i){r&&i&&(n[(0,ck.camelCase)(r,t)]=i)}),n}qu.default=qu;var dk=qu;const fk=_a(dk),iy=ay("end"),ad=ay("start");function ay(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function pk(e){const t=ad(e),n=iy(e);if(t&&n)return{start:t,end:n}}function ca(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ip(e.position):"start"in e||"end"in e?ip(e):"line"in e||"column"in e?Gu(e):""}function Gu(e){return ap(e&&e.line)+":"+ap(e&&e.column)}function ip(e){return Gu(e&&e.start)+"-"+Gu(e&&e.end)}function ap(e){return e&&typeof e=="number"?e:1}class Dt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=ca(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dt.prototype.file="";Dt.prototype.name="";Dt.prototype.reason="";Dt.prototype.message="";Dt.prototype.stack="";Dt.prototype.column=void 0;Dt.prototype.line=void 0;Dt.prototype.ancestors=void 0;Dt.prototype.cause=void 0;Dt.prototype.fatal=void 0;Dt.prototype.place=void 0;Dt.prototype.ruleId=void 0;Dt.prototype.source=void 0;const sd={}.hasOwnProperty,hk=new Map,mk=/[A-Z]/g,gk=new Set(["table","tbody","thead","tfoot","tr"]),yk=new Set(["td","th"]),sy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ek(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Nk(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rd:Lw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ly(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ly(e,t,n){if(t.type==="element")return vk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kk(e,t,n);if(t.type==="mdxjsEsm")return wk(e,t);if(t.type==="root")return Sk(e,t,n);if(t.type==="text")return jk(e,t)}function vk(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=rd,e.schema=i),e.ancestors.push(t);const a=uy(e,t.tagName,!1),s=Ck(e,t);let l=od(e,t);return gk.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!Cw(u):!0})),oy(e,s,a,t),ld(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function bk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Pa(e,t.position)}function wk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}function kk(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=rd,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:uy(e,t.name,!0),s=Tk(e,t),l=od(e,t);return oy(e,s,a,t),ld(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Sk(e,t,n){const r={};return ld(r,od(e,t)),e.create(t,e.Fragment,r,n)}function jk(e,t){return t.value}function oy(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ld(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Nk(e,t,n){return r;function r(i,a,s,l){const c=Array.isArray(s.children)?n:t;return l?c(a,s,l):c(a,s)}}function Ek(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),u=ad(r);return t(i,a,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Ck(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&sd.call(t.properties,i)){const a=zk(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&yk.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Tk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Pa(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Pa(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function od(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:hk;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const l=ly(e,a,s);l!==void 0&&n.push(l)}return n}function zk(e,t,n){const r=Aw(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?kw(n):Fw(n)),r.property==="style"){let i=typeof n=="object"?n:Rk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Pk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Pw[r.property]||r.property:r.attribute,n]}}function Rk(e,t){try{return fk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=sy+"#cannot-parse-style-attribute",i}}function uy(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=Xf(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=Xf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return sd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(e,t){const n=new Dt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=sy+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Pk(e){const t={};let n;for(n in e)sd.call(e,n)&&(t[Ik(n)]=e[n]);return t}function Ik(e){let t=e.replace(mk,_k);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function _k(e){return"-"+e.toLowerCase()}const bo={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ak={};function ud(e,t){const n=Ak,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cy(e,r,i)}function cy(e,t,n){if(Dk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sp(e.children,t,n)}return Array.isArray(e)?sp(e,t,n):""}function sp(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=cy(e[i],t,n);return r.join("")}function Dk(e){return!!(e&&typeof e=="object")}const lp=document.createElement("i");function cd(e){const t="&"+e+";";lp.innerHTML=t;const n=lp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nn(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function dn(e,t){return e.length>0?(nn(e,e.length,0,t),e):t}const op={}.hasOwnProperty;function dy(e){const t={};let n=-1;for(;++n<e.length;)Ok(t,e[n]);return t}function Ok(e,t){let n;for(n in t){const i=(op.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){op.call(i,s)||(i[s]=[]);const l=a[s];Lk(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Lk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);nn(e,0,0,r)}function fy(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Nn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ft=kr(/[A-Za-z]/),_t=kr(/[\dA-Za-z]/),Fk=kr(/[#-'*+\--9=?A-Z^-~]/);function il(e){return e!==null&&(e<32||e===127)}const Yu=kr(/\d/),Mk=kr(/[\dA-Fa-f]/),$k=kr(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function We(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const Rl=kr(new RegExp("\\p{P}|\\p{S}","u")),Ur=kr(/\s/);function kr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Oi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&_t(e.charCodeAt(n+1))&&_t(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Fe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Ie(u)?(e.enter(n),l(u)):t(u)}function l(u){return Ie(u)&&a++<i?(e.consume(u),l):(e.exit(n),t(u))}}const Bk={tokenize:Hk};function Hk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Fe(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return he(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}const Uk={tokenize:Wk},up={tokenize:Vk};function Wk(e){const t=this,n=[];let r=0,i,a,s;return l;function l(m){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,u,c)(m)}return c(m)}function u(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const j=t.events.length;let k=j,S;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){S=t.events[k][1].end;break}y(r);let T=j;for(;T<t.events.length;)t.events[T][1].end={...S},T++;return nn(t.events,k+1,0,t.events.slice(j)),t.events.length=T,c(m)}return l(m)}function c(m){if(r===n.length){if(!i)return p(m);if(i.currentConstruct&&i.currentConstruct.concrete)return g(m);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(up,f,d)(m)}function f(m){return i&&x(),y(r),p(m)}function d(m){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(m)}function p(m){return t.containerState={},e.attempt(up,h,g)(m)}function h(m){return r++,n.push([t.currentConstruct,t.containerState]),p(m)}function g(m){if(m===null){i&&x(),y(0),e.consume(m);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),v(m)}function v(m){if(m===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(m);return}return he(m)?(e.consume(m),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(m),v)}function w(m,j){const k=t.sliceStream(m);if(j&&k.push(null),m.previous=a,a&&(a.next=m),a=m,i.defineSkip(m.start),i.write(k),t.parser.lazy[m.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const T=t.events.length;let z=T,D,C;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(D){C=t.events[z][1].end;break}D=!0}for(y(r),S=T;S<t.events.length;)t.events[S][1].end={...C},S++;nn(t.events,z+1,0,t.events.slice(T)),t.events.length=S}}function y(m){let j=n.length;for(;j-- >m;){const k=n[j];t.containerState=k[1],k[0].exit.call(t,e)}n.length=m}function x(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Vk(e,t,n){return Fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pi(e){if(e===null||We(e)||Ur(e))return 1;if(Rl(e))return 2}function Pl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Xu={name:"attention",resolveAll:qk,tokenize:Gk};function qk(e,t){let n=-1,r,i,a,s,l,u,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};cp(d,-u),cp(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=dn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=dn(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=dn(c,Pl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=dn(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=dn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,nn(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Gk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Pi(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===a)return e.consume(u),l;const c=e.exit("attentionSequence"),f=Pi(u),d=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return c._open=!!(a===42?d:d&&(i||!p)),c._close=!!(a===42?p:p&&(f||!d)),t(u)}}function cp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Yk={name:"autolink",tokenize:Xk};function Xk(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Ft(h)?(e.consume(h),s):h===64?n(h):c(h)}function s(h){return h===43||h===45||h===46||_t(h)?(r=1,l(h)):c(h)}function l(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||_t(h))&&r++<32?(e.consume(h),l):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||il(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),f):Fk(h)?(e.consume(h),c):n(h)}function f(h){return _t(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||_t(h))&&r++<63){const g=h===45?p:d;return e.consume(h),g}return n(h)}}const $a={partial:!0,tokenize:Kk};function Kk(e,t,n){return r;function r(a){return Ie(a)?Fe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||he(a)?t(a):n(a)}}const py={continuation:{tokenize:Jk},exit:Zk,name:"blockQuote",tokenize:Qk};function Qk(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Ie(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Jk(e,t,n){const r=this;return i;function i(s){return Ie(s)?Fe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(py,t,n)(s)}}function Zk(e){e.exit("blockQuote")}const hy={name:"characterEscape",tokenize:e0};function e0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return $k(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const my={name:"characterReference",tokenize:t0};function t0(e,t,n){const r=this;let i=0,a,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=_t,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Mk,f):(e.enter("characterReferenceValue"),a=7,s=Yu,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===_t&&!cd(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),f):n(d)}}const dp={partial:!0,tokenize:r0},fp={concrete:!0,name:"codeFenced",tokenize:n0};function n0(e,t,n){const r=this,i={partial:!0,tokenize:k};let a=0,s=0,l;return u;function u(S){return c(S)}function c(S){const T=r.events[r.events.length-1];return a=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===l?(s++,e.consume(S),f):s<3?n(S):(e.exit("codeFencedFenceSequence"),Ie(S)?Fe(e,d,"whitespace")(S):d(S))}function d(S){return S===null||he(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(dp,v,j)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||he(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):Ie(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Fe(e,h,"whitespace")(S)):S===96&&S===l?n(S):(e.consume(S),p)}function h(S){return S===null||he(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||he(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===l?n(S):(e.consume(S),g)}function v(S){return e.attempt(i,j,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return a>0&&Ie(S)?Fe(e,x,"linePrefix",a+1)(S):x(S)}function x(S){return S===null||he(S)?e.check(dp,v,j)(S):(e.enter("codeFlowValue"),m(S))}function m(S){return S===null||he(S)?(e.exit("codeFlowValue"),x(S)):(e.consume(S),m)}function j(S){return e.exit("codeFenced"),t(S)}function k(S,T,z){let D=0;return C;function C(K){return S.enter("lineEnding"),S.consume(K),S.exit("lineEnding"),M}function M(K){return S.enter("codeFencedFence"),Ie(K)?Fe(S,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):H(K)}function H(K){return K===l?(S.enter("codeFencedFenceSequence"),L(K)):z(K)}function L(K){return K===l?(D++,S.consume(K),L):D>=s?(S.exit("codeFencedFenceSequence"),Ie(K)?Fe(S,$,"whitespace")(K):$(K)):z(K)}function $(K){return K===null||he(K)?(S.exit("codeFencedFence"),T(K)):z(K)}}}function r0(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const wo={name:"codeIndented",tokenize:a0},i0={partial:!0,tokenize:s0};function a0(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Fe(e,a,"linePrefix",5)(c)}function a(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):he(c)?e.attempt(i0,s,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||he(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function s0(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):he(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Fe(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):he(s)?i(s):n(s)}}const l0={name:"codeText",previous:u0,resolve:o0,tokenize:c0};function o0(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function u0(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c0(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):he(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||he(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class d0{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&qi(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),qi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);qi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qi(this.left,n.reverse())}}}function qi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gy(e){const t={};let n=-1,r,i,a,s,l,u,c;const f=new d0(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,f0(f,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return nn(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function f0(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,u=[],c={};let f,d,p=-1,h=n,g=0,v=0;const w=[v];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(v=p+1,w.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const y=l.slice(w[p],w[p+1]),x=a.pop();u.push([x,x+y.length-1]),e.splice(x,2,y)}for(u.reverse(),p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const p0={resolve:m0,tokenize:g0},h0={partial:!0,tokenize:y0};function m0(e){return gy(e),e}function g0(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):he(l)?e.check(h0,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function y0(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Fe(e,a,"linePrefix")}function a(s){if(s===null||he(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function yy(e,t,n,r,i,a,s,l,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),p):y===null||y===32||y===41||il(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(y))}function p(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(l),p(y)):y===null||y===60||he(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function v(y){return!f&&(y===null||y===41||We(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):f<c&&y===40?(e.consume(y),f++,v):y===41?(e.consume(y),f--,v):y===null||y===32||y===40||il(y)?n(y):(e.consume(y),y===92?w:v)}function w(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function xy(e,t,n,r,i,a){const s=this;let l=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),f}function f(h){return l>999||h===null||h===91||h===93&&!u||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):he(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||he(h)||l++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!Ie(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function vy(e,t,n,r,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),u(s)):p===null?n(p):he(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Fe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||he(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:f)}function d(p){return p===s||p===92?(e.consume(p),f):f(p)}}function da(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ie(i)?Fe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const x0={name:"definition",tokenize:b0},v0={partial:!0,tokenize:w0};function b0(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return xy.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return We(h)?da(e,c)(h):c(h)}function c(h){return yy(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(v0,d,d)(h)}function d(h){return Ie(h)?Fe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||he(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function w0(e,t,n){return r;function r(l){return We(l)?da(e,i)(l):n(l)}function i(l){return vy(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ie(l)?Fe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||he(l)?t(l):n(l)}}const k0={name:"hardBreakEscape",tokenize:S0};function S0(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return he(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const j0={name:"headingAtx",resolve:N0,tokenize:E0};function N0(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function E0(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||We(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||he(f)?(e.exit("atxHeading"),t(f)):Ie(f)?Fe(e,l,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),l(f))}function c(f){return f===null||f===35||We(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),c)}}const C0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],pp=["pre","script","style","textarea"],T0={concrete:!0,name:"htmlFlow",resolveTo:P0,tokenize:I0},z0={partial:!0,tokenize:A0},R0={partial:!0,tokenize:_0};function P0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function I0(e,t,n){const r=this;let i,a,s,l,u;return c;function c(E){return f(E)}function f(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),d}function d(E){return E===33?(e.consume(E),p):E===47?(e.consume(E),a=!0,v):E===63?(e.consume(E),i=3,r.interrupt?t:N):Ft(E)?(e.consume(E),s=String.fromCharCode(E),w):n(E)}function p(E){return E===45?(e.consume(E),i=2,h):E===91?(e.consume(E),i=5,l=0,g):Ft(E)?(e.consume(E),i=4,r.interrupt?t:N):n(E)}function h(E){return E===45?(e.consume(E),r.interrupt?t:N):n(E)}function g(E){const pe="CDATA[";return E===pe.charCodeAt(l++)?(e.consume(E),l===pe.length?r.interrupt?t:H:g):n(E)}function v(E){return Ft(E)?(e.consume(E),s=String.fromCharCode(E),w):n(E)}function w(E){if(E===null||E===47||E===62||We(E)){const pe=E===47,je=s.toLowerCase();return!pe&&!a&&pp.includes(je)?(i=1,r.interrupt?t(E):H(E)):C0.includes(s.toLowerCase())?(i=6,pe?(e.consume(E),y):r.interrupt?t(E):H(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):a?x(E):m(E))}return E===45||_t(E)?(e.consume(E),s+=String.fromCharCode(E),w):n(E)}function y(E){return E===62?(e.consume(E),r.interrupt?t:H):n(E)}function x(E){return Ie(E)?(e.consume(E),x):C(E)}function m(E){return E===47?(e.consume(E),C):E===58||E===95||Ft(E)?(e.consume(E),j):Ie(E)?(e.consume(E),m):C(E)}function j(E){return E===45||E===46||E===58||E===95||_t(E)?(e.consume(E),j):k(E)}function k(E){return E===61?(e.consume(E),S):Ie(E)?(e.consume(E),k):m(E)}function S(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),u=E,T):Ie(E)?(e.consume(E),S):z(E)}function T(E){return E===u?(e.consume(E),u=null,D):E===null||he(E)?n(E):(e.consume(E),T)}function z(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||We(E)?k(E):(e.consume(E),z)}function D(E){return E===47||E===62||Ie(E)?m(E):n(E)}function C(E){return E===62?(e.consume(E),M):n(E)}function M(E){return E===null||he(E)?H(E):Ie(E)?(e.consume(E),M):n(E)}function H(E){return E===45&&i===2?(e.consume(E),ie):E===60&&i===1?(e.consume(E),ce):E===62&&i===4?(e.consume(E),te):E===63&&i===3?(e.consume(E),N):E===93&&i===5?(e.consume(E),Q):he(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(z0,le,L)(E)):E===null||he(E)?(e.exit("htmlFlowData"),L(E)):(e.consume(E),H)}function L(E){return e.check(R0,$,le)(E)}function $(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),K}function K(E){return E===null||he(E)?L(E):(e.enter("htmlFlowData"),H(E))}function ie(E){return E===45?(e.consume(E),N):H(E)}function ce(E){return E===47?(e.consume(E),s="",I):H(E)}function I(E){if(E===62){const pe=s.toLowerCase();return pp.includes(pe)?(e.consume(E),te):H(E)}return Ft(E)&&s.length<8?(e.consume(E),s+=String.fromCharCode(E),I):H(E)}function Q(E){return E===93?(e.consume(E),N):H(E)}function N(E){return E===62?(e.consume(E),te):E===45&&i===2?(e.consume(E),N):H(E)}function te(E){return E===null||he(E)?(e.exit("htmlFlowData"),le(E)):(e.consume(E),te)}function le(E){return e.exit("htmlFlow"),t(E)}}function _0(e,t,n){const r=this;return i;function i(s){return he(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function A0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt($a,t,n)}}const D0={name:"htmlText",tokenize:O0};function O0(e,t,n){const r=this;let i,a,s;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),c):N===47?(e.consume(N),k):N===63?(e.consume(N),m):Ft(N)?(e.consume(N),z):n(N)}function c(N){return N===45?(e.consume(N),f):N===91?(e.consume(N),a=0,g):Ft(N)?(e.consume(N),x):n(N)}function f(N){return N===45?(e.consume(N),h):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),p):he(N)?(s=d,ce(N)):(e.consume(N),d)}function p(N){return N===45?(e.consume(N),h):d(N)}function h(N){return N===62?ie(N):N===45?p(N):d(N)}function g(N){const te="CDATA[";return N===te.charCodeAt(a++)?(e.consume(N),a===te.length?v:g):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),w):he(N)?(s=v,ce(N)):(e.consume(N),v)}function w(N){return N===93?(e.consume(N),y):v(N)}function y(N){return N===62?ie(N):N===93?(e.consume(N),y):v(N)}function x(N){return N===null||N===62?ie(N):he(N)?(s=x,ce(N)):(e.consume(N),x)}function m(N){return N===null?n(N):N===63?(e.consume(N),j):he(N)?(s=m,ce(N)):(e.consume(N),m)}function j(N){return N===62?ie(N):m(N)}function k(N){return Ft(N)?(e.consume(N),S):n(N)}function S(N){return N===45||_t(N)?(e.consume(N),S):T(N)}function T(N){return he(N)?(s=T,ce(N)):Ie(N)?(e.consume(N),T):ie(N)}function z(N){return N===45||_t(N)?(e.consume(N),z):N===47||N===62||We(N)?D(N):n(N)}function D(N){return N===47?(e.consume(N),ie):N===58||N===95||Ft(N)?(e.consume(N),C):he(N)?(s=D,ce(N)):Ie(N)?(e.consume(N),D):ie(N)}function C(N){return N===45||N===46||N===58||N===95||_t(N)?(e.consume(N),C):M(N)}function M(N){return N===61?(e.consume(N),H):he(N)?(s=M,ce(N)):Ie(N)?(e.consume(N),M):D(N)}function H(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,L):he(N)?(s=H,ce(N)):Ie(N)?(e.consume(N),H):(e.consume(N),$)}function L(N){return N===i?(e.consume(N),i=void 0,K):N===null?n(N):he(N)?(s=L,ce(N)):(e.consume(N),L)}function $(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||We(N)?D(N):(e.consume(N),$)}function K(N){return N===47||N===62||We(N)?D(N):n(N)}function ie(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ce(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),I}function I(N){return Ie(N)?Fe(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):Q(N)}function Q(N){return e.enter("htmlTextData"),s(N)}}const dd={name:"labelEnd",resolveAll:$0,resolveTo:B0,tokenize:H0},L0={tokenize:U0},F0={tokenize:W0},M0={tokenize:V0};function $0(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&nn(e,0,e.length,n),e}function B0(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=dn(l,e.slice(a+1,a+r+3)),l=dn(l,[["enter",f,t]]),l=dn(l,Pl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=dn(l,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),l=dn(l,e.slice(s+1)),l=dn(l,[["exit",u,t]]),nn(e,a,e.length,l),e}function H0(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(p){return a?a._inactive?d(p):(s=r.parser.defined.includes(Nn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(L0,f,s?f:d)(p):p===91?e.attempt(F0,f,s?c:d)(p):s?f(p):d(p)}function c(p){return e.attempt(M0,f,d)(p)}function f(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function U0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return We(d)?da(e,a)(d):a(d)}function a(d){return d===41?f(d):yy(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return We(d)?da(e,u)(d):f(d)}function l(d){return n(d)}function u(d){return d===34||d===39||d===40?vy(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return We(d)?da(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function W0(e,t,n){const r=this;return i;function i(l){return xy.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function V0(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const q0={name:"labelStartImage",resolveAll:dd.resolveAll,tokenize:G0};function G0(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Y0={name:"labelStartLink",resolveAll:dd.resolveAll,tokenize:X0};function X0(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ko={name:"lineEnding",tokenize:K0};function K0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Fe(e,t,"linePrefix")}}const Ts={name:"thematicBreak",tokenize:Q0};function Q0(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||he(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Ie(c)?Fe(e,l,"whitespace")(c):l(c))}}const Wt={continuation:{tokenize:t1},exit:r1,name:"list",tokenize:e1},J0={partial:!0,tokenize:i1},Z0={partial:!0,tokenize:n1};function e1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Yu(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ts,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Yu(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check($a,r.interrupt?n:f,e.attempt(J0,p,d))}function f(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function d(h){return Ie(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function t1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($a,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Fe(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ie(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Z0,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Fe(e,e.attempt(Wt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function n1(e,t,n){const r=this;return Fe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function r1(e){e.exit(this.containerState.type)}function i1(e,t,n){const r=this;return Fe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Ie(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const hp={name:"setextUnderline",resolveTo:a1,tokenize:s1};function a1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function s1(e,t,n){const r=this;let i;return a;function a(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Ie(c)?Fe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||he(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const l1={tokenize:o1};function o1(e){const t=this,n=e.attempt($a,r,e.attempt(this.parser.constructs.flowInitial,i,Fe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(p0,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const u1={resolveAll:wy()},c1=by("string"),d1=by("text");function by(e){return{resolveAll:wy(e==="text"?f1:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(f){return c(f)?a(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return c(f)?(n.exit("data"),a(f)):(n.consume(f),u)}function c(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function wy(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function f1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)u=!0,l++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const p1={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:py},h1={91:x0},m1={[-2]:wo,[-1]:wo,32:wo},g1={35:j0,42:Ts,45:[hp,Ts],60:T0,61:hp,95:Ts,96:fp,126:fp},y1={38:my,92:hy},x1={[-5]:ko,[-4]:ko,[-3]:ko,33:q0,38:my,42:Xu,60:[Yk,D0],91:Y0,92:[k0,hy],93:dd,95:Xu,96:l0},v1={null:[Xu,u1]},b1={null:[42,95]},w1={null:[]},k1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:b1,contentInitial:h1,disable:w1,document:p1,flow:g1,flowInitial:m1,insideSpan:v1,string:y1,text:x1},Symbol.toStringTag,{value:"Module"}));function S1(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],l=[];const u={attempt:T(k),check:T(S),consume:x,enter:m,exit:j,interrupt:T(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let f=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function d(M){return s=dn(s,M),w(),s[s.length-1]!==null?[]:(z(t,0),c.events=Pl(a,c.events,c),c.events)}function p(M,H){return N1(h(M),H)}function h(M){return j1(s,M)}function g(){const{_bufferIndex:M,_index:H,line:L,column:$,offset:K}=r;return{_bufferIndex:M,_index:H,line:L,column:$,offset:K}}function v(M){i[M.line]=M.column,C()}function w(){let M;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<H.length;)y(H.charCodeAt(r._bufferIndex));else y(H)}}function y(M){f=f(M)}function x(M){he(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,C()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function m(M,H){const L=H||{};return L.type=M,L.start=g(),c.events.push(["enter",L,c]),l.push(L),L}function j(M){const H=l.pop();return H.end=g(),c.events.push(["exit",H,c]),H}function k(M,H){z(M,H.from)}function S(M,H){H.restore()}function T(M,H){return L;function L($,K,ie){let ce,I,Q,N;return Array.isArray($)?le($):"tokenize"in $?le([$]):te($);function te(se){return G;function G(_){const q=_!==null&&se[_],J=_!==null&&se.null,re=[...Array.isArray(q)?q:q?[q]:[],...Array.isArray(J)?J:J?[J]:[]];return le(re)(_)}}function le(se){return ce=se,I=0,se.length===0?ie:E(se[I])}function E(se){return G;function G(_){return N=D(),Q=se,se.partial||(c.currentConstruct=se),se.name&&c.parser.constructs.disable.null.includes(se.name)?je():se.tokenize.call(H?Object.assign(Object.create(c),H):c,u,pe,je)(_)}}function pe(se){return M(Q,N),K}function je(se){return N.restore(),++I<ce.length?E(ce[I]):ie}}}function z(M,H){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&nn(c.events,H,c.events.length-H,M.resolve(c.events.slice(H),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function D(){const M=g(),H=c.previous,L=c.currentConstruct,$=c.events.length,K=Array.from(l);return{from:$,restore:ie};function ie(){r=M,c.previous=H,c.currentConstruct=L,c.events.length=$,l=K,C()}}function C(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function j1(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function N1(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
42
|
+
`;break}case-3:{s=`\r
|
|
43
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function E1(e){const r={constructs:dy([k1,...(e||{}).extensions||[]]),content:i(Bk),defined:[],document:i(Uk),flow:i(l1),lazy:{},string:i(c1),text:i(d1)};return r;function i(a){return s;function s(l){return S1(r,a,l)}}}function C1(e){for(;!gy(e););return e}const mp=/[\0\t\n\r]/g;function T1(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const u=[];let c,f,d,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(mp.lastIndex=d,c=mp.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(d);break}if(h===10&&d===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<p&&(u.push(a.slice(d,p)),e+=p-d),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const z1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function R1(e){return e.replace(z1,P1)}function P1(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return fy(n.slice(a?2:1),a?16:10)}return cd(n)||e}const ky={}.hasOwnProperty;function I1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),_1(n)(C1(E1(n).document().write(T1()(e,t,!0))))}function _1(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Le),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(Oe),blockQuote:a(J),characterEscape:D,characterReference:D,codeFenced:a(re),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(re,s),codeText:a(xe,s),codeTextData:D,data:D,codeFlowValue:D,definition:a(ve),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Ue),hardBreakEscape:a(Z),hardBreakTrailing:a(Z),htmlFlow:a(ke,s),htmlFlowData:D,htmlText:a(ke,s),htmlTextData:D,image:a(yt),label:s,link:a(Le),listItem:a(de),listItemValue:p,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(Be),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Oe),strong:a(tt),thematicBreak:a(dt)},exit:{atxHeading:u(),atxHeadingSequence:k,autolink:u(),autolinkEmail:q,autolinkProtocol:_,blockQuote:u(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:se,characterReference:G,codeFenced:u(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:C,codeIndented:u(y),codeText:u(K),codeTextData:C,data:C,definition:u(),definitionDestinationString:j,definitionLabelString:x,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(H),hardBreakTrailing:u(H),htmlFlow:u(L),htmlFlowData:C,htmlText:u($),htmlTextData:C,image:u(ce),label:Q,labelText:I,lineEnding:M,link:u(ie),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:pe,resourceDestinationString:N,resourceTitleString:te,resource:le,setextHeading:u(z),setextHeadingLineSequence:T,setextHeadingText:S,strong:u(),thematicBreak:u()}};Sy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(P){let U={type:"root",children:[]};const ue={stack:[U],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:f,data:n},ge=[];let Se=-1;for(;++Se<P.length;)if(P[Se][1].type==="listOrdered"||P[Se][1].type==="listUnordered")if(P[Se][0]==="enter")ge.push(Se);else{const Ve=ge.pop();Se=i(P,Ve,Se)}for(Se=-1;++Se<P.length;){const Ve=t[P[Se][0]];ky.call(Ve,P[Se][1].type)&&Ve[P[Se][1].type].call(Object.assign({sliceSerialize:P[Se][2].sliceSerialize},ue),P[Se][1])}if(ue.tokenStack.length>0){const Ve=ue.tokenStack[ue.tokenStack.length-1];(Ve[1]||gp).call(ue,void 0,Ve[0])}for(U.position={start:Zn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Zn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)U=t.transforms[Se](U)||U;return U}function i(P,U,ue){let ge=U-1,Se=-1,Ve=!1,nt,pt,Ct,bt;for(;++ge<=ue;){const rt=P[ge];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?Se++:Se--,bt=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(nt&&!bt&&!Se&&!Ct&&(Ct=ge),bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bt=void 0}if(!Se&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||Se===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(nt){let Je=ge;for(pt=void 0;Je--;){const wt=P[Je];if(wt[1].type==="lineEnding"||wt[1].type==="lineEndingBlank"){if(wt[0]==="exit")continue;pt&&(P[pt][1].type="lineEndingBlank",Ve=!0),wt[1].type="lineEnding",pt=Je}else if(!(wt[1].type==="linePrefix"||wt[1].type==="blockQuotePrefix"||wt[1].type==="blockQuotePrefixWhitespace"||wt[1].type==="blockQuoteMarker"||wt[1].type==="listItemIndent"))break}Ct&&(!pt||Ct<pt)&&(nt._spread=!0),nt.end=Object.assign({},pt?P[pt][1].start:rt[1].end),P.splice(pt||ge,0,["exit",nt,rt[2]]),ge++,ue++}if(rt[1].type==="listItemPrefix"){const Je={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};nt=Je,P.splice(ge,0,["enter",Je,rt[2]]),ge++,ue++,Ct=void 0,bt=!0}}}return P[U][1]._spread=Ve,ue}function a(P,U){return ue;function ue(ge){l.call(this,P(ge),ge),U&&U.call(this,ge)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(P,U,ue){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([U,ue||void 0]),P.position={start:Zn(U.start),end:void 0}}function u(P){return U;function U(ue){P&&P.call(this,ue),c.call(this,ue)}}function c(P,U){const ue=this.stack.pop(),ge=this.tokenStack.pop();if(ge)ge[0].type!==P.type&&(U?U.call(this,P,ge[0]):(ge[1]||gp).call(this,P,ge[0]));else throw new Error("Cannot close `"+P.type+"` ("+ca({start:P.start,end:P.end})+"): it’s not open");ue.position.end=Zn(P.end)}function f(){return ud(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(P){if(this.data.expectingFirstListItemValue){const U=this.stack[this.stack.length-2];U.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function h(){const P=this.resume(),U=this.stack[this.stack.length-1];U.lang=P}function g(){const P=this.resume(),U=this.stack[this.stack.length-1];U.meta=P}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const P=this.resume(),U=this.stack[this.stack.length-1];U.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const P=this.resume(),U=this.stack[this.stack.length-1];U.value=P.replace(/(\r?\n|\r)$/g,"")}function x(P){const U=this.resume(),ue=this.stack[this.stack.length-1];ue.label=U,ue.identifier=Nn(this.sliceSerialize(P)).toLowerCase()}function m(){const P=this.resume(),U=this.stack[this.stack.length-1];U.title=P}function j(){const P=this.resume(),U=this.stack[this.stack.length-1];U.url=P}function k(P){const U=this.stack[this.stack.length-1];if(!U.depth){const ue=this.sliceSerialize(P).length;U.depth=ue}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function T(P){const U=this.stack[this.stack.length-1];U.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function D(P){const ue=this.stack[this.stack.length-1].children;let ge=ue[ue.length-1];(!ge||ge.type!=="text")&&(ge=Ht(),ge.position={start:Zn(P.start),end:void 0},ue.push(ge)),this.stack.push(ge)}function C(P){const U=this.stack.pop();U.value+=this.sliceSerialize(P),U.position.end=Zn(P.end)}function M(P){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=U.children[U.children.length-1];ue.position.end=Zn(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(U.type)&&(D.call(this,P),C.call(this,P))}function H(){this.data.atHardBreak=!0}function L(){const P=this.resume(),U=this.stack[this.stack.length-1];U.value=P}function $(){const P=this.resume(),U=this.stack[this.stack.length-1];U.value=P}function K(){const P=this.resume(),U=this.stack[this.stack.length-1];U.value=P}function ie(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=U,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function ce(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=U,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function I(P){const U=this.sliceSerialize(P),ue=this.stack[this.stack.length-2];ue.label=R1(U),ue.identifier=Nn(U).toLowerCase()}function Q(){const P=this.stack[this.stack.length-1],U=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const ge=P.children;ue.children=ge}else ue.alt=U}function N(){const P=this.resume(),U=this.stack[this.stack.length-1];U.url=P}function te(){const P=this.resume(),U=this.stack[this.stack.length-1];U.title=P}function le(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function pe(P){const U=this.resume(),ue=this.stack[this.stack.length-1];ue.label=U,ue.identifier=Nn(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function je(P){this.data.characterReferenceType=P.type}function se(P){const U=this.sliceSerialize(P),ue=this.data.characterReferenceType;let ge;ue?(ge=fy(U,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=cd(U);const Se=this.stack[this.stack.length-1];Se.value+=ge}function G(P){const U=this.stack.pop();U.position.end=Zn(P.end)}function _(P){C.call(this,P);const U=this.stack[this.stack.length-1];U.url=this.sliceSerialize(P)}function q(P){C.call(this,P);const U=this.stack[this.stack.length-1];U.url="mailto:"+this.sliceSerialize(P)}function J(){return{type:"blockquote",children:[]}}function re(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ue(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function ke(){return{type:"html",value:""}}function yt(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Ce(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function de(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function Be(){return{type:"paragraph",children:[]}}function tt(){return{type:"strong",children:[]}}function Ht(){return{type:"text",value:""}}function dt(){return{type:"thematicBreak"}}}function Zn(e){return{line:e.line,column:e.column,offset:e.offset}}function Sy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Sy(e,r):A1(e,r)}}function A1(e,t){let n;for(n in t)if(ky.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function gp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ca({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ca({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ca({start:t.start,end:t.end})+") is still open")}function D1(e){const t=this;t.parser=n;function n(r){return I1(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function O1(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function L1(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
44
|
+
`}]}function F1(e,t){const n=t.value?t.value+`
|
|
45
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function M1(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $1(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function B1(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Oi(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function H1(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U1(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function W1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jy(e,t);const i={src:Oi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function V1(e,t){const n={src:Oi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function q1(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function G1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jy(e,t);const i={href:Oi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Y1(e,t){const n={href:Oi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function X1(e,t,n){const r=e.all(t),i=n?K1(n):Ny(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
46
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
47
|
+
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function K1(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ny(n[r])}return t}function Ny(e){const t=e.spread;return t??e.children.length>1}function Q1(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function J1(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z1(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=ad(t.children[1]),u=iy(t.children[t.children.length-1]);l&&u&&(s.position={start:l,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function nS(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const d=t.children[u],p={},h=s?s[u]:void 0;h&&(p.align=h);let g={type:"element",tagName:a,properties:p,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function rS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yp=9,xp=32;function iS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(vp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(vp(t.slice(i),i>0,!1)),a.join("")}function vp(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===yp||a===xp;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===yp||a===xp;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function aS(e,t){const n={type:"text",value:iS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const lS={blockquote:O1,break:L1,code:F1,delete:M1,emphasis:$1,footnoteReference:B1,heading:H1,html:U1,imageReference:W1,image:V1,inlineCode:q1,linkReference:G1,link:Y1,listItem:X1,list:Q1,paragraph:J1,root:Z1,strong:eS,table:tS,tableCell:rS,tableRow:nS,text:aS,thematicBreak:sS,toml:ls,yaml:ls,definition:ls,footnoteDefinition:ls};function ls(){}const Ey=-1,Il=0,fa=1,al=2,fd=3,pd=4,hd=5,md=6,Cy=7,Ty=8,oS=typeof self=="object"?self:globalThis,bp=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new oS[e](t)},uS=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Il:case Ey:return n(s,i);case fa:{const l=n([],i);for(const u of s)l.push(r(u));return l}case al:{const l=n({},i);for(const[u,c]of s)l[r(u)]=r(c);return l}case fd:return n(new Date(s),i);case pd:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case hd:{const l=n(new Map,i);for(const[u,c]of s)l.set(r(u),r(c));return l}case md:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case Cy:{const{name:l,message:u}=s;return n(bp(l,u),i)}case Ty:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(bp(a,s),i)};return r},wp=e=>uS(new Map,e)(0),Kr="",{toString:cS}={},{keys:dS}=Object,Gi=e=>{const t=typeof e;if(t!=="object"||!e)return[Il,t];const n=cS.call(e).slice(8,-1);switch(n){case"Array":return[fa,Kr];case"Object":return[al,Kr];case"Date":return[fd,Kr];case"RegExp":return[pd,Kr];case"Map":return[hd,Kr];case"Set":return[md,Kr];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:n.includes("Error")?[Cy,n]:[al,n]},os=([e,t])=>e===Il&&(t==="function"||t==="symbol"),fS=(e,t,n,r)=>{const i=(s,l)=>{const u=r.push(s)-1;return n.set(l,u),u},a=s=>{if(n.has(s))return n.get(s);let[l,u]=Gi(s);switch(l){case Il:{let f=s;switch(u){case"bigint":l=Ty,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Ey],s)}return i([l,f],s)}case fa:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}const f=[],d=i([l,f],s);for(const p of s)f.push(a(p));return d}case al:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],d=i([l,f],s);for(const p of dS(s))(e||!os(Gi(s[p])))&&f.push([a(p),a(s[p])]);return d}case fd:return i([l,s.toISOString()],s);case pd:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case hd:{const f=[],d=i([l,f],s);for(const[p,h]of s)(e||!(os(Gi(p))||os(Gi(h))))&&f.push([a(p),a(h)]);return d}case md:{const f=[],d=i([l,f],s);for(const p of s)(e||!os(Gi(p)))&&f.push(a(p));return d}}const{message:c}=s;return i([l,{name:u,message:c}],s)};return a},kp=(e,{json:t,lossy:n}={})=>{const r=[];return fS(!(t||n),!!t,new Map,r)(e),r},sl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wp(kp(e,t)):structuredClone(e):(e,t)=>wp(kp(e,t));function pS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function mS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pS,r=e.options.footnoteBackLabel||hS,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),p=Oi(d.toLowerCase());let h=0;const g=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++h<=v;){g.length>0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(u,h);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...g)}else f.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...sl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
48
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
49
|
+
`}]}}const _l=function(e){if(e==null)return vS;if(typeof e=="function")return Al(e);if(typeof e=="object")return Array.isArray(e)?gS(e):yS(e);if(typeof e=="string")return xS(e);throw new Error("Expected function, string, or object as test")};function gS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_l(e[n]);return Al(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function yS(e){const t=e;return Al(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function xS(e){return Al(t);function t(n){return n&&n.type===e}}function Al(e){return t;function t(n,r,i){return!!(bS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vS(){return!0}function bS(e){return e!==null&&typeof e=="object"&&"type"in e}const zy=[],wS=!0,Ku=!1,kS="skip";function Ry(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=_l(i),s=r?-1:1;l(e,void 0,[])();function l(u,c,f){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=zy,g,v,w;if((!t||a(u,c,f[f.length-1]||void 0))&&(h=SS(n(u,f)),h[0]===Ku))return h;if("children"in u&&u.children){const y=u;if(y.children&&h[0]!==kS)for(v=(r?y.children.length:-1)+s,w=f.concat(y);v>-1&&v<y.children.length;){const x=y.children[v];if(g=l(x,v,w)(),g[0]===Ku)return g;v=typeof g[1]=="number"?g[1]:v+s}}return h}}}function SS(e){return Array.isArray(e)?e:typeof e=="number"?[wS,e]:e==null?zy:[e]}function gd(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Ry(e,a,l,i);function l(u,c){const f=c[c.length-1],d=f?f.children.indexOf(u):void 0;return s(u,d,f)}}const Qu={}.hasOwnProperty,jS={};function NS(e,t){const n=t||jS,r=new Map,i=new Map,a=new Map,s={...lS,...n.handlers},l={all:c,applyData:CS,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:ES,wrap:zS};return gd(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),l;function u(f,d){const p=f.type,h=l.handlers[p];if(Qu.call(l.handlers,p)&&h)return h(l,f,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:v,...w}=f,y=sl(w);return y.children=l.all(f),y}return sl(f)}return(l.options.unknownHandler||TS)(l,f,d)}function c(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=l.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Sp(g.value)),!Array.isArray(g)&&g.type==="element")){const v=g.children[0];v&&v.type==="text"&&(v.value=Sp(v.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function ES(e,t){e.position&&(t.position=pk(e))}function CS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,sl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function TS(e,t){const n=t.data||{},r="value"in t&&!(Qu.call(n,"hProperties")||Qu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
50
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
51
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
52
|
+
`}),n}function Sp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jp(e,t){const n=NS(e,t),r=n.one(e,void 0),i=mS(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
53
|
+
`},i),a}function RS(e,t){return e&&"run"in e?async function(n,r){const i=jp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jp(n,{file:r,...e||t})}}function Np(e){if(e)throw e}var zs=Object.prototype.hasOwnProperty,Py=Object.prototype.toString,Ep=Object.defineProperty,Cp=Object.getOwnPropertyDescriptor,Tp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Py.call(t)==="[object Array]"},zp=function(t){if(!t||Py.call(t)!=="[object Object]")return!1;var n=zs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&zs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||zs.call(t,i)},Rp=function(t,n){Ep&&n.name==="__proto__"?Ep(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Pp=function(t,n){if(n==="__proto__")if(zs.call(t,n)){if(Cp)return Cp(t,n).value}else return;return t[n]},PS=function e(){var t,n,r,i,a,s,l=arguments[0],u=1,c=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},u=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=Pp(l,n),i=Pp(t,n),l!==i&&(f&&i&&(zp(i)||(a=Tp(i)))?(a?(a=!1,s=r&&Tp(r)?r:[]):s=r&&zp(r)?r:{},Rp(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&Rp(l,{name:n,newValue:i}));return l};const So=_a(PS);function Ju(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function IS(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(u,...c){const f=e[++a];let d=-1;if(u){s(u);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?_S(f,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function _S(e,t){let n;return r;function r(...s){const l=e.length>s.length;let u;l&&s.push(i);try{u=e.apply(this,s)}catch(c){const f=c;if(l&&n)throw f;return i(f)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}const Rn={basename:AS,dirname:DS,extname:OS,join:LS,sep:"/"};function AS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function DS(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function OS(e){Ba(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function LS(...e){let t=-1,n;for(;++t<e.length;)Ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":FS(n)}function FS(e){Ba(e);const t=e.codePointAt(0)===47;let n=MS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MS(e,t){let n="",r=0,i=-1,a=0,s=-1,l,u;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $S={cwd:BS};function BS(){return"/"}function Zu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function HS(e){if(typeof e=="string")e=new URL(e);else if(!Zu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return US(e)}function US(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const jo=["history","path","basename","stem","extname","dirname"];class Iy{constructor(t){let n;t?Zu(t)?n={path:t}:typeof t=="string"||WS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$S.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jo.length;){const a=jo[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)jo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(t){Eo(t,"basename"),No(t,"basename"),this.path=Rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(t){Ip(this.basename,"dirname"),this.path=Rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(t){if(No(t,"extname"),Ip(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zu(t)&&(t=HS(t)),Eo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(t){Eo(t,"stem"),No(t,"stem"),this.path=Rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Dt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function No(e,t){if(e&&e.includes(Rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rn.sep+"`")}function Eo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ip(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function WS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VS=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},qS={}.hasOwnProperty;class yd extends VS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=IS()}copy(){const t=new yd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(So(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zo("data",this.frozen),this.namespace[t]=n,this):qS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=us(t),r=this.parser||this.Parser;return Co("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Co("process",this.parser||this.Parser),To("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=us(t),u=r.parse(l);r.run(u,l,function(f,d,p){if(f||!d||!p)return c(f);const h=d,g=r.stringify(h,p);XS(g)?p.value=g:p.result=g,c(f,p)});function c(f,d){f||!d?s(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Co("processSync",this.parser||this.Parser),To("processSync",this.compiler||this.Compiler),this.process(t,i),Ap("processSync","process",n),r;function i(a,s){n=!0,Np(a),r=s}}run(t,n,r){_p(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const u=us(n);i.run(t,u,c);function c(f,d,p){const h=d||t;f?l(f):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ap("runSync","run",r),i;function a(s,l){Np(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=us(n),i=this.compiler||this.Compiler;return To("stringify",i),_p(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(zo("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;u(f,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=So(!0,i.settings,c.settings))}function l(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[h,...g]=f;const v=r[p][1];Ju(v)&&Ju(h)&&(h=So(!0,v,h)),r[p]=[c,h,...g]}}}}const GS=new yd().freeze();function Co(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function To(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _p(e){if(!Ju(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ap(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function us(e){return YS(e)?e:new Iy(e)}function YS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XS(e){return typeof e=="string"||KS(e)}function KS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dp=[],Op={allowDangerousHtml:!0},JS=/^(https?|ircs?|mailto|xmpp)$/i,ZS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ej(e){const t=tj(e),n=nj(e);return rj(t.runSync(t.parse(n),n),e)}function tj(e){const t=e.rehypePlugins||Dp,n=e.remarkPlugins||Dp,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Op}:Op;return GS().use(D1).use(n).use(RS,r).use(t)}function nj(e){const t=e.children||"",n=new Iy;return typeof t=="string"&&(n.value=t),n}function rj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||ij;for(const f of ZS)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+QS+f.id,void 0);return gd(e,c),xk(e,{Fragment:o.Fragment,components:i,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function c(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in bo)if(Object.hasOwn(bo,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],v=bo[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=u(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,p)),h&&p&&typeof d=="number")return l&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function ij(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||JS.test(e.slice(0,t))?e:""}function Lp(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function aj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sj(e,t,n){const i=_l((n||{}).ignore||[]),a=lj(t);let s=-1;for(;++s<a.length;)Ry(e,"text",l);function l(c,f){let d=-1,p;for(;++d<f.length;){const h=f[d],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return u(c,f)}function u(c,f){const d=f[f.length-1],p=a[s][0],h=a[s][1];let g=0;const w=d.children.indexOf(c);let y=!1,x=[];p.lastIndex=0;let m=p.exec(c.value);for(;m;){const j=m.index,k={index:m.index,input:m.input,stack:[...f,c]};let S=h(...m,k);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=j+1:(g!==j&&x.push({type:"text",value:c.value.slice(g,j)}),Array.isArray(S)?x.push(...S):S&&x.push(S),g=j+m[0].length,y=!0),!p.global)break;m=p.exec(c.value)}return y?(g<c.value.length&&x.push({type:"text",value:c.value.slice(g)}),d.children.splice(w,1,...x)):x=[c],w+x.length}}function lj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([oj(i[0]),uj(i[1])])}return t}function oj(e){return typeof e=="string"?new RegExp(aj(e),"g"):e}function uj(e){return typeof e=="function"?e:function(){return e}}const Ro="phrasing",Po=["autolink","link","image","label"];function cj(){return{transforms:[yj],enter:{literalAutolink:fj,literalAutolinkEmail:Io,literalAutolinkHttp:Io,literalAutolinkWww:Io},exit:{literalAutolink:gj,literalAutolinkEmail:mj,literalAutolinkHttp:pj,literalAutolinkWww:hj}}}function dj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ro,notInConstruct:Po},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ro,notInConstruct:Po},{character:":",before:"[ps]",after:"\\/",inConstruct:Ro,notInConstruct:Po}]}}function fj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Io(e){this.config.enter.autolinkProtocol.call(this,e)}function pj(e){this.config.exit.autolinkProtocol.call(this,e)}function hj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function mj(e){this.config.exit.autolinkEmail.call(this,e)}function gj(e){this.exit(e)}function yj(e){sj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vj]],{ignore:["link","linkReference"]})}function xj(e,t,n,r,i){let a="";if(!_y(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!bj(n)))return!1;const s=wj(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function vj(e,t,n,r){return!_y(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bj(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wj(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Lp(e,"(");let a=Lp(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function _y(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ur(n)||Rl(n))&&(!t||n!==47)}Ay.peek=Rj;function kj(){this.buffer()}function Sj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jj(){this.buffer()}function Nj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ej(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Nn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Cj(e){this.exit(e)}function Tj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Nn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zj(e){this.exit(e)}function Rj(){return"["}function Ay(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function Pj(){return{enter:{gfmFootnoteCallString:kj,gfmFootnoteCall:Sj,gfmFootnoteDefinitionLabelString:jj,gfmFootnoteDefinition:Nj},exit:{gfmFootnoteCallString:Ej,gfmFootnoteCall:Cj,gfmFootnoteDefinitionLabelString:Tj,gfmFootnoteDefinition:zj}}}function Ij(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ay},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const l=a.createTracker(s);let u=l.move("[^");const c=a.enter("footnoteDefinition"),f=a.enter("label");return u+=l.move(a.safe(a.associationId(r),{before:u,after:"]"})),f(),u+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),u+=l.move((t?`
|
|
54
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Dy:_j))),c(),u}}function _j(e,t,n){return t===0?e:Dy(e,t,n)}function Dy(e,t,n){return(n?"":" ")+e}const Aj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Oy.peek=Mj;function Dj(){return{canContainEols:["delete"],enter:{strikethrough:Lj},exit:{strikethrough:Fj}}}function Oj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Aj}],handlers:{delete:Oy}}}function Lj(e){this.enter({type:"delete",children:[]},e)}function Fj(e){this.exit(e)}function Oy(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Mj(){return"~"}function $j(e){return e.length}function Bj(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$j,a=[],s=[],l=[],u=[];let c=0,f=-1;for(;++f<e.length;){const v=[],w=[];let y=-1;for(e[f].length>c&&(c=e[f].length);++y<e[f].length;){const x=Hj(e[f][y]);if(n.alignDelimiters!==!1){const m=i(x);w[y]=m,(u[y]===void 0||m>u[y])&&(u[y]=m)}v.push(x)}s[f]=v,l[f]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=Fp(r[d]);else{const v=Fp(r);for(;++d<c;)a[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=a[d];let w="",y="";v===99?(w=":",y=":"):v===108?w=":":v===114&&(y=":");let x=n.alignDelimiters===!1?1:Math.max(1,u[d]-w.length-y.length);const m=w+"-".repeat(x)+y;n.alignDelimiters!==!1&&(x=w.length+x+y.length,x>u[d]&&(u[d]=x),h[d]=x),p[d]=m}s.splice(1,0,p),l.splice(1,0,h),f=-1;const g=[];for(;++f<s.length;){const v=s[f],w=l[f];d=-1;const y=[];for(;++d<c;){const x=v[d]||"";let m="",j="";if(n.alignDelimiters!==!1){const k=u[d]-(w[d]||0),S=a[d];S===114?m=" ".repeat(k):S===99?k%2?(m=" ".repeat(k/2+.5),j=" ".repeat(k/2-.5)):(m=" ".repeat(k/2),j=m):j=" ".repeat(k)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(m),y.push(x),n.alignDelimiters!==!1&&y.push(j),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
55
|
+
`)}function Hj(e){return e==null?"":String(e)}function Fp(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Uj(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Wj);return i(),s}function Wj(e,t,n){return">"+(n?"":" ")+e}function Vj(e,t){return Mp(e,t.inConstruct,!0)&&!Mp(e,t.notInConstruct,!1)}function Mp(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $p(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
56
|
+
`&&Vj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
57
|
+
`}function qj(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Gj(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Yj(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Xj(e,t,n,r){const i=Yj(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Gj(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,Kj);return d(),p}const l=n.createTracker(r),u=i.repeat(Math.max(qj(a,i)+1,3)),c=n.enter("codeFenced");let f=l.move(u);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
|
|
58
|
+
`,encode:["`"],...l.current()})),d()}return f+=l.move(`
|
|
59
|
+
`),a&&(f+=l.move(a+`
|
|
60
|
+
`)),f+=l.move(u),c(),f}function Kj(e,t,n){return(n?"":" ")+e}function xd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Qj(e,t,n,r){const i=xd(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
61
|
+
`,...u.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),s(),c}function Jj(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ia(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ll(e,t,n){const r=Pi(e),i=Pi(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ly.peek=Zj;function Ly(e,t,n,r){const i=Jj(n),a=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=ll(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Ia(c)+u.slice(1));const d=u.charCodeAt(u.length-1),p=ll(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+Ia(d));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+u+h}function Zj(e,t,n){return n.options.emphasis||"*"}function eN(e,t){let n=!1;return gd(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ku}),!!((!e.depth||e.depth<3)&&ud(e)&&(t.options.setext||n))}function tN(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(eN(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
62
|
+
`,after:`
|
|
63
|
+
`});return d(),f(),p+`
|
|
64
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
65
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
66
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=Ia(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),l(),c}Fy.peek=nN;function Fy(e){return e.value||""}function nN(){return"<"}My.peek=rN;function My(e,t,n,r){const i=xd(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),s(),c}function rN(){return"!"}$y.peek=iN;function $y(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");const c=n.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function iN(){return"!"}By.peek=aN;function By(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],l=n.compilePattern(s);let u;if(s.atBreak)for(;u=l.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function aN(){return"`"}function Hy(e,t){const n=ud(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Uy.peek=sN;function Uy(e,t,n,r){const i=xd(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,u;if(Hy(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=f,d}l=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),l(),c}function sN(e,t,n){return Hy(e,n)?"<":"["}Wy.peek=lN;function Wy(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function lN(){return"["}function vd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oN(e){const t=vd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function uN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vy(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cN(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?uN(n):vd(n);const l=e.ordered?s==="."?")":".":oN(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Vy(n)===s&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=l),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function dN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function fN(e,t,n,r){const i=dN(n);let a=n.bulletCurrent||vd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(s-a.length)),l.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),f);return u(),c;function f(d,p,h){return p?(h?"":" ".repeat(s))+d:(h?a:a+" ".repeat(s-a.length))+d}}function pN(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const hN=_l(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mN(e,t,n,r){return(e.children.some(function(s){return hN(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qy.peek=yN;function qy(e,t,n,r){const i=gN(n),a=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=ll(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Ia(c)+u.slice(1));const d=u.charCodeAt(u.length-1),p=ll(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+Ia(d));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+u+h}function yN(e,t,n){return n.options.strong||"*"}function xN(e,t,n,r){return n.safe(e.value,r)}function vN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bN(e,t,n){const r=(Vy(n)+(n.options.ruleSpaces?" ":"")).repeat(vN(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Gy={blockquote:Uj,break:$p,code:Xj,definition:Qj,emphasis:Ly,hardBreak:$p,heading:tN,html:Fy,image:My,imageReference:$y,inlineCode:By,link:Uy,linkReference:Wy,list:cN,listItem:fN,paragraph:pN,root:mN,strong:qy,text:xN,thematicBreak:bN};function wN(){return{enter:{table:kN,tableData:Bp,tableHeader:Bp,tableRow:jN},exit:{codeText:NN,table:SN,tableData:_o,tableHeader:_o,tableRow:_o}}}function kN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function SN(e){this.exit(e),this.data.inTable=void 0}function jN(e){this.enter({type:"tableRow",children:[]},e)}function _o(e){this.exit(e)}function Bp(e){this.enter({type:"tableCell",children:[]},e)}function NN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,EN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function EN(e,t){return t==="|"?t:e}function CN(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
67
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:l}};function s(h,g,v,w){return c(f(h,v,w),h.align)}function l(h,g,v,w){const y=d(h,v,w),x=c([y]);return x.slice(0,x.indexOf(`
|
|
68
|
+
`))}function u(h,g,v,w){const y=v.enter("tableCell"),x=v.enter("phrasing"),m=v.containerPhrasing(h,{...w,before:a,after:a});return x(),y(),m}function c(h,g){return Bj(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,v){const w=h.children;let y=-1;const x=[],m=g.enter("table");for(;++y<w.length;)x[y]=d(w[y],g,v);return m(),x}function d(h,g,v){const w=h.children;let y=-1;const x=[],m=g.enter("tableRow");for(;++y<w.length;)x[y]=u(w[y],h,g,v);return m(),x}function p(h,g,v){let w=Gy.inlineCode(h,g,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function TN(){return{exit:{taskListCheckValueChecked:Hp,taskListCheckValueUnchecked:Hp,paragraph:RN}}}function zN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:PN}}}function Hp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function PN(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(s);let u=Gy.listItem(e,t,n,{...r,...l.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+s}}function IN(){return[cj(),Pj(),Dj(),wN(),TN()]}function _N(e){return{extensions:[dj(),Ij(e),Oj(),CN(e),zN()]}}const AN={tokenize:$N,partial:!0},Yy={tokenize:BN,partial:!0},Xy={tokenize:HN,partial:!0},Ky={tokenize:UN,partial:!0},DN={tokenize:WN,partial:!0},Qy={name:"wwwAutolink",tokenize:FN,previous:Zy},Jy={name:"protocolAutolink",tokenize:MN,previous:ex},Qn={name:"emailAutolink",tokenize:LN,previous:tx},Ln={};function ON(){return{text:Ln}}let jr=48;for(;jr<123;)Ln[jr]=Qn,jr++,jr===58?jr=65:jr===91&&(jr=97);Ln[43]=Qn;Ln[45]=Qn;Ln[46]=Qn;Ln[95]=Qn;Ln[72]=[Qn,Jy];Ln[104]=[Qn,Jy];Ln[87]=[Qn,Qy];Ln[119]=[Qn,Qy];function LN(e,t,n){const r=this;let i,a;return s;function s(d){return!ec(d)||!tx.call(r,r.previous)||bd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return ec(d)?(e.consume(d),l):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(DN,f,c)(d):d===45||d===95||_t(d)?(a=!0,e.consume(d),u):f(d)}function c(d){return e.consume(d),i=!0,u}function f(d){return a&&i&&Ft(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function FN(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Zy.call(r,r.previous)||bd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AN,e.attempt(Yy,e.attempt(Xy,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function MN(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&ex.call(r,r.previous)&&!bd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(Ft(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),a?c:(a=!0,u)):n(d)}function c(d){return d===null||il(d)||We(d)||Ur(d)||Rl(d)?n(d):e.attempt(Yy,e.attempt(Xy,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function $N(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function BN(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Ky,u,l)(c):c===null||We(c)||Ur(c)||c!==45&&Rl(c)?u(c):(a=!0,e.consume(c),s)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function HN(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Ky,t,a)(s):s===null||We(s)||Ur(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function UN(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||We(l)||Ur(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||We(l)||Ur(l)?t(l):r(l)}function a(l){return Ft(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):Ft(l)?(e.consume(l),s):n(l)}}function WN(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return _t(a)?n(a):t(a)}}function Zy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||We(e)}function ex(e){return!Ft(e)}function tx(e){return!(e===47||ec(e))}function ec(e){return e===43||e===45||e===46||e===95||_t(e)}function bd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VN={tokenize:ZN,partial:!0};function qN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KN,continuation:{tokenize:QN},exit:JN}},text:{91:{name:"gfmFootnoteCall",tokenize:XN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GN,resolveTo:YN}}}}function GN(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!s||!s._balanced)return n(u);const c=Nn(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function YN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function XN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||We(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Nn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return We(d)||(s=!0),a++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function KN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,l;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(s>999||g===93&&!l||g===null||g===91||We(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Nn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return We(g)||(l=!0),s++,e.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),Fe(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function QN(e,t,n){return e.check($a,t,e.attempt(VN,t,n))}function JN(e){e.exit("gfmFootnoteDefinition")}function ZN(e,t,n){const r=this;return Fe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function eE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",f,l],["enter",s[c][1],l],["exit",s[c][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&nn(p,p.length,0,Pl(h,s.slice(c+1,u),l)),nn(p,p.length,0,[["exit",d,l],["enter",s[u][1],l],["exit",s[u][1],l],["exit",f,l]]),nn(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,l,u){const c=this.previous,f=this.events;let d=0;return p;function p(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?u(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const v=Pi(c);if(g===126)return d>1?u(g):(s.consume(g),d++,h);if(d<2&&!n)return u(g);const w=s.exit("strikethroughSequenceTemporary"),y=Pi(g);return w._open=!y||y===2&&!!v,w._close=!v||v===2&&!!y,l(g)}}}class tE{constructor(){this.map=[]}add(t,n,r){nE(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function nE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function rE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function iE(){return{flow:{null:{name:"table",tokenize:aE,resolveAll:sE}}}}function aE(e,t,n){const r=this;let i=0,a=0,s;return l;function l(C){let M=r.events.length-1;for(;M>-1;){const $=r.events[M][1].type;if($==="lineEnding"||$==="linePrefix")M--;else break}const H=M>-1?r.events[M][1].type:null,L=H==="tableHead"||H==="tableRow"?S:u;return L===S&&r.parser.lazy[r.now().line]?n(C):L(C)}function u(C){return e.enter("tableHead"),e.enter("tableRow"),c(C)}function c(C){return C===124||(s=!0,a+=1),f(C)}function f(C){return C===null?n(C):he(C)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):n(C):Ie(C)?Fe(e,f,"whitespace")(C):(a+=1,s&&(s=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||We(C)?(e.exit("data"),f(C)):(e.consume(C),C===92?p:d)}function p(C){return C===92||C===124?(e.consume(C),d):d(C)}function h(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),s=!1,Ie(C)?Fe(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):g(C))}function g(C){return C===45||C===58?w(C):C===124?(s=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),v):k(C)}function v(C){return Ie(C)?Fe(e,w,"whitespace")(C):w(C)}function w(C){return C===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(a+=1,y(C)):C===null||he(C)?j(C):k(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),x(C)):k(C)}function x(C){return C===45?(e.consume(C),x):C===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(C))}function m(C){return Ie(C)?Fe(e,j,"whitespace")(C):j(C)}function j(C){return C===124?g(C):C===null||he(C)?!s||i!==a?k(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):k(C)}function k(C){return n(C)}function S(C){return e.enter("tableRow"),T(C)}function T(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),T):C===null||he(C)?(e.exit("tableRow"),t(C)):Ie(C)?Fe(e,T,"whitespace")(C):(e.enter("data"),z(C))}function z(C){return C===null||C===124||We(C)?(e.exit("data"),T(C)):(e.consume(C),C===92?D:z)}function D(C){return C===92||C===124?(e.consume(C),z):z(C)}}function sE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,u=0,c,f,d;const p=new tE;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(l=!1,u!==0&&(Up(p,t,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=cs(p,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=cs(p,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):g.type==="tableHead"?(l=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],d=cs(p,t,a,i,n,d)):s[1]!==0&&(d=cs(p,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Up(p,t,u,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=rE(t.events,n))}return e}function cs(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},ei(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=ei(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=ei(t.events,n[2]),f=ei(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,v=n[3]-n[2]-1;e.add(g,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},ei(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Up(e,t,n,r,i){const a=[],s=ei(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function ei(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lE={name:"tasklistCheck",tokenize:uE};function oE(){return{text:{91:lE}}}function uE(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return We(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(u)}function l(u){return he(u)?t(u):Ie(u)?e.check({tokenize:cE},t,n)(u):n(u)}}function cE(e,t,n){return Fe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function dE(e){return dy([ON(),qN(),eE(e),iE(),oE()])}const fE={};function pE(e){const t=this,n=e||fE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(dE(n)),a.push(IN()),s.push(_N(n))}function nx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Li(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nx(e))&&(r&&(r+=" "),r+=t);return r}var hE=Object.create,Dl=Object.defineProperty,mE=Object.defineProperties,gE=Object.getOwnPropertyDescriptor,yE=Object.getOwnPropertyDescriptors,rx=Object.getOwnPropertyNames,ol=Object.getOwnPropertySymbols,xE=Object.getPrototypeOf,wd=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable,Wp=(e,t,n)=>t in e?Dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,On=(e,t)=>{for(var n in t||(t={}))wd.call(t,n)&&Wp(e,n,t[n]);if(ol)for(var n of ol(t))ix.call(t,n)&&Wp(e,n,t[n]);return e},Ol=(e,t)=>mE(e,yE(t)),ax=(e,t)=>{var n={};for(var r in e)wd.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ix.call(e,r)&&(n[r]=e[r]);return n},vE=(e,t)=>function(){return t||(0,e[rx(e)[0]])((t={exports:{}}).exports,t),t.exports},bE=(e,t)=>{for(var n in t)Dl(e,n,{get:t[n],enumerable:!0})},wE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rx(t))!wd.call(e,i)&&i!==n&&Dl(e,i,{get:()=>t[i],enumerable:!(r=gE(t,i))||r.enumerable});return e},kE=(e,t,n)=>(n=e!=null?hE(xE(e)):{},wE(!e||!e.__esModule?Dl(n,"default",{value:e,enumerable:!0}):n,e)),SE=vE({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},s={util:{encode:function g(v){return v instanceof l?new l(v.type,g(v.content),v.alias):Array.isArray(v)?v.map(g):v.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++i}),g.__id},clone:function g(v,w){w=w||{};var y,x;switch(s.util.type(v)){case"Object":if(x=s.util.objId(v),w[x])return w[x];y={},w[x]=y;for(var m in v)v.hasOwnProperty(m)&&(y[m]=g(v[m],w));return y;case"Array":return x=s.util.objId(v),w[x]?w[x]:(y=[],w[x]=y,v.forEach(function(j,k){y[k]=g(j,w)}),y);default:return v}},getLanguage:function(g){for(;g;){var v=r.exec(g.className);if(v)return v[1].toLowerCase();g=g.parentElement}return"none"},setLanguage:function(g,v){g.className=g.className.replace(RegExp(r,"gi"),""),g.classList.add("language-"+v)},isActive:function(g,v,w){for(var y="no-"+v;g;){var x=g.classList;if(x.contains(v))return!0;if(x.contains(y))return!1;g=g.parentElement}return!!w}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(g,v){var w=s.util.clone(s.languages[g]);for(var y in v)w[y]=v[y];return w},insertBefore:function(g,v,w,y){y=y||s.languages;var x=y[g],m={};for(var j in x)if(x.hasOwnProperty(j)){if(j==v)for(var k in w)w.hasOwnProperty(k)&&(m[k]=w[k]);w.hasOwnProperty(j)||(m[j]=x[j])}var S=y[g];return y[g]=m,s.languages.DFS(s.languages,function(T,z){z===S&&T!=g&&(this[T]=m)}),m},DFS:function g(v,w,y,x){x=x||{};var m=s.util.objId;for(var j in v)if(v.hasOwnProperty(j)){w.call(v,j,v[j],y||j);var k=v[j],S=s.util.type(k);S==="Object"&&!x[m(k)]?(x[m(k)]=!0,g(k,w,null,x)):S==="Array"&&!x[m(k)]&&(x[m(k)]=!0,g(k,w,j,x))}}},plugins:{},highlight:function(g,v,w){var y={code:g,grammar:v,language:w};if(s.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=s.tokenize(y.code,y.grammar),s.hooks.run("after-tokenize",y),l.stringify(s.util.encode(y.tokens),y.language)},tokenize:function(g,v){var w=v.rest;if(w){for(var y in w)v[y]=w[y];delete v.rest}var x=new f;return d(x,x.head,g),c(g,x,v,x.head,0),h(x)},hooks:{all:{},add:function(g,v){var w=s.hooks.all;w[g]=w[g]||[],w[g].push(v)},run:function(g,v){var w=s.hooks.all[g];if(!(!w||!w.length))for(var y=0,x;x=w[y++];)x(v)}},Token:l};function l(g,v,w,y){this.type=g,this.content=v,this.alias=w,this.length=(y||"").length|0}l.stringify=function g(v,w){if(typeof v=="string")return v;if(Array.isArray(v)){var y="";return v.forEach(function(S){y+=g(S,w)}),y}var x={type:v.type,content:g(v.content,w),tag:"span",classes:["token",v.type],attributes:{},language:w},m=v.alias;m&&(Array.isArray(m)?Array.prototype.push.apply(x.classes,m):x.classes.push(m)),s.hooks.run("wrap",x);var j="";for(var k in x.attributes)j+=" "+k+'="'+(x.attributes[k]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+j+">"+x.content+"</"+x.tag+">"};function u(g,v,w,y){g.lastIndex=v;var x=g.exec(w);if(x&&y&&x[1]){var m=x[1].length;x.index+=m,x[0]=x[0].slice(m)}return x}function c(g,v,w,y,x,m){for(var j in w)if(!(!w.hasOwnProperty(j)||!w[j])){var k=w[j];k=Array.isArray(k)?k:[k];for(var S=0;S<k.length;++S){if(m&&m.cause==j+","+S)return;var T=k[S],z=T.inside,D=!!T.lookbehind,C=!!T.greedy,M=T.alias;if(C&&!T.pattern.global){var H=T.pattern.toString().match(/[imsuy]*$/)[0];T.pattern=RegExp(T.pattern.source,H+"g")}for(var L=T.pattern||T,$=y.next,K=x;$!==v.tail&&!(m&&K>=m.reach);K+=$.value.length,$=$.next){var ie=$.value;if(v.length>g.length)return;if(!(ie instanceof l)){var ce=1,I;if(C){if(I=u(L,K,g,D),!I||I.index>=g.length)break;var le=I.index,Q=I.index+I[0].length,N=K;for(N+=$.value.length;le>=N;)$=$.next,N+=$.value.length;if(N-=$.value.length,K=N,$.value instanceof l)continue;for(var te=$;te!==v.tail&&(N<Q||typeof te.value=="string");te=te.next)ce++,N+=te.value.length;ce--,ie=g.slice(K,N),I.index-=K}else if(I=u(L,0,ie,D),!I)continue;var le=I.index,E=I[0],pe=ie.slice(0,le),je=ie.slice(le+E.length),se=K+ie.length;m&&se>m.reach&&(m.reach=se);var G=$.prev;pe&&(G=d(v,G,pe),K+=pe.length),p(v,G,ce);var _=new l(j,z?s.tokenize(E,z):E,M,E);if($=d(v,G,_),je&&d(v,$,je),ce>1){var q={cause:j+","+S,reach:se};c(g,v,w,$.prev,K,q),m&&q.reach>m.reach&&(m.reach=q.reach)}}}}}}function f(){var g={value:null,prev:null,next:null},v={value:null,prev:g,next:null};g.next=v,this.head=g,this.tail=v,this.length=0}function d(g,v,w){var y=v.next,x={value:w,prev:v,next:y};return v.next=x,y.prev=x,g.length++,x}function p(g,v,w){for(var y=v.next,x=0;x<w&&y!==g.tail;x++)y=y.next;v.next=y,y.prev=v,g.length-=x}function h(g){for(var v=[],w=g.head.next;w!==g.tail;)v.push(w.value),w=w.next;return v}return s}();t.exports=n,n.default=n}}),F=kE(SE());F.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},F.languages.markup.tag.inside["attr-value"].inside.entity=F.languages.markup.entity,F.languages.markup.doctype.inside["internal-subset"].inside=F.languages.markup,F.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(F.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:F.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:F.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},F.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(F.languages.markup.tag,"addAttribute",{value:function(e,t){F.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:F.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),F.languages.html=F.languages.markup,F.languages.mathml=F.languages.markup,F.languages.svg=F.languages.markup,F.languages.xml=F.languages.extend("markup",{}),F.languages.ssml=F.languages.xml,F.languages.atom=F.languages.xml,F.languages.rss=F.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(F),F.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},F.languages.javascript=F.languages.extend("clike",{"class-name":[F.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),F.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,F.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:F.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:F.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:F.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:F.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:F.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),F.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:F.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),F.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),F.languages.markup&&(F.languages.markup.tag.addInlined("script","javascript"),F.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),F.languages.js=F.languages.javascript,F.languages.actionscript=F.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),F.languages.actionscript["class-name"].alias="function",delete F.languages.actionscript.parameter,delete F.languages.actionscript["literal-property"],F.languages.markup&&F.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:F.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(F),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(d){d.inside||(d.inside={}),d.inside.rest=r},s="doc-comment";if(l=e.languages[i]){var l,u=l[s];if((u=u||(l=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[s])instanceof RegExp&&(u=l[s]={pattern:u}),Array.isArray(u))for(var c=0,f=u.length;c<f;c++)u[c]instanceof RegExp&&(u[c]={pattern:u[c]}),a(u[c]);else a(u)}})}}),t.addSupport(["java","javascript","php"],t)}(F),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(F),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(F),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(l,u){u=(u||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(c,u)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(a),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(F),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,s=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(e.languages.markdown[c].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(c){c.language!=="markdown"&&c.language!=="md"||function f(d){if(d&&typeof d!="string")for(var p=0,h=d.length;p<h;p++){var g,v=d[p];v.type!=="code"?f(v.content):(g=v.content[1],v=v.content[3],g&&v&&g.type==="code-language"&&v.type==="code-block"&&typeof g.content=="string"&&(g=g.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),g="language-"+(g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase()),v.alias?typeof v.alias=="string"?v.alias=[v.alias,g]:v.alias.push(g):v.alias=[g]))}}(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,p=c.classes.length;d<p;d++){var h=c.classes[d],h=/language-(.+)/.exec(h);if(h){f=h[1];break}}var g,v=e.languages[f];v?c.content=e.highlight(function(w){return w=w.replace(s,""),w=w.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,x){var m;return(x=x.toLowerCase())[0]==="#"?(m=x[1]==="x"?parseInt(x.slice(2),16):Number(x.slice(1)),u(m)):l[x]||y})}(c.content),v,f):f&&f!=="none"&&e.plugins.autoloader&&(g="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),c.attributes.id=g,e.plugins.autoloader.loadLanguages(f,function(){var w=document.getElementById(g);w&&(w.innerHTML=e.highlight(w.textContent,e.languages[f],f))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(F),F.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:F.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},F.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(g){return typeof g!="string"&&g.type!=="comment"&&g.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(d(["definition-mutation","punctuation"])&&f(1).content==="("){n+=2;var a=p(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var s=f(0);s.type==="variable"&&(h(s,"variable-input"),i.push(s.content))}n=a+1}if(d(["punctuation","property-query"])&&f(0).content==="{"&&(n++,h(f(0),"property-mutation"),0<i.length)){var l=p(/^\{$/,/^\}$/);if(l!==-1)for(var u=n;u<l;u++){var c=t[u];c.type==="variable"&&0<=i.indexOf(c.content)&&h(c,"variable-input")}}}}function f(g){return t[n+g]}function d(g,v){v=v||0;for(var w=0;w<g.length;w++){var y=f(w+v);if(!y||y.type!==g[w])return}return 1}function p(g,v){for(var w=1,y=n;y<t.length;y++){var x=t[y],m=x.content;if(x.type==="punctuation"&&typeof m=="string"){if(g.test(m))w++;else if(v.test(m)&&--w===0)return y}}return-1}function h(g,v){var w=g.alias;w?Array.isArray(w)||(g.alias=w=[w]):g.alias=w=[],w.push(v)}}),F.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function s(d,p){if(e.languages[d])return{pattern:RegExp("((?:"+p+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:d}}}}function l(d,p,h){return d={code:d,grammar:p,language:h},e.hooks.run("before-tokenize",d),d.tokens=e.tokenize(d.code,d.grammar),e.hooks.run("after-tokenize",d),d.tokens}function u(d,p,h){var w=e.tokenize(d,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),g=0,v={},w=l(w.map(function(x){if(typeof x=="string")return x;for(var m,j,x=x.content;d.indexOf((j=g++,m="___"+h.toUpperCase()+"_"+j+"___"))!==-1;);return v[m]=x,m}).join(""),p,h),y=Object.keys(v);return g=0,function x(m){for(var j=0;j<m.length;j++){if(g>=y.length)return;var k,S,T,z,D,C,M,H=m[j];typeof H=="string"||typeof H.content=="string"?(k=y[g],(M=(C=typeof H=="string"?H:H.content).indexOf(k))!==-1&&(++g,S=C.substring(0,M),D=v[k],T=void 0,(z={})["interpolation-punctuation"]=i,(z=e.tokenize(D,z)).length===3&&((T=[1,1]).push.apply(T,l(z[1],e.languages.javascript,"javascript")),z.splice.apply(z,T)),T=new e.Token("interpolation",z,r.alias,D),z=C.substring(M+k.length),D=[],S&&D.push(S),D.push(T),z&&(x(C=[z]),D.push.apply(D,C)),typeof H=="string"?(m.splice.apply(m,[j,1].concat(D)),j+=D.length-1):H.content=D)):(M=H.content,Array.isArray(M)?x(M):x([M]))}}(w),new e.Token(h,w,"language-"+h,d)}e.languages.javascript["template-string"]=[s("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),s("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),s("svg",/\bsvg/.source),s("markdown",/\b(?:markdown|md)/.source),s("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),s("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(d){return typeof d=="string"?d:Array.isArray(d)?d.map(f).join(""):f(d.content)}e.hooks.add("after-tokenize",function(d){d.language in c&&function p(h){for(var g=0,v=h.length;g<v;g++){var w,y,x,m=h[g];typeof m!="string"&&(w=m.content,Array.isArray(w)?m.type==="template-string"?(m=w[1],w.length===3&&typeof m!="string"&&m.type==="embedded-code"&&(y=f(m),m=m.alias,m=Array.isArray(m)?m[0]:m,x=e.languages[m])&&(w[1]=u(y,x,m))):p(w):typeof w!="string"&&p([w]))}}(d.tokens)})}(F),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(F),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(F),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(F),F.languages.n4js=F.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),F.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),F.languages.n4jsd=F.languages.n4js,function(e){function t(s,l){return RegExp(s.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(F),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(u,c){return u=u.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(u,c)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function s(u){for(var c=[],f=0;f<u.length;f++){var d=u[f],p=!1;typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?0<c.length&&c[c.length-1].tagName===l(d.content[0].content[1])&&c.pop():d.content[d.content.length-1].content!=="/>"&&c.push({tagName:l(d.content[0].content[1]),openedBraces:0}):0<c.length&&d.type==="punctuation"&&d.content==="{"?c[c.length-1].openedBraces++:0<c.length&&0<c[c.length-1].openedBraces&&d.type==="punctuation"&&d.content==="}"?c[c.length-1].openedBraces--:p=!0),(p||typeof d=="string")&&0<c.length&&c[c.length-1].openedBraces===0&&(p=l(d),f<u.length-1&&(typeof u[f+1]=="string"||u[f+1].type==="plain-text")&&(p+=l(u[f+1]),u.splice(f+1,1)),0<f&&(typeof u[f-1]=="string"||u[f-1].type==="plain-text")&&(p=l(u[f-1])+p,u.splice(f-1,1),f--),u[f]=new e.Token("plain-text",p,null,p)),d.content&&typeof d.content!="string"&&s(d.content)}}var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||s(u.tokens)})}(F),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(F),F.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},F.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=F.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(F),F.languages.c=F.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),F.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),F.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},F.languages.c.string],char:F.languages.c.char,comment:F.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:F.languages.c}}}}),F.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete F.languages.c.boolean,F.languages.objectivec=F.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete F.languages.objectivec["class-name"],F.languages.objc=F.languages.objectivec,F.languages.reason=F.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),F.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete F.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(F),F.languages.go=F.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),F.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete F.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(F),F.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},F.languages.python["string-interpolation"].inside.interpolation.inside.rest=F.languages.python,F.languages.py=F.languages.python,F.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},F.languages.webmanifest=F.languages.json;var kd={};bE(kd,{dracula:()=>NE,duotoneDark:()=>CE,duotoneLight:()=>zE,github:()=>PE,gruvboxMaterialDark:()=>sC,gruvboxMaterialLight:()=>oC,jettwaveDark:()=>JE,jettwaveLight:()=>eC,nightOwl:()=>_E,nightOwlLight:()=>DE,oceanicNext:()=>LE,okaidia:()=>ME,oneDark:()=>nC,oneLight:()=>iC,palenight:()=>BE,shadesOfPurple:()=>UE,synthwave84:()=>VE,ultramin:()=>GE,vsDark:()=>sx,vsLight:()=>KE});var jE={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},NE=jE,EE={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},CE=EE,TE={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},zE=TE,RE={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},PE=RE,IE={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},_E=IE,AE={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},DE=AE,Qt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},OE={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Qt.keyword}},{types:["attr-value"],style:{color:Qt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Qt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Qt.primitive}},{types:["boolean"],style:{color:Qt.boolean}},{types:["tag"],style:{color:Qt.tag}},{types:["string"],style:{color:Qt.string}},{types:["punctuation"],style:{color:Qt.string}},{types:["selector","char","builtin","inserted"],style:{color:Qt.char}},{types:["function"],style:{color:Qt.function}},{types:["operator","entity","url","variable"],style:{color:Qt.variable}},{types:["keyword"],style:{color:Qt.keyword}},{types:["atrule","class-name"],style:{color:Qt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},LE=OE,FE={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},ME=FE,$E={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},BE=$E,HE={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},UE=HE,WE={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},VE=WE,qE={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},GE=qE,YE={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},sx=YE,XE={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},KE=XE,QE={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},JE=QE,ZE={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},eC=ZE,tC={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},nC=tC,rC={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},iC=rC,aC={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},sC=aC,lC={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},oC=lC,uC=e=>b.useCallback(t=>{var n=t,{className:r,style:i,line:a}=n,s=ax(n,["className","style","line"]);const l=Ol(On({},s),{className:Li("token-line",r)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof i=="object"&&(l.style=On(On({},l.style||{}),i)),l},[e]),cC=e=>{const t=b.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return b.useCallback(n=>{var r=n,{token:i,className:a,style:s}=r,l=ax(r,["token","className","style"]);const u=Ol(On({},l),{className:Li("token",...i.types,a),children:i.content,style:t(i)});return s!=null&&(u.style=On(On({},u.style||{}),s)),u},[t])},dC=/\r\n|\r|\n/,Vp=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
69
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
70
|
+
`,e[0].empty=!0)},qp=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},fC=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let a=0,s=0,l=[];const u=[l];for(;s>-1;){for(;(a=r[s]++)<i[s];){let c,f=t[s];const p=n[s][a];if(typeof p=="string"?(f=s>0?f:["plain"],c=p):(f=qp(f,p.type),p.alias&&(f=qp(f,p.alias)),c=p.content),typeof c!="string"){s++,t.push(f),n.push(c),r.push(0),i.push(c.length);continue}const h=c.split(dC),g=h.length;l.push({types:f,content:h[0]});for(let v=1;v<g;v++)Vp(l),u.push(l=[]),l.push({types:f,content:h[v]})}s--,t.pop(),n.pop(),r.pop(),i.pop()}return Vp(l),u},Gp=fC,pC=({prism:e,code:t,grammar:n,language:r})=>b.useMemo(()=>{if(n==null)return Gp([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),Gp(i.tokens)},[t,n,r,e]),hC=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,a)=>{const{languages:s,style:l}=a;return s&&!s.includes(t)||a.types.forEach(u=>{const c=On(On({},i[u]),l);i[u]=c}),i},{});return r.root=n,r.plain=Ol(On({},n),{backgroundColor:void 0}),r},mC=hC,gC=({children:e,language:t,code:n,theme:r,prism:i})=>{const a=t.toLowerCase(),s=mC(r,a),l=uC(s),u=cC(s),c=i.languages[a],f=pC({prism:i,language:a,code:n,grammar:c});return e({tokens:f,className:`prism-code language-${a}`,style:s!=null?s.root:{},getLineProps:l,getTokenProps:u})},lx=e=>b.createElement(gC,Ol(On({},e),{prism:e.prism||F,theme:e.theme||sx,code:e.code,language:e.language}));/*! Bundled license information:
|
|
71
|
+
|
|
72
|
+
prismjs/prism.js:
|
|
73
|
+
(**
|
|
74
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
75
|
+
*
|
|
76
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
77
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
78
|
+
* @namespace
|
|
79
|
+
* @public
|
|
80
|
+
*)
|
|
81
|
+
*/const yC={sh:"bash",shell:"bash",zsh:"bash",console:"bash",yml:"yaml",md:"markdown",mjs:"javascript",cjs:"javascript",node:"javascript",js:"javascript",ts:"typescript",py:"python",rs:"rust",html:"markup",xml:"markup",txt:"text"};function xC(e){if(!e)return"text";const t=String(e).toLowerCase();return yC[t]||t}function vC({code:e,language:t}){const[n,r]=b.useState(!1),i=xC(t),a=b.useCallback(()=>{var s;try{(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1400)}catch{}},[e]);return o.jsxs("div",{className:"code-block","data-testid":"code-block",children:[o.jsxs("div",{className:"code-block-head",children:[o.jsx("span",{className:"code-lang",children:i==="text"?"code":i}),o.jsx("button",{className:"code-copy",onClick:a,title:"Copy to clipboard",children:n?"✓ copied":"Copy"})]}),o.jsx(lx,{theme:kd.vsDark,code:e,language:i,children:({tokens:s,getLineProps:l,getTokenProps:u})=>o.jsx("pre",{className:"code-block-body",children:s.map((c,f)=>o.jsx("div",{...l({line:c}),children:c.map((d,p)=>o.jsx("span",{...u({token:d})},p))},f))})})]})}const bC={pre({children:e}){const t=Array.isArray(e)?e[0]:e,n=(t==null?void 0:t.props)||{},r=/language-([\w-]+)/.exec(n.className||""),i=n.children,a=(Array.isArray(i)?i.join(""):String(i??"")).replace(/\n+$/,"");return o.jsx(vC,{code:a,language:r?r[1]:""})},code({children:e}){return o.jsx("code",{className:"md-code-inline",children:e})},a({href:e,children:t}){return o.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})},table({children:e}){return o.jsx("div",{className:"md-table-wrap",children:o.jsx("table",{children:e})})}};function wC({text:e}){return o.jsx("div",{className:"markdown",children:o.jsx(ej,{remarkPlugins:[pE],components:bC,children:e||""})})}const ox=b.memo(wC);class kC{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const a=this.castInput(t,r),s=this.castInput(n,r),l=this.removeEmpty(this.tokenize(a,r)),u=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(l,u,r,i)}diffWithOptionsObj(t,n,r,i){var a;const s=x=>{if(x=this.postProcess(x,r),i){setTimeout(function(){i(x)},0);return}else return x},l=n.length,u=t.length;let c=1,f=l+u;r.maxEditLength!=null&&(f=Math.min(f,r.maxEditLength));const d=(a=r.timeout)!==null&&a!==void 0?a:1/0,p=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}];let g=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=u&&g+1>=l)return s(this.buildValues(h[0].lastComponent,n,t));let v=-1/0,w=1/0;const y=()=>{for(let x=Math.max(v,-c);x<=Math.min(w,c);x+=2){let m;const j=h[x-1],k=h[x+1];j&&(h[x-1]=void 0);let S=!1;if(k){const z=k.oldPos-x;S=k&&0<=z&&z<l}const T=j&&j.oldPos+1<u;if(!S&&!T){h[x]=void 0;continue}if(!T||S&&j.oldPos<k.oldPos?m=this.addToPath(k,!0,!1,0,r):m=this.addToPath(j,!1,!0,1,r),g=this.extractCommon(m,n,t,x,r),m.oldPos+1>=u&&g+1>=l)return s(this.buildValues(m.lastComponent,n,t))||!0;h[x]=m,m.oldPos+1>=u&&(w=Math.min(w,x-1)),g+1>=l&&(v=Math.max(v,x+1))}c++};if(i)(function x(){setTimeout(function(){if(c>f||Date.now()>p)return i(void 0);y()||x()},0)})();else for(;c<=f&&Date.now()<=p;){const x=y();if(x)return x}}addToPath(t,n,r,i,a){const s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===n&&s.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}}extractCommon(t,n,r,i,a){const s=n.length,l=r.length;let u=t.oldPos,c=u-i,f=0;for(;c+1<s&&u+1<l&&this.equals(r[u+1],n[c+1],a);)c++,u++,f++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=u,c}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let a;for(;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();const s=i.length;let l=0,u=0,c=0;for(;l<s;l++){const f=i[l];if(f.removed)f.value=this.join(r.slice(c,c+f.count)),c+=f.count;else{if(!f.added&&this.useLongestToken){let d=n.slice(u,u+f.count);d=d.map(function(p,h){const g=r[c+h];return g.length>p.length?g:p}),f.value=this.join(d)}else f.value=this.join(n.slice(u,u+f.count));u+=f.count,f.added||(c+=f.count)}}return i}}class SC extends kC{constructor(){super(...arguments),this.tokenize=EC}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
82
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
83
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
84
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
85
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const jC=new SC;function NC(e,t,n){return jC.diff(e,t,n)}function EC(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
86
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const a=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}function CC(e,t){const n=NC(e??"",t??""),r=[];for(const i of n){const a=i.added?"add":i.removed?"del":"ctx",s=i.value.split(`
|
|
87
|
+
`);s.length>1&&s[s.length-1]===""&&s.pop();for(const l of s)r.push({type:a,text:l})}return r}const TC={add:"+",del:"−",ctx:" "};function Rs({oldText:e,newText:t,maxRows:n=80}){const r=CC(e,t),i=r.reduce((l,u)=>l+(u.type==="add"?1:0),0),a=r.reduce((l,u)=>l+(u.type==="del"?1:0),0),s=r.slice(0,n);return o.jsxs("div",{className:"diff-view","data-testid":"diff-view",children:[o.jsxs("div",{className:"diff-stat",children:[o.jsxs("span",{className:"diff-stat-add",children:["+",i]}),o.jsxs("span",{className:"diff-stat-del",children:["−",a]})]}),o.jsx("pre",{className:"diff-body",children:s.map((l,u)=>o.jsxs("div",{className:`diff-line ${l.type}`,children:[o.jsx("span",{className:"diff-gutter",children:TC[l.type]}),o.jsx("span",{className:"diff-text",children:l.text===""?" ":l.text})]},u))}),r.length>n&&o.jsxs("div",{className:"diff-more",children:["+",r.length-n," more lines"]})]})}function Yp(e){if(!e)return"";const t=String(e).split(/[\\/]+/).filter(Boolean);return t.length>2?"…/"+t.slice(-2).join("/"):t.join("/")}function zC(e){if(!e||typeof e!="object")return"";for(const t of Object.values(e))if(typeof t=="string"&&t)return t;return""}const RC={Read:{icon:"📄",verb:"Read"},Edit:{icon:"✏️",verb:"Edit"},MultiEdit:{icon:"✏️",verb:"Edit"},Write:{icon:"📝",verb:"Write"},NotebookEdit:{icon:"📓",verb:"Edit notebook"},Bash:{icon:"▶",verb:"Run"},PowerShell:{icon:"▶",verb:"Run"},Glob:{icon:"🔍",verb:"Find"},Grep:{icon:"🔍",verb:"Search"},Task:{icon:"🤖",verb:"Agent"},WebFetch:{icon:"🌐",verb:"Fetch"},WebSearch:{icon:"🌐",verb:"Web search"},Skill:{icon:"✨",verb:"Skill"},TodoWrite:{icon:"☑",verb:"Plan"}};function PC(e,t){if(!t)return"";switch(e){case"Read":case"Edit":case"MultiEdit":case"Write":return Yp(t.file_path);case"NotebookEdit":return Yp(t.notebook_path);case"Bash":case"PowerShell":return t.command||"";case"Glob":case"Grep":return t.pattern||"";case"Task":return t.description||t.subagent_type||"";case"WebFetch":return t.url||"";case"WebSearch":return t.query||"";case"Skill":return t.command||t.name||"";default:return zC(t)}}function IC({name:e,input:t}){return(t==null?void 0:t._raw)!=null?o.jsx("pre",{className:"tool-raw",children:String(t._raw)}):e==="Edit"?o.jsx(Rs,{oldText:t.old_string||"",newText:t.new_string||""}):e==="MultiEdit"&&Array.isArray(t.edits)?o.jsx(o.Fragment,{children:t.edits.map((n,r)=>o.jsx(Rs,{oldText:n.old_string||"",newText:n.new_string||""},r))}):e==="Write"?o.jsx(Rs,{oldText:"",newText:t.content||""}):(e==="Bash"||e==="PowerShell")&&t.description?o.jsx("div",{className:"tool-desc",children:t.description}):null}function _C({content:e,isError:t}){if(e==null)return null;const n=String(e);if(!n.trim()&&!t)return null;const i=n.length>4e3?n.slice(0,4e3)+`
|
|
88
|
+
… (truncated)`:n,a=n.split(`
|
|
89
|
+
`).find(s=>s.trim())||(t?"error":"done");return o.jsxs("details",{className:`tool-result ${t?"err":""}`,open:t,children:[o.jsxs("summary",{children:[t?"✗ ":"",a.slice(0,140)]}),o.jsx("pre",{children:i})]})}function AC({block:e}){const{name:t,input:n={},result:r,done:i,isError:a}=e,s=RC[t]||{icon:"⚙",verb:t},l=PC(t,n),u=i?a?"error":"done":"running";return o.jsxs("div",{className:`tool-card ${u}`,"data-testid":"tool-card","data-tool":t,children:[o.jsxs("div",{className:"tool-head",children:[o.jsx("span",{className:"tool-icon",children:s.icon}),o.jsx("span",{className:"tool-verb",children:s.verb}),l&&o.jsx("code",{className:"tool-target",children:l}),t==="Edit"&&n.replace_all&&o.jsx("span",{className:"tool-tag",children:"all"}),o.jsx("span",{className:"tool-status","data-status":u,children:u==="running"?o.jsx("span",{className:"tool-spinner","aria-label":"running"}):u==="error"?"✗":"✓"})]}),o.jsx(IC,{name:t,input:n}),o.jsx(_C,{content:r,isError:a})]})}function ux(e){return`$${(Number(e)||0).toFixed(2)}`}const cx=()=>o.jsx("span",{className:"bz-represented",title:"No real money moves yet — this is a preview of how earnings would work.",children:"represented · settles later"});function DC({block:e,bazaarState:t,canReply:n,onQuickReply:r}){const{tool:i,phase:a,data:s}=e;if(a!=="result")return o.jsx(FC,{tool:i,input:e.input});if(!s||s.kind==="error")return null;switch(i){case"search_shelf":return o.jsx(MC,{data:s});case"open_recipe":return o.jsx($C,{data:s});case"launch_preview":return o.jsx(BC,{data:s});case"record_use":return o.jsx(HC,{data:s,bazaarState:t});case"publish_listing":case"publish_draft":return o.jsx(UC,{data:s});case"draft_recipe":return o.jsx(WC,{data:s,canReply:n,onQuickReply:r});default:return null}}const OC={search_shelf:"Searching the bazaar shelf",open_recipe:"Absorbing the recipe",launch_preview:"Opening your live preview",record_use:"Recording the build",publish_listing:"Packaging for the shelf",draft_recipe:"Drafting a recipe from your work",publish_draft:"Publishing to the shelf"},LC={search_shelf:"🛒",open_recipe:"📖",launch_preview:"▶️",record_use:"🧾",publish_listing:"📦",draft_recipe:"📝",publish_draft:"📦"};function FC({tool:e,input:t}){return o.jsxs("div",{className:"bazaar-card bz-call","data-testid":`bazaar-${e}-call`,children:[o.jsx("span",{className:"bz-icon",children:LC[e]||"🛍️"}),o.jsxs("span",{className:"bz-call-label",children:[OC[e]||"Bazaar","…"]}),e==="search_shelf"&&(t==null?void 0:t.need)&&o.jsxs("span",{className:"bz-call-need",children:["“",t.need,"”"]}),o.jsxs("span",{className:"bz-dots",children:[o.jsx("i",{}),o.jsx("i",{}),o.jsx("i",{})]})]})}function Xp(e){return`${Math.round((Number(e)||0)*100)}%`}function MC({data:e}){var r;const t=e.hits||[];if(!t.length)return o.jsxs("div",{className:"bazaar-card bz-empty","data-testid":"bazaar-search-result",children:[o.jsx("span",{className:"bz-icon",children:"🛒"}),o.jsx("span",{children:"Checked the shelf — nothing proven fit this one, so I'll build it from scratch."})]});const n=t[0];return o.jsxs("div",{className:"bazaar-card bz-search","data-testid":"bazaar-search-result",children:[o.jsxs("div",{className:"bz-head",children:[o.jsx("span",{className:"bz-icon",children:"🛒"}),o.jsx("span",{className:"bz-head-title",children:"Found a proven recipe on the shelf"})]}),o.jsxs("div",{className:"bz-hit bz-hit-top",children:[o.jsxs("div",{className:"bz-hit-main",children:[o.jsx("span",{className:"bz-hit-title",children:n.title}),o.jsxs("span",{className:"bz-hit-by",children:["by ",((r=n.producer)==null?void 0:r.name)||"a producer"]})]}),o.jsxs("div",{className:"bz-outcome",title:"How often this recipe actually gets people a working result",children:[o.jsx("strong",{children:Xp(n.outcomeScore)})," of builds worked"]})]}),n.pitch&&o.jsx("p",{className:"bz-hit-pitch",children:n.pitch}),t.length>1&&o.jsxs("div",{className:"bz-others",children:["also on the shelf:"," ",t.slice(1,3).map((i,a)=>o.jsxs("span",{children:[a>0&&" · ",i.title," (",Xp(i.outcomeScore),")"]},i.id))]})]})}function $C({data:e}){var n;const t=e.card||{};return o.jsxs("div",{className:"bazaar-card bz-recipe","data-testid":"bazaar-recipe",children:[o.jsx("span",{className:"bz-icon",children:"📖"}),o.jsxs("span",{className:"bz-recipe-text",children:["Absorbed ",o.jsx("strong",{children:t.title})," — ",((n=t.producer)==null?void 0:n.name)||"the producer","'s know-how",t.safetyBadge&&o.jsx("span",{className:`bz-badge bz-badge-${t.safetyBadge}`,children:t.safetyBadge})]})]})}function BC({data:e}){return o.jsxs("div",{className:"bazaar-card bz-preview","data-testid":"bazaar-preview",children:[o.jsx("span",{className:"bz-icon",children:"▶️"}),o.jsx("span",{children:"Your live preview is open — try it on the right."})]})}function HC({data:e,bazaarState:t}){var c;const n=e.threeWay||{},r=(c=e.recipe)==null?void 0:c.producer,i=e.credit||{},a=((t==null?void 0:t.earnings)||[]).find(f=>f.handle===(r==null?void 0:r.handle)),s=(a==null?void 0:a.total)??i.oneTime??0,l=(a==null?void 0:a.matches)??0,u=!!e.service;return o.jsxs("div",{className:"bazaar-card bz-threeway","data-testid":"bazaar-threeway",children:[o.jsxs("div",{className:"bz-tw-head",children:[o.jsx("span",{className:"bz-tw-spark",children:"✦"})," Everyone just won"]}),o.jsxs("div",{className:"bz-tw-cols",children:[o.jsxs("div",{className:"bz-tw-col bz-tw-you",children:[o.jsx("div",{className:"bz-tw-who",children:"👤 You"}),o.jsx("div",{className:"bz-tw-what",children:n.you})]}),o.jsxs("div",{className:"bz-tw-col bz-tw-producer",children:[o.jsxs("div",{className:"bz-tw-who",children:["🏷️ ",(r==null?void 0:r.name)||"The producer"]}),o.jsx("div",{className:"bz-tw-what",children:n.producer}),o.jsxs("div",{className:"bz-tw-meter","data-testid":"bazaar-meter",children:[o.jsx("span",{className:"bz-meter-amount",children:ux(s)}),o.jsx("span",{className:"bz-meter-sub",children:u?`${l} ${l===1?"match":"matches"} so far`:"one-time"})]}),o.jsx(cx,{})]}),o.jsxs("div",{className:"bz-tw-col bz-tw-vw",children:[o.jsx("div",{className:"bz-tw-who",children:"🟣 VentureWild"}),o.jsx("div",{className:"bz-tw-what",children:n.platform})]})]})]})}function UC({data:e}){const t=e.listing||{},n=e.earning||{};return o.jsxs("div",{className:"bazaar-card bz-publish","data-testid":"bazaar-publish",children:[o.jsxs("div",{className:"bz-head",children:[o.jsx("span",{className:"bz-icon",children:"📦"}),o.jsx("span",{className:"bz-head-title",children:"You're a producer now"})]}),o.jsxs("p",{className:"bz-publish-text",children:[o.jsx("strong",{children:t.title})," is on the shelf. You'll earn when other people build on it."]}),o.jsxs("div",{className:"bz-tw-meter",children:[o.jsx("span",{className:"bz-meter-amount",children:ux(n.oneTimeValue)}),o.jsxs("span",{className:"bz-meter-sub",children:["per build · ",o.jsx(cx,{})]})]})]})}function WC({data:e,canReply:t,onQuickReply:n}){var i;const r=e.draft||{};return o.jsxs("div",{className:"bazaar-card bz-draft","data-testid":"bazaar-draft",children:[o.jsxs("div",{className:"bz-head",children:[o.jsx("span",{className:"bz-icon",children:"📝"}),o.jsx("span",{className:"bz-head-title",children:"Draft recipe — review before it goes on the shelf"})]}),o.jsx("div",{className:"bz-hit-main",children:o.jsx("span",{className:"bz-hit-title",children:r.title})}),r.pitch&&o.jsx("p",{className:"bz-hit-pitch",children:r.pitch}),r.sourceNote&&o.jsxs("div",{className:"bz-draft-source",children:["Generalized from: ",r.sourceNote]}),((i=r.tags)==null?void 0:i.length)>0&&o.jsx("div",{className:"bz-others",children:r.tags.slice(0,8).join(" · ")}),r.knowHow&&o.jsxs("details",{className:"bz-draft-knowhow",children:[o.jsx("summary",{children:"Preview the know-how — check it for any client specifics"}),o.jsx("pre",{children:r.knowHow})]}),n?o.jsxs("div",{className:"bz-draft-actions",children:[o.jsx("button",{type:"button",className:"bz-build-btn",disabled:!t,"data-testid":"bazaar-draft-publish",onClick:()=>t&&n(`Publish the “${r.title}” draft to my shelf.`),children:"Publish to my shelf →"}),o.jsx("button",{type:"button",className:"bz-draft-skip",disabled:!t,"data-testid":"bazaar-draft-skip",onClick:()=>t&&n(`Skip the “${r.title}” draft — don't publish that one.`),children:"Skip this one"}),o.jsx("span",{className:"bz-draft-hint",children:"Nothing's published until you choose."})]}):o.jsx("div",{className:"bz-draft-hint",children:"Nothing's published yet — tell me which drafts to put on your shelf."})]})}const Qr=[{who:"Two HR people",occ:"recruiting team",built:"an AI platform that matches candidates to roles — no engineers on the team"},{who:"A freight-forwarding team",occ:"logistics",built:"an analytics brain that answers plain-language questions about their shipments"},{who:"A game-studio founder",occ:"games",built:"a world of AI agents that play and learn together"},{who:"A solo consultant",occ:"business consulting",built:"turned a year of client work into a product — this one"}],VC="Most of the people building here have never written a line of code.",qC=4200;function GC(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Sd({variant:e="ambient"}){const t=e==="ambient"&&Qr.length>1&&!GC(),[n,r]=b.useState(()=>Math.floor(Math.random()*Qr.length));b.useEffect(()=>{if(!t)return;const a=setInterval(()=>r(s=>(s+1)%Qr.length),qC);return()=>clearInterval(a)},[t]);const i=e==="block"?Qr:[Qr[n%Qr.length]];return o.jsxs("div",{className:`peer-stream peer-stream-${e}`,"data-testid":"peer-stream",children:[i.map((a,s)=>o.jsxs("div",{className:"peer-item",children:[o.jsxs("span",{className:"peer-who",children:[a.who,a.occ?o.jsxs("span",{className:"peer-occ",children:[" · ",a.occ]}):null]}),o.jsx("span",{className:"peer-built",children:a.quote?`“${a.quote}”`:a.built})]},`${a.who}-${s}-${e==="ambient"?n:"all"}`)),o.jsx("p",{className:"peer-honest",children:VC})]})}const ul="wild-workspace.chat.v2";function Kp({id:e,isDefault:t}={}){return t||!e?ul:`${ul}:${e}`}function YC({messageId:e,userText:t,agentText:n}={}){return!e||!t||!n?[]:[{id:`u-${e}`,role:"user",text:t},{id:e,role:"agent",blocks:[{type:"text",text:n}]}]}function XC(e,t=globalThis.localStorage,n=ul){const r=YC(e);if(!r.length||!t)return!1;try{const i=t.getItem(n),a=i?JSON.parse(i):[];return Array.isArray(a)&&a.length>0?!1:(t.setItem(n,JSON.stringify(r)),!0)}catch{return!1}}const tc="wild:workspace:id";let ki=null;try{ki=typeof sessionStorage<"u"&&sessionStorage.getItem(tc)||null}catch{ki=null}function pa(){return ki}function KC(e){ki=e||null;try{ki?sessionStorage.setItem(tc,ki):sessionStorage.removeItem(tc)}catch{}}function QC(e,t){var i;const n=e.blocks?e.blocks.slice():[],r=n[n.length-1];switch(t.type){case"text":return r&&r.type==="text"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"text",text:t.text}),{...e,blocks:n};case"thinking":return r&&r.type==="thinking"?n[n.length-1]={...r,text:r.text+t.text}:n.push({type:"thinking",text:t.text}),{...e,blocks:n};case"tool-use":return n.push({type:"tool",id:t.id,name:t.name,input:t.input||{},done:!1}),{...e,blocks:n};case"tool-result":{const a=n.findIndex(s=>s.type==="tool"&&s.id===t.id);return a>=0&&(n[a]={...n[a],result:t.content,isError:t.isError,done:!0}),{...e,blocks:n}}case"usage":return{...e,usage:t.usage,costUsd:(i=t.usage)==null?void 0:i.cost_usd,durationMs:t.durationMs};case"error":return n.push({type:"error",text:t.message||"agent error"}),{...e,blocks:n};case"bazaar":{if(t.phase==="call")return n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"call",input:t.input||{}}),{...e,blocks:n};if(t.phase==="result"){const a=n.findIndex(s=>s.type==="bazaar"&&s.id===t.id);return a>=0?n[a]={...n[a],phase:"result",data:t.data,isError:t.isError}:n.push({type:"bazaar",id:t.id,tool:t.tool,phase:"result",data:t.data}),{...e,blocks:n}}return e}case"canvas":{if(t.phase==="call")return n.push({type:"canvas",id:t.id,tool:t.tool,phase:"call"}),{...e,blocks:n};if(t.phase==="result"){const a=n.findIndex(l=>l.type==="canvas"&&l.id===t.id),s={type:"canvas",id:t.id,tool:t.tool,phase:"result",data:t.data,isError:t.isError};return a>=0?n[a]={...n[a],...s}:n.push(s),{...e,blocks:n}}return e}default:return e}}function Qp(e,t,n){const r=e.findIndex(a=>a.id===t);if(r<0)return e;const i=e.slice();return i[r]=QC(i[r],n),i}function JC(e,t,n){if(!n||!n.trim())return e;const r=e.findIndex(a=>a.id===t);if(r<0)return e;const i=e.slice();return i[r]={...i[r],stderr:(i[r].stderr||"")+n},i}function ZC({role:e,capabilities:t,mode:n,token:r,onBazaarEvent:i,inject:a,agentName:s,storageKey:l}){const u=l||ul,[c,f]=b.useState(()=>{try{const I=localStorage.getItem(u);if(I)return JSON.parse(I)}catch{}return[]}),[d,p]=b.useState(null),[h,g]=b.useState(!1),[v,w]=b.useState(""),[y,x]=b.useState(!1),[m,j]=b.useState(null),k=b.useRef(null),S=b.useRef(null),T=b.useRef(!0),z=b.useRef(i),D=b.useRef(null),C=b.useRef(null),M=b.useRef(null);b.useEffect(()=>{z.current=i},[i]),b.useEffect(()=>{try{localStorage.setItem(u,JSON.stringify(c.slice(-120)))}catch{}},[c]),b.useEffect(()=>{const I=S.current;I&&T.current&&(I.scrollTop=I.scrollHeight)},[c]);function H(){const I=S.current;I&&(T.current=I.scrollHeight-I.scrollTop-I.clientHeight<90)}b.useEffect(()=>{let I=!1,Q=0,N=null,te=null;const le=()=>{if(I)return;const E=window.location.protocol==="https:"?"wss":"ws",pe=new URL(`${E}://${window.location.host}/ws/chat`);r&&pe.searchParams.set("t",r);const je=pa();je&&pe.searchParams.set("workspace",je),te=new WebSocket(pe.toString()),k.current=te,te.onopen=()=>{Q=0,x(!0)},te.onmessage=se=>{var _,q,J,re,xe,ve,Ue,Oe;let G;try{G=JSON.parse(se.data)}catch{return}if(G.type==="chunk"){const Z=G.chunk;if(f(ke=>Qp(ke,G.messageId,Z)),(Z==null?void 0:Z.type)==="bazaar"&&Z.phase==="result"&&!Z.isError){const ke=Z.data||{};if(Z.tool==="launch_preview"||Z.tool==="record_use"&&ke.preview){const yt=ke.url||((_=ke.preview)==null?void 0:_.url)||"/preview/";(q=z.current)==null||q.call(z,{type:"preview",url:yt,ts:Date.now()}),D.current=yt}}(Z==null?void 0:Z.type)==="canvas"&&Z.phase==="result"&&!Z.isError&&((J=Z.data)==null?void 0:J.kind)==="block"&&Z.data.block&&((re=z.current)==null||re.call(z,{type:"block",op:Z.data.op||"make",block:Z.data.block})),(Z==null?void 0:Z.type)==="canvas"&&Z.phase==="result"&&!Z.isError&&((xe=Z.data)==null?void 0:xe.kind)==="theme"&&Z.data.op==="set"&&Z.data.theme&&((ve=z.current)==null||ve.call(z,{type:"theme",theme:Z.data.theme}))}else if(G.type==="bazaar")G.phase==="meter"&&(j(G.state),(Ue=z.current)==null||Ue.call(z,{type:"meter",state:G.state}));else if(G.type==="usage")(Oe=z.current)==null||Oe.call(z,{type:"usage",state:G.state});else if(G.type==="stderr")f(Z=>JC(Z,G.messageId,G.text));else if(G.type==="end"){if(p(null),g(!1),D.current){let Z=D.current;D.current=null;try{Z=new URL(Z,window.location.origin).href}catch{}f(ke=>[...ke,{id:`win-${Date.now()}`,role:"win",url:Z}])}}else if(G.type==="error")p(null),g(!1),D.current=null,G.messageId?f(Z=>Qp(Z,G.messageId,{type:"error",message:G.message||"agent error"})):f(Z=>[...Z,{id:`err-${Date.now()}`,role:"error",text:G.message||"agent error"}]);else if(G.type==="turn-begin")D.current=null,f(Z=>{if(Z.some(yt=>yt.id===G.messageId))return Z;const ke=[];return G.userText&&ke.push({id:`u-${G.messageId}`,role:"user",text:G.userText}),G.note&&ke.push({id:`note-${G.messageId}`,role:"system",text:G.note}),ke.push({id:G.messageId,role:"agent",blocks:[]}),[...Z,...ke]}),p(G.messageId),g(!0);else if(G.type==="reset"){f([]),p(null),g(!1),D.current=null;try{localStorage.removeItem(u)}catch{}}},te.onerror=()=>g(!1),te.onclose=()=>{if(x(!1),g(!1),p(null),I)return;const se=Math.min(1e3*2**Q,1e4);Q+=1,N=setTimeout(le,se)}};return le(),()=>{I=!0,clearTimeout(N);try{te==null||te.close()}catch{}}},[r]);function L(I,Q){if(!t.chatWrite)return;const N=(typeof I=="string"?I:v).trim();if(!N||h)return;const te=typeof Q=="string"&&Q.trim()||N,le=k.current,E=le==null?void 0:le.readyState;if(!le||E!==WebSocket.OPEN&&E!==WebSocket.CONNECTING){f(se=>[...se,{id:`err-${Date.now()}`,role:"error",text:"reconnecting to your agent — try again in a few seconds"}]);return}const pe=`m-${Date.now()}`;T.current=!0,f(se=>[...se,{id:`u-${pe}`,role:"user",text:te},{id:pe,role:"agent",blocks:[]}]),p(pe),g(!0),w("");const je=JSON.stringify({type:"send",text:N,mode:n,messageId:pe});E===WebSocket.OPEN?le.send(je):le.addEventListener("open",()=>{try{le.send(je)}catch{}},{once:!0})}C.current=L,b.useEffect(()=>{var I;!(a!=null&&a.text)||M.current===a.ts||(M.current=a.ts,T.current=!0,(I=C.current)==null||I.call(C,a.text))},[a]);function $(){var I;((I=k.current)==null?void 0:I.readyState)===WebSocket.OPEN&&k.current.send(JSON.stringify({type:"cancel"})),g(!1),p(null)}function K(){var I;((I=k.current)==null?void 0:I.readyState)===WebSocket.OPEN&&k.current.send(JSON.stringify({type:"reset"})),f([]),p(null),g(!1),D.current=null;try{localStorage.removeItem(u)}catch{}}function ie(I){I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),L())}const ce=c.length===0;return o.jsxs(o.Fragment,{children:[!ce&&t.chatWrite&&o.jsx("div",{className:"chat-toolbar","data-testid":"chat-toolbar",children:o.jsx("button",{className:"chat-newbtn",onClick:K,disabled:h,"data-testid":"new-chat-btn",title:"Start a fresh conversation — the agent forgets the current thread",children:"+ New chat"})}),o.jsxs("div",{className:"chat-messages",ref:S,onScroll:H,"data-testid":"chat-messages",children:[ce&&o.jsx(oT,{role:e,connected:y,agentName:s,canSend:t.chatWrite&&!h,onSend:L}),c.map(I=>o.jsx(eT,{message:I,streaming:I.id===d,bazaarState:m,canReply:t.chatWrite&&!h,onQuickReply:L},I.id))]}),t.chatWrite&&o.jsxs("div",{className:"chat-input","data-testid":"chat-input",children:[o.jsx("textarea",{"data-testid":"chat-textarea",placeholder:e==="client"?"Describe the change you’d like…":"Ask the agent to build, fix, or explain something — Enter to send",value:v,onChange:I=>w(I.target.value),onKeyDown:ie,disabled:h,rows:2}),h?o.jsx("button",{onClick:$,"data-testid":"cancel-btn",children:"Stop"}):o.jsx("button",{className:"primary send-btn",onClick:L,disabled:!v.trim(),"data-testid":"send-btn",children:"Send"})]}),!t.chatWrite&&e==="viewer"&&o.jsx("div",{className:"chat-readonly-banner",children:"You’re viewing a shared workspace (read-only)."})]})}function eT({message:e,streaming:t,bazaarState:n,canReply:r,onQuickReply:i}){if(e.role==="user")return o.jsx("div",{className:"chat-msg user","data-testid":"chat-msg-user",children:o.jsx("div",{className:"msg-plain",children:e.text})});if(e.role==="system")return o.jsx("div",{className:"chat-msg system","data-testid":"chat-msg-system",children:e.text});if(e.role==="win")return o.jsx(aT,{url:e.url});if(e.role==="error")return o.jsxs("div",{className:"chat-msg error","data-testid":"chat-msg-error",children:["⚠ ",e.text]});const a=e.blocks||[],s=a[a.length-1],l=t&&(s==null?void 0:s.type)==="text"?a.length-1:-1,u=t&&(a.length===0||(s==null?void 0:s.type)==="tool"&&s.done);return o.jsxs("div",{className:"chat-msg agent","data-testid":"chat-msg-agent",children:[a.map((c,f)=>o.jsx(tT,{block:c,cursor:f===l,bazaarState:n,canReply:r,onQuickReply:i},c.id||`${c.type}-${f}`)),u&&o.jsx(sT,{}),e.usage&&o.jsx(lT,{usage:e.usage,costUsd:e.costUsd,durationMs:e.durationMs}),e.stderr&&o.jsxs("details",{className:"stderr-block",children:[o.jsx("summary",{children:"stderr"}),o.jsx("pre",{children:e.stderr})]})]})}function tT({block:e,cursor:t,bazaarState:n,canReply:r,onQuickReply:i}){var a;return e.type==="bazaar"?o.jsx(DC,{block:e,bazaarState:n,canReply:r,onQuickReply:i}):e.type==="text"?o.jsxs("div",{className:"agent-text",children:[o.jsx(ox,{text:e.text}),t&&o.jsx("span",{className:"stream-cursor"})]}):e.type==="thinking"?o.jsxs("details",{className:"thinking-block",children:[o.jsx("summary",{children:"💭 Thought process"}),o.jsx("div",{className:"thinking-body",children:e.text})]}):e.type==="tool"?e.name==="AskUserQuestion"&&Array.isArray((a=e.input)==null?void 0:a.questions)&&e.input.questions.length?o.jsx(rT,{block:e,canReply:r,onQuickReply:i}):o.jsx(AC,{block:e}):e.type==="canvas"?o.jsx(nT,{block:e}):e.type==="error"?o.jsxs("div",{className:"agent-error",children:["⚠ ",e.text]}):null}function nT({block:e}){var r,i,a,s;if(e.phase==="result"&&!e.isError&&((r=e.data)==null?void 0:r.kind)==="theme"&&e.data.op==="set"){const l=(i=e.data.theme)==null?void 0:i.name;return o.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[o.jsx("span",{className:"canvas-card-icon",children:"🎨"}),o.jsxs("span",{className:"canvas-card-text",children:["Restyled your workspace",l?o.jsxs(o.Fragment,{children:[" — ",o.jsx("strong",{children:l})]}):null]})]})}const t=(a=e.data)==null?void 0:a.block;if(e.phase==="call"||!t)return o.jsx("div",{className:"canvas-card is-pending","data-testid":"canvas-card",children:"🧩 Building a block…"});if(e.isError)return o.jsx("div",{className:"canvas-card is-error","data-testid":"canvas-card",children:"⚠ Couldn’t build that block."});const n=((s=e.data)==null?void 0:s.op)==="update"?"Updated":"Added";return o.jsxs("div",{className:"canvas-card","data-testid":"canvas-card",children:[o.jsx("span",{className:"canvas-card-icon",children:t.icon||"🧩"}),o.jsxs("span",{className:"canvas-card-text",children:[n," ",o.jsx("strong",{children:t.title})," to your canvas"]})]})}function rT({block:e,canReply:t,onQuickReply:n}){const r=e.input.questions;return o.jsxs("div",{className:"ask-card","data-testid":"ask-card",children:[o.jsxs("div",{className:"ask-head",children:[o.jsx("span",{className:"ask-icon",children:"🤔"}),o.jsx("span",{children:"Your call"})]}),r.map((i,a)=>o.jsx(iT,{q:i,canReply:t,onQuickReply:n},a)),o.jsx("div",{className:"ask-foot",children:"…or just type your answer below."})]})}function iT({q:e,canReply:t,onQuickReply:n}){const[r,i]=b.useState([]),a=!!e.multiSelect,s=Array.isArray(e.options)?e.options:[],l=u=>i(c=>c.includes(u)?c.filter(f=>f!==u):[...c,u]);return o.jsxs("div",{className:"ask-q",children:[e.header&&o.jsx("span",{className:"ask-q-header",children:e.header}),e.question&&o.jsx("p",{className:"ask-q-text",children:e.question}),o.jsx("div",{className:"ask-options",children:s.map((u,c)=>a?o.jsxs("button",{type:"button",className:`ask-opt${r.includes(u.label)?" sel":""}`,disabled:!t,onClick:()=>l(u.label),title:u.description||"",children:[o.jsx("span",{className:"ask-opt-check",children:r.includes(u.label)?"☑":"☐"}),o.jsxs("span",{className:"ask-opt-main",children:[o.jsx("span",{className:"ask-opt-label",children:u.label}),u.description&&o.jsx("span",{className:"ask-opt-desc",children:u.description})]})]},c):o.jsxs("button",{type:"button",className:"ask-opt",disabled:!t,onClick:()=>t&&n(u.label),title:u.description||"",children:[o.jsxs("span",{className:"ask-opt-main",children:[o.jsx("span",{className:"ask-opt-label",children:u.label}),u.description&&o.jsx("span",{className:"ask-opt-desc",children:u.description})]}),o.jsx("span",{className:"ask-opt-go",children:"→"})]},c))}),a&&o.jsxs("button",{type:"button",className:"primary ask-send",disabled:!t||!r.length,onClick:()=>t&&r.length&&n(r.join(", ")),children:["Send",r.length?` (${r.length})`:""]})]})}function aT({url:e}){let t=e;try{const n=new URL(e);t=`${n.host}${n.pathname==="/"?"":n.pathname}`}catch{}return o.jsxs("div",{className:"chat-msg win-card","data-testid":"win-card",children:[o.jsx("span",{className:"win-spark",children:"✨"}),o.jsxs("div",{className:"win-body",children:[o.jsx("span",{className:"win-lead",children:"It’s live — this is yours:"}),o.jsx("a",{className:"win-url",href:e,target:"_blank",rel:"noreferrer",children:t}),o.jsx("span",{className:"win-sub",children:"Open it, or send it to someone."})]})]})}function sT(){return o.jsxs("div",{className:"agent-working","data-testid":"agent-working",children:[o.jsxs("span",{className:"dots",children:[o.jsx("i",{}),o.jsx("i",{}),o.jsx("i",{})]}),"working"]})}function lT({usage:e,costUsd:t,durationMs:n}){const r=typeof t=="number"?t:e==null?void 0:e.cost_usd;return o.jsxs("div",{className:"usage-footer","data-testid":"usage-footer",children:[(e==null?void 0:e.output_tokens)!=null&&o.jsxs("span",{title:"output tokens",children:["↑ ",e.output_tokens.toLocaleString()]}),typeof r=="number"&&r>0&&o.jsxs("span",{title:"cost (USD)",children:["$",r.toFixed(4)]}),n!=null&&o.jsxs("span",{children:[(n/1e3).toFixed(1),"s"]})]})}function oT({role:e,connected:t,agentName:n,canSend:r,onSend:i}){if(e==="client")return o.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[o.jsx("div",{className:"chat-empty-mark",children:"✦"}),o.jsx("p",{className:"chat-empty-title",children:"Describe what you’d like changed"}),o.jsx("p",{className:"chat-empty-sub",children:"The team’s AI agent will pick it up and you’ll see it here."}),!t&&o.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"})]});const a=n&&n!=="Chat"?n:null,s=[{label:"✦ Build my workspace for me",display:"Build my workspace for me.",primary:!0,prompt:"Set up a friendly starter workspace for me. Use your canvas tools to add a couple of useful blocks — for example a short welcome note, a quick getting-started checklist, and maybe a tips block — and pick a warm, welcoming theme if you'd like. Narrate as you go in short plain lines (one line per step, no jargon) so I can watch it come together. Then say a brief, friendly hello telling me what you set up. Keep it light."},{label:"Show me around",display:"Show me around.",prompt:"What's in this workspace? Give me a quick, friendly tour."},{label:"Make something I can show off",display:"Make something I can show off.",prompt:"Build me a simple, good-looking landing page, and put a Live view on my canvas so I can watch it come together. Narrate as you go in short plain lines — one line per step, no jargon. When it’s done, tell me where to see it."}];return o.jsxs("div",{className:"chat-empty","data-testid":"chat-empty",children:[o.jsx("div",{className:"chat-empty-mark",children:"✦"}),o.jsx("p",{className:"chat-empty-title",children:a?`Hi — I’m ${a}.`:"Hi — I’m your agent."}),o.jsx("p",{className:"chat-empty-sub",children:"Tell me what you’re working on and I’ll set it up for you — I can build, write, and arrange your workspace as we go. Not sure where to start?"}),o.jsx("div",{className:"chat-empty-starters",children:s.map(l=>o.jsx("button",{type:"button",className:`chat-empty-starter${l.primary?" primary":""}`,onClick:()=>i==null?void 0:i(l.prompt,l.display),disabled:!r||!t,"data-testid":"chat-empty-starter",children:l.label},l.label))}),!t&&o.jsx("p",{className:"chat-empty-warn",children:"connecting to the agent bridge…"}),o.jsx(Sd,{variant:"ambient"})]})}function uT(e){var n;const t=(n=e==null?void 0:e.session)==null?void 0:n.source;return t==="localhost"||t==="loopback"}function cT({session:e,onEnter:t,onClose:n}){var G;const[r,i]=b.useState(null),[a,s]=b.useState(null),[l,u]=b.useState(!1),[c,f]=b.useState(0),[d,p]=b.useState(""),[h,g]=b.useState(""),[v,w]=b.useState(!1),[y,x]=b.useState(null),[m,j]=b.useState(null),[k,S]=b.useState(""),[T,z]=b.useState(null),[D,C]=b.useState(null),[M,H]=b.useState(""),[L,$]=b.useState(""),K=b.useRef(null),ie=uT(e),ce=!!((G=e==null?void 0:e.account)!=null&&G.email);async function I(){try{const _=await fetch("/api/lobby/workspaces");if(!_.ok)throw new Error(`HTTP ${_.status}`);const q=await _.json();i(Array.isArray(q.workspaces)?q.workspaces:[])}catch(_){s(String((_==null?void 0:_.message)||_)),i([])}}b.useEffect(()=>{I()},[]),b.useEffect(()=>{var _;r&&r.length&&((_=K.current)==null||_.focus())},[r]);async function Q(_){if(!(!_||l)){if(_.joinable){E(_);return}u(!0);try{await fetch(`/api/lobby/workspaces/${encodeURIComponent(_.id)}/open`,{method:"POST"})}catch{}t(_.id)}}async function N({name:_,dir:q}){if(!l){u(!0),s(null);try{const J=await fetch("/api/lobby/workspaces",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(_?{name:_}:{dir:q})}),re=await J.json().catch(()=>null);if(!J.ok){s((re==null?void 0:re.message)||(re==null?void 0:re.error)||`create failed (HTTP ${J.status})`),u(!1);return}t(re.workspace.id)}catch(J){s(String((J==null?void 0:J.message)||J)),u(!1)}}}async function te(_){if(!l){u(!0),s(null);try{const q=await fetch(`/api/lobby/workspaces/${encodeURIComponent(_.id)}/share`,{method:"POST"}),J=await q.json().catch(()=>null);if(!q.ok){s((J==null?void 0:J.message)||(J==null?void 0:J.error)||`couldn’t share (HTTP ${q.status})`);return}x(null),await I(),j(_.id),z(null),S("")}catch(q){s(String((q==null?void 0:q.message)||q))}finally{u(!1)}}}async function le(_){const q=k.trim();if(!(!q||l)){u(!0),z(null);try{const J=await fetch(`/api/lobby/workspaces/${encodeURIComponent(_.id)}/invite`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:q})}),re=await J.json().catch(()=>null);if(!J.ok){z({ok:!1,text:(re==null?void 0:re.message)||(re==null?void 0:re.error)||`invite failed (HTTP ${J.status})`});return}z({ok:!0,text:re!=null&&re.pending?`Invited ${q}. They’ll see this workspace the next time they sign in to VentureWild — just let them know to sign in.`:`${q} is in — they’ll see this workspace when they sign in.`}),S("")}catch(J){z({ok:!1,text:String((J==null?void 0:J.message)||J)})}finally{u(!1)}}}function E(_){C(q=>q===_.id?null:_.id),H(_.name||""),$(""),s(null)}async function pe(_){var q;if(!l){u(!0),s(null);try{const J=L.trim(),re={slug:((q=_.shared)==null?void 0:q.slug)||_.slug};J?re.dir=J:re.name=M.trim()||_.name;const xe=await fetch("/api/lobby/workspaces/join",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(re)}),ve=await xe.json().catch(()=>null);if(!xe.ok){s((ve==null?void 0:ve.message)||(ve==null?void 0:ve.error)||`couldn’t join (HTTP ${xe.status})`);return}t(ve.workspace.id)}catch(J){s(String((J==null?void 0:J.message)||J))}finally{u(!1)}}}function je(_){var q;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{...Jp,...mT},children:[o.jsxs("div",{style:{...Zp,cursor:"default"},children:[o.jsx("span",{style:{fontWeight:600},children:_.name}),o.jsx("span",{"data-testid":`lobby-shared-${_.id}`,style:eh,children:"shared"}),o.jsx("span",{style:{flex:1}}),o.jsx("span",{style:{color:"var(--text-muted)",fontSize:12},children:(q=_.shared)!=null&&q.ownerEmail?`invited by ${_.shared.ownerEmail}`:"shared with you"})]}),ie?o.jsx("button",{"data-testid":`lobby-join-${_.id}`,onClick:()=>E(_),disabled:l,style:Ao,title:"Save it to a folder on this computer",children:"Join"}):o.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",paddingRight:4},children:"join from your computer"})]}),D===_.id&&o.jsxs("div",{"data-testid":`lobby-join-panel-${_.id}`,style:Do,children:[o.jsxs("p",{style:{margin:"0 0 8px",fontSize:13,lineHeight:1.5},children:["Pick where ",o.jsx("strong",{children:_.name})," lives on this computer — your agent here joins the shared brain."]}),o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx("input",{"data-testid":`lobby-join-name-${_.id}`,value:M,onChange:J=>H(J.target.value),onKeyDown:J=>{J.key==="Enter"&&pe(_)},placeholder:"Folder name…",style:Yi,disabled:l}),o.jsx("button",{className:"primary","data-testid":`lobby-join-confirm-${_.id}`,onClick:()=>pe(_),disabled:l,children:"Join"})]}),o.jsx("input",{"data-testid":`lobby-join-path-${_.id}`,value:L,onChange:J=>$(J.target.value),placeholder:"…or paste an existing folder path",style:{...Yi,marginTop:8,width:"100%"},disabled:l})]})]})}function se(_){!r||!r.length||(_.key==="ArrowDown"?(_.preventDefault(),f(q=>Math.min(r.length-1,q+1))):_.key==="ArrowUp"?(_.preventDefault(),f(q=>Math.max(0,q-1))):_.key==="Enter"&&(_.preventDefault(),Q(r[c])))}return o.jsx("div",{className:"app lobby","data-testid":"lobby",style:dT,children:o.jsxs("div",{style:fT,children:[o.jsxs("header",{style:{marginBottom:18},children:[o.jsx("h1",{style:{margin:0,fontSize:22},children:"Your workspaces"}),o.jsxs("p",{style:{margin:"6px 0 0",color:"var(--text-muted)",fontSize:13},children:["Pick one to dive in",ie?", or start a new one":"",". Each keeps its own files and its own agent."]})]}),a&&o.jsx("p",{"data-testid":"lobby-error",style:{color:"var(--error)",fontSize:13},children:a}),r===null?o.jsxs("div",{style:{color:"var(--text-muted)",padding:12},children:[o.jsx("span",{className:"spinner"})," Loading…"]}):r.length===0?o.jsxs("div",{"data-testid":"lobby-empty",style:pT,children:[o.jsx("div",{style:{fontSize:26,marginBottom:6},children:"✦"}),o.jsx("p",{style:{margin:"0 0 4px",fontSize:16,fontWeight:600},children:ie?"Let's create your first workspace":"No workspaces here yet"}),o.jsx("p",{style:{margin:0,color:"var(--text-muted)",fontSize:13,lineHeight:1.5},children:ie?"A workspace is just a folder your agent works in. Name one below — your agent meets you inside.":"Create one on your computer to get started; its files live there."})]}):o.jsx("ul",{ref:K,tabIndex:0,onKeyDown:se,"data-testid":"lobby-list",style:{listStyle:"none",margin:0,padding:0,outline:"none"},children:r.map((_,q)=>{var J,re,xe,ve;return o.jsx("li",{children:_.joinable?je(_):o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{...Jp,...q===c?hT:null},children:[o.jsxs("button",{"data-testid":`lobby-card-${_.id}`,onClick:()=>{f(q),Q(_)},disabled:l,style:Zp,children:[o.jsx("span",{style:{fontWeight:600},children:_.name}),_.isDefault&&o.jsx("span",{style:gT,children:"default"}),_.kind==="shared"&&o.jsx("span",{"data-testid":`lobby-shared-${_.id}`,style:eh,children:"shared"}),_.kind==="shared"&&o.jsx("span",{"data-testid":`lobby-sync-${_.id}`,style:(J=_.shared)!=null&&J.projectCode?dx:yT,title:(re=_.shared)!=null&&re.projectCode?"Files replicate to teammates via VentureWild":"File sync starts when this computer’s sync service is online",children:(xe=_.shared)!=null&&xe.projectCode?"⟳ synced":"sync pending"}),o.jsx("span",{style:{flex:1}}),o.jsx("span",{style:{color:"var(--text-muted)",fontSize:12},children:_.dir})]}),ie&&ce&&_.kind!=="shared"&&o.jsx("button",{"data-testid":`lobby-share-${_.id}`,onClick:()=>{x(_.id),j(null)},disabled:l,style:Ao,title:"Make this a shared workspace",children:"Share"}),ie&&ce&&_.kind==="shared"&&((ve=_.shared)==null?void 0:ve.role)==="owner"&&o.jsx("button",{"data-testid":`lobby-invite-toggle-${_.id}`,onClick:()=>{j(Ue=>Ue===_.id?null:_.id),z(null)},disabled:l,style:Ao,title:"Invite a teammate",children:"+ Invite"})]}),y===_.id&&o.jsxs("div",{"data-testid":`lobby-share-prompt-${_.id}`,style:Do,children:[o.jsxs("p",{style:{margin:"0 0 8px",fontSize:13,lineHeight:1.5},children:["Make ",o.jsx("strong",{children:_.name})," a shared workspace? Teammates you invite become ",o.jsx("strong",{children:"equal members"})," — they get the files ",o.jsx("strong",{children:"and"})," ","everything your agent has learned about this work. That shared memory is the point."]}),o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx("button",{className:"primary","data-testid":`lobby-share-confirm-${_.id}`,onClick:()=>te(_),disabled:l,children:"Share it"}),o.jsx("button",{onClick:()=>x(null),disabled:l,children:"Cancel"})]})]}),m===_.id&&_.kind==="shared"&&o.jsxs("div",{"data-testid":`lobby-invite-${_.id}`,style:Do,children:[o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx("input",{"data-testid":`lobby-invite-email-${_.id}`,type:"email",value:k,onChange:Ue=>S(Ue.target.value),onKeyDown:Ue=>{Ue.key==="Enter"&&k.trim()&&le(_)},placeholder:"teammate@email.com",style:Yi,disabled:l}),o.jsx("button",{className:"primary","data-testid":`lobby-invite-send-${_.id}`,onClick:()=>le(_),disabled:l||!k.trim(),children:"Send invite"})]}),T&&o.jsx("p",{"data-testid":`lobby-invite-msg-${_.id}`,style:{margin:"8px 0 0",fontSize:12,color:T.ok?"var(--accent, #0891b2)":"var(--error)"},children:T.text})]})]})},_.id)})}),ie&&o.jsxs("div",{style:{marginTop:18,borderTop:"1px solid var(--border)",paddingTop:16},children:[o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx("input",{"data-testid":"lobby-new-name",value:d,onChange:_=>p(_.target.value),onKeyDown:_=>{_.key==="Enter"&&d.trim()&&N({name:d.trim()})},placeholder:"Name a new workspace…",style:Yi,disabled:l}),o.jsx("button",{className:"primary","data-testid":"lobby-create",onClick:()=>d.trim()&&N({name:d.trim()}),disabled:l||!d.trim(),children:"+ New workspace"})]}),v?o.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[o.jsx("input",{"data-testid":"lobby-open-path",value:h,onChange:_=>g(_.target.value),onKeyDown:_=>{_.key==="Enter"&&h.trim()&&N({dir:h.trim()})},placeholder:"…or paste the path to an existing folder",style:Yi,disabled:l}),o.jsx("button",{"data-testid":"lobby-open",onClick:()=>h.trim()&&N({dir:h.trim()}),disabled:l||!h.trim(),children:"Open folder"})]}):o.jsx("button",{"data-testid":"lobby-open-toggle",onClick:()=>w(!0),style:{marginTop:8,background:"none",border:"none",color:"var(--accent, #4a90d9)",cursor:"pointer",fontSize:13,padding:0},children:"or open an existing folder →"})]}),n&&o.jsx("div",{style:{marginTop:18},children:o.jsx("button",{"data-testid":"lobby-close",onClick:n,children:"← Back to my workspace"})})]})})}const dT={display:"flex",alignItems:"flex-start",justifyContent:"center",padding:"8vh 16px",height:"100%",overflow:"auto"},fT={width:"100%",maxWidth:640},pT={textAlign:"center",padding:"20px 16px 24px",border:"1px dashed var(--border)",borderRadius:12,marginBottom:8},Jp={display:"flex",alignItems:"center",gap:8,width:"100%",marginBottom:8,borderRadius:10,border:"1px solid var(--border)",background:"var(--surface, transparent)",paddingRight:10},Zp={display:"flex",alignItems:"center",gap:10,flex:1,minWidth:0,textAlign:"left",padding:"12px 14px",background:"none",border:"none",borderRadius:10,color:"inherit",font:"inherit",cursor:"pointer"},hT={border:"1px solid var(--accent, #4a90d9)",boxShadow:"0 0 0 1px var(--accent, #4a90d9)"},mT={borderStyle:"dashed"},gT={fontSize:11,padding:"1px 6px",borderRadius:6,border:"1px solid var(--border)",color:"var(--text-muted)"},eh={fontSize:11,padding:"1px 6px",borderRadius:6,border:"1px solid var(--accent, #0891b2)",color:"var(--accent, #0891b2)"},dx={fontSize:11,padding:"1px 6px",borderRadius:6,color:"var(--text-muted)"},yT={...dx,fontStyle:"italic",opacity:.75},Ao={fontSize:12,padding:"5px 10px",borderRadius:8,border:"1px solid var(--border)",background:"var(--surface, transparent)",color:"inherit",cursor:"pointer",whiteSpace:"nowrap"},Do={margin:"-2px 0 10px",padding:"10px 12px",borderRadius:10,border:"1px solid var(--border)",background:"var(--surface-2, var(--surface, transparent))"},Yi={flex:1,padding:"8px 10px",borderRadius:8,border:"1px solid var(--border)",background:"var(--surface, transparent)",color:"inherit"};function Wr(e){const{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Pn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function ds(e,t,n,r,i,a,s){const{margin:l,containerPadding:u,rowHeight:c}=e,f=Wr(e);let d,p,h,g;if(s?(d=Math.round(s.width),p=Math.round(s.height)):(d=Pn(r,f,l[0]),p=Pn(i,c,l[1])),a?(h=Math.round(a.top),g=Math.round(a.left)):s?(h=Math.round(s.top),g=Math.round(s.left)):(h=Math.round((c+l[1])*n+u[1]),g=Math.round((f+l[0])*t+u[0])),!a&&!s){if(Number.isFinite(r)){const w=Math.round((f+l[0])*(t+r)+u[0])-g-d;w!==l[0]&&(d+=w-l[0])}if(Number.isFinite(i)){const w=Math.round((c+l[1])*(n+i)+u[1])-h-p;w!==l[1]&&(p+=w-l[1])}}return{top:h,left:g,width:d,height:p}}function xT(e,t,n,r,i){const{margin:a,containerPadding:s,cols:l,rowHeight:u,maxRows:c}=e,f=Wr(e);let d=Math.round((n-s[0])/(f+a[0])),p=Math.round((t-s[1])/(u+a[1]));return d=cl(d,0,l-r),p=cl(p,0,c-i),{x:d,y:p}}function fs(e,t,n){const{margin:r,containerPadding:i,rowHeight:a}=e,s=Wr(e),l=Math.round((n-i[0])/(s+r[0])),u=Math.round((t-i[1])/(a+r[1]));return{x:l,y:u}}function vT(e,t,n){const{margin:r,rowHeight:i}=e,a=Wr(e),s=Math.max(1,Math.round((t+r[0])/(a+r[0]))),l=Math.max(1,Math.round((n+r[1])/(i+r[1])));return{w:s,h:l}}function cl(e,t,n){return Math.max(Math.min(e,n),t)}function jd(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Lr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&jd(r,t))return r}}function fx(e,t){return e.filter(n=>jd(n,t))}function bT(e,t){return t==="horizontal"?px(e):t==="vertical"||t==="wrap"?nc(e):[...e]}function nc(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function px(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function Ll(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const i=r.y+r.h;i>t&&(t=i)}}return t}function zr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function Fl(e){return e.filter(t=>t.static===!0)}function Vr(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function xr(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=Vr(r))}return t}function wT(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const i=e[r];i!==void 0&&(t.i===i.i?n[r]=t:n[r]=i)}return n}function kT(e,t,n){let r=zr(e,t);return r?(r=n(Vr(r)),[wT(e,r),r]):[[...e],null]}function Nd(e,t){const n=Fl(e);for(let r=0;r<e.length;r++){const i=e[r];if(i!==void 0)if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;Lr(n,i);)i.y++}return e}function Ar(e,t,n,r,i,a,s,l,u){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const c=t.x,f=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=bT(e,s);(s==="vertical"&&typeof r=="number"?f>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const h=fx(d,t),g=h.length>0;if(g&&u)return xr(e);if(g&&a)return t.x=c,t.y=f,t.moved=!1,e;let v=[...e];for(let w=0;w<h.length;w++){const y=h[w];y!==void 0&&(y.moved||(y.static?v=th(v,y,t,i,s):v=th(v,t,y,i,s)))}return v}function th(e,t,n,r,i,a){const s=i==="horizontal",l=i==="vertical",u=t.static;if(r){r=!1;const d={x:s?Math.max(t.x-n.w,0):n.x,y:l?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},p=Lr(e,d),h=p!==void 0&&p.y+p.h>t.y,g=p!==void 0&&t.x+t.w>p.x;if(!p)return Ar(e,n,s?d.x:void 0,l?d.y:void 0,r,u,i);if(h&&l)return Ar(e,n,void 0,n.y+1,r,u,i);if(h&&i===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(g&&s)return Ar(e,t,n.x,void 0,r,u,i)}const c=s?n.x+1:void 0,f=l?n.y+1:void 0;return c===void 0&&f===void 0?[...e]:Ar(e,n,c,f,r,u,i)}function hi(e,t,n){return Math.max(t,Math.min(n,e))}var ST={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:hi(t,0,Math.max(0,r-e.w)),y:hi(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){const s=r==="w"||r==="nw"||r==="sw"?e.x+e.w:i-e.x,l=r==="n"||r==="nw"||r==="ne"?e.y+e.h:a-e.y;return{w:hi(t,1,Math.max(1,s)),h:hi(n,1,Math.max(1,l))}}},jT={name:"minMaxSize",constrainSize(e,t,n){return{w:hi(t,e.minW??1,e.maxW??1/0),h:hi(n,e.minH??1,e.maxH??1/0)}}},hx=[ST,jT];function ps(e,t,n,r,i){let a={x:n,y:r};for(const s of e)s.constrainPosition&&(a=s.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(const s of t.constraints)s.constrainPosition&&(a=s.constrainPosition(t,a.x,a.y,i));return a}function NT(e,t,n,r,i,a){let s={w:n,h:r};for(const l of e)l.constrainSize&&(s=l.constrainSize(t,s.w,s.h,i,a));if(t.constraints)for(const l of t.constraints)l.constrainSize&&(s=l.constrainSize(t,s.w,s.h,i,a));return s}function Ed({top:e,left:t,width:n,height:r}){const i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:"absolute"}}function mx({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function nh(e){return e*100+"%"}function ET(e,t,n,r){return e+n>r?t:n}function gx(e,t,n){return e<0?t:n}function CT(e){return Math.max(0,e)}function dl(e){return Math.max(0,e)}var Cd=(e,t,n)=>{const{left:r,height:i,width:a}=t,s=e.top-(i-e.height);return{left:r,width:a,height:gx(s,e.height,i),top:dl(s)}},Td=(e,t,n)=>{const{top:r,left:i,height:a,width:s}=t;return{top:r,height:a,width:ET(e.left,e.width,s,n),left:CT(i)}},zd=(e,t,n)=>{const{top:r,height:i,width:a}=t,s=e.left+e.width-a;return s<0?{height:i,width:e.left+e.width,top:dl(r),left:0}:{height:i,width:a,top:dl(r),left:s}},Rd=(e,t,n)=>{const{top:r,left:i,height:a,width:s}=t;return{width:s,left:i,height:gx(r,e.height,a),top:dl(r)}},TT=(e,t,n)=>Cd(e,Td(e,t,n)),zT=(e,t,n)=>Cd(e,zd(e,t)),RT=(e,t,n)=>Rd(e,Td(e,t,n)),PT=(e,t,n)=>Rd(e,zd(e,t)),IT={n:Cd,ne:TT,e:Td,se:RT,s:Rd,sw:PT,w:zd,nw:zT};function _T(e,t,n,r){const i=IT[e];return i?i(t,{...t,...n},r):n}var yx={type:"transform",scale:1,calcStyle(e){return Ed(e)}},AT={type:"absolute",scale:1,calcStyle(e){return mx(e)}};function DT(e){return{type:"transform",scale:e,calcStyle(t){return Ed(t)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var OT=yx,LT={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},FT={enabled:!0,bounded:!1,threshold:3},MT={enabled:!0,handles:["se"]},$T={enabled:!1,defaultItem:{w:1,h:1}};function Pd(e,t,n,r,i){const a=r==="x"?"w":"h";t[r]+=1;const s=e.findIndex(u=>u.i===t.i),l=i??Fl(e).length>0;for(let u=s+1;u<e.length;u++){const c=e[u];if(c!==void 0&&!c.static){if(!l&&c.y>t.y+t.h)break;jd(t,c)&&Pd(e,c,n+t[a],r,l)}}t[r]=n}function BT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Lr(e,t);)t.y--;let i;for(;(i=Lr(e,t))!==void 0;)Pd(n,t,i.y+i.h,"y");return t.y=Math.max(t.y,0),t}function HT(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Lr(e,t);)t.x--;let i;for(;(i=Lr(e,t))!==void 0;)if(Pd(r,t,i.x+i.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Lr(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var xx={type:"vertical",allowOverlap:!1,compact(e,t){const n=Fl(e);let r=Ll(n);const i=nc(e),a=new Array(e.length);for(let s=0;s<i.length;s++){const l=i[s];if(l===void 0)continue;let u=Vr(l);u.static||(u=BT(n,u,i,r),r=Math.max(r,u.y+u.h),n.push(u));const c=e.indexOf(l);a[c]=u,u.moved=!1}return a}},vx={type:"horizontal",allowOverlap:!1,compact(e,t){const n=Fl(e),r=px(e),i=new Array(e.length);for(let a=0;a<r.length;a++){const s=r[a];if(s===void 0)continue;let l=Vr(s);l.static||(l=HT(n,l,t,r),n.push(l));const u=e.indexOf(s);i[u]=l,l.moved=!1}return i}},bx={type:null,allowOverlap:!1,compact(e,t){return xr(e)}},UT={...xx,allowOverlap:!0,compact(e,t){return xr(e)}},WT={...vx,allowOverlap:!0,compact(e,t){return xr(e)}},VT={...bx,allowOverlap:!0};function Ml(e,t=!1,n=!1){let r;return t?e==="vertical"?r=UT:e==="horizontal"?r=WT:r=VT:e==="vertical"?r=xx:e==="horizontal"?r=vx:r=bx,n?{...r,preventCollision:n}:r}function wx(e){return Object.keys(e).sort((n,r)=>e[n]-e[r])}function rh(e,t){const n=wx(e);let r=n[0];if(r===void 0)throw new Error("No breakpoints defined");for(let i=1;i<n.length;i++){const a=n[i];if(a===void 0)continue;const s=e[a];t>s&&(r=a)}return r}function ih(e,t){const n=t[e];if(n===void 0)throw new Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Oo(e,t,n,r,i,a){const s=e[n];if(s)return xr(s);let l=e[r];const u=wx(t),c=u.slice(u.indexOf(n));for(let h=0;h<c.length;h++){const g=c[h];if(g===void 0)continue;const v=e[g];if(v){l=v;break}}const f=xr(l||[]),d=Nd(f,{cols:i});return(typeof a=="object"&&a!==null?a:Ml(a)).compact(d,i)}function hs(e,t){if(Array.isArray(e))return e;const n=e,r=n[t];if(r!==void 0)return r;const i=Object.keys(n);for(const a of i){const s=n[a];if(s!==void 0)return s}return[10,10]}var kx={exports:{}},qT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",GT=qT,YT=GT;function Sx(){}function jx(){}jx.resetWarningCache=Sx;var XT=function(){function e(r,i,a,s,l,u){if(u!==YT){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jx,resetWarningCache:Sx};return n.PropTypes=n,n};kx.exports=XT();var Id=kx.exports;const ze=_a(Id);var KT={};function rc(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function ah(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ea(e){return typeof e=="number"&&!isNaN(e)}function Pt(e){return parseInt(e,10)}function Si(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}var Lo=["Moz","Webkit","O","ms"];function QT(e="transform"){var t,n;if(typeof window>"u")return"";const r=(n=(t=window.document)==null?void 0:t.documentElement)==null?void 0:n.style;if(!r||e in r)return"";for(let i=0;i<Lo.length;i++)if(Nx(e,Lo[i])in r)return Lo[i];return""}function Nx(e,t){return t?`${t}${JT(e)}`:e}function JT(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}var ZT=QT(),Fo="";function ez(e,t){var n;Fo||(Fo=(n=rc(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(i){return ah(e[i])}))!=null?n:"");const r=e[Fo];return ah(r)?!!r.call(e,t):!1}function sh(e,t,n){let r=e;do{if(ez(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Mo(e,t,n,r){if(!e)return;const i={capture:!0,...r},a=n;e.addEventListener?e.addEventListener(t,a,i):e.attachEvent?e.attachEvent("on"+t,a):e["on"+t]=a}function Nr(e,t,n,r){if(!e)return;const i={capture:!0,...r},a=n;e.removeEventListener?e.removeEventListener(t,a,i):e.detachEvent?e.detachEvent("on"+t,a):e["on"+t]=null}function tz(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Pt(n.borderTopWidth),t+=Pt(n.borderBottomWidth),t}function nz(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=Pt(n.borderLeftWidth),t+=Pt(n.borderRightWidth),t}function rz(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Pt(n.paddingTop),t-=Pt(n.paddingBottom),t}function iz(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=Pt(n.paddingLeft),t-=Pt(n.paddingRight),t}function az(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-i.left)/n,s=(e.clientY+t.scrollTop-i.top)/n;return{x:a,y:s}}function sz(e,t){const n=Ex(e,t,"px");return{[Nx("transform",ZT)]:n}}function lz(e,t){return Ex(e,t,"")}function Ex({x:e,y:t},n,r){let i=`translate(${e}${r},${t}${r})`;if(n){const a=`${typeof n.x=="string"?n.x:n.x+r}`,s=`${typeof n.y=="string"?n.y:n.y+r}`;i=`translate(${a}, ${s})`+i}return i}function oz(e,t){return e.targetTouches&&rc(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&rc(e.changedTouches,n=>t===n.identifier)}function uz(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function cz(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
90
|
+
`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
91
|
+
`,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&dz(e.body,"react-draggable-transparent-selection")}function lh(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{oh(e)}):oh(e)}function oh(e){if(e)try{e.body&&fz(e.body,"react-draggable-transparent-selection");const t=e.selection;if(t)t.empty();else{const n=(e.defaultView||window).getSelection();n&&n.type!=="Caret"&&n.removeAllRanges()}}catch{}}function dz(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function fz(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}function pz(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:gz(r);const i=_d(e);if(typeof r=="string"){const{ownerDocument:a}=i,s=a.defaultView;if(!s)throw new Error("Cannot resolve the owner window of the draggable node.");let l;if(r==="parent"?l=i.parentNode:l=i.getRootNode().querySelector(r),!(l instanceof s.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const u=l,c=s.getComputedStyle(i),f=s.getComputedStyle(u);r={left:-i.offsetLeft+Pt(f.paddingLeft)+Pt(c.marginLeft),top:-i.offsetTop+Pt(f.paddingTop)+Pt(c.marginTop),right:iz(u)-nz(i)-i.offsetLeft+Pt(f.paddingRight)-Pt(c.marginRight),bottom:rz(u)-tz(i)-i.offsetTop+Pt(f.paddingBottom)-Pt(c.marginBottom)}}return ea(r.right)&&(t=Math.min(t,r.right)),ea(r.bottom)&&(n=Math.min(n,r.bottom)),ea(r.left)&&(t=Math.max(t,r.left)),ea(r.top)&&(n=Math.max(n,r.top)),[t,n]}function uh(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function hz(e){return e.props.axis==="both"||e.props.axis==="x"}function mz(e){return e.props.axis==="both"||e.props.axis==="y"}function $o(e,t,n){const r=typeof t=="number"?oz(e,t):null;if(typeof t=="number"&&!r)return null;const i=_d(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return az(r||e,a,n.props.scale)}function Bo(e,t,n){const r=!ea(e.lastX),i=_d(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Ho(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function gz(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function _d(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}function In(...e){KT.DRAGGABLE_DEBUG&&console.log(...e)}var vn={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},er=vn.mouse,Sr=class extends b.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button=="number"&&e.button!==0||e.ctrlKey))return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!sh(e.target,this.props.handle,t)||this.props.cancel&&sh(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const r=uz(e);this.touchIdentifier=r;const i=$o(e,r,this);if(i==null)return;const{x:a,y:s}=i,l=Bo(this,a,s);In("DraggableCore: handleDragStart: %j",l),In("calling",this.props.onStart),!(this.props.onStart(e,l)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&cz(n),this.dragging=!0,this.lastX=a,this.lastY=s,Mo(n,er.move,this.handleDrag),Mo(n,er.stop,this.handleDragStop))},this.handleDrag=e=>{const t=$o(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let s=n-this.lastX,l=r-this.lastY;if([s,l]=uh(this.props.grid,s,l),!s&&!l)return;n=this.lastX+s,r=this.lastY+l}const i=Bo(this,n,r);if(In("DraggableCore: handleDrag: %j",i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const s=document.createEvent("MouseEvents");s.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(s)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;const t=$o(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let l=n-this.lastX||0,u=r-this.lastY||0;[l,u]=uh(this.props.grid,l,u),n=this.lastX+l,r=this.lastY+u}const i=Bo(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&lh(s.ownerDocument),In("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&(In("DraggableCore: Removing handlers"),Nr(s.ownerDocument,er.move,this.handleDrag),Nr(s.ownerDocument,er.stop,this.handleDragStop))},this.onMouseDown=e=>(er=vn.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(er=vn.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(er=vn.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(er=vn.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&Mo(e,vn.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;Nr(t,vn.mouse.move,this.handleDrag),Nr(t,vn.touch.move,this.handleDrag),Nr(t,vn.mouse.stop,this.handleDragStop),Nr(t,vn.touch.stop,this.handleDragStop),Nr(e,vn.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&lh(t)}}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Kg;return typeof t.findDOMNode=="function"?t.findDOMNode(this):(In("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return b.cloneElement(b.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Sr.displayName="DraggableCore";Sr.propTypes={allowAnyClick:ze.bool,allowMobileScroll:ze.bool,children:ze.node.isRequired,disabled:ze.bool,enableUserSelectHack:ze.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:ze.arrayOf(ze.number),handle:ze.string,cancel:ze.string,nodeRef:ze.object,onStart:ze.func,onDrag:ze.func,onStop:ze.func,onMouseDown:ze.func,scale:ze.number,className:Si,style:Si,transform:Si};Sr.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var $l=class extends b.Component{constructor(e){super(e),this.onDragStart=(t,n)=>{if(In("Draggable: onDragStart: %j",n),this.props.onStart(t,Ho(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(t,n)=>{if(!this.state.dragging)return!1;In("Draggable: onDrag: %j",n);const r=Ho(this,n),i={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:s,y:l}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[u,c]=pz(this,i.x,i.y);i.x=u,i.y=c,i.slackX=this.state.slackX+(s-i.x),i.slackY=this.state.slackY+(l-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-this.state.x,r.deltaY=i.y-this.state.y}if(this.props.onDrag(t,r)===!1)return!1;this.setState(i)},this.onDragStop=(t,n)=>{if(!this.state.dragging||this.props.onStop(t,Ho(this,n))===!1)return!1;In("Draggable: onDragStop: %j",n);const i={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:s,y:l}=this.props.position;i.x=s,i.y=l}this.setState(i)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(In("Draggable: getDerivedStateFromProps %j",{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=Kg;return typeof t.findDOMNode=="function"?t.findDOMNode(this):null}render(){const{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:s,position:l,positionOffset:u,scale:c,...f}=this.props;let d={},p=null;const g=!!!l||this.state.dragging,v=l||r,w={x:hz(this)&&g?this.state.x:v.x,y:mz(this)&&g?this.state.y:v.y};this.state.isElementSVG?p=lz(w,u):d=sz(w,u);const y=b.Children.only(n),x=Li(y.props.className||"",i,{[a]:this.state.dragging,[s]:this.state.dragged});return b.createElement(Sr,{...f,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},b.cloneElement(y,{className:x,style:{...y.props.style,...d},transform:p}))}};$l.displayName="Draggable";$l.propTypes={...Sr.propTypes,axis:ze.oneOf(["both","x","y","none"]),bounds:ze.oneOfType([ze.shape({left:ze.number,right:ze.number,top:ze.number,bottom:ze.number}),ze.string,ze.oneOf([!1])]),defaultClassName:ze.string,defaultClassNameDragging:ze.string,defaultClassNameDragged:ze.string,defaultPosition:ze.shape({x:ze.number,y:ze.number}),positionOffset:ze.shape({x:ze.oneOfType([ze.number,ze.string]),y:ze.oneOfType([ze.number,ze.string])}),position:ze.shape({x:ze.number,y:ze.number}),className:Si,style:Si,transform:Si};$l.defaultProps={...Sr.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var yz=$l;const xz=Object.freeze(Object.defineProperty({__proto__:null,DraggableCore:Sr,default:yz},Symbol.toStringTag,{value:"Module"}));var Ad={exports:{}},Ha={};const vz=Kx(xz);var Dd={};Dd.__esModule=!0;Dd.cloneElement=Nz;var bz=wz(b);function wz(e){return e&&e.__esModule?e:{default:e}}function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(n),!0).forEach(function(r){kz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ch(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kz(e,t,n){return(t=Sz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sz(e){var t=jz(e,"string");return typeof t=="symbol"?t:t+""}function jz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nz(e,t){return t.style&&e.props.style&&(t.style=dh(dh({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),bz.default.cloneElement(e,t)}var Ua={};Ua.__esModule=!0;Ua.resizableProps=void 0;var Te=Ez(Id);function Ez(e){return e&&e.__esModule?e:{default:e}}Ua.resizableProps={axis:Te.default.oneOf(["both","x","y","none"]),className:Te.default.string,children:Te.default.element.isRequired,draggableOpts:Te.default.shape({allowAnyClick:Te.default.bool,cancel:Te.default.string,children:Te.default.node,disabled:Te.default.bool,enableUserSelectHack:Te.default.bool,offsetParent:typeof Element<"u"?Te.default.instanceOf(Element):Te.default.any,grid:Te.default.arrayOf(Te.default.number),handle:Te.default.string,nodeRef:Te.default.object,onStart:Te.default.func,onDrag:Te.default.func,onStop:Te.default.func,onMouseDown:Te.default.func,scale:Te.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="y"?Te.default.number.isRequired(...t):Te.default.number(...t)},handle:Te.default.oneOfType([Te.default.node,Te.default.func]),handleSize:Te.default.arrayOf(Te.default.number),lockAspectRatio:Te.default.bool,maxConstraints:Te.default.arrayOf(Te.default.number),minConstraints:Te.default.arrayOf(Te.default.number),onResizeStop:Te.default.func,onResizeStart:Te.default.func,onResize:Te.default.func,resizeHandles:Te.default.arrayOf(Te.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Te.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];return r.axis==="both"||r.axis==="x"?Te.default.number.isRequired(...t):Te.default.number(...t)}};Ha.__esModule=!0;Ha.default=void 0;var Jr=Cx(b),Cz=vz,Tz=Dd,zz=Ua;const Rz=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function Cx(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(Cx=function(i,a){if(!a&&i&&i.__esModule)return i;var s,l,u={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return u;if(s=a?r:n){if(s.has(i))return s.get(i);s.set(i,u)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((l=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(l.get||l.set)?s(u,c,l):u[c]=i[c]);return u})(e,t)}function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ic.apply(null,arguments)}function Pz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(n),!0).forEach(function(r){Iz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iz(e,t,n){return(t=_z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _z(e){var t=Az(e,"string");return typeof t=="symbol"?t:t+""}function Az(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}let Od=class extends Jr.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(t,n){const r=this.props,i=r.minConstraints,a=r.maxConstraints,s=r.lockAspectRatio;if(!i&&!a&&!s)return[t,n];if(s){const p=this.props.width/this.props.height,h=t-this.props.width,g=n-this.props.height;Math.abs(h)>Math.abs(g*p)?n=t/p:t=n*p}const l=t,u=n;let c=this.slack||[0,0],f=c[0],d=c[1];return t+=f,n+=d,i&&(t=Math.max(i[0],t),n=Math.max(i[1],n)),a&&(t=Math.min(a[0],t),n=Math.min(a[1],n)),this.slack=[f+(l-t),d+(u-n)],[t,n]}resizeHandler(t,n){return(r,i)=>{var a,s,l,u;let c=i.node,f=i.deltaX,d=i.deltaY;t==="onResizeStart"&&this.resetData();const p=(this.props.axis==="both"||this.props.axis==="x")&&n!=="n"&&n!=="s",h=(this.props.axis==="both"||this.props.axis==="y")&&n!=="e"&&n!=="w";if(!p&&!h)return;const g=n[0],v=n[n.length-1],w=c.getBoundingClientRect();if(this.lastHandleRect!=null){if(v==="w"){const C=w.left-this.lastHandleRect.left;f+=C}if(g==="n"){const C=w.top-this.lastHandleRect.top;d+=C}}this.lastHandleRect=w,v==="w"&&(f=-f),g==="n"&&(d=-d);const y=(a=(s=this.lastSize)==null?void 0:s.width)!=null?a:this.props.width,x=(l=(u=this.lastSize)==null?void 0:u.height)!=null?l:this.props.height;let m=y+(p?f/this.props.transformScale:0),j=x+(h?d/this.props.transformScale:0);var k=this.runConstraints(m,j);if(m=k[0],j=k[1],t==="onResizeStop"&&this.lastSize){var S=this.lastSize;m=S.width,j=S.height}const T=m!==y||j!==x;t!=="onResizeStop"&&(this.lastSize={width:m,height:j});const z=typeof this.props[t]=="function"?this.props[t]:null;z&&!(t==="onResize"&&!T)&&(r.persist==null||r.persist(),z(r,{node:c,size:{width:m,height:j},handle:n})),t==="onResizeStop"&&this.resetData()}}renderResizeHandle(t,n){const r=this.props.handle;if(!r)return Jr.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if(typeof r=="function")return r(t,n);const i=typeof r.type=="string",a=Uo({ref:n},i?{}:{handleAxis:t});return Jr.cloneElement(r,a)}render(){const t=this.props,n=t.children,r=t.className,i=t.draggableOpts;t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart;const a=t.resizeHandles;t.transformScale;const s=Pz(t,Rz);return(0,Tz.cloneElement)(n,Uo(Uo({},s),{},{className:(r?r+" ":"")+"react-resizable",children:[...Jr.Children.toArray(n.props.children),...a.map(l=>{var u;const c=(u=this.handleRefs[l])!=null?u:this.handleRefs[l]=Jr.createRef();return Jr.createElement(Cz.DraggableCore,ic({},i,{nodeRef:c,key:"resizableHandle-"+l,onStop:this.resizeHandler("onResizeStop",l),onStart:this.resizeHandler("onResizeStart",l),onDrag:this.resizeHandler("onResize",l)}),this.renderResizeHandle(l,c))})]}))}};Ha.default=Od;Od.propTypes=zz.resizableProps;Od.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Bl={};Bl.__esModule=!0;Bl.default=void 0;var Wo=zx(b),Dz=Tx(Id),Oz=Tx(Ha),Lz=Ua;const Fz=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function Tx(e){return e&&e.__esModule?e:{default:e}}function zx(e,t){if(typeof WeakMap=="function")var n=new WeakMap,r=new WeakMap;return(zx=function(i,a){if(!a&&i&&i.__esModule)return i;var s,l,u={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return u;if(s=a?r:n){if(s.has(i))return s.get(i);s.set(i,u)}for(const c in i)c!=="default"&&{}.hasOwnProperty.call(i,c)&&((l=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,c))&&(l.get||l.set)?s(u,c,l):u[c]=i[c]);return u})(e,t)}function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(null,arguments)}function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(n),!0).forEach(function(r){Mz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mz(e,t,n){return(t=$z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $z(e){var t=Bz(e,"string");return typeof t=="symbol"?t:t+""}function Bz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}class Rx extends Wo.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(t,n)=>{const r=n.size;this.props.onResize?(t.persist==null||t.persist(),this.setState(r,()=>this.props.onResize&&this.props.onResize(t,n))):this.setState(r)}}static getDerivedStateFromProps(t,n){return n.propsWidth!==t.width||n.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null}render(){const t=this.props,n=t.handle,r=t.handleSize;t.onResize;const i=t.onResizeStart,a=t.onResizeStop,s=t.draggableOpts,l=t.minConstraints,u=t.maxConstraints,c=t.lockAspectRatio,f=t.axis;t.width,t.height;const d=t.resizeHandles,p=t.style,h=t.transformScale,g=Hz(t,Fz);return Wo.createElement(Oz.default,{axis:f,draggableOpts:s,handle:n,handleSize:r,height:this.state.height,lockAspectRatio:c,maxConstraints:u,minConstraints:l,onResizeStart:i,onResize:this.onResize,onResizeStop:a,resizeHandles:d,transformScale:h,width:this.state.width},Wo.createElement("div",ac({},g,{style:fl(fl({},p),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}}Bl.default=Rx;Rx.propTypes=fl(fl({},Lz.resizableProps),{},{children:Dz.default.element});Ad.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var Uz=Ad.exports.Resizable=Ha.default;Ad.exports.ResizableBox=Bl.default;function Px(e){return function(n,r,i,a,s,l,u){return e(n,r,u)}}function Hl(e){return function(n,r,i,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i,a);var s=a.get(n),l=a.get(r);if(s&&l)return s===r&&l===n;a.set(n,r),a.set(r,n);var u=e(n,r,i,a);return a.delete(n),a.delete(r),u}}function Ix(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function hh(e){return e.constructor===Object||e.constructor==null}function mh(e){return typeof e.then=="function"}function Ul(e,t){return e===t||e!==e&&t!==t}var Wz="[object Arguments]",Vz="[object Boolean]",qz="[object Date]",Gz="[object RegExp]",Yz="[object Map]",Xz="[object Number]",Kz="[object Object]",Qz="[object Set]",Jz="[object String]",gh=Object.prototype.toString;function Wl(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.createIsNestedEqual,u=l(c);function c(f,d,p){if(f===d)return!0;if(!f||!d||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;if(hh(f)&&hh(d))return i(f,d,u,p);var h=Array.isArray(f),g=Array.isArray(d);if(h||g)return h===g&&t(f,d,u,p);var v=gh.call(f);return v!==gh.call(d)?!1:v===qz?n(f,d,u,p):v===Gz?a(f,d,u,p):v===Yz?r(f,d,u,p):v===Qz?s(f,d,u,p):v===Kz||v===Wz?mh(f)||mh(d)?!1:i(f,d,u,p):v===Vz||v===Xz||v===Jz?Ul(f.valueOf(),d.valueOf()):!1}return c}function _x(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-- >0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var Zz=Hl(_x);function Ax(e,t){return Ul(e.valueOf(),t.valueOf())}function Dx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},s=0;return e.forEach(function(l,u){if(i){var c=!1,f=0;t.forEach(function(d,p){!c&&!a[f]&&(c=n(u,p,s,f,e,t,r)&&n(l,d,u,p,e,t,r))&&(a[f]=!0),f++}),s++,i=c}}),i}var eR=Hl(Dx),tR="_owner",nR=Object.prototype.hasOwnProperty;function Ox(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var s;a-- >0;){if(s=i[a],s===tR){var l=!!e.$$typeof,u=!!t.$$typeof;if((l||u)&&l!==u)return!1}if(!nR.call(t,s)||!n(e[s],t[s],s,s,e,t,r))return!1}return!0}var rR=Hl(Ox);function Lx(e,t){return e.source===t.source&&e.flags===t.flags}function Fx(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(s,l){if(i){var u=!1,c=0;t.forEach(function(f,d){!u&&!a[c]&&(u=n(s,f,l,d,e,t,r))&&(a[c]=!0),c++}),i=u}}),i}var iR=Hl(Fx),Mx=Object.freeze({areArraysEqual:_x,areDatesEqual:Ax,areMapsEqual:Dx,areObjectsEqual:Ox,areRegExpsEqual:Lx,areSetsEqual:Fx,createIsNestedEqual:Px}),$x=Object.freeze({areArraysEqual:Zz,areDatesEqual:Ax,areMapsEqual:eR,areObjectsEqual:rR,areRegExpsEqual:Lx,areSetsEqual:iR,createIsNestedEqual:Px}),aR=Wl(Mx);function Bn(e,t){return aR(e,t,void 0)}Wl(Ix(Mx,{createIsNestedEqual:function(){return Ul}}));Wl($x);Wl(Ix($x,{createIsNestedEqual:function(){return Ul}}));function yh(e){const{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:s,maxRows:l,isDraggable:u,isResizable:c,isBounded:f,static:d,useCSSTransforms:p=!0,usePercentages:h=!1,transformScale:g=1,positionStrategy:v,dragThreshold:w=0,droppingPosition:y,className:x="",style:m,handle:j="",cancel:k="",x:S,y:T,w:z,h:D,minW:C=1,maxW:M=1/0,minH:H=1,maxH:L=1/0,i:$,resizeHandles:K,resizeHandle:ie,constraints:ce=hx,layoutItem:I,layout:Q=[],onDragStart:N,onDrag:te,onDragStop:le,onResizeStart:E,onResize:pe,onResizeStop:je}=e,[se,G]=b.useState(!1),[_,q]=b.useState(!1),J=b.useRef(null),re=b.useRef({left:0,top:0}),xe=b.useRef({top:0,left:0,width:0,height:0}),ve=b.useRef(void 0),Ue=b.useRef(Q);Ue.current=Q;const Oe=b.useRef(null),Z=b.useRef(null),ke=b.useRef(!1),yt=b.useRef({x:0,y:0}),Le=b.useRef(!1),Ce=b.useMemo(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:l,rowHeight:s}),[n,a,r,i,l,s]),de=b.useMemo(()=>({cols:n,maxRows:l,containerWidth:r,containerHeight:0,rowHeight:s,margin:i,layout:[]}),[n,l,r,s,i]),Be=b.useCallback(()=>({...de,layout:Ue.current}),[de]),tt=b.useMemo(()=>I??{i:$,x:S,y:T,w:z,h:D,minW:C,maxW:M,minH:H,maxH:L},[I,$,S,T,z,D,C,M,H,L]),Ht=b.useCallback(ye=>{if(v!=null&&v.calcStyle)return v.calcStyle(ye);if(p)return Ed(ye);const Pe=mx(ye);return h?{...Pe,left:nh(ye.left/r),width:nh(ye.width/r)}:Pe},[v,p,h,r]),dt=b.useCallback((ye,{node:Pe})=>{if(!N)return;const{offsetParent:Re}=Pe;if(!Re)return;const Ae=Re.getBoundingClientRect(),$e=Pe.getBoundingClientRect(),it=$e.left/g,at=Ae.left/g,st=$e.top/g,O=Ae.top/g;let ne;if(v!=null&&v.calcDragPosition){const me=ye;ne=v.calcDragPosition(me.clientX,me.clientY,me.clientX-$e.left,me.clientY-$e.top)}else ne={left:it-at+Re.scrollLeft,top:st-O+Re.scrollTop};if(re.current=ne,w>0){const me=ye;yt.current={x:me.clientX,y:me.clientY},ke.current=!0,Le.current=!1,G(!0);return}G(!0);const fe=fs(Ce,ne.top,ne.left),{x:be,y:Y}=ps(ce,tt,fe.x,fe.y,Be());N($,be,Y,{e:ye,node:Pe,newPosition:ne})},[N,g,Ce,v,w,ce,tt,Be,$]),P=b.useCallback((ye,{node:Pe,deltaX:Re,deltaY:Ae})=>{if(!te||!se)return;const $e=ye;if(ke.current&&!Le.current){const be=$e.clientX-yt.current.x,Y=$e.clientY-yt.current.y;if(Math.hypot(be,Y)<w)return;if(Le.current=!0,ke.current=!1,N){const oe=fs(Ce,re.current.top,re.current.left),{x:we,y:R}=ps(ce,tt,oe.x,oe.y,Be());N($,we,R,{e:ye,node:Pe,newPosition:re.current})}}let it=re.current.top+Ae,at=re.current.left+Re;if(f){const{offsetParent:be}=Pe;if(be){const Y=be.clientHeight-Pn(D,s,i[1]);it=cl(it,0,Y);const me=Wr(Ce),oe=r-Pn(z,me,i[0]);at=cl(at,0,oe)}}const st={top:it,left:at};re.current=st;const O=fs(Ce,it,at),{x:ne,y:fe}=ps(ce,tt,O.x,O.y,Be());te($,ne,fe,{e:ye,node:Pe,newPosition:st})},[te,N,se,w,f,D,s,i,Ce,r,z,$,ce,tt,Be]),U=b.useCallback((ye,{node:Pe})=>{if(!le||!se)return;const Re=ke.current;if(ke.current=!1,Le.current=!1,yt.current={x:0,y:0},Re){G(!1),re.current={left:0,top:0};return}const{left:Ae,top:$e}=re.current,it={top:$e,left:Ae};G(!1),re.current={left:0,top:0};const at=fs(Ce,$e,Ae),{x:st,y:O}=ps(ce,tt,at.x,at.y,Be());le($,st,O,{e:ye,node:Pe,newPosition:it})},[le,se,Ce,ce,tt,Be,$]);Oe.current=dt,Z.current=P;const ue=b.useCallback((ye,{node:Pe,size:Re,handle:Ae},$e,it)=>{const at=it==="onResizeStart"?E:it==="onResize"?pe:je;if(!at)return;let st;Pe?st=_T(Ae,$e,Re,r):st={...Re,top:$e.top,left:$e.left},xe.current=st;const O=vT(Ce,st.width,st.height),{w:ne,h:fe}=NT(ce,tt,O.w,O.h,Ae,Be());at($,ne,fe,{e:ye.nativeEvent,node:Pe,size:st,handle:Ae})},[E,pe,je,r,Ce,$,ce,tt,Be]),ge=b.useCallback((ye,Pe)=>{q(!0);const Re=ds(Ce,S,T,z,D),Ae={...Pe,handle:Pe.handle};ue(ye,Ae,Re,"onResizeStart")},[ue,Ce,S,T,z,D]),Se=b.useCallback((ye,Pe)=>{const Re=ds(Ce,S,T,z,D),Ae={...Pe,handle:Pe.handle};ue(ye,Ae,Re,"onResize")},[ue,Ce,S,T,z,D]),Ve=b.useCallback((ye,Pe)=>{q(!1),xe.current={top:0,left:0,width:0,height:0};const Re=ds(Ce,S,T,z,D),Ae={...Pe,handle:Pe.handle};ue(ye,Ae,Re,"onResizeStop")},[ue,Ce,S,T,z,D]);b.useEffect(()=>{var Ae,$e;if(!y)return;const ye=J.current;if(!ye)return;const Pe=ve.current||{left:0,top:0},Re=se&&(y.left!==Pe.left||y.top!==Pe.top);if(se){if(Re){const it=y.left-re.current.left,at=y.top-re.current.top,st={node:ye,deltaX:it,deltaY:at,lastX:re.current.left,lastY:re.current.top,x:y.left,y:y.top};($e=Z.current)==null||$e.call(Z,y.e,st)}}else{const it={node:ye,deltaX:y.left,deltaY:y.top,lastX:0,lastY:0,x:y.left,y:y.top};(Ae=Oe.current)==null||Ae.call(Oe,y.e,it)}ve.current=y},[y,se,$]);const nt=ds(Ce,S,T,z,D,se?re.current:null,_?xe.current:null),pt=En.Children.only(t),Ct=Wr(Ce),bt=[Pn(C,Ct,i[0]),Pn(H,s,i[1])],rt=[Pn(M,Ct,i[0]),Pn(L,s,i[1])],Je=pt.props,wt=Je.className,gn=Je.style;let ln=En.cloneElement(pt,{ref:J,className:Li("react-grid-item",wt,x,{static:d,resizing:_,"react-draggable":u,"react-draggable-dragging":se,dropping:!!y,cssTransforms:p}),style:{...m,...gn,...Ht(nt)}});const Ut=ie;return ln=o.jsx(Uz,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:nt.width,height:nt.height,minConstraints:bt,maxConstraints:rt,onResizeStart:ge,onResize:Se,onResizeStop:Ve,transformScale:g,resizeHandles:K,handle:Ut,children:ln}),ln=o.jsx(Sr,{disabled:!u,onStart:dt,onDrag:P,onStop:U,handle:j,cancel:".react-resizable-handle"+(k?","+k:""),scale:g,nodeRef:J,children:ln}),ln}var Fn=()=>{},xh="react-grid-layout",Bx=!1;try{Bx=/firefox/i.test(navigator.userAgent)}catch{}function sR(e,t){const n=En.Children.toArray(e),r=En.Children.toArray(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const a=n[i],s=r[i];if((a==null?void 0:a.key)!==(s==null?void 0:s.key))return!1}return!0}function vh(e,t,n,r){const i=[],a=new Set;En.Children.forEach(t,l=>{if(!En.isValidElement(l)||l.key===null)return;const u=String(l.key);a.add(u);const c=e.find(f=>f.i===u);if(c)i.push(Vr(c));else{const d=l.props["data-grid"];d?i.push({i:u,x:d.x??0,y:d.y??0,w:d.w??1,h:d.h??1,minW:d.minW,maxW:d.maxW,minH:d.minH,maxH:d.maxH,static:d.static,isDraggable:d.isDraggable,isResizable:d.isResizable,resizeHandles:d.resizeHandles,isBounded:d.isBounded}):i.push({i:u,x:0,y:Ll(i),w:1,h:1})}});const s=Nd(i,{cols:n});return r.compact(s,n)}function lR(e){const{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:s,positionStrategy:l=OT,compactor:u,constraints:c=hx,layout:f=[],droppingItem:d,autoSize:p=!0,className:h="",style:g={},innerRef:v,onLayoutChange:w=Fn,onDragStart:y=Fn,onDrag:x=Fn,onDragStop:m=Fn,onResizeStart:j=Fn,onResize:k=Fn,onResizeStop:S=Fn,onDrop:T=Fn,onDropDragOver:z=Fn}=e,D=b.useMemo(()=>({...LT,...r}),[r]),C=b.useMemo(()=>({...FT,...i}),[i]),M=b.useMemo(()=>({...MT,...a}),[a]),H=b.useMemo(()=>({...$T,...s}),[s]),{cols:L,rowHeight:$,maxRows:K,margin:ie,containerPadding:ce}=D,{enabled:I,bounded:Q,handle:N,cancel:te,threshold:le}=C,{enabled:E,handles:pe,handleComponent:je}=M,{enabled:se,defaultItem:G,onDragOver:_}=H,q=u??Ml("vertical"),J=q.type,re=q.allowOverlap,xe=q.preventCollision??!1,ve=b.useMemo(()=>d??{i:"__dropping-elem__",...G},[d,G]),Ue=l.type==="transform",Oe=l.scale,Z=ce??ie,[ke,yt]=b.useState(!1),[Le,Ce]=b.useState(()=>vh(f,t,L,q)),[de,Be]=b.useState(null),[tt,Ht]=b.useState(!1),[dt,P]=b.useState(null),[U,ue]=b.useState(),ge=b.useRef(null),Se=b.useRef(null),Ve=b.useRef(null),nt=b.useRef(0),pt=b.useRef(Le),Ct=b.useRef(f),bt=b.useRef(t),rt=b.useRef(J),Je=b.useRef(Le);Je.current=Le,b.useEffect(()=>{yt(!0),Bn(Le,f)||w(Le)},[]),b.useEffect(()=>{if(de||dt)return;const Y=!Bn(f,Ct.current),me=!sR(t,bt.current),oe=J!==rt.current;if(Y||me||oe){const R=vh(Y?f:Le,t,L,q);Bn(R,Le)||Ce(R)}Ct.current=f,bt.current=t,rt.current=J},[f,t,L,J,q,de,dt,Le]),b.useEffect(()=>{if(!de&&!Bn(Le,pt.current)){pt.current=Le;const Y=Le.filter(me=>me.i!==ve.i);w(Y)}},[Le,de,w,ve.i]);const wt=b.useMemo(()=>{if(!p)return;const Y=Ll(Le),me=Z[1];return Y*$+(Y-1)*ie[1]+me*2+"px"},[p,Le,$,ie,Z]),gn=b.useCallback((Y,me,oe,we)=>{const R=Je.current,A=zr(R,Y);if(!A)return;const B={w:A.w,h:A.h,x:A.x,y:A.y,i:Y};ge.current=Vr(A),Ve.current=R,Be(B),y(R,A,A,null,we.e,we.node)},[y]),ln=b.useCallback((Y,me,oe,we)=>{const R=Je.current,A=ge.current,B=zr(R,Y);if(!B)return;const X={w:B.w,h:B.h,x:B.x,y:B.y,i:Y},ee=Ar(R,B,me,oe,!0,xe,J,L,re);x(ee,A,B,X,we.e,we.node),Ce(q.compact(ee,L)),Be(X)},[xe,J,L,re,q,x]),Ut=b.useCallback((Y,me,oe,we)=>{if(!de)return;const R=Je.current,A=ge.current,B=zr(R,Y);if(!B)return;const X=Ar(R,B,me,oe,!0,xe,J,L,re),ee=q.compact(X,L);m(ee,A,B,null,we.e,we.node);const Ne=Ve.current;ge.current=null,Ve.current=null,Be(null),Ce(ee),Ne&&!Bn(Ne,ee)&&w(ee)},[de,xe,J,L,re,q,m,w]),ye=b.useCallback((Y,me,oe,we)=>{const R=Je.current,A=zr(R,Y);A&&(Se.current=Vr(A),Ve.current=R,Ht(!0),j(R,A,A,null,we.e,we.node))},[j]),Pe=b.useCallback((Y,me,oe,we)=>{const R=Je.current,A=Se.current,{handle:B}=we;let X=!1,ee,Ne;const[Ot,qe]=kT(R,Y,De=>(ee=De.x,Ne=De.y,["sw","w","nw","n","ne"].includes(B)&&(["sw","nw","w"].includes(B)&&(ee=De.x+(De.w-me),me=De.x!==ee&&ee<0?De.w:me,ee=ee<0?0:ee),["ne","n","nw"].includes(B)&&(Ne=De.y+(De.h-oe),oe=De.y!==Ne&&Ne<0?De.h:oe,Ne=Ne<0?0:Ne),X=!0),xe&&!re&&fx(R,{...De,w:me,h:oe,x:ee??De.x,y:Ne??De.y}).filter(ht=>ht.i!==De.i).length>0&&(Ne=De.y,oe=De.h,ee=De.x,me=De.w,X=!1),De.w=me,De.h=oe,De));if(!qe)return;let Tt=Ot;X&&ee!==void 0&&Ne!==void 0&&(Tt=Ar(Ot,qe,ee,Ne,!0,xe,J,L,re));const on={w:qe.w,h:qe.h,x:qe.x,y:qe.y,i:Y,static:!0};k(Tt,A,qe,on,we.e,we.node),Ce(q.compact(Tt,L)),Be(on)},[xe,J,L,re,q,k]),Re=b.useCallback((Y,me,oe,we)=>{const R=Je.current,A=Se.current,B=zr(R,Y),X=q.compact(R,L);S(X,A,B??null,null,we.e,we.node);const ee=Ve.current;Se.current=null,Ve.current=null,Be(null),Ht(!1),Ce(X),ee&&!Bn(ee,X)&&w(X)},[L,q,S,w]),Ae=b.useCallback(()=>{const Y=Je.current;if(!Y.some(we=>we.i===ve.i)){P(null),Be(null),ue(void 0);return}const oe=q.compact(Y.filter(we=>we.i!==ve.i),L);Ce(oe),P(null),Be(null),ue(void 0)},[ve.i,L,q]),$e=b.useCallback(Y=>{var yn;if(Y.preventDefault(),Y.stopPropagation(),Bx&&!((yn=Y.nativeEvent.target)!=null&&yn.classList.contains(xh)))return!1;const me=_?_(Y.nativeEvent):z(Y);if(me===!1)return dt&&Ae(),!1;const{dragOffsetX:oe=0,dragOffsetY:we=0,...R}=me??{},A={...ve,...R},B=Y.currentTarget.getBoundingClientRect(),X={cols:L,margin:ie,maxRows:K,rowHeight:$,containerWidth:n,containerPadding:Z},ee=Wr(X),Ne=Pn(A.w,ee,ie[0]),Ot=Pn(A.h,$,ie[1]),qe=Ne/2,Tt=Ot/2,on=Y.clientX-B.left+oe-qe,De=Y.clientY-B.top+we-Tt,Xe=Math.max(0,on),ht=Math.max(0,De),Ze={left:Xe/Oe,top:ht/Oe,e:Y.nativeEvent};if(dt)U&&(U.left!==Ze.left||U.top!==Ze.top)&&ue(Ze);else{const Vl=xT(X,ht,Xe,A.w,A.h);P(o.jsx("div",{},A.i)),ue(Ze);const Yx=Je.current.filter(Xx=>Xx.i!==A.i);Ce([...Yx,{...A,x:Vl.x,y:Vl.y,static:!1,isDraggable:!0}])}},[dt,U,ve,_,z,Ae,Oe,L,ie,K,$,n,Z]),it=b.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),nt.current--,nt.current<0&&(nt.current=0),nt.current===0&&Ae()},[Ae]),at=b.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),nt.current++},[]),st=b.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation();const me=Je.current,oe=me.find(we=>we.i===ve.i);nt.current=0,Ae(),T(me,oe,Y.nativeEvent)},[ve.i,Ae,T]),O=b.useCallback((Y,me)=>{if(!Y||!Y.key)return null;const oe=zr(Le,String(Y.key));if(!oe)return null;const we=typeof oe.isDraggable=="boolean"?oe.isDraggable:!oe.static&&I,R=typeof oe.isResizable=="boolean"?oe.isResizable:!oe.static&&E,A=oe.resizeHandles||[...pe],B=we&&Q&&oe.isBounded!==!1,X=je;return o.jsx(yh,{containerWidth:n,cols:L,margin:ie,containerPadding:Z,maxRows:K,rowHeight:$,cancel:te,handle:N,onDragStart:gn,onDrag:ln,onDragStop:Ut,onResizeStart:ye,onResize:Pe,onResizeStop:Re,isDraggable:we,isResizable:R,isBounded:B,useCSSTransforms:Ue&&ke,usePercentages:!ke,transformScale:Oe,positionStrategy:l,dragThreshold:le,w:oe.w,h:oe.h,x:oe.x,y:oe.y,i:oe.i,minH:oe.minH,minW:oe.minW,maxH:oe.maxH,maxW:oe.maxW,static:oe.static,droppingPosition:me?U:void 0,resizeHandles:A,resizeHandle:X,constraints:c,layoutItem:oe,layout:Le,children:Y},oe.i)},[Le,n,L,ie,Z,K,$,te,N,gn,ln,Ut,ye,Pe,Re,I,E,Q,Ue,ke,Oe,l,le,U,pe,je,c]),ne=()=>de?o.jsx(yh,{w:de.w,h:de.h,x:de.x,y:de.y,i:de.i,className:`react-grid-placeholder ${tt?"placeholder-resizing":""}`,containerWidth:n,cols:L,margin:ie,containerPadding:Z,maxRows:K,rowHeight:$,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:Ue,transformScale:Oe,constraints:c,layout:Le,children:o.jsx("div",{})}):null,fe=Li(xh,h),be={height:wt,...g};return o.jsxs("div",{ref:v,className:fe,style:be,onDrop:se?st:void 0,onDragLeave:se?it:void 0,onDragEnter:se?at:void 0,onDragOver:se?$e:void 0,children:[En.Children.map(t,Y=>En.isValidElement(Y)?O(Y):null),se&&dt&&O(dt,!0),ne()]})}var oR={lg:1200,md:996,sm:768,xs:480,xxs:0},uR={lg:12,md:10,sm:6,xs:4,xxs:2},Vo=()=>{};function cR(e,t,n,r){const i=[];En.Children.forEach(t,s=>{if(!En.isValidElement(s)||s.key===null)return;const l=String(s.key),u=e.find(c=>c.i===l);if(u)i.push({...u,i:l});else{const f=s.props["data-grid"];f?i.push({i:l,x:f.x??0,y:f.y??0,w:f.w??1,h:f.h??1,minW:f.minW,maxW:f.maxW,minH:f.minH,maxH:f.maxH,static:f.static,isDraggable:f.isDraggable,isResizable:f.isResizable,resizeHandles:f.resizeHandles,isBounded:f.isBounded}):i.push({i:l,x:0,y:Ll(i),w:1,h:1})}});const a=Nd(i,{cols:n});return r.compact(a,n)}function dR(e){const{children:t,width:n,breakpoint:r,breakpoints:i=oR,cols:a=uR,layouts:s={},rowHeight:l=150,maxRows:u=1/0,margin:c=[10,10],containerPadding:f=null,compactor:d,onBreakpointChange:p=Vo,onLayoutChange:h=Vo,onWidthChange:g=Vo,...v}=e,w=d??Ml("vertical"),y=w.type,x=w.allowOverlap,m=b.useMemo(()=>r??rh(i,n),[]),j=b.useMemo(()=>ih(m,a),[m,a]),k=b.useMemo(()=>Oo(s,i,m,m,j,y),[]),[S,T]=b.useState(m),[z,D]=b.useState(j),[C,M]=b.useState(k),[H,L]=b.useState(s),$=b.useRef(n),K=b.useRef(r),ie=b.useRef(i),ce=b.useRef(a),I=b.useRef(s),Q=b.useRef(y),N=b.useRef(H);b.useEffect(()=>{N.current=H},[H]);const te=b.useMemo(()=>Bn(s,I.current)?null:Oo(s,i,S,S,z,w),[s,i,S,z,w]),le=te??C;b.useEffect(()=>{te!==null&&(M(te),L(s),N.current=s,I.current=s)},[te,s]),b.useEffect(()=>{if(y!==Q.current){const G=w.compact(xr(le),z),_={...N.current,[S]:G};M(G),L(_),N.current=_,h(G,_),Q.current=y}},[y,w,le,z,x,S,h]),b.useEffect(()=>{const G=n!==$.current,_=r!==K.current,q=!Bn(i,ie.current),J=!Bn(a,ce.current);if(G||_||q||J){const re=r??rh(i,n),xe=ih(re,a),ve=S;if(ve!==re||q||J){const Z={...N.current};Z[ve]||(Z[ve]=xr(C));let ke=Oo(Z,i,re,ve,xe,w);ke=cR(ke,t,xe,w),Z[re]=ke,T(re),D(xe),M(ke),L(Z),N.current=Z,p(re,xe),h(ke,Z)}const Ue=hs(c,re),Oe=f?hs(f,re):null;g(n,Ue,xe,Oe),$.current=n,K.current=r,ie.current=i,ce.current=a}},[n,r,i,a,S,z,C,t,w,y,x,c,f,p,h,g]);const E=b.useCallback(G=>{const q={...N.current,[S]:G};M(G),L(q),N.current=q,h(G,q)},[S,h]),pe=b.useMemo(()=>hs(c,S),[c,S]),je=b.useMemo(()=>f===null?null:hs(f,S),[f,S]),se=b.useMemo(()=>({cols:z,rowHeight:l,maxRows:u,margin:pe,containerPadding:je}),[z,l,u,pe,je]);return o.jsx(lR,{...v,width:n,gridConfig:se,compactor:w,onLayoutChange:E,layout:le,children:t})}function Hx(e){const{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:s,onBreakpointChange:l,onLayoutChange:u,onWidthChange:c,rowHeight:f,maxRows:d,margin:p,containerPadding:h,droppingItem:g,compactType:v,preventCollision:w=!1,allowOverlap:y=!1,verticalCompact:x,isDraggable:m=!0,isBounded:j=!1,draggableHandle:k,draggableCancel:S,isResizable:T=!0,resizeHandles:z=["se"],resizeHandle:D,isDroppable:C=!1,useCSSTransforms:M=!0,transformScale:H=1,autoSize:L,className:$,style:K,innerRef:ie,onDragStart:ce,onDrag:I,onDragStop:Q,onResizeStart:N,onResize:te,onResizeStop:le,onDrop:E,onDropDragOver:pe}=e;let je=v===void 0?"vertical":v;x===!1&&(je=null);const se={enabled:m,bounded:j,handle:k,cancel:S},G={enabled:T,handles:z,handleComponent:D},_={enabled:C};let q;M?H!==1?q=DT(H):q=yx:q=AT;const J=Ml(je,y,w);return o.jsx(dR,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:s,rowHeight:f,maxRows:d,margin:p,containerPadding:h,compactor:J,dragConfig:se,resizeConfig:G,dropConfig:_,positionStrategy:q,droppingItem:g,autoSize:L,className:$,style:K,innerRef:ie,onBreakpointChange:l,onLayoutChange:u,onWidthChange:c,onDragStart:ce,onDrag:I,onDragStop:Q,onResizeStart:N,onResize:te,onResizeStop:le,onDrop:E,onDropDragOver:pe,children:t})}Hx.displayName="ResponsiveReactGridLayout";var fR=Hx,pR="react-grid-layout";function hR(e){function t(n){const{measureBeforeMount:r=!1,className:i,style:a,...s}=n,[l,u]=b.useState(1280),[c,f]=b.useState(!1),d=b.useRef(null),p=b.useRef(null);return b.useEffect(()=>{f(!0)},[]),b.useEffect(()=>{const h=d.current;if(!(h instanceof HTMLElement))return;let g=null;const v=new ResizeObserver(w=>{if(w[0]){const y=w[0].contentRect.width;g!==null&&cancelAnimationFrame(g),g=requestAnimationFrame(()=>{u(y),g=null})}});return v.observe(h),p.current=v,()=>{g!==null&&cancelAnimationFrame(g),v.unobserve(h),v.disconnect()}},[c]),r&&!c?o.jsx("div",{className:Li(i,pR),style:a,ref:d}):o.jsx(e,{innerRef:d,className:i,style:a,...s,width:l})}return t.displayName=`WidthProvider(${e.displayName||e.name||"Component"})`,t}const mR=hR(fR),gR={lg:12,xxs:1},yR={lg:640,xxs:0},bh=12,sc=20,Ps=16;function xR(e){const t=e-sc*2-(bh-1)*Ps;return Math.max(16,t/bh)}function vR({blocks:e,layouts:t,mode:n,onLayoutChange:r,renderBlock:i,blockMeta:a,onRemove:s,onDuplicate:l,canRemove:u=()=>!0,canDuplicate:c=()=>!0}){const f=n==="layout",d=b.useRef(null),[p,h]=b.useState(46);return b.useLayoutEffect(()=>{const g=d.current;if(!g)return;const v=()=>h(xR(g.clientHeight));if(v(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(v);return w.observe(g),()=>w.disconnect()},[]),o.jsx("div",{ref:d,className:`block-canvas ${f?"arranging":""}`,style:{"--row-pitch":`${p+Ps}px`},"data-testid":"block-canvas",children:o.jsx(mR,{className:"rgl",layouts:t,breakpoints:yR,cols:gR,rowHeight:p,margin:[Ps,Ps],containerPadding:[sc,sc],isDraggable:f,isResizable:f,draggableHandle:".block-handle",onLayoutChange:(g,v)=>r(v),compactType:"vertical",useCSSTransforms:!0,children:e.map(g=>{const v=a(g);return o.jsxs("div",{className:`block ${f?"is-arranging":""}`,"data-testid":`block-${g.type}`,"data-rgl-id":g.id,children:[o.jsxs("div",{className:`block-header ${f?"block-handle":""}`,children:[o.jsx("span",{className:"block-icon",children:v.icon}),o.jsx("span",{className:"block-title",children:v.title}),o.jsx("span",{className:"spacer"}),f&&o.jsxs("span",{className:"block-actions",children:[c(g)&&o.jsx("button",{title:"Duplicate",onClick:()=>l(g.id),"data-testid":"block-duplicate",children:"⧉"}),u(g)?o.jsx("button",{title:"Remove",onClick:()=>s(g.id),"data-testid":"block-remove",children:"✕"}):o.jsx("span",{className:"block-pin",title:"Chat is always here",children:"📌"})]})]}),o.jsx("div",{className:"block-body",children:i(g)})]},g.id)})})})}function bR({blocks:e,activeId:t,setActiveId:n,mode:r,renderBlock:i,blockMeta:a,onRemove:s,canRemove:l=()=>!0}){const u=e.find(f=>f.id===t)||e[0],c=r==="layout";return o.jsxs("div",{className:"mobile-canvas","data-testid":"mobile-canvas",children:[o.jsx("div",{className:"mobile-tabs","data-testid":"mobile-tabs",children:e.map(f=>{const d=a(f);return o.jsxs("button",{className:`mtab ${f.id===(u==null?void 0:u.id)?"active":""}`,onClick:()=>n(f.id),"data-testid":`mtab-${f.type}`,children:[o.jsx("span",{className:"mtab-icon",children:d.icon}),o.jsx("span",{className:"mtab-label",children:d.title}),c&&l(f)&&o.jsx("span",{className:"mtab-x",role:"button",title:"Remove",onClick:p=>{p.stopPropagation(),s(f.id)},children:"✕"})]},f.id)})}),o.jsx("div",{className:"mobile-block",children:u&&o.jsx("div",{className:"block",children:o.jsx("div",{className:"block-body",children:i(u)})})})]})}function wR({items:e,bazaarItems:t=[],onAdd:n,onClose:r}){return o.jsx("div",{className:"modal-backdrop",onClick:r,"data-testid":"add-gallery-backdrop",children:o.jsxs("div",{className:"modal add-gallery",onClick:i=>i.stopPropagation(),"data-testid":"add-gallery",children:[o.jsx("h2",{children:"Add a block"}),o.jsx("p",{className:"muted",children:"Build your space — drop in whatever's useful. Move and resize it however you like."}),o.jsx("div",{className:"gallery-grid",children:e.map(i=>o.jsxs("button",{className:"gallery-item",disabled:i.soon,onClick:()=>!i.soon&&n(i.type),"data-testid":`gallery-add-${i.type}`,children:[o.jsx("span",{className:"gallery-glyph",children:i.icon}),o.jsx("span",{className:"gallery-name",children:i.title}),o.jsx("span",{className:"gallery-desc",children:i.desc}),i.soon&&o.jsx("span",{className:"gallery-soon",children:"soon"})]},i.type))}),t.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"gallery-section",children:"🛍️ from the Bazaar"}),o.jsx("div",{className:"gallery-grid",children:t.map(i=>o.jsxs("button",{className:"gallery-item bazaar",onClick:()=>n(i.type),"data-testid":`gallery-add-${i.type}`,children:[o.jsx("span",{className:"gallery-glyph",children:i.icon}),o.jsx("span",{className:"gallery-name",children:i.title}),o.jsx("span",{className:"gallery-desc",children:i.desc})]},i.type))})]}),o.jsxs("div",{className:"gallery-agent-hint","data-testid":"gallery-agent-hint",children:["✨ Or ask your agent in chat — ",o.jsx("em",{children:"“make me a block that shows today’s signups”"})," — and it builds one for you."]}),o.jsx("div",{className:"actions",children:o.jsx("button",{onClick:r,children:"Done"})})]})})}const kR={chat:{icon:"🗨️",label:"Chat"},liveview:{icon:"👁️",label:"Live view"},notes:{icon:"📝",label:"Notes"},earnings:{icon:"💸",label:"Earnings"},analytics:{icon:"📊",label:"Analytics"},usage:{icon:"🔋",label:"Usage"},powers:{icon:"🧰",label:"Powers"}};function wh({blocks:e}){return o.jsx("span",{className:"tpl-chips",children:e.map((t,n)=>{const r=kR[t.type]||{icon:"▫️",label:t.type};return o.jsxs("span",{className:"tpl-chip",title:r.label,children:[o.jsx("span",{className:"tpl-chip-icon",children:r.icon}),r.label]},n)})})}function SR({builtins:e=[],saved:t=[],onApply:n,onSaveCurrent:r,onDelete:i,onClose:a}){const[s,l]=b.useState("");function u(){const c=s.trim();c&&(r(c),l(""))}return o.jsx("div",{className:"modal-backdrop",onClick:a,"data-testid":"template-gallery-backdrop",children:o.jsxs("div",{className:"modal template-gallery",onClick:c=>c.stopPropagation(),"data-testid":"template-gallery",children:[o.jsx("h2",{children:"Start from a template"}),o.jsx("p",{className:"muted",children:"Pick a layout to start from — it swaps your current blocks for the template's. Chat always stays."}),o.jsx("div",{className:"gallery-grid",children:e.map(c=>o.jsxs("button",{className:"gallery-item template-card",onClick:()=>n(c),"data-testid":`template-${c.id}`,children:[o.jsx("span",{className:"gallery-glyph",children:c.icon}),o.jsx("span",{className:"gallery-name",children:c.name}),o.jsx("span",{className:"gallery-desc",children:c.desc}),o.jsx(wh,{blocks:c.blocks})]},c.id))}),t.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"gallery-section",children:"⭐ your templates"}),o.jsx("div",{className:"gallery-grid",children:t.map(c=>o.jsxs("div",{className:"gallery-item template-card saved","data-testid":`template-${c.id}`,children:[o.jsxs("button",{className:"tpl-apply",onClick:()=>n(c),"data-testid":`template-apply-${c.id}`,children:[o.jsx("span",{className:"gallery-glyph",children:c.icon||"⭐"}),o.jsx("span",{className:"gallery-name",children:c.name}),o.jsx(wh,{blocks:c.blocks})]}),o.jsx("button",{className:"tpl-del",title:"Delete this template",onClick:()=>i(c.id),"data-testid":`template-delete-${c.id}`,children:"✕"})]},c.id))})]}),o.jsxs("div",{className:"tpl-save-row",children:[o.jsx("input",{className:"tpl-save-input",value:s,onChange:c=>l(c.target.value),onKeyDown:c=>c.key==="Enter"&&u(),placeholder:"Save current layout as…","data-testid":"template-save-name",maxLength:40}),o.jsx("button",{className:"primary",onClick:u,disabled:!s.trim(),"data-testid":"template-save-btn",children:"Save layout"})]}),o.jsx("div",{className:"actions",children:o.jsx("button",{onClick:a,children:"Done"})})]})})}const Ux="wild:theme",lc=[{id:"cyan",name:"VentureWild",accent:"#0891b2",hot:"#0e7490"},{id:"teal",name:"Teal",accent:"#0d9488",hot:"#0f766e"},{id:"blue",name:"Blue",accent:"#2563eb",hot:"#1d4ed8"},{id:"violet",name:"Violet",accent:"#7c3aed",hot:"#6d28d9"},{id:"emerald",name:"Emerald",accent:"#059669",hot:"#047857"},{id:"amber",name:"Amber",accent:"#d97706",hot:"#b45309"},{id:"rose",name:"Rose",accent:"#e11d48",hot:"#be123c"}],jR=[{id:"light",name:"Light",glyph:"☀️",desc:"Bright & warm (default)"},{id:"dark",name:"Dark",glyph:"🌙",desc:"The venturewild.llc look"}],Wx={bg:"--bg",bgElev:"--bg-elev",surface:"--surface",border:"--border",text:"--text",textMuted:"--text-muted",canvas1:"--canvas-1",canvas2:"--canvas-2",canvas3:"--canvas-3"},Is={mode:"light",accent:lc[0].accent,hot:lc[0].hot,accentManual:!1,tokens:{}};function Vn(e){if(typeof e!="string")return null;const t=e.trim();return/^#([0-9a-f]{6})$/i.test(t)?t.toLowerCase():null}function Vx(e){const t=Vn(e)||"#000000";return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)]}function Ld(e,t=.16){const[n,r,i]=Vx(e),a=1-t,s=l=>Math.max(0,Math.min(255,Math.round(l*a)));return`#${[s(n),s(r),s(i)].map(l=>l.toString(16).padStart(2,"0")).join("")}`}function qx(e){const[t,n,r]=Vx(e).map(a=>{const s=a/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r>.42?"#08232b":"#ffffff"}function Fd(e){const t={};if(e&&typeof e=="object")for(const n of Object.keys(Wx)){const r=Vn(e[n]);r&&(t[n]=r)}return t}function NR(e,t,n){const r=t&&typeof t=="object"?t:{},i=n?e.accent:Vn(r.accent)||e.accent,a=n?e.hot:Vn(r.hot)||Vn(r.accent)||e.hot;return{...e,mode:r.mode==="dark"?"dark":"light",accent:i,hot:a,tokens:Fd(r.tokens),accentManual:!0}}function ER(){try{const e=localStorage.getItem(Ux);if(!e)return{...Is};const t=JSON.parse(e),n=Vn(t.accent)||Is.accent;return{mode:t.mode==="dark"?"dark":"light",accent:n,hot:Vn(t.hot)||Ld(n),accentManual:!!t.accentManual,tokens:Fd(t.tokens)}}catch{return{...Is}}}function CR(e){try{localStorage.setItem(Ux,JSON.stringify(e))}catch{}}function TR(e){const t=document.documentElement;e.mode==="dark"?t.dataset.theme="dark":delete t.dataset.theme;const n=Vn(e.accent)||Is.accent;t.style.setProperty("--accent",n),t.style.setProperty("--accent-hot",Vn(e.hot)||Ld(n)),t.style.setProperty("--accent-ink",qx(n));const r=Fd(e.tokens);for(const[i,a]of Object.entries(Wx))r[i]?t.style.setProperty(a,r[i]):t.style.removeProperty(a)}function zR({theme:e,onChange:t,onClose:n}){const[r,i]=b.useState(e.accent);function a(u){t({...e,mode:u,tokens:{}})}function s(u){i(u.accent),t({...e,accent:u.accent,hot:u.hot,accentManual:!0})}function l(u){i(u),/^#([0-9a-f]{6})$/i.test(u)&&t({...e,accent:u,hot:Ld(u),accentManual:!0})}return o.jsx("div",{className:"modal-backdrop",onClick:n,"data-testid":"theme-picker-backdrop",children:o.jsxs("div",{className:"modal theme-picker",onClick:u=>u.stopPropagation(),"data-testid":"theme-picker",children:[o.jsx("h2",{children:"Make it yours"}),o.jsx("p",{className:"muted",children:"Pick a look. Changes apply live and follow you across your workspaces."}),o.jsx("div",{className:"theme-section",children:"Mode"}),o.jsx("div",{className:"theme-modes",children:jR.map(u=>o.jsxs("button",{className:`theme-mode ${e.mode===u.id?"active":""}`,onClick:()=>a(u.id),"data-testid":`theme-mode-${u.id}`,"aria-pressed":e.mode===u.id,children:[o.jsx("span",{className:"theme-mode-glyph",children:u.glyph}),o.jsx("span",{className:"theme-mode-name",children:u.name}),o.jsx("span",{className:"theme-mode-desc",children:u.desc})]},u.id))}),o.jsx("div",{className:"theme-section",children:"Accent"}),o.jsx("div",{className:"theme-swatches",children:lc.map(u=>{const c=e.accent.toLowerCase()===u.accent.toLowerCase();return o.jsx("button",{className:`theme-swatch ${c?"active":""}`,style:{background:u.accent,color:qx(u.accent)},onClick:()=>s(u),title:u.name,"data-testid":`theme-accent-${u.id}`,"aria-pressed":c,children:c?"✓":""},u.id)})}),o.jsxs("div",{className:"theme-custom",children:[o.jsx("label",{htmlFor:"theme-hex",className:"muted",children:"Custom"}),o.jsx("input",{id:"theme-hex",type:"color",value:/^#([0-9a-f]{6})$/i.test(r)?r:"#0891b2",onChange:u=>l(u.target.value),"data-testid":"theme-custom-color","aria-label":"Custom accent color"}),o.jsx("input",{className:"theme-hex-input",value:r,onChange:u=>l(u.target.value),placeholder:"#0891b2",maxLength:7,spellCheck:!1,"data-testid":"theme-custom-hex"})]}),o.jsx("div",{className:"actions",children:o.jsx("button",{className:"primary",onClick:n,"data-testid":"theme-done",children:"Done"})})]})})}const ms=[{tier:1,label:"Read-only (diagnostics + logs)"},{tier:2,label:"Diagnostics & fixes (recommended)"},{tier:3,label:"Operate my agent",operate:!0},{tier:4,label:"Run shell commands",operate:!0}],RR=[{minutes:30,label:"30 minutes"},{minutes:120,label:"2 hours"},{minutes:480,label:"8 hours"}];function PR(e){const t=Math.round(e/6e4);return t<=0?"expiring":t<60?`${t} min`:`${Math.floor(t/60)}h ${t%60}m`}function IR({token:e}){var x;const[t,n]=b.useState(null),[r,i]=b.useState(2),[a,s]=b.useState(30),[l,u]=b.useState(!1),[c,f]=b.useState(!1),d=b.useCallback(()=>e?{Authorization:`Bearer ${e}`}:{},[e]),p=b.useCallback(async()=>{try{const m=await fetch("/api/support/status",{headers:d()});if(!m.ok)return;n(await m.json())}catch{}},[d]);b.useEffect(()=>{p();const m=setInterval(p,1e4);return()=>clearInterval(m)},[p]);const h=b.useCallback(async()=>{var m;u(!0);try{const j=(m=ms.find(k=>k.tier===r))==null?void 0:m.operate;await fetch("/api/support/grant",{method:"POST",headers:{"content-type":"application/json",...d()},body:JSON.stringify({tier:r,minutes:a,confirmOperate:!!j})})}catch{}u(!1),p()},[d,p,r,a]),g=b.useCallback(async()=>{f(!0);try{await fetch("/api/support/revoke",{method:"POST",headers:d()})}catch{}f(!1),p()},[d,p]);if(!t||typeof t.enabled!="boolean")return null;const v=t.enabled||t.active||!!t.operate;if(!v&&!t.canGrant)return null;const w=ms.find(m=>m.tier===r),y=t.maxTier||4;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"set-section",children:"Support access"}),v?o.jsxs("div",{className:"set-support","data-testid":"support-access",children:[o.jsxs("span",{children:["🛟 ",o.jsx("strong",{children:"Allowed"})," —"," ",((x=ms.find(m=>m.tier===t.tier))==null?void 0:x.label)||`tier ${t.tier}`,t.remainingMs>0&&o.jsxs(o.Fragment,{children:[" · auto-expires in ",PR(t.remainingMs)]})]}),o.jsx("button",{type:"button",onClick:g,disabled:c,"data-testid":"support-revoke",children:c?"Revoking…":"Revoke"})]}):o.jsxs("div",{className:"set-support","data-testid":"support-access",children:[o.jsxs("label",{children:["Let support",o.jsx("select",{"aria-label":"support level",value:r,onChange:m=>i(Number(m.target.value)),children:ms.filter(m=>m.tier<=y).map(m=>o.jsx("option",{value:m.tier,children:m.label},m.tier))})]}),o.jsxs("label",{children:["for",o.jsx("select",{"aria-label":"duration",value:a,onChange:m=>s(Number(m.target.value)),children:RR.map(m=>o.jsx("option",{value:m.minutes,children:m.label},m.minutes))})]}),(w==null?void 0:w.operate)&&o.jsxs("span",{className:"set-support-warn","data-testid":"support-operate-warn",children:["⚠ lets support ",r>=4?"run shell commands on":"operate the agent on"," your machine"]}),o.jsx("button",{type:"button",onClick:h,disabled:l,"data-testid":"support-allow",children:l?"Allowing…":"Allow"})]}),o.jsx("p",{className:"muted small",children:"Off by default and time-boxed. While it’s allowed, a banner stays on screen with a one-tap Stop/Revoke."})]})}const kh=[{id:"check",title:"Check with me",emoji:"🪧",build:!0,desc:"Your agent proposes first — it only acts after you approve. Read-only until you say go."},{id:"work",title:"Work, then show me",emoji:"🛠️",build:!1,desc:"Builds and edits freely, shows you the diff — but still confirms the risky stuff (deploy, delete, send, spend)."},{id:"full",title:"Full autonomy",emoji:"🚀",build:!0,desc:"Does everything on its own, never asks. Fastest — and the least guarded."}];function _R({token:e,session:t,onClose:n,onOpenTheme:r}){var y,x;const[i,a]=b.useState(null),[s,l]=b.useState(""),[u,c]=b.useState(!1),f=e?{Authorization:`Bearer ${e}`}:{};b.useEffect(()=>{let m=!0;return fetch("/api/settings",{headers:f}).then(j=>j.ok?j.json():null).then(j=>{m&&j&&(a(j),l(j.conversationTitle||""))}).catch(()=>{}),()=>{m=!1}},[e]);async function d(m){const j=await fetch("/api/settings",{method:"POST",headers:{...f,"Content-Type":"application/json"},body:JSON.stringify(m)}).then(k=>k.ok?k.json():null).catch(()=>null);return j&&a(j),j}function p(m){const j=kh.find(k=>k.id===m);!j||!j.build||(a(k=>({...k||{},autonomyLevel:m})),d({autonomyLevel:m}))}async function h(){c(!0);try{await d({conversationTitle:s})}finally{c(!1)}}const g=(i==null?void 0:i.autonomyLevel)??null,v=(t==null?void 0:t.account)||null,w=((y=t==null?void 0:t.identity)==null?void 0:y.name)||((x=t==null?void 0:t.agent)==null?void 0:x.label)||"your agent";return o.jsx("div",{className:"modal-backdrop",onClick:n,"data-testid":"settings-backdrop",children:o.jsxs("div",{className:"modal settings-menu",onClick:m=>m.stopPropagation(),"data-testid":"settings-menu",children:[o.jsx("h2",{children:"Settings"}),o.jsx("p",{className:"muted",children:"The everyday knobs. Your agent handles the rest."}),o.jsx("div",{className:"set-section",children:"Permissions — what can your agent do on its own?"}),o.jsx("div",{className:"autonomy-dial","data-testid":"autonomy-dial",children:kh.map(m=>{const j=g===m.id;return o.jsxs("button",{className:`autonomy-tier ${j?"selected":""} ${m.build?"":"coming-soon"}`,onClick:()=>p(m.id),disabled:!m.build,"aria-pressed":j,"data-testid":`autonomy-${m.id}`,children:[o.jsx("span",{className:"autonomy-emoji",children:m.emoji}),o.jsxs("span",{className:"autonomy-body",children:[o.jsxs("span",{className:"autonomy-title",children:[m.title,!m.build&&o.jsx("span",{className:"autonomy-soon","data-testid":"autonomy-coming-soon",children:"coming soon"}),j&&o.jsx("span",{className:"autonomy-check",children:"✓"})]}),o.jsx("span",{className:"autonomy-desc",children:m.desc})]})]},m.id)})}),g===null&&o.jsxs("p",{className:"autonomy-note","data-testid":"autonomy-default-note",children:["Default — your agent follows the per-message ",o.jsx("strong",{children:"Build / Plan"})," toggle. Pick a setting above to lock it."]}),o.jsx("div",{className:"set-section",children:"Conversation name"}),o.jsxs("div",{className:"set-rename",children:[o.jsx("input",{type:"text",value:s,placeholder:"Auto-named from your chat",onChange:m=>l(m.target.value),"data-testid":"rename-input",maxLength:120}),o.jsx("button",{onClick:h,disabled:u,"data-testid":"rename-save",children:u?"Saving…":"Save"})]}),o.jsx("p",{className:"muted small",children:"Overrides the name we auto-pick for this workspace’s presence label."}),o.jsx("div",{className:"set-section",children:"Appearance"}),o.jsx("button",{className:"set-row",onClick:()=>{r==null||r(),n==null||n()},"data-testid":"settings-open-theme",children:"🎨 Theme — light / dark + accent"}),o.jsx(IR,{token:e}),o.jsx("div",{className:"set-section",children:"Account"}),o.jsxs("div",{className:"set-account","data-testid":"settings-account",children:[o.jsxs("span",{className:"set-account-agent",children:["Your agent: ",o.jsx("strong",{children:w})]}),v!=null&&v.email?o.jsxs("span",{className:"set-account-email",children:["Signed in as ",v.email]}):o.jsx("span",{className:"set-account-email muted",children:"Signed in on this device"})]}),o.jsx("div",{className:"actions",children:o.jsx("button",{onClick:n,"data-testid":"settings-done",children:"Done"})})]})})}function AR({bazaarPreview:e}){const[t,n]=b.useState(null);b.useEffect(()=>{let i=!1;async function a(){var c;const l=await fetch("/api/preview/ports").catch(()=>null);if(!l||i)return;const u=await l.json().catch(()=>({}));i||!t&&((c=u.ports)==null?void 0:c.length)>0&&n(u.ports[0].port)}a();const s=setInterval(a,4e3);return()=>{i=!0,clearInterval(s)}},[t]);const r=e!=null&&e.url?`${e.url}${e.url.includes("?")?"&":"?"}_=${e.ts||""}`:null;return r?o.jsx("iframe",{className:"liveview-frame",src:r,title:"Live view","data-testid":"liveview-frame",sandbox:"allow-scripts"},`bz-${e.ts}`):t?o.jsx("iframe",{className:"liveview-frame",src:`http://localhost:${t}`,title:"Live view","data-testid":"liveview-frame"},t):o.jsxs("div",{className:"liveview-empty","data-testid":"liveview-empty",children:[o.jsx("div",{className:"liveview-empty-mark",children:"👁️"}),o.jsx("p",{className:"liveview-empty-title",children:"Nothing to show yet"}),o.jsx("p",{className:"liveview-empty-sub",children:"When your agent builds something, it appears here — live, as it works."}),o.jsx(Sd,{variant:"ambient"})]})}function DR({id:e}){const t=`wild:notes:${e}`,[n,r]=b.useState(()=>{try{return localStorage.getItem(t)||""}catch{return""}});return b.useEffect(()=>{try{localStorage.setItem(t,n)}catch{}},[t,n]),o.jsx("textarea",{className:"notes-block",value:n,onChange:i=>r(i.target.value),placeholder:"Jot anything — a plan, a link, a reminder…","data-testid":"notes-block"})}function OR(e){return`$${(Number(e)||0).toFixed(2)}`}function LR(e=[],t=[]){if(!e.length)return t.length?{name:"You",handle:"you",total:0,uses:0,matches:0,serviceCalls:0}:null;const n=e[0];return(n.total||0)===0&&e.find(r=>r.handle==="you")||n}function FR({live:e,token:t}){const[n,r]=b.useState(e||null);b.useEffect(()=>{let g=!1;const v=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:v}).then(w=>w.ok?w.json():null).then(w=>{!g&&w&&r(y=>y||w)}).catch(()=>{}),()=>{g=!0}},[t]),b.useEffect(()=>{e&&r(e)},[e]);const i=b.useMemo(()=>LR(n==null?void 0:n.earnings,n==null?void 0:n.listings),[n]),a=i==null?void 0:i.handle,s=(i==null?void 0:i.total)??0,l=b.useRef({handle:null,total:null}),[u,c]=b.useState([]);if(b.useEffect(()=>{const g=l.current;if(g.handle!==a){l.current={handle:a,total:s},c([]);return}if(g.total===null){l.current={handle:a,total:s};return}const v=s-g.total;l.current={handle:a,total:s},v>0&&c(w=>[...w,v].slice(-28))},[a,s]),!i)return o.jsxs("div",{className:"earn-empty","data-testid":"earnings-empty",children:[o.jsx("div",{className:"earn-empty-mark",children:"💸"}),o.jsx("p",{className:"earn-empty-title",children:"No earnings yet"}),o.jsx("p",{className:"earn-empty-sub",children:"When someone builds on what you share — or uses a tool you wired in — represented earnings show up here, live."})]});const f=i.handle==="you",d=(i.serviceCalls||0)>0||(i.matches||0)>0,p=d?i.matches||0:i.uses||0,h=d?p===1?"match":"matches":p===1?"build":"builds";return o.jsxs("div",{className:"earn-block","data-testid":"earnings-block",children:[o.jsxs("div",{className:"earn-who",children:[o.jsxs("span",{className:"earn-name",children:[i.name,f&&o.jsx("span",{className:"earn-you-tag",children:"you"})]}),o.jsx("span",{className:"earn-sub",children:f?"your producer earnings":"a producer's earnings, live"})]}),o.jsx("div",{className:"earn-amount","data-testid":"earnings-amount",children:OR(s)}),o.jsxs("div",{className:"earn-meta",children:[o.jsxs("span",{children:[o.jsx("strong",{children:p})," ",h]}),o.jsx("span",{className:"earn-rep",title:"No real money moves yet — a preview of how earnings would work.",children:"represented · settles later"})]}),o.jsx(MR,{values:u})]})}function MR({values:e}){const t=e&&e.length>0,n=t?e:Array.from({length:16},()=>0),r=t?Math.max(...e):1;return o.jsxs("div",{className:`earn-spark ${t?"":"is-baseline"}`,"data-testid":"earnings-spark","aria-hidden":"true",children:[o.jsx("div",{className:"earn-bars",children:n.map((i,a)=>o.jsx("span",{className:"earn-bar",style:{height:`${t?8+Math.round(i/r*92):6}%`}},a))}),o.jsx("span",{className:"earn-spark-live",children:"live"})]})}function Gx(e){const t=Math.max(0,Math.min(100,Number(e)||0));return Math.round(t)}function Sh(e,t){if(!e)return"";const n=Date.parse(e);if(!Number.isFinite(n))return"";let r=Math.floor((n-t)/1e3);if(r<=0)return"resetting…";const i=Math.floor(r/86400);r-=i*86400;const a=Math.floor(r/3600);r-=a*3600;const s=Math.floor(r/60);return i>0?`resets in ${i}d ${a}h`:a>0?`resets in ${a}h ${s}m`:`resets in ${s}m`}function qo({label:e,value:t,sub:n,tone:r="accent",testid:i}){const a=Gx(t);return o.jsxs("div",{className:"usage-gauge","data-testid":i,children:[o.jsxs("div",{className:"usage-gauge-head",children:[o.jsx("span",{className:"usage-gauge-label",children:e}),o.jsxs("span",{className:"usage-gauge-val",children:[a,"%"]})]}),o.jsx("div",{className:"usage-bar",children:o.jsx("span",{className:`usage-bar-fill tone-${r}`,style:{width:`${a}%`}})}),n?o.jsx("div",{className:"usage-gauge-sub",children:n}):null]})}function $R({live:e,token:t}){var w,y,x,m,j;const[n,r]=b.useState(e||null),[i,a]=b.useState(!1),[s,l]=b.useState(()=>Date.now()),u=b.useRef(!0),c=t?{Authorization:`Bearer ${t}`}:{};b.useEffect(()=>(u.current=!0,fetch("/api/usage/state",{headers:c}).then(k=>k.ok?k.json():null).then(k=>{u.current&&k&&r(S=>S?{...S,...k}:k)}).catch(()=>{}),()=>{u.current=!1}),[t]),b.useEffect(()=>{e&&r(e)},[e]),b.useEffect(()=>{const k=setInterval(()=>l(Date.now()),3e4);return()=>clearInterval(k)},[]);async function f(){a(!0);try{await fetch("/api/usage/ack",{method:"POST",headers:c});const k=await fetch("/api/usage/refresh",{method:"POST",headers:c}).then(S=>S.ok?S.json():null).catch(()=>null);u.current&&r(S=>({...S||{},...k||{},disclosed:!0}))}finally{u.current&&a(!1)}}if(n&&n.disclosed===!1)return o.jsxs("div",{className:"usage-block usage-disclose","data-testid":"usage-disclosure",children:[o.jsx("div",{className:"usage-disclose-mark",children:"📊"}),o.jsx("p",{className:"usage-disclose-title",children:"Show your Claude usage?"}),o.jsxs("p",{className:"usage-disclose-body",children:["To show your plan usage, your workspace reads your Claude login ",o.jsx("strong",{children:"locally"})," and asks Anthropic for your numbers. It never leaves this machine except to Anthropic."]}),o.jsx("button",{className:"usage-disclose-ok",onClick:f,disabled:i,"data-testid":"usage-disclose-ok",children:i?"One sec…":"OK, show my usage"})]});if(!n)return o.jsxs("div",{className:"usage-block","data-testid":"usage-loading",children:[o.jsx("div",{className:"usage-skeleton"}),o.jsx("div",{className:"usage-skeleton"}),o.jsx("div",{className:"usage-skeleton short"})]});const d=n.plan||null,p=n.context||null,h=n.status||"loading",g=!d||h==="unavailable",v=h==="stale";return o.jsxs("div",{className:`usage-block ${v?"is-stale":""}`,"data-testid":"usage-block",children:[v&&o.jsx("div",{className:"usage-stale-note","data-testid":"usage-stale",children:"couldn't refresh — showing last known"}),d?o.jsxs(o.Fragment,{children:[o.jsx(qo,{label:"Session",value:(w=d.five_hour)==null?void 0:w.utilization,sub:Sh((y=d.five_hour)==null?void 0:y.resets_at,s),tone:"accent",testid:"usage-session"}),o.jsx(qo,{label:"Weekly",value:(x=d.seven_day)==null?void 0:x.utilization,sub:Sh((m=d.seven_day)==null?void 0:m.resets_at,s),tone:"weekly",testid:"usage-weekly"}),(j=d.extra_usage)!=null&&j.is_enabled?o.jsxs("div",{className:"usage-extra","data-testid":"usage-extra",children:["extra usage · ",Gx(d.extra_usage.utilization),"% of $",d.extra_usage.monthly_limit]}):null]}):o.jsxs("div",{className:"usage-unavailable","data-testid":"usage-unavailable",children:[o.jsx("span",{className:"usage-unavailable-title",children:"Plan usage unavailable"}),o.jsx("span",{className:"usage-unavailable-sub",children:h==="unavailable"?"Sign in to Claude (or a non-Claude model is active).":"Couldn’t reach Anthropic just now."})]}),p?o.jsx(qo,{label:"Working memory",value:p.pct,sub:`${Math.round((p.used||0)/1e3)}k / ${Math.round((p.window||0)/1e3)}k tokens`,tone:"memory",testid:"usage-context"}):null,o.jsxs("div",{className:"usage-foot",children:[o.jsx("span",{className:"usage-live-dot","data-status":h}),o.jsx("span",{children:h==="live"?"live":h})]})]})}function BR({token:e,onRun:t}){const[n,r]=b.useState(null),[i,a]=b.useState(!1),[s,l]=b.useState(null),u=b.useRef(!0),c=e?{Authorization:`Bearer ${e}`}:{};b.useEffect(()=>(u.current=!0,fetch("/api/powers/state",{headers:c}).then(m=>m.ok?m.json():null).then(m=>{u.current&&m&&r(m)}).catch(()=>{}),()=>{u.current=!1}),[e]);function f(){const m=((n==null?void 0:n.skills)||[]).map(k=>k.name),j=((n==null?void 0:n.skills)||[]).filter(k=>k.hidden).map(k=>k.name);l({order:m,hidden:j}),a(!0)}async function d(){const m=s||{order:[],hidden:[]},j=await fetch("/api/powers/curation",{method:"POST",headers:{...c,"Content-Type":"application/json"},body:JSON.stringify(m)}).then(S=>S.ok?S.json():null).catch(()=>null),k=await fetch("/api/powers/state",{headers:c}).then(S=>S.ok?S.json():null).catch(()=>null);return u.current&&(k&&r(k),a(!1),l(null)),j}function p(m){l(j=>{const k=new Set(j.hidden);return k.has(m)?k.delete(m):k.add(m),{...j,hidden:[...k]}})}function h(m,j){l(k=>{const S=[...k.order],T=S.indexOf(m),z=T+j;return T<0||z<0||z>=S.length?k:([S[T],S[z]]=[S[z],S[T]],{...k,order:S})})}if(!n)return o.jsxs("div",{className:"powers-block","data-testid":"powers-loading",children:[o.jsx("div",{className:"powers-skel"}),o.jsx("div",{className:"powers-skel"})]});const g=n.skills||[],v=new Set(i&&s?s.hidden:g.filter(m=>m.hidden).map(m=>m.name)),w=new Map((i&&s?s.order:g.map(m=>m.name)).map((m,j)=>[m,j])),y=[...g].sort((m,j)=>(w.get(m.name)??99)-(w.get(j.name)??99)),x=y.filter(m=>!v.has(m.name));return o.jsxs("div",{className:"powers-block","data-testid":"powers-block",children:[o.jsxs("div",{className:"powers-head",children:[o.jsx("span",{className:"powers-title",children:"Powers"}),g.length>0&&o.jsx("button",{className:"powers-edit",onClick:i?d:f,"data-testid":i?"powers-save":"powers-edit-toggle",children:i?"Done":"Customize"})]}),g.length===0?o.jsxs("div",{className:"powers-empty","data-testid":"powers-empty",children:[o.jsx("div",{className:"powers-empty-mark",children:"🧰"}),o.jsx("p",{className:"powers-empty-title",children:"No powers yet"}),o.jsxs("p",{className:"powers-empty-sub",children:["Skills you add to ",o.jsx("code",{children:".claude/skills"})," — your own or a teammate's — show up here as one-tap actions."]})]}):i?o.jsx("div",{className:"powers-list","data-testid":"powers-edit-list",children:y.map(m=>{const j=v.has(m.name);return o.jsxs("div",{className:`powers-row edit ${j?"is-hidden":""}`,"data-testid":`powers-row-${m.name}`,children:[o.jsxs("span",{className:"powers-reorder",children:[o.jsx("button",{onClick:()=>h(m.name,-1),title:"Move up","data-testid":`powers-up-${m.name}`,children:"▲"}),o.jsx("button",{onClick:()=>h(m.name,1),title:"Move down","data-testid":`powers-down-${m.name}`,children:"▼"})]}),o.jsxs("span",{className:"powers-row-name",children:["/",m.name]}),o.jsx("button",{className:"powers-hide",onClick:()=>p(m.name),"data-testid":`powers-hide-${m.name}`,children:j?"Show":"Hide"})]},m.name)})}):o.jsx("div",{className:"powers-list","data-testid":"powers-run-list",children:x.length===0?o.jsx("p",{className:"powers-allhidden",children:"All powers hidden — tap Customize to bring some back."}):x.map(m=>o.jsxs("button",{className:"powers-run",onClick:()=>t==null?void 0:t(m.name),title:m.description||`Run /${m.name}`,"data-testid":`powers-run-${m.name}`,children:[o.jsxs("span",{className:"powers-run-name",children:["/",m.name]}),m.description?o.jsx("span",{className:"powers-run-desc",children:m.description}):null,m.source==="user"?o.jsx("span",{className:"powers-tag",children:"yours"}):null]},m.name))}),o.jsxs("div",{className:"powers-bazaar","data-testid":"powers-bazaar-locked",children:[o.jsx("div",{className:"powers-divider",children:"─ from Bazaar ─"}),o.jsx("p",{className:"powers-bazaar-note",children:"🔒 Verified marketplace skills land here — coming soon."})]})]})}function jh(e){return`$${(Number(e)||0).toFixed(2)}`}function HR({live:e,token:t}){const[n,r]=b.useState(e||null);b.useEffect(()=>{let c=!1;const f=t?{Authorization:`Bearer ${t}`}:{};return fetch("/api/bazaar/state",{headers:f}).then(d=>d.ok?d.json():null).then(d=>{!c&&d&&r(p=>p||d)}).catch(()=>{}),()=>{c=!0}},[t]),b.useEffect(()=>{e&&r(e)},[e]);const i=(n==null?void 0:n.earnings)||[],a=(n==null?void 0:n.totals)||{creditPaid:0},s=i.reduce((c,f)=>c+(f.matches||0),0),l=i.reduce((c,f)=>c+(f.uses||0),0),u=Math.max(1,...i.map(c=>c.total||0));return i.length?o.jsxs("div",{className:"analytics-block","data-testid":"analytics-block",children:[o.jsxs("div",{className:"an-stats",children:[o.jsxs("div",{className:"an-stat",children:[o.jsx("span",{className:"an-stat-num",children:jh(a.creditPaid)}),o.jsx("span",{className:"an-stat-lbl",children:"represented"})]}),o.jsxs("div",{className:"an-stat",children:[o.jsx("span",{className:"an-stat-num",children:s||l}),o.jsx("span",{className:"an-stat-lbl",children:s?"matches":"builds"})]}),o.jsxs("div",{className:"an-stat",children:[o.jsx("span",{className:"an-stat-num",children:i.length}),o.jsx("span",{className:"an-stat-lbl",children:i.length===1?"producer":"producers"})]})]}),o.jsx("div",{className:"an-board",children:i.slice(0,6).map(c=>o.jsxs("div",{className:"an-row","data-testid":`analytics-row-${c.handle}`,children:[o.jsxs("span",{className:"an-row-name",children:[c.name,c.handle==="you"&&o.jsx("span",{className:"earn-you-tag",children:"you"})]}),o.jsx("span",{className:"an-row-bar",children:o.jsx("span",{className:"an-row-fill",style:{width:`${Math.round((c.total||0)/u*100)}%`}})}),o.jsx("span",{className:"an-row-val",children:jh(c.total)})]},c.handle))}),o.jsx("div",{className:"an-foot",children:"represented · settles later"})]}):o.jsxs("div",{className:"earn-empty","data-testid":"analytics-empty",children:[o.jsx("div",{className:"earn-empty-mark",children:"📊"}),o.jsx("p",{className:"earn-empty-title",children:"No activity yet"}),o.jsx("p",{className:"earn-empty-sub",children:"Once builds and matches start flowing across the shelf, you'll see who's earning and how much, here."})]})}function UR({token:e,selectedFile:t,onOpenFile:n}){const[r,i]=b.useState(null),[a,s]=b.useState(null),[l,u]=b.useState(()=>new Set);b.useEffect(()=>{let d=!1;const p=e?{Authorization:`Bearer ${e}`}:{};return fetch("/api/workspace/tree",{headers:p}).then(h=>h.json()).then(h=>{d||(h.error?s(h.error):i(h.entries||[]))}).catch(h=>!d&&s(h.message||String(h))),()=>{d=!0}},[e]);function c(d){u(p=>{const h=new Set(p);return h.has(d)?h.delete(d):h.add(d),h})}function f(d,p=0){var w;const h=d.type==="dir",g=l.has(d.path),v=!h&&d.path===t;return o.jsxs("div",{children:[o.jsxs("div",{className:`fnode ${h?"dir":""} ${v?"sel":""}`,onClick:()=>h?c(d.path):n==null?void 0:n(d.path),style:{paddingLeft:p*12+6},"data-testid":`files-node-${d.path}`,title:d.path,children:[o.jsx("span",{className:"fnode-tw",children:h?g?"▾":"▸":""}),o.jsx("span",{className:"fnode-ic",children:h?"📁":"📄"}),o.jsx("span",{className:"fnode-nm",children:d.name})]}),h&&g&&((w=d.children)==null?void 0:w.map(y=>f(y,p+1)))]},d.path)}return o.jsxs("div",{className:"files-block","data-testid":"files-block",children:[a&&o.jsx("div",{className:"files-msg err",children:a==="forbidden"?"Files aren't available on this view.":a}),!r&&!a&&o.jsxs("div",{className:"files-msg",children:[o.jsx("span",{className:"spinner"})," loading…"]}),(r==null?void 0:r.length)===0&&o.jsx("div",{className:"files-msg",children:"Empty workspace"}),r==null?void 0:r.map(d=>f(d,0))]})}const WR={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",json:"json",md:"markdown",markdown:"markdown",css:"css",scss:"scss",html:"markup",xml:"markup",svg:"markup",py:"python",rs:"rust",go:"go",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",java:"java",c:"c",h:"c",cpp:"cpp",rb:"ruby",php:"php"};function VR(e){const t=String(e||"").split(".").pop().toLowerCase();return WR[t]||"text"}function qR({path:e,token:t,onPickFile:n}){const[r,i]=b.useState(e||""),[a,s]=b.useState({loading:!1});b.useEffect(()=>{i(e||"")},[e]),b.useEffect(()=>{if(!e){s({loading:!1});return}let u=!1;s({loading:!0});const c=t?{Authorization:`Bearer ${t}`}:{};return fetch(`/api/workspace/file?path=${encodeURIComponent(e)}`,{headers:c}).then(f=>f.json()).then(f=>{u||s({loading:!1,...f})}).catch(f=>{u||s({loading:!1,error:f.message||String(f)})}),()=>{u=!0}},[e,t]);const l=VR(e);return o.jsxs("div",{className:"codeblock","data-testid":"code-view-block",children:[o.jsxs("div",{className:"codeblock-bar",children:[o.jsx("input",{className:"codeblock-path",value:r,onChange:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&(n==null?void 0:n(r.trim())),placeholder:"path/to/file",spellCheck:!1,"data-testid":"code-path"}),a.truncated&&o.jsx("span",{className:"codeblock-trunc",title:"Large file — showing the start",children:"truncated"})]}),o.jsxs("div",{className:"codeblock-body",children:[!e&&o.jsx("div",{className:"codeblock-msg",children:"Pick a file in the Files block — or type a path above — to view it here."}),e&&a.loading&&o.jsxs("div",{className:"codeblock-msg",children:[o.jsx("span",{className:"spinner"})," loading…"]}),e&&a.error&&o.jsx("div",{className:"codeblock-msg err",children:a.error==="forbidden"?"Files aren't available on this view.":a.error}),e&&!a.loading&&!a.error&&typeof a.content=="string"&&o.jsx(lx,{theme:kd.vsDark,code:a.content,language:l,children:({tokens:u,getLineProps:c,getTokenProps:f})=>o.jsx("pre",{className:"codeblock-pre",children:u.map((d,p)=>o.jsxs("div",{...c({line:d}),className:"codeblock-line",children:[o.jsx("span",{className:"codeblock-ln",children:p+1}),o.jsx("span",{className:"codeblock-lc",children:d.map((h,g)=>o.jsx("span",{...f({token:h})},g))})]},p))})})]})]})}function GR({id:e}){const t=`wild:todo:${e}`,[n,r]=b.useState(()=>{try{const f=JSON.parse(localStorage.getItem(t)||"[]");return Array.isArray(f)?f:[]}catch{return[]}}),[i,a]=b.useState("");b.useEffect(()=>{try{localStorage.setItem(t,JSON.stringify(n))}catch{}},[t,n]);function s(){const f=i.trim();f&&(r(d=>[...d,{id:`${Date.now().toString(36)}-${d.length}`,text:f,done:!1}]),a(""))}function l(f){r(d=>d.map(p=>p.id===f?{...p,done:!p.done}:p))}function u(f){r(d=>d.filter(p=>p.id!==f))}const c=n.filter(f=>!f.done).length;return o.jsxs("div",{className:"todo-block","data-testid":"todo-block",children:[o.jsxs("div",{className:"todo-add",children:[o.jsx("input",{value:i,onChange:f=>a(f.target.value),onKeyDown:f=>f.key==="Enter"&&s(),placeholder:"Add a to-do…","data-testid":"todo-input"}),o.jsx("button",{onClick:s,disabled:!i.trim(),"data-testid":"todo-add-btn",children:"Add"})]}),o.jsxs("div",{className:"todo-list",children:[n.length===0&&o.jsx("div",{className:"todo-msg",children:"Nothing yet — add your first to-do above."}),n.map(f=>o.jsxs("div",{className:`todo-item ${f.done?"done":""}`,"data-testid":"todo-item",children:[o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:f.done,onChange:()=>l(f.id)}),o.jsx("span",{className:"todo-text",children:f.text})]}),o.jsx("button",{className:"todo-del",title:"Remove",onClick:()=>u(f.id),children:"✕"})]},f.id))]}),n.length>0&&o.jsxs("div",{className:"todo-foot",children:[c," left · ",n.length-c," done"]})]})}function YR({spec:e}){if(!e||!e.kind)return o.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"This block has nothing to show yet."});const{kind:t,note:n,data:r={}}=e;return o.jsxs("div",{className:"cb-block","data-testid":"custom-block","data-kind":t,children:[n&&o.jsx("p",{className:"cb-note",children:n}),t==="metric"&&o.jsx(XR,{data:r}),t==="list"&&o.jsx(KR,{data:r}),t==="table"&&o.jsx(QR,{data:r}),t==="markdown"&&o.jsx(JR,{data:r})]})}function XR({data:e}){const t=["up","down","flat"].includes(e.trend)?e.trend:null;return o.jsxs("div",{className:"cb-metric","data-testid":"custom-metric",children:[o.jsx("div",{className:"cb-metric-value",children:e.value??"—"}),e.label&&o.jsx("div",{className:"cb-metric-label",children:e.label}),e.delta&&o.jsxs("div",{className:`cb-metric-delta ${t?`is-${t}`:""}`,"data-testid":"custom-delta",children:[t==="up"?"▲ ":t==="down"?"▼ ":"",e.delta]}),Array.isArray(e.spark)&&e.spark.length>0&&o.jsx(ZR,{values:e.spark})]})}function KR({data:e}){const t=Array.isArray(e.items)?e.items:[];return t.length?o.jsx("ul",{className:"cb-list","data-testid":"custom-list",children:t.map((n,r)=>o.jsxs("li",{className:"cb-list-row",children:[o.jsx("span",{className:"cb-list-label",children:n.label}),n.value!==void 0&&n.value!==""&&o.jsx("span",{className:"cb-list-value",children:n.value})]},r))}):o.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty list."})}function QR({data:e}){const t=Array.isArray(e.columns)?e.columns:[],n=Array.isArray(e.rows)?e.rows:[];return n.length?o.jsx("div",{className:"cb-table-wrap",children:o.jsxs("table",{className:"cb-table","data-testid":"custom-table",children:[t.length>0&&o.jsx("thead",{children:o.jsx("tr",{children:t.map((r,i)=>o.jsx("th",{children:r},i))})}),o.jsx("tbody",{children:n.map((r,i)=>o.jsx("tr",{children:(Array.isArray(r)?r:[r]).map((a,s)=>o.jsx("td",{children:a},s))},i))})]})}):o.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"No rows."})}function JR({data:e}){const t=typeof e.text=="string"?e.text:"";return t?o.jsx("div",{className:"cb-markdown","data-testid":"custom-markdown",children:o.jsx(ox,{text:t})}):o.jsx("div",{className:"cb-empty","data-testid":"custom-empty",children:"Empty note."})}function ZR({values:e}){const t=Math.max(...e,1);return o.jsx("div",{className:"cb-spark","data-testid":"custom-spark","aria-hidden":"true",children:e.map((n,r)=>o.jsx("span",{className:"cb-spark-bar",style:{height:`${8+Math.round(Math.max(0,n)/t*92)}%`}},r))})}function eP({onClose:e}){const[t,n]=b.useState("viewer"),[r,i]=b.useState(24),[a,s]=b.useState(""),[l,u]=b.useState(null),[c,f]=b.useState([]),[d,p]=b.useState(null),[h,g]=b.useState(!1);b.useEffect(()=>{v()},[]);async function v(){const m=await fetch("/api/share").catch(()=>null);if(!m||!m.ok)return;const j=await m.json();f(j.tokens||[])}async function w(){p(null),g(!0);try{const m=await fetch("/api/share",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({role:t,ttlSeconds:Math.max(60,Number(r)*3600),label:a})}),j=await m.json();if(!m.ok)throw new Error(j.error||`HTTP ${m.status}`);u(j),v()}catch(m){p(m.message||String(m))}finally{g(!1)}}async function y(m){await fetch(`/api/share/${encodeURIComponent(m)}`,{method:"DELETE"}),v()}async function x(m){try{await navigator.clipboard.writeText(m)}catch{}}return o.jsx("div",{className:"modal-backdrop",onClick:e,children:o.jsxs("div",{className:"modal",onClick:m=>m.stopPropagation(),"data-testid":"share-dialog",children:[o.jsx("h2",{children:"Share workspace"}),o.jsx("p",{className:"muted",children:"Issue a token-protected URL. Anyone with the link opens this workspace in their browser with the role you choose."}),o.jsx("label",{children:"Role"}),o.jsx("div",{className:"row",children:o.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[o.jsx("input",{type:"radio",name:"role",value:"viewer",checked:t==="viewer",onChange:()=>n("viewer"),"data-testid":"share-role-viewer"}),o.jsx("span",{children:"Viewer — read-only chat + preview"})]})}),o.jsx("div",{className:"row",children:o.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text)"},children:[o.jsx("input",{type:"radio",name:"role",value:"client",checked:t==="client",onChange:()=>n("client"),"data-testid":"share-role-client"}),o.jsx("span",{children:"Client — can chat and request changes"})]})}),o.jsxs("div",{className:"row",children:[o.jsxs("div",{children:[o.jsx("label",{children:"Expires in"}),o.jsx("input",{type:"number",min:"1",value:r,onChange:m=>i(m.target.value),style:{width:80,background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-ttl"}),o.jsx("span",{style:{marginLeft:6,color:"var(--text-muted)",fontSize:12},children:"hours"})]}),o.jsxs("div",{style:{flex:1},children:[o.jsx("label",{children:"Label (optional)"}),o.jsx("input",{value:a,onChange:m=>s(m.target.value),placeholder:"e.g. Mel preview",style:{width:"100%",background:"var(--bg)",color:"var(--text)",border:"1px solid var(--border)",padding:"4px 8px",borderRadius:6},"data-testid":"share-label"})]})]}),d&&o.jsx("div",{style:{color:"var(--error)",fontSize:12,marginBottom:8},"data-testid":"share-error",children:d}),l&&o.jsxs(o.Fragment,{children:[o.jsx("label",{children:"Share URL"}),o.jsx("div",{className:"url-output","data-testid":"share-url",children:l.shareUrl}),o.jsxs("div",{style:{display:"flex",gap:8},children:[o.jsx("button",{onClick:()=>x(l.shareUrl),"data-testid":"share-copy",children:"Copy"}),o.jsx("a",{href:l.shareUrl,target:"_blank",rel:"noreferrer",children:o.jsx("button",{children:"Open"})})]})]}),c.length>0&&o.jsxs("div",{style:{marginTop:16},children:[o.jsx("label",{children:"Active share tokens"}),o.jsx("div",{style:{maxHeight:140,overflow:"auto",border:"1px solid var(--border)",borderRadius:6},children:c.map(m=>o.jsxs("div",{style:{padding:"6px 10px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12},"data-testid":`active-token-${m.sub}`,children:[o.jsxs("div",{children:[o.jsx("strong",{children:m.label||m.role})," ",o.jsxs("span",{style:{color:"var(--text-muted)"},children:["(",m.role,", expires ",new Date(m.exp*1e3).toLocaleString(),")"]})]}),o.jsx("button",{onClick:()=>y(m.sub),style:{fontSize:11},"data-testid":`revoke-${m.sub}`,children:"Revoke"})]},m.sub))})]}),o.jsxs("div",{className:"actions",children:[o.jsx("button",{onClick:e,"data-testid":"share-close",children:"Close"}),o.jsx("button",{className:"primary",onClick:w,disabled:h,"data-testid":"share-issue",children:h?o.jsx("span",{className:"spinner"}):"Issue URL"})]})]})})}function tP({onClose:e,token:t}){var M,H;const[n,r]=b.useState(null),[i,a]=b.useState(!1),[s,l]=b.useState(null),[u,c]=b.useState(!1),[f,d]=b.useState(""),[p,h]=b.useState(""),[g,v]=b.useState(168),[w,y]=b.useState(null);b.useEffect(()=>{m()},[]);function x(L,$={}){const K={...$.headers||{}};return t&&(K.Authorization=`Bearer ${t}`),fetch(L,{...$,headers:K})}async function m(){l(null),a(!1);const L=await x("/api/sync/status").catch(()=>null);if(!L||!L.ok){a(!0);return}r(await L.json())}async function j(L){l(null),c(!0);try{await L()}catch($){l($.message||String($))}finally{c(!1)}}const k=()=>j(async()=>{const L=await x("/api/sync/pair",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({inviteCode:f})}),$=await L.json();if(!L.ok)throw new Error($.error||`HTTP ${L.status}`);d(""),await m()}),S=()=>j(async()=>{var K,ie;const L=await x("/api/sync/invite",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectCode:(ie=(K=n==null?void 0:n.workspaces)==null?void 0:K[0])==null?void 0:ie.projectId,displayName:p,expiresHours:Math.max(1,Number(g)||168)})}),$=await L.json();if(!L.ok)throw new Error($.error||`HTTP ${L.status}`);y($.invite)}),T=()=>j(async()=>{var K,ie;const L=await x("/api/sync/detach",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({workspaceId:(ie=(K=n==null?void 0:n.workspaces)==null?void 0:K[0])==null?void 0:ie.workspaceId})}),$=await L.json();if(!L.ok)throw new Error($.error||`HTTP ${L.status}`);y(null),await m()});async function z(L){try{await navigator.clipboard.writeText(L)}catch{}}const D=((M=n==null?void 0:n.workspaces)==null?void 0:M[0])||null,C=!!n&&!((H=n.daemon)!=null&&H.running);return o.jsx("div",{className:"modal-backdrop",onClick:e,children:o.jsxs("div",{className:"modal",onClick:L=>L.stopPropagation(),"data-testid":"sync-dialog",children:[o.jsx("h2",{children:"Collaborate on this folder"}),o.jsx("p",{className:"muted",children:"bmo-sync keeps this workspace folder identical across machines — yours and a collaborator's. Both of you edit; changes flow both ways. Like a shared drive, but built for workspaces."}),!n&&!i&&o.jsxs("div",{className:"muted",children:[o.jsx("span",{className:"spinner"})," Checking sync status…"]}),i&&o.jsxs("div",{className:"sync-state warn","data-testid":"sync-load-failed",children:[o.jsx("strong",{children:"Couldn't load sync status."}),o.jsx("span",{className:"muted",children:"The workspace server didn't answer. Try again."})]}),C&&o.jsxs("div",{className:"sync-state warn","data-testid":"sync-daemon-down",children:[o.jsx("strong",{children:"The bmo-sync daemon isn't running."}),o.jsx("span",{className:"muted",children:"Folder sharing needs the background sync service running on this machine. Start it, then recheck."})]}),n&&!C&&!D&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sync-state","data-testid":"sync-unpaired",children:[o.jsxs("strong",{children:[n.workspaceName," isn't shared yet."]}),o.jsx("span",{className:"muted",children:"Got an invite code from a collaborator? Paste it to sync this folder with theirs."})]}),o.jsx("label",{children:"Invite code"}),o.jsxs("div",{className:"row",children:[o.jsx("input",{className:"sync-input",style:{flex:1},value:f,onChange:L=>d(L.target.value),placeholder:"e.g. CAFE-MILANO-A8X3","data-testid":"sync-invite-input"}),o.jsx("button",{className:"primary",onClick:k,disabled:u||!f.trim(),"data-testid":"sync-join",children:u?o.jsx("span",{className:"spinner"}):"Connect folder"})]})]}),n&&!C&&D&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"sync-state ok","data-testid":"sync-paired",children:[o.jsxs("strong",{children:["✓ Synced — ",D.projectName||D.projectId]}),o.jsxs("span",{className:"muted",children:["This folder is shared. Edits sync both ways automatically",D.conflictCount?` · ${D.conflictCount} conflict${D.conflictCount>1?"s":""} resolved`:"","."]})]}),n.canInvite?o.jsxs(o.Fragment,{children:[o.jsx("label",{children:"Invite a collaborator"}),o.jsxs("div",{className:"row",children:[o.jsx("input",{className:"sync-input",style:{flex:1},value:p,onChange:L=>h(L.target.value),placeholder:"Their name — e.g. Mel","data-testid":"sync-invite-name"}),o.jsx("input",{className:"sync-input",style:{width:64},type:"number",min:"1",value:g,onChange:L=>v(L.target.value),title:"Invite expires in (hours)"}),o.jsx("button",{onClick:S,disabled:u,"data-testid":"sync-create-invite",children:u?o.jsx("span",{className:"spinner"}):"Create invite"})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("label",{children:"Send this code to your collaborator"}),o.jsx("div",{className:"url-output","data-testid":"sync-invite-code",children:w.code}),o.jsxs("div",{className:"row",style:{marginBottom:0},children:[o.jsx("button",{onClick:()=>z(w.code),"data-testid":"sync-copy-code",children:"Copy code"}),w.expiresAt&&o.jsxs("span",{className:"muted",style:{margin:0},children:["expires ",new Date(w.expiresAt*1e3).toLocaleDateString()]})]})]})]}):o.jsxs("p",{className:"muted","data-testid":"sync-no-invite",children:["Inviting from here needs a bmo-sync admin key (set"," ",o.jsx("span",{className:"md-code-inline",children:"BMO_SYNC_ADMIN_KEY"}),"). Without it, anyone you've already invited can still join with their own code."]})]}),s&&o.jsx("div",{style:{color:"var(--error)",fontSize:12,marginTop:8},"data-testid":"sync-error",children:s}),o.jsxs("div",{className:"actions",children:[(C||i)&&o.jsx("button",{onClick:m,disabled:u,"data-testid":"sync-recheck",children:"Recheck"}),D&&!C&&o.jsx("button",{onClick:T,disabled:u,"data-testid":"sync-disconnect",children:"Disconnect"}),o.jsx("button",{onClick:e,"data-testid":"sync-close",children:"Close"})]})]})})}function nP({alert:e,onDismiss:t}){if(!e)return null;const n=e.kind==="fatal";return o.jsxs("div",{className:"conflict-banner","data-testid":"conflict-banner",role:"status",children:[o.jsx("span",{className:"ico",children:n?"⛔":"⚠️"}),n?o.jsxs("span",{children:[o.jsx("strong",{children:"Sync stopped."})," ",e.message||"The sync engine hit a fatal error."," Reconnect from the Collaborate dialog."]}):o.jsxs("span",{children:[o.jsx("strong",{children:"Sync conflict"})," on ",o.jsx("code",{children:e.path||"a file"})," — bmo-sync kept ",o.jsx("strong",{children:e.resolution||"the latest edit"}),e.user?` (also edited by ${e.user})`:"","."]}),o.jsx("span",{className:"spacer"}),o.jsx("button",{onClick:t,"data-testid":"conflict-dismiss",children:"Dismiss"})]})}function rP({urlToken:e,onClose:t}){const[n,r]=b.useState([]),[i,a]=b.useState(!0),[s,l]=b.useState(null),[u,c]=b.useState(null),[f,d]=b.useState({}),[p,h]=b.useState(null),g=e?{Authorization:`Bearer ${e}`}:{};function v(){a(!0),fetch("/api/conflicts",{headers:g}).then(m=>m.ok?m.json():{conflicts:[]}).then(m=>{r(Array.isArray(m==null?void 0:m.conflicts)?m.conflicts:[]),l(null)}).catch(m=>l(String((m==null?void 0:m.message)||m))).finally(()=>a(!1))}b.useEffect(v,[]);function w(m){return`${m.workspaceId}:${m.path}`}async function y(m){const j=w(m);if(f[j])return;const k=new URL("/api/conflicts/view",window.location.origin);k.searchParams.set("workspaceId",m.workspaceId),k.searchParams.set("path",m.path);const S=await fetch(k.toString(),{headers:g});if(!S.ok){l(`Could not load ${m.path} (HTTP ${S.status})`);return}const T=await S.json().catch(()=>null);T&&d(z=>({...z,[j]:{mine:Nh(T.mine),theirs:Nh(T.theirs),conflict:T.conflict}}))}async function x(m,j){const k=w(m);h(k);try{const S=await fetch("/api/conflicts/resolve",{method:"POST",headers:{"content-type":"application/json",...g},body:JSON.stringify({workspaceId:m.workspaceId,path:m.path,action:j})});if(!S.ok){const T=await S.json().catch(()=>({}));l((T==null?void 0:T.error)||`Resolve failed (HTTP ${S.status}).`);return}v(),c(null)}finally{h(null)}}return o.jsxs("div",{className:"conflict-panel","data-testid":"conflict-panel",role:"dialog","aria-label":"Open conflicts",children:[o.jsxs("header",{className:"conflict-panel-header",children:[o.jsx("strong",{children:"Open conflicts"})," ",o.jsxs("span",{className:"muted",children:["(",n.length,") · changes saved to the daemon back-office until you resolve"]}),o.jsx("span",{className:"spacer"}),o.jsx("button",{onClick:v,children:"Refresh"}),o.jsx("button",{onClick:t,children:"Close"})]}),i&&o.jsx("div",{className:"muted",children:"Loading…"}),s&&o.jsx("div",{className:"conflict-panel-error",children:s}),!i&&n.length===0&&o.jsx("div",{className:"muted",children:"No open conflicts."}),o.jsx("ul",{className:"conflict-list",children:n.map(m=>{const j=w(m),k=u===j,S=f[j];return o.jsxs("li",{className:"conflict-row",children:[o.jsxs("div",{className:"conflict-row-head",onClick:()=>{k?c(null):(c(j),m.resolution!=="remote_announced"&&y(m))},children:[o.jsx("code",{children:m.path}),o.jsxs("span",{className:"muted",children:["·"," ",m.resolution==="remote_announced"?`${m.conflictingUser||"peer"} flagged`:m.conflictingUser||"peer"," ","·"," ",new Date((m.detectedAt||0)*1e3).toLocaleTimeString()]}),o.jsx("span",{className:"spacer"}),o.jsx("span",{className:"muted",children:k?"▲":"▼"})]}),k&&m.resolution==="remote_announced"&&o.jsxs("div",{className:"conflict-row-body",children:[o.jsxs("div",{className:"muted",children:[m.conflictingUser||"A peer"," reported a conflict on this file. Your local copy is unchanged here — open it, decide whether to keep your version or pull theirs, save, and the next sync will reconcile."]}),o.jsx("div",{className:"conflict-actions",children:o.jsx("button",{disabled:p===j,onClick:()=>x(m,"keep_mine"),"data-testid":"conflict-acknowledge",children:"Acknowledge"})})]}),k&&m.resolution!=="remote_announced"&&o.jsxs("div",{className:"conflict-row-body",children:[!S&&o.jsx("div",{className:"muted",children:"Loading diff…"}),S&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"conflict-meta",children:[o.jsxs("span",{children:["mine: ",o.jsx("code",{children:Go(m.mineSha256)})]}),o.jsxs("span",{children:["theirs: ",o.jsx("code",{children:Go(m.theirsSha256)})]}),m.baseSha256&&o.jsxs("span",{children:["base: ",o.jsx("code",{children:Go(m.baseSha256)})]})]}),o.jsx(iP,{mine:S.mine,theirs:S.theirs}),o.jsxs("div",{className:"conflict-actions",children:[o.jsx("button",{disabled:p===j,onClick:()=>x(m,"keep_mine"),"data-testid":"conflict-keep-mine",children:"Keep mine"}),o.jsx("button",{disabled:p===j,onClick:()=>x(m,"take_theirs"),"data-testid":"conflict-take-theirs",children:"Take theirs"})]})]})]})]},j)})})]})}function Nh(e){if(typeof e!="string")return null;try{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return new TextDecoder().decode(n)}catch{return null}}function Go(e){return typeof e!="string"?"∅":e.length>12?`${e.slice(0,12)}…`:e}function iP({mine:e,theirs:t}){return e==null&&t==null?o.jsx("div",{className:"muted",children:"Both versions unavailable on disk."}):e==null||t==null?o.jsx("div",{className:"muted",children:"Only one side is available — the other was deleted before resolution."}):o.jsx(Rs,{oldText:t,newText:e})}function aP({role:e,urlToken:t,onSyncAlert:n,onOpenConflicts:r}){const[i,a]=b.useState([]),[s,l]=b.useState({tokensIn:0,tokensOut:0,costUsd:0}),[u,c]=b.useState([]),[f,d]=b.useState(!1),[p,h]=b.useState(null),[g,v]=b.useState(0);b.useEffect(()=>{if(e!=="partner")return;const j=t?{Authorization:`Bearer ${t}`}:{};fetch("/api/sync/status",{headers:j}).then(k=>k.ok?k.json():null).then(k=>{var S;k&&h({paired:!!k.paired,daemonRunning:!!((S=k.daemon)!=null&&S.running),peer:null})}).catch(()=>{}),fetch("/api/conflicts",{headers:j}).then(k=>k.ok?k.json():{conflicts:[]}).then(k=>v(Array.isArray(k==null?void 0:k.conflicts)?k.conflicts.length:0)).catch(()=>{})},[e,t]),b.useEffect(()=>{const j=window.location.protocol==="https:"?"wss":"ws",k=new URL(`${j}://${window.location.host}/ws/activity`);t&&k.searchParams.set("t",t);const S=new WebSocket(k.toString());return S.onopen=()=>d(!0),S.onclose=()=>d(!1),S.onmessage=T=>{let z;try{z=JSON.parse(T.data)}catch{return}z.type==="snapshot"?(a(z.snapshot.presence||[]),l(z.snapshot.usage||{tokensIn:0,tokensOut:0,costUsd:0}),c(z.snapshot.recent||[])):(c(D=>[...D.slice(-49),z]),w(z))},()=>{try{S.close()}catch{}}},[t]);function w(j){j.type==="daemon-status"?h(k=>({...k||{paired:!1},daemonRunning:!!j.connected})):j.type==="sync-paired"?h(k=>({...k||{},paired:!0,daemonRunning:!0})):j.type==="sync-detached"?h(k=>({...k||{},paired:!1,peer:null})):j.type==="remote-presence"?h(k=>({...k||{paired:!0},peer:j.user||null})):j.type==="sync-conflict"?(n==null||n({kind:"conflict",path:j.path,resolution:j.resolution,user:j.conflictingUser}),(j.resolution==="local_pre_write_guard"||j.resolution==="remote_announced")&&v(k=>k+1)):j.type==="sync-conflict-resolved"?v(k=>Math.max(0,k-1)):j.type==="sync-fatal"&&(n==null||n({kind:"fatal",message:j.message}))}const y=[...u].reverse().find(j=>j.type==="chat-stream"||j.type==="chat-user"||j.type==="chat-end"),x=u.find(j=>j.type==="inbox-change");let m=null;return p!=null&&p.paired&&(m=p.daemonRunning?o.jsxs("span",{className:"pill synced","data-testid":"activity-sync",children:["⇄ Synced",p.peer?` · with ${p.peer}`:""]}):o.jsx("span",{className:"pill sync-off","data-testid":"activity-sync",children:"⇄ Sync paused"})),o.jsxs("footer",{className:"bottombar","data-testid":"activity-bar",children:[o.jsx("span",{className:`pill ${f?"live":""}`,"data-testid":"activity-connected",children:f?"live":"reconnecting…"}),o.jsxs("span",{className:"pill","data-testid":"activity-presence",children:["👥 ",i.length," viewing"]}),m,e==="partner"&&g>0&&o.jsxs("button",{type:"button",className:"pill conflict-badge","data-testid":"activity-conflicts",onClick:()=>r==null?void 0:r(),title:"Resolve open sync conflicts",children:["🛑 ",g," conflict",g===1?"":"s"]}),o.jsxs("span",{className:"pill","data-testid":"activity-usage",children:["↓",s.tokensIn," ↑",s.tokensOut," · $",(s.costUsd||0).toFixed(3)]}),y&&o.jsx("span",{className:"pill",style:{maxWidth:380,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"data-testid":"activity-last",children:y.type==="chat-end"?"✓ agent finished":"… agent streaming"}),x&&o.jsx("span",{className:"pill","data-testid":"activity-inbox",children:"📦 inbox updated"}),o.jsx("span",{style:{flex:1}}),o.jsxs("span",{style:{fontSize:11},children:["v0.1.0 · ",e]})]})}function sP(){var r;const[e,t]=b.useState(null);if(b.useEffect(()=>{let i=!1;async function a(){try{const u=await(await fetch("/api/inbox")).json();i||t(u)}catch{}}a();const s=setInterval(a,5e3);return()=>{i=!0,clearInterval(s)}},[]),!e||!e.hasInbox||!((r=e.imports)!=null&&r.length))return null;const n=e.imports.filter(i=>{var s;const a=Object.keys(e.installed||{}).find(l=>l.startsWith(i.replace(/-v[\d.]+$/,"")));return a?((s=e.installed[a])==null?void 0:s.integrated)!==!0:!0});return n.length===0?null:o.jsxs("div",{className:"inbox-card","data-testid":"inbox-card",children:["📦 ",o.jsx("strong",{children:"Component inbox"}),": ",n.length," pending integration",n.length!==1?"s":"",": ",n.join(", "),".",o.jsxs("span",{className:"muted",children:["Ask the agent: ",o.jsxs("em",{children:["“walk me through integrating ",n[0],"”"]})]})]})}function Eh(e){return`${Math.round((Number(e)||0)*100)}%`}function Ch(e){return`$${(Number(e)||0).toFixed(2)}`}function Th(e){const t=Math.max(0,Math.min(5,Math.round(Number(e)||0)));return"★★★★★".slice(0,t)+"☆☆☆☆☆".slice(0,5-t)}function Yo(e){var t,n;return((t=e.producer)==null?void 0:t.handle)==="you"||((n=e.producer)==null?void 0:n.kind)==="me"}function lP(e){const t=`${e.title} ${(e.tags||[]).join(" ")} ${e.pitch||""}`.toLowerCase(),n=[[/match|candidate|recruit|\bhir|screen|talent/,"🎯"],[/\bcv\b|resume|parse|extract/,"📄"],[/kanban|board|pipeline|stage|drag/,"🗂️"],[/deploy|cloudflare|worker|\bhost|ship|edge|serverless/,"🚀"],[/landing|waitlist|subscription|launch|checkout/,"🌱"],[/portfolio|personal site/,"🖼️"],[/receipt|expense|invoice|account/,"🧾"],[/feedback|survey|\bform\b/,"💬"],[/book|slot|appointment|schedul|calendar/,"📅"]];for(const[r,i]of n)if(r.test(t))return i;return"🧩"}function zh(e){var n,r,i,a;const t=(((n=e.reward)==null?void 0:n.unit)||"").toLowerCase();return e.hasService||((r=e.reward)==null?void 0:r.model)==="recurring"||/match|use/.test(t)?"earns per use":((i=e.reward)==null?void 0:i.model)==="one-time"?"one-time reward":(a=e.reward)!=null&&a.model?`${e.reward.model} reward`:null}function oP(e,t){var n;return t?`I want to build "${e.title}" from my own recipe.`:`I want to build "${e.title}". Use ${((n=e.producer)==null?void 0:n.name)||"the producer"}'s recipe.`}function uP({theme:e}){const t=(e==null?void 0:e.tokens)||{},n=`radial-gradient(120% 80% at 15% 0%, ${t.canvas1||"#e8f7f0"}, transparent 60%),radial-gradient(120% 90% at 100% 0%, ${t.canvas2||"#e7f0fb"}, transparent 55%),linear-gradient(160deg, ${t.canvas3||"#fef8ee"}, ${t.bg||"#ffffff"} 75%)`;return o.jsxs("div",{className:"bz-theme-swatch",style:{background:n},"aria-hidden":!0,children:[o.jsxs("span",{className:"bz-theme-card",style:{background:t.surface||"#fff",borderColor:t.border||"#e2e6ee"},children:[o.jsx("span",{className:"bz-theme-line",style:{background:t.text||"#1d2430"}}),o.jsx("span",{className:"bz-theme-line short",style:{background:t.textMuted||"#687083"}})]}),o.jsx("span",{className:"bz-theme-dot",style:{background:(e==null?void 0:e.accent)||"#0891b2"}})]})}function cP({onClose:e,onBuild:t,onApplyTheme:n,token:r}){const[i,a]=b.useState([]),[s,l]=b.useState(null),[u,c]=b.useState(null),[f,d]=b.useState(null),[p,h]=b.useState(null);async function g(k){if(!(!n||p)){h(k.id);try{const S=r?{Authorization:`Bearer ${r}`}:{},T=await fetch(`/api/bazaar/themes/${encodeURIComponent(k.id)}/apply`,{method:"POST",headers:S}),z=T.ok?await T.json():null,D=(z==null?void 0:z.theme)||k.theme;D?(n(D),e==null||e()):c("Could not apply that theme.")}catch(S){c(String(S.message||S))}finally{h(null)}}}b.useEffect(()=>{let k=!1;async function S(){try{const[T,z]=await Promise.all([fetch("/api/bazaar/shelf"),fetch("/api/bazaar/state")]);if(k)return;const D=await T.json(),C=await z.json();if(k)return;const M=(D.recipes||[]).slice().sort((H,L)=>(L.outcomeScore||0)-(H.outcomeScore||0));a(M),l(C)}catch(T){k||c(String(T.message||T))}}return S(),()=>{k=!0}},[]);const v=((s==null?void 0:s.earnings)||[]).filter(k=>k.total>0),w=i.filter(k=>k.kind==="theme"),y=i.filter(k=>k.kind!=="theme"),x=y.filter(Yo),m=v.find(k=>k.handle==="you"),j=new Set(i.map(k=>{var S,T;return((S=k.producer)==null?void 0:S.handle)||((T=k.producer)==null?void 0:T.name)||"?"})).size;return o.jsx("div",{className:"modal-backdrop",onClick:e,children:o.jsxs("div",{className:"modal bazaar-modal",onClick:k=>k.stopPropagation(),"data-testid":"bazaar-shelf",children:[o.jsxs("div",{className:"bz-store-head",children:[o.jsxs("div",{className:"bz-store-headings",children:[o.jsx("h2",{children:"🛍️ The bazaar"}),o.jsx("p",{className:"muted bz-store-sub",children:"Proven recipes from a network of producers. Your agent reaches onto this shelf for you — ranked by how often each one actually gets a working result, not by marketing."})]}),o.jsxs("div",{className:"bz-store-stats","data-testid":"bazaar-store-stats",children:[o.jsxs("span",{className:"bz-stat",children:[o.jsx("strong",{children:y.length}),"recipes"]}),w.length>0&&o.jsxs("span",{className:"bz-stat",children:[o.jsx("strong",{children:w.length}),"themes"]}),o.jsxs("span",{className:"bz-stat",children:[o.jsx("strong",{children:j}),"producers"]})]})]}),u&&o.jsx("div",{className:"bz-err",children:u}),x.length>0&&o.jsxs("div",{className:"bz-you-banner","data-testid":"bazaar-you-banner",children:[o.jsx("span",{className:"bz-you-spark",children:"✦"}),o.jsxs("span",{children:["You're a producer here — ",o.jsx("strong",{children:x.length})," ",x.length===1?"of your recipes is":"of your recipes are"," on the shelf",m&&o.jsxs(o.Fragment,{children:[" · earning ",o.jsx("strong",{children:Ch(m.total)}),o.jsx("span",{className:"bz-represented",children:" represented"})]})]})]}),w.length>0&&o.jsxs("div",{className:"bz-theme-section","data-testid":"bazaar-themes",children:[o.jsxs("div",{className:"bz-theme-section-head",children:[o.jsx("span",{className:"gallery-section",children:"🎨 themes — make your workspace yours"}),o.jsx("span",{className:"muted bz-theme-section-sub",children:"Pure colour, applies in one tap. The maker earns when you wear it."})]}),o.jsx("div",{className:"bz-theme-grid",children:w.map(k=>{var T,z,D;const S=Yo(k);return o.jsxs("div",{className:`bz-theme-card-wrap${S?" mine":""}`,"data-testid":`shelf-theme-${k.id}`,children:[o.jsx(uP,{theme:k.theme}),o.jsxs("div",{className:"bz-theme-meta",children:[o.jsx("span",{className:"bz-theme-title",children:k.title}),o.jsxs("span",{className:"bz-theme-by",children:["by ",((T=k.producer)==null?void 0:T.name)||"a maker",S&&" (you)"]}),k.pitch&&o.jsx("span",{className:"bz-theme-pitch",children:k.pitch}),o.jsxs("div",{className:"bz-theme-foot",children:[((z=k.rating)==null?void 0:z.count)>0&&o.jsx("span",{className:"bz-theme-rating",children:Th(k.rating.stars)}),o.jsxs("span",{className:"bz-reward-pill",children:[Ch((D=k.reward)==null?void 0:D.oneTimeValue)," · per apply"]})]})]}),o.jsx("button",{type:"button",className:"bz-theme-apply","data-testid":`shelf-apply-theme-${k.id}`,disabled:p===k.id,onClick:()=>g(k),children:p===k.id?"Applying…":"Apply"})]},k.id)})})]}),o.jsx("div",{className:"bz-shelf-grid","data-testid":"bazaar-shelf-grid",children:y.map(k=>{var C,M,H,L,$,K;const S=Yo(k),T=((C=k.outcomeStats)==null?void 0:C.builds)||0,z=T===0||k.safetyBadge==="new",D=f===k.id;return o.jsxs("div",{className:`bz-card${S?" mine":""}${D?" open":""}`,"data-testid":`shelf-recipe-${k.id}`,onClick:()=>d(D?null:k.id),children:[o.jsxs("div",{className:"bz-card-head",children:[o.jsx("span",{className:"bz-card-glyph","aria-hidden":!0,children:lP(k)}),o.jsxs("div",{className:"bz-card-titles",children:[o.jsx("span",{className:"bz-card-title",children:k.title}),o.jsxs("span",{className:"bz-card-by",children:["by ",((M=k.producer)==null?void 0:M.name)||"a producer",o.jsx("span",{className:`bz-kind bz-kind-${S?"you":((H=k.producer)==null?void 0:H.kind)||"maker"}`,children:S?"you":((L=k.producer)==null?void 0:L.kind)==="vendor"?"vendor":"maker"}),k.hasService&&o.jsx("span",{className:"bz-kind bz-kind-tool",children:"tool"})]})]}),o.jsx("div",{className:"bz-card-score",children:z?o.jsx("span",{className:"bz-new",title:"Just listed — earns its rank by working",children:"NEW"}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"bz-score-pct",children:Eh(k.outcomeScore)}),o.jsx("span",{className:"bz-score-label",children:"works"})]})})]}),!z&&o.jsx("div",{className:"bz-score-bar",title:"Measured: how often this recipe reaches a working result",children:o.jsx("i",{style:{width:Eh(k.outcomeScore)}})}),k.pitch&&o.jsx("p",{className:"bz-card-pitch",children:k.pitch}),o.jsxs("div",{className:"bz-card-foot",children:[k.safetyBadge&&k.safetyBadge!=="new"&&o.jsx("span",{className:`bz-badge bz-badge-${k.safetyBadge}`,children:k.safetyBadge}),(($=k.rating)==null?void 0:$.count)>0&&o.jsxs("span",{className:"bz-card-rating",title:`${k.rating.stars} from ${k.rating.count}`,children:[Th(k.rating.stars)," ",o.jsxs("span",{className:"muted",children:["(",k.rating.count,")"]})]}),zh(k)&&o.jsx("span",{className:"bz-reward-pill",children:zh(k)}),o.jsx("span",{className:"bz-card-expand",children:D?"▾":"▸"})]}),D&&o.jsxs("div",{className:"bz-card-detail","data-testid":`shelf-detail-${k.id}`,children:[k.summary&&o.jsx("p",{className:"bz-detail-summary",children:k.summary}),!z&&T>0&&o.jsxs("p",{className:"muted bz-detail-stat",children:[k.outcomeStats.working," of ",T," builds reached a working result."]}),o.jsxs("p",{className:"bz-detail-hint",children:["Your agent builds this for you and credits"," ",S?"you":((K=k.producer)==null?void 0:K.name)||"the producer"," when it does."]}),t&&o.jsx("button",{type:"button",className:"bz-build-btn","data-testid":`shelf-build-${k.id}`,onClick:ie=>{ie.stopPropagation(),t(oP(k,S))},children:"Build this →"})]})]},k.id)})}),o.jsx("div",{className:"actions",children:o.jsx("button",{onClick:e,"data-testid":"bazaar-shelf-close",children:"Close"})})]})})}const dP=[{id:"concise",label:"Concise",sample:"Got it. Done."},{id:"playful",label:"Playful",sample:"Oh nice — let's go!"},{id:"formal",label:"Formal",sample:"Understood. Proceeding now."},{id:"dry",label:"Dry",sample:"Sure. If we must."}],Rh=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb7185"],fP=[{id:"drive",label:"Google Drive",note:"Files & docs"},{id:"notion",label:"Notion",note:"Wiki & notes"},{id:"gmail",label:"Gmail",note:"Inbox & threads"},{id:"calendar",label:"Calendar",note:"Schedule"},{id:"canva",label:"Canva",note:"Designs"},{id:"github",label:"GitHub",note:"Code & PRs"}],pP=new Set(["login","missing","subscribe"]),hP=new Set(["login","missing"]),Ph={missing:{title:"Almost there — I need Claude installed before I can think.",subtitle:"That's the brain I run on. Install it once, then come back here.",cmdLabel:"Run this in your terminal",cmd:"curl -fsSL https://claude.ai/install.sh | bash",after:"Then come back and press the button below.",retry:"Still don't see Claude on this machine. Make sure the install finished, then try again."},login:{title:"One quick thing before we dig in — sign me in to Claude.",subtitle:"It's a one-time sign-in to your own Claude account — it runs on your machine, on your plan. After this you won't be asked again.",cmdLabel:"Run this once in your terminal",cmd:"claude auth login",after:"A browser window opens — sign in with your Claude account, then come back and press the button.",retry:"Hmm — still not signed in. Finish the sign-in in your browser, then press it again."},subscribe:{title:"You're in — I just need an active Claude plan to start thinking.",subtitle:"Claude Code runs on a Claude Pro plan (or higher). Grab one on your own account, then come back — you won’t be asked again.",cmdLabel:"Get a plan, then come back",link:"https://claude.ai/upgrade",linkLabel:"Open claude.ai →",after:"Subscribe at claude.ai, then come back and press the button.",retry:"Still no active plan showing. Give it a moment after subscribing, then try again."}},mP=new Set(["md","txt","json","yml","yaml","toml","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","kt","swift","c","h","cpp","cc","hpp","css","scss","html","sh","env","sql","xml","svg","csv"]);function gP(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}function yP(e){if(!e)return null;try{const t=new URL(e);return t.hostname==="localhost"||t.hostname==="127.0.0.1"?null:t.protocol==="http:"&&(t.port===""||t.port==="80")||t.protocol==="https:"&&(t.port===""||t.port==="443")?t.hostname:`${t.hostname}:${t.port}`}catch{return null}}async function xP(e){const t=Array.from(e||[]).slice(0,200);if(t.length===0)return{folderName:null,files:[]};const n=(t[0].webkitRelativePath||t[0].name).split("/")[0]||"folder",r=40,i=600,a=[];for(const l of t){if(a.length>=r)break;const u=l.webkitRelativePath||l.name,c=gP(l.name);if(!mP.has(c)){a.push({path:u,head:""});continue}if(l.size>100*1024){a.push({path:u,head:""});continue}try{const p=await l.slice(0,i).text();a.push({path:u,head:p})}catch{a.push({path:u,head:""})}}const s=Math.max(t.length-a.length,0);return{folderName:n,files:a,totalFiles:t.length,untouched:s}}function vP({peekSummary:e,services:t,agentName:n}){const r=[],i=e!=null&&e.folderName?` (you just glanced at "${e.folderName}")`:"";return r.push({kind:"survey",title:"Tell me what's in my workspace",sub:e!=null&&e.folderName?"I'll read the workspace I'm running in and summarize.":"I'll read what's here and summarize the project."}),(t==null?void 0:t.size)>0?r.push({kind:"startup",title:"Help me start something new",sub:`${n} will ask one question to figure out what to build.`}):r.push({kind:"startup",title:"Help me start a project",sub:"Tell me the rough idea — I'll scaffold it."}),r.push({kind:"chat",title:"Just chat — find me work",sub:"No agenda yet. Get me into the workspace."}),r}function Ih(e,t=55,n=380){const[r,i]=b.useState(""),[a,s]=b.useState(!1),[l,u]=b.useState(!1);return b.useEffect(()=>{if(!e){i(""),s(!1),u(!1);return}i(""),s(!1),u(!1);let c=0,f=null;const d=setTimeout(()=>{u(!0),f=setInterval(()=>{c+=1,i(e.slice(0,c)),c>=e.length&&(clearInterval(f),s(!0))},t)},n);return()=>{clearTimeout(d),f&&clearInterval(f)}},[e,t,n]),[r,a,l]}function tr({children:e,from:t="agent",accent:n,streaming:r=!1}){return o.jsx("div",{className:`ob-bubble ob-bubble-${t}${r?" ob-bubble-streaming":""}`,style:t==="user"?{borderColor:n}:void 0,children:e})}function Zr(){return o.jsx("span",{className:"ob-caret","aria-hidden":"true",children:"▍"})}function _h(e){const t=Math.random().toString(36).slice(2,8);return`${e}-${Date.now().toString(36)}-${t}`}function bP({session:e,token:t,onComplete:n}){var $e,it,at,st;const[r,i]=b.useState(1),a=b.useMemo(()=>yP(e==null?void 0:e.shareBaseUrl),[e==null?void 0:e.shareBaseUrl]),[s,l]=b.useState((($e=e==null?void 0:e.identity)==null?void 0:$e.name)||""),[u,c]=b.useState(((it=e==null?void 0:e.identity)==null?void 0:it.tone)||"concise"),[f,d]=b.useState(((at=e==null?void 0:e.identity)==null?void 0:at.color)||Rh[0]),[p,h]=b.useState(!1),[g,v]=b.useState(null),[w,y]=b.useState(null),[x,m]=b.useState(!1),[j,k]=b.useState(!1),[S,T]=b.useState(null),[z,D]=b.useState(""),[C,M]=b.useState(new Set(((st=e==null?void 0:e.identity)==null?void 0:st.connectedServices)||[])),[H,L]=b.useState(!1),[$,K]=b.useState(null),[ie,ce]=b.useState(null),[I,Q]=b.useState(!1),N=b.useRef(null),te=b.useRef(null),le=b.useRef({}),[E,pe]=b.useState({}),je=b.useCallback((O,ne,fe)=>{O&&pe(be=>{const Y=be[O]||{text:"",done:!1,error:null},me=ne==="text"?Y.text+(fe||""):Y.text,oe={...be,[O]:{...Y,text:me}};return le.current[O]=me,oe})},[]),se=b.useCallback((O,ne)=>{O&&pe(fe=>{const be=fe[O]||{text:"",done:!1,error:null};return{...fe,[O]:{...be,done:!0,error:ne||be.error}}})},[]);b.useEffect(()=>{let O=!1,ne=0,fe=null,be=null;const Y=()=>{if(O)return;const me=window.location.protocol==="https:"?"wss":"ws",oe=new URL(`${me}://${window.location.host}/ws/chat`);t&&oe.searchParams.set("t",t),be=new WebSocket(oe.toString()),te.current=be,be.onmessage=we=>{var A;let R;try{R=JSON.parse(we.data)}catch{return}R.type==="chunk"&&((A=R.chunk)==null?void 0:A.type)==="text"?je(R.messageId,"text",R.chunk.text):R.type==="end"?se(R.messageId,null):R.type==="error"&&se(R.messageId,R.message||"agent error")},be.onopen=()=>{ne=0},be.onclose=()=>{if(te.current=null,O)return;const we=Math.min(1e3*2**ne,8e3);ne+=1,fe=setTimeout(Y,we)},be.onerror=()=>{}};return Y(),()=>{O=!0,clearTimeout(fe);try{be==null||be.close()}catch{}}},[t,je,se]),b.useEffect(()=>{document.documentElement.style.setProperty("--accent",f),document.documentElement.style.setProperty("--accent-hot",f)},[f]);const G=b.useMemo(()=>{const O={"content-type":"application/json"};return t&&(O.Authorization=`Bearer ${t}`),O},[t]);async function _(O){const ne=await fetch("/api/agent/identity",{method:"POST",headers:G,body:JSON.stringify({name:s,tone:u,color:f,...O})});if(!ne.ok){const fe=await ne.json().catch(()=>({}));throw new Error(fe.error||`save failed (${ne.status})`)}return ne.json()}const q=b.useCallback(async(O=!1)=>{m(!0);try{const ne=await fetch(`/api/agent/readiness${O?"?fresh=1":""}`,{headers:G});return ne.ok?await ne.json():{status:"unknown"}}catch{return{status:"unknown"}}finally{m(!1)}},[G]);async function J(){if(v(null),!s.trim()){v("Pick a name — even just one syllable.");return}h(!0);try{await _({});const O=await q(!1);if(pP.has(O.status)){y(O);return}i(2)}catch(O){v(String(O.message||O))}finally{h(!1)}}async function re(){const O=await q(!0);if(k(!0),O.status==="login"||O.status==="missing"){y(O);return}y(null),i(2)}async function xe(){const O=await q(!0);if(O.status==="ready"||O.status==="unknown"){T(null),y(null),i(2);return}T(null),y(O)}async function ve(){k(!1),T({status:"starting",url:null,error:null});try{const ne=await(await fetch("/api/agent/login/start",{method:"POST",headers:G})).json();T(ne),ne.status==="success"&&xe()}catch{T({status:"error",url:null,error:"Could not start sign-in."})}}async function Ue(){const O=z.trim();if(O){D("");try{const ne=await fetch("/api/agent/login/code",{method:"POST",headers:{...G,"content-type":"application/json"},body:JSON.stringify({code:O})});T(await ne.json())}catch{}}}b.useEffect(()=>{if(!(S&&["starting","awaiting-browser","awaiting-code"].includes(S.status)))return;let ne=!0;const fe=setInterval(async()=>{try{const Y=await(await fetch("/api/agent/login/status",{headers:G})).json();if(!ne)return;T(Y),Y.status==="success"&&(clearInterval(fe),xe())}catch{}},2e3);return()=>{ne=!1,clearInterval(fe)}},[S==null?void 0:S.status,G]);const[Oe,Z]=b.useState(null),ke=Oe?E[Oe]:null;async function yt(O){if(ce(null),!(!O||O.length===0)){L(!0);try{const ne=await xP(O);if(ne.files.length===0){ce("That folder looks empty — try another?"),L(!1);return}K(ne);const fe=_h("peek");Z(fe),pe(Y=>({...Y,[fe]:{text:"",done:!1,error:null}}));const be=await fetch("/api/onboarding/peek",{method:"POST",headers:G,body:JSON.stringify({folderName:ne.folderName,files:ne.files,totalFiles:ne.totalFiles,messageId:fe})});if(!be.ok){const Y=await be.json().catch(()=>({}));throw new Error(Y.error||`peek failed (${be.status})`)}}catch(ne){ce(String(ne.message||ne))}finally{L(!1)}}}function Le(O){M(ne=>{const fe=new Set(ne);return fe.has(O)?fe.delete(O):fe.add(O),fe})}const[Ce,de]=b.useState(null),[Be,tt]=b.useState(null),[Ht,dt]=b.useState(null),P=Ce?E[Ce]:null,[U,ue]=b.useState(null),[ge,Se]=b.useState(!1);async function Ve(){dt(null),tt("remix"),Se(!0);try{const fe=((await(await fetch("/api/bazaar/shelf",{headers:G})).json()).recipes||[]).slice().sort((be,Y)=>(Y.outcomeScore||0)-(be.outcomeScore||0)).slice(0,3);ue(fe)}catch{ue([])}finally{Se(!1)}}async function nt(O){var fe;const ne=`Build me “${O.title}”. Use ${((fe=O.producer)==null?void 0:fe.name)||"the producer"}'s recipe.`;try{await _({connectedServices:[...C]}),await fetch("/api/agent/onboarded",{method:"POST",headers:G}),n==null||n({build:ne})}catch(be){dt(String(be.message||be))}}async function pt(O){dt(null),tt(O);const ne=_h("job");de(ne),pe(fe=>({...fe,[ne]:{text:"",done:!1,error:null}}));try{await _({connectedServices:[...C]});const fe=await fetch("/api/onboarding/start-job",{method:"POST",headers:G,body:JSON.stringify({kind:O,messageId:ne,peekFolderName:($==null?void 0:$.folderName)||null})});if(!fe.ok){const be=await fe.json().catch(()=>({}));throw new Error(be.error||`start-job failed (${fe.status})`)}}catch(fe){dt(String(fe.message||fe)),de(null),tt(null)}}async function Ct(){var O;try{await _({connectedServices:[...C]});const ne=await fetch("/api/agent/onboarded",{method:"POST",headers:G});if(!ne.ok){const be=await ne.json().catch(()=>({}));throw new Error(be.error||`mark-onboarded failed (${ne.status})`)}let fe=null;if(Ce&&(P!=null&&P.done)&&P.text&&!P.error){const be=((O=Pe.find(Y=>Y.kind===Be))==null?void 0:O.title)||"Let’s get started";fe={messageId:Ce,userText:be,agentText:P.text}}n==null||n(fe?{seedChat:fe}:void 0)}catch(ne){v(String(ne.message||ne))}}const bt=s.trim()||"your agent",rt="Hey. I'm new here.",Je="Before we start — what should I call myself?",[wt,gn]=Ih(r===1?rt:"",65,420),[ln,Ut]=Ih(r===1&&gn?Je:"",48,520),ye=r===1?Ut:!0,Pe=b.useMemo(()=>vP({peekSummary:$,services:C,agentName:bt}),[$,C,bt]),Re=w?Ph[w.status]||Ph.login:null,Ae=w?hP.has(w.status):!1;return o.jsx("div",{className:"ob-root",children:o.jsxs("div",{className:"ob-stage",children:[o.jsxs("div",{className:"ob-brand",children:[o.jsx("span",{className:"ob-brand-mark",children:"✦"})," VentureWild"]}),o.jsxs("header",{className:"ob-header",children:[o.jsx("div",{className:"ob-step-dots","aria-label":`Step ${r} of 4`,children:[1,2,3,4].map(O=>o.jsx("span",{className:`ob-dot ${O===r?"active":""} ${O<r?"done":""}`},O))}),r>1&&!w&&o.jsx("button",{className:"ob-back",onClick:()=>i(r-1),children:"← Back"})]}),w&&Re&&o.jsxs("section",{className:"ob-step",children:[o.jsxs(tr,{children:[o.jsx("p",{className:"ob-bubble-text",children:Re.title}),o.jsx("p",{className:"ob-bubble-subtle",children:Re.subtitle})]}),o.jsxs("div",{className:"ob-card ob-reveal",children:[w.status==="login"?o.jsxs("div",{className:"ob-login-inapp",children:[(!S||S.status==="idle")&&o.jsx("button",{className:"ob-next primary",onClick:ve,children:"Sign in to Claude →"}),S&&(S.status==="starting"||S.status==="awaiting-browser")&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"ob-bubble-text",children:"Opening Claude in your browser…"}),o.jsx("p",{className:"ob-bubble-subtle",children:"Sign in there with your Claude account — I'll detect it automatically, nothing to come back and click."}),S.url&&o.jsx("a",{className:"ob-login-link",href:S.url,target:"_blank",rel:"noreferrer",children:"If the browser didn't open, click here →"})]}),S&&S.status==="awaiting-code"&&o.jsxs("div",{className:"ob-login-code",children:[o.jsx("label",{className:"ob-label",children:"Paste the code from your browser"}),o.jsxs("div",{className:"ob-actions",children:[o.jsx("input",{className:"ob-input",value:z,onChange:O=>D(O.target.value),placeholder:"code from claude.ai"}),o.jsx("button",{className:"ob-next primary",onClick:Ue,children:"Submit"})]})]}),S&&(S.status==="error"||S.status==="unsupported")&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ob-error",children:[S.error||"I couldn't run the in-app sign-in."," You can sign in from a terminal instead:"]}),o.jsx("div",{className:"ob-login-cmd",children:o.jsx("code",{children:Re.cmd})}),o.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:Re.after})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("label",{className:"ob-label",children:Re.cmdLabel}),Re.cmd?o.jsx("div",{className:"ob-login-cmd",children:o.jsx("code",{children:Re.cmd})}):o.jsx("a",{className:"ob-login-link",href:Re.link,target:"_blank",rel:"noreferrer",children:Re.linkLabel}),o.jsx("p",{className:"ob-bubble-subtle",style:{marginTop:10},children:Re.after})]}),j&&o.jsx("div",{className:"ob-error",style:{marginTop:12},children:Re.retry}),o.jsx("div",{className:"ob-actions",children:o.jsx("button",{className:"ob-next primary",onClick:re,disabled:x,children:x?"Checking…":"I've done it — continue →"})}),!Ae&&o.jsx("div",{className:"ob-actions",children:o.jsx("button",{className:"ob-skip",onClick:()=>{y(null),i(2)},children:"I already have a plan — continue"})})]})]}),r===1&&!w&&o.jsxs("section",{className:"ob-step",children:[o.jsxs(tr,{streaming:!gn||!Ut,children:[o.jsxs("p",{className:"ob-bubble-text",children:[wt,!gn&&o.jsx(Zr,{})]}),gn&&o.jsxs("p",{className:"ob-bubble-text",children:[ln,!Ut&&o.jsx(Zr,{})]})]}),ye&&o.jsxs("div",{className:"ob-card ob-reveal",children:[o.jsx("label",{className:"ob-label",children:"Name"}),o.jsx("input",{autoFocus:!0,className:"ob-input",placeholder:"Echo, Pip, Atlas, Sage…",value:s,onChange:O=>l(O.target.value),onKeyDown:O=>{O.key==="Enter"&&J()},maxLength:40}),o.jsx("label",{className:"ob-label",children:"Voice"}),o.jsx("div",{className:"ob-tone-grid",children:dP.map(O=>o.jsxs("button",{className:`ob-tone ${u===O.id?"selected":""}`,onClick:()=>c(O.id),children:[o.jsx("span",{className:"ob-tone-label",children:O.label}),o.jsx("span",{className:"ob-tone-sample",children:O.sample})]},O.id))}),o.jsx("label",{className:"ob-label",children:"Color"}),o.jsx("div",{className:"ob-color-row",children:Rh.map(O=>o.jsx("button",{className:`ob-color-swatch ${f===O?"selected":""}`,style:{background:O},onClick:()=>d(O),"aria-label":`Pick ${O}`},O))}),g&&o.jsx("div",{className:"ob-error",children:g}),o.jsx("div",{className:"ob-actions",children:o.jsx("button",{className:"ob-next primary",onClick:J,disabled:p||!s.trim(),children:p?"Saving…":`I'm ${bt}. Let's go →`})})]})]}),r===2&&o.jsxs("section",{className:"ob-step",children:[o.jsxs(tr,{children:[o.jsx("p",{className:"ob-bubble-text",children:"Cool. Now — show me something you're working on. Drag a folder onto me."}),o.jsx("p",{className:"ob-bubble-subtle",children:"I'll read filenames + a short sample of each text file (≤40 files, ≤600 bytes each) so I can react. Files stay on your machine; the sample goes to Anthropic the same way every chat turn does. Pick something you'd be OK talking about in chat."})]}),o.jsxs("div",{className:`ob-dropzone ${I?"over":""} ${H?"peeking":""}`,onDragOver:O=>{O.preventDefault(),Q(!0)},onDragLeave:()=>Q(!1),onDrop:async O=>{var fe,be;O.preventDefault(),Q(!1);const ne=(fe=O.dataTransfer)==null?void 0:fe.items;if(ne&&ne.length>0&&ne[0].webkitGetAsEntry){const Y=[],me=async(oe,we="")=>{if(oe.isFile)await new Promise(R=>oe.file(A=>{try{Object.defineProperty(A,"webkitRelativePath",{value:`${we}${A.name}`})}catch{}Y.push(A),R()},R));else if(oe.isDirectory){const R=oe.createReader();await new Promise(A=>R.readEntries(async B=>{for(const X of B)await me(X,`${we}${oe.name}/`);A()},A))}};for(const oe of ne){const we=oe.webkitGetAsEntry();we&&await me(we)}if(Y.length>0){await yt(Y);return}}await yt((be=O.dataTransfer)==null?void 0:be.files)},onClick:()=>{var O;return(O=N.current)==null?void 0:O.click()},children:[o.jsx("input",{ref:N,type:"file",webkitdirectory:"",directory:"",multiple:!0,style:{display:"none"},onChange:O=>yt(O.target.files)}),H?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ob-drop-icon",children:"👀"}),o.jsx("div",{className:"ob-drop-title",children:"Looking…"})]}):$?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ob-drop-icon",children:"📁"}),o.jsx("div",{className:"ob-drop-title",children:$.folderName}),o.jsxs("div",{className:"ob-drop-sub",children:[$.totalFiles," file",$.totalFiles===1?"":"s"," · sampled ",$.files.length]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ob-drop-icon",children:"📂"}),o.jsx("div",{className:"ob-drop-title",children:"Drop a folder here"}),o.jsx("div",{className:"ob-drop-sub",children:"or click to pick one"})]})]}),ke&&o.jsxs(tr,{streaming:!ke.done,children:[ke.text?o.jsxs("p",{className:"ob-bubble-text",children:[ke.text,!ke.done&&o.jsx(Zr,{})]}):o.jsxs("p",{className:"ob-bubble-subtle",children:["👀 ",bt," is reading…",!ke.done&&o.jsx(Zr,{})]}),ke.error&&o.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:ke.error})]}),ie&&o.jsx("div",{className:"ob-error",children:ie}),o.jsxs("div",{className:"ob-actions",children:[o.jsx("button",{className:"ob-skip",onClick:()=>i(3),children:"Skip — I'd rather just chat"}),o.jsx("button",{className:"ob-next primary",onClick:()=>i(3),disabled:!$&&!ie,children:"Next →"})]})]}),r===3&&o.jsxs("section",{className:"ob-step",children:[o.jsxs(tr,{children:[o.jsx("p",{className:"ob-bubble-text",children:"Anything I should keep an eye on?"}),o.jsx("p",{className:"ob-bubble-subtle",children:"Totally optional. Flag what lives in your world and I'll wire it up when these land — you can always add more later."})]}),o.jsx("div",{className:"ob-tile-grid",children:fP.map(O=>o.jsxs("button",{className:`ob-tile ${C.has(O.id)?"selected":""}`,onClick:()=>Le(O.id),children:[o.jsx("span",{className:"ob-tile-label",children:O.label}),o.jsx("span",{className:"ob-tile-note",children:O.note}),C.has(O.id)&&o.jsx("span",{className:"ob-tile-check",children:"✓"})]},O.id))}),o.jsxs("div",{className:"ob-soon",children:["These connection flows are landing soon — your picks are saved. And I don't live on one device:",a?o.jsxs(o.Fragment,{children:[" open ",o.jsx("code",{children:a})," on your phone with the same login"]}):o.jsx(o.Fragment,{children:" sign in on any device with the same login"})," ","and I'm right there — same memory, same conversation."]}),o.jsxs("div",{className:"ob-actions",children:[o.jsx("button",{className:"ob-skip",onClick:()=>i(4),children:"Skip →"}),o.jsx("button",{className:"ob-next primary",onClick:()=>i(4),children:"Next: first job →"})]})]}),r===4&&o.jsxs("section",{className:"ob-step",children:[o.jsxs(tr,{children:[o.jsx("p",{className:"ob-bubble-text",children:"Right — what should I actually do for you first?"}),o.jsx("p",{className:"ob-bubble-subtle",children:"Pick one and I'll start now. Or close this and just talk to me."})]}),U?o.jsxs("div",{className:"ob-remix",children:[o.jsx(tr,{children:o.jsx("p",{className:"ob-bubble-text",children:"Here's what other builders already got working. Pick one — I'll build it for you the moment you land in your workspace."})}),U.length===0?o.jsx("div",{className:"ob-error",children:"The shelf is empty right now — start from scratch instead."}):U.map(O=>{var ne;return o.jsxs("button",{className:"ob-remix-card",onClick:()=>nt(O),children:[o.jsxs("div",{className:"ob-remix-main",children:[o.jsx("span",{className:"ob-remix-title",children:O.title}),o.jsxs("span",{className:"ob-remix-by",children:["by ",((ne=O.producer)==null?void 0:ne.name)||"a builder"]}),O.pitch&&o.jsx("span",{className:"ob-remix-pitch",children:O.pitch})]}),o.jsxs("div",{className:"ob-remix-stat",children:[o.jsxs("span",{className:"ob-remix-pct",children:[Math.round((O.outcomeScore||0)*100),"%"]}),o.jsx("span",{className:"ob-remix-pct-sub",children:"worked"})]})]},O.id)}),o.jsx("div",{className:"ob-actions",children:o.jsx("button",{className:"ob-skip",onClick:()=>{ue(null),tt(null)},children:"← Pick a different job"})})]}):Ce?o.jsxs(o.Fragment,{children:[o.jsxs(tr,{streaming:!P||!P.done,children:[P!=null&&P.text?o.jsxs("p",{className:"ob-bubble-text",children:[P.text,!P.done&&o.jsx(Zr,{})]}):o.jsxs("p",{className:"ob-bubble-subtle",children:[bt," is on it…",(!P||!P.done)&&o.jsx(Zr,{})]}),(P==null?void 0:P.error)&&o.jsx("p",{className:"ob-bubble-subtle ob-bubble-error",children:P.error})]}),o.jsxs("div",{className:"ob-actions",children:[o.jsx("button",{className:"ob-skip",onClick:()=>{de(null),tt(null)},children:"← Pick a different job"}),o.jsx("button",{className:"ob-next primary",onClick:Ct,disabled:!P||!P.done&&!P.error,children:P!=null&&P.done?"Open my workspace →":"Streaming…"})]})]}):o.jsxs("div",{className:"ob-jobs",children:[o.jsxs("button",{className:"ob-job ob-job-remix",onClick:Ve,disabled:ge,children:[o.jsx("div",{className:"ob-job-title",children:"✦ Remix a proven build"}),o.jsx("div",{className:"ob-job-sub",children:ge?"Pulling up what others have made…":"Start from something other builders already got working — I'll build one for you now."})]}),Pe.map(O=>o.jsxs("button",{className:"ob-job",onClick:()=>pt(O.kind),children:[o.jsx("div",{className:"ob-job-title",children:O.title}),o.jsx("div",{className:"ob-job-sub",children:O.sub})]},O.kind))]}),(g||Ht)&&o.jsx("div",{className:"ob-error",children:g||Ht}),!Ce&&!U&&o.jsx("div",{className:"ob-actions",children:o.jsx("button",{className:"ob-skip",onClick:Ct,children:"Skip to chat →"})})]}),!w&&o.jsx("p",{className:"ob-consent-note",children:"I quietly share how I'm doing — what's working, what breaks, my setup health — with the Venturewild team so they can help if you ever get stuck. Never your words or files. You can turn this off anytime."})]})})}const wP={display:"grid",placeItems:"center",minHeight:"100vh",padding:24,textAlign:"center"},kP={maxWidth:420,display:"grid",gap:16,justifyItems:"center"},SP={fontSize:44,letterSpacing:"0.18em",fontWeight:700,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",color:"var(--accent, #22d3ee)"};function jP(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function Ah(e=typeof window<"u"?window.location:null){if(!e)return null;const t=String(e.hostname||"");if(!t.endsWith(".venturewild.llc"))return null;const n=t.split(".")[0];return n?`https://sync.venturewild.llc/auth/google/start?slug=${encodeURIComponent(n)}`:null}const NP={display:"inline-flex",alignItems:"center",gap:10,padding:"11px 18px",borderRadius:10,background:"#fff",color:"#1f2937",fontWeight:600,textDecoration:"none",border:"1px solid #dadce0",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"};function EP(){const[e,t]=b.useState("starting"),[n,r]=b.useState(null),[i,a]=b.useState(null),[s,l]=b.useState(0),[u,c]=b.useState(0),f=b.useRef({requestId:null,pollAfterMs:2500}),d=b.useCallback(async()=>{t("starting"),r(null);try{const p=await fetch("/api/auth/pair/start",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(p.status===429){t("error"),r("Too many sign-in attempts right now. Wait a minute, then try again.");return}if(!p.ok){t("error"),r("Could not start sign-in. Please try again.");return}const h=await p.json();f.current={requestId:h.requestId,pollAfterMs:h.pollAfterMs||2500},a(h.code),l(h.expiresAt||0),t("waiting")}catch{t("error"),r("Network error. Check your connection and try again.")}},[]);return b.useEffect(()=>{d()},[d]),b.useEffect(()=>{if(e!=="waiting")return;let p=!1,h=null;const{requestId:g,pollAfterMs:v}=f.current;async function w(){try{const y=await fetch("/api/auth/pair/status",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:g})});if(p)return;const x=await y.json().catch(()=>({}));if(x.status==="approved"&&x.token){if((await fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${x.token}`}})).ok){window.location.reload();return}t("error"),r("Almost there — sign-in completed but the session could not be saved. Try again.");return}if(x.status==="denied"){t("error"),r("This device was denied.");return}if(x.status==="expired"){t("error"),r("The code expired before it was approved.");return}h=setTimeout(w,v)}catch{p||(h=setTimeout(w,v))}}return h=setTimeout(w,v),()=>{p=!0,clearTimeout(h)}},[e]),b.useEffect(()=>{if(e!=="waiting"||!s)return;const p=()=>c(Math.max(0,Math.round((s-Date.now())/1e3)));p();const h=setInterval(p,1e3);return()=>clearInterval(h)},[e,s]),o.jsx("div",{className:"app",style:{gridTemplateRows:"1fr"},children:o.jsx("div",{style:wP,children:o.jsxs("div",{style:kP,children:[o.jsx("h2",{style:{margin:0},children:"Sign in to this workspace"}),Ah()&&o.jsxs(o.Fragment,{children:[o.jsxs("a",{href:Ah(),style:NP,"data-testid":"google-signin",children:[o.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18","aria-hidden":"true",children:[o.jsx("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.92c1.71-1.57 2.68-3.89 2.68-6.62z"}),o.jsx("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.81.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.7H.96v2.33A9 9 0 0 0 9 18z"}),o.jsx("path",{fill:"#FBBC05",d:"M3.97 10.72A5.41 5.41 0 0 1 3.68 9c0-.6.1-1.18.29-1.72V4.95H.96A9 9 0 0 0 0 9c0 1.45.35 2.82.96 4.05l3.01-2.33z"}),o.jsx("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.95l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"})]}),"Continue with Google"]}),o.jsx("div",{style:{color:"var(--text-muted)",fontSize:12},children:"or approve from another device you’re signed in on:"})]}),e==="starting"&&o.jsxs("p",{style:{color:"var(--text-muted)"},children:[o.jsx("span",{className:"spinner"})," Preparing…"]}),e==="waiting"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{style:{color:"var(--text-muted)",margin:0},children:"On a device where you’re already signed in, open this workspace and approve this code:"}),o.jsx("div",{style:SP,"data-testid":"pair-code",children:jP(i)}),o.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13,margin:0},children:["Waiting for approval",u?` · expires in ${u}s`:"","…"]})]}),e==="error"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{style:{color:"var(--error)"},children:n}),o.jsx("button",{onClick:d,children:"Try again"})]})]})})})}const CP={position:"fixed",top:12,left:"50%",transform:"translateX(-50%)",zIndex:1e3,background:"var(--surface, #1e293b)",border:"1px solid var(--accent, #22d3ee)",borderRadius:10,padding:"12px 16px",boxShadow:"0 8px 24px rgba(0,0,0,0.35)",display:"grid",gap:10,maxWidth:460},TP={display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},zP={fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",letterSpacing:"0.12em",fontWeight:700,color:"var(--accent, #22d3ee)"};function RP(e){return e&&e.length===6?`${e.slice(0,3)} ${e.slice(3)}`:e}function PP({token:e}){const[t,n]=b.useState([]),[r,i]=b.useState(null),[a,s]=b.useState(null),l=b.useRef(!0),u=b.useCallback((d={})=>e?{Authorization:`Bearer ${e}`,...d}:d,[e]),c=b.useCallback(async()=>{try{const d=await fetch("/api/auth/pair/requests",{headers:u()});if(!d.ok)return;const p=await d.json();l.current&&n(Array.isArray(p.requests)?p.requests:[])}catch{}},[u]);b.useEffect(()=>{l.current=!0,c();const d=setInterval(c,5e3);return()=>{l.current=!1,clearInterval(d)}},[c]);async function f(d,p,h){if(!r){i(d),s(null);try{const g=await fetch(`/api/auth/pair/${p}`,{method:"POST",headers:u({"content-type":"application/json"}),body:JSON.stringify({requestId:d})});g.ok&&p==="approve"?s({ok:!0,text:`Approved ${h}.`}):g.ok||s({ok:!1,text:"That request is no longer waiting."})}catch{s({ok:!1,text:"Network error."})}finally{i(null),c()}}}return t.length===0?null:o.jsxs("div",{style:CP,"data-testid":"pair-approvals",children:[o.jsx("strong",{style:{fontSize:13},children:t.length===1?"A device wants to sign in":`${t.length} devices want to sign in`}),o.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:"Check that the code matches the one on that device, then approve."}),t.map(d=>o.jsxs("div",{style:TP,children:[o.jsx("span",{style:{fontSize:13},children:d.label}),o.jsx("span",{style:zP,"data-testid":"pair-request-code",children:RP(d.code)}),o.jsx("span",{className:"spacer",style:{flex:1}}),o.jsx("button",{onClick:()=>f(d.requestId,"approve",d.label),disabled:r===d.requestId,"data-testid":"pair-approve-btn",children:r===d.requestId?"Approving…":"Approve"}),o.jsx("button",{onClick:()=>f(d.requestId,"deny",d.label),disabled:r===d.requestId,style:{background:"transparent",color:"var(--text-muted)"},children:"Deny"})]},d.requestId)),a&&o.jsx("span",{style:{fontSize:12,color:a.ok?"var(--accent, #22d3ee)":"var(--error)"},children:a.text})]})}const IP=15e3,_P=2500;function AP(e){const t=Math.round(e/6e4);return t<=0?"expiring":t<60?`${t} min`:`${Math.floor(t/60)}h ${t%60}m`}function DP({token:e}){var m;const[t,n]=b.useState(null),[r,i]=b.useState(!1),[a,s]=b.useState(!1),l=b.useRef(null),u=b.useRef(null),c=b.useCallback(()=>e?{Authorization:`Bearer ${e}`}:{},[e]),f=b.useCallback(async()=>{try{const j=await fetch("/api/support/status",{headers:c()});if(!j.ok)return;n(await j.json())}catch{}},[c]),d=!!((m=t==null?void 0:t.operate)!=null&&m.active);b.useEffect(()=>{f();const j=d?_P:IP;return l.current=setInterval(f,j),()=>clearInterval(l.current)},[f,d]),b.useLayoutEffect(()=>{const j=()=>{const k=u.current?u.current.offsetHeight:0;document.documentElement.style.setProperty("--support-banner-h",`${k}px`)};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)}),b.useEffect(()=>()=>document.documentElement.style.setProperty("--support-banner-h","0px"),[]);const p=b.useCallback(async()=>{i(!0);try{await fetch("/api/support/revoke",{method:"POST",headers:c()})}catch{}i(!1),f()},[c,f]),h=b.useCallback(async()=>{s(!0);try{await fetch("/api/support/operate/cancel",{method:"POST",headers:c()})}catch{}s(!1),f()},[c,f]);if(!t)return null;const g=t.operate||null;if(!t.enabled&&!t.active&&!g)return null;if(g){const j=(g.lines||[]).slice(-6);return o.jsxs("div",{ref:u,role:"status","aria-live":"polite",style:Dh(!0),children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,width:"100%"},children:[o.jsx("span",{"aria-hidden":"true",children:"⚙️"}),o.jsx("span",{style:{fontWeight:600},children:g.active?"VentureWild support is operating your agent":"VentureWild support finished helping"}),g.active&&o.jsx("button",{type:"button",onClick:h,disabled:a,style:Xo,children:a?"Stopping…":"Stop"}),o.jsx("button",{type:"button",onClick:p,disabled:r,style:{...Xo,marginLeft:g.active?0:"auto"},children:r?"Revoking…":"Revoke access"})]}),j.length>0&&o.jsx("div",{"data-testid":"operate-transcript",style:{width:"100%",marginTop:4,maxHeight:96,overflowY:"auto",font:"12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace",opacity:.92,whiteSpace:"pre-wrap"},children:j.map((k,S)=>o.jsx("div",{children:k.text},`${k.ts}-${S}`))})]})}const w=t.active,y=w?"VentureWild support is connected":`Support access allowed (tier ${t.tier})`,x=w?t.lastAction?`last action: ${t.lastAction.action}`:"a support session is live":`auto-expires in ${AP(t.remainingMs)}`;return o.jsxs("div",{ref:u,role:"status","aria-live":"polite",style:Dh(w),children:[o.jsx("span",{"aria-hidden":"true",children:w?"🟢":"🛟"}),o.jsx("span",{style:{fontWeight:600},children:y}),o.jsxs("span",{style:{opacity:.8},children:["· ",x]}),o.jsx("button",{type:"button",onClick:p,disabled:r,style:{...Xo,marginLeft:"auto"},children:r?"Revoking…":"Revoke"})]})}function Dh(e){return{position:"fixed",top:0,left:0,right:0,zIndex:9999,display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"6px 14px",background:e?"var(--accent, #0891b2)":"var(--surface-2, #f4f4f5)",color:e?"var(--accent-ink, #fff)":"var(--text, #222)",borderBottom:"1px solid var(--border, #e4e4e7)",boxShadow:"0 1px 6px rgba(0,0,0,0.12)",font:"13px/1.4 -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"}}const Xo={padding:"3px 12px",borderRadius:6,border:"1px solid currentColor",background:"transparent",color:"inherit",cursor:"pointer",fontWeight:600},OP={partner:"Partner",viewer:"Viewer",client:"Client"},ti=12,Er=[{id:"chat-1",type:"chat"}],LP={lg:[{i:"chat-1",x:0,y:0,w:8,h:ti,minW:3,minH:4}]},FP={liveview:{w:4,h:12},notes:{w:3,h:6},earnings:{w:3,h:5},analytics:{w:4,h:7},usage:{w:3,h:6},powers:{w:3,h:7},files:{w:3,h:12},code:{w:5,h:12},todo:{w:3,h:7},peers:{w:3,h:6}},MP=[{type:"liveview",title:"Live view",icon:"👁️",desc:"See what your agent builds, live."},{type:"files",title:"Files",icon:"📁",desc:"Browse your workspace files.",cap:"fileTree"},{type:"code",title:"Code",icon:"💻",desc:"View a file, with highlighting.",cap:"fileTree"},{type:"notes",title:"Notes",icon:"📝",desc:"A place to jot anything."},{type:"todo",title:"To-do",icon:"✅",desc:"A simple checklist."},{type:"usage",title:"Usage",icon:"🔋",desc:"Your plan usage + working memory, live."},{type:"powers",title:"Powers",icon:"🧰",desc:"Your skills — one tap to run."},{type:"peers",title:"Builders like you",icon:"🌱",desc:"Real things real people built here."},{type:"chat",title:"Another chat",icon:"🗨️",desc:"A second conversation thread.",soon:!0}],$P=[{type:"earnings",title:"Producer earnings",icon:"💸",desc:"Watch represented earnings tick in, live."},{type:"analytics",title:"Shelf analytics",icon:"📊",desc:"Who's earning across the marketplace."}],BP=[{id:"just-chat",name:"Just chat",icon:"💬",desc:"Only the conversation — clean and focused.",blocks:[{type:"chat",l:{x:0,y:0,w:8,h:12,minW:3,minH:4}}]},{id:"build",name:"Build",icon:"🔨",desc:"Chat, a live view, and your powers.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:8,minW:3,minH:3}},{type:"powers",l:{x:6,y:8,w:6,h:4,minW:3,minH:3}}]},{id:"producer",name:"Producer",icon:"💸",desc:"Chat + your earnings, usage, and the shelf.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"earnings",l:{x:6,y:0,w:6,h:4,minW:3,minH:3}},{type:"usage",l:{x:6,y:4,w:6,h:4,minW:3,minH:3}},{type:"analytics",l:{x:6,y:8,w:6,h:4,minW:3,minH:3}}]},{id:"workspace",name:"Workspace",icon:"📝",desc:"Chat, a live view, your usage, and notes.",blocks:[{type:"chat",l:{x:0,y:0,w:6,h:12,minW:3,minH:4}},{type:"liveview",l:{x:6,y:0,w:6,h:6,minW:3,minH:3}},{type:"usage",l:{x:6,y:6,w:6,h:3,minW:3,minH:3}},{type:"notes",l:{x:6,y:9,w:6,h:3,minW:3,minH:3}}]},{id:"code",name:"Code",icon:"💻",desc:"Chat with a file browser and a code view.",cap:"fileTree",blocks:[{type:"chat",l:{x:0,y:0,w:4,h:12,minW:3,minH:4}},{type:"files",l:{x:4,y:0,w:3,h:12,minW:2,minH:4}},{type:"code",l:{x:7,y:0,w:5,h:12,minW:3,minH:4}}]}];let Oh=0;function Xi(e){return Oh+=1,`${e}-${Date.now().toString(36)}-${Oh}`}function HP(e=640){const[t,n]=b.useState(()=>typeof window<"u"&&window.innerWidth<=e);return b.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(`(max-width: ${e}px)`),i=()=>n(r.matches);return i(),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t}function UP(){var be,Y,me,oe,we;const[e,t]=b.useState(null),[n,r]=b.useState(null),[i,a]=b.useState(!1),[s,l]=b.useState(()=>!pa()),[u,c]=b.useState(()=>pa()),[f,d]=b.useState(!1),[p,h]=b.useState(!1),[g,v]=b.useState(null),[w,y]=b.useState(!1),[x,m]=b.useState(!1),[j,k]=b.useState("build"),[S,T]=b.useState(null),[z,D]=b.useState(null),[C,M]=b.useState(null),[H,L]=b.useState(null),[$,K]=b.useState(!1),[ie,ce]=b.useState(null),[I,Q]=b.useState("use"),[N,te]=b.useState(!1),[le,E]=b.useState(!1),[pe,je]=b.useState(!1),[se,G]=b.useState(!1),[_,q]=b.useState(()=>typeof window<"u"?ER():{mode:"light",accent:"#0891b2",hot:"#0e7490",accentManual:!1}),[J,re]=b.useState(()=>{try{const R=JSON.parse(localStorage.getItem("wild:templates")||"[]");return Array.isArray(R)?R:[]}catch{return[]}}),[xe,ve]=b.useState(Er),[Ue,Oe]=b.useState(LP),[Z,ke]=b.useState(!1),[yt,Le]=b.useState("chat-1"),Ce=HP(),de=b.useMemo(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("t"),[]);b.useEffect(()=>{async function R(){try{const A={};de&&(A.Authorization=`Bearer ${de}`);const B=await fetch("/api/session",{headers:A});if(B.status===401){a(!0);return}if(!B.ok)throw new Error(`session fetch failed: ${B.status}`);const X=await B.json();t(X)}catch(A){r(A.message||String(A))}}R()},[de,u]),b.useEffect(()=>{TR(_),CR(_)},[_]),b.useEffect(()=>{var A;const R=(A=e==null?void 0:e.identity)==null?void 0:A.color;R&&!_.accentManual&&q(B=>B.accentManual?B:{...B,accent:R,hot:R})},[(be=e==null?void 0:e.identity)==null?void 0:be.color,_.accentManual]);const Be=e!=null&&e.workspaceId?`wild:canvas:v2:${e.workspaceId}:${e.personKey||"local"}`:null,tt=b.useRef(null);function Ht(R){clearTimeout(tt.current),tt.current=setTimeout(()=>{const A={"Content-Type":"application/json"};de&&(A.Authorization=`Bearer ${de}`),fetch("/api/canvas/state",{method:"POST",headers:A,body:JSON.stringify(R)}).catch(()=>{})},800)}b.useEffect(()=>{if(!Be||Z)return;let R=!1;const A=de?{Authorization:`Bearer ${de}`}:{};return(async()=>{var B,X,ee,Ne,Ot,qe,Tt,on;try{const De=await fetch("/api/canvas/state",{headers:A});if(!De.ok)throw new Error(De.status);const Xe=await De.json();if(R)return;let ht=null;try{ht=JSON.parse(localStorage.getItem(Be))}catch{}if((X=(B=Xe.layout)==null?void 0:B.blocks)!=null&&X.length||(Ot=(Ne=(ee=Xe.layout)==null?void 0:ee.layouts)==null?void 0:Ne.lg)!=null&&Ot.length){let Ze=Array.isArray(Xe.layout.blocks)&&Xe.layout.blocks.length?Xe.layout.blocks:Er;Ze.some(yn=>yn.type==="chat")||(Ze=[...Er,...Ze]),ve(Ze),(qe=Xe.layout.layouts)!=null&&qe.lg&&Oe(Xe.layout.layouts);try{localStorage.setItem(Be,JSON.stringify({blocks:Ze,layouts:Xe.layout.layouts}))}catch{}}else if((Tt=ht==null?void 0:ht.blocks)!=null&&Tt.length){let Ze=Array.isArray(ht.blocks)&&ht.blocks.length?ht.blocks:Er;Ze.some(yn=>yn.type==="chat")||(Ze=[...Er,...Ze]),ve(Ze),(on=ht.layouts)!=null&&on.lg&&Oe(ht.layouts),Ht({layout:{blocks:Ze,layouts:ht.layouts||{lg:[]}}})}if(Array.isArray(Xe.templates)&&Xe.templates.length){re(Xe.templates);try{localStorage.setItem("wild:templates",JSON.stringify(Xe.templates))}catch{}}if(Xe.userTheme){const Ze=Xe.userTheme;q(yn=>({...yn,mode:Ze.mode==="dark"?"dark":"light",accent:Ze.accent||yn.accent,hot:Ze.hot||yn.hot,accentManual:Ze.accentManual??yn.accentManual,tokens:Ze.tokens||{}}))}}catch{if(R)return;try{const De=localStorage.getItem(Be);if(De){const Xe=JSON.parse(De);let ht=Array.isArray(Xe.blocks)&&Xe.blocks.length?Xe.blocks:Er;ht.some(Ze=>Ze.type==="chat")||(ht=[...Er,...ht]),ve(ht),Xe.layouts&&Xe.layouts.lg&&Oe(Xe.layouts)}}catch{}}R||ke(!0)})(),()=>{R=!0,clearTimeout(tt.current)}},[Be]),b.useEffect(()=>{if(!(!Be||!Z)){try{localStorage.setItem(Be,JSON.stringify({blocks:xe,layouts:Ue}))}catch{}Ht({layout:{blocks:xe,layouts:Ue}})}},[Be,Z,xe,Ue]);const dt=b.useRef(null);b.useEffect(()=>{if(Z)return clearTimeout(dt.current),dt.current=setTimeout(()=>{Ht({userTheme:_})},800),()=>clearTimeout(dt.current)},[Z,_]),b.useEffect(()=>{var B;if(!Z||!((B=e==null?void 0:e.capabilities)!=null&&B.chat))return;let R=!1;const A=de?{Authorization:`Bearer ${de}`}:{};return fetch("/api/canvas/blocks",{headers:A}).then(X=>X.ok?X.json():null).then(X=>{R||!Array.isArray(X==null?void 0:X.blocks)||!X.blocks.length||(ve(ee=>{const Ne=new Set(ee.map(qe=>qe.id)),Ot=X.blocks.filter(qe=>qe.id&&!Ne.has(qe.id));return Ot.length?[...ee,...Ot.map(qe=>({id:qe.id,type:"custom",spec:qe}))]:ee}),Oe(ee=>{const Ne=ee.lg||[],Ot=new Set(Ne.map(Tt=>Tt.i)),qe=X.blocks.filter(Tt=>Tt.id&&!Ot.has(Tt.id));return qe.length?{lg:[...Ne,...qe.map((Tt,on)=>({i:Tt.id,x:8,y:on*6,w:4,h:6,minW:3,minH:3}))]}:ee}))}).catch(()=>{}),()=>{R=!0}},[Z,(Y=e==null?void 0:e.capabilities)==null?void 0:Y.chat,de]),b.useEffect(()=>{var B;if(!((B=e==null?void 0:e.capabilities)!=null&&B.chat)||_.accentManual)return;let R=!1;const A=de?{Authorization:`Bearer ${de}`}:{};return fetch("/api/canvas/theme",{headers:A}).then(X=>X.ok?X.json():null).then(X=>{R||!(X!=null&&X.theme)||q(ee=>ee.accentManual?ee:{...ee,mode:X.theme.mode==="dark"?"dark":"light",accent:X.theme.accent||ee.accent,hot:X.theme.hot||X.theme.accent||ee.hot,tokens:X.theme.tokens||{}})}).catch(()=>{}),()=>{R=!0}},[(me=e==null?void 0:e.capabilities)==null?void 0:me.chat,de]);function P(R){const A=Xi(R),B=FP[R]||{w:4,h:12};if(ve(X=>[...X,{id:A,type:R}]),Oe(X=>({lg:[...X.lg||[],{i:A,x:Math.max(0,12-B.w),y:0,w:B.w,h:B.h,minW:3,minH:3}]})),Le(A),te(!1),typeof window<"u"){const X=ee=>{var Ne;return(Ne=document.querySelector(`[data-rgl-id="${A}"]`))==null?void 0:Ne.scrollIntoView({behavior:ee,block:"nearest"})};setTimeout(()=>X("smooth"),300),setTimeout(()=>X("auto"),750)}}function U(R){const A=xe.find(B=>B.id===R);if(ve(B=>B.filter(X=>X.id!==R)),Oe(B=>({lg:(B.lg||[]).filter(X=>X.i!==R)})),Le(B=>{var X;return B===R?((X=xe.find(ee=>ee.type==="chat"))==null?void 0:X.id)||"chat-1":B}),(A==null?void 0:A.type)==="custom"){const B=de?{Authorization:`Bearer ${de}`}:{};fetch(`/api/canvas/blocks/${encodeURIComponent(R)}`,{method:"DELETE",headers:B}).catch(()=>{})}}function ue(R){const A=xe.find(B=>B.id===R);A&&P(A.type)}const ge=b.useRef(xe);ge.current=xe;const Se=b.useRef(null),Ve=b.useRef(null),nt=b.useRef(!1);b.useEffect(()=>{var ee;if(!((ee=e==null?void 0:e.capabilities)!=null&&ee.chat)||Ce)return;let R=!1,A=null;const B=de?{Authorization:`Bearer ${de}`}:{},X=async()=>{var on;if(R||nt.current||document.hidden)return;const Ne=await fetch("/api/preview/ports",{headers:B}).catch(()=>null);if(!Ne||R)return;const qe=((await Ne.json().catch(()=>({}))).ports||[]).map(De=>De.port);if(Ve.current===null){Ve.current=new Set(qe);return}qe.some(De=>!Ve.current.has(De))&&!ge.current.some(De=>De.type==="liveview")&&(nt.current=!0,clearInterval(A),(on=Se.current)==null||on.call(Se))};return X(),A=setInterval(X,5e3),()=>{R=!0,clearInterval(A)}},[(oe=e==null?void 0:e.capabilities)==null?void 0:oe.chat,de,Ce]);function pt(){if(xe.some(A=>A.type==="liveview"))return;const R=Xi("liveview");ve(A=>A.some(B=>B.type==="liveview")?A:[...A,{id:R,type:"liveview"}]),Oe(A=>{const B=(A.lg||[]).map(X=>X.i.startsWith("chat")?{...X,w:6,x:0,h:ti}:X);return B.push({i:R,x:6,y:0,w:6,h:ti,minW:3,minH:4}),{lg:B}})}Se.current=pt;function Ct(R){if(L(R),xe.some(B=>B.type==="code"))return;const A=Xi("code");ve(B=>B.some(X=>X.type==="code")?B:[...B,{id:A,type:"code"}]),Oe(B=>({lg:[...B.lg||[],{i:A,x:6,y:0,w:6,h:ti,minW:3,minH:4}]}))}function bt(R,A){if(R!=null&&R.id&&(ve(B=>{const X=B.findIndex(ee=>ee.id===R.id);if(X>=0){const ee=B.slice();return ee[X]={...ee[X],type:"custom",spec:R},ee}return[...B,{id:R.id,type:"custom",spec:R}]}),Oe(B=>{const X=B.lg||[];return X.some(ee=>ee.i===R.id)?B:{lg:[...X,{i:R.id,x:8,y:0,w:4,h:6,minW:3,minH:3}]}}),A!=="update"&&(Le(R.id),typeof window<"u"))){const B=X=>{var ee;return(ee=document.querySelector(`[data-rgl-id="${R.id}"]`))==null?void 0:ee.scrollIntoView({behavior:X,block:"nearest"})};setTimeout(()=>B("smooth"),300),setTimeout(()=>B("auto"),750)}}function rt(R){!R||typeof R!="object"||q(A=>{var B;return NR(A,R,A.accentManual||!!((B=e==null?void 0:e.identity)!=null&&B.color))})}function Je(R){var X;const A=[],B=R.blocks.map(ee=>{const Ne=Xi(ee.type);return A.push({i:Ne,...ee.l||{x:0,y:0,w:4,h:ti,minW:3,minH:3}}),{id:Ne,type:ee.type}});if(!B.some(ee=>ee.type==="chat")){const ee=Xi("chat");B.unshift({id:ee,type:"chat"}),A.unshift({i:ee,x:0,y:0,w:8,h:ti,minW:3,minH:4})}ve(B),Oe({lg:A}),Le(((X=B[0])==null?void 0:X.id)||"chat-1"),E(!1),typeof window<"u"&&setTimeout(()=>{var ee;return(ee=document.querySelector(".block-canvas"))==null?void 0:ee.scrollTo({top:0,behavior:"smooth"})},60)}function wt(R){try{localStorage.setItem("wild:templates",JSON.stringify(R))}catch{}return Ht({templates:R}),R}function gn(R){const A=Ue.lg||[],B=xe.map(ee=>{const Ne=A.find(Ot=>Ot.i===ee.id);return{type:ee.type,l:Ne?{x:Ne.x,y:Ne.y,w:Ne.w,h:Ne.h,minW:Ne.minW??3,minH:Ne.minH??4}:{x:0,y:0,w:4,h:10,minW:3,minH:4}}}),X={id:`saved-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,name:R,icon:"⭐",desc:"Your saved layout",blocks:B,custom:!0};re(ee=>wt([...ee,X]))}function ln(R){re(A=>wt(A.filter(B=>B.id!==R)))}if(i)return o.jsx(EP,{});if(n)return o.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:o.jsxs("div",{style:{padding:24},children:[o.jsx("h2",{children:"wild-workspace"}),o.jsxs("p",{style:{color:"var(--error)"},children:["Could not load session: ",n]}),o.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Verify the server is running and the share URL token is valid."})]})});if(!e)return o.jsx("div",{className:"app",style:{gridTemplateRows:"1fr",alignItems:"center",justifyItems:"center"},children:o.jsxs("div",{style:{padding:24,color:"var(--text-muted)"},children:[o.jsx("span",{className:"spinner"})," Loading workspace…"]})});if((we=e.capabilities)!=null&&we.chatWrite&&!e.onboarded)return o.jsx(bP,{session:e,token:de,onComplete:async R=>{R!=null&&R.seedChat&&XC(R.seedChat,void 0,Kp(e.currentWorkspace));try{const A={};de&&(A.Authorization=`Bearer ${de}`);const B=await fetch("/api/session",{headers:A});B.ok?t(await B.json()):t({...e,onboarded:!0})}catch{t({...e,onboarded:!0})}R!=null&&R.build&&ce({text:R.build,ts:Date.now()})}});if(s)return o.jsx(cT,{session:e,onEnter:R=>{R!==u&&(KC(R),c(R),L(null),ce(null)),l(!1)},onClose:pa()?()=>l(!1):null});const{role:Ut,capabilities:ye,workspace:Pe,workspaceId:Re,agent:Ae,identity:$e}=e,it=($e==null?void 0:$e.name)||(Ae==null?void 0:Ae.label)||"Chat",at=e.currentWorkspace||{},st=at.id||"default",O=Kp(at);function ne(R){var A,B;switch(R.type){case"chat":return{title:it,icon:"🗨️"};case"liveview":return{title:"Live view",icon:"👁️"};case"notes":return{title:"Notes",icon:"📝"};case"usage":return{title:"Usage",icon:"🔋"};case"powers":return{title:"Powers",icon:"🧰"};case"earnings":return{title:"Producer earnings",icon:"💸"};case"analytics":return{title:"Shelf analytics",icon:"📊"};case"files":return{title:"Files",icon:"📁"};case"code":return{title:"Code",icon:"💻"};case"todo":return{title:"To-do",icon:"✅"};case"peers":return{title:"Builders like you",icon:"🌱"};case"custom":return{title:((A=R.spec)==null?void 0:A.title)||"Block",icon:((B=R.spec)==null?void 0:B.icon)||"🧩"};default:return{title:R.type,icon:"▫️"}}}function fe(R){switch(R.type){case"chat":return o.jsxs(o.Fragment,{children:[ye.chatWrite&&o.jsx("div",{className:"chat-block-bar",children:o.jsxs("span",{className:"chat-mode-toggle","data-testid":"mode-toggle",children:[o.jsx("button",{className:j==="build"?"active":"",onClick:()=>k("build"),"data-testid":"mode-build",children:"Build"}),o.jsx("button",{className:j==="plan"?"active":"",onClick:()=>k("plan"),"data-testid":"mode-plan",children:"Plan"})]})}),ye.inbox&&o.jsx(sP,{}),o.jsx(ZC,{storageKey:O,role:Ut,capabilities:ye,mode:j,token:de,inject:ie,agentName:it,onBazaarEvent:A=>{(A==null?void 0:A.type)==="preview"?(T({url:A.url,ts:A.ts}),pt()):(A==null?void 0:A.type)==="meter"?D(A.state):(A==null?void 0:A.type)==="usage"?M(A.state):(A==null?void 0:A.type)==="block"?bt(A.block,A.op):(A==null?void 0:A.type)==="theme"&&rt(A.theme)}},`chat-${O}`)]});case"liveview":return o.jsx(AR,{bazaarPreview:S});case"notes":return o.jsx(DR,{id:R.id});case"usage":return o.jsx($R,{live:C,token:de});case"powers":return o.jsx(BR,{token:de,onRun:A=>ce({text:`/${A}`,ts:Date.now()})});case"earnings":return o.jsx(FR,{live:z,token:de});case"analytics":return o.jsx(HR,{live:z,token:de});case"files":return o.jsx(UR,{token:de,selectedFile:H,onOpenFile:Ct},`files-${st}`);case"code":return o.jsx(qR,{path:H,token:de,onPickFile:L},`code-${st}`);case"todo":return o.jsx(GR,{id:R.id});case"peers":return o.jsx(Sd,{variant:"block"});case"custom":return o.jsx(YR,{spec:R.spec});default:return null}}return o.jsxs("div",{className:"app",children:[o.jsx(DP,{token:de}),ye.share&&o.jsx(PP,{token:de}),o.jsxs("header",{className:"topbar","data-testid":"topbar",children:[o.jsx("span",{className:"brand",children:"wild-workspace"}),o.jsx("span",{className:`badge ${Ut}`,"data-testid":"role-badge",children:OP[Ut]||Ut}),o.jsxs("button",{className:"badge","data-testid":"workspace-switcher",onClick:()=>l(!0),title:"Switch workspace",style:{cursor:"pointer"},children:[at.name||(Pe==null?void 0:Pe.name)||Re," ▾"]}),$e!=null&&$e.name?o.jsx("span",{className:"badge","data-testid":"agent-name",style:{borderColor:$e.color,color:$e.color},children:$e.name}):Ae&&o.jsx("span",{className:"badge","data-testid":"agent-name",children:Ae.label||Ae.id}),o.jsx("span",{className:"spacer"}),o.jsx("button",{onClick:()=>je(!0),"data-testid":"theme-btn",title:"Theme — make it yours (light/dark + accent)",children:"🎨 Theme"}),ye.chatWrite&&o.jsx("button",{onClick:()=>E(!0),"data-testid":"templates-btn",title:"Start from a template layout",children:"▾ Templates"}),ye.chatWrite&&o.jsx("button",{className:I==="layout"?"primary":"",onClick:()=>Q(R=>R==="layout"?"use":"layout"),"data-testid":"arrange-toggle",title:"Rearrange your blocks",children:I==="layout"?"✓ Done":"✥ Arrange"}),ye.chat&&o.jsx("button",{onClick:()=>K(!0),"data-testid":"bazaar-btn",title:"Browse the marketplace shelf",children:"🛍️ Bazaar"}),ye.chatWrite&&o.jsx("button",{onClick:()=>G(!0),"data-testid":"settings-btn",title:"Settings — agent autonomy, name, appearance",children:"⚙️ Settings"}),ye.sync&&o.jsx("button",{onClick:()=>h(!0),"data-testid":"collaborate-btn",children:"Collaborate"}),ye.share&&o.jsx("button",{onClick:()=>d(!0),"data-testid":"share-btn",children:"Share"}),ye.terminal&&o.jsx("button",{onClick:()=>m(R=>!R),"data-testid":"terminal-toggle",children:x?"Hide terminal":"Terminal"})]}),o.jsxs("main",{className:"canvas-wrap","data-testid":"canvas-wrap",children:[I==="layout"&&o.jsxs("div",{className:"arrange-bar","data-testid":"arrange-bar",children:[o.jsx("span",{className:"arrange-hint",children:"✥ Arranging your space — drag a block's header, resize from its corner, or add a new one."}),o.jsx("span",{className:"spacer"}),o.jsx("button",{className:"primary",onClick:()=>te(!0),"data-testid":"add-block-btn",children:"+ Add block"}),o.jsx("button",{onClick:()=>Q("use"),children:"Done"})]}),Ce?o.jsx(bR,{blocks:xe,activeId:yt,setActiveId:Le,mode:I,renderBlock:fe,blockMeta:ne,onRemove:U,canRemove:R=>R.type!=="chat"}):o.jsx(vR,{blocks:xe,layouts:Ue,mode:I,onLayoutChange:Oe,renderBlock:fe,blockMeta:ne,onRemove:U,onDuplicate:ue,canRemove:R=>R.type!=="chat",canDuplicate:R=>R.type!=="chat"&&R.type!=="custom"})]}),o.jsx(aP,{role:Ut,capabilities:ye,session:e,urlToken:de,onSyncAlert:v,onOpenConflicts:()=>y(!0)}),o.jsx(nP,{alert:g,onDismiss:()=>v(null)}),w&&o.jsx(rP,{urlToken:de,onClose:()=>y(!1)}),N&&o.jsx(wR,{items:MP.filter(R=>!R.cap||ye[R.cap]),bazaarItems:$P,onAdd:P,onClose:()=>te(!1)}),le&&o.jsx(SR,{builtins:BP.filter(R=>!R.cap||ye[R.cap]),saved:J,onApply:Je,onSaveCurrent:gn,onDelete:ln,onClose:()=>E(!1)}),pe&&o.jsx(zR,{theme:_,onChange:q,onClose:()=>je(!1)}),se&&o.jsx(_R,{token:de,session:e,onClose:()=>G(!1),onOpenTheme:()=>je(!0)}),$&&o.jsx(cP,{token:de,onApplyTheme:rt,onClose:()=>K(!1),onBuild:R=>{ce({text:R,ts:Date.now()}),K(!1)}}),f&&o.jsx(eP,{onClose:()=>d(!1),workspaceId:Re}),p&&o.jsx(tP,{onClose:()=>h(!1),token:de}),x&&o.jsxs("div",{className:"terminal-overlay","data-testid":"terminal-overlay",children:[o.jsxs("header",{children:[o.jsx("strong",{children:"Terminal (preview)"}),o.jsx("button",{onClick:()=>m(!1),children:"close"})]}),o.jsx("p",{children:"Power-user terminal is a hidden-by-default toggle. The xterm.js + node-pty integration ships in v1.1. For now use your OS terminal — wild-workspace doesn't replace your shell, it surfaces the agent."})]})]})}function WP(e){const t=window.fetch.bind(window);window.fetch=(n,r={})=>{const i=typeof n=="string"?n:(n==null?void 0:n.url)||"";if(!(i.startsWith("/api/")||i.includes("://")===!1&&i.startsWith("api/")))return t(n,r);const s=new Headers(r.headers||{});return s.has("Authorization")||s.set("Authorization",`Bearer ${e}`),t(n,{...r,headers:s})}}function VP(){const e=window.fetch.bind(window);window.fetch=(t,n={})=>{const r=typeof t=="string"?t:(t==null?void 0:t.url)||"",i=r.startsWith("/api/")||r.includes("://")===!1&&r.startsWith("api/"),a=pa();if(!i||!a)return e(t,n);const s=new Headers(n.headers||{});return s.has("X-Workspace-Id")||s.set("X-Workspace-Id",a),e(t,{...n,headers:s})}}function qP(){Ko.createRoot(document.getElementById("root")).render(o.jsx(En.StrictMode,{children:o.jsx(UP,{})}))}async function GP(){const e=typeof window<"u"&&window.fetch,t=e?new URLSearchParams(window.location.search).get("t"):null;if(t){let r=!1;try{const i=await window.fetch("/api/auth/exchange",{method:"POST",headers:{Authorization:`Bearer ${t}`}});r=i.ok&&(await i.json().catch(()=>({}))).cookie===!0}catch{}if(r){const i=new URLSearchParams(window.location.search);i.delete("t");const a=i.toString(),s=window.location.pathname+(a?`?${a}`:"")+window.location.hash;window.history.replaceState(null,"",s)}else WP(t)}VP();const n=e?new URLSearchParams(window.location.search).get("gv"):null;if(n){try{await window.fetch("/api/auth/google",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({vouch:n})})}catch{}const r=new URLSearchParams(window.location.search);r.delete("gv");const i=r.toString(),a=window.location.pathname+(i?`?${i}`:"")+window.location.hash;window.history.replaceState(null,"",a)}qP()}GP();
|