squad-kit 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +187 -1
- package/README.md +51 -13
- package/SECURITY.md +9 -2
- package/dist/cli.js +31977 -15588
- package/dist/console-ui/assets/index-3sA27BxT.css +1 -0
- package/dist/console-ui/assets/index-CXdIA4pC.js +632 -0
- package/dist/console-ui/index.html +2 -2
- package/package.json +9 -10
- package/dist/console-ui/assets/index-BdNpuyfl.css +0 -1
- package/dist/console-ui/assets/index-QPLuxXcH.js +0 -551
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function s(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=s(a);fetch(a.href,o)}})();function Qp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eh={exports:{}},Aa={},th={exports:{}},Me={};/**
|
|
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 sg;function p4(){if(sg)return Me;sg=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.iterator;function y(O){return O===null||typeof O!="object"?null:(O=m&&O[m]||O["@@iterator"],typeof O=="function"?O:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,k={};function N(O,ee,z){this.props=O,this.context=ee,this.refs=k,this.updater=z||x}N.prototype.isReactComponent={},N.prototype.setState=function(O,ee){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,ee,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function w(){}w.prototype=N.prototype;function S(O,ee,z){this.props=O,this.context=ee,this.refs=k,this.updater=z||x}var E=S.prototype=new w;E.constructor=S,v(E,N.prototype),E.isPureReactComponent=!0;var P=Array.isArray,B=Object.prototype.hasOwnProperty,T={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function I(O,ee,z){var me,he={},ke=null,Te=null;if(ee!=null)for(me in ee.ref!==void 0&&(Te=ee.ref),ee.key!==void 0&&(ke=""+ee.key),ee)B.call(ee,me)&&!_.hasOwnProperty(me)&&(he[me]=ee[me]);var Ae=arguments.length-2;if(Ae===1)he.children=z;else if(1<Ae){for(var Ce=Array(Ae),qe=0;qe<Ae;qe++)Ce[qe]=arguments[qe+2];he.children=Ce}if(O&&O.defaultProps)for(me in Ae=O.defaultProps,Ae)he[me]===void 0&&(he[me]=Ae[me]);return{$$typeof:e,type:O,key:ke,ref:Te,props:he,_owner:T.current}}function D(O,ee){return{$$typeof:e,type:O.type,key:ee,ref:O.ref,props:O.props,_owner:O._owner}}function R(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function F(O){var ee={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(z){return ee[z]})}var M=/\/+/g;function J(O,ee){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):ee.toString(36)}function U(O,ee,z,me,he){var ke=typeof O;(ke==="undefined"||ke==="boolean")&&(O=null);var Te=!1;if(O===null)Te=!0;else switch(ke){case"string":case"number":Te=!0;break;case"object":switch(O.$$typeof){case e:case n:Te=!0}}if(Te)return Te=O,he=he(Te),O=me===""?"."+J(Te,0):me,P(he)?(z="",O!=null&&(z=O.replace(M,"$&/")+"/"),U(he,ee,z,"",function(qe){return qe})):he!=null&&(R(he)&&(he=D(he,z+(!he.key||Te&&Te.key===he.key?"":(""+he.key).replace(M,"$&/")+"/")+O)),ee.push(he)),1;if(Te=0,me=me===""?".":me+":",P(O))for(var Ae=0;Ae<O.length;Ae++){ke=O[Ae];var Ce=me+J(ke,Ae);Te+=U(ke,ee,z,Ce,he)}else if(Ce=y(O),typeof Ce=="function")for(O=Ce.call(O),Ae=0;!(ke=O.next()).done;)ke=ke.value,Ce=me+J(ke,Ae++),Te+=U(ke,ee,z,Ce,he);else if(ke==="object")throw ee=String(O),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Te}function G(O,ee,z){if(O==null)return O;var me=[],he=0;return U(O,me,"","",function(ke){return ee.call(z,ke,he++)}),me}function ue(O){if(O._status===-1){var ee=O._result;ee=ee(),ee.then(function(z){(O._status===0||O._status===-1)&&(O._status=1,O._result=z)},function(z){(O._status===0||O._status===-1)&&(O._status=2,O._result=z)}),O._status===-1&&(O._status=0,O._result=ee)}if(O._status===1)return O._result.default;throw O._result}var V={current:null},H={transition:null},ne={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:H,ReactCurrentOwner:T};function A(){throw Error("act(...) is not supported in production builds of React.")}return Me.Children={map:G,forEach:function(O,ee,z){G(O,function(){ee.apply(this,arguments)},z)},count:function(O){var ee=0;return G(O,function(){ee++}),ee},toArray:function(O){return G(O,function(ee){return ee})||[]},only:function(O){if(!R(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Me.Component=N,Me.Fragment=s,Me.Profiler=a,Me.PureComponent=S,Me.StrictMode=r,Me.Suspense=d,Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Me.act=A,Me.cloneElement=function(O,ee,z){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var me=v({},O.props),he=O.key,ke=O.ref,Te=O._owner;if(ee!=null){if(ee.ref!==void 0&&(ke=ee.ref,Te=T.current),ee.key!==void 0&&(he=""+ee.key),O.type&&O.type.defaultProps)var Ae=O.type.defaultProps;for(Ce in ee)B.call(ee,Ce)&&!_.hasOwnProperty(Ce)&&(me[Ce]=ee[Ce]===void 0&&Ae!==void 0?Ae[Ce]:ee[Ce])}var Ce=arguments.length-2;if(Ce===1)me.children=z;else if(1<Ce){Ae=Array(Ce);for(var qe=0;qe<Ce;qe++)Ae[qe]=arguments[qe+2];me.children=Ae}return{$$typeof:e,type:O.type,key:he,ref:ke,props:me,_owner:Te}},Me.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:o,_context:O},O.Consumer=O},Me.createElement=I,Me.createFactory=function(O){var ee=I.bind(null,O);return ee.type=O,ee},Me.createRef=function(){return{current:null}},Me.forwardRef=function(O){return{$$typeof:u,render:O}},Me.isValidElement=R,Me.lazy=function(O){return{$$typeof:f,_payload:{_status:-1,_result:O},_init:ue}},Me.memo=function(O,ee){return{$$typeof:p,type:O,compare:ee===void 0?null:ee}},Me.startTransition=function(O){var ee=H.transition;H.transition={};try{O()}finally{H.transition=ee}},Me.unstable_act=A,Me.useCallback=function(O,ee){return V.current.useCallback(O,ee)},Me.useContext=function(O){return V.current.useContext(O)},Me.useDebugValue=function(){},Me.useDeferredValue=function(O){return V.current.useDeferredValue(O)},Me.useEffect=function(O,ee){return V.current.useEffect(O,ee)},Me.useId=function(){return V.current.useId()},Me.useImperativeHandle=function(O,ee,z){return V.current.useImperativeHandle(O,ee,z)},Me.useInsertionEffect=function(O,ee){return V.current.useInsertionEffect(O,ee)},Me.useLayoutEffect=function(O,ee){return V.current.useLayoutEffect(O,ee)},Me.useMemo=function(O,ee){return V.current.useMemo(O,ee)},Me.useReducer=function(O,ee,z){return V.current.useReducer(O,ee,z)},Me.useRef=function(O){return V.current.useRef(O)},Me.useState=function(O){return V.current.useState(O)},Me.useSyncExternalStore=function(O,ee,z){return V.current.useSyncExternalStore(O,ee,z)},Me.useTransition=function(){return V.current.useTransition()},Me.version="18.3.1",Me}var rg;function yo(){return rg||(rg=1,th.exports=p4()),th.exports}/**
|
|
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 ig;function f4(){if(ig)return Aa;ig=1;var e=yo(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var f,m={},y=null,x=null;p!==void 0&&(y=""+p),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(x=d.ref);for(f in d)r.call(d,f)&&!o.hasOwnProperty(f)&&(m[f]=d[f]);if(u&&u.defaultProps)for(f in d=u.defaultProps,d)m[f]===void 0&&(m[f]=d[f]);return{$$typeof:n,type:u,key:y,ref:x,props:m,_owner:a.current}}return Aa.Fragment=s,Aa.jsx=c,Aa.jsxs=c,Aa}var ag;function m4(){return ag||(ag=1,eh.exports=f4()),eh.exports}var t=m4(),C=yo();const Ya=Qp(C);var Ul={},nh={exports:{}},Kt={},sh={exports:{}},rh={};/**
|
|
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
|
+
*/var og;function g4(){return og||(og=1,(function(e){function n(H,ne){var A=H.length;H.push(ne);e:for(;0<A;){var O=A-1>>>1,ee=H[O];if(0<a(ee,ne))H[O]=ne,H[A]=ee,A=O;else break e}}function s(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ne=H[0],A=H.pop();if(A!==ne){H[0]=A;e:for(var O=0,ee=H.length,z=ee>>>1;O<z;){var me=2*(O+1)-1,he=H[me],ke=me+1,Te=H[ke];if(0>a(he,A))ke<ee&&0>a(Te,he)?(H[O]=Te,H[ke]=A,O=ke):(H[O]=he,H[me]=A,O=me);else if(ke<ee&&0>a(Te,A))H[O]=Te,H[ke]=A,O=ke;else break e}}return ne}function a(H,ne){var A=H.sortIndex-ne.sortIndex;return A!==0?A:H.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var d=[],p=[],f=1,m=null,y=3,x=!1,v=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var ne=s(p);ne!==null;){if(ne.callback===null)r(p);else if(ne.startTime<=H)r(p),ne.sortIndex=ne.expirationTime,n(d,ne);else break;ne=s(p)}}function P(H){if(k=!1,E(H),!v)if(s(d)!==null)v=!0,ue(B);else{var ne=s(p);ne!==null&&V(P,ne.startTime-H)}}function B(H,ne){v=!1,k&&(k=!1,w(I),I=-1),x=!0;var A=y;try{for(E(ne),m=s(d);m!==null&&(!(m.expirationTime>ne)||H&&!F());){var O=m.callback;if(typeof O=="function"){m.callback=null,y=m.priorityLevel;var ee=O(m.expirationTime<=ne);ne=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===s(d)&&r(d),E(ne)}else r(d);m=s(d)}if(m!==null)var z=!0;else{var me=s(p);me!==null&&V(P,me.startTime-ne),z=!1}return z}finally{m=null,y=A,x=!1}}var T=!1,_=null,I=-1,D=5,R=-1;function F(){return!(e.unstable_now()-R<D)}function M(){if(_!==null){var H=e.unstable_now();R=H;var ne=!0;try{ne=_(!0,H)}finally{ne?J():(T=!1,_=null)}}else T=!1}var J;if(typeof S=="function")J=function(){S(M)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,G=U.port2;U.port1.onmessage=M,J=function(){G.postMessage(null)}}else J=function(){N(M,0)};function ue(H){_=H,T||(T=!0,J())}function V(H,ne){I=N(function(){H(e.unstable_now())},ne)}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(H){H.callback=null},e.unstable_continueExecution=function(){v||x||(v=!0,ue(B))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return s(d)},e.unstable_next=function(H){switch(y){case 1:case 2:case 3:var ne=3;break;default:ne=y}var A=y;y=ne;try{return H()}finally{y=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ne){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var A=y;y=H;try{return ne()}finally{y=A}},e.unstable_scheduleCallback=function(H,ne,A){var O=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?O+A:O):A=O,H){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=A+ee,H={id:f++,callback:ne,priorityLevel:H,startTime:A,expirationTime:ee,sortIndex:-1},A>O?(H.sortIndex=A,n(p,H),s(d)===null&&H===s(p)&&(k?(w(I),I=-1):k=!0,V(P,A-O))):(H.sortIndex=ee,n(d,H),v||x||(v=!0,ue(B))),H},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(H){var ne=y;return function(){var A=y;y=ne;try{return H.apply(this,arguments)}finally{y=A}}}})(rh)),rh}var lg;function x4(){return lg||(lg=1,sh.exports=g4()),sh.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 cg;function y4(){if(cg)return Kt;cg=1;var e=yo(),n=x4();function s(i){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+i,h=1;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h]);return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function o(i,l){c(i,l),c(i+"Capture",l)}function c(i,l){for(a[i]=l,i=0;i<l.length;i++)r.add(l[i])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[: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]*$/,f={},m={};function y(i){return d.call(m,i)?!0:d.call(f,i)?!1:p.test(i)?m[i]=!0:(f[i]=!0,!1)}function x(i,l,h,g){if(h!==null&&h.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:h!==null?!h.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function v(i,l,h,g){if(l===null||typeof l>"u"||x(i,l,h,g))return!0;if(g)return!1;if(h!==null)switch(h.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function k(i,l,h,g,j,b,$){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=j,this.mustUseProperty=h,this.propertyName=i,this.type=l,this.sanitizeURL=b,this.removeEmptyString=$}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var l=i[0];N[l]=new k(l,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[i]=new k(i,2,!1,i,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(i){N[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function S(i){return i[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(i){var l=i.replace(w,S);N[l]=new k(l,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var l=i.replace(w,S);N[l]=new k(l,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var l=i.replace(w,S);N[l]=new k(l,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function E(i,l,h,g){var j=N.hasOwnProperty(l)?N[l]:null;(j!==null?j.type!==0:g||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(v(l,h,j,g)&&(h=null),g||j===null?y(l)&&(h===null?i.removeAttribute(l):i.setAttribute(l,""+h)):j.mustUseProperty?i[j.propertyName]=h===null?j.type===3?!1:"":h:(l=j.attributeName,g=j.attributeNamespace,h===null?i.removeAttribute(l):(j=j.type,h=j===3||j===4&&h===!0?"":""+h,g?i.setAttributeNS(g,l,h):i.setAttribute(l,h))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),T=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),F=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),H=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var A=Object.assign,O;function ee(i){if(O===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);O=l&&l[1]||""}return`
|
|
34
|
+
`+O+i}var z=!1;function me(i,l){if(!i||z)return"";z=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(Z){var g=Z}Reflect.construct(i,[],l)}else{try{l.call()}catch(Z){g=Z}i.call(l.prototype)}else{try{throw Error()}catch(Z){g=Z}i()}}catch(Z){if(Z&&g&&typeof Z.stack=="string"){for(var j=Z.stack.split(`
|
|
35
|
+
`),b=g.stack.split(`
|
|
36
|
+
`),$=j.length-1,L=b.length-1;1<=$&&0<=L&&j[$]!==b[L];)L--;for(;1<=$&&0<=L;$--,L--)if(j[$]!==b[L]){if($!==1||L!==1)do if($--,L--,0>L||j[$]!==b[L]){var q=`
|
|
37
|
+
`+j[$].replace(" at new "," at ");return i.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",i.displayName)),q}while(1<=$&&0<=L);break}}}finally{z=!1,Error.prepareStackTrace=h}return(i=i?i.displayName||i.name:"")?ee(i):""}function he(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=me(i.type,!1),i;case 11:return i=me(i.type.render,!1),i;case 1:return i=me(i.type,!0),i;default:return""}}function ke(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case T:return"Portal";case D:return"Profiler";case I:return"StrictMode";case J:return"Suspense";case U:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case F:return(i.displayName||"Context")+".Consumer";case R:return(i._context.displayName||"Context")+".Provider";case M:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case G:return l=i.displayName||null,l!==null?l:ke(i.type)||"Memo";case ue:l=i._payload,i=i._init;try{return ke(i(l))}catch{}}return null}function Te(i){var l=i.type;switch(i.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=l.render,i=i.displayName||i.name||"",l.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(l);case 8:return l===I?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Ae(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ce(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function qe(i){var l=Ce(i)?"checked":"value",h=Object.getOwnPropertyDescriptor(i.constructor.prototype,l),g=""+i[l];if(!i.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var j=h.get,b=h.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return j.call(this)},set:function($){g=""+$,b.call(this,$)}}),Object.defineProperty(i,l,{enumerable:h.enumerable}),{getValue:function(){return g},setValue:function($){g=""+$},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function ct(i){i._valueTracker||(i._valueTracker=qe(i))}function Ot(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var h=l.getValue(),g="";return i&&(g=Ce(i)?i.checked?"true":"false":i.value),i=g,i!==h?(l.setValue(i),!0):!1}function tn(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Wn(i,l){var h=l.checked;return A({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??i._wrapperState.initialChecked})}function qt(i,l){var h=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;h=Ae(l.value!=null?l.value:h),i._wrapperState={initialChecked:g,initialValue:h,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Pn(i,l){l=l.checked,l!=null&&E(i,"checked",l,!1)}function xn(i,l){Pn(i,l);var h=Ae(l.value),g=l.type;if(h!=null)g==="number"?(h===0&&i.value===""||i.value!=h)&&(i.value=""+h):i.value!==""+h&&(i.value=""+h);else if(g==="submit"||g==="reset"){i.removeAttribute("value");return}l.hasOwnProperty("value")?Dt(i,l.type,h):l.hasOwnProperty("defaultValue")&&Dt(i,l.type,Ae(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(i.defaultChecked=!!l.defaultChecked)}function nn(i,l,h){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+i._wrapperState.initialValue,h||l===i.value||(i.value=l),i.defaultValue=l}h=i.name,h!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,h!==""&&(i.name=h)}function Dt(i,l,h){(l!=="number"||tn(i.ownerDocument)!==i)&&(h==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+h&&(i.defaultValue=""+h))}var mt=Array.isArray;function yn(i,l,h,g){if(i=i.options,l){l={};for(var j=0;j<h.length;j++)l["$"+h[j]]=!0;for(h=0;h<i.length;h++)j=l.hasOwnProperty("$"+i[h].value),i[h].selected!==j&&(i[h].selected=j),j&&g&&(i[h].defaultSelected=!0)}else{for(h=""+Ae(h),l=null,j=0;j<i.length;j++){if(i[j].value===h){i[j].selected=!0,g&&(i[j].defaultSelected=!0);return}l!==null||i[j].disabled||(l=i[j])}l!==null&&(l.selected=!0)}}function Rn(i,l){if(l.dangerouslySetInnerHTML!=null)throw Error(s(91));return A({},l,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Rs(i,l){var h=l.value;if(h==null){if(h=l.children,l=l.defaultValue,h!=null){if(l!=null)throw Error(s(92));if(mt(h)){if(1<h.length)throw Error(s(93));h=h[0]}l=h}l==null&&(l=""),h=l}i._wrapperState={initialValue:Ae(h)}}function us(i,l){var h=Ae(l.value),g=Ae(l.defaultValue);h!=null&&(h=""+h,h!==i.value&&(i.value=h),l.defaultValue==null&&i.defaultValue!==h&&(i.defaultValue=h)),g!=null&&(i.defaultValue=""+g)}function Ue(i){var l=i.textContent;l===i._wrapperState.initialValue&&l!==""&&l!==null&&(i.value=l)}function X(i){switch(i){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 le(i,l){return i==null||i==="http://www.w3.org/1999/xhtml"?X(l):i==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Q,je=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,h,g,j){MSApp.execUnsafeLocalFunction(function(){return i(l,h,g,j)})}:i})(function(i,l){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=l;else{for(Q=Q||document.createElement("div"),Q.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Q.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;l.firstChild;)i.appendChild(l.firstChild)}});function Ie(i,l){if(l){var h=i.firstChild;if(h&&h===i.lastChild&&h.nodeType===3){h.nodeValue=l;return}}i.textContent=l}var Ve={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},ht=["Webkit","ms","Moz","O"];Object.keys(Ve).forEach(function(i){ht.forEach(function(l){l=l+i.charAt(0).toUpperCase()+i.substring(1),Ve[l]=Ve[i]})});function kn(i,l,h){return l==null||typeof l=="boolean"||l===""?"":h||typeof l!="number"||l===0||Ve.hasOwnProperty(i)&&Ve[i]?(""+l).trim():l+"px"}function Is(i,l){i=i.style;for(var h in l)if(l.hasOwnProperty(h)){var g=h.indexOf("--")===0,j=kn(h,l[h],g);h==="float"&&(h="cssFloat"),g?i.setProperty(h,j):i[h]=j}}var ur=A({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 vt(i,l){if(l){if(ur[i]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(s(137,i));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(s(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(s(61))}if(l.style!=null&&typeof l.style!="object")throw Error(s(62))}}function Hn(i,l){if(i.indexOf("-")===-1)return typeof l.is=="string";switch(i){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 sn=null;function mu(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var gu=null,Qr=null,Gr=null;function vm(i){if(i=ma(i)){if(typeof gu!="function")throw Error(s(280));var l=i.stateNode;l&&(l=rl(l),gu(i.stateNode,i.type,l))}}function jm(i){Qr?Gr?Gr.push(i):Gr=[i]:Qr=i}function bm(){if(Qr){var i=Qr,l=Gr;if(Gr=Qr=null,vm(i),l)for(i=0;i<l.length;i++)vm(l[i])}}function wm(i,l){return i(l)}function Nm(){}var xu=!1;function Sm(i,l,h){if(xu)return i(l,h);xu=!0;try{return wm(i,l,h)}finally{xu=!1,(Qr!==null||Gr!==null)&&(Nm(),bm())}}function Yi(i,l){var h=i.stateNode;if(h===null)return null;var g=rl(h);if(g===null)return null;h=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(i=i.type,g=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!g;break e;default:i=!1}if(i)return null;if(h&&typeof h!="function")throw Error(s(231,l,typeof h));return h}var yu=!1;if(u)try{var Qi={};Object.defineProperty(Qi,"passive",{get:function(){yu=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{yu=!1}function k3(i,l,h,g,j,b,$,L,q){var Z=Array.prototype.slice.call(arguments,3);try{l.apply(h,Z)}catch(re){this.onError(re)}}var Gi=!1,Fo=null,Lo=!1,ku=null,v3={onError:function(i){Gi=!0,Fo=i}};function j3(i,l,h,g,j,b,$,L,q){Gi=!1,Fo=null,k3.apply(v3,arguments)}function b3(i,l,h,g,j,b,$,L,q){if(j3.apply(this,arguments),Gi){if(Gi){var Z=Fo;Gi=!1,Fo=null}else throw Error(s(198));Lo||(Lo=!0,ku=Z)}}function dr(i){var l=i,h=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(h=l.return),i=l.return;while(i)}return l.tag===3?h:null}function Cm(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function $m(i){if(dr(i)!==i)throw Error(s(188))}function w3(i){var l=i.alternate;if(!l){if(l=dr(i),l===null)throw Error(s(188));return l!==i?null:i}for(var h=i,g=l;;){var j=h.return;if(j===null)break;var b=j.alternate;if(b===null){if(g=j.return,g!==null){h=g;continue}break}if(j.child===b.child){for(b=j.child;b;){if(b===h)return $m(j),i;if(b===g)return $m(j),l;b=b.sibling}throw Error(s(188))}if(h.return!==g.return)h=j,g=b;else{for(var $=!1,L=j.child;L;){if(L===h){$=!0,h=j,g=b;break}if(L===g){$=!0,g=j,h=b;break}L=L.sibling}if(!$){for(L=b.child;L;){if(L===h){$=!0,h=b,g=j;break}if(L===g){$=!0,g=b,h=j;break}L=L.sibling}if(!$)throw Error(s(189))}}if(h.alternate!==g)throw Error(s(190))}if(h.tag!==3)throw Error(s(188));return h.stateNode.current===h?i:l}function Em(i){return i=w3(i),i!==null?Tm(i):null}function Tm(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var l=Tm(i);if(l!==null)return l;i=i.sibling}return null}var Am=n.unstable_scheduleCallback,Pm=n.unstable_cancelCallback,N3=n.unstable_shouldYield,S3=n.unstable_requestPaint,ot=n.unstable_now,C3=n.unstable_getCurrentPriorityLevel,vu=n.unstable_ImmediatePriority,Rm=n.unstable_UserBlockingPriority,_o=n.unstable_NormalPriority,$3=n.unstable_LowPriority,Im=n.unstable_IdlePriority,Oo=null,Vn=null;function E3(i){if(Vn&&typeof Vn.onCommitFiberRoot=="function")try{Vn.onCommitFiberRoot(Oo,i,void 0,(i.current.flags&128)===128)}catch{}}var In=Math.clz32?Math.clz32:P3,T3=Math.log,A3=Math.LN2;function P3(i){return i>>>=0,i===0?32:31-(T3(i)/A3|0)|0}var qo=64,Do=4194304;function Zi(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Bo(i,l){var h=i.pendingLanes;if(h===0)return 0;var g=0,j=i.suspendedLanes,b=i.pingedLanes,$=h&268435455;if($!==0){var L=$&~j;L!==0?g=Zi(L):(b&=$,b!==0&&(g=Zi(b)))}else $=h&~j,$!==0?g=Zi($):b!==0&&(g=Zi(b));if(g===0)return 0;if(l!==0&&l!==g&&(l&j)===0&&(j=g&-g,b=l&-l,j>=b||j===16&&(b&4194240)!==0))return l;if((g&4)!==0&&(g|=h&16),l=i.entangledLanes,l!==0)for(i=i.entanglements,l&=g;0<l;)h=31-In(l),j=1<<h,g|=i[h],l&=~j;return g}function R3(i,l){switch(i){case 1:case 2:case 4:return l+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 l+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 I3(i,l){for(var h=i.suspendedLanes,g=i.pingedLanes,j=i.expirationTimes,b=i.pendingLanes;0<b;){var $=31-In(b),L=1<<$,q=j[$];q===-1?((L&h)===0||(L&g)!==0)&&(j[$]=R3(L,l)):q<=l&&(i.expiredLanes|=L),b&=~L}}function ju(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function zm(){var i=qo;return qo<<=1,(qo&4194240)===0&&(qo=64),i}function bu(i){for(var l=[],h=0;31>h;h++)l.push(i);return l}function Xi(i,l,h){i.pendingLanes|=l,l!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,l=31-In(l),i[l]=h}function z3(i,l){var h=i.pendingLanes&~l;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=l,i.mutableReadLanes&=l,i.entangledLanes&=l,l=i.entanglements;var g=i.eventTimes;for(i=i.expirationTimes;0<h;){var j=31-In(h),b=1<<j;l[j]=0,g[j]=-1,i[j]=-1,h&=~b}}function wu(i,l){var h=i.entangledLanes|=l;for(i=i.entanglements;h;){var g=31-In(h),j=1<<g;j&l|i[g]&l&&(i[g]|=l),h&=~j}}var He=0;function Mm(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Fm,Nu,Lm,_m,Om,Su=!1,Uo=[],zs=null,Ms=null,Fs=null,Ji=new Map,ea=new Map,Ls=[],M3="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 qm(i,l){switch(i){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Ms=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":Ji.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ea.delete(l.pointerId)}}function ta(i,l,h,g,j,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:h,eventSystemFlags:g,nativeEvent:b,targetContainers:[j]},l!==null&&(l=ma(l),l!==null&&Nu(l)),i):(i.eventSystemFlags|=g,l=i.targetContainers,j!==null&&l.indexOf(j)===-1&&l.push(j),i)}function F3(i,l,h,g,j){switch(l){case"focusin":return zs=ta(zs,i,l,h,g,j),!0;case"dragenter":return Ms=ta(Ms,i,l,h,g,j),!0;case"mouseover":return Fs=ta(Fs,i,l,h,g,j),!0;case"pointerover":var b=j.pointerId;return Ji.set(b,ta(Ji.get(b)||null,i,l,h,g,j)),!0;case"gotpointercapture":return b=j.pointerId,ea.set(b,ta(ea.get(b)||null,i,l,h,g,j)),!0}return!1}function Dm(i){var l=hr(i.target);if(l!==null){var h=dr(l);if(h!==null){if(l=h.tag,l===13){if(l=Cm(h),l!==null){i.blockedOn=l,Om(i.priority,function(){Lm(h)});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){i.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Wo(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var h=$u(i.domEventName,i.eventSystemFlags,l[0],i.nativeEvent);if(h===null){h=i.nativeEvent;var g=new h.constructor(h.type,h);sn=g,h.target.dispatchEvent(g),sn=null}else return l=ma(h),l!==null&&Nu(l),i.blockedOn=h,!1;l.shift()}return!0}function Bm(i,l,h){Wo(i)&&h.delete(l)}function L3(){Su=!1,zs!==null&&Wo(zs)&&(zs=null),Ms!==null&&Wo(Ms)&&(Ms=null),Fs!==null&&Wo(Fs)&&(Fs=null),Ji.forEach(Bm),ea.forEach(Bm)}function na(i,l){i.blockedOn===l&&(i.blockedOn=null,Su||(Su=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,L3)))}function sa(i){function l(j){return na(j,i)}if(0<Uo.length){na(Uo[0],i);for(var h=1;h<Uo.length;h++){var g=Uo[h];g.blockedOn===i&&(g.blockedOn=null)}}for(zs!==null&&na(zs,i),Ms!==null&&na(Ms,i),Fs!==null&&na(Fs,i),Ji.forEach(l),ea.forEach(l),h=0;h<Ls.length;h++)g=Ls[h],g.blockedOn===i&&(g.blockedOn=null);for(;0<Ls.length&&(h=Ls[0],h.blockedOn===null);)Dm(h),h.blockedOn===null&&Ls.shift()}var Zr=P.ReactCurrentBatchConfig,Ho=!0;function _3(i,l,h,g){var j=He,b=Zr.transition;Zr.transition=null;try{He=1,Cu(i,l,h,g)}finally{He=j,Zr.transition=b}}function O3(i,l,h,g){var j=He,b=Zr.transition;Zr.transition=null;try{He=4,Cu(i,l,h,g)}finally{He=j,Zr.transition=b}}function Cu(i,l,h,g){if(Ho){var j=$u(i,l,h,g);if(j===null)Wu(i,l,g,Vo,h),qm(i,g);else if(F3(j,i,l,h,g))g.stopPropagation();else if(qm(i,g),l&4&&-1<M3.indexOf(i)){for(;j!==null;){var b=ma(j);if(b!==null&&Fm(b),b=$u(i,l,h,g),b===null&&Wu(i,l,g,Vo,h),b===j)break;j=b}j!==null&&g.stopPropagation()}else Wu(i,l,g,null,h)}}var Vo=null;function $u(i,l,h,g){if(Vo=null,i=mu(g),i=hr(i),i!==null)if(l=dr(i),l===null)i=null;else if(h=l.tag,h===13){if(i=Cm(l),i!==null)return i;i=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null);return Vo=i,null}function Um(i){switch(i){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(C3()){case vu:return 1;case Rm:return 4;case _o:case $3:return 16;case Im:return 536870912;default:return 16}default:return 16}}var _s=null,Eu=null,Ko=null;function Wm(){if(Ko)return Ko;var i,l=Eu,h=l.length,g,j="value"in _s?_s.value:_s.textContent,b=j.length;for(i=0;i<h&&l[i]===j[i];i++);var $=h-i;for(g=1;g<=$&&l[h-g]===j[b-g];g++);return Ko=j.slice(i,1<g?1-g:void 0)}function Yo(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function Qo(){return!0}function Hm(){return!1}function rn(i){function l(h,g,j,b,$){this._reactName=h,this._targetInst=j,this.type=g,this.nativeEvent=b,this.target=$,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(h=i[L],this[L]=h?h(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Qo:Hm,this.isPropagationStopped=Hm,this}return A(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=Qo)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=Qo)},persist:function(){},isPersistent:Qo}),l}var Xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=rn(Xr),ra=A({},Xr,{view:0,detail:0}),q3=rn(ra),Au,Pu,ia,Go=A({},ra,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==ia&&(ia&&i.type==="mousemove"?(Au=i.screenX-ia.screenX,Pu=i.screenY-ia.screenY):Pu=Au=0,ia=i),Au)},movementY:function(i){return"movementY"in i?i.movementY:Pu}}),Vm=rn(Go),D3=A({},Go,{dataTransfer:0}),B3=rn(D3),U3=A({},ra,{relatedTarget:0}),Ru=rn(U3),W3=A({},Xr,{animationName:0,elapsedTime:0,pseudoElement:0}),H3=rn(W3),V3=A({},Xr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),K3=rn(V3),Y3=A({},Xr,{data:0}),Km=rn(Y3),Q3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G3={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"},Z3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X3(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=Z3[i])?!!l[i]:!1}function Iu(){return X3}var J3=A({},ra,{key:function(i){if(i.key){var l=Q3[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Yo(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?G3[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(i){return i.type==="keypress"?Yo(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yo(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),eb=rn(J3),tb=A({},Go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ym=rn(tb),nb=A({},ra,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),sb=rn(nb),rb=A({},Xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ib=rn(rb),ab=A({},Go,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),ob=rn(ab),lb=[9,13,27,32],zu=u&&"CompositionEvent"in window,aa=null;u&&"documentMode"in document&&(aa=document.documentMode);var cb=u&&"TextEvent"in window&&!aa,Qm=u&&(!zu||aa&&8<aa&&11>=aa),Gm=" ",Zm=!1;function Xm(i,l){switch(i){case"keyup":return lb.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jm(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Jr=!1;function ub(i,l){switch(i){case"compositionend":return Jm(l);case"keypress":return l.which!==32?null:(Zm=!0,Gm);case"textInput":return i=l.data,i===Gm&&Zm?null:i;default:return null}}function db(i,l){if(Jr)return i==="compositionend"||!zu&&Xm(i,l)?(i=Wm(),Ko=Eu=_s=null,Jr=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Qm&&l.locale!=="ko"?null:l.data;default:return null}}var hb={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 e1(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!hb[i.type]:l==="textarea"}function t1(i,l,h,g){jm(g),l=tl(l,"onChange"),0<l.length&&(h=new Tu("onChange","change",null,h,g),i.push({event:h,listeners:l}))}var oa=null,la=null;function pb(i){k1(i,0)}function Zo(i){var l=ri(i);if(Ot(l))return i}function fb(i,l){if(i==="change")return l}var n1=!1;if(u){var Mu;if(u){var Fu="oninput"in document;if(!Fu){var s1=document.createElement("div");s1.setAttribute("oninput","return;"),Fu=typeof s1.oninput=="function"}Mu=Fu}else Mu=!1;n1=Mu&&(!document.documentMode||9<document.documentMode)}function r1(){oa&&(oa.detachEvent("onpropertychange",i1),la=oa=null)}function i1(i){if(i.propertyName==="value"&&Zo(la)){var l=[];t1(l,la,i,mu(i)),Sm(pb,l)}}function mb(i,l,h){i==="focusin"?(r1(),oa=l,la=h,oa.attachEvent("onpropertychange",i1)):i==="focusout"&&r1()}function gb(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Zo(la)}function xb(i,l){if(i==="click")return Zo(l)}function yb(i,l){if(i==="input"||i==="change")return Zo(l)}function kb(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var zn=typeof Object.is=="function"?Object.is:kb;function ca(i,l){if(zn(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var h=Object.keys(i),g=Object.keys(l);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var j=h[g];if(!d.call(l,j)||!zn(i[j],l[j]))return!1}return!0}function a1(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function o1(i,l){var h=a1(i);i=0;for(var g;h;){if(h.nodeType===3){if(g=i+h.textContent.length,i<=l&&g>=l)return{node:h,offset:l-i};i=g}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=a1(h)}}function l1(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?l1(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function c1(){for(var i=window,l=tn();l instanceof i.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)i=l.contentWindow;else break;l=tn(i.document)}return l}function Lu(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}function vb(i){var l=c1(),h=i.focusedElem,g=i.selectionRange;if(l!==h&&h&&h.ownerDocument&&l1(h.ownerDocument.documentElement,h)){if(g!==null&&Lu(h)){if(l=g.start,i=g.end,i===void 0&&(i=l),"selectionStart"in h)h.selectionStart=l,h.selectionEnd=Math.min(i,h.value.length);else if(i=(l=h.ownerDocument||document)&&l.defaultView||window,i.getSelection){i=i.getSelection();var j=h.textContent.length,b=Math.min(g.start,j);g=g.end===void 0?b:Math.min(g.end,j),!i.extend&&b>g&&(j=g,g=b,b=j),j=o1(h,b);var $=o1(h,g);j&&$&&(i.rangeCount!==1||i.anchorNode!==j.node||i.anchorOffset!==j.offset||i.focusNode!==$.node||i.focusOffset!==$.offset)&&(l=l.createRange(),l.setStart(j.node,j.offset),i.removeAllRanges(),b>g?(i.addRange(l),i.extend($.node,$.offset)):(l.setEnd($.node,$.offset),i.addRange(l)))}}for(l=[],i=h;i=i.parentNode;)i.nodeType===1&&l.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<l.length;h++)i=l[h],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var jb=u&&"documentMode"in document&&11>=document.documentMode,ei=null,_u=null,ua=null,Ou=!1;function u1(i,l,h){var g=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Ou||ei==null||ei!==tn(g)||(g=ei,"selectionStart"in g&&Lu(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ua&&ca(ua,g)||(ua=g,g=tl(_u,"onSelect"),0<g.length&&(l=new Tu("onSelect","select",null,l,h),i.push({event:l,listeners:g}),l.target=ei)))}function Xo(i,l){var h={};return h[i.toLowerCase()]=l.toLowerCase(),h["Webkit"+i]="webkit"+l,h["Moz"+i]="moz"+l,h}var ti={animationend:Xo("Animation","AnimationEnd"),animationiteration:Xo("Animation","AnimationIteration"),animationstart:Xo("Animation","AnimationStart"),transitionend:Xo("Transition","TransitionEnd")},qu={},d1={};u&&(d1=document.createElement("div").style,"AnimationEvent"in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),"TransitionEvent"in window||delete ti.transitionend.transition);function Jo(i){if(qu[i])return qu[i];if(!ti[i])return i;var l=ti[i],h;for(h in l)if(l.hasOwnProperty(h)&&h in d1)return qu[i]=l[h];return i}var h1=Jo("animationend"),p1=Jo("animationiteration"),f1=Jo("animationstart"),m1=Jo("transitionend"),g1=new Map,x1="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 Os(i,l){g1.set(i,l),o(l,[i])}for(var Du=0;Du<x1.length;Du++){var Bu=x1[Du],bb=Bu.toLowerCase(),wb=Bu[0].toUpperCase()+Bu.slice(1);Os(bb,"on"+wb)}Os(h1,"onAnimationEnd"),Os(p1,"onAnimationIteration"),Os(f1,"onAnimationStart"),Os("dblclick","onDoubleClick"),Os("focusin","onFocus"),Os("focusout","onBlur"),Os(m1,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var da="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(" "),Nb=new Set("cancel close invalid load scroll toggle".split(" ").concat(da));function y1(i,l,h){var g=i.type||"unknown-event";i.currentTarget=h,b3(g,l,void 0,i),i.currentTarget=null}function k1(i,l){l=(l&4)!==0;for(var h=0;h<i.length;h++){var g=i[h],j=g.event;g=g.listeners;e:{var b=void 0;if(l)for(var $=g.length-1;0<=$;$--){var L=g[$],q=L.instance,Z=L.currentTarget;if(L=L.listener,q!==b&&j.isPropagationStopped())break e;y1(j,L,Z),b=q}else for($=0;$<g.length;$++){if(L=g[$],q=L.instance,Z=L.currentTarget,L=L.listener,q!==b&&j.isPropagationStopped())break e;y1(j,L,Z),b=q}}}if(Lo)throw i=ku,Lo=!1,ku=null,i}function Xe(i,l){var h=l[Gu];h===void 0&&(h=l[Gu]=new Set);var g=i+"__bubble";h.has(g)||(v1(l,i,2,!1),h.add(g))}function Uu(i,l,h){var g=0;l&&(g|=4),v1(h,i,g,l)}var el="_reactListening"+Math.random().toString(36).slice(2);function ha(i){if(!i[el]){i[el]=!0,r.forEach(function(h){h!=="selectionchange"&&(Nb.has(h)||Uu(h,!1,i),Uu(h,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[el]||(l[el]=!0,Uu("selectionchange",!1,l))}}function v1(i,l,h,g){switch(Um(l)){case 1:var j=_3;break;case 4:j=O3;break;default:j=Cu}h=j.bind(null,l,h,i),j=void 0,!yu||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(j=!0),g?j!==void 0?i.addEventListener(l,h,{capture:!0,passive:j}):i.addEventListener(l,h,!0):j!==void 0?i.addEventListener(l,h,{passive:j}):i.addEventListener(l,h,!1)}function Wu(i,l,h,g,j){var b=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var $=g.tag;if($===3||$===4){var L=g.stateNode.containerInfo;if(L===j||L.nodeType===8&&L.parentNode===j)break;if($===4)for($=g.return;$!==null;){var q=$.tag;if((q===3||q===4)&&(q=$.stateNode.containerInfo,q===j||q.nodeType===8&&q.parentNode===j))return;$=$.return}for(;L!==null;){if($=hr(L),$===null)return;if(q=$.tag,q===5||q===6){g=b=$;continue e}L=L.parentNode}}g=g.return}Sm(function(){var Z=b,re=mu(h),ae=[];e:{var se=g1.get(i);if(se!==void 0){var pe=Tu,ye=i;switch(i){case"keypress":if(Yo(h)===0)break e;case"keydown":case"keyup":pe=eb;break;case"focusin":ye="focus",pe=Ru;break;case"focusout":ye="blur",pe=Ru;break;case"beforeblur":case"afterblur":pe=Ru;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=B3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=sb;break;case h1:case p1:case f1:pe=H3;break;case m1:pe=ib;break;case"scroll":pe=q3;break;case"wheel":pe=ob;break;case"copy":case"cut":case"paste":pe=K3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Ym}var ve=(l&4)!==0,lt=!ve&&i==="scroll",K=ve?se!==null?se+"Capture":null:se;ve=[];for(var W=Z,Y;W!==null;){Y=W;var de=Y.stateNode;if(Y.tag===5&&de!==null&&(Y=de,K!==null&&(de=Yi(W,K),de!=null&&ve.push(pa(W,de,Y)))),lt)break;W=W.return}0<ve.length&&(se=new pe(se,ye,null,h,re),ae.push({event:se,listeners:ve}))}}if((l&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",pe=i==="mouseout"||i==="pointerout",se&&h!==sn&&(ye=h.relatedTarget||h.fromElement)&&(hr(ye)||ye[ds]))break e;if((pe||se)&&(se=re.window===re?re:(se=re.ownerDocument)?se.defaultView||se.parentWindow:window,pe?(ye=h.relatedTarget||h.toElement,pe=Z,ye=ye?hr(ye):null,ye!==null&&(lt=dr(ye),ye!==lt||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(pe=null,ye=Z),pe!==ye)){if(ve=Vm,de="onMouseLeave",K="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(ve=Ym,de="onPointerLeave",K="onPointerEnter",W="pointer"),lt=pe==null?se:ri(pe),Y=ye==null?se:ri(ye),se=new ve(de,W+"leave",pe,h,re),se.target=lt,se.relatedTarget=Y,de=null,hr(re)===Z&&(ve=new ve(K,W+"enter",ye,h,re),ve.target=Y,ve.relatedTarget=lt,de=ve),lt=de,pe&&ye)t:{for(ve=pe,K=ye,W=0,Y=ve;Y;Y=ni(Y))W++;for(Y=0,de=K;de;de=ni(de))Y++;for(;0<W-Y;)ve=ni(ve),W--;for(;0<Y-W;)K=ni(K),Y--;for(;W--;){if(ve===K||K!==null&&ve===K.alternate)break t;ve=ni(ve),K=ni(K)}ve=null}else ve=null;pe!==null&&j1(ae,se,pe,ve,!1),ye!==null&<!==null&&j1(ae,lt,ye,ve,!0)}}e:{if(se=Z?ri(Z):window,pe=se.nodeName&&se.nodeName.toLowerCase(),pe==="select"||pe==="input"&&se.type==="file")var be=fb;else if(e1(se))if(n1)be=yb;else{be=gb;var we=mb}else(pe=se.nodeName)&&pe.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(be=xb);if(be&&(be=be(i,Z))){t1(ae,be,h,re);break e}we&&we(i,se,Z),i==="focusout"&&(we=se._wrapperState)&&we.controlled&&se.type==="number"&&Dt(se,"number",se.value)}switch(we=Z?ri(Z):window,i){case"focusin":(e1(we)||we.contentEditable==="true")&&(ei=we,_u=Z,ua=null);break;case"focusout":ua=_u=ei=null;break;case"mousedown":Ou=!0;break;case"contextmenu":case"mouseup":case"dragend":Ou=!1,u1(ae,h,re);break;case"selectionchange":if(jb)break;case"keydown":case"keyup":u1(ae,h,re)}var Ne;if(zu)e:{switch(i){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Jr?Xm(i,h)&&(Re="onCompositionEnd"):i==="keydown"&&h.keyCode===229&&(Re="onCompositionStart");Re&&(Qm&&h.locale!=="ko"&&(Jr||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Jr&&(Ne=Wm()):(_s=re,Eu="value"in _s?_s.value:_s.textContent,Jr=!0)),we=tl(Z,Re),0<we.length&&(Re=new Km(Re,i,null,h,re),ae.push({event:Re,listeners:we}),Ne?Re.data=Ne:(Ne=Jm(h),Ne!==null&&(Re.data=Ne)))),(Ne=cb?ub(i,h):db(i,h))&&(Z=tl(Z,"onBeforeInput"),0<Z.length&&(re=new Km("onBeforeInput","beforeinput",null,h,re),ae.push({event:re,listeners:Z}),re.data=Ne))}k1(ae,l)})}function pa(i,l,h){return{instance:i,listener:l,currentTarget:h}}function tl(i,l){for(var h=l+"Capture",g=[];i!==null;){var j=i,b=j.stateNode;j.tag===5&&b!==null&&(j=b,b=Yi(i,h),b!=null&&g.unshift(pa(i,b,j)),b=Yi(i,l),b!=null&&g.push(pa(i,b,j))),i=i.return}return g}function ni(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function j1(i,l,h,g,j){for(var b=l._reactName,$=[];h!==null&&h!==g;){var L=h,q=L.alternate,Z=L.stateNode;if(q!==null&&q===g)break;L.tag===5&&Z!==null&&(L=Z,j?(q=Yi(h,b),q!=null&&$.unshift(pa(h,q,L))):j||(q=Yi(h,b),q!=null&&$.push(pa(h,q,L)))),h=h.return}$.length!==0&&i.push({event:l,listeners:$})}var Sb=/\r\n?/g,Cb=/\u0000|\uFFFD/g;function b1(i){return(typeof i=="string"?i:""+i).replace(Sb,`
|
|
38
|
+
`).replace(Cb,"")}function nl(i,l,h){if(l=b1(l),b1(i)!==l&&h)throw Error(s(425))}function sl(){}var Hu=null,Vu=null;function Ku(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Yu=typeof setTimeout=="function"?setTimeout:void 0,$b=typeof clearTimeout=="function"?clearTimeout:void 0,w1=typeof Promise=="function"?Promise:void 0,Eb=typeof queueMicrotask=="function"?queueMicrotask:typeof w1<"u"?function(i){return w1.resolve(null).then(i).catch(Tb)}:Yu;function Tb(i){setTimeout(function(){throw i})}function Qu(i,l){var h=l,g=0;do{var j=h.nextSibling;if(i.removeChild(h),j&&j.nodeType===8)if(h=j.data,h==="/$"){if(g===0){i.removeChild(j),sa(l);return}g--}else h!=="$"&&h!=="$?"&&h!=="$!"||g++;h=j}while(h);sa(l)}function qs(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return i}function N1(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var h=i.data;if(h==="$"||h==="$!"||h==="$?"){if(l===0)return i;l--}else h==="/$"&&l++}i=i.previousSibling}return null}var si=Math.random().toString(36).slice(2),Kn="__reactFiber$"+si,fa="__reactProps$"+si,ds="__reactContainer$"+si,Gu="__reactEvents$"+si,Ab="__reactListeners$"+si,Pb="__reactHandles$"+si;function hr(i){var l=i[Kn];if(l)return l;for(var h=i.parentNode;h;){if(l=h[ds]||h[Kn]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(i=N1(i);i!==null;){if(h=i[Kn])return h;i=N1(i)}return l}i=h,h=i.parentNode}return null}function ma(i){return i=i[Kn]||i[ds],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ri(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(s(33))}function rl(i){return i[fa]||null}var Zu=[],ii=-1;function Ds(i){return{current:i}}function Je(i){0>ii||(i.current=Zu[ii],Zu[ii]=null,ii--)}function Qe(i,l){ii++,Zu[ii]=i.current,i.current=l}var Bs={},Ct=Ds(Bs),Bt=Ds(!1),pr=Bs;function ai(i,l){var h=i.type.contextTypes;if(!h)return Bs;var g=i.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var j={},b;for(b in h)j[b]=l[b];return g&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=l,i.__reactInternalMemoizedMaskedChildContext=j),j}function Ut(i){return i=i.childContextTypes,i!=null}function il(){Je(Bt),Je(Ct)}function S1(i,l,h){if(Ct.current!==Bs)throw Error(s(168));Qe(Ct,l),Qe(Bt,h)}function C1(i,l,h){var g=i.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return h;g=g.getChildContext();for(var j in g)if(!(j in l))throw Error(s(108,Te(i)||"Unknown",j));return A({},h,g)}function al(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bs,pr=Ct.current,Qe(Ct,i),Qe(Bt,Bt.current),!0}function $1(i,l,h){var g=i.stateNode;if(!g)throw Error(s(169));h?(i=C1(i,l,pr),g.__reactInternalMemoizedMergedChildContext=i,Je(Bt),Je(Ct),Qe(Ct,i)):Je(Bt),Qe(Bt,h)}var hs=null,ol=!1,Xu=!1;function E1(i){hs===null?hs=[i]:hs.push(i)}function Rb(i){ol=!0,E1(i)}function Us(){if(!Xu&&hs!==null){Xu=!0;var i=0,l=He;try{var h=hs;for(He=1;i<h.length;i++){var g=h[i];do g=g(!0);while(g!==null)}hs=null,ol=!1}catch(j){throw hs!==null&&(hs=hs.slice(i+1)),Am(vu,Us),j}finally{He=l,Xu=!1}}return null}var oi=[],li=0,ll=null,cl=0,vn=[],jn=0,fr=null,ps=1,fs="";function mr(i,l){oi[li++]=cl,oi[li++]=ll,ll=i,cl=l}function T1(i,l,h){vn[jn++]=ps,vn[jn++]=fs,vn[jn++]=fr,fr=i;var g=ps;i=fs;var j=32-In(g)-1;g&=~(1<<j),h+=1;var b=32-In(l)+j;if(30<b){var $=j-j%5;b=(g&(1<<$)-1).toString(32),g>>=$,j-=$,ps=1<<32-In(l)+j|h<<j|g,fs=b+i}else ps=1<<b|h<<j|g,fs=i}function Ju(i){i.return!==null&&(mr(i,1),T1(i,1,0))}function ed(i){for(;i===ll;)ll=oi[--li],oi[li]=null,cl=oi[--li],oi[li]=null;for(;i===fr;)fr=vn[--jn],vn[jn]=null,fs=vn[--jn],vn[jn]=null,ps=vn[--jn],vn[jn]=null}var an=null,on=null,et=!1,Mn=null;function A1(i,l){var h=Sn(5,null,null,0);h.elementType="DELETED",h.stateNode=l,h.return=i,l=i.deletions,l===null?(i.deletions=[h],i.flags|=16):l.push(h)}function P1(i,l){switch(i.tag){case 5:var h=i.type;return l=l.nodeType!==1||h.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(i.stateNode=l,an=i,on=qs(l.firstChild),!0):!1;case 6:return l=i.pendingProps===""||l.nodeType!==3?null:l,l!==null?(i.stateNode=l,an=i,on=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(h=fr!==null?{id:ps,overflow:fs}:null,i.memoizedState={dehydrated:l,treeContext:h,retryLane:1073741824},h=Sn(18,null,null,0),h.stateNode=l,h.return=i,i.child=h,an=i,on=null,!0):!1;default:return!1}}function td(i){return(i.mode&1)!==0&&(i.flags&128)===0}function nd(i){if(et){var l=on;if(l){var h=l;if(!P1(i,l)){if(td(i))throw Error(s(418));l=qs(h.nextSibling);var g=an;l&&P1(i,l)?A1(g,h):(i.flags=i.flags&-4097|2,et=!1,an=i)}}else{if(td(i))throw Error(s(418));i.flags=i.flags&-4097|2,et=!1,an=i}}}function R1(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;an=i}function ul(i){if(i!==an)return!1;if(!et)return R1(i),et=!0,!1;var l;if((l=i.tag!==3)&&!(l=i.tag!==5)&&(l=i.type,l=l!=="head"&&l!=="body"&&!Ku(i.type,i.memoizedProps)),l&&(l=on)){if(td(i))throw I1(),Error(s(418));for(;l;)A1(i,l),l=qs(l.nextSibling)}if(R1(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));e:{for(i=i.nextSibling,l=0;i;){if(i.nodeType===8){var h=i.data;if(h==="/$"){if(l===0){on=qs(i.nextSibling);break e}l--}else h!=="$"&&h!=="$!"&&h!=="$?"||l++}i=i.nextSibling}on=null}}else on=an?qs(i.stateNode.nextSibling):null;return!0}function I1(){for(var i=on;i;)i=qs(i.nextSibling)}function ci(){on=an=null,et=!1}function sd(i){Mn===null?Mn=[i]:Mn.push(i)}var Ib=P.ReactCurrentBatchConfig;function ga(i,l,h){if(i=h.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(s(309));var g=h.stateNode}if(!g)throw Error(s(147,i));var j=g,b=""+i;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===b?l.ref:(l=function($){var L=j.refs;$===null?delete L[b]:L[b]=$},l._stringRef=b,l)}if(typeof i!="string")throw Error(s(284));if(!h._owner)throw Error(s(290,i))}return i}function dl(i,l){throw i=Object.prototype.toString.call(l),Error(s(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i))}function z1(i){var l=i._init;return l(i._payload)}function M1(i){function l(K,W){if(i){var Y=K.deletions;Y===null?(K.deletions=[W],K.flags|=16):Y.push(W)}}function h(K,W){if(!i)return null;for(;W!==null;)l(K,W),W=W.sibling;return null}function g(K,W){for(K=new Map;W!==null;)W.key!==null?K.set(W.key,W):K.set(W.index,W),W=W.sibling;return K}function j(K,W){return K=Zs(K,W),K.index=0,K.sibling=null,K}function b(K,W,Y){return K.index=Y,i?(Y=K.alternate,Y!==null?(Y=Y.index,Y<W?(K.flags|=2,W):Y):(K.flags|=2,W)):(K.flags|=1048576,W)}function $(K){return i&&K.alternate===null&&(K.flags|=2),K}function L(K,W,Y,de){return W===null||W.tag!==6?(W=Yd(Y,K.mode,de),W.return=K,W):(W=j(W,Y),W.return=K,W)}function q(K,W,Y,de){var be=Y.type;return be===_?re(K,W,Y.props.children,de,Y.key):W!==null&&(W.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ue&&z1(be)===W.type)?(de=j(W,Y.props),de.ref=ga(K,W,Y),de.return=K,de):(de=Ml(Y.type,Y.key,Y.props,null,K.mode,de),de.ref=ga(K,W,Y),de.return=K,de)}function Z(K,W,Y,de){return W===null||W.tag!==4||W.stateNode.containerInfo!==Y.containerInfo||W.stateNode.implementation!==Y.implementation?(W=Qd(Y,K.mode,de),W.return=K,W):(W=j(W,Y.children||[]),W.return=K,W)}function re(K,W,Y,de,be){return W===null||W.tag!==7?(W=wr(Y,K.mode,de,be),W.return=K,W):(W=j(W,Y),W.return=K,W)}function ae(K,W,Y){if(typeof W=="string"&&W!==""||typeof W=="number")return W=Yd(""+W,K.mode,Y),W.return=K,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case B:return Y=Ml(W.type,W.key,W.props,null,K.mode,Y),Y.ref=ga(K,null,W),Y.return=K,Y;case T:return W=Qd(W,K.mode,Y),W.return=K,W;case ue:var de=W._init;return ae(K,de(W._payload),Y)}if(mt(W)||ne(W))return W=wr(W,K.mode,Y,null),W.return=K,W;dl(K,W)}return null}function se(K,W,Y,de){var be=W!==null?W.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return be!==null?null:L(K,W,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case B:return Y.key===be?q(K,W,Y,de):null;case T:return Y.key===be?Z(K,W,Y,de):null;case ue:return be=Y._init,se(K,W,be(Y._payload),de)}if(mt(Y)||ne(Y))return be!==null?null:re(K,W,Y,de,null);dl(K,Y)}return null}function pe(K,W,Y,de,be){if(typeof de=="string"&&de!==""||typeof de=="number")return K=K.get(Y)||null,L(W,K,""+de,be);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case B:return K=K.get(de.key===null?Y:de.key)||null,q(W,K,de,be);case T:return K=K.get(de.key===null?Y:de.key)||null,Z(W,K,de,be);case ue:var we=de._init;return pe(K,W,Y,we(de._payload),be)}if(mt(de)||ne(de))return K=K.get(Y)||null,re(W,K,de,be,null);dl(W,de)}return null}function ye(K,W,Y,de){for(var be=null,we=null,Ne=W,Re=W=0,yt=null;Ne!==null&&Re<Y.length;Re++){Ne.index>Re?(yt=Ne,Ne=null):yt=Ne.sibling;var Be=se(K,Ne,Y[Re],de);if(Be===null){Ne===null&&(Ne=yt);break}i&&Ne&&Be.alternate===null&&l(K,Ne),W=b(Be,W,Re),we===null?be=Be:we.sibling=Be,we=Be,Ne=yt}if(Re===Y.length)return h(K,Ne),et&&mr(K,Re),be;if(Ne===null){for(;Re<Y.length;Re++)Ne=ae(K,Y[Re],de),Ne!==null&&(W=b(Ne,W,Re),we===null?be=Ne:we.sibling=Ne,we=Ne);return et&&mr(K,Re),be}for(Ne=g(K,Ne);Re<Y.length;Re++)yt=pe(Ne,K,Re,Y[Re],de),yt!==null&&(i&&yt.alternate!==null&&Ne.delete(yt.key===null?Re:yt.key),W=b(yt,W,Re),we===null?be=yt:we.sibling=yt,we=yt);return i&&Ne.forEach(function(Xs){return l(K,Xs)}),et&&mr(K,Re),be}function ve(K,W,Y,de){var be=ne(Y);if(typeof be!="function")throw Error(s(150));if(Y=be.call(Y),Y==null)throw Error(s(151));for(var we=be=null,Ne=W,Re=W=0,yt=null,Be=Y.next();Ne!==null&&!Be.done;Re++,Be=Y.next()){Ne.index>Re?(yt=Ne,Ne=null):yt=Ne.sibling;var Xs=se(K,Ne,Be.value,de);if(Xs===null){Ne===null&&(Ne=yt);break}i&&Ne&&Xs.alternate===null&&l(K,Ne),W=b(Xs,W,Re),we===null?be=Xs:we.sibling=Xs,we=Xs,Ne=yt}if(Be.done)return h(K,Ne),et&&mr(K,Re),be;if(Ne===null){for(;!Be.done;Re++,Be=Y.next())Be=ae(K,Be.value,de),Be!==null&&(W=b(Be,W,Re),we===null?be=Be:we.sibling=Be,we=Be);return et&&mr(K,Re),be}for(Ne=g(K,Ne);!Be.done;Re++,Be=Y.next())Be=pe(Ne,K,Re,Be.value,de),Be!==null&&(i&&Be.alternate!==null&&Ne.delete(Be.key===null?Re:Be.key),W=b(Be,W,Re),we===null?be=Be:we.sibling=Be,we=Be);return i&&Ne.forEach(function(h4){return l(K,h4)}),et&&mr(K,Re),be}function lt(K,W,Y,de){if(typeof Y=="object"&&Y!==null&&Y.type===_&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case B:e:{for(var be=Y.key,we=W;we!==null;){if(we.key===be){if(be=Y.type,be===_){if(we.tag===7){h(K,we.sibling),W=j(we,Y.props.children),W.return=K,K=W;break e}}else if(we.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ue&&z1(be)===we.type){h(K,we.sibling),W=j(we,Y.props),W.ref=ga(K,we,Y),W.return=K,K=W;break e}h(K,we);break}else l(K,we);we=we.sibling}Y.type===_?(W=wr(Y.props.children,K.mode,de,Y.key),W.return=K,K=W):(de=Ml(Y.type,Y.key,Y.props,null,K.mode,de),de.ref=ga(K,W,Y),de.return=K,K=de)}return $(K);case T:e:{for(we=Y.key;W!==null;){if(W.key===we)if(W.tag===4&&W.stateNode.containerInfo===Y.containerInfo&&W.stateNode.implementation===Y.implementation){h(K,W.sibling),W=j(W,Y.children||[]),W.return=K,K=W;break e}else{h(K,W);break}else l(K,W);W=W.sibling}W=Qd(Y,K.mode,de),W.return=K,K=W}return $(K);case ue:return we=Y._init,lt(K,W,we(Y._payload),de)}if(mt(Y))return ye(K,W,Y,de);if(ne(Y))return ve(K,W,Y,de);dl(K,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,W!==null&&W.tag===6?(h(K,W.sibling),W=j(W,Y),W.return=K,K=W):(h(K,W),W=Yd(Y,K.mode,de),W.return=K,K=W),$(K)):h(K,W)}return lt}var ui=M1(!0),F1=M1(!1),hl=Ds(null),pl=null,di=null,rd=null;function id(){rd=di=pl=null}function ad(i){var l=hl.current;Je(hl),i._currentValue=l}function od(i,l,h){for(;i!==null;){var g=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),i===h)break;i=i.return}}function hi(i,l){pl=i,rd=di=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&l)!==0&&(Wt=!0),i.firstContext=null)}function bn(i){var l=i._currentValue;if(rd!==i)if(i={context:i,memoizedValue:l,next:null},di===null){if(pl===null)throw Error(s(308));di=i,pl.dependencies={lanes:0,firstContext:i}}else di=di.next=i;return l}var gr=null;function ld(i){gr===null?gr=[i]:gr.push(i)}function L1(i,l,h,g){var j=l.interleaved;return j===null?(h.next=h,ld(l)):(h.next=j.next,j.next=h),l.interleaved=h,ms(i,g)}function ms(i,l){i.lanes|=l;var h=i.alternate;for(h!==null&&(h.lanes|=l),h=i,i=i.return;i!==null;)i.childLanes|=l,h=i.alternate,h!==null&&(h.childLanes|=l),h=i,i=i.return;return h.tag===3?h.stateNode:null}var Ws=!1;function cd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _1(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function gs(i,l){return{eventTime:i,lane:l,tag:0,payload:null,callback:null,next:null}}function Hs(i,l,h){var g=i.updateQueue;if(g===null)return null;if(g=g.shared,(De&2)!==0){var j=g.pending;return j===null?l.next=l:(l.next=j.next,j.next=l),g.pending=l,ms(i,h)}return j=g.interleaved,j===null?(l.next=l,ld(g)):(l.next=j.next,j.next=l),g.interleaved=l,ms(i,h)}function fl(i,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194240)!==0)){var g=l.lanes;g&=i.pendingLanes,h|=g,l.lanes=h,wu(i,h)}}function O1(i,l){var h=i.updateQueue,g=i.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var j=null,b=null;if(h=h.firstBaseUpdate,h!==null){do{var $={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};b===null?j=b=$:b=b.next=$,h=h.next}while(h!==null);b===null?j=b=l:b=b.next=l}else j=b=l;h={baseState:g.baseState,firstBaseUpdate:j,lastBaseUpdate:b,shared:g.shared,effects:g.effects},i.updateQueue=h;return}i=h.lastBaseUpdate,i===null?h.firstBaseUpdate=l:i.next=l,h.lastBaseUpdate=l}function ml(i,l,h,g){var j=i.updateQueue;Ws=!1;var b=j.firstBaseUpdate,$=j.lastBaseUpdate,L=j.shared.pending;if(L!==null){j.shared.pending=null;var q=L,Z=q.next;q.next=null,$===null?b=Z:$.next=Z,$=q;var re=i.alternate;re!==null&&(re=re.updateQueue,L=re.lastBaseUpdate,L!==$&&(L===null?re.firstBaseUpdate=Z:L.next=Z,re.lastBaseUpdate=q))}if(b!==null){var ae=j.baseState;$=0,re=Z=q=null,L=b;do{var se=L.lane,pe=L.eventTime;if((g&se)===se){re!==null&&(re=re.next={eventTime:pe,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var ye=i,ve=L;switch(se=l,pe=h,ve.tag){case 1:if(ye=ve.payload,typeof ye=="function"){ae=ye.call(pe,ae,se);break e}ae=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=ve.payload,se=typeof ye=="function"?ye.call(pe,ae,se):ye,se==null)break e;ae=A({},ae,se);break e;case 2:Ws=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,se=j.effects,se===null?j.effects=[L]:se.push(L))}else pe={eventTime:pe,lane:se,tag:L.tag,payload:L.payload,callback:L.callback,next:null},re===null?(Z=re=pe,q=ae):re=re.next=pe,$|=se;if(L=L.next,L===null){if(L=j.shared.pending,L===null)break;se=L,L=se.next,se.next=null,j.lastBaseUpdate=se,j.shared.pending=null}}while(!0);if(re===null&&(q=ae),j.baseState=q,j.firstBaseUpdate=Z,j.lastBaseUpdate=re,l=j.shared.interleaved,l!==null){j=l;do $|=j.lane,j=j.next;while(j!==l)}else b===null&&(j.shared.lanes=0);kr|=$,i.lanes=$,i.memoizedState=ae}}function q1(i,l,h){if(i=l.effects,l.effects=null,i!==null)for(l=0;l<i.length;l++){var g=i[l],j=g.callback;if(j!==null){if(g.callback=null,g=h,typeof j!="function")throw Error(s(191,j));j.call(g)}}}var xa={},Yn=Ds(xa),ya=Ds(xa),ka=Ds(xa);function xr(i){if(i===xa)throw Error(s(174));return i}function ud(i,l){switch(Qe(ka,l),Qe(ya,i),Qe(Yn,xa),i=l.nodeType,i){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:le(null,"");break;default:i=i===8?l.parentNode:l,l=i.namespaceURI||null,i=i.tagName,l=le(l,i)}Je(Yn),Qe(Yn,l)}function pi(){Je(Yn),Je(ya),Je(ka)}function D1(i){xr(ka.current);var l=xr(Yn.current),h=le(l,i.type);l!==h&&(Qe(ya,i),Qe(Yn,h))}function dd(i){ya.current===i&&(Je(Yn),Je(ya))}var nt=Ds(0);function gl(i){for(var l=i;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var hd=[];function pd(){for(var i=0;i<hd.length;i++)hd[i]._workInProgressVersionPrimary=null;hd.length=0}var xl=P.ReactCurrentDispatcher,fd=P.ReactCurrentBatchConfig,yr=0,st=null,pt=null,gt=null,yl=!1,va=!1,ja=0,zb=0;function $t(){throw Error(s(321))}function md(i,l){if(l===null)return!1;for(var h=0;h<l.length&&h<i.length;h++)if(!zn(i[h],l[h]))return!1;return!0}function gd(i,l,h,g,j,b){if(yr=b,st=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,xl.current=i===null||i.memoizedState===null?_b:Ob,i=h(g,j),va){b=0;do{if(va=!1,ja=0,25<=b)throw Error(s(301));b+=1,gt=pt=null,l.updateQueue=null,xl.current=qb,i=h(g,j)}while(va)}if(xl.current=jl,l=pt!==null&&pt.next!==null,yr=0,gt=pt=st=null,yl=!1,l)throw Error(s(300));return i}function xd(){var i=ja!==0;return ja=0,i}function Qn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?st.memoizedState=gt=i:gt=gt.next=i,gt}function wn(){if(pt===null){var i=st.alternate;i=i!==null?i.memoizedState:null}else i=pt.next;var l=gt===null?st.memoizedState:gt.next;if(l!==null)gt=l,pt=i;else{if(i===null)throw Error(s(310));pt=i,i={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},gt===null?st.memoizedState=gt=i:gt=gt.next=i}return gt}function ba(i,l){return typeof l=="function"?l(i):l}function yd(i){var l=wn(),h=l.queue;if(h===null)throw Error(s(311));h.lastRenderedReducer=i;var g=pt,j=g.baseQueue,b=h.pending;if(b!==null){if(j!==null){var $=j.next;j.next=b.next,b.next=$}g.baseQueue=j=b,h.pending=null}if(j!==null){b=j.next,g=g.baseState;var L=$=null,q=null,Z=b;do{var re=Z.lane;if((yr&re)===re)q!==null&&(q=q.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),g=Z.hasEagerState?Z.eagerState:i(g,Z.action);else{var ae={lane:re,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};q===null?(L=q=ae,$=g):q=q.next=ae,st.lanes|=re,kr|=re}Z=Z.next}while(Z!==null&&Z!==b);q===null?$=g:q.next=L,zn(g,l.memoizedState)||(Wt=!0),l.memoizedState=g,l.baseState=$,l.baseQueue=q,h.lastRenderedState=g}if(i=h.interleaved,i!==null){j=i;do b=j.lane,st.lanes|=b,kr|=b,j=j.next;while(j!==i)}else j===null&&(h.lanes=0);return[l.memoizedState,h.dispatch]}function kd(i){var l=wn(),h=l.queue;if(h===null)throw Error(s(311));h.lastRenderedReducer=i;var g=h.dispatch,j=h.pending,b=l.memoizedState;if(j!==null){h.pending=null;var $=j=j.next;do b=i(b,$.action),$=$.next;while($!==j);zn(b,l.memoizedState)||(Wt=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),h.lastRenderedState=b}return[b,g]}function B1(){}function U1(i,l){var h=st,g=wn(),j=l(),b=!zn(g.memoizedState,j);if(b&&(g.memoizedState=j,Wt=!0),g=g.queue,vd(V1.bind(null,h,g,i),[i]),g.getSnapshot!==l||b||gt!==null&>.memoizedState.tag&1){if(h.flags|=2048,wa(9,H1.bind(null,h,g,j,l),void 0,null),xt===null)throw Error(s(349));(yr&30)!==0||W1(h,l,j)}return j}function W1(i,l,h){i.flags|=16384,i={getSnapshot:l,value:h},l=st.updateQueue,l===null?(l={lastEffect:null,stores:null},st.updateQueue=l,l.stores=[i]):(h=l.stores,h===null?l.stores=[i]:h.push(i))}function H1(i,l,h,g){l.value=h,l.getSnapshot=g,K1(l)&&Y1(i)}function V1(i,l,h){return h(function(){K1(l)&&Y1(i)})}function K1(i){var l=i.getSnapshot;i=i.value;try{var h=l();return!zn(i,h)}catch{return!0}}function Y1(i){var l=ms(i,1);l!==null&&On(l,i,1,-1)}function Q1(i){var l=Qn();return typeof i=="function"&&(i=i()),l.memoizedState=l.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:i},l.queue=i,i=i.dispatch=Lb.bind(null,st,i),[l.memoizedState,i]}function wa(i,l,h,g){return i={tag:i,create:l,destroy:h,deps:g,next:null},l=st.updateQueue,l===null?(l={lastEffect:null,stores:null},st.updateQueue=l,l.lastEffect=i.next=i):(h=l.lastEffect,h===null?l.lastEffect=i.next=i:(g=h.next,h.next=i,i.next=g,l.lastEffect=i)),i}function G1(){return wn().memoizedState}function kl(i,l,h,g){var j=Qn();st.flags|=i,j.memoizedState=wa(1|l,h,void 0,g===void 0?null:g)}function vl(i,l,h,g){var j=wn();g=g===void 0?null:g;var b=void 0;if(pt!==null){var $=pt.memoizedState;if(b=$.destroy,g!==null&&md(g,$.deps)){j.memoizedState=wa(l,h,b,g);return}}st.flags|=i,j.memoizedState=wa(1|l,h,b,g)}function Z1(i,l){return kl(8390656,8,i,l)}function vd(i,l){return vl(2048,8,i,l)}function X1(i,l){return vl(4,2,i,l)}function J1(i,l){return vl(4,4,i,l)}function e0(i,l){if(typeof l=="function")return i=i(),l(i),function(){l(null)};if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function t0(i,l,h){return h=h!=null?h.concat([i]):null,vl(4,4,e0.bind(null,l,i),h)}function jd(){}function n0(i,l){var h=wn();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&md(l,g[1])?g[0]:(h.memoizedState=[i,l],i)}function s0(i,l){var h=wn();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&md(l,g[1])?g[0]:(i=i(),h.memoizedState=[i,l],i)}function r0(i,l,h){return(yr&21)===0?(i.baseState&&(i.baseState=!1,Wt=!0),i.memoizedState=h):(zn(h,l)||(h=zm(),st.lanes|=h,kr|=h,i.baseState=!0),l)}function Mb(i,l){var h=He;He=h!==0&&4>h?h:4,i(!0);var g=fd.transition;fd.transition={};try{i(!1),l()}finally{He=h,fd.transition=g}}function i0(){return wn().memoizedState}function Fb(i,l,h){var g=Qs(i);if(h={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null},a0(i))o0(l,h);else if(h=L1(i,l,h,g),h!==null){var j=Lt();On(h,i,g,j),l0(h,l,g)}}function Lb(i,l,h){var g=Qs(i),j={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null};if(a0(i))o0(l,j);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var $=l.lastRenderedState,L=b($,h);if(j.hasEagerState=!0,j.eagerState=L,zn(L,$)){var q=l.interleaved;q===null?(j.next=j,ld(l)):(j.next=q.next,q.next=j),l.interleaved=j;return}}catch{}finally{}h=L1(i,l,j,g),h!==null&&(j=Lt(),On(h,i,g,j),l0(h,l,g))}}function a0(i){var l=i.alternate;return i===st||l!==null&&l===st}function o0(i,l){va=yl=!0;var h=i.pending;h===null?l.next=l:(l.next=h.next,h.next=l),i.pending=l}function l0(i,l,h){if((h&4194240)!==0){var g=l.lanes;g&=i.pendingLanes,h|=g,l.lanes=h,wu(i,h)}}var jl={readContext:bn,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},_b={readContext:bn,useCallback:function(i,l){return Qn().memoizedState=[i,l===void 0?null:l],i},useContext:bn,useEffect:Z1,useImperativeHandle:function(i,l,h){return h=h!=null?h.concat([i]):null,kl(4194308,4,e0.bind(null,l,i),h)},useLayoutEffect:function(i,l){return kl(4194308,4,i,l)},useInsertionEffect:function(i,l){return kl(4,2,i,l)},useMemo:function(i,l){var h=Qn();return l=l===void 0?null:l,i=i(),h.memoizedState=[i,l],i},useReducer:function(i,l,h){var g=Qn();return l=h!==void 0?h(l):l,g.memoizedState=g.baseState=l,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:l},g.queue=i,i=i.dispatch=Fb.bind(null,st,i),[g.memoizedState,i]},useRef:function(i){var l=Qn();return i={current:i},l.memoizedState=i},useState:Q1,useDebugValue:jd,useDeferredValue:function(i){return Qn().memoizedState=i},useTransition:function(){var i=Q1(!1),l=i[0];return i=Mb.bind(null,i[1]),Qn().memoizedState=i,[l,i]},useMutableSource:function(){},useSyncExternalStore:function(i,l,h){var g=st,j=Qn();if(et){if(h===void 0)throw Error(s(407));h=h()}else{if(h=l(),xt===null)throw Error(s(349));(yr&30)!==0||W1(g,l,h)}j.memoizedState=h;var b={value:h,getSnapshot:l};return j.queue=b,Z1(V1.bind(null,g,b,i),[i]),g.flags|=2048,wa(9,H1.bind(null,g,b,h,l),void 0,null),h},useId:function(){var i=Qn(),l=xt.identifierPrefix;if(et){var h=fs,g=ps;h=(g&~(1<<32-In(g)-1)).toString(32)+h,l=":"+l+"R"+h,h=ja++,0<h&&(l+="H"+h.toString(32)),l+=":"}else h=zb++,l=":"+l+"r"+h.toString(32)+":";return i.memoizedState=l},unstable_isNewReconciler:!1},Ob={readContext:bn,useCallback:n0,useContext:bn,useEffect:vd,useImperativeHandle:t0,useInsertionEffect:X1,useLayoutEffect:J1,useMemo:s0,useReducer:yd,useRef:G1,useState:function(){return yd(ba)},useDebugValue:jd,useDeferredValue:function(i){var l=wn();return r0(l,pt.memoizedState,i)},useTransition:function(){var i=yd(ba)[0],l=wn().memoizedState;return[i,l]},useMutableSource:B1,useSyncExternalStore:U1,useId:i0,unstable_isNewReconciler:!1},qb={readContext:bn,useCallback:n0,useContext:bn,useEffect:vd,useImperativeHandle:t0,useInsertionEffect:X1,useLayoutEffect:J1,useMemo:s0,useReducer:kd,useRef:G1,useState:function(){return kd(ba)},useDebugValue:jd,useDeferredValue:function(i){var l=wn();return pt===null?l.memoizedState=i:r0(l,pt.memoizedState,i)},useTransition:function(){var i=kd(ba)[0],l=wn().memoizedState;return[i,l]},useMutableSource:B1,useSyncExternalStore:U1,useId:i0,unstable_isNewReconciler:!1};function Fn(i,l){if(i&&i.defaultProps){l=A({},l),i=i.defaultProps;for(var h in i)l[h]===void 0&&(l[h]=i[h]);return l}return l}function bd(i,l,h,g){l=i.memoizedState,h=h(g,l),h=h==null?l:A({},l,h),i.memoizedState=h,i.lanes===0&&(i.updateQueue.baseState=h)}var bl={isMounted:function(i){return(i=i._reactInternals)?dr(i)===i:!1},enqueueSetState:function(i,l,h){i=i._reactInternals;var g=Lt(),j=Qs(i),b=gs(g,j);b.payload=l,h!=null&&(b.callback=h),l=Hs(i,b,j),l!==null&&(On(l,i,j,g),fl(l,i,j))},enqueueReplaceState:function(i,l,h){i=i._reactInternals;var g=Lt(),j=Qs(i),b=gs(g,j);b.tag=1,b.payload=l,h!=null&&(b.callback=h),l=Hs(i,b,j),l!==null&&(On(l,i,j,g),fl(l,i,j))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var h=Lt(),g=Qs(i),j=gs(h,g);j.tag=2,l!=null&&(j.callback=l),l=Hs(i,j,g),l!==null&&(On(l,i,g,h),fl(l,i,g))}};function c0(i,l,h,g,j,b,$){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(g,b,$):l.prototype&&l.prototype.isPureReactComponent?!ca(h,g)||!ca(j,b):!0}function u0(i,l,h){var g=!1,j=Bs,b=l.contextType;return typeof b=="object"&&b!==null?b=bn(b):(j=Ut(l)?pr:Ct.current,g=l.contextTypes,b=(g=g!=null)?ai(i,j):Bs),l=new l(h,b),i.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=bl,i.stateNode=l,l._reactInternals=i,g&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=j,i.__reactInternalMemoizedMaskedChildContext=b),l}function d0(i,l,h,g){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,g),l.state!==i&&bl.enqueueReplaceState(l,l.state,null)}function wd(i,l,h,g){var j=i.stateNode;j.props=h,j.state=i.memoizedState,j.refs={},cd(i);var b=l.contextType;typeof b=="object"&&b!==null?j.context=bn(b):(b=Ut(l)?pr:Ct.current,j.context=ai(i,b)),j.state=i.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(bd(i,l,b,h),j.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(l=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),l!==j.state&&bl.enqueueReplaceState(j,j.state,null),ml(i,h,j,g),j.state=i.memoizedState),typeof j.componentDidMount=="function"&&(i.flags|=4194308)}function fi(i,l){try{var h="",g=l;do h+=he(g),g=g.return;while(g);var j=h}catch(b){j=`
|
|
39
|
+
Error generating stack: `+b.message+`
|
|
40
|
+
`+b.stack}return{value:i,source:l,stack:j,digest:null}}function Nd(i,l,h){return{value:i,source:null,stack:h??null,digest:l??null}}function Sd(i,l){try{console.error(l.value)}catch(h){setTimeout(function(){throw h})}}var Db=typeof WeakMap=="function"?WeakMap:Map;function h0(i,l,h){h=gs(-1,h),h.tag=3,h.payload={element:null};var g=l.value;return h.callback=function(){Tl||(Tl=!0,qd=g),Sd(i,l)},h}function p0(i,l,h){h=gs(-1,h),h.tag=3;var g=i.type.getDerivedStateFromError;if(typeof g=="function"){var j=l.value;h.payload=function(){return g(j)},h.callback=function(){Sd(i,l)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(h.callback=function(){Sd(i,l),typeof g!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var $=l.stack;this.componentDidCatch(l.value,{componentStack:$!==null?$:""})}),h}function f0(i,l,h){var g=i.pingCache;if(g===null){g=i.pingCache=new Db;var j=new Set;g.set(l,j)}else j=g.get(l),j===void 0&&(j=new Set,g.set(l,j));j.has(h)||(j.add(h),i=t4.bind(null,i,l,h),l.then(i,i))}function m0(i){do{var l;if((l=i.tag===13)&&(l=i.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return i;i=i.return}while(i!==null);return null}function g0(i,l,h,g,j){return(i.mode&1)===0?(i===l?i.flags|=65536:(i.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(l=gs(-1,1),l.tag=2,Hs(h,l,1))),h.lanes|=1),i):(i.flags|=65536,i.lanes=j,i)}var Bb=P.ReactCurrentOwner,Wt=!1;function Ft(i,l,h,g){l.child=i===null?F1(l,null,h,g):ui(l,i.child,h,g)}function x0(i,l,h,g,j){h=h.render;var b=l.ref;return hi(l,j),g=gd(i,l,h,g,b,j),h=xd(),i!==null&&!Wt?(l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~j,xs(i,l,j)):(et&&h&&Ju(l),l.flags|=1,Ft(i,l,g,j),l.child)}function y0(i,l,h,g,j){if(i===null){var b=h.type;return typeof b=="function"&&!Kd(b)&&b.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(l.tag=15,l.type=b,k0(i,l,b,g,j)):(i=Ml(h.type,null,g,l,l.mode,j),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,(i.lanes&j)===0){var $=b.memoizedProps;if(h=h.compare,h=h!==null?h:ca,h($,g)&&i.ref===l.ref)return xs(i,l,j)}return l.flags|=1,i=Zs(b,g),i.ref=l.ref,i.return=l,l.child=i}function k0(i,l,h,g,j){if(i!==null){var b=i.memoizedProps;if(ca(b,g)&&i.ref===l.ref)if(Wt=!1,l.pendingProps=g=b,(i.lanes&j)!==0)(i.flags&131072)!==0&&(Wt=!0);else return l.lanes=i.lanes,xs(i,l,j)}return Cd(i,l,h,g,j)}function v0(i,l,h){var g=l.pendingProps,j=g.children,b=i!==null?i.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(gi,ln),ln|=h;else{if((h&1073741824)===0)return i=b!==null?b.baseLanes|h:h,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:i,cachePool:null,transitions:null},l.updateQueue=null,Qe(gi,ln),ln|=i,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=b!==null?b.baseLanes:h,Qe(gi,ln),ln|=g}else b!==null?(g=b.baseLanes|h,l.memoizedState=null):g=h,Qe(gi,ln),ln|=g;return Ft(i,l,j,h),l.child}function j0(i,l){var h=l.ref;(i===null&&h!==null||i!==null&&i.ref!==h)&&(l.flags|=512,l.flags|=2097152)}function Cd(i,l,h,g,j){var b=Ut(h)?pr:Ct.current;return b=ai(l,b),hi(l,j),h=gd(i,l,h,g,b,j),g=xd(),i!==null&&!Wt?(l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~j,xs(i,l,j)):(et&&g&&Ju(l),l.flags|=1,Ft(i,l,h,j),l.child)}function b0(i,l,h,g,j){if(Ut(h)){var b=!0;al(l)}else b=!1;if(hi(l,j),l.stateNode===null)Nl(i,l),u0(l,h,g),wd(l,h,g,j),g=!0;else if(i===null){var $=l.stateNode,L=l.memoizedProps;$.props=L;var q=$.context,Z=h.contextType;typeof Z=="object"&&Z!==null?Z=bn(Z):(Z=Ut(h)?pr:Ct.current,Z=ai(l,Z));var re=h.getDerivedStateFromProps,ae=typeof re=="function"||typeof $.getSnapshotBeforeUpdate=="function";ae||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(L!==g||q!==Z)&&d0(l,$,g,Z),Ws=!1;var se=l.memoizedState;$.state=se,ml(l,g,$,j),q=l.memoizedState,L!==g||se!==q||Bt.current||Ws?(typeof re=="function"&&(bd(l,h,re,g),q=l.memoizedState),(L=Ws||c0(l,h,L,g,se,q,Z))?(ae||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(l.flags|=4194308)):(typeof $.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=q),$.props=g,$.state=q,$.context=Z,g=L):(typeof $.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{$=l.stateNode,_1(i,l),L=l.memoizedProps,Z=l.type===l.elementType?L:Fn(l.type,L),$.props=Z,ae=l.pendingProps,se=$.context,q=h.contextType,typeof q=="object"&&q!==null?q=bn(q):(q=Ut(h)?pr:Ct.current,q=ai(l,q));var pe=h.getDerivedStateFromProps;(re=typeof pe=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(L!==ae||se!==q)&&d0(l,$,g,q),Ws=!1,se=l.memoizedState,$.state=se,ml(l,g,$,j);var ye=l.memoizedState;L!==ae||se!==ye||Bt.current||Ws?(typeof pe=="function"&&(bd(l,h,pe,g),ye=l.memoizedState),(Z=Ws||c0(l,h,Z,g,se,ye,q)||!1)?(re||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(g,ye,q),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(g,ye,q)),typeof $.componentDidUpdate=="function"&&(l.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof $.componentDidUpdate!="function"||L===i.memoizedProps&&se===i.memoizedState||(l.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&se===i.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=ye),$.props=g,$.state=ye,$.context=q,g=Z):(typeof $.componentDidUpdate!="function"||L===i.memoizedProps&&se===i.memoizedState||(l.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&se===i.memoizedState||(l.flags|=1024),g=!1)}return $d(i,l,h,g,b,j)}function $d(i,l,h,g,j,b){j0(i,l);var $=(l.flags&128)!==0;if(!g&&!$)return j&&$1(l,h,!1),xs(i,l,b);g=l.stateNode,Bb.current=l;var L=$&&typeof h.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,i!==null&&$?(l.child=ui(l,i.child,null,b),l.child=ui(l,null,L,b)):Ft(i,l,L,b),l.memoizedState=g.state,j&&$1(l,h,!0),l.child}function w0(i){var l=i.stateNode;l.pendingContext?S1(i,l.pendingContext,l.pendingContext!==l.context):l.context&&S1(i,l.context,!1),ud(i,l.containerInfo)}function N0(i,l,h,g,j){return ci(),sd(j),l.flags|=256,Ft(i,l,h,g),l.child}var Ed={dehydrated:null,treeContext:null,retryLane:0};function Td(i){return{baseLanes:i,cachePool:null,transitions:null}}function S0(i,l,h){var g=l.pendingProps,j=nt.current,b=!1,$=(l.flags&128)!==0,L;if((L=$)||(L=i!==null&&i.memoizedState===null?!1:(j&2)!==0),L?(b=!0,l.flags&=-129):(i===null||i.memoizedState!==null)&&(j|=1),Qe(nt,j&1),i===null)return nd(l),i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((l.mode&1)===0?l.lanes=1:i.data==="$!"?l.lanes=8:l.lanes=1073741824,null):($=g.children,i=g.fallback,b?(g=l.mode,b=l.child,$={mode:"hidden",children:$},(g&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=$):b=Fl($,g,0,null),i=wr(i,g,h,null),b.return=l,i.return=l,b.sibling=i,l.child=b,l.child.memoizedState=Td(h),l.memoizedState=Ed,i):Ad(l,$));if(j=i.memoizedState,j!==null&&(L=j.dehydrated,L!==null))return Ub(i,l,$,g,L,j,h);if(b){b=g.fallback,$=l.mode,j=i.child,L=j.sibling;var q={mode:"hidden",children:g.children};return($&1)===0&&l.child!==j?(g=l.child,g.childLanes=0,g.pendingProps=q,l.deletions=null):(g=Zs(j,q),g.subtreeFlags=j.subtreeFlags&14680064),L!==null?b=Zs(L,b):(b=wr(b,$,h,null),b.flags|=2),b.return=l,g.return=l,g.sibling=b,l.child=g,g=b,b=l.child,$=i.child.memoizedState,$=$===null?Td(h):{baseLanes:$.baseLanes|h,cachePool:null,transitions:$.transitions},b.memoizedState=$,b.childLanes=i.childLanes&~h,l.memoizedState=Ed,g}return b=i.child,i=b.sibling,g=Zs(b,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=h),g.return=l,g.sibling=null,i!==null&&(h=l.deletions,h===null?(l.deletions=[i],l.flags|=16):h.push(i)),l.child=g,l.memoizedState=null,g}function Ad(i,l){return l=Fl({mode:"visible",children:l},i.mode,0,null),l.return=i,i.child=l}function wl(i,l,h,g){return g!==null&&sd(g),ui(l,i.child,null,h),i=Ad(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function Ub(i,l,h,g,j,b,$){if(h)return l.flags&256?(l.flags&=-257,g=Nd(Error(s(422))),wl(i,l,$,g)):l.memoizedState!==null?(l.child=i.child,l.flags|=128,null):(b=g.fallback,j=l.mode,g=Fl({mode:"visible",children:g.children},j,0,null),b=wr(b,j,$,null),b.flags|=2,g.return=l,b.return=l,g.sibling=b,l.child=g,(l.mode&1)!==0&&ui(l,i.child,null,$),l.child.memoizedState=Td($),l.memoizedState=Ed,b);if((l.mode&1)===0)return wl(i,l,$,null);if(j.data==="$!"){if(g=j.nextSibling&&j.nextSibling.dataset,g)var L=g.dgst;return g=L,b=Error(s(419)),g=Nd(b,g,void 0),wl(i,l,$,g)}if(L=($&i.childLanes)!==0,Wt||L){if(g=xt,g!==null){switch($&-$){case 4:j=2;break;case 16:j=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:j=32;break;case 536870912:j=268435456;break;default:j=0}j=(j&(g.suspendedLanes|$))!==0?0:j,j!==0&&j!==b.retryLane&&(b.retryLane=j,ms(i,j),On(g,i,j,-1))}return Vd(),g=Nd(Error(s(421))),wl(i,l,$,g)}return j.data==="$?"?(l.flags|=128,l.child=i.child,l=n4.bind(null,i),j._reactRetry=l,null):(i=b.treeContext,on=qs(j.nextSibling),an=l,et=!0,Mn=null,i!==null&&(vn[jn++]=ps,vn[jn++]=fs,vn[jn++]=fr,ps=i.id,fs=i.overflow,fr=l),l=Ad(l,g.children),l.flags|=4096,l)}function C0(i,l,h){i.lanes|=l;var g=i.alternate;g!==null&&(g.lanes|=l),od(i.return,l,h)}function Pd(i,l,h,g,j){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:j}:(b.isBackwards=l,b.rendering=null,b.renderingStartTime=0,b.last=g,b.tail=h,b.tailMode=j)}function $0(i,l,h){var g=l.pendingProps,j=g.revealOrder,b=g.tail;if(Ft(i,l,g.children,h),g=nt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&C0(i,h,l);else if(i.tag===19)C0(i,h,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}g&=1}if(Qe(nt,g),(l.mode&1)===0)l.memoizedState=null;else switch(j){case"forwards":for(h=l.child,j=null;h!==null;)i=h.alternate,i!==null&&gl(i)===null&&(j=h),h=h.sibling;h=j,h===null?(j=l.child,l.child=null):(j=h.sibling,h.sibling=null),Pd(l,!1,j,h,b);break;case"backwards":for(h=null,j=l.child,l.child=null;j!==null;){if(i=j.alternate,i!==null&&gl(i)===null){l.child=j;break}i=j.sibling,j.sibling=h,h=j,j=i}Pd(l,!0,h,null,b);break;case"together":Pd(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Nl(i,l){(l.mode&1)===0&&i!==null&&(i.alternate=null,l.alternate=null,l.flags|=2)}function xs(i,l,h){if(i!==null&&(l.dependencies=i.dependencies),kr|=l.lanes,(h&l.childLanes)===0)return null;if(i!==null&&l.child!==i.child)throw Error(s(153));if(l.child!==null){for(i=l.child,h=Zs(i,i.pendingProps),l.child=h,h.return=l;i.sibling!==null;)i=i.sibling,h=h.sibling=Zs(i,i.pendingProps),h.return=l;h.sibling=null}return l.child}function Wb(i,l,h){switch(l.tag){case 3:w0(l),ci();break;case 5:D1(l);break;case 1:Ut(l.type)&&al(l);break;case 4:ud(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,j=l.memoizedProps.value;Qe(hl,g._currentValue),g._currentValue=j;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(Qe(nt,nt.current&1),l.flags|=128,null):(h&l.child.childLanes)!==0?S0(i,l,h):(Qe(nt,nt.current&1),i=xs(i,l,h),i!==null?i.sibling:null);Qe(nt,nt.current&1);break;case 19:if(g=(h&l.childLanes)!==0,(i.flags&128)!==0){if(g)return $0(i,l,h);l.flags|=128}if(j=l.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),Qe(nt,nt.current),g)break;return null;case 22:case 23:return l.lanes=0,v0(i,l,h)}return xs(i,l,h)}var E0,Rd,T0,A0;E0=function(i,l){for(var h=l.child;h!==null;){if(h.tag===5||h.tag===6)i.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},Rd=function(){},T0=function(i,l,h,g){var j=i.memoizedProps;if(j!==g){i=l.stateNode,xr(Yn.current);var b=null;switch(h){case"input":j=Wn(i,j),g=Wn(i,g),b=[];break;case"select":j=A({},j,{value:void 0}),g=A({},g,{value:void 0}),b=[];break;case"textarea":j=Rn(i,j),g=Rn(i,g),b=[];break;default:typeof j.onClick!="function"&&typeof g.onClick=="function"&&(i.onclick=sl)}vt(h,g);var $;h=null;for(Z in j)if(!g.hasOwnProperty(Z)&&j.hasOwnProperty(Z)&&j[Z]!=null)if(Z==="style"){var L=j[Z];for($ in L)L.hasOwnProperty($)&&(h||(h={}),h[$]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(a.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in g){var q=g[Z];if(L=j?.[Z],g.hasOwnProperty(Z)&&q!==L&&(q!=null||L!=null))if(Z==="style")if(L){for($ in L)!L.hasOwnProperty($)||q&&q.hasOwnProperty($)||(h||(h={}),h[$]="");for($ in q)q.hasOwnProperty($)&&L[$]!==q[$]&&(h||(h={}),h[$]=q[$])}else h||(b||(b=[]),b.push(Z,h)),h=q;else Z==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,L=L?L.__html:void 0,q!=null&&L!==q&&(b=b||[]).push(Z,q)):Z==="children"?typeof q!="string"&&typeof q!="number"||(b=b||[]).push(Z,""+q):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(a.hasOwnProperty(Z)?(q!=null&&Z==="onScroll"&&Xe("scroll",i),b||L===q||(b=[])):(b=b||[]).push(Z,q))}h&&(b=b||[]).push("style",h);var Z=b;(l.updateQueue=Z)&&(l.flags|=4)}},A0=function(i,l,h,g){h!==g&&(l.flags|=4)};function Na(i,l){if(!et)switch(i.tailMode){case"hidden":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?i.tail=null:h.sibling=null;break;case"collapsed":h=i.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:g.sibling=null}}function Et(i){var l=i.alternate!==null&&i.alternate.child===i.child,h=0,g=0;if(l)for(var j=i.child;j!==null;)h|=j.lanes|j.childLanes,g|=j.subtreeFlags&14680064,g|=j.flags&14680064,j.return=i,j=j.sibling;else for(j=i.child;j!==null;)h|=j.lanes|j.childLanes,g|=j.subtreeFlags,g|=j.flags,j.return=i,j=j.sibling;return i.subtreeFlags|=g,i.childLanes=h,l}function Hb(i,l,h){var g=l.pendingProps;switch(ed(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Et(l),null;case 1:return Ut(l.type)&&il(),Et(l),null;case 3:return g=l.stateNode,pi(),Je(Bt),Je(Ct),pd(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(i===null||i.child===null)&&(ul(l)?l.flags|=4:i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Mn!==null&&(Ud(Mn),Mn=null))),Rd(i,l),Et(l),null;case 5:dd(l);var j=xr(ka.current);if(h=l.type,i!==null&&l.stateNode!=null)T0(i,l,h,g,j),i.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(s(166));return Et(l),null}if(i=xr(Yn.current),ul(l)){g=l.stateNode,h=l.type;var b=l.memoizedProps;switch(g[Kn]=l,g[fa]=b,i=(l.mode&1)!==0,h){case"dialog":Xe("cancel",g),Xe("close",g);break;case"iframe":case"object":case"embed":Xe("load",g);break;case"video":case"audio":for(j=0;j<da.length;j++)Xe(da[j],g);break;case"source":Xe("error",g);break;case"img":case"image":case"link":Xe("error",g),Xe("load",g);break;case"details":Xe("toggle",g);break;case"input":qt(g,b),Xe("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!b.multiple},Xe("invalid",g);break;case"textarea":Rs(g,b),Xe("invalid",g)}vt(h,b),j=null;for(var $ in b)if(b.hasOwnProperty($)){var L=b[$];$==="children"?typeof L=="string"?g.textContent!==L&&(b.suppressHydrationWarning!==!0&&nl(g.textContent,L,i),j=["children",L]):typeof L=="number"&&g.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&nl(g.textContent,L,i),j=["children",""+L]):a.hasOwnProperty($)&&L!=null&&$==="onScroll"&&Xe("scroll",g)}switch(h){case"input":ct(g),nn(g,b,!0);break;case"textarea":ct(g),Ue(g);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(g.onclick=sl)}g=j,l.updateQueue=g,g!==null&&(l.flags|=4)}else{$=j.nodeType===9?j:j.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=X(h)),i==="http://www.w3.org/1999/xhtml"?h==="script"?(i=$.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof g.is=="string"?i=$.createElement(h,{is:g.is}):(i=$.createElement(h),h==="select"&&($=i,g.multiple?$.multiple=!0:g.size&&($.size=g.size))):i=$.createElementNS(i,h),i[Kn]=l,i[fa]=g,E0(i,l,!1,!1),l.stateNode=i;e:{switch($=Hn(h,g),h){case"dialog":Xe("cancel",i),Xe("close",i),j=g;break;case"iframe":case"object":case"embed":Xe("load",i),j=g;break;case"video":case"audio":for(j=0;j<da.length;j++)Xe(da[j],i);j=g;break;case"source":Xe("error",i),j=g;break;case"img":case"image":case"link":Xe("error",i),Xe("load",i),j=g;break;case"details":Xe("toggle",i),j=g;break;case"input":qt(i,g),j=Wn(i,g),Xe("invalid",i);break;case"option":j=g;break;case"select":i._wrapperState={wasMultiple:!!g.multiple},j=A({},g,{value:void 0}),Xe("invalid",i);break;case"textarea":Rs(i,g),j=Rn(i,g),Xe("invalid",i);break;default:j=g}vt(h,j),L=j;for(b in L)if(L.hasOwnProperty(b)){var q=L[b];b==="style"?Is(i,q):b==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,q!=null&&je(i,q)):b==="children"?typeof q=="string"?(h!=="textarea"||q!=="")&&Ie(i,q):typeof q=="number"&&Ie(i,""+q):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(a.hasOwnProperty(b)?q!=null&&b==="onScroll"&&Xe("scroll",i):q!=null&&E(i,b,q,$))}switch(h){case"input":ct(i),nn(i,g,!1);break;case"textarea":ct(i),Ue(i);break;case"option":g.value!=null&&i.setAttribute("value",""+Ae(g.value));break;case"select":i.multiple=!!g.multiple,b=g.value,b!=null?yn(i,!!g.multiple,b,!1):g.defaultValue!=null&&yn(i,!!g.multiple,g.defaultValue,!0);break;default:typeof j.onClick=="function"&&(i.onclick=sl)}switch(h){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Et(l),null;case 6:if(i&&l.stateNode!=null)A0(i,l,i.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(s(166));if(h=xr(ka.current),xr(Yn.current),ul(l)){if(g=l.stateNode,h=l.memoizedProps,g[Kn]=l,(b=g.nodeValue!==h)&&(i=an,i!==null))switch(i.tag){case 3:nl(g.nodeValue,h,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&nl(g.nodeValue,h,(i.mode&1)!==0)}b&&(l.flags|=4)}else g=(h.nodeType===9?h:h.ownerDocument).createTextNode(g),g[Kn]=l,l.stateNode=g}return Et(l),null;case 13:if(Je(nt),g=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(et&&on!==null&&(l.mode&1)!==0&&(l.flags&128)===0)I1(),ci(),l.flags|=98560,b=!1;else if(b=ul(l),g!==null&&g.dehydrated!==null){if(i===null){if(!b)throw Error(s(318));if(b=l.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(s(317));b[Kn]=l}else ci(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Et(l),b=!1}else Mn!==null&&(Ud(Mn),Mn=null),b=!0;if(!b)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=h,l):(g=g!==null,g!==(i!==null&&i.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(i===null||(nt.current&1)!==0?ft===0&&(ft=3):Vd())),l.updateQueue!==null&&(l.flags|=4),Et(l),null);case 4:return pi(),Rd(i,l),i===null&&ha(l.stateNode.containerInfo),Et(l),null;case 10:return ad(l.type._context),Et(l),null;case 17:return Ut(l.type)&&il(),Et(l),null;case 19:if(Je(nt),b=l.memoizedState,b===null)return Et(l),null;if(g=(l.flags&128)!==0,$=b.rendering,$===null)if(g)Na(b,!1);else{if(ft!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if($=gl(i),$!==null){for(l.flags|=128,Na(b,!1),g=$.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=h,h=l.child;h!==null;)b=h,i=g,b.flags&=14680066,$=b.alternate,$===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=$.childLanes,b.lanes=$.lanes,b.child=$.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=$.memoizedProps,b.memoizedState=$.memoizedState,b.updateQueue=$.updateQueue,b.type=$.type,i=$.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),h=h.sibling;return Qe(nt,nt.current&1|2),l.child}i=i.sibling}b.tail!==null&&ot()>xi&&(l.flags|=128,g=!0,Na(b,!1),l.lanes=4194304)}else{if(!g)if(i=gl($),i!==null){if(l.flags|=128,g=!0,h=i.updateQueue,h!==null&&(l.updateQueue=h,l.flags|=4),Na(b,!0),b.tail===null&&b.tailMode==="hidden"&&!$.alternate&&!et)return Et(l),null}else 2*ot()-b.renderingStartTime>xi&&h!==1073741824&&(l.flags|=128,g=!0,Na(b,!1),l.lanes=4194304);b.isBackwards?($.sibling=l.child,l.child=$):(h=b.last,h!==null?h.sibling=$:l.child=$,b.last=$)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=ot(),l.sibling=null,h=nt.current,Qe(nt,g?h&1|2:h&1),l):(Et(l),null);case 22:case 23:return Hd(),g=l.memoizedState!==null,i!==null&&i.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(ln&1073741824)!==0&&(Et(l),l.subtreeFlags&6&&(l.flags|=8192)):Et(l),null;case 24:return null;case 25:return null}throw Error(s(156,l.tag))}function Vb(i,l){switch(ed(l),l.tag){case 1:return Ut(l.type)&&il(),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return pi(),Je(Bt),Je(Ct),pd(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 5:return dd(l),null;case 13:if(Je(nt),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(s(340));ci()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return Je(nt),null;case 4:return pi(),null;case 10:return ad(l.type._context),null;case 22:case 23:return Hd(),null;case 24:return null;default:return null}}var Sl=!1,Tt=!1,Kb=typeof WeakSet=="function"?WeakSet:Set,ge=null;function mi(i,l){var h=i.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(g){it(i,l,g)}else h.current=null}function Id(i,l,h){try{h()}catch(g){it(i,l,g)}}var P0=!1;function Yb(i,l){if(Hu=Ho,i=c1(),Lu(i)){if("selectionStart"in i)var h={start:i.selectionStart,end:i.selectionEnd};else e:{h=(h=i.ownerDocument)&&h.defaultView||window;var g=h.getSelection&&h.getSelection();if(g&&g.rangeCount!==0){h=g.anchorNode;var j=g.anchorOffset,b=g.focusNode;g=g.focusOffset;try{h.nodeType,b.nodeType}catch{h=null;break e}var $=0,L=-1,q=-1,Z=0,re=0,ae=i,se=null;t:for(;;){for(var pe;ae!==h||j!==0&&ae.nodeType!==3||(L=$+j),ae!==b||g!==0&&ae.nodeType!==3||(q=$+g),ae.nodeType===3&&($+=ae.nodeValue.length),(pe=ae.firstChild)!==null;)se=ae,ae=pe;for(;;){if(ae===i)break t;if(se===h&&++Z===j&&(L=$),se===b&&++re===g&&(q=$),(pe=ae.nextSibling)!==null)break;ae=se,se=ae.parentNode}ae=pe}h=L===-1||q===-1?null:{start:L,end:q}}else h=null}h=h||{start:0,end:0}}else h=null;for(Vu={focusedElem:i,selectionRange:h},Ho=!1,ge=l;ge!==null;)if(l=ge,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,ge=i;else for(;ge!==null;){l=ge;try{var ye=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var ve=ye.memoizedProps,lt=ye.memoizedState,K=l.stateNode,W=K.getSnapshotBeforeUpdate(l.elementType===l.type?ve:Fn(l.type,ve),lt);K.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var Y=l.stateNode.containerInfo;Y.nodeType===1?Y.textContent="":Y.nodeType===9&&Y.documentElement&&Y.removeChild(Y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(de){it(l,l.return,de)}if(i=l.sibling,i!==null){i.return=l.return,ge=i;break}ge=l.return}return ye=P0,P0=!1,ye}function Sa(i,l,h){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var j=g=g.next;do{if((j.tag&i)===i){var b=j.destroy;j.destroy=void 0,b!==void 0&&Id(l,h,b)}j=j.next}while(j!==g)}}function Cl(i,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&i)===i){var g=h.create;h.destroy=g()}h=h.next}while(h!==l)}}function zd(i){var l=i.ref;if(l!==null){var h=i.stateNode;switch(i.tag){case 5:i=h;break;default:i=h}typeof l=="function"?l(i):l.current=i}}function R0(i){var l=i.alternate;l!==null&&(i.alternate=null,R0(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&(delete l[Kn],delete l[fa],delete l[Gu],delete l[Ab],delete l[Pb])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function I0(i){return i.tag===5||i.tag===3||i.tag===4}function z0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||I0(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Md(i,l,h){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?h.nodeType===8?h.parentNode.insertBefore(i,l):h.insertBefore(i,l):(h.nodeType===8?(l=h.parentNode,l.insertBefore(i,h)):(l=h,l.appendChild(i)),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=sl));else if(g!==4&&(i=i.child,i!==null))for(Md(i,l,h),i=i.sibling;i!==null;)Md(i,l,h),i=i.sibling}function Fd(i,l,h){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?h.insertBefore(i,l):h.appendChild(i);else if(g!==4&&(i=i.child,i!==null))for(Fd(i,l,h),i=i.sibling;i!==null;)Fd(i,l,h),i=i.sibling}var jt=null,Ln=!1;function Vs(i,l,h){for(h=h.child;h!==null;)M0(i,l,h),h=h.sibling}function M0(i,l,h){if(Vn&&typeof Vn.onCommitFiberUnmount=="function")try{Vn.onCommitFiberUnmount(Oo,h)}catch{}switch(h.tag){case 5:Tt||mi(h,l);case 6:var g=jt,j=Ln;jt=null,Vs(i,l,h),jt=g,Ln=j,jt!==null&&(Ln?(i=jt,h=h.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)):jt.removeChild(h.stateNode));break;case 18:jt!==null&&(Ln?(i=jt,h=h.stateNode,i.nodeType===8?Qu(i.parentNode,h):i.nodeType===1&&Qu(i,h),sa(i)):Qu(jt,h.stateNode));break;case 4:g=jt,j=Ln,jt=h.stateNode.containerInfo,Ln=!0,Vs(i,l,h),jt=g,Ln=j;break;case 0:case 11:case 14:case 15:if(!Tt&&(g=h.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){j=g=g.next;do{var b=j,$=b.destroy;b=b.tag,$!==void 0&&((b&2)!==0||(b&4)!==0)&&Id(h,l,$),j=j.next}while(j!==g)}Vs(i,l,h);break;case 1:if(!Tt&&(mi(h,l),g=h.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=h.memoizedProps,g.state=h.memoizedState,g.componentWillUnmount()}catch(L){it(h,l,L)}Vs(i,l,h);break;case 21:Vs(i,l,h);break;case 22:h.mode&1?(Tt=(g=Tt)||h.memoizedState!==null,Vs(i,l,h),Tt=g):Vs(i,l,h);break;default:Vs(i,l,h)}}function F0(i){var l=i.updateQueue;if(l!==null){i.updateQueue=null;var h=i.stateNode;h===null&&(h=i.stateNode=new Kb),l.forEach(function(g){var j=s4.bind(null,i,g);h.has(g)||(h.add(g),g.then(j,j))})}}function _n(i,l){var h=l.deletions;if(h!==null)for(var g=0;g<h.length;g++){var j=h[g];try{var b=i,$=l,L=$;e:for(;L!==null;){switch(L.tag){case 5:jt=L.stateNode,Ln=!1;break e;case 3:jt=L.stateNode.containerInfo,Ln=!0;break e;case 4:jt=L.stateNode.containerInfo,Ln=!0;break e}L=L.return}if(jt===null)throw Error(s(160));M0(b,$,j),jt=null,Ln=!1;var q=j.alternate;q!==null&&(q.return=null),j.return=null}catch(Z){it(j,l,Z)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)L0(l,i),l=l.sibling}function L0(i,l){var h=i.alternate,g=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(_n(l,i),Gn(i),g&4){try{Sa(3,i,i.return),Cl(3,i)}catch(ve){it(i,i.return,ve)}try{Sa(5,i,i.return)}catch(ve){it(i,i.return,ve)}}break;case 1:_n(l,i),Gn(i),g&512&&h!==null&&mi(h,h.return);break;case 5:if(_n(l,i),Gn(i),g&512&&h!==null&&mi(h,h.return),i.flags&32){var j=i.stateNode;try{Ie(j,"")}catch(ve){it(i,i.return,ve)}}if(g&4&&(j=i.stateNode,j!=null)){var b=i.memoizedProps,$=h!==null?h.memoizedProps:b,L=i.type,q=i.updateQueue;if(i.updateQueue=null,q!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&Pn(j,b),Hn(L,$);var Z=Hn(L,b);for($=0;$<q.length;$+=2){var re=q[$],ae=q[$+1];re==="style"?Is(j,ae):re==="dangerouslySetInnerHTML"?je(j,ae):re==="children"?Ie(j,ae):E(j,re,ae,Z)}switch(L){case"input":xn(j,b);break;case"textarea":us(j,b);break;case"select":var se=j._wrapperState.wasMultiple;j._wrapperState.wasMultiple=!!b.multiple;var pe=b.value;pe!=null?yn(j,!!b.multiple,pe,!1):se!==!!b.multiple&&(b.defaultValue!=null?yn(j,!!b.multiple,b.defaultValue,!0):yn(j,!!b.multiple,b.multiple?[]:"",!1))}j[fa]=b}catch(ve){it(i,i.return,ve)}}break;case 6:if(_n(l,i),Gn(i),g&4){if(i.stateNode===null)throw Error(s(162));j=i.stateNode,b=i.memoizedProps;try{j.nodeValue=b}catch(ve){it(i,i.return,ve)}}break;case 3:if(_n(l,i),Gn(i),g&4&&h!==null&&h.memoizedState.isDehydrated)try{sa(l.containerInfo)}catch(ve){it(i,i.return,ve)}break;case 4:_n(l,i),Gn(i);break;case 13:_n(l,i),Gn(i),j=i.child,j.flags&8192&&(b=j.memoizedState!==null,j.stateNode.isHidden=b,!b||j.alternate!==null&&j.alternate.memoizedState!==null||(Od=ot())),g&4&&F0(i);break;case 22:if(re=h!==null&&h.memoizedState!==null,i.mode&1?(Tt=(Z=Tt)||re,_n(l,i),Tt=Z):_n(l,i),Gn(i),g&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!re&&(i.mode&1)!==0)for(ge=i,re=i.child;re!==null;){for(ae=ge=re;ge!==null;){switch(se=ge,pe=se.child,se.tag){case 0:case 11:case 14:case 15:Sa(4,se,se.return);break;case 1:mi(se,se.return);var ye=se.stateNode;if(typeof ye.componentWillUnmount=="function"){g=se,h=se.return;try{l=g,ye.props=l.memoizedProps,ye.state=l.memoizedState,ye.componentWillUnmount()}catch(ve){it(g,h,ve)}}break;case 5:mi(se,se.return);break;case 22:if(se.memoizedState!==null){q0(ae);continue}}pe!==null?(pe.return=se,ge=pe):q0(ae)}re=re.sibling}e:for(re=null,ae=i;;){if(ae.tag===5){if(re===null){re=ae;try{j=ae.stateNode,Z?(b=j.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=ae.stateNode,q=ae.memoizedProps.style,$=q!=null&&q.hasOwnProperty("display")?q.display:null,L.style.display=kn("display",$))}catch(ve){it(i,i.return,ve)}}}else if(ae.tag===6){if(re===null)try{ae.stateNode.nodeValue=Z?"":ae.memoizedProps}catch(ve){it(i,i.return,ve)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;re===ae&&(re=null),ae=ae.return}re===ae&&(re=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:_n(l,i),Gn(i),g&4&&F0(i);break;case 21:break;default:_n(l,i),Gn(i)}}function Gn(i){var l=i.flags;if(l&2){try{e:{for(var h=i.return;h!==null;){if(I0(h)){var g=h;break e}h=h.return}throw Error(s(160))}switch(g.tag){case 5:var j=g.stateNode;g.flags&32&&(Ie(j,""),g.flags&=-33);var b=z0(i);Fd(i,b,j);break;case 3:case 4:var $=g.stateNode.containerInfo,L=z0(i);Md(i,L,$);break;default:throw Error(s(161))}}catch(q){it(i,i.return,q)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function Qb(i,l,h){ge=i,_0(i)}function _0(i,l,h){for(var g=(i.mode&1)!==0;ge!==null;){var j=ge,b=j.child;if(j.tag===22&&g){var $=j.memoizedState!==null||Sl;if(!$){var L=j.alternate,q=L!==null&&L.memoizedState!==null||Tt;L=Sl;var Z=Tt;if(Sl=$,(Tt=q)&&!Z)for(ge=j;ge!==null;)$=ge,q=$.child,$.tag===22&&$.memoizedState!==null?D0(j):q!==null?(q.return=$,ge=q):D0(j);for(;b!==null;)ge=b,_0(b),b=b.sibling;ge=j,Sl=L,Tt=Z}O0(i)}else(j.subtreeFlags&8772)!==0&&b!==null?(b.return=j,ge=b):O0(i)}}function O0(i){for(;ge!==null;){var l=ge;if((l.flags&8772)!==0){var h=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Tt||Cl(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!Tt)if(h===null)g.componentDidMount();else{var j=l.elementType===l.type?h.memoizedProps:Fn(l.type,h.memoizedProps);g.componentDidUpdate(j,h.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var b=l.updateQueue;b!==null&&q1(l,b,g);break;case 3:var $=l.updateQueue;if($!==null){if(h=null,l.child!==null)switch(l.child.tag){case 5:h=l.child.stateNode;break;case 1:h=l.child.stateNode}q1(l,$,h)}break;case 5:var L=l.stateNode;if(h===null&&l.flags&4){h=L;var q=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":q.autoFocus&&h.focus();break;case"img":q.src&&(h.src=q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var Z=l.alternate;if(Z!==null){var re=Z.memoizedState;if(re!==null){var ae=re.dehydrated;ae!==null&&sa(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Tt||l.flags&512&&zd(l)}catch(se){it(l,l.return,se)}}if(l===i){ge=null;break}if(h=l.sibling,h!==null){h.return=l.return,ge=h;break}ge=l.return}}function q0(i){for(;ge!==null;){var l=ge;if(l===i){ge=null;break}var h=l.sibling;if(h!==null){h.return=l.return,ge=h;break}ge=l.return}}function D0(i){for(;ge!==null;){var l=ge;try{switch(l.tag){case 0:case 11:case 15:var h=l.return;try{Cl(4,l)}catch(q){it(l,h,q)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var j=l.return;try{g.componentDidMount()}catch(q){it(l,j,q)}}var b=l.return;try{zd(l)}catch(q){it(l,b,q)}break;case 5:var $=l.return;try{zd(l)}catch(q){it(l,$,q)}}}catch(q){it(l,l.return,q)}if(l===i){ge=null;break}var L=l.sibling;if(L!==null){L.return=l.return,ge=L;break}ge=l.return}}var Gb=Math.ceil,$l=P.ReactCurrentDispatcher,Ld=P.ReactCurrentOwner,Nn=P.ReactCurrentBatchConfig,De=0,xt=null,ut=null,bt=0,ln=0,gi=Ds(0),ft=0,Ca=null,kr=0,El=0,_d=0,$a=null,Ht=null,Od=0,xi=1/0,ys=null,Tl=!1,qd=null,Ks=null,Al=!1,Ys=null,Pl=0,Ea=0,Dd=null,Rl=-1,Il=0;function Lt(){return(De&6)!==0?ot():Rl!==-1?Rl:Rl=ot()}function Qs(i){return(i.mode&1)===0?1:(De&2)!==0&&bt!==0?bt&-bt:Ib.transition!==null?(Il===0&&(Il=zm()),Il):(i=He,i!==0||(i=window.event,i=i===void 0?16:Um(i.type)),i)}function On(i,l,h,g){if(50<Ea)throw Ea=0,Dd=null,Error(s(185));Xi(i,h,g),((De&2)===0||i!==xt)&&(i===xt&&((De&2)===0&&(El|=h),ft===4&&Gs(i,bt)),Vt(i,g),h===1&&De===0&&(l.mode&1)===0&&(xi=ot()+500,ol&&Us()))}function Vt(i,l){var h=i.callbackNode;I3(i,l);var g=Bo(i,i===xt?bt:0);if(g===0)h!==null&&Pm(h),i.callbackNode=null,i.callbackPriority=0;else if(l=g&-g,i.callbackPriority!==l){if(h!=null&&Pm(h),l===1)i.tag===0?Rb(U0.bind(null,i)):E1(U0.bind(null,i)),Eb(function(){(De&6)===0&&Us()}),h=null;else{switch(Mm(g)){case 1:h=vu;break;case 4:h=Rm;break;case 16:h=_o;break;case 536870912:h=Im;break;default:h=_o}h=Z0(h,B0.bind(null,i))}i.callbackPriority=l,i.callbackNode=h}}function B0(i,l){if(Rl=-1,Il=0,(De&6)!==0)throw Error(s(327));var h=i.callbackNode;if(yi()&&i.callbackNode!==h)return null;var g=Bo(i,i===xt?bt:0);if(g===0)return null;if((g&30)!==0||(g&i.expiredLanes)!==0||l)l=zl(i,g);else{l=g;var j=De;De|=2;var b=H0();(xt!==i||bt!==l)&&(ys=null,xi=ot()+500,jr(i,l));do try{Jb();break}catch(L){W0(i,L)}while(!0);id(),$l.current=b,De=j,ut!==null?l=0:(xt=null,bt=0,l=ft)}if(l!==0){if(l===2&&(j=ju(i),j!==0&&(g=j,l=Bd(i,j))),l===1)throw h=Ca,jr(i,0),Gs(i,g),Vt(i,ot()),h;if(l===6)Gs(i,g);else{if(j=i.current.alternate,(g&30)===0&&!Zb(j)&&(l=zl(i,g),l===2&&(b=ju(i),b!==0&&(g=b,l=Bd(i,b))),l===1))throw h=Ca,jr(i,0),Gs(i,g),Vt(i,ot()),h;switch(i.finishedWork=j,i.finishedLanes=g,l){case 0:case 1:throw Error(s(345));case 2:br(i,Ht,ys);break;case 3:if(Gs(i,g),(g&130023424)===g&&(l=Od+500-ot(),10<l)){if(Bo(i,0)!==0)break;if(j=i.suspendedLanes,(j&g)!==g){Lt(),i.pingedLanes|=i.suspendedLanes&j;break}i.timeoutHandle=Yu(br.bind(null,i,Ht,ys),l);break}br(i,Ht,ys);break;case 4:if(Gs(i,g),(g&4194240)===g)break;for(l=i.eventTimes,j=-1;0<g;){var $=31-In(g);b=1<<$,$=l[$],$>j&&(j=$),g&=~b}if(g=j,g=ot()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*Gb(g/1960))-g,10<g){i.timeoutHandle=Yu(br.bind(null,i,Ht,ys),g);break}br(i,Ht,ys);break;case 5:br(i,Ht,ys);break;default:throw Error(s(329))}}}return Vt(i,ot()),i.callbackNode===h?B0.bind(null,i):null}function Bd(i,l){var h=$a;return i.current.memoizedState.isDehydrated&&(jr(i,l).flags|=256),i=zl(i,l),i!==2&&(l=Ht,Ht=h,l!==null&&Ud(l)),i}function Ud(i){Ht===null?Ht=i:Ht.push.apply(Ht,i)}function Zb(i){for(var l=i;;){if(l.flags&16384){var h=l.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var g=0;g<h.length;g++){var j=h[g],b=j.getSnapshot;j=j.value;try{if(!zn(b(),j))return!1}catch{return!1}}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Gs(i,l){for(l&=~_d,l&=~El,i.suspendedLanes|=l,i.pingedLanes&=~l,i=i.expirationTimes;0<l;){var h=31-In(l),g=1<<h;i[h]=-1,l&=~g}}function U0(i){if((De&6)!==0)throw Error(s(327));yi();var l=Bo(i,0);if((l&1)===0)return Vt(i,ot()),null;var h=zl(i,l);if(i.tag!==0&&h===2){var g=ju(i);g!==0&&(l=g,h=Bd(i,g))}if(h===1)throw h=Ca,jr(i,0),Gs(i,l),Vt(i,ot()),h;if(h===6)throw Error(s(345));return i.finishedWork=i.current.alternate,i.finishedLanes=l,br(i,Ht,ys),Vt(i,ot()),null}function Wd(i,l){var h=De;De|=1;try{return i(l)}finally{De=h,De===0&&(xi=ot()+500,ol&&Us())}}function vr(i){Ys!==null&&Ys.tag===0&&(De&6)===0&&yi();var l=De;De|=1;var h=Nn.transition,g=He;try{if(Nn.transition=null,He=1,i)return i()}finally{He=g,Nn.transition=h,De=l,(De&6)===0&&Us()}}function Hd(){ln=gi.current,Je(gi)}function jr(i,l){i.finishedWork=null,i.finishedLanes=0;var h=i.timeoutHandle;if(h!==-1&&(i.timeoutHandle=-1,$b(h)),ut!==null)for(h=ut.return;h!==null;){var g=h;switch(ed(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&il();break;case 3:pi(),Je(Bt),Je(Ct),pd();break;case 5:dd(g);break;case 4:pi();break;case 13:Je(nt);break;case 19:Je(nt);break;case 10:ad(g.type._context);break;case 22:case 23:Hd()}h=h.return}if(xt=i,ut=i=Zs(i.current,null),bt=ln=l,ft=0,Ca=null,_d=El=kr=0,Ht=$a=null,gr!==null){for(l=0;l<gr.length;l++)if(h=gr[l],g=h.interleaved,g!==null){h.interleaved=null;var j=g.next,b=h.pending;if(b!==null){var $=b.next;b.next=j,g.next=$}h.pending=g}gr=null}return i}function W0(i,l){do{var h=ut;try{if(id(),xl.current=jl,yl){for(var g=st.memoizedState;g!==null;){var j=g.queue;j!==null&&(j.pending=null),g=g.next}yl=!1}if(yr=0,gt=pt=st=null,va=!1,ja=0,Ld.current=null,h===null||h.return===null){ft=1,Ca=l,ut=null;break}e:{var b=i,$=h.return,L=h,q=l;if(l=bt,L.flags|=32768,q!==null&&typeof q=="object"&&typeof q.then=="function"){var Z=q,re=L,ae=re.tag;if((re.mode&1)===0&&(ae===0||ae===11||ae===15)){var se=re.alternate;se?(re.updateQueue=se.updateQueue,re.memoizedState=se.memoizedState,re.lanes=se.lanes):(re.updateQueue=null,re.memoizedState=null)}var pe=m0($);if(pe!==null){pe.flags&=-257,g0(pe,$,L,b,l),pe.mode&1&&f0(b,Z,l),l=pe,q=Z;var ye=l.updateQueue;if(ye===null){var ve=new Set;ve.add(q),l.updateQueue=ve}else ye.add(q);break e}else{if((l&1)===0){f0(b,Z,l),Vd();break e}q=Error(s(426))}}else if(et&&L.mode&1){var lt=m0($);if(lt!==null){(lt.flags&65536)===0&&(lt.flags|=256),g0(lt,$,L,b,l),sd(fi(q,L));break e}}b=q=fi(q,L),ft!==4&&(ft=2),$a===null?$a=[b]:$a.push(b),b=$;do{switch(b.tag){case 3:b.flags|=65536,l&=-l,b.lanes|=l;var K=h0(b,q,l);O1(b,K);break e;case 1:L=q;var W=b.type,Y=b.stateNode;if((b.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(Ks===null||!Ks.has(Y)))){b.flags|=65536,l&=-l,b.lanes|=l;var de=p0(b,L,l);O1(b,de);break e}}b=b.return}while(b!==null)}K0(h)}catch(be){l=be,ut===h&&h!==null&&(ut=h=h.return);continue}break}while(!0)}function H0(){var i=$l.current;return $l.current=jl,i===null?jl:i}function Vd(){(ft===0||ft===3||ft===2)&&(ft=4),xt===null||(kr&268435455)===0&&(El&268435455)===0||Gs(xt,bt)}function zl(i,l){var h=De;De|=2;var g=H0();(xt!==i||bt!==l)&&(ys=null,jr(i,l));do try{Xb();break}catch(j){W0(i,j)}while(!0);if(id(),De=h,$l.current=g,ut!==null)throw Error(s(261));return xt=null,bt=0,ft}function Xb(){for(;ut!==null;)V0(ut)}function Jb(){for(;ut!==null&&!N3();)V0(ut)}function V0(i){var l=G0(i.alternate,i,ln);i.memoizedProps=i.pendingProps,l===null?K0(i):ut=l,Ld.current=null}function K0(i){var l=i;do{var h=l.alternate;if(i=l.return,(l.flags&32768)===0){if(h=Hb(h,l,ln),h!==null){ut=h;return}}else{if(h=Vb(h,l),h!==null){h.flags&=32767,ut=h;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{ft=6,ut=null;return}}if(l=l.sibling,l!==null){ut=l;return}ut=l=i}while(l!==null);ft===0&&(ft=5)}function br(i,l,h){var g=He,j=Nn.transition;try{Nn.transition=null,He=1,e4(i,l,h,g)}finally{Nn.transition=j,He=g}return null}function e4(i,l,h,g){do yi();while(Ys!==null);if((De&6)!==0)throw Error(s(327));h=i.finishedWork;var j=i.finishedLanes;if(h===null)return null;if(i.finishedWork=null,i.finishedLanes=0,h===i.current)throw Error(s(177));i.callbackNode=null,i.callbackPriority=0;var b=h.lanes|h.childLanes;if(z3(i,b),i===xt&&(ut=xt=null,bt=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Al||(Al=!0,Z0(_o,function(){return yi(),null})),b=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||b){b=Nn.transition,Nn.transition=null;var $=He;He=1;var L=De;De|=4,Ld.current=null,Yb(i,h),L0(h,i),vb(Vu),Ho=!!Hu,Vu=Hu=null,i.current=h,Qb(h),S3(),De=L,He=$,Nn.transition=b}else i.current=h;if(Al&&(Al=!1,Ys=i,Pl=j),b=i.pendingLanes,b===0&&(Ks=null),E3(h.stateNode),Vt(i,ot()),l!==null)for(g=i.onRecoverableError,h=0;h<l.length;h++)j=l[h],g(j.value,{componentStack:j.stack,digest:j.digest});if(Tl)throw Tl=!1,i=qd,qd=null,i;return(Pl&1)!==0&&i.tag!==0&&yi(),b=i.pendingLanes,(b&1)!==0?i===Dd?Ea++:(Ea=0,Dd=i):Ea=0,Us(),null}function yi(){if(Ys!==null){var i=Mm(Pl),l=Nn.transition,h=He;try{if(Nn.transition=null,He=16>i?16:i,Ys===null)var g=!1;else{if(i=Ys,Ys=null,Pl=0,(De&6)!==0)throw Error(s(331));var j=De;for(De|=4,ge=i.current;ge!==null;){var b=ge,$=b.child;if((ge.flags&16)!==0){var L=b.deletions;if(L!==null){for(var q=0;q<L.length;q++){var Z=L[q];for(ge=Z;ge!==null;){var re=ge;switch(re.tag){case 0:case 11:case 15:Sa(8,re,b)}var ae=re.child;if(ae!==null)ae.return=re,ge=ae;else for(;ge!==null;){re=ge;var se=re.sibling,pe=re.return;if(R0(re),re===Z){ge=null;break}if(se!==null){se.return=pe,ge=se;break}ge=pe}}}var ye=b.alternate;if(ye!==null){var ve=ye.child;if(ve!==null){ye.child=null;do{var lt=ve.sibling;ve.sibling=null,ve=lt}while(ve!==null)}}ge=b}}if((b.subtreeFlags&2064)!==0&&$!==null)$.return=b,ge=$;else e:for(;ge!==null;){if(b=ge,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Sa(9,b,b.return)}var K=b.sibling;if(K!==null){K.return=b.return,ge=K;break e}ge=b.return}}var W=i.current;for(ge=W;ge!==null;){$=ge;var Y=$.child;if(($.subtreeFlags&2064)!==0&&Y!==null)Y.return=$,ge=Y;else e:for($=W;ge!==null;){if(L=ge,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:Cl(9,L)}}catch(be){it(L,L.return,be)}if(L===$){ge=null;break e}var de=L.sibling;if(de!==null){de.return=L.return,ge=de;break e}ge=L.return}}if(De=j,Us(),Vn&&typeof Vn.onPostCommitFiberRoot=="function")try{Vn.onPostCommitFiberRoot(Oo,i)}catch{}g=!0}return g}finally{He=h,Nn.transition=l}}return!1}function Y0(i,l,h){l=fi(h,l),l=h0(i,l,1),i=Hs(i,l,1),l=Lt(),i!==null&&(Xi(i,1,l),Vt(i,l))}function it(i,l,h){if(i.tag===3)Y0(i,i,h);else for(;l!==null;){if(l.tag===3){Y0(l,i,h);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Ks===null||!Ks.has(g))){i=fi(h,i),i=p0(l,i,1),l=Hs(l,i,1),i=Lt(),l!==null&&(Xi(l,1,i),Vt(l,i));break}}l=l.return}}function t4(i,l,h){var g=i.pingCache;g!==null&&g.delete(l),l=Lt(),i.pingedLanes|=i.suspendedLanes&h,xt===i&&(bt&h)===h&&(ft===4||ft===3&&(bt&130023424)===bt&&500>ot()-Od?jr(i,0):_d|=h),Vt(i,l)}function Q0(i,l){l===0&&((i.mode&1)===0?l=1:(l=Do,Do<<=1,(Do&130023424)===0&&(Do=4194304)));var h=Lt();i=ms(i,l),i!==null&&(Xi(i,l,h),Vt(i,h))}function n4(i){var l=i.memoizedState,h=0;l!==null&&(h=l.retryLane),Q0(i,h)}function s4(i,l){var h=0;switch(i.tag){case 13:var g=i.stateNode,j=i.memoizedState;j!==null&&(h=j.retryLane);break;case 19:g=i.stateNode;break;default:throw Error(s(314))}g!==null&&g.delete(l),Q0(i,h)}var G0;G0=function(i,l,h){if(i!==null)if(i.memoizedProps!==l.pendingProps||Bt.current)Wt=!0;else{if((i.lanes&h)===0&&(l.flags&128)===0)return Wt=!1,Wb(i,l,h);Wt=(i.flags&131072)!==0}else Wt=!1,et&&(l.flags&1048576)!==0&&T1(l,cl,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;Nl(i,l),i=l.pendingProps;var j=ai(l,Ct.current);hi(l,h),j=gd(null,l,g,i,j,h);var b=xd();return l.flags|=1,typeof j=="object"&&j!==null&&typeof j.render=="function"&&j.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Ut(g)?(b=!0,al(l)):b=!1,l.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,cd(l),j.updater=bl,l.stateNode=j,j._reactInternals=l,wd(l,g,i,h),l=$d(null,l,g,!0,b,h)):(l.tag=0,et&&b&&Ju(l),Ft(null,l,j,h),l=l.child),l;case 16:g=l.elementType;e:{switch(Nl(i,l),i=l.pendingProps,j=g._init,g=j(g._payload),l.type=g,j=l.tag=i4(g),i=Fn(g,i),j){case 0:l=Cd(null,l,g,i,h);break e;case 1:l=b0(null,l,g,i,h);break e;case 11:l=x0(null,l,g,i,h);break e;case 14:l=y0(null,l,g,Fn(g.type,i),h);break e}throw Error(s(306,g,""))}return l;case 0:return g=l.type,j=l.pendingProps,j=l.elementType===g?j:Fn(g,j),Cd(i,l,g,j,h);case 1:return g=l.type,j=l.pendingProps,j=l.elementType===g?j:Fn(g,j),b0(i,l,g,j,h);case 3:e:{if(w0(l),i===null)throw Error(s(387));g=l.pendingProps,b=l.memoizedState,j=b.element,_1(i,l),ml(l,g,null,h);var $=l.memoizedState;if(g=$.element,b.isDehydrated)if(b={element:g,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){j=fi(Error(s(423)),l),l=N0(i,l,g,h,j);break e}else if(g!==j){j=fi(Error(s(424)),l),l=N0(i,l,g,h,j);break e}else for(on=qs(l.stateNode.containerInfo.firstChild),an=l,et=!0,Mn=null,h=F1(l,null,g,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ci(),g===j){l=xs(i,l,h);break e}Ft(i,l,g,h)}l=l.child}return l;case 5:return D1(l),i===null&&nd(l),g=l.type,j=l.pendingProps,b=i!==null?i.memoizedProps:null,$=j.children,Ku(g,j)?$=null:b!==null&&Ku(g,b)&&(l.flags|=32),j0(i,l),Ft(i,l,$,h),l.child;case 6:return i===null&&nd(l),null;case 13:return S0(i,l,h);case 4:return ud(l,l.stateNode.containerInfo),g=l.pendingProps,i===null?l.child=ui(l,null,g,h):Ft(i,l,g,h),l.child;case 11:return g=l.type,j=l.pendingProps,j=l.elementType===g?j:Fn(g,j),x0(i,l,g,j,h);case 7:return Ft(i,l,l.pendingProps,h),l.child;case 8:return Ft(i,l,l.pendingProps.children,h),l.child;case 12:return Ft(i,l,l.pendingProps.children,h),l.child;case 10:e:{if(g=l.type._context,j=l.pendingProps,b=l.memoizedProps,$=j.value,Qe(hl,g._currentValue),g._currentValue=$,b!==null)if(zn(b.value,$)){if(b.children===j.children&&!Bt.current){l=xs(i,l,h);break e}}else for(b=l.child,b!==null&&(b.return=l);b!==null;){var L=b.dependencies;if(L!==null){$=b.child;for(var q=L.firstContext;q!==null;){if(q.context===g){if(b.tag===1){q=gs(-1,h&-h),q.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var re=Z.pending;re===null?q.next=q:(q.next=re.next,re.next=q),Z.pending=q}}b.lanes|=h,q=b.alternate,q!==null&&(q.lanes|=h),od(b.return,h,l),L.lanes|=h;break}q=q.next}}else if(b.tag===10)$=b.type===l.type?null:b.child;else if(b.tag===18){if($=b.return,$===null)throw Error(s(341));$.lanes|=h,L=$.alternate,L!==null&&(L.lanes|=h),od($,h,l),$=b.sibling}else $=b.child;if($!==null)$.return=b;else for($=b;$!==null;){if($===l){$=null;break}if(b=$.sibling,b!==null){b.return=$.return,$=b;break}$=$.return}b=$}Ft(i,l,j.children,h),l=l.child}return l;case 9:return j=l.type,g=l.pendingProps.children,hi(l,h),j=bn(j),g=g(j),l.flags|=1,Ft(i,l,g,h),l.child;case 14:return g=l.type,j=Fn(g,l.pendingProps),j=Fn(g.type,j),y0(i,l,g,j,h);case 15:return k0(i,l,l.type,l.pendingProps,h);case 17:return g=l.type,j=l.pendingProps,j=l.elementType===g?j:Fn(g,j),Nl(i,l),l.tag=1,Ut(g)?(i=!0,al(l)):i=!1,hi(l,h),u0(l,g,j),wd(l,g,j,h),$d(null,l,g,!0,i,h);case 19:return $0(i,l,h);case 22:return v0(i,l,h)}throw Error(s(156,l.tag))};function Z0(i,l){return Am(i,l)}function r4(i,l,h,g){this.tag=i,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(i,l,h,g){return new r4(i,l,h,g)}function Kd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function i4(i){if(typeof i=="function")return Kd(i)?1:0;if(i!=null){if(i=i.$$typeof,i===M)return 11;if(i===G)return 14}return 2}function Zs(i,l){var h=i.alternate;return h===null?(h=Sn(i.tag,l,i.key,i.mode),h.elementType=i.elementType,h.type=i.type,h.stateNode=i.stateNode,h.alternate=i,i.alternate=h):(h.pendingProps=l,h.type=i.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=i.flags&14680064,h.childLanes=i.childLanes,h.lanes=i.lanes,h.child=i.child,h.memoizedProps=i.memoizedProps,h.memoizedState=i.memoizedState,h.updateQueue=i.updateQueue,l=i.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=i.sibling,h.index=i.index,h.ref=i.ref,h}function Ml(i,l,h,g,j,b){var $=2;if(g=i,typeof i=="function")Kd(i)&&($=1);else if(typeof i=="string")$=5;else e:switch(i){case _:return wr(h.children,j,b,l);case I:$=8,j|=8;break;case D:return i=Sn(12,h,l,j|2),i.elementType=D,i.lanes=b,i;case J:return i=Sn(13,h,l,j),i.elementType=J,i.lanes=b,i;case U:return i=Sn(19,h,l,j),i.elementType=U,i.lanes=b,i;case V:return Fl(h,j,b,l);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:$=10;break e;case F:$=9;break e;case M:$=11;break e;case G:$=14;break e;case ue:$=16,g=null;break e}throw Error(s(130,i==null?i:typeof i,""))}return l=Sn($,h,l,j),l.elementType=i,l.type=g,l.lanes=b,l}function wr(i,l,h,g){return i=Sn(7,i,g,l),i.lanes=h,i}function Fl(i,l,h,g){return i=Sn(22,i,g,l),i.elementType=V,i.lanes=h,i.stateNode={isHidden:!1},i}function Yd(i,l,h){return i=Sn(6,i,null,l),i.lanes=h,i}function Qd(i,l,h){return l=Sn(4,i.children!==null?i.children:[],i.key,l),l.lanes=h,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}function a4(i,l,h,g,j){this.tag=l,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bu(0),this.expirationTimes=bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bu(0),this.identifierPrefix=g,this.onRecoverableError=j,this.mutableSourceEagerHydrationData=null}function Gd(i,l,h,g,j,b,$,L,q){return i=new a4(i,l,h,L,q),l===1?(l=1,b===!0&&(l|=8)):l=0,b=Sn(3,null,null,l),i.current=b,b.stateNode=i,b.memoizedState={element:g,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},cd(b),i}function o4(i,l,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:g==null?null:""+g,children:i,containerInfo:l,implementation:h}}function X0(i){if(!i)return Bs;i=i._reactInternals;e:{if(dr(i)!==i||i.tag!==1)throw Error(s(170));var l=i;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Ut(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(s(171))}if(i.tag===1){var h=i.type;if(Ut(h))return C1(i,h,l)}return l}function J0(i,l,h,g,j,b,$,L,q){return i=Gd(h,g,!0,i,j,b,$,L,q),i.context=X0(null),h=i.current,g=Lt(),j=Qs(h),b=gs(g,j),b.callback=l??null,Hs(h,b,j),i.current.lanes=j,Xi(i,j,g),Vt(i,g),i}function Ll(i,l,h,g){var j=l.current,b=Lt(),$=Qs(j);return h=X0(h),l.context===null?l.context=h:l.pendingContext=h,l=gs(b,$),l.payload={element:i},g=g===void 0?null:g,g!==null&&(l.callback=g),i=Hs(j,l,$),i!==null&&(On(i,j,$,b),fl(i,j,$)),$}function _l(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function eg(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var h=i.retryLane;i.retryLane=h!==0&&h<l?h:l}}function Zd(i,l){eg(i,l),(i=i.alternate)&&eg(i,l)}function l4(){return null}var tg=typeof reportError=="function"?reportError:function(i){console.error(i)};function Xd(i){this._internalRoot=i}Ol.prototype.render=Xd.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(s(409));Ll(i,l,null,null)},Ol.prototype.unmount=Xd.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;vr(function(){Ll(null,i,null,null)}),l[ds]=null}};function Ol(i){this._internalRoot=i}Ol.prototype.unstable_scheduleHydration=function(i){if(i){var l=_m();i={blockedOn:null,target:i,priority:l};for(var h=0;h<Ls.length&&l!==0&&l<Ls[h].priority;h++);Ls.splice(h,0,i),h===0&&Dm(i)}};function Jd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ql(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ng(){}function c4(i,l,h,g,j){if(j){if(typeof g=="function"){var b=g;g=function(){var Z=_l($);b.call(Z)}}var $=J0(l,g,i,0,null,!1,!1,"",ng);return i._reactRootContainer=$,i[ds]=$.current,ha(i.nodeType===8?i.parentNode:i),vr(),$}for(;j=i.lastChild;)i.removeChild(j);if(typeof g=="function"){var L=g;g=function(){var Z=_l(q);L.call(Z)}}var q=Gd(i,0,!1,null,null,!1,!1,"",ng);return i._reactRootContainer=q,i[ds]=q.current,ha(i.nodeType===8?i.parentNode:i),vr(function(){Ll(l,q,h,g)}),q}function Dl(i,l,h,g,j){var b=h._reactRootContainer;if(b){var $=b;if(typeof j=="function"){var L=j;j=function(){var q=_l($);L.call(q)}}Ll(l,$,i,j)}else $=c4(h,l,i,j,g);return _l($)}Fm=function(i){switch(i.tag){case 3:var l=i.stateNode;if(l.current.memoizedState.isDehydrated){var h=Zi(l.pendingLanes);h!==0&&(wu(l,h|1),Vt(l,ot()),(De&6)===0&&(xi=ot()+500,Us()))}break;case 13:vr(function(){var g=ms(i,1);if(g!==null){var j=Lt();On(g,i,1,j)}}),Zd(i,1)}},Nu=function(i){if(i.tag===13){var l=ms(i,134217728);if(l!==null){var h=Lt();On(l,i,134217728,h)}Zd(i,134217728)}},Lm=function(i){if(i.tag===13){var l=Qs(i),h=ms(i,l);if(h!==null){var g=Lt();On(h,i,l,g)}Zd(i,l)}},_m=function(){return He},Om=function(i,l){var h=He;try{return He=i,l()}finally{He=h}},gu=function(i,l,h){switch(l){case"input":if(xn(i,h),l=h.name,h.type==="radio"&&l!=null){for(h=i;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<h.length;l++){var g=h[l];if(g!==i&&g.form===i.form){var j=rl(g);if(!j)throw Error(s(90));Ot(g),xn(g,j)}}}break;case"textarea":us(i,h);break;case"select":l=h.value,l!=null&&yn(i,!!h.multiple,l,!1)}},wm=Wd,Nm=vr;var u4={usingClientEntryPoint:!1,Events:[ma,ri,rl,jm,bm,Wd]},Ta={findFiberByHostInstance:hr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d4={bundleType:Ta.bundleType,version:Ta.version,rendererPackageName:Ta.rendererPackageName,rendererConfig:Ta.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Em(i),i===null?null:i.stateNode},findFiberByHostInstance:Ta.findFiberByHostInstance||l4,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 Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{Oo=Bl.inject(d4),Vn=Bl}catch{}}return Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=u4,Kt.createPortal=function(i,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jd(l))throw Error(s(200));return o4(i,l,null,h)},Kt.createRoot=function(i,l){if(!Jd(i))throw Error(s(299));var h=!1,g="",j=tg;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(j=l.onRecoverableError)),l=Gd(i,1,!1,null,null,h,!1,g,j),i[ds]=l.current,ha(i.nodeType===8?i.parentNode:i),new Xd(l)},Kt.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(s(188)):(i=Object.keys(i).join(","),Error(s(268,i)));return i=Em(l),i=i===null?null:i.stateNode,i},Kt.flushSync=function(i){return vr(i)},Kt.hydrate=function(i,l,h){if(!ql(l))throw Error(s(200));return Dl(null,i,l,!0,h)},Kt.hydrateRoot=function(i,l,h){if(!Jd(i))throw Error(s(405));var g=h!=null&&h.hydratedSources||null,j=!1,b="",$=tg;if(h!=null&&(h.unstable_strictMode===!0&&(j=!0),h.identifierPrefix!==void 0&&(b=h.identifierPrefix),h.onRecoverableError!==void 0&&($=h.onRecoverableError)),l=J0(l,null,i,1,h??null,j,!1,b,$),i[ds]=l.current,ha(i),g)for(i=0;i<g.length;i++)h=g[i],j=h._getVersion,j=j(h._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[h,j]:l.mutableSourceEagerHydrationData.push(h,j);return new Ol(l)},Kt.render=function(i,l,h){if(!ql(l))throw Error(s(200));return Dl(null,i,l,!1,h)},Kt.unmountComponentAtNode=function(i){if(!ql(i))throw Error(s(40));return i._reactRootContainer?(vr(function(){Dl(null,null,i,!1,function(){i._reactRootContainer=null,i[ds]=null})}),!0):!1},Kt.unstable_batchedUpdates=Wd,Kt.unstable_renderSubtreeIntoContainer=function(i,l,h,g){if(!ql(h))throw Error(s(200));if(i==null||i._reactInternals===void 0)throw Error(s(38));return Dl(i,l,h,!1,g)},Kt.version="18.3.1-next-f1338f8080-20240426",Kt}var ug;function Hy(){if(ug)return nh.exports;ug=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),nh.exports=y4(),nh.exports}var dg;function k4(){if(dg)return Ul;dg=1;var e=Hy();return Ul.createRoot=e.createRoot,Ul.hydrateRoot=e.hydrateRoot,Ul}var v4=k4(),qr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},j4=class extends qr{#t;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Gp=new j4,b4={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},w4=class{#t=b4;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,n){return this.#t.setTimeout(e,n)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,n){return this.#t.setInterval(e,n)}clearInterval(e){this.#t.clearInterval(e)}},Cr=new w4;function N4(e){setTimeout(e,0)}var S4=typeof window>"u"||"Deno"in globalThis;function At(){}function C4(e,n){return typeof e=="function"?e(n):e}function ep(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vy(e,n){return Math.max(e+(n||0)-Date.now(),0)}function ar(e,n){return typeof e=="function"?e(n):e}function dn(e,n){return typeof e=="function"?e(n):e}function hg(e,n){const{type:s="all",exact:r,fetchStatus:a,predicate:o,queryKey:c,stale:u}=e;if(c){if(r){if(n.queryHash!==Zp(c,n.options))return!1}else if(!Qa(n.queryKey,c))return!1}if(s!=="all"){const d=n.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof u=="boolean"&&n.isStale()!==u||a&&a!==n.state.fetchStatus||o&&!o(n))}function pg(e,n){const{exact:s,status:r,predicate:a,mutationKey:o}=e;if(o){if(!n.options.mutationKey)return!1;if(s){if(Fr(n.options.mutationKey)!==Fr(o))return!1}else if(!Qa(n.options.mutationKey,o))return!1}return!(r&&n.state.status!==r||a&&!a(n))}function Zp(e,n){return(n?.queryKeyHashFn||Fr)(e)}function Fr(e){return JSON.stringify(e,(n,s)=>tp(s)?Object.keys(s).sort().reduce((r,a)=>(r[a]=s[a],r),{}):s)}function Qa(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(s=>Qa(e[s],n[s])):!1}var $4=Object.prototype.hasOwnProperty;function Xp(e,n,s=0){if(e===n)return e;if(s>500)return n;const r=fg(e)&&fg(n);if(!r&&!(tp(e)&&tp(n)))return n;const o=(r?e:Object.keys(e)).length,c=r?n:Object.keys(n),u=c.length,d=r?new Array(u):{};let p=0;for(let f=0;f<u;f++){const m=r?f:c[f],y=e[m],x=n[m];if(y===x){d[m]=y,(r?f<o:$4.call(e,m))&&p++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){d[m]=x;continue}const v=Xp(y,x,s+1);d[m]=v,v===y&&p++}return o===u&&p===o?e:d}function Ga(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const s in e)if(e[s]!==n[s])return!1;return!0}function fg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tp(e){if(!mg(e))return!1;const n=e.constructor;if(n===void 0)return!0;const s=n.prototype;return!(!mg(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function mg(e){return Object.prototype.toString.call(e)==="[object Object]"}function E4(e){return new Promise(n=>{Cr.setTimeout(n,e)})}function np(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?Xp(e,n):n}function T4(e){return e}function A4(e,n,s=0){const r=[...e,n];return s&&r.length>s?r.slice(1):r}function P4(e,n,s=0){const r=[n,...e];return s&&r.length>s?r.slice(0,-1):r}var Jp=Symbol();function Ky(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Jp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ef(e,n){return typeof e=="function"?e(...n):!!e}function R4(e,n,s){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=n(),r||(r=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),e}var Za=(()=>{let e=()=>S4;return{isServer(){return e()},setIsServer(n){e=n}}})();function sp(){let e,n;const s=new Promise((a,o)=>{e=a,n=o});s.status="pending",s.catch(()=>{});function r(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},s.reject=a=>{r({status:"rejected",reason:a}),n(a)},s}var I4=N4;function z4(){let e=[],n=0,s=u=>{u()},r=u=>{u()},a=I4;const o=u=>{n?e.push(u):a(()=>{s(u)})},c=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{s(d)})})})};return{batch:u=>{let d;n++;try{d=u()}finally{n--,n||c()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var at=z4(),M4=class extends qr{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#t}},pc=new M4;function F4(e){return Math.min(1e3*2**e,3e4)}function Yy(e){return(e??"online")==="online"?pc.isOnline():!0}var rp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Qy(e){let n=!1,s=0,r;const a=sp(),o=()=>a.status!=="pending",c=k=>{if(!o()){const N=new rp(k);y(N),e.onCancel?.(N)}},u=()=>{n=!0},d=()=>{n=!1},p=()=>Gp.isFocused()&&(e.networkMode==="always"||pc.isOnline())&&e.canRun(),f=()=>Yy(e.networkMode)&&e.canRun(),m=k=>{o()||(r?.(),a.resolve(k))},y=k=>{o()||(r?.(),a.reject(k))},x=()=>new Promise(k=>{r=N=>{(o()||p())&&k(N)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),v=()=>{if(o())return;let k;const N=s===0?e.initialPromise:void 0;try{k=N??e.fn()}catch(w){k=Promise.reject(w)}Promise.resolve(k).then(m).catch(w=>{if(o())return;const S=e.retry??(Za.isServer()?0:3),E=e.retryDelay??F4,P=typeof E=="function"?E(s,w):E,B=S===!0||typeof S=="number"&&s<S||typeof S=="function"&&S(s,w);if(n||!B){y(w);return}s++,e.onFail?.(s,w),E4(P).then(()=>p()?void 0:x()).then(()=>{n?y(w):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:f,start:()=>(f()?v():x().then(v),a)}}var Gy=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ep(this.gcTime)&&(this.#t=Cr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Za.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(Cr.clearTimeout(this.#t),this.#t=void 0)}};function L4(e){return{onFetch:(n,s)=>{const r=n.options,a=n.fetchOptions?.meta?.fetchMore?.direction,o=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const p=async()=>{let f=!1;const m=v=>{R4(v,()=>n.signal,()=>f=!0)},y=Ky(n.options,n.fetchOptions),x=async(v,k,N)=>{if(f)return Promise.reject(n.signal.reason);if(k==null&&v.pages.length)return Promise.resolve(v);const S=(()=>{const T={client:n.client,queryKey:n.queryKey,pageParam:k,direction:N?"backward":"forward",meta:n.options.meta};return m(T),T})(),E=await y(S),{maxPages:P}=n.options,B=N?P4:A4;return{pages:B(v.pages,E,P),pageParams:B(v.pageParams,k,P)}};if(a&&o.length){const v=a==="backward",k=v?_4:gg,N={pages:o,pageParams:c},w=k(r,N);u=await x(N,w,v)}else{const v=e??o.length;do{const k=d===0?c[0]??r.initialPageParam:gg(r,u);if(d>0&&k==null)break;u=await x(u,k),d++}while(d<v)}return u};n.options.persister?n.fetchFn=()=>n.options.persister?.(p,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=p}}}function gg(e,{pages:n,pageParams:s}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,s[r],s):void 0}function _4(e,{pages:n,pageParams:s}){return n.length>0?e.getPreviousPageParam?.(n[0],n,s[0],s):void 0}var O4=class extends Gy{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#s=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=yg(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=yg(this.options);n.data!==void 0&&(this.setState(xg(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,n){const s=np(this.state.data,e,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),s}setState(e){this.#l({type:"setState",state:e})}cancel(e){const n=this.#i?.promise;return this.#i?.cancel(e),n?n.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>dn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ar(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Vy(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#i&&(this.#a||this.#u()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},a=()=>{const d=Ky(this.options,n),f=(()=>{const m={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#a=!1,this.options.persister?this.options.persister(d,f,this):d(f)},c=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:a};return r(d),d})();(this.#t==="infinite"?L4(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#i=Qy({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof rp&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#l({type:"failed",failureCount:d,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#i.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#s.config.onSuccess?.(d,this),this.#s.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof rp){if(d.silent)return this.#i.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#s.config.onError?.(d,this),this.#s.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Zy(s.data,this.options),fetchMeta:e.meta??null};case"success":const r={...s,...xg(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const a=e.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),at.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Zy(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yy(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xg(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function yg(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,s=n!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var tf=class extends qr{constructor(e,n){super(),this.options=n,this.#t=e,this.#a=null,this.#o=sp(),this.bindMethods(),this.setOptions(n)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#i;#o;#a;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),kg(this.#e,this.options)?this.#h():this.updateResult(),this.#k())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ip(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ip(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#j(),this.#e.removeObserver(this)}setOptions(e){const n=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#e.setOptions(this.options),n._defaulted&&!Ga(this.options,n)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&vg(this.#e,s,this.options,n)&&this.#h(),this.updateResult(),r&&(this.#e!==s||dn(this.options.enabled,this.#e)!==dn(n.enabled,this.#e)||ar(this.options.staleTime,this.#e)!==ar(n.staleTime,this.#e))&&this.#g();const a=this.#x();r&&(this.#e!==s||dn(this.options.enabled,this.#e)!==dn(n.enabled,this.#e)||a!==this.#c)&&this.#y(a)}getOptimisticResult(e){const n=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(n,e);return D4(this,s)&&(this.#s=s,this.#i=this.options,this.#r=this.#e.state),s}getCurrentResult(){return this.#s}trackResult(e,n){return new Proxy(e,{get:(s,r)=>(this.trackProp(r),n?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#t.defaultQueryOptions(e),s=this.#t.getQueryCache().build(this.#t,n);return s.fetch().then(()=>this.createResult(s,n))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#h(e){this.#b();let n=this.#e.fetch(this.options,e);return e?.throwOnError||(n=n.catch(At)),n}#g(){this.#v();const e=ar(this.options.staleTime,this.#e);if(Za.isServer()||this.#s.isStale||!ep(e))return;const s=Vy(this.#s.dataUpdatedAt,e)+1;this.#d=Cr.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#j(),this.#c=e,!(Za.isServer()||dn(this.options.enabled,this.#e)===!1||!ep(this.#c)||this.#c===0)&&(this.#f=Cr.setInterval(()=>{(this.options.refetchIntervalInBackground||Gp.isFocused())&&this.#h()},this.#c))}#k(){this.#g(),this.#y(this.#x())}#v(){this.#d!==void 0&&(Cr.clearTimeout(this.#d),this.#d=void 0)}#j(){this.#f!==void 0&&(Cr.clearInterval(this.#f),this.#f=void 0)}createResult(e,n){const s=this.#e,r=this.options,a=this.#s,o=this.#r,c=this.#i,d=e!==s?e.state:this.#n,{state:p}=e;let f={...p},m=!1,y;if(n._optimisticResults){const I=this.hasListeners(),D=!I&&kg(e,n),R=I&&vg(e,s,n,r);(D||R)&&(f={...f,...Zy(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:x,errorUpdatedAt:v,status:k}=f;y=f.data;let N=!1;if(n.placeholderData!==void 0&&y===void 0&&k==="pending"){let I;a?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(I=a.data,N=!0):I=typeof n.placeholderData=="function"?n.placeholderData(this.#p?.state.data,this.#p):n.placeholderData,I!==void 0&&(k="success",y=np(a?.data,I,n),m=!0)}if(n.select&&y!==void 0&&!N)if(a&&y===o?.data&&n.select===this.#u)y=this.#l;else try{this.#u=n.select,y=n.select(y),y=np(a?.data,y,n),this.#l=y,this.#a=null}catch(I){this.#a=I}this.#a&&(x=this.#a,y=this.#l,v=Date.now(),k="error");const w=f.fetchStatus==="fetching",S=k==="pending",E=k==="error",P=S&&w,B=y!==void 0,_={status:k,fetchStatus:f.fetchStatus,isPending:S,isSuccess:k==="success",isError:E,isInitialLoading:P,isLoading:P,data:y,dataUpdatedAt:f.dataUpdatedAt,error:x,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:E&&!B,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&B,isStale:nf(e,n),refetch:this.refetch,promise:this.#o,isEnabled:dn(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=_.data!==void 0,D=_.status==="error"&&!I,R=J=>{D?J.reject(_.error):I&&J.resolve(_.data)},F=()=>{const J=this.#o=_.promise=sp();R(J)},M=this.#o;switch(M.status){case"pending":e.queryHash===s.queryHash&&R(M);break;case"fulfilled":(D||_.data!==M.value)&&F();break;case"rejected":(!D||_.error!==M.reason)&&F();break}}return _}updateResult(){const e=this.#s,n=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#e),Ga(n,e))return;this.#s=n;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#m.size)return!0;const o=new Set(a??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#s).some(c=>{const u=c;return this.#s[u]!==e[u]&&o.has(u)})};this.#w({listeners:s()})}#b(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const n=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#k()}#w(e){at.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function q4(e,n){return dn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&dn(n.retryOnMount,e)===!1)}function kg(e,n){return q4(e,n)||e.state.data!==void 0&&ip(e,n,n.refetchOnMount)}function ip(e,n,s){if(dn(n.enabled,e)!==!1&&ar(n.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&nf(e,n)}return!1}function vg(e,n,s,r){return(e!==n||dn(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&nf(e,s)}function nf(e,n){return dn(n.enabled,e)!==!1&&e.isStaleByTime(ar(n.staleTime,e))}function D4(e,n){return!Ga(e.getCurrentResult(),n)}var B4=class extends Gy{#t;#e;#n;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Xy(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Qy({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(o,c)=>{this.#r({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#s.canStart();try{if(r)n();else{this.#r({type:"pending",variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,s);const c=await this.options.onMutate?.(e,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:a})}const o=await this.#s.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,s),await this.options.onSuccess?.(o,e,this.state.context,s),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(o,null,e,this.state.context,s),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(o,e,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),at.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Xy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var U4=class extends qr{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,n,s){const r=new B4({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:s});return this.add(r),r}add(e){this.#t.add(e);const n=Wl(e);if(typeof n=="string"){const s=this.#e.get(n);s?s.push(e):this.#e.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const n=Wl(e);if(typeof n=="string"){const s=this.#e.get(n);if(s)if(s.length>1){const r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&this.#e.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Wl(e);if(typeof n=="string"){const r=this.#e.get(n)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const n=Wl(e);return typeof n=="string"?this.#e.get(n)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){at.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const n={exact:!0,...e};return this.getAll().find(s=>pg(n,s))}findAll(e={}){return this.getAll().filter(n=>pg(e,n))}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return at.batch(()=>Promise.all(e.map(n=>n.continue().catch(At))))}};function Wl(e){return e.options.scope?.id}var W4=class extends qr{#t;#e=void 0;#n;#s;constructor(n,s){super(),this.#t=n,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const s=this.options;this.options=this.#t.defaultMutationOptions(n),Ga(this.options,s)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Fr(s.mutationKey)!==Fr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#i(n)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(n,s){return this.#s=s,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Xy();this.#e={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#i(n){at.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#e.variables,r=this.#e.context,a={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#s.onSuccess?.(n.data,s,r,a)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(n.data,null,s,r,a)}catch(o){Promise.reject(o)}}else if(n?.type==="error"){try{this.#s.onError?.(n.error,s,r,a)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(void 0,n.error,s,r,a)}catch(o){Promise.reject(o)}}}this.listeners.forEach(s=>{s(this.#e)})})}};function jg(e,n){const s=new Set(n);return e.filter(r=>!s.has(r))}function H4(e,n,s){const r=e.slice(0);return r[n]=s,r}var V4=class extends qr{#t;#e;#n;#s;#r;#i;#o;#a;#u;#l=[];constructor(e,n,s){super(),this.#t=e,this.#s=s,this.#n=[],this.#r=[],this.#e=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(n=>{this.#m(e,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,n){this.#n=e,this.#s=n,at.batch(()=>{const s=this.#r,r=this.#c(this.#n);r.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const a=r.map(f=>f.observer),o=a.map(f=>f.getCurrentResult()),c=s.length!==a.length,u=a.some((f,m)=>f!==s[m]),d=c||u,p=d?!0:o.some((f,m)=>{const y=this.#e[m];return!y||!Ga(f,y)});!d&&!p||(d&&(this.#l=r,this.#r=a),this.#e=o,this.hasListeners()&&(d&&(jg(s,a).forEach(f=>{f.destroy()}),jg(a,s).forEach(f=>{f.subscribe(m=>{this.#m(f,m)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,n){const s=this.#c(e),r=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),a=s.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>this.#d(o??r,n,a),()=>this.#p(r,s)]}#p(e,n){return n.map((s,r)=>{const a=e[r];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{n.forEach(c=>{c.observer.trackProp(o)})})})}#d(e,n,s){if(n){const r=this.#u,a=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((o,c)=>o!==r[c]));return(!this.#i||this.#e!==this.#a||a||n!==this.#o)&&(this.#o=n,this.#a=this.#e,s!==void 0&&(this.#u=s),this.#i=Xp(this.#i,n(e))),this.#i}return e}#f(){return this.#s?.combine!==void 0&&this.#r.some((e,n)=>e.options.suspense&&this.#e[n]?.data===void 0)}#c(e){const n=new Map;this.#r.forEach(r=>{const a=r.options.queryHash;if(!a)return;const o=n.get(a);o?o.push(r):n.set(a,[r])});const s=[];return e.forEach(r=>{const a=this.#t.defaultQueryOptions(r),c=n.get(a.queryHash)?.shift()??new tf(this.#t,a);s.push({defaultedQueryOptions:a,observer:c})}),s}#m(e,n){const s=this.#r.indexOf(e);s!==-1&&(this.#e=H4(this.#e,s,n),this.#h())}#h(){if(this.hasListeners()){const e=this.#p(this.#e,this.#l),n=this.#f(),s=this.#i,r=n?s:this.#d(e,this.#s?.combine);(n||s!==r)&&at.batch(()=>{this.listeners.forEach(a=>{a(this.#e)})})}}},K4=class extends qr{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,n,s){const r=n.queryKey,a=n.queryHash??Zp(r,n);let o=this.get(a);return o||(o=new O4({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#t.get(e.queryHash);n&&(e.destroy(),n===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>hg(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>hg(e,s)):n}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Y4=class{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e={}){this.#t=e.queryCache||new K4,this.#e=e.mutationCache||new U4,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=Gp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=pc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),s=this.#t.build(this,n),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(ar(n.staleTime,s))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:n,state:s})=>{const r=s.data;return[n,r]})}setQueryData(e,n,s){const r=this.defaultQueryOptions({queryKey:e}),o=this.#t.get(r.queryHash)?.state.data,c=C4(n,o);if(c!==void 0)return this.#t.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(e,n,s){return at.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,s)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state}removeQueries(e){const n=this.#t;at.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=this.#t;return at.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const s={revert:!0,...n},r=at.batch(()=>this.#t.findAll(e).map(a=>a.cancel(s)));return Promise.all(r).then(At).catch(At)}invalidateQueries(e,n={}){return at.batch(()=>(this.#t.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const s={...n,cancelRefetch:n.cancelRefetch??!0},r=at.batch(()=>this.#t.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,s);return s.throwOnError||(o=o.catch(At)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(At)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=this.#t.build(this,n);return s.isStaleByTime(ar(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return pc.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#s.set(Fr(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#s.values()],s={};return n.forEach(r=>{Qa(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,n){this.#r.set(Fr(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],s={};return n.forEach(r=>{Qa(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Zp(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Jp&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Jy=C.createContext(void 0),os=e=>{const n=C.useContext(Jy);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},Q4=({client:e,children:n})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),t.jsx(Jy.Provider,{value:e,children:n})),e2=C.createContext(!1),t2=()=>C.useContext(e2);e2.Provider;function G4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z4=C.createContext(G4()),n2=()=>C.useContext(Z4),s2=(e,n,s)=>{const r=s?.state.error&&typeof e.throwOnError=="function"?ef(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(n.isReset()||(e.retryOnMount=!1))},r2=e=>{C.useEffect(()=>{e.clearReset()},[e])},i2=({result:e,errorResetBoundary:n,throwOnError:s,query:r,suspense:a})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||ef(s,[e.error,r])),a2=e=>{if(e.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>s(r(...a)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},X4=(e,n)=>e.isLoading&&e.isFetching&&!n,ap=(e,n)=>e?.suspense&&n.isPending,op=(e,n,s)=>n.fetchOptimistic(e).catch(()=>{s.clearReset()});function J4({queries:e,...n},s){const r=os(),a=t2(),o=n2(),c=C.useMemo(()=>e.map(k=>{const N=r.defaultQueryOptions(k);return N._optimisticResults=a?"isRestoring":"optimistic",N}),[e,r,a]);c.forEach(k=>{a2(k);const N=r.getQueryCache().get(k.queryHash);s2(k,o,N)}),r2(o);const[u]=C.useState(()=>new V4(r,c,n)),[d,p,f]=u.getOptimisticResult(c,n.combine),m=!a&&n.subscribed!==!1;C.useSyncExternalStore(C.useCallback(k=>m?u.subscribe(at.batchCalls(k)):At,[u,m]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),C.useEffect(()=>{u.setQueries(c,n)},[c,n,u]);const x=d.some((k,N)=>ap(c[N],k))?d.flatMap((k,N)=>{const w=c[N];if(w&&ap(w,k)){const S=new tf(r,w);return op(w,S,o)}return[]}):[];if(x.length>0)throw Promise.all(x);const v=d.find((k,N)=>{const w=c[N];return w&&i2({result:k,errorResetBoundary:o,throwOnError:w.throwOnError,query:r.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(v?.error)throw v.error;return p(f())}function ew(e,n,s){const r=t2(),a=n2(),o=os(),c=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const u=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",a2(c),s2(c,a,u),r2(a);const d=!o.getQueryCache().get(c.queryHash),[p]=C.useState(()=>new n(o,c)),f=p.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(y=>{const x=m?p.subscribe(at.batchCalls(y)):At;return p.updateResult(),x},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),C.useEffect(()=>{p.setOptions(c)},[c,p]),ap(c,f))throw op(c,p,a);if(i2({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!Za.isServer()&&X4(f,r)&&(d?op(c,p,a):u?.promise)?.catch(At).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?f:p.trackResult(f)}function Pe(e,n){return ew(e,tf)}function o2(e,n){const s=os(),[r]=C.useState(()=>new W4(s,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const a=C.useSyncExternalStore(C.useCallback(c=>r.subscribe(at.batchCalls(c)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((c,u)=>{r.mutate(c,u).catch(At)},[r]);if(a.error&&ef(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var qa=typeof window<"u"?C.useLayoutEffect:C.useEffect;function ih(e){const n=C.useRef({value:e,prev:null}),s=n.current.value;return e!==s&&(n.current={value:e,prev:s}),n.current.prev}function tw(e,n,s={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([o])=>{n(o)},s);return a.observe(e.current),()=>{a.disconnect()}},[n,s,r.disabled,e])}function nw(e){const n=C.useRef(null);return C.useImperativeHandle(e,()=>n.current,[]),n}const l2=!1;function Xa(e){return e[e.length-1]}function sw(e){return typeof e=="function"}function tr(e,n){return sw(e)?e(n):e}const c2=Object.prototype.hasOwnProperty,bg=Object.prototype.propertyIsEnumerable;function u2(e){for(const n in e)if(c2.call(e,n))return!0;return!1}const rw=()=>Object.create(null),Nr=(e,n)=>nr(e,n,rw);function nr(e,n,s=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const a=n,o=Sg(e)&&Sg(a);if(!o&&!(Ei(e)&&Ei(a)))return a;const c=o?e:wg(e);if(!c)return a;const u=o?a:wg(a);if(!u)return a;const d=c.length,p=u.length,f=o?new Array(p):s();let m=0;for(let y=0;y<p;y++){const x=o?y:u[y],v=e[x],k=a[x];if(v===k){f[x]=v,(o?y<d:c2.call(e,x))&&m++;continue}if(v===null||k===null||typeof v!="object"||typeof k!="object"){f[x]=k;continue}const N=nr(v,k,s,r+1);f[x]=N,N===v&&m++}return d===p&&m===d?e:f}function wg(e){const n=Object.getOwnPropertyNames(e);for(const a of n)if(!bg.call(e,a))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return n;const r=n;for(const a of s){if(!bg.call(e,a))return!1;r.push(a)}return r}function Ei(e){if(!Ng(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const s=n.prototype;return!(!Ng(s)||!s.hasOwnProperty("isPrototypeOf"))}function Ng(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Er(e,n,s){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Er(e[r],n[r],s))return!1;return!0}if(Ei(e)&&Ei(n)){const r=s?.ignoreUndefined??!0;if(s?.partial){for(const c in n)if((!r||n[c]!==void 0)&&!Er(e[c],n[c],s))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&a++;let o=0;for(const c in n)if((!r||n[c]!==void 0)&&(o++,o>a||!Er(e[c],n[c],s)))return!1;return a===o}return!1}function Ti(e){let n,s;const r=new Promise((a,o)=>{n=a,s=o});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,n(a),e?.(a)},r.reject=a=>{r.status="rejected",s(a)},r}function Ja(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function iw(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Cg(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return iw(n)}const aw=["http:","https:","mailto:","tel:"];function fc(e,n){if(!e)return!1;try{const s=new URL(e);return!n.has(s.protocol)}catch{return!1}}function Pa(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let s=0,r="",a;for(;(a=n.exec(e))!==null;)r+=Cg(e.slice(s,a.index))+a[0],s=n.lastIndex;r=r+Cg(s?e.slice(s):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function ow(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function lw(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==n[s])return!1;return!0}function bs(){throw new Error("Invariant failed")}function eo(e){const n=new Map;let s,r;const a=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,s=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const c=n.get(o);if(c)return a(c),c.value},set(o,c){if(n.size>=e&&s){const d=s;n.delete(d.key),d.next&&(s=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=n.get(o);if(u)u.value=c,a(u);else{const d={key:o,value:c,prev:r};r&&(r.next=d),r=d,s||(s=d),n.set(o,d)}},clear(){n.clear(),s=void 0,r=void 0}}}const sr=4,d2=5;function cw(e){const n=e.indexOf("{");if(n===-1)return null;const s=e.indexOf("}",n);return s===-1||n+1>=e.length?null:[n,s]}function h2(e,n,s=new Uint16Array(6)){const r=e.indexOf("/",n),a=r===-1?e.length:r,o=e.substring(n,a);if(!o||!o.includes("$"))return s[0]=0,s[1]=n,s[2]=n,s[3]=a,s[4]=a,s[5]=a,s;if(o==="$"){const u=e.length;return s[0]=2,s[1]=n,s[2]=n,s[3]=u,s[4]=u,s[5]=u,s}if(o.charCodeAt(0)===36)return s[0]=1,s[1]=n,s[2]=n+1,s[3]=a,s[4]=a,s[5]=a,s;const c=cw(o);if(c){const[u,d]=c,p=o.charCodeAt(u+1);if(p===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const f=u+3,m=d;if(f<m)return s[0]=3,s[1]=n+u,s[2]=n+f,s[3]=n+m,s[4]=n+d+1,s[5]=a,s}}else if(p===36){const f=u+1,m=u+2;return m===d?(s[0]=2,s[1]=n+u,s[2]=n+f,s[3]=n+m,s[4]=n+d+1,s[5]=e.length,s):(s[0]=1,s[1]=n+u,s[2]=n+m,s[3]=n+d,s[4]=n+d+1,s[5]=a,s)}}return s[0]=0,s[1]=n,s[2]=n,s[3]=a,s[4]=a,s[5]=a,s}function Dc(e,n,s,r,a,o,c){c?.(s);let u=r;{const d=s.fullPath??s.from,p=d.length,f=s.options?.caseSensitive??e,m=s.options?.params?.parse??s.options?.parseParams;for(;u<p;){const x=h2(d,u,n);let v;const k=u,N=x[5];switch(u=N+1,o++,x[0]){case 0:{const w=d.substring(x[2],x[3]);if(f){const S=a.static?.get(w);if(S)v=S;else{a.static??=new Map;const E=$r(s.fullPath??s.from);E.parent=a,E.depth=o,v=E,a.static.set(w,E)}}else{const S=w.toLowerCase(),E=a.staticInsensitive?.get(S);if(E)v=E;else{a.staticInsensitive??=new Map;const P=$r(s.fullPath??s.from);P.parent=a,P.depth=o,v=P,a.staticInsensitive.set(S,P)}}break}case 1:{const w=d.substring(k,x[1]),S=d.substring(x[4],N),E=f&&!!(w||S),P=w?E?w:w.toLowerCase():void 0,B=S?E?S:S.toLowerCase():void 0,T=!m&&a.dynamic?.find(_=>!_.parse&&_.caseSensitive===E&&_.prefix===P&&_.suffix===B);if(T)v=T;else{const _=oh(1,s.fullPath??s.from,E,P,B);v=_,_.depth=o,_.parent=a,a.dynamic??=[],a.dynamic.push(_)}break}case 3:{const w=d.substring(k,x[1]),S=d.substring(x[4],N),E=f&&!!(w||S),P=w?E?w:w.toLowerCase():void 0,B=S?E?S:S.toLowerCase():void 0,T=!m&&a.optional?.find(_=>!_.parse&&_.caseSensitive===E&&_.prefix===P&&_.suffix===B);if(T)v=T;else{const _=oh(3,s.fullPath??s.from,E,P,B);v=_,_.parent=a,_.depth=o,a.optional??=[],a.optional.push(_)}break}case 2:{const w=d.substring(k,x[1]),S=d.substring(x[4],N),E=f&&!!(w||S),P=w?E?w:w.toLowerCase():void 0,B=S?E?S:S.toLowerCase():void 0,T=oh(2,s.fullPath??s.from,E,P,B);v=T,T.parent=a,T.depth=o,a.wildcard??=[],a.wildcard.push(T)}}a=v}if(m&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const x=$r(s.fullPath??s.from);x.kind=d2,x.parent=a,o++,x.depth=o,a.pathless??=[],a.pathless.push(x),a=x}const y=(s.path||!s.children)&&!s.isRoot;if(y&&d.endsWith("/")){const x=$r(s.fullPath??s.from);x.kind=sr,x.parent=a,o++,x.depth=o,a.index=x,a=x}a.parse=m??null,y&&!a.route&&(a.route=s,a.fullPath=s.fullPath??s.from)}if(s.children)for(const d of s.children)Dc(e,n,d,u,a,o,c)}function ah(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function er(e){if(e.pathless)for(const n of e.pathless)er(n);if(e.static)for(const n of e.static.values())er(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())er(n);if(e.dynamic?.length){e.dynamic.sort(ah);for(const n of e.dynamic)er(n)}if(e.optional?.length){e.optional.sort(ah);for(const n of e.optional)er(n)}if(e.wildcard?.length){e.wildcard.sort(ah);for(const n of e.wildcard)er(n)}}function $r(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function oh(e,n,s,r,a){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,caseSensitive:s,prefix:r,suffix:a}}function uw(e,n){const s=$r("/"),r=new Uint16Array(6);for(const a of e)Dc(!1,r,a,1,s,0);er(s),n.masksTree=s,n.flatCache=eo(1e3)}function dw(e,n){e||="/";const s=n.flatCache.get(e);if(s)return s;const r=sf(e,n.masksTree);return n.flatCache.set(e,r),r}function hw(e,n,s,r,a){e||="/",r||="/";const o=n?`case\0${e}`:e;let c=a.singleCache.get(o);return c||(c=$r("/"),Dc(n,new Uint16Array(6),{from:e},1,c,0),a.singleCache.set(o,c)),sf(r,c,s)}function pw(e,n,s=!1){const r=s?e:`nofuzz\0${e}`,a=n.matchCache.get(r);if(a!==void 0)return a;e||="/";let o;try{o=sf(e,n.segmentTree,s)}catch(c){if(c instanceof URIError)o=null;else throw c}return o&&(o.branch=f2(o.route)),n.matchCache.set(r,o),o}function fw(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function mw(e,n=!1,s){const r=$r(e.fullPath),a=new Uint16Array(6),o={},c={};let u=0;return Dc(n,a,e,1,r,0,d=>{if(s?.(d,u),d.id in o&&bs(),o[d.id]=d,u!==0&&d.path){const p=fw(d.fullPath);(!c[p]||d.fullPath.endsWith("/"))&&(c[p]=d)}u++}),er(r),{processedTree:{segmentTree:r,singleCache:eo(1e3),matchCache:eo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function sf(e,n,s=!1){const r=e.split("/"),a=xw(e,r,n,s);if(!a)return null;const[o]=p2(e,r,a);return{route:a.node.route,rawParams:o}}function p2(e,n,s){const r=gw(s.node);let a=null;const o=Object.create(null);let c=s.extract?.part??0,u=s.extract?.node??0,d=s.extract?.path??0,p=s.extract?.segment??0;for(;u<r.length;c++,u++,d++,p++){const f=r[u];if(f.kind===sr)break;if(f.kind===d2){p--,c--,d--;continue}const m=n[c],y=d;if(m&&(d+=m.length),f.kind===1){a??=s.node.fullPath.split("/");const x=a[p],v=f.prefix?.length??0;if(x.charCodeAt(v)===123){const k=f.suffix?.length??0,N=x.substring(v+2,x.length-k-1),w=m.substring(v,m.length-k);o[N]=decodeURIComponent(w)}else{const k=x.substring(1);o[k]=decodeURIComponent(m)}}else if(f.kind===3){if(s.skipped&1<<u){c--,d=y-1;continue}a??=s.node.fullPath.split("/");const x=a[p],v=f.prefix?.length??0,k=f.suffix?.length??0,N=x.substring(v+3,x.length-k-1),w=f.suffix||f.prefix?m.substring(v,m.length-k):m;w&&(o[N]=decodeURIComponent(w))}else if(f.kind===2){const x=f,v=e.substring(y+(x.prefix?.length??0),e.length-(x.suffix?.length??0)),k=decodeURIComponent(v);o["*"]=k,o._splat=k;break}}return s.rawParams&&Object.assign(o,s.rawParams),[o,{part:c,node:u,path:d,segment:p}]}function f2(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function gw(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function xw(e,n,s,r){if(e==="/"&&s.index)return{node:s.index,skipped:0};const a=!Xa(n),o=a&&e!=="/",c=n.length-(a?1:0),u=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,p=null;for(;u.length;){const f=u.pop(),{node:m,index:y,skipped:x,depth:v,statics:k,dynamics:N,optionals:w}=f;let{extract:S,rawParams:E}=f;if(m.kind===2&&m.route&&!Vl(p,f))continue;if(m.parse){if(!$g(e,n,f))continue;E=f.rawParams,S=f.extract}r&&m.route&&m.kind!==sr&&Vl(d,f)&&(d=f);const P=y===c;if(P&&(m.route&&(!o||m.kind===sr||m.kind===2)&&Vl(p,f)&&(p=f),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const B=P?void 0:n[y];let T;if(P&&m.index){const _={node:m.index,index:y,skipped:x,depth:v+1,statics:k,dynamics:N,optionals:w,extract:S,rawParams:E};let I=!0;if(m.index.parse&&($g(e,n,_)||(I=!1)),I){if(!N&&!w&&!x&&yw(k,c))return _;Vl(p,_)&&(p=_)}}if(m.wildcard)for(let _=m.wildcard.length-1;_>=0;_--){const I=m.wildcard[_],{prefix:D,suffix:R}=I;if(!(D&&(P||!(I.caseSensitive?B:T??=B.toLowerCase()).startsWith(D)))){if(R){if(P)continue;const F=n.slice(y).join("/").slice(-R.length);if((I.caseSensitive?F:F.toLowerCase())!==R)continue}u.push({node:I,index:c,skipped:x,depth:v+1,statics:k,dynamics:N,optionals:w,extract:S,rawParams:E})}}if(m.optional){const _=x|1<<v,I=v+1;for(let D=m.optional.length-1;D>=0;D--){const R=m.optional[D];u.push({node:R,index:y,skipped:_,depth:I,statics:k,dynamics:N,optionals:w,extract:S,rawParams:E})}if(!P)for(let D=m.optional.length-1;D>=0;D--){const R=m.optional[D],{prefix:F,suffix:M}=R;if(F||M){const J=R.caseSensitive?B:T??=B.toLowerCase();if(F&&!J.startsWith(F)||M&&!J.endsWith(M))continue}u.push({node:R,index:y+1,skipped:x,depth:I,statics:k,dynamics:N,optionals:w+Hl(c,y),extract:S,rawParams:E})}}if(!P&&m.dynamic&&B)for(let _=m.dynamic.length-1;_>=0;_--){const I=m.dynamic[_],{prefix:D,suffix:R}=I;if(D||R){const F=I.caseSensitive?B:T??=B.toLowerCase();if(D&&!F.startsWith(D)||R&&!F.endsWith(R))continue}u.push({node:I,index:y+1,skipped:x,depth:v+1,statics:k,dynamics:N+Hl(c,y),optionals:w,extract:S,rawParams:E})}if(!P&&m.staticInsensitive){const _=m.staticInsensitive.get(T??=B.toLowerCase());_&&u.push({node:_,index:y+1,skipped:x,depth:v+1,statics:k+Hl(c,y),dynamics:N,optionals:w,extract:S,rawParams:E})}if(!P&&m.static){const _=m.static.get(B);_&&u.push({node:_,index:y+1,skipped:x,depth:v+1,statics:k+Hl(c,y),dynamics:N,optionals:w,extract:S,rawParams:E})}if(m.pathless){const _=v+1;for(let I=m.pathless.length-1;I>=0;I--){const D=m.pathless[I];u.push({node:D,index:y,skipped:x,depth:_,statics:k,dynamics:N,optionals:w,extract:S,rawParams:E})}}}if(p)return p;if(r&&d){let f=d.index;for(let y=0;y<d.index;y++)f+=n[y].length;const m=f===e.length?"/":e.slice(f);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(m),d}return null}function Hl(e,n){return 2**(e-n-1)}function yw(e,n){return e===2**(n-1)-1}function $g(e,n,s){let r,a;try{[r,a]=p2(e,n,s)}catch{return null}if(s.rawParams=r,s.extract=a,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Vl(e,n){return e?n.statics>e.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===sr)>(e.node.kind===sr)||n.node.kind===sr==(e.node.kind===sr)&&n.depth>e.depth))):!0}function oc(e){return rf(e.filter(n=>n!==void 0).join("/"))}function rf(e){return e.replace(/\/{2,}/g,"/")}function m2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function js(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function g2(e){return js(m2(e))}function mc(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function kw(e,n,s){return mc(e,s)===mc(n,s)}function vw({base:e,to:n,trailingSlash:s="never",cache:r}){const a=n.startsWith("/"),o=!a&&n===".";let c;if(r){c=a?n:o?e:e+"\0"+n;const p=r.get(c);if(p)return p}let u;if(o)u=e.split("/");else if(a)u=n.split("/");else{for(u=e.split("/");u.length>1&&Xa(u)==="";)u.pop();const p=n.split("/");for(let f=0,m=p.length;f<m;f++){const y=p[f];y===""?f?f===m-1&&u.push(y):u=[y]:y===".."?u.pop():y==="."||u.push(y)}}u.length>1&&(Xa(u)===""?s==="never"&&u.pop():s==="always"&&u.push(""));const d=rf(u.join("/"))||"/";return c&&r&&r.set(c,d),d}function jw(e){const n=new Map(e.map(a=>[encodeURIComponent(a),a])),s=Array.from(n.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(s,"g");return a=>a.replace(r,o=>n.get(o)??o)}function lh(e,n,s){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(a=>Tg(a,s)).join("/"):Tg(r,s)}function Eg({path:e,params:n,decoder:s,...r}){let a=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const c=e.length;let u=0,d,p="";for(;u<c;){const f=u;d=h2(e,f,d);const m=d[5];if(u=m+1,f===m)continue;const y=d[0];if(y===0){p+="/"+e.substring(f,m);continue}if(y===2){const x=n._splat;o._splat=x,o["*"]=x;const v=e.substring(f,d[1]),k=e.substring(d[4],m);if(!x){a=!0,(v||k)&&(p+="/"+v+k);continue}const N=lh("_splat",n,s);p+="/"+v+N+k;continue}if(y===1){const x=e.substring(d[2],d[3]);!a&&!(x in n)&&(a=!0),o[x]=n[x];const v=e.substring(f,d[1]),k=e.substring(d[4],m),N=lh(x,n,s)??"undefined";p+="/"+v+N+k;continue}if(y===3){const x=e.substring(d[2],d[3]),v=n[x];if(v==null)continue;o[x]=v;const k=e.substring(f,d[1]),N=e.substring(d[4],m),w=lh(x,n,s)??"";p+="/"+k+w+N;continue}}return e.endsWith("/")&&(p+="/"),{usedParams:o,interpolatedPath:p||"/",isMissingParams:a}}function Tg(e,n){const s=encodeURIComponent(e);return n?.(s)??s}function Rt(e){return e?.isNotFound===!0}function bw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const ww="tsr-scroll-restoration-v1_3";function Nw(){const e=bw();if(!e)return null;let n={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ei(r)&&(n=r)}catch{}return{get state(){return n},set:r=>{n=tr(r,n)||n},persist:()=>{try{e.setItem(ww,JSON.stringify(n))}catch{}}}}const Ag=Nw(),Sw=e=>e.state.__TSR_key||e.href;function Cw(e){const n=[];let s;for(;s=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${n.reverse().join(" > ")}`.toLowerCase()}let Kl=!1;const Ra="window",Pg="data-scroll-restoration-id";function $w(e,n){if(!Ag)return;const s=Ag;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,Kl=!1;const r=e.options.getScrollRestorationKey||Sw,a=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!(Kl||!e.isScrollRestoring))if(u.target===document||u.target===window)a.set(Ra,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const d=u.target;a.set(d,{scrollX:d.scrollLeft||0,scrollY:d.scrollTop||0})}},c=u=>{if(!e.isScrollRestoring||!u||a.size===0||!s)return;const d=s.state[u]||={};for(const[p,f]of a){let m;if(p===Ra)m=Ra;else if(p.isConnected){const y=p.getAttribute(Pg);m=y?`[${Pg}="${y}"]`:Cw(p)}m&&(d[m]=f)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",u=>{c(u.fromLocation?r(u.fromLocation):void 0),a.clear()}),window.addEventListener("pagehide",()=>{c(r(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",u=>{const d=r(u.toLocation),p=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors;if(a.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Kl=!0;try{const m=e.isScrollRestoring?s.state[d]:void 0;let y=!1;if(m)for(const x in m){const v=m[x];if(!Ei(v))continue;const{scrollX:k,scrollY:N}=v;if(!(!Number.isFinite(k)||!Number.isFinite(N))){if(x===Ra)window.scrollTo({top:N,left:k,behavior:p}),y=!0;else if(x){let w;try{w=document.querySelector(x)}catch{continue}w&&(w.scrollLeft=k,w.scrollTop=N,y=!0)}}}if(!y){const x=e.history.location.hash.slice(1);if(x){const v=window.history.state?.__hashScrollIntoViewOptions??!0;if(v){const k=document.getElementById(x);k&&k.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:p};if(window.scrollTo(v),f)for(const k of f){if(k===Ra)continue;const N=typeof k=="function"?k():document.querySelector(k);N&&N.scrollTo(v)}}}}finally{Kl=!1}e.isScrollRestoring&&s.set(m=>(m[d]||={},m))}})}function Ew(e,n=String){const s=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&s.set(r,n(a))}return s.toString()}function ch(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Tw(e){const n=new URLSearchParams(e),s=Object.create(null);for(const[r,a]of n.entries()){const o=s[r];o==null?s[r]=ch(a):Array.isArray(o)?o.push(ch(a)):s[r]=[o,ch(a)]}return s}const Aw=Rw(JSON.parse),Pw=Iw(JSON.stringify,JSON.parse);function Rw(e){return n=>{n[0]==="?"&&(n=n.substring(1));const s=Tw(n);for(const r in s){const a=s[r];if(typeof a=="string")try{s[r]=e(a)}catch{}}return s}}function Iw(e,n){const s=typeof n=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(s&&typeof a=="string")try{return n(a),e(a)}catch{}return a}return a=>{const o=Ew(a,r);return o?`?${o}`:""}}const Tr="__root__";function Bc(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:n});if(s.options=e,e.throw)throw s;return s}function Qt(e){return e instanceof Response&&!!e.options}function zw(e){return{input:({url:n})=>{for(const s of e)n=lp(s,n);return n},output:({url:n})=>{for(let s=e.length-1;s>=0;s--)n=x2(e[s],n);return n}}}function Mw(e){const n=g2(e.basepath),s=`/${n}`,r=`${s}/`,a=e.caseSensitive?s:s.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===a?c.pathname="/":u.startsWith(o)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=oc(["/",n,c.pathname]),c)}}function lp(e,n){const s=e?.input?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function x2(e,n){const s=e?.output?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function Fw(e,n){const{createMutableStore:s,createReadonlyStore:r,batch:a,init:o}=n,c=new Map,u=new Map,d=new Map,p=s(e.status),f=s(e.loadedAt),m=s(e.isLoading),y=s(e.isTransitioning),x=s(e.location),v=s(e.resolvedLocation),k=s(e.statusCode),N=s(e.redirect),w=s([]),S=s([]),E=s([]),P=r(()=>uh(c,w.get())),B=r(()=>uh(u,S.get())),T=r(()=>uh(d,E.get())),_=r(()=>w.get()[0]),I=r(()=>w.get().some(V=>c.get(V)?.get().status==="pending")),D=r(()=>({locationHref:x.get().href,resolvedLocationHref:v.get()?.href,status:p.get()})),R=r(()=>({status:p.get(),loadedAt:f.get(),isLoading:m.get(),isTransitioning:y.get(),matches:P.get(),location:x.get(),resolvedLocation:v.get(),statusCode:k.get(),redirect:N.get()})),F=eo(64);function M(V){let H=F.get(V);return H||(H=r(()=>{const ne=w.get();for(const A of ne){const O=c.get(A);if(O&&O.routeId===V)return O.get()}}),F.set(V,H)),H}const J={status:p,loadedAt:f,isLoading:m,isTransitioning:y,location:x,resolvedLocation:v,statusCode:k,redirect:N,matchesId:w,pendingIds:S,cachedIds:E,matches:P,pendingMatches:B,cachedMatches:T,firstId:_,hasPending:I,matchRouteDeps:D,matchStores:c,pendingMatchStores:u,cachedMatchStores:d,__store:R,getRouteMatchStore:M,setMatches:U,setPending:G,setCached:ue};U(e.matches),o?.(J);function U(V){dh(V,c,w,s,a)}function G(V){dh(V,u,S,s,a)}function ue(V){dh(V,d,E,s,a)}return J}function uh(e,n){const s=[];for(const r of n){const a=e.get(r);a&&s.push(a.get())}return s}function dh(e,n,s,r,a){const o=e.map(u=>u.id),c=new Set(o);a(()=>{for(const u of n.keys())c.has(u)||n.delete(u);for(const u of e){const d=n.get(u.id);if(!d){const p=r(u);p.routeId=u.routeId,n.set(u.id,p);continue}d.routeId=u.routeId,d.get()!==u&&d.set(u)}lw(s.get(),o)||s.set(o)})}const cp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Lw=e=>e.stores.matchesId.get().some(n=>e.stores.matchStores.get(n)?.get()._forcePending),Uc=(e,n)=>!!(e.preload&&!e.router.stores.matchStores.has(n)),Ar=(e,n,s=!0)=>{const r={...e.router.options.context??{}},a=s?n:n-1;for(let o=0;o<=a;o++){const c=e.matches[o];if(!c)continue;const u=e.router.getMatch(c.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},Rg=(e,n)=>{if(!e.matches.length)return;const s=n.routeId,r=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),a=r>=0?r:0;let o=s?e.matches.findIndex(c=>c.routeId===s):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=a);for(let c=o;c>=0;c--){const u=e.matches[c];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return c}return s?o:a},rr=(e,n,s)=>{if(!(!Qt(s)&&!Rt(s)))throw Qt(s)&&s.redirectHandled&&!s.options.reloadDocument||(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=s,e.updateMatch(n.id,r=>({...r,status:Qt(s)?"redirected":Rt(s)?"notFound":r.status==="pending"?"success":r.status,context:Ar(e,n.index),isFetching:!1,error:s})),Rt(s)&&!s.routeId&&(s.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),Qt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},y2=(e,n)=>{const s=e.router.getMatch(n);return!!(!s||s._nonReactive.dehydrated)},Ig=(e,n,s)=>{const r=Ar(e,s);e.updateMatch(n,a=>({...a,context:r}))},Ia=(e,n,s,r)=>{const{id:a,routeId:o}=e.matches[n],c=e.router.looseRoutesById[o];if(s instanceof Promise)throw s;s.routerCode=r,e.firstBadMatchIndex??=n,rr(e,e.router.getMatch(a),s);try{c.options.onError?.(s)}catch(u){s=u,rr(e,e.router.getMatch(a),s)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Qt(s)&&!Rt(s)&&(e.serialError??=s)},k2=(e,n,s,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Uc(e,n)&&(s.options.loader||s.options.beforeLoad||j2(s))&&typeof a=="number"&&a!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{cp(e)},a);r._nonReactive.pendingTimeout=o}},_w=(e,n,s)=>{const r=e.router.getMatch(n);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;k2(e,n,s,r);const a=()=>{const o=e.router.getMatch(n);o.preload&&(o.status==="redirected"||o.status==="notFound")&&rr(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},Ow=(e,n,s,r)=>{const a=e.router.getMatch(n);let o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Ti(()=>{o?.resolve(),o=void 0});const{paramsError:c,searchError:u}=a;c&&Ia(e,s,c,"PARSE_PARAMS"),u&&Ia(e,s,u,"VALIDATE_SEARCH"),k2(e,n,r,a);const d=new AbortController;let p=!1;const f=()=>{p||(p=!0,e.updateMatch(n,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:d})))},m=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,P=>({...P,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{f(),m()});return}a._nonReactive.beforeLoadPromise=Ti();const y={...Ar(e,s,!1),...a.__routeContext},{search:x,params:v,cause:k}=a,N=Uc(e,n),w={search:x,abortController:d,params:v,preload:N,context:y,location:e.location,navigate:P=>e.router.navigate({...P,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":k,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},S=P=>{if(P===void 0){e.router.batch(()=>{f(),m()});return}(Qt(P)||Rt(P))&&(f(),Ia(e,s,P,"BEFORE_LOAD")),e.router.batch(()=>{f(),e.updateMatch(n,B=>({...B,__beforeLoadContext:P})),m()})};let E;try{if(E=r.options.beforeLoad(w),Ja(E))return f(),E.catch(P=>{Ia(e,s,P,"BEFORE_LOAD")}).then(S)}catch(P){f(),Ia(e,s,P,"BEFORE_LOAD")}S(E)},qw=(e,n)=>{const{id:s,routeId:r}=e.matches[n],a=e.router.looseRoutesById[r],o=()=>u(),c=()=>Ow(e,s,n,a),u=()=>{if(y2(e,s))return;const d=_w(e,s,a);return Ja(d)?d.then(c):c()};return o()},Dw=(e,n,s)=>{const r=e.router.getMatch(n);if(!r||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const a={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([s.options.head?.(a),s.options.scripts?.(a),s.options.headers?.(a)]).then(([o,c,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:c,styles:o?.styles}))},v2=(e,n,s,r,a)=>{const o=n[r-1],{params:c,loaderDeps:u,abortController:d,cause:p}=e.router.getMatch(s),f=Ar(e,r),m=Uc(e,s);return{params:c,deps:u,preload:!!m,parentMatchPromise:o,abortController:d,context:f,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:m?"preload":p,route:a,...e.router.options.additionalContext}},zg=async(e,n,s,r,a)=>{try{const o=e.router.getMatch(s);try{(!(l2??e.router.isServer)||o.ssr===!0)&&to(a);const c=a.options.loader,u=typeof c=="function"?c:c?.handler,d=u?.(v2(e,n,s,r,a)),p=!!u&&Ja(d);if((p||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(s,m=>({...m,isFetching:"loader"})),u){const m=p?await d:d;rr(e,e.router.getMatch(s),m),m!==void 0&&e.updateMatch(s,y=>({...y,loaderData:m}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(s,m=>({...m,error:void 0,context:Ar(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let u=c;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:Ar(e,r)}));return}const d=o._nonReactive.minPendingPromise;d&&await d,Rt(c)&&await a.options.notFoundComponent?.preload?.(),rr(e,e.router.getMatch(s),c);try{a.options.onError?.(c)}catch(p){u=p,rr(e,e.router.getMatch(s),p)}!Qt(u)&&!Rt(u)&&await to(a,["errorComponent"]),e.updateMatch(s,p=>({...p,error:u,context:Ar(e,r),status:"error",isFetching:!1}))}}catch(o){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),rr(e,c,o)}},Bw=async(e,n,s)=>{async function r(x,v,k,N,w){const S=Date.now()-v.updatedAt,E=x?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,P=w.options.shouldReload,B=typeof P=="function"?P(v2(e,n,a,s,w)):P,{status:T,invalid:_}=N,I=S>=E&&(!!e.forceStaleReload||N.cause==="enter"||k!==void 0&&k!==N.id);c=T==="success"&&(_||(B??I)),x&&w.options.preload===!1||(c&&!e.sync&&f?(u=!0,(async()=>{try{await zg(e,n,a,s,w);const D=e.router.getMatch(a);D._nonReactive.loaderPromise?.resolve(),D._nonReactive.loadPromise?.resolve(),D._nonReactive.loaderPromise=void 0,D._nonReactive.loadPromise=void 0}catch(D){Qt(D)&&await e.router.navigate(D.options)}})()):T!=="success"||c?await zg(e,n,a,s,w):Ig(e,a,s))}const{id:a,routeId:o}=e.matches[s];let c=!1,u=!1;const d=e.router.looseRoutesById[o],p=d.options.loader,f=((typeof p=="function"?void 0:p?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(y2(e,a)){if(!e.router.getMatch(a))return e.matches[s];Ig(e,a,s)}else{const x=e.router.getMatch(a),v=e.router.stores.matchesId.get()[s],k=(v&&e.router.stores.matchStores.get(v)||null)?.routeId===o?v:e.router.stores.matches.get().find(w=>w.routeId===o)?.id,N=Uc(e,a);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload&&f)return x;await x._nonReactive.loaderPromise;const w=e.router.getMatch(a),S=w._nonReactive.error||w.error;S&&rr(e,w,S),w.status==="pending"&&await r(N,x,k,w,d)}else{const w=N&&!e.router.stores.matchStores.has(a),S=e.router.getMatch(a);S._nonReactive.loaderPromise=Ti(),w!==S.preload&&e.updateMatch(a,E=>({...E,preload:w})),await r(N,x,k,S,d)}}const m=e.router.getMatch(a);u||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,u||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const y=u?m.isFetching:!1;return y!==m.isFetching||m.invalid!==!1?(e.updateMatch(a,x=>({...x,isFetching:y,invalid:!1})),e.router.getMatch(a)):m};async function Mg(e){const n=e,s=[];Lw(n.router)&&cp(n);let r;for(let y=0;y<n.matches.length;y++){try{const x=qw(n,y);Ja(x)&&await x}catch(x){if(Qt(x))throw x;if(Rt(x))r=x;else if(!n.preload)throw x;break}if(n.serialError||n.firstBadMatchIndex!=null)break}const a=n.firstBadMatchIndex??n.matches.length,o=r&&!n.preload?Rg(n,r):void 0,c=r&&n.preload?0:o!==void 0?Math.min(o+1,a):a;let u,d;for(let y=0;y<c;y++)s.push(Bw(n,s,y));try{await Promise.all(s)}catch{const y=await Promise.allSettled(s);for(const x of y){if(x.status!=="rejected")continue;const v=x.reason;if(Qt(v))throw v;Rt(v)?u??=v:d??=v}if(d!==void 0)throw d}const p=u??(r&&!n.preload?r:void 0);let f=n.firstBadMatchIndex!==void 0?n.firstBadMatchIndex:n.matches.length-1;if(!p&&r&&n.preload)return n.matches;if(p){const y=Rg(n,p);y===void 0&&bs();const x=n.matches[y],v=n.router.looseRoutesById[x.routeId],k=n.router.options?.defaultNotFoundComponent;!v.options.notFoundComponent&&k&&(v.options.notFoundComponent=k),p.routeId=x.routeId;const N=x.routeId===n.router.routeTree.id;n.updateMatch(x.id,w=>({...w,...N?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:p},isFetching:!1})),f=y,await to(v,["notFoundComponent"])}else if(!n.preload){const y=n.matches[0];y.globalNotFound||n.router.getMatch(y.id)?.globalNotFound&&n.updateMatch(y.id,x=>({...x,globalNotFound:!1,error:void 0}))}if(n.serialError&&n.firstBadMatchIndex!==void 0){const y=n.router.looseRoutesById[n.matches[n.firstBadMatchIndex].routeId];await to(y,["errorComponent"])}for(let y=0;y<=f;y++){const{id:x,routeId:v}=n.matches[y],k=n.router.looseRoutesById[v];try{const N=Dw(n,x,k);if(N){const w=await N;n.updateMatch(x,S=>({...S,...w}))}}catch(N){console.error(`Error executing head for route ${v}:`,N)}}const m=cp(n);if(Ja(m)&&await m,p)throw p;if(n.serialError&&!n.preload&&!n.onReady)throw n.serialError;return n.matches}function Fg(e,n){const s=n.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function to(e,n=lc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:a,...o}=r.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:n===lc?(()=>{if(e._componentsPromise===void 0){const r=Fg(e,lc);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Fg(e,n);return e._lazyPromise?e._lazyPromise.then(s):s()}function j2(e){for(const n of lc)if(e.options[n]?.preload)return!0;return!1}const lc=["component","errorComponent","pendingComponent","notFoundComponent"];var or="__TSR_index",Lg="popstate",_g="beforeunload";function Uw(e){let n=e.getLocation();const s=new Set,r=c=>{n=e.getLocation(),s.forEach(u=>u({location:n,action:c}))},a=c=>{e.notifyOnIndexChange??!0?r(c):n=e.getLocation()},o=async({task:c,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){c();return}const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const m of p){const y=gc(d.path,d.state);if(await m.blockerFn({currentLocation:n,nextLocation:y,action:d.type})){e.onBlocked?.();return}}c()};return{get location(){return n},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,u,d)=>{const p=n.state[or];u=Og(p+1,u),o({task:()=>{e.pushState(c,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:c,state:u})},replace:(c,u,d)=>{const p=n.state[or];u=Og(p,u),o({task:()=>{e.replaceState(c,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:c,state:u})},go:(c,u)=>{o({task:()=>{e.go(c),a({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{o({task:()=>{e.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{o({task:()=>{e.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>n.state[or]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(p=>p!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Og(e,n){n||(n={});const s=af();return{...n,key:s,__TSR_key:s,[or]:e}}function Ww(e){const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let a=[];const o=()=>a,c=I=>a=I,u=(I=>I),d=(()=>gc(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const I=af();n.history.replaceState({[or]:0,key:I,__TSR_key:I},"")}let p=d(),f,m=!1,y=!1,x=!1,v=!1;const k=()=>p;let N,w;const S=()=>{N&&(_._ignoreSubscribers=!0,(N.isPush?n.history.pushState:n.history.replaceState)(N.state,"",N.href),_._ignoreSubscribers=!1,N=void 0,w=void 0,f=void 0)},E=(I,D,R)=>{const F=u(D);w||(f=p),p=gc(D,R),N={href:F,state:R,isPush:N?.isPush||I==="push"},w||(w=Promise.resolve().then(()=>S()))},P=I=>{p=d(),_.notify({type:I})},B=async()=>{if(y){y=!1;return}const I=d(),D=I.state[or]-p.state[or],R=D===1,F=D===-1,M=!R&&!F||m;m=!1;const J=M?"GO":F?"BACK":"FORWARD",U=M?{type:"GO",index:D}:{type:F?"BACK":"FORWARD"};if(x)x=!1;else{const G=o();if(typeof document<"u"&&G.length){for(const ue of G)if(await ue.blockerFn({currentLocation:p,nextLocation:I,action:J})){y=!0,n.history.go(1),_.notify(U);return}}}p=d(),_.notify(U)},T=I=>{if(v){v=!1;return}let D=!1;const R=o();if(typeof document<"u"&&R.length)for(const F of R){const M=F.enableBeforeUnload??!0;if(M===!0){D=!0;break}if(typeof M=="function"&&M()===!0){D=!0;break}}if(D)return I.preventDefault(),I.returnValue=""},_=Uw({getLocation:k,getLength:()=>n.history.length,pushState:(I,D)=>E("push",I,D),replaceState:(I,D)=>E("replace",I,D),back:I=>(I&&(x=!0),v=!0,n.history.back()),forward:I=>{I&&(x=!0),v=!0,n.history.forward()},go:I=>{m=!0,n.history.go(I)},createHref:I=>u(I),flush:S,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(_g,T,{capture:!0}),n.removeEventListener(Lg,B)},onBlocked:()=>{f&&p!==f&&(p=f)},getBlockers:o,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(_g,T,{capture:!0}),n.addEventListener(Lg,B),n.history.pushState=function(...I){const D=s.apply(n.history,I);return _._ignoreSubscribers||P("PUSH"),D},n.history.replaceState=function(...I){const D=r.apply(n.history,I);return _._ignoreSubscribers||P("REPLACE"),D},_}function Hw(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function gc(e,n){const s=Hw(e),r=s.indexOf("#"),a=s.indexOf("?"),o=af();return{href:s,pathname:s.substring(0,r>0?a>0?Math.min(r,a):r:a>0?a:s.length),hash:r>-1?s.substring(r):"",search:a>-1?s.slice(a,r===-1?void 0:r):"",state:n||{[or]:0,key:o,__TSR_key:o}}}function af(){return(Math.random()+1).toString(36).substring(7)}function Ci(e,n){const s=n,r=e;return{fromLocation:s,toLocation:r,pathChanged:s?.pathname!==r.pathname,hrefChanged:s?.href!==r.href,hashChanged:s?.hash!==r.hash}}var Vw=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=s=>s(),this.update=s=>{const r=this.options,a=this.basepath??r?.basepath??"/",o=this.basepath===void 0,c=r?.rewrite;if(this.options={...r,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=jw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ww()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=eo(1e3),f=this.buildRouteTree(),this.setRoutes(f)}if(!this.stores&&this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=Fw(Yw(this.latestLocation),f),$w(this)}let u=!1;const d=this.options.basepath??"/",p=this.options.rewrite;if(o||a!==d||c!==p){this.basepath=d;const f=[],m=g2(d);m&&m!=="/"&&f.push(Mw({basepath:d})),p&&f.push(p),this.rewrite=f.length===0?void 0:f.length===1?f[0]:zw(f),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=mw(this.routeTree,this.options.caseSensitive,(r,a)=>{r.init({originalIndex:a})});return this.options.routeMasks&&uw(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,r)=>{const a={eventType:s,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=s=>{this.subscribers.forEach(r=>{r.eventType===s.type&&r.fn(s)})},this.parseLocation=(s,r)=>{const a=({pathname:d,search:p,hash:f,href:m,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const w=this.options.parseSearch(p),S=this.options.stringifySearch(w);return{href:d+S+f,publicHref:d+S+f,pathname:Pa(d).path,external:!1,searchStr:S,search:Nr(r?.search,w),hash:Pa(f.slice(1)).path,state:nr(r?.state,y)}}const x=new URL(m,this.origin),v=lp(this.rewrite,x),k=this.options.parseSearch(v.search),N=this.options.stringifySearch(k);return v.search=N,{href:v.href.replace(v.origin,""),publicHref:m,pathname:Pa(v.pathname).path,external:!!this.rewrite&&v.origin!==this.origin,searchStr:N,search:Nr(r?.search,k),hash:Pa(v.hash.slice(1)).path,state:nr(r?.state,y)}},o=a(s),{__tempLocation:c,__tempKey:u}=o.state;if(c&&(!u||u===this.tempLocationKey)){const d=a(c);return d.state.key=o.state.key,d.state.__TSR_key=o.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:o}}return o},this.resolvePathWithBase=(s,r)=>vw({base:s,to:r.includes("//")?rf(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,r,a)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},a):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>Qw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const r=this.getMatch(s);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const r=this.stores.matchStores.get(s)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const r=(o={})=>{const c=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(c);o.from;const d=o.unsafeRelative==="path"?c.pathname:o.from??u.fullPath,p=o.to?`${o.to}`:void 0,f=u.search,m=Object.assign(Object.create(null),u.params),y=p?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),x=p?this.resolvePathWithBase(y,p):y,v=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?m:Object.assign(m,tr(o.params,m)),k=this.routesByPath[js(x)];let N;if(k)N=this.getRouteBranch(k);else if(x.includes("$"))N=[];else{const F=this.getMatchedRoutes(x);N=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(N=[...N,this.options.notFoundRoute])}if(N.length&&u2(v))for(const F of N){const M=F.options.params?.stringify??F.options.stringifyParams;if(M)try{Object.assign(v,M(v))}catch{}}const w=s.leaveParams?x:Pa(Eg({path:x,params:v,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=f;if(s._includeValidateSearch&&this.options.search?.strict){const F={};N.forEach(M=>{if(M.options.validateSearch)try{Object.assign(F,cc(M.options.validateSearch,{...F,...S}))}catch{}}),S=F}S=Gw({search:S,dest:o,destRoutes:N,_includeValidateSearch:s._includeValidateSearch}),S=Nr(f,S);const E=this.options.stringifySearch(S),P=o.hash===!0?c.hash:o.hash?tr(o.hash,c.hash):void 0,B=P?`#${P}`:"";let T=o.state===!0?c.state:o.state?tr(o.state,c.state):{};T=nr(c.state,T);const _=`${w}${E}${B}`;let I,D,R=!1;if(this.rewrite){const F=new URL(_,this.origin),M=x2(this.rewrite,F);I=F.href.replace(F.origin,""),M.origin!==this.origin?(D=M.href,R=!0):D=M.pathname+M.search+M.hash}else I=ow(_),D=I;return{publicHref:D,href:I,pathname:w,search:S,searchStr:E,state:T,hash:P??"",external:R,unmaskOnReload:o.unmaskOnReload}},a=(o={},c)=>{const u=r(o);let d=c?r(c):void 0;if(!d){const p=Object.create(null);if(this.options.routeMasks){const f=dw(u.pathname,this.processedTree);if(f){Object.assign(p,f.rawParams);const{from:m,params:y,...x}=f.route,v=y===!1||y===null?Object.create(null):(y??!0)===!0?p:Object.assign(p,tr(y,p));c={from:s.from,...x,params:v},d=r(c)}}}return d&&(u.maskedLocation=d),u};return s.mask?a(s,{from:s.from,...s.mask}):a(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...a})=>{const o=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(f=>{a.state[f]=this.latestLocation.state[f]});const p=Er(a.state,this.latestLocation.state);return d.forEach(f=>{delete a.state[f]}),p},c=js(this.latestLocation.href)===js(a.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=Ti(()=>{u?.resolve(),u=void 0}),c&&o())this.load();else{let{maskedLocation:d,hashScrollIntoView:p,...f}=a;d&&(f={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[a.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:a,viewTransition:o,ignoreBlocker:c,href:u,...d}={})=>{if(u){const m=this.history.location.state.__TSR_index,y=gc(u,{__TSR_index:s?m:m+1}),x=new URL(y.pathname,this.origin);d.to=lp(this.rewrite,x).pathname,d.search=this.options.parseSearch(y.search),d.hash=y.hash.slice(1)}const p=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const f=this.commitLocation({...p,viewTransition:o,replace:s,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:s,reloadDocument:r,href:a,publicHref:o,...c})=>{let u=!1;if(a)try{new URL(`${a}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(s!==void 0||!a){const p=this.buildLocation({to:s,...c});a=a??p.publicHref,o=o??p.publicHref}const d=!u&&o?o:a;if(fc(d,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const f of p)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...c,href:a,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(a=>!s.some(o=>o.id===a.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(r)})},this.load=async s=>{let r,a,o;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,f=Ci(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...f}),this.emit({type:"onBeforeLoad",...f}),await Mg({router:this,sync:s?.sync,forceStaleReload:c.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,y=null,x=null,v=null;this.batch(()=>{const k=this.stores.pendingMatches.get(),N=k.length,w=this.stores.matches.get();m=N?w.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const S=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&S.add(P.routeId);const E=new Set;for(const P of this.stores.matchStores.values())P.routeId&&E.add(P.routeId);y=N?w.filter(P=>!S.has(P.routeId)):null,x=N?k.filter(P=>!E.has(P.routeId)):null,v=N?k.filter(P=>E.has(P.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),N&&(this.stores.setMatches(k),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[k,N]of[[y,"onLeave"],[x,"onEnter"],[v,"onStay"]])if(k)for(const w of k)this.looseRoutesById[w.routeId].options[N]?.(w)})})}})}catch(p){Qt(p)?(r=p,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Rt(p)&&(a=p);const f=r?r.status:a?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(f),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(d=>d.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=s=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Ci(o,c)):r.types;if(u===!1){s();return}a={update:s,types:u}}else a=s;document.startViewTransition(a)}else s()},this.updateMatch=(s,r)=>{this.startTransition(()=>{const a=this.stores.pendingMatchStores.get(s);if(a){a.set(r);return}const o=this.stores.matchStores.get(s);if(o){o.set(r);return}const c=this.stores.cachedMatchStores.get(s);if(c){const u=r(c.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(d=>d.filter(p=>p!==s)):c.set(u)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const r=a=>s?.filter?.(a)??!0?{...a,invalid:!0,...s?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const r=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const a=s.options._builtLocation??this.buildLocation(s.options),o=this.getParsedLocationHref(a);s.options.href=o,s.headers.set("Location",o)}else if(r)try{const a=new URL(r);if(this.origin&&a.origin===this.origin){const o=a.pathname+a.search+a.hash;s.options.href=o,s.headers.set("Location",o)}}catch{}if(s.options.href&&!s.options._builtLocation&&fc(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const r=s?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(a=>!r(a))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),r=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const c=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:s-a.updatedAt>=c};this.clearCache({filter:r})},this.loadRouteChunk=to,this.preloadRoute=async s=>{const r=s._builtLocation??this.buildLocation(s);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:s});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...o,...this.stores.cachedIds.get()]),u=a.filter(d=>!c.has(d.id));if(u.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...u])}try{return a=await Mg({router:this,matches:a,location:r,preload:!0,updateMatch:(d,p)=>{o.has(d)?a=a.map(f=>f.id===d?p(f):f):this.updateMatch(d,p)}}),a}catch(d){if(Qt(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Rt(d)||console.error(d);return}},this.matchRoute=(s,r)=>{const a={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},o=this.buildLocation(a);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const c=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=hw(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,c.pathname,this.processedTree);return!u||s.params&&!Er(u.rawParams,s.params,{partial:!0})?!1:r?.includeSearch??!0?Er(c.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Pw,parseSearch:e.parseSearch??Aw,protocolAllowlist:e.protocolAllowlist??aw}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:s}){this.routesById=e,this.routesByPath=n,this.processedTree=s;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=f2(e),this.routeBranchCache.set(e,n)),n}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,n){const s=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:a}=s;let{matchedRoutes:o}=s,c=!1;(r?r.path!=="/"&&a["**"]:js(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const u=c?Xw(this.options.notFoundMode,o):void 0,d=new Array(o.length),p=new Map;for(const f of this.stores.matchStores.values())f.routeId&&p.set(f.routeId,f.get());for(let f=0;f<o.length;f++){const m=o[f],y=d[f-1];let x,v,k;{const M=y?.search??e.search,J=y?._strictSearch??void 0;try{const U=cc(m.options.validateSearch,{...M})??void 0;x={...M,...U},v={...J,...U},k=void 0}catch(U){let G=U;if(U instanceof xc||(G=new xc(U.message,{cause:U})),n?.throwOnError)throw G;x=M,v={},k=G}}const N=m.options.loaderDeps?.({search:x})??"",w=N?JSON.stringify(N):"",{interpolatedPath:S,usedParams:E}=Eg({path:m.fullPath,params:a,decoder:this.pathParamsDecoder,server:this.isServer}),P=m.id+S+w,B=this.getMatch(P),T=p.get(m.id),_=B?._strictParams??E;let I;if(!B)try{qg(m,_)}catch(M){if(Rt(M)||Qt(M)?I=M:I=new Kw(M.message,{cause:M}),n?.throwOnError)throw I}Object.assign(a,_);const D=T?"stay":"enter";let R;if(B)R={...B,cause:D,params:T?.params??a,_strictParams:_,search:Nr(T?T.search:B.search,x),_strictSearch:v};else{const M=m.options.loader||m.options.beforeLoad||m.lazyFn||j2(m)?"pending":"success";R={id:P,ssr:m.options.ssr,index:f,routeId:m.id,params:T?.params??a,_strictParams:_,pathname:S,updatedAt:Date.now(),search:T?Nr(T.search,x):x,_strictSearch:v,searchError:void 0,status:M,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Ti()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:D,loaderDeps:T?nr(T.loaderDeps,N):N,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}n?.preload||(R.globalNotFound=u===m.id),R.searchError=k;const F=this.getParentContext(y);R.context={...F,...R.__routeContext,...R.__beforeLoadContext},d[f]=R}for(let f=0;f<d.length;f++){const m=d[f],y=this.looseRoutesById[m.routeId],x=this.getMatch(m.id),v=p.get(m.routeId);if(m.params=v?Nr(v.params,a):a,!x){const k=d[f-1],N=this.getParentContext(k);if(y.options.context){const w={deps:m.loaderDeps,params:m.params,context:N??{},location:e,navigate:S=>this.navigate({...S,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:d,routeId:y.id};m.__routeContext=y.options.context(w)??void 0}m.context={...N,...m.__routeContext,...m.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:n,routeParams:s}=this.getMatchedRoutes(e.pathname),r=Xa(n),a={...e.search};for(const p of n)try{Object.assign(a,cc(p.options.validateSearch,a))}catch{}const o=Xa(this.stores.matchesId.get()),c=o&&this.stores.matchStores.get(o)?.get(),u=c&&c.routeId===r.id&&c.pathname===e.pathname;let d;if(u)d=c.params;else{const p=Object.assign(Object.create(null),s);for(const f of n)try{qg(f,p)}catch{}d=p}return{matchedRoutes:n,fullPath:r.fullPath,search:a,params:d}}},xc=class extends Error{},Kw=class extends Error{};function Yw(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function cc(e,n){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(n);if(s instanceof Promise)throw new xc("Async validation not supported");if(s.issues)throw new xc(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function Qw({pathname:e,routesById:n,processedTree:s}){const r=Object.create(null),a=js(e);let o;const c=pw(a,s,!0);return c&&(o=c.route,Object.assign(r,c.rawParams)),{matchedRoutes:c?.branch||[n.__root__],routeParams:r,foundRoute:o}}function Gw({search:e,dest:n,destRoutes:s,_includeValidateSearch:r}){return Zw(s)(e,n,r??!1)}function Zw(e){const n={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of e){if("search"in a.options)a.options.search?.middlewares&&n.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const o=({search:c,next:u})=>{let d=c;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(d=a.options.preSearchFilters.reduce((f,m)=>m(f),c));const p=u(d);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((f,m)=>m(f),p):p};n.middlewares.push(o)}if(a.options.validateSearch){const o=({search:c,next:u})=>{const d=u(c);if(!n._includeValidateSearch)return d;try{return{...d,...cc(a.options.validateSearch,d)??void 0}}catch{return d}};n.middlewares.push(o)}}const s=({search:a})=>{const o=n.dest;return o.search?o.search===!0?a:tr(o.search,a):{}};n.middlewares.push(s);const r=(a,o,c)=>{if(a>=c.length)return o;const u=c[a];return u({search:o,next:p=>r(a+1,p,c)})};return function(o,c,u){return n.dest=c,n._includeValidateSearch=u,r(0,o,n.middlewares)}}function Xw(e,n){if(e!=="root")for(let s=n.length-1;s>=0;s--){const r=n[s];if(r.children)return r.id}return Tr}function qg(e,n){const s=e.options.params?.parse??e.options.parseParams;if(s){const r=s(n);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(n,r)}}const Jw="Error preloading route! ☝️";var b2=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{this.originalIndex=n.originalIndex;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Tr:this.parentRoute||bs();let a=r?Tr:s?.path;a&&a!=="/"&&(a=m2(a));const o=s?.id||a;let c=r?Tr:oc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);a==="__root__"&&(a="/"),c!=="__root__"&&(c=oc(["/",c]));const u=c==="__root__"?"/":oc([this.parentRoute.fullPath,a]);this._path=a,this._id=c,this._fullPath=u,this._to=js(u)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>Bc({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},e5=class extends b2{constructor(e){super(e)}};function t5(e){if(typeof document<"u"&&document.querySelector){const n=e.stores.location.get(),s=n.state.__hashScrollIntoViewOptions??!0;if(s&&n.hash!==""){const r=document.getElementById(n.hash);r&&r.scrollIntoView(s)}}}function of(e){const n=e.errorComponent??lf;return t.jsx(n5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:r})=>s?C.createElement(n,{error:s,reset:r}):e.children})}var n5=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,n){const s=e.getResetKey();return n.error&&n.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,n){this.props.onCatch&&this.props.onCatch(e,n)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function lf({error:e}){const[n,s]=C.useState(!1);return t.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[t.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),t.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(r=>!r),children:n?"Hide Error":"Show Error"})]}),t.jsx("div",{style:{height:".25rem"}}),n?t.jsx("div",{children:t.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?t.jsx("code",{children:e.message}):null})}):null]})}function s5({children:e,fallback:n=null}){return w2()?t.jsx(Ya.Fragment,{children:e}):t.jsx(Ya.Fragment,{children:n})}function w2(){return Ya.useSyncExternalStore(r5,()=>!0,()=>!1)}function r5(){return()=>{}}var N2=C.createContext(null);function Xt(e){return C.useContext(N2)}var Wc=C.createContext(void 0),i5=C.createContext(void 0),tt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(tt||{});function a5({update:e,notify:n,unwatched:s}){return{link:r,unlink:a,propagate:o,checkDirty:c,shallowPropagate:u};function r(p,f,m){const y=f.depsTail;if(y!==void 0&&y.dep===p)return;const x=y!==void 0?y.nextDep:f.deps;if(x!==void 0&&x.dep===p){x.version=m,f.depsTail=x;return}const v=p.subsTail;if(v!==void 0&&v.version===m&&v.sub===f)return;const k=f.depsTail=p.subsTail={version:m,dep:p,sub:f,prevDep:y,nextDep:x,prevSub:v,nextSub:void 0};x!==void 0&&(x.prevDep=k),y!==void 0?y.nextDep=k:f.deps=k,v!==void 0?v.nextSub=k:p.subs=k}function a(p,f=p.sub){const m=p.dep,y=p.prevDep,x=p.nextDep,v=p.nextSub,k=p.prevSub;return x!==void 0?x.prevDep=y:f.depsTail=y,y!==void 0?y.nextDep=x:f.deps=x,v!==void 0?v.prevSub=k:m.subsTail=k,k!==void 0?k.nextSub=v:(m.subs=v)===void 0&&s(m),x}function o(p){let f=p.nextSub,m;e:do{const y=p.sub;let x=y.flags;if(x&60?x&12?x&4?!(x&48)&&d(p,y)?(y.flags=x|40,x&=1):x=0:y.flags=x&-9|32:x=0:y.flags=x|32,x&2&&n(y),x&1){const v=y.subs;if(v!==void 0){const k=(p=v).nextSub;k!==void 0&&(m={value:f,prev:m},f=k);continue}}if((p=f)!==void 0){f=p.nextSub;continue}for(;m!==void 0;)if(p=m.value,m=m.prev,p!==void 0){f=p.nextSub;continue e}break}while(!0)}function c(p,f){let m,y=0,x=!1;e:do{const v=p.dep,k=v.flags;if(f.flags&16)x=!0;else if((k&17)===17){if(e(v)){const N=v.subs;N.nextSub!==void 0&&u(N),x=!0}}else if((k&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(m={value:p,prev:m}),p=v.deps,f=v,++y;continue}if(!x){const N=p.nextDep;if(N!==void 0){p=N;continue}}for(;y--;){const N=f.subs,w=N.nextSub!==void 0;if(w?(p=m.value,m=m.prev):p=N,x){if(e(f)){w&&u(N),f=p.sub;continue}x=!1}else f.flags&=-33;f=p.sub;const S=p.nextDep;if(S!==void 0){p=S;continue e}}return x}while(!0)}function u(p){do{const f=p.sub,m=f.flags;(m&48)===32&&(f.flags=m|16,(m&6)===2&&n(f))}while((p=p.nextSub)!==void 0)}function d(p,f){let m=f.depsTail;for(;m!==void 0;){if(m===p)return!0;m=m.prevDep}return!1}}function o5(e,n,s){const r=typeof e=="object",a=r?e:void 0;return{next:(r?e.next:e)?.bind(a),error:(r?e.error:n)?.bind(a),complete:(r?e.complete:s)?.bind(a)}}const up=[];let uc=0;const{link:Dg,unlink:l5,propagate:c5,checkDirty:S2,shallowPropagate:Bg}=a5({update(e){return e._update()},notify(e){up[dp++]=e,e.flags&=~tt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=tt.Mutable|tt.Dirty,yc(e))}});let Yl=0,dp=0,Xn,hp=0;function C2(e){try{++hp,e()}finally{--hp||$2()}}function yc(e){const n=e.depsTail;let s=n!==void 0?n.nextDep:e.deps;for(;s!==void 0;)s=l5(s,e)}function $2(){if(!(hp>0)){for(;Yl<dp;){const e=up[Yl];up[Yl++]=void 0,e.notify()}Yl=0,dp=0}}function Ug(e,n){const s=typeof e=="function",r=e,a={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?tt.None:tt.Mutable,get(){return Xn!==void 0&&Dg(a,Xn,uc),a._snapshot},subscribe(o){const c=o5(o),u={current:!1},d=u5(()=>{a.get(),u.current?c.next?.(a._snapshot):u.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(o){const c=Xn,u=n?.compare??Object.is;if(s)Xn=a,++uc,a.depsTail=void 0;else if(o===void 0)return!1;s&&(a.flags=tt.Mutable|tt.RecursedCheck);try{const d=a._snapshot,p=typeof o=="function"?o(d):o===void 0&&s?r(d):o;return d===void 0||!u(d,p)?(a._snapshot=p,!0):!1}finally{Xn=c,s&&(a.flags&=~tt.RecursedCheck),yc(a)}}};return s?(a.flags=tt.Mutable|tt.Dirty,a.get=function(){const o=a.flags;if(o&tt.Dirty||o&tt.Pending&&S2(a.deps,a)){if(a._update()){const c=a.subs;c!==void 0&&Bg(c)}}else o&tt.Pending&&(a.flags=o&~tt.Pending);return Xn!==void 0&&Dg(a,Xn,uc),a._snapshot}):a.set=function(o){if(a._update(o)){const c=a.subs;c!==void 0&&(c5(c),Bg(c),$2())}},a}function u5(e){const n=()=>{const r=Xn;Xn=s,++uc,s.depsTail=void 0,s.flags=tt.Watching|tt.RecursedCheck;try{return e()}finally{Xn=r,s.flags&=~tt.RecursedCheck,yc(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:tt.Watching|tt.RecursedCheck,notify(){const r=this.flags;r&tt.Dirty||r&tt.Pending&&S2(this.deps,this)?n():this.flags=tt.Watching},stop(){this.flags=tt.None,this.depsTail=void 0,yc(this)}};return n(),s}var hh={exports:{}},ph={},fh={exports:{}},mh={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var Wg;function d5(){if(Wg)return mh;Wg=1;var e=yo();function n(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var s=typeof Object.is=="function"?Object.is:n,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(m,y){var x=y(),v=r({inst:{value:x,getSnapshot:y}}),k=v[0].inst,N=v[1];return o(function(){k.value=x,k.getSnapshot=y,d(k)&&N({inst:k})},[m,x,y]),a(function(){return d(k)&&N({inst:k}),m(function(){d(k)&&N({inst:k})})},[m]),c(x),x}function d(m){var y=m.getSnapshot;m=m.value;try{var x=y();return!s(m,x)}catch{return!0}}function p(m,y){return y()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return mh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,mh}var Hg;function h5(){return Hg||(Hg=1,fh.exports=d5()),fh.exports}/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var Vg;function p5(){if(Vg)return ph;Vg=1;var e=yo(),n=h5();function s(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}var r=typeof Object.is=="function"?Object.is:s,a=n.useSyncExternalStore,o=e.useRef,c=e.useEffect,u=e.useMemo,d=e.useDebugValue;return ph.useSyncExternalStoreWithSelector=function(p,f,m,y,x){var v=o(null);if(v.current===null){var k={hasValue:!1,value:null};v.current=k}else k=v.current;v=u(function(){function w(T){if(!S){if(S=!0,E=T,T=y(T),x!==void 0&&k.hasValue){var _=k.value;if(x(_,T))return P=_}return P=T}if(_=P,r(E,T))return _;var I=y(T);return x!==void 0&&x(_,I)?(E=T,_):(E=T,P=I)}var S=!1,E,P,B=m===void 0?null:m;return[function(){return w(f())},B===null?void 0:function(){return w(B())}]},[f,m,y,x]);var N=a(p,v[0],v[1]);return c(function(){k.hasValue=!0,k.value=N},[N]),d(N),N},ph}var Kg;function f5(){return Kg||(Kg=1,hh.exports=p5()),hh.exports}var m5=f5();function g5(e,n){return e===n}function Gt(e,n,s=g5){const r=C.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(c);return u},[e]),a=C.useCallback(()=>e?.get(),[e]);return m5.useSyncExternalStoreWithSelector(r,a,a,n,s)}var x5={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Dr(e){const n=Xt(),s=C.useContext(e.from?i5:Wc),r=e.from??s,a=r?e.from?n.stores.getRouteMatchStore(r):n.stores.matchStores.get(r):void 0,o=C.useRef(void 0);return Gt(a??x5,c=>{if((e.shouldThrow??!0)&&!c&&bs(),c===void 0)return;const u=e.select?e.select(c):c;if(e.structuralSharing??n.options.defaultStructuralSharing){const d=nr(o.current,u);return o.current=d,d}return u})}function E2(e){return Dr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function T2(e){const{select:n,...s}=e;return Dr({...s,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function Hc(e){return Dr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const s=e.strict===!1?n.params:n._strictParams;return e.select?e.select(s):s}})}function Fi(e){return Dr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Jt(e){const n=Xt();return C.useCallback(s=>n.navigate({...s,from:s.from??e?.from}),[e?.from,n])}function A2(e){return Dr({...e,select:n=>e.select?e.select(n.context):n.context})}var Vc=Hy();function y5(e,n){const s=Xt(),r=nw(n),{activeProps:a,inactiveProps:o,activeOptions:c,to:u,preload:d,preloadDelay:p,preloadIntentProximity:f,hashScrollIntoView:m,replace:y,startTransition:x,resetScroll:v,viewTransition:k,children:N,target:w,disabled:S,style:E,className:P,onClick:B,onBlur:T,onFocus:_,onMouseEnter:I,onMouseLeave:D,onTouchStart:R,ignoreBlocker:F,params:M,search:J,hash:U,state:G,mask:ue,reloadDocument:V,unsafeRelative:H,from:ne,_fromLocation:A,...O}=e,ee=w2(),z=C.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),me=Gt(s.stores.location,Ue=>Ue,(Ue,X)=>Ue.href===X.href),he=C.useMemo(()=>{const Ue={_fromLocation:me,...z};return s.buildLocation(Ue)},[s,me,z]),ke=he.maskedLocation?he.maskedLocation.publicHref:he.publicHref,Te=he.maskedLocation?he.maskedLocation.external:he.external,Ae=C.useMemo(()=>N5(ke,Te,s.history,S),[S,Te,ke,s.history]),Ce=C.useMemo(()=>{if(Ae?.external)return fc(Ae.href,s.protocolAllowlist)?void 0:Ae.href;if(!S5(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),fc(u,s.protocolAllowlist)?void 0:u}catch{}},[u,Ae,s.protocolAllowlist]),qe=C.useMemo(()=>{if(Ce)return!1;if(c?.exact){if(!kw(me.pathname,he.pathname,s.basepath))return!1}else{const Ue=mc(me.pathname,s.basepath),X=mc(he.pathname,s.basepath);if(!(Ue.startsWith(X)&&(Ue.length===X.length||Ue[X.length]==="/")))return!1}return(c?.includeSearch??!0)&&!Er(me.search,he.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?ee&&me.hash===he.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,me,Ce,ee,he.hash,he.pathname,he.search,s.basepath]),ct=qe?tr(a,{})??k5:gh,Ot=qe?gh:tr(o,{})??gh,tn=[P,ct.className,Ot.className].filter(Boolean).join(" "),Wn=(E||ct.style||Ot.style)&&{...E,...ct.style,...Ot.style},[qt,Pn]=C.useState(!1),xn=C.useRef(!1),nn=e.reloadDocument||Ce?!1:d??s.options.defaultPreload,Dt=p??s.options.defaultPreloadDelay??0,mt=C.useCallback(()=>{s.preloadRoute({...z,_builtLocation:he}).catch(Ue=>{console.warn(Ue),console.warn(Jw)})},[s,z,he]);tw(r,C.useCallback(Ue=>{Ue?.isIntersecting&&mt()},[mt]),w5,{disabled:!!S||nn!=="viewport"}),C.useEffect(()=>{xn.current||!S&&nn==="render"&&(mt(),xn.current=!0)},[S,mt,nn]);const yn=Ue=>{const X=Ue.currentTarget.getAttribute("target"),le=w!==void 0?w:X;if(!S&&!C5(Ue)&&!Ue.defaultPrevented&&(!le||le==="_self")&&Ue.button===0){Ue.preventDefault(),Vc.flushSync(()=>{Pn(!0)});const Q=s.subscribe("onResolved",()=>{Q(),Pn(!1)});s.navigate({...z,replace:y,resetScroll:v,hashScrollIntoView:m,startTransition:x,viewTransition:k,ignoreBlocker:F})}};if(Ce)return{...O,ref:r,href:Ce,...N&&{children:N},...w&&{target:w},...S&&{disabled:S},...E&&{style:E},...P&&{className:P},...B&&{onClick:B},...T&&{onBlur:T},..._&&{onFocus:_},...I&&{onMouseEnter:I},...D&&{onMouseLeave:D},...R&&{onTouchStart:R}};const Rn=Ue=>{if(S||nn!=="intent")return;if(!Dt){mt();return}const X=Ue.currentTarget;if(za.has(X))return;const le=setTimeout(()=>{za.delete(X),mt()},Dt);za.set(X,le)},Rs=Ue=>{S||nn!=="intent"||mt()},us=Ue=>{if(S||!nn||!Dt)return;const X=Ue.currentTarget,le=za.get(X);le&&(clearTimeout(le),za.delete(X))};return{...O,...ct,...Ot,href:Ae?.href,ref:r,onClick:ki([B,yn]),onBlur:ki([T,us]),onFocus:ki([_,Rn]),onMouseEnter:ki([I,Rn]),onMouseLeave:ki([D,us]),onTouchStart:ki([R,Rs]),disabled:!!S,target:w,...Wn&&{style:Wn},...tn&&{className:tn},...S&&v5,...qe&&j5,...ee&&qt&&b5}}var gh={},k5={className:"active"},v5={role:"link","aria-disabled":!0},j5={"data-status":"active","aria-current":"page"},b5={"data-transitioning":"transitioning"},za=new WeakMap,w5={rootMargin:"100px"},ki=e=>n=>{for(const s of e)if(s){if(n.defaultPrevented)return;s(n)}};function N5(e,n,s,r){if(!r)return n?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function S5(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var $e=C.forwardRef((e,n)=>{const{_asChild:s,...r}=e,{type:a,...o}=y5(r,n),c=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!s){const{disabled:u,...d}=o;return C.createElement("a",d,c)}return C.createElement(s,o,c)});function C5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var $5=class extends b2{constructor(e){super(e),this.useMatch=n=>Dr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>A2({...n,from:this.id}),this.useSearch=n=>Fi({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Hc({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>T2({...n,from:this.id}),this.useLoaderData=n=>E2({...n,from:this.id}),this.useNavigate=()=>Jt({from:this.fullPath}),this.Link=Ya.forwardRef((n,s)=>t.jsx($e,{ref:s,from:this.fullPath,...n}))}};function zt(e){return new $5(e)}var E5=class extends e5{constructor(e){super(e),this.useMatch=n=>Dr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>A2({...n,from:this.id}),this.useSearch=n=>Fi({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Hc({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>T2({...n,from:this.id}),this.useLoaderData=n=>E2({...n,from:this.id}),this.useNavigate=()=>Jt({from:this.fullPath}),this.Link=Ya.forwardRef((n,s)=>t.jsx($e,{ref:s,from:this.fullPath,...n}))}};function T5(e){return new E5(e)}function A5(e){const n=Xt(),s=`not-found-${Gt(n.stores.location,r=>r.pathname)}-${Gt(n.stores.status,r=>r)}`;return t.jsx(of,{getResetKey:()=>s,onCatch:(r,a)=>{if(Rt(r))e.onCatch?.(r,a);else throw r},errorComponent:({error:r})=>{if(Rt(r))return e.fallback?.(r);throw r},children:e.children})}function P5(){return t.jsx("p",{children:"Not Found"})}function Ni(e){return t.jsx(t.Fragment,{children:e.children})}function P2(e,n,s){return n.options.notFoundComponent?t.jsx(n.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?t.jsx(e.options.defaultNotFoundComponent,{...s}):t.jsx(P5,{})}function R5(e){return null}function I5(){return R5(Xt()),null}var R2=C.memo(function({matchId:n}){const s=Xt(),r=s.stores.matchStores.get(n);r||bs();const a=Gt(s.stores.loadedAt,c=>c),o=Gt(r,c=>c);return t.jsx(z5,{router:s,matchId:n,resetKey:a,matchState:C.useMemo(()=>{const c=o.routeId,u=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,s.routesById])})});function z5({router:e,matchId:n,resetKey:s,matchState:r}){const a=e.routesById[r.routeId],o=a.options.pendingComponent??e.options.defaultPendingComponent,c=o?t.jsx(o,{}):null,u=a.options.errorComponent??e.options.defaultErrorComponent,d=a.options.onCatch??e.options.defaultOnCatch,p=a.isRoot?a.options.notFoundComponent??e.options.notFoundRoute?.options.component:a.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",m=(!a.isRoot||a.options.wrapInSuspense||f)&&(a.options.wrapInSuspense??o??(a.options.errorComponent?.preload||f))?C.Suspense:Ni,y=u?of:Ni,x=p?A5:Ni;return t.jsxs(a.isRoot?a.options.shellComponent??Ni:Ni,{children:[t.jsx(Wc.Provider,{value:n,children:t.jsx(m,{fallback:c,children:t.jsx(y,{getResetKey:()=>s,errorComponent:u||lf,onCatch:(v,k)=>{if(Rt(v))throw v.routeId??=r.routeId,v;d?.(v,k)},children:t.jsx(x,{fallback:v=>{if(v.routeId??=r.routeId,!p||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!a.isRoot)throw v;return C.createElement(p,v)},children:f||r._displayPending?t.jsx(s5,{fallback:c,children:t.jsx(Yg,{matchId:n})}):t.jsx(Yg,{matchId:n})})})})}),r.parentRouteId===Tr?t.jsxs(t.Fragment,{children:[t.jsx(M5,{resetKey:s}),e.options.scrollRestoration&&l2?t.jsx(I5,{}):null]}):null]})}function M5({resetKey:e}){const n=Xt(),s=C.useRef(void 0);return qa(()=>{const r=n.latestLocation.href;(s.current===void 0||s.current!==r)&&(n.emit({type:"onRendered",...Ci(n.stores.location.get(),n.stores.resolvedLocation.get())}),s.current=r)},[n.latestLocation.state.__TSR_key,e,n]),null}var Yg=C.memo(function({matchId:n}){const s=Xt(),r=(f,m)=>s.getMatch(f.id)?._nonReactive[m]??f._nonReactive[m],a=s.stores.matchStores.get(n);a||bs();const o=Gt(a,f=>f),c=o.routeId,u=s.routesById[c],d=C.useMemo(()=>{const f=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return f?JSON.stringify(f):void 0},[c,o.loaderDeps,o._strictParams,o._strictSearch,s.options.defaultRemountDeps,s.routesById]),p=C.useMemo(()=>{const f=u.options.component??s.options.defaultComponent;return f?t.jsx(f,{},d):t.jsx(pp,{})},[d,u.options.component,s.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const f=u.options.pendingMinMs??s.options.defaultPendingMinMs;if(f){const m=s.getMatch(o.id);if(m&&!m._nonReactive.minPendingPromise){const y=Ti();m._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),m._nonReactive.minPendingPromise=void 0},f)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Rt(o.error)||bs(),P2(s,u,o.error);if(o.status==="redirected")throw Qt(o.error)||bs(),r(o,"loadPromise");if(o.status==="error")throw o.error;return p}),pp=C.memo(function(){const n=Xt(),s=C.useContext(Wc);let r,a=!1,o;{const p=s?n.stores.matchStores.get(s):void 0;[r,a]=Gt(p,f=>[f?.routeId,f?.globalNotFound??!1]),o=Gt(n.stores.matchesId,f=>f[f.findIndex(m=>m===s)+1])}const c=r?n.routesById[r]:void 0,u=n.options.defaultPendingComponent?t.jsx(n.options.defaultPendingComponent,{}):null;if(a)return c||bs(),P2(n,c,void 0);if(!o)return null;const d=t.jsx(R2,{matchId:o});return r===Tr?t.jsx(C.Suspense,{fallback:u,children:d}):d});function F5(){const e=Xt(),n=C.useRef({router:e,mounted:!1}),[s,r]=C.useState(!1),a=Gt(e.stores.isLoading,m=>m),o=Gt(e.stores.hasPending,m=>m),c=ih(a),u=a||s||o,d=ih(u),p=a||o,f=ih(p);return e.startTransition=m=>{r(!0),C.startTransition(()=>{m(),r(!1)})},C.useEffect(()=>{const m=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return js(e.latestLocation.publicHref)!==js(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{m()}},[e,e.history]),qa(()=>{if(typeof window<"u"&&e.ssr||n.current.router===e&&n.current.mounted)return;n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),qa(()=>{c&&!a&&e.emit({type:"onLoad",...Ci(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,a]),qa(()=>{f&&!p&&e.emit({type:"onBeforeRouteMount",...Ci(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,f,e]),qa(()=>{if(d&&!u){const m=Ci(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),C2(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&t5(e)}},[u,d,e]),null}function L5(){const e=Xt(),n=e.routesById[Tr].options.pendingComponent??e.options.defaultPendingComponent,s=n?t.jsx(n,{}):null,r=t.jsxs(typeof document<"u"&&e.ssr?Ni:C.Suspense,{fallback:s,children:[t.jsx(F5,{}),t.jsx(_5,{})]});return e.options.InnerWrap?t.jsx(e.options.InnerWrap,{children:r}):r}function _5(){const e=Xt(),n=Gt(e.stores.firstId,a=>a),s=Gt(e.stores.loadedAt,a=>a),r=n?t.jsx(R2,{matchId:n}):null;return t.jsx(Wc.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?r:t.jsx(of,{getResetKey:()=>s,errorComponent:lf,onCatch:void 0,children:r})})}var O5=e=>({createMutableStore:Ug,createReadonlyStore:Ug,batch:C2}),q5=e=>new D5(e),D5=class extends Vw{constructor(e){super(e,O5)}};function B5({router:e,children:n,...s}){u2(s)&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const r=t.jsx(N2.Provider,{value:e,children:n});return e.options.Wrap?t.jsx(e.options.Wrap,{children:r}):r}function U5({router:e,...n}){return t.jsx(B5,{router:e,...n,children:t.jsx(L5,{})})}function kc(e){const n=Xt({warn:e?.router===void 0}),s=e?.router||n,r=C.useRef(void 0);return Gt(s.stores.__store,a=>{if(e?.select){if(e.structuralSharing??s.options.defaultStructuralSharing){const o=nr(r.current,e.select(a));return r.current=o,o}return e.select(a)}return a})}const Ai="squad.console.token",hn=(()=>{const e=/^\/p\/([^/]+)/.exec(window.location.pathname);return e?decodeURIComponent(e[1]):null})(),no=hn?`/p/${encodeURIComponent(hn)}`:"";function ko(e){return!no||!e.startsWith("/api/")||e.startsWith("/api/v1/app/")?e:no+e}function W5(){const e=new URL(window.location.href),n=e.searchParams.get("t");return n?(sessionStorage.setItem(Ai,n),e.searchParams.delete("t"),window.history.replaceState({},"",e.toString()),n):sessionStorage.getItem(Ai)}class vc extends Error{constructor(){super("Session token missing or invalid. Reopen squad console."),this.name="UnauthorizedError"}}class cf extends Error{constructor(n,s){super(n),this.status=s,this.name="ApiError"}}function I2(e){return e instanceof Error&&(e.message===z2||e instanceof cf&&e.status>=500)}const z2="squad-kit did not answer, so nothing changed. Check that it still runs in its terminal, then try again.";async function M2(e,n){try{return await fetch(e,n)}catch{throw new Error(z2)}}async function Ee(e,n){const s=sessionStorage.getItem(Ai);if(!s)throw new vc;const r=await M2(ko(e),{...n,headers:{"content-type":"application/json",authorization:`Bearer ${s}`}});if(r.status===401)throw new vc;if(!r.ok){const a=await H5(r);throw new Error(`${r.status} ${r.statusText}: ${a}`)}return await r.json()}async function H5(e){try{return(await e.text()).slice(0,400)}catch{return""}}async function wt(e,n,s={}){const r=sessionStorage.getItem(Ai);if(!r)throw new vc;const a=await M2(ko(e),{method:n,headers:{"content-type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(s)});if(a.status===401)throw new vc;const o=await a.json().catch(()=>({}));if(!a.ok)throw new cf(o.error??`${a.status} ${a.statusText}`,a.status);return o}function pn(e,n){const s=sessionStorage.getItem(Ai)??"";return`${ko(`/api/v1/tickets/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(n.replace(/^file:\/\//,""))}&t=${encodeURIComponent(s)}`}function ws(e){const n=sessionStorage.getItem(Ai)??"";return`${ko(e)}?t=${encodeURIComponent(n)}`}/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const V5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F2=(...e)=>e.filter((n,s,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===s).join(" ").trim();/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/var K5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Y5=C.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:c,...u},d)=>C.createElement("svg",{ref:d,...K5,width:n,height:n,stroke:e,strokeWidth:r?Number(s)*24/Number(n):s,className:F2("lucide",a),...u},[...c.map(([p,f])=>C.createElement(p,f)),...Array.isArray(o)?o:[o]]));/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const oe=(e,n)=>{const s=C.forwardRef(({className:r,...a},o)=>C.createElement(Y5,{ref:o,iconNode:n,className:F2(`lucide-${V5(e)}`,r),...a}));return s.displayName=`${e}`,s};/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const L2=oe("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const jc=oe("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Q5=oe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const G5=oe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const bc=oe("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const so=oe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const ns=oe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const fp=oe("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const _2=oe("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Cs=oe("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const xe=oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const uf=oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const O2=oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Kc=oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const q2=oe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Z5=oe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Pr=oe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const D2=oe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const vo=oe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const B2=oe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const lr=oe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const X5=oe("CornerLeftUp",[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const ss=oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const U2=oe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const es=oe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const W2=oe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const H2=oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const V2=oe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const J5=oe("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const e6=oe("FolderCheck",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const t6=oe("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const K2=oe("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const n6=oe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const mp=oe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const Y2=oe("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const s6=oe("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
257
|
+
* @license lucide-react v0.460.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const r6=oe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
262
|
+
* @license lucide-react v0.460.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const gp=oe("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
267
|
+
* @license lucide-react v0.460.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const i6=oe("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
|
|
272
|
+
* @license lucide-react v0.460.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const a6=oe("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
|
277
|
+
* @license lucide-react v0.460.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const o6=oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
282
|
+
* @license lucide-react v0.460.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const Q2=oe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
287
|
+
* @license lucide-react v0.460.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const df=oe("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
292
|
+
* @license lucide-react v0.460.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const l6=oe("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
297
|
+
* @license lucide-react v0.460.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const c6=oe("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
302
|
+
* @license lucide-react v0.460.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const u6=oe("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
307
|
+
* @license lucide-react v0.460.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const G2=oe("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
|
|
312
|
+
* @license lucide-react v0.460.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const gn=oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
317
|
+
* @license lucide-react v0.460.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const d6=oe("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
322
|
+
* @license lucide-react v0.460.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const Yc=oe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
327
|
+
* @license lucide-react v0.460.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const h6=oe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
332
|
+
* @license lucide-react v0.460.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const En=oe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|
337
|
+
* @license lucide-react v0.460.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const Qg=oe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
342
|
+
* @license lucide-react v0.460.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const p6=oe("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
|
|
347
|
+
* @license lucide-react v0.460.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const Gg=oe("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
352
|
+
* @license lucide-react v0.460.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const Z2=oe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
357
|
+
* @license lucide-react v0.460.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const jo=oe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
362
|
+
* @license lucide-react v0.460.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const f6=oe("MonitorOff",[["path",{d:"M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2",key:"k0q8oc"}],["path",{d:"M22 15V5a2 2 0 0 0-2-2H9",key:"cp1ac0"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
367
|
+
* @license lucide-react v0.460.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const bo=oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
372
|
+
* @license lucide-react v0.460.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const m6=oe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
377
|
+
* @license lucide-react v0.460.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const wc=oe("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|
382
|
+
* @license lucide-react v0.460.0 - ISC
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the ISC license.
|
|
385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/const Qc=oe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
387
|
+
* @license lucide-react v0.460.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/const ro=oe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
392
|
+
* @license lucide-react v0.460.0 - ISC
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the ISC license.
|
|
395
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/const rs=oe("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);/**
|
|
397
|
+
* @license lucide-react v0.460.0 - ISC
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the ISC license.
|
|
400
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/const Nc=oe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
402
|
+
* @license lucide-react v0.460.0 - ISC
|
|
403
|
+
*
|
|
404
|
+
* This source code is licensed under the ISC license.
|
|
405
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
406
|
+
*/const Li=oe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
407
|
+
* @license lucide-react v0.460.0 - ISC
|
|
408
|
+
*
|
|
409
|
+
* This source code is licensed under the ISC license.
|
|
410
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
+
*/const g6=oe("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
412
|
+
* @license lucide-react v0.460.0 - ISC
|
|
413
|
+
*
|
|
414
|
+
* This source code is licensed under the ISC license.
|
|
415
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
+
*/const Nt=oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
417
|
+
* @license lucide-react v0.460.0 - ISC
|
|
418
|
+
*
|
|
419
|
+
* This source code is licensed under the ISC license.
|
|
420
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
+
*/const Pi=oe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
422
|
+
* @license lucide-react v0.460.0 - ISC
|
|
423
|
+
*
|
|
424
|
+
* This source code is licensed under the ISC license.
|
|
425
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
+
*/const x6=oe("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
427
|
+
* @license lucide-react v0.460.0 - ISC
|
|
428
|
+
*
|
|
429
|
+
* This source code is licensed under the ISC license.
|
|
430
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
+
*/const Da=oe("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
432
|
+
* @license lucide-react v0.460.0 - ISC
|
|
433
|
+
*
|
|
434
|
+
* This source code is licensed under the ISC license.
|
|
435
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
+
*/const Lr=oe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
437
|
+
* @license lucide-react v0.460.0 - ISC
|
|
438
|
+
*
|
|
439
|
+
* This source code is licensed under the ISC license.
|
|
440
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
+
*/const _i=oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
442
|
+
* @license lucide-react v0.460.0 - ISC
|
|
443
|
+
*
|
|
444
|
+
* This source code is licensed under the ISC license.
|
|
445
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
446
|
+
*/const ls=oe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
447
|
+
* @license lucide-react v0.460.0 - ISC
|
|
448
|
+
*
|
|
449
|
+
* This source code is licensed under the ISC license.
|
|
450
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
451
|
+
*/const y6=oe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
452
|
+
* @license lucide-react v0.460.0 - ISC
|
|
453
|
+
*
|
|
454
|
+
* This source code is licensed under the ISC license.
|
|
455
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
456
|
+
*/const k6=oe("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/**
|
|
457
|
+
* @license lucide-react v0.460.0 - ISC
|
|
458
|
+
*
|
|
459
|
+
* This source code is licensed under the ISC license.
|
|
460
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
461
|
+
*/const X2=oe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
462
|
+
* @license lucide-react v0.460.0 - ISC
|
|
463
|
+
*
|
|
464
|
+
* This source code is licensed under the ISC license.
|
|
465
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
466
|
+
*/const Zg=oe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
467
|
+
* @license lucide-react v0.460.0 - ISC
|
|
468
|
+
*
|
|
469
|
+
* This source code is licensed under the ISC license.
|
|
470
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
471
|
+
*/const Xg=oe("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/**
|
|
472
|
+
* @license lucide-react v0.460.0 - ISC
|
|
473
|
+
*
|
|
474
|
+
* This source code is licensed under the ISC license.
|
|
475
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
476
|
+
*/const xh=oe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
477
|
+
* @license lucide-react v0.460.0 - ISC
|
|
478
|
+
*
|
|
479
|
+
* This source code is licensed under the ISC license.
|
|
480
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
481
|
+
*/const J2=oe("SquareCheck",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
482
|
+
* @license lucide-react v0.460.0 - ISC
|
|
483
|
+
*
|
|
484
|
+
* This source code is licensed under the ISC license.
|
|
485
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
486
|
+
*/const Jg=oe("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
487
|
+
* @license lucide-react v0.460.0 - ISC
|
|
488
|
+
*
|
|
489
|
+
* This source code is licensed under the ISC license.
|
|
490
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
491
|
+
*/const is=oe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
492
|
+
* @license lucide-react v0.460.0 - ISC
|
|
493
|
+
*
|
|
494
|
+
* This source code is licensed under the ISC license.
|
|
495
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
496
|
+
*/const wo=oe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
497
|
+
* @license lucide-react v0.460.0 - ISC
|
|
498
|
+
*
|
|
499
|
+
* This source code is licensed under the ISC license.
|
|
500
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
501
|
+
*/const Sc=oe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
502
|
+
* @license lucide-react v0.460.0 - ISC
|
|
503
|
+
*
|
|
504
|
+
* This source code is licensed under the ISC license.
|
|
505
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
506
|
+
*/const mn=oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
507
|
+
* @license lucide-react v0.460.0 - ISC
|
|
508
|
+
*
|
|
509
|
+
* This source code is licensed under the ISC license.
|
|
510
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
511
|
+
*/const Oi=oe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
512
|
+
* @license lucide-react v0.460.0 - ISC
|
|
513
|
+
*
|
|
514
|
+
* This source code is licensed under the ISC license.
|
|
515
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
516
|
+
*/const v6=oe("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]);/**
|
|
517
|
+
* @license lucide-react v0.460.0 - ISC
|
|
518
|
+
*
|
|
519
|
+
* This source code is licensed under the ISC license.
|
|
520
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
521
|
+
*/const j6=oe("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
522
|
+
* @license lucide-react v0.460.0 - ISC
|
|
523
|
+
*
|
|
524
|
+
* This source code is licensed under the ISC license.
|
|
525
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
526
|
+
*/const b6=oe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
527
|
+
* @license lucide-react v0.460.0 - ISC
|
|
528
|
+
*
|
|
529
|
+
* This source code is licensed under the ISC license.
|
|
530
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
531
|
+
*/const ek=oe("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
532
|
+
* @license lucide-react v0.460.0 - ISC
|
|
533
|
+
*
|
|
534
|
+
* This source code is licensed under the ISC license.
|
|
535
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
536
|
+
*/const w6=oe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
537
|
+
* @license lucide-react v0.460.0 - ISC
|
|
538
|
+
*
|
|
539
|
+
* This source code is licensed under the ISC license.
|
|
540
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
541
|
+
*/const tk=oe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
542
|
+
* @license lucide-react v0.460.0 - ISC
|
|
543
|
+
*
|
|
544
|
+
* This source code is licensed under the ISC license.
|
|
545
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
546
|
+
*/const nk=oe("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
|
|
547
|
+
* @license lucide-react v0.460.0 - ISC
|
|
548
|
+
*
|
|
549
|
+
* This source code is licensed under the ISC license.
|
|
550
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
551
|
+
*/const xp=oe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
552
|
+
* @license lucide-react v0.460.0 - ISC
|
|
553
|
+
*
|
|
554
|
+
* This source code is licensed under the ISC license.
|
|
555
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
556
|
+
*/const Ze=oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function N6(e){return e==="err"?null:3200}function S6(e,n){return n.kind==="err"&&e.some(s=>s.kind==="err"&&s.text===n.text)?e:[...e,n]}let sk=null;const yp=new Set;function ex(e){sk=e;for(const n of yp)n()}const Gc={open:(e={})=>ex(e),close:()=>ex(null)};function C6(){return C.useSyncExternalStore(e=>(yp.add(e),()=>yp.delete(e)),()=>sk)}const rk=C.createContext(null);function kp(e){try{return localStorage.getItem(e)}catch{return null}}function yh(e,n){try{localStorage.setItem(e,n)}catch{}}function ik(){const e=kp("sk.theme");return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function $6({children:e}){const[n,s]=C.useState(ik),[r,a]=C.useState(kp("sk.commands")!=="off"),[o,c]=C.useState(kp("sk.ticketFull")==="on"),[u,d]=C.useState([]);C.useEffect(()=>{document.documentElement.dataset.theme=n,yh("sk.theme",n)},[n]);const p=C.useCallback(y=>d(x=>x.filter(v=>v.id!==y)),[]),f=C.useCallback((y,x="ok",v)=>{const k=Date.now()+Math.random();d(w=>S6(w,{id:k,text:y,kind:x,...v?{retry:v}:{}}));const N=N6(x);N!==null&&setTimeout(()=>p(k),N)},[p]),m=C.useMemo(()=>({theme:n,toggleTheme:()=>s(y=>y==="light"?"dark":"light"),showCommands:r,toggleCommands:()=>a(y=>(yh("sk.commands",y?"off":"on"),!y)),ticketFull:o,toggleTicketFull:()=>c(y=>(yh("sk.ticketFull",y?"off":"on"),!y)),toast:f}),[n,r,o,f]);return t.jsxs(rk.Provider,{value:m,children:[e,t.jsx("div",{className:"toasts",role:"status","aria-live":"polite",children:u.map(y=>y.kind==="err"?t.jsxs("div",{className:"toast err",role:"alert",children:[t.jsx(Pr,{size:16}),t.jsx("span",{className:"grow",children:y.text}),y.retry&&t.jsx("button",{className:"toast-act",onClick:()=>{p(y.id),y.retry()},children:"Try again"}),t.jsx("button",{className:"toast-act",onClick:()=>{p(y.id),Gc.open()},children:"Report a problem"}),t.jsx("button",{className:"toast-x",onClick:()=>p(y.id),"aria-label":"Close this message",children:t.jsx(Ze,{size:15})})]},y.id):t.jsxs("div",{className:"toast",children:[t.jsx(xe,{size:16}),y.text]},y.id))})]})}function _e(){const e=C.useContext(rk);if(!e)throw new Error("usePrefs outside PrefsProvider");return e}const ak=900;function Ye(){return Pe({queryKey:["board"],queryFn:()=>Ee("/api/v1/board"),refetchInterval:ak})}function No(e){return Pe({queryKey:["ticket",e],queryFn:()=>Ee(`/api/v1/tickets/${e}`),enabled:!!e,refetchInterval:ak})}function E6(){return Pe({queryKey:["releases"],queryFn:()=>Ee("/api/v1/releases"),refetchInterval:2e3})}function T6(){return Pe({queryKey:["apps"],queryFn:()=>Ee("/api/v1/apps"),refetchInterval:e=>e.state.data?.apps.some(n=>n.state==="starting")||e.state.data?.reading?1e3:5e3})}function ok(){return Pe({queryKey:["app","settings"],queryFn:()=>Ee("/api/v1/app/settings"),refetchInterval:5e3})}function A6(){return Pe({queryKey:["architecture"],queryFn:()=>Ee("/api/v1/architecture"),refetchInterval:2e3})}function fe(){const e=os(),{toast:n}=_e(),s=o2({mutationFn:({path:r,body:a,method:o="POST"})=>wt(r,o,a),onSuccess:(r,a)=>{e.invalidateQueries(),a.done&&n(a.done)},onError:(r,a)=>n(r instanceof Error?r.message:String(r),"err",I2(r)?()=>s.mutate(a):void 0)});return s}function lk(){const{toast:e}=_e(),[n,s]=C.useState(!1);return{restarting:n,restart:async()=>{s(!0);const a=await fetch("/healthz").then(c=>c.json()).catch(()=>({startedAt:void 0}));try{await wt("/api/v1/restart","POST")}catch(c){s(!1),e(c instanceof Error?c.message:String(c),"err");return}const o=Date.now()+9e4;for(;Date.now()<o;){await new Promise(u=>setTimeout(u,1e3));const c=await fetch("/healthz").then(u=>u.json()).catch(()=>null);if(c?.startedAt&&c.startedAt!==a.startedAt){window.location.reload();return}}s(!1),e("The board did not come back. Run squad console in your terminal.","err")}}}function P6(){const{restarting:e,restart:n}=lk();return t.jsxs("div",{className:"updatebar",role:"status",children:[t.jsx(Pi,{size:15}),t.jsxs("span",{children:[t.jsx("b",{children:"squad-kit was updated."})," Restart the board to use the new version. Running work picks up where it stopped."]}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn sm pri",disabled:e,onClick:()=>void n(),children:e?"Restarting…":"Restart now"})]})}const Ns={analyst:"Analyst",architect:"Architect",spec:"Spec writer",builder:"Builder",tester:"Tester",reviewer:"Reviewer",release:"Release",triage:"Triage",you:"You",squad:"Squad"},R6={analyst:_i,architect:v6,spec:ro,builder:vo,tester:J2,reviewer:H2,release:ns,triage:Cs,you:w6,squad:tk};function Br({role:e,small:n,size:s}){const r=R6[e];return t.jsx("span",{className:`glyph ${n?"sm":""} ${e==="you"?"you":""}`,title:Ns[e],children:t.jsx(r,{size:s??(n?12:14),strokeWidth:2})})}function ie({text:e,keep:n}){const{showCommands:s,toast:r}=_e();if(!s)return null;const a=()=>{navigator.clipboard?.writeText(e).then(()=>r("Command copied"),()=>r("Could not copy. Select the text instead.","err"))},o=n&&e.endsWith(n)&&e.length>n.length?e.length-n.length:0;return t.jsxs("span",{className:"term",title:"The same action in the terminal",children:[t.jsx("b",{children:">_"}),o?t.jsxs(t.Fragment,{children:[t.jsx("span",{children:e.slice(0,o).trimEnd()}),t.jsx("span",{className:"term-keep",children:n})]}):t.jsx("span",{children:e}),t.jsx("button",{onClick:a,"aria-label":`Copy ${e}`,children:t.jsx(lr,{size:13})})]})}const kh=[{stage:"tickets",name:"Tickets"},{stage:"specs",name:"Specs"},{stage:"implement",name:"Implement"},{stage:"test",name:"Test"},{stage:"review",name:"Review"},{stage:"release",name:"Release"}];function I6({ticket:e}){const n=e.stage==="bugs"?"tickets":e.stage,s=n==="done"?kh.length:kh.findIndex(o=>o.stage===n),r=e.waiting?"you":"work",a=new Map((e.now?.stages??[]).map(o=>[o.stage,o.note]));return t.jsx("div",{className:"track","aria-label":"Where this ticket is",children:kh.map((o,c)=>{const u=c<s?"done":c===s?`cur ${r}`:"",d=a.get(o.stage);return t.jsxs("div",{className:`ts ${u}`,children:[t.jsx("span",{className:"nd",children:c<s?t.jsx(xe,{size:12,strokeWidth:3}):null}),o.name,c===s&&t.jsx("span",{className:"tag",children:r==="you"?"Your turn":e.stage==="release"?"Ready":e.dependency?.way==="wait"&&!e.dependency.started&&!e.squad?"Waiting":"Working"}),a.size>0&&t.jsx("span",{className:"tnote",children:c===s&&d==="your turn"?"":d??""})]},o.stage)})})}function We({title:e,onClose:n,children:s,footer:r,icon:a,wide:o}){return C.useEffect(()=>{const c=u=>u.key==="Escape"&&n();return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[n]),t.jsx("div",{className:"modal-veil",onMouseDown:c=>c.target===c.currentTarget&&n(),children:t.jsxs("div",{className:`modal ${o?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":e,children:[t.jsxs("header",{children:[a,t.jsx("h3",{children:e}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn",onClick:n,"aria-label":"Close",children:t.jsx(Ze,{size:16})})]}),t.jsx("div",{className:"mb",children:s}),r&&t.jsx("footer",{children:r})]})})}function Tn(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function Ts(e){return e?new Date(e).toLocaleDateString([],{day:"numeric",month:"short"}):""}function Zt(e){const n=Math.max(0,(Date.now()-Date.parse(e))/1e3);return n<60?"just now":n<3600?`${Math.round(n/60)} min ago`:n<86400?`${Math.round(n/3600)} h ago`:Ts(e)}function tx({text:e}){const n=e.split(/(\*\*[^*]+\*\*)/g);return t.jsx(t.Fragment,{children:n.map((s,r)=>s.startsWith("**")?t.jsx("strong",{children:s.slice(2,-2)},r):t.jsx("span",{children:s},r))})}function z6({notes:e}){return t.jsx("div",{className:"notes",children:e.split(`
|
|
557
|
+
`).map((n,s)=>n.startsWith("### ")?t.jsx("h4",{children:n.slice(4)},s):n.startsWith("- ")?t.jsxs("p",{children:["• ",t.jsx(tx,{text:n.slice(2)})]},s):n.trim()?t.jsx("p",{children:t.jsx(tx,{text:n})},s):null)})}function hf(e){switch(e.waiting?.kind){case"questions":return`squad answer ${e.id}`;case"stuck":return`squad decide ${e.id}`;case"ask":return`squad reply ${e.id}`;case"yours":return`squad give-back ${e.id}`;case"chat":return`squad chat ${e.id}`;case"depends":return`squad build ${e.id} --on-branch`;case"change":case"spec":case"plan":case"proof":return`squad approve ${e.id}`;default:return`squad watch ${e.id}`}}function pf(e){const n=e.outdated??[];return n.length===1?`${n[0].adr} came after this plan and changes it`:`${n.map(s=>s.adr).join(" and ")} came after this plan and change it`}function Cc(e){switch(e.waiting?.kind){case"questions":return"Answer";case"spec":return"Review spec";case"plan":return e.specApproved?"Review design":"Review plan";case"proof":return"Check proof";case"stuck":return"Decide";case"ask":return"Answer";case"yours":return"Give back";case"chat":return"Open chat";case"change":return"Review design update";case"depends":return"Choose";default:return"Open"}}const $s={tickets:"Tickets",specs:"Specs",implement:"Implement",test:"Test",review:"Review",release:"Release",bugs:"Bugs",done:"Released"},ck=["app","update"],Zc=["waiting","installing","restarting"];function Xc(){const e=Pe({queryKey:ck,queryFn:()=>Ee("/api/v1/app/update"),refetchInterval:r=>Zc.includes(r.state.data?.progress.state??"idle")?1e3:6e4}),n=C.useRef(null),s=e.data?.startedAt;return C.useEffect(()=>{s&&(n.current&&n.current!==s&&window.location.reload(),n.current??=s)},[s]),e}function So(){const e=os(),{toast:n}=_e(),[s,r]=C.useState(!1);return{pending:s,call:async(o,c,u={})=>{r(!0);try{const d=await wt(o,c,u);return e.setQueryData(ck,d),d}catch(d){return n(d instanceof Error?d.message:String(d),"err"),null}finally{r(!1)}}}}function vp(e=[]){const n=[...new Set(e.map(s=>s.ticket??`the Architect in ${s.project}`))];return n.length<=1?n[0]??"":n.length<=3?`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`:`${n.slice(0,2).join(", ")} and ${n.length-2} more`}function M6(e){const n=new Date(e),s=o=>o.toDateString(),r=new Date(Date.now()-864e5);return`${s(n)===s(new Date)?"Today":s(n)===s(r)?"Yesterday":n.toLocaleDateString([],{day:"numeric",month:"short"})} at ${Tn(e)}`}function ff({text:e}){const{toast:n}=_e(),s=()=>{const r=navigator.clipboard?.writeText(e);if(!r)return n("Could not copy. Select the text instead.","err");r.then(()=>n("Command copied"),()=>n("Could not copy. Select the text instead.","err"))};return t.jsxs("div",{className:"upd-cmd",children:[t.jsxs("span",{className:"term",children:[t.jsx("b",{children:">_"}),t.jsx("span",{children:e})]}),t.jsxs("button",{className:"btn sm",onClick:s,children:[t.jsx(lr,{size:13})," Copy"]})]})}const F6=3;function uk({s:e}){const n=e.releases?.length?e.releases:e.notes?.length?[{version:e.latest??e.current,lines:e.notes,url:e.notesUrl}]:[];if(!n.length)return null;if(n.length===1)return t.jsx("ul",{className:"upd-notes","aria-label":"What is new",children:n[0].lines.slice(0,3).map(a=>t.jsx("li",{children:a},a))});const s=n.slice(0,F6),r=n.length-s.length;return t.jsxs("div",{className:"upd-rels","aria-label":"What is new",children:[s.map(a=>t.jsxs("div",{className:"upd-rel",children:[t.jsx("a",{className:"upd-ver",href:a.url,target:"_blank",rel:"noreferrer",title:`What is new in ${a.version}`,children:a.version}),t.jsx("ul",{className:"upd-notes",children:a.lines.slice(0,3).map(o=>t.jsx("li",{children:o},o))})]},a.version)),r>0&&t.jsxs("a",{className:"upd-more",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:["And ",r," older ",r===1?"release":"releases"]})]})}function L6(e){const n=e.progress.state;return Zc.includes(n)?`Updating to ${e.progress.to}`:n==="done"?`On ${e.current} now`:n==="failed"?"Update needs you":!e.newer||!e.latest||e.later===e.latest?null:`${e.latest} is ready`}function dk(){const{data:e}=Xc();if(!e)return null;const n=e.progress.state;return Zc.includes(n)?t.jsx(O6,{s:e}):n==="done"?t.jsx(q6,{s:e}):n==="failed"?t.jsx(D6,{s:e}):!e.newer||!e.latest||e.later===e.latest?null:t.jsx(_6,{s:e})}function _6({s:e}){const{pending:n,call:s}=So(),r=e.devInstall||e.major;return t.jsxs("section",{className:"upd","aria-label":"A new squad-kit",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(ns,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsxs("b",{className:"upd-title",children:["squad-kit ",e.latest," is ready"]}),t.jsx(uk,{s:e}),t.jsx("span",{className:"upd-sub",children:e.devInstall?"This squad-kit runs from its source folder, so it does not update itself. To use the new version, run:":e.major?`A big change from ${e.current}. Read what is new first, then run this in a terminal:`:`You have ${e.current}. Takes about a minute. Your tickets and work are kept.`}),r&&t.jsx(ff,{text:e.command})]}),t.jsxs("div",{className:"upd-acts",children:[!r&&t.jsxs("button",{className:"btn sm pri",disabled:n,onClick:()=>void s("/api/v1/app/update","POST"),children:[t.jsx(ns,{size:14})," Update now"]}),(!(e.notes?.length||e.releases?.length)||r)&&t.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"What is new"}),t.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void s("/api/v1/app/update","PUT",{later:e.latest}),children:"Later"}),!r&&t.jsx(ie,{text:"squad upgrade"})]})]})}function O6({s:e}){const n=e.progress,{pending:s,call:r}=So(),a=Zc.indexOf(n.state),o=p=>p<a?"done":p===a?"now":"todo",c=n.now?"Stopped the running steps":n.waitedFor?.length?`Waited for ${vp(n.waitedFor)} to finish ${n.waitedFor.length===1?"its step":"their steps"}`:"No work was in the middle of a step",u=n.busy?.length?`${vp(n.busy)} ${n.busy.length===1?"is":"are"} in the middle of a step`:"Almost there",d=[{label:a>0?c:"Waiting for running work to reach a safe point",note:a===0?u:n.now?"They pick up again after the restart":"Nothing was cut off"},{label:a>1?`Installed squad-kit ${n.to}`:`Installing squad-kit ${n.to}`,note:a===1?"Takes about a minute":a>1?"Done":"Next"},{label:"Restarting the app",note:a===2?"This page reloads on its own":"Same link, same tickets"},{label:"Picking up where each ticket was",note:"Nothing is lost"}];return t.jsxs("section",{className:"upd steps","aria-label":`Updating to squad-kit ${n.to}`,"aria-live":"polite",children:[t.jsxs("div",{className:"upd-head",children:[t.jsxs("b",{className:"upd-title",children:["Updating to squad-kit ",n.to]}),t.jsx("span",{className:"upd-sub",children:n.state==="waiting"?"squad-kit waits until no agent is in the middle of a step, so no work is cut off.":"Takes about a minute. Your tickets and work are kept."}),n.state==="waiting"&&t.jsxs("span",{className:"upd-acts",children:[t.jsx("button",{className:"btn sm pri",disabled:s,onClick:()=>void r("/api/v1/app/update","POST",{now:!0}),title:"Running steps stop now and pick up again after the restart",children:"Update now anyway"}),t.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void r("/api/v1/app/update","DELETE"),children:"Not now"})]})]}),t.jsx("ol",{className:"setup-steps",children:d.map((p,f)=>t.jsxs("li",{className:o(f),children:[t.jsx("span",{className:"mark",children:o(f)==="done"?t.jsx(xe,{size:12,strokeWidth:3}):o(f)==="now"?t.jsx("span",{className:"live"}):null}),t.jsxs("span",{className:"txt",children:[t.jsx("b",{children:p.label}),t.jsx("small",{title:p.note,children:p.note})]})]},p.label))}),t.jsx("div",{className:"setup-bar","aria-hidden":!0,children:t.jsx("i",{})})]})}function q6({s:e}){const{pending:n,call:s}=So(),r=e.progress.carried??[];return t.jsxs("section",{className:"upd","aria-label":`You are on squad-kit ${e.current}`,children:[t.jsx("span",{className:"upd-ic ok",children:t.jsx(xe,{size:16,strokeWidth:2.6})}),t.jsxs("div",{className:"upd-main",children:[t.jsxs("b",{className:"upd-title",children:["You are on squad-kit ",e.current]}),t.jsx("span",{className:"upd-sub",children:r.length?`${vp(r)} carried on where ${r.length===1?"it was":"they were"}. Nothing was lost.`:"Your tickets and work are kept."}),t.jsx(uk,{s:e})]}),t.jsxs("div",{className:"upd-acts",children:[t.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Read what is new"}),t.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void s("/api/v1/app/update","DELETE"),children:"Close"})]})]})}function D6({s:e}){const n=e.progress,{pending:s,call:r}=So();return t.jsxs("section",{className:"upd failed",role:"alert","aria-label":"squad-kit could not update by itself",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(o6,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsx("b",{className:"upd-title",children:"Could not update by itself"}),t.jsxs("span",{className:"upd-sub",children:[n.reason," ",n.permission?"Run this once in a terminal, then press Restart:":"Try again, or run this in a terminal, then press Restart:"]}),t.jsx(ff,{text:e.command}),n.output&&t.jsxs("details",{className:"upd-out",children:[t.jsx("summary",{children:"What the installer said"}),t.jsx("pre",{children:n.output})]})]}),t.jsxs("div",{className:"upd-acts",children:[t.jsxs("button",{className:"btn sm pri",disabled:s,onClick:()=>void r("/api/v1/app/update/restart","POST"),children:[t.jsx(Pi,{size:14})," Restart"]}),!n.permission&&t.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void r("/api/v1/app/update","POST"),children:"Try again"}),t.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void r("/api/v1/app/update","DELETE"),children:"Not now"})]})]})}function hk(){const{data:e}=Xc(),{pending:n,call:s}=So(),{toast:r}=_e();if(!e)return null;const a=async()=>{const c=await s("/api/v1/app/update/check","POST");c&&(c.checkError?r(c.checkError,"err"):r(c.newer?`squad-kit ${c.latest} is ready`:`You are on the latest version (${c.current})`))},o=e.newer&&!e.devInstall&&!e.major&&e.progress.state==="idle";return t.jsxs("div",{className:"about",children:[t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Version"}),t.jsxs("span",{className:"about-row",children:[t.jsx("b",{children:e.current}),e.newer?t.jsxs("span",{className:"pill you",children:[e.latest," is ready"]}):e.checkedAt&&!e.checkError?t.jsx("span",{className:"pill ok",children:"Up to date"}):null,e.devInstall&&t.jsx("span",{className:"pill",children:"Source folder"})]})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Last checked"}),t.jsxs("span",{className:"about-row",children:[e.checkedAt?M6(e.checkedAt):"Not yet",e.checkError&&t.jsx("span",{className:"note bad",children:e.checkError})]})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Updates"}),t.jsxs("span",{className:"about-row",children:[t.jsxs("label",{className:"about-daily",children:[t.jsx("input",{type:"checkbox",checked:e.daily,disabled:n,onChange:c=>void s("/api/v1/app/update","PUT",{daily:c.target.checked})}),"Check for updates every day"]}),t.jsx("span",{className:"note",children:"Turn it off on a network without internet."})]})]}),t.jsxs("div",{className:"about-acts",children:[t.jsx("button",{className:"btn sm",disabled:n,onClick:()=>void a(),children:n?"Checking…":"Check for updates"}),t.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Release notes"}),o&&t.jsxs("button",{className:"btn sm pri",disabled:n,onClick:()=>void s("/api/v1/app/update","POST"),children:[t.jsx(ns,{size:14})," Update to ",e.latest]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad upgrade"})]}),e.newer&&(e.devInstall||e.major)&&t.jsx(ff,{text:e.command})]})}function B6(){const{data:e}=Xc(),[n,s]=C.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:"Version and updates",children:[e?`squad-kit ${e.current}`:"About",e?.newer&&t.jsx("span",{className:"about-dot","aria-label":`${e.latest} is ready`})]}),n&&t.jsx(We,{title:"About squad-kit",onClose:()=>s(!1),children:t.jsx(hk,{})})]})}function Ur(e){const n=e.changes?.at(-1);return n&&n.status!=="done"&&n.status!=="declined"?n:void 0}function Ss(e){const n=Ur(e)?.status;return n==="proposed"||n==="failed"||n==="design-ready"}function Co(e){return!!(e.waiting||e.quiet?.kind==="stuck"||e.outdated?.length||Ss(e)||as(e))}function as(e){return!!e.testChange?.ask}function mf(e){return as(e)?"squad-kit cannot tell which way of testing to keep":""}function U6(e,n){return n>0?`(${n}) ${e}`:e}function W6(e,n){const s=Math.max(0,(n-Date.parse(e))/1e3);if(!Number.isFinite(s)||s<60)return"just now";if(s<3600)return`waiting ${Math.round(s/60)} min`;if(s<86400)return`waiting ${Math.round(s/3600)} h`;const r=Math.round(s/86400);return`waiting ${r} ${r===1?"day":"days"}`}function pk(e){return!e.waiting&&e.quiet?.kind==="stuck"?e.quiet.since:e.activity[0]?.at??e.createdAt}class H6{rank=new Map;next=0;sort(n){const s=n.filter(a=>!this.rank.has(a.key)).sort((a,o)=>a.since.localeCompare(o.since)||a.key.localeCompare(o.key));for(const a of s)this.rank.set(a.key,this.next++);const r=new Set(n.map(a=>a.key));for(const a of this.rank.keys())r.has(a)||this.rank.delete(a);return[...n].sort((a,o)=>this.rank.get(a.key)-this.rank.get(o.key))}}function V6(e){const n=new Set;return e.waiting&&n.add(e.waiting.kind),Ss(e)&&n.add("change"),e.quiet?.kind==="stuck"&&n.add("quiet"),e.outdated?.length&&n.add("outdated"),as(e)&&e.waiting?.kind!=="plan"&&n.add("test-command"),[...n]}const K6=["yours","chat","release"];function Y6(e){return!K6.includes(e)}function Q6(e,n,s){const r=Ur(n),a=s==="ask"?n.agentQuestion?.at:s==="change"&&r?`${r.id}-${r.status==="design-ready"?"design":"spec"}`:s==="quiet"?n.quiet?.since:s==="outdated"?n.outdated?.map(o=>o.adr).join("+"):s==="test-command"?n.testChange?.to:void 0;return`${e}/${n.id}/${s}${a?`/${a}`:""}`}function G6(e){return e.flatMap(({project:n,ticket:s})=>V6(s).filter(Y6).map(r=>({key:Q6(n.id,s,r),project:n,ticket:s,reason:r})))}const $c=2*6e4;class Z6{known=null;gone=new Map;next(n,s){const r=new Set(n.map(c=>c.key));if(!this.known)return this.known=r,[];const a=this.known,o=n.filter(c=>!a.has(c.key)&&!(s-(this.gone.get(c.key)??-1/0)<$c));for(const c of a)r.has(c)||this.gone.set(c,s);for(const[c,u]of this.gone)(r.has(c)||s-u>=$c)&&this.gone.delete(c);return this.known=r,o}}const nx="sk.notices.shown";function fk(e,n,s){if(!s)return!0;let r={};try{r=JSON.parse(s.getItem(nx)??"{}")}catch{r={}}if(n-(r[e]??-1/0)<$c)return!1;const a=Object.fromEntries(Object.entries(r).filter(([,o])=>n-o<$c));a[e]=n;try{s.setItem(nx,JSON.stringify(a))}catch{}return!0}const X6={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function J6(e){const n=e.ticket,s={questions:"the squad has questions for you",ask:`the ${X6[n.agentQuestion?.from??""]??"squad"} has a question`,spec:"the spec is ready for you",plan:n.specApproved?"the design is ready for you":"the plan is ready for you",change:"a change waits for you",depends:"it needs a ticket that is not merged yet",proof:"the proof is ready to check",stuck:"the squad stopped and needs you",quiet:"a step looks stuck",outdated:"a newer decision changes the plan","test-command":"a choice about the tests waits for you",yours:"you took it over",chat:"your talk with the squad",release:"ready to release"};return{title:`${n.id}: ${s[e.reason]}`,body:`${n.title} · ${e.project.name}`}}function mk(e,n){const s=`/p/${encodeURIComponent(e)}`;return n.waiting?.kind==="proof"?`${s}/tickets/${encodeURIComponent(n.id)}/proof`:`${s}/board?ticket=${encodeURIComponent(n.id)}`}const e8=8e3;function t8(e,n){return e?n.secure?e.permission==="granted"||e.permission==="denied"?Promise.resolve(e.permission):new Promise(s=>{let r=!1;const a=u=>{r||(r=!0,clearTimeout(c),s(u))},o=u=>a(u==="granted"||u==="denied"||u==="default"?u:e.permission==="default"?"default":e.permission),c=setTimeout(()=>a(e.permission==="default"?"timeout":e.permission),n.timeoutMs??e8);try{const u=e.requestPermission(o);u&&typeof u.then=="function"&&u.then(o,()=>a(e.permission==="default"?"error":e.permission))}catch{a(e.permission==="default"?"error":e.permission)}}):Promise.resolve("insecure"):Promise.resolve("unsupported")}const Ba="Allow notifications for this page in your browser's site settings (the icon next to the address), then reload. On a Mac, also check System Settings › Notifications for your browser.";function n8(e){switch(e){case"granted":return{choice:"on",test:!0,bad:!1,say:"Desktop notices are on. Didn't see one just now? Your computer may block notices for this browser: check the system's notification settings."};case"denied":return{choice:"on",test:!1,bad:!0,say:`Your browser blocks notices from this page. ${Ba}`};case"timeout":return{choice:"on",test:!1,bad:!0,say:`Your browser has not answered. ${Ba} Notices start once it allows them.`};case"error":return{choice:"on",test:!1,bad:!0,say:`Your browser did not let this page ask. ${Ba}`};case"insecure":return{choice:null,test:!1,bad:!0,say:"Your browser shows desktop notices only on a secure page. Open the board on this computer, at its 127.0.0.1 or localhost address, to turn them on."};case"unsupported":return{choice:null,test:!1,bad:!0,say:"This browser can't show desktop notices. The banner and the tab title still show what needs you."};default:return{choice:"off",test:!1,bad:!1,say:"No desktop notices for now. Turn them on in Settings any time."}}}const gk="Your browser is asking: look near the address bar.";function s8(e,n){const s=e.filter(d=>d.kind==="tests"),r=e.filter(d=>d.kind!=="tests"),a=new Set(r.map(d=>d.id)),o=n.filter(d=>a.has(d.from)&&a.has(d.to)&&d.from!==d.to),c=new Map(r.map(d=>[d.id,0]));for(let d=0;d<r.length;d+=1){let p=!1;for(const f of o){const m=c.get(f.from)+1;m>c.get(f.to)&&m<r.length&&(c.set(f.to,m),p=!0)}if(!p)break}const u=[];for(const d of r)(u[c.get(d.id)]??=[]).push(d);return{columns:u.filter(Boolean),below:s}}function r8(e,n,s){return s.filter(r=>r.from===e.id).map(r=>`${r.label??"uses"} ${n.find(a=>a.id===r.to)?.name??r.to}`).join(" · ")}function jp(e,n){if(e.state==="now"&&e.since){const s=Math.max(0,Math.floor((n-Date.parse(e.since))/1e3));return`${Math.floor(s/60)}:${String(s%60).padStart(2,"0")}`}return e.state==="todo"||e.state==="skipped"||e.seconds===void 0?"":e.seconds<60?`${Math.max(1,e.seconds)} s`:`${Math.round(e.seconds/60)} min`}const xk="sk.notices.setup";function io(e){try{const n=JSON.parse(e?.getItem(xk)??"[]");return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}catch{return[]}}function yk(e,n){try{e?.setItem(xk,JSON.stringify([...new Set(n)]))}catch{}}function i8(e,n){yk(e,[...io(e),n])}function a8(e,n){yk(e,io(e).filter(s=>s!==n))}function o8(e,n){return e.filter(s=>n.includes(s.id)&&s.setup?.ready&&!s.setup.approved)}function l8(e){return{title:`${e} is ready`,body:"squad-kit has read your project. Check what it understood, then start."}}function Fe(e){return/["$`\\!]/.test(e)?`'${e.replace(/'/g,"'\\''")}'`:`"${e}"`}function qi(e){return/^[\w@%+=:,./#-]+$/.test(e)&&!e.startsWith("#")?e:Fe(e)}function kk(e){let n;do n=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==n);return e}const sx="Skip: let the Analyst decide",c8={reading:"Analyst reading",questions:"Questions for you",drafting:"Analyst writing the breakdown",ready:"Ready for you to approve",approved:"Approved",failed:"Stopped"},u8={reading:"ok",questions:"you",drafting:"ok",ready:"you",approved:"ok",failed:"bug"};function vk(e){if(e.status!=="approved")return{text:c8[e.status],tone:u8[e.status]};if(e.counts.stories>0&&e.counts.merged===e.counts.stories)return{text:"Built",tone:"ok"};const n=e.state?.build;return n?.on?{text:"Building continuously",tone:"ok"}:n?{text:"Paused",tone:"plain"}:e.building?{text:"Building",tone:"ok"}:{text:"Approved",tone:"ok"}}function d8(e){return vk({status:e.status,counts:e.counts,building:e.building})}function It(e,n,s=`${n}s`){return`${e} ${e===1?n:s}`}function h8(e){return`${It(e.epics,"epic")}, ${It(e.features,"feature")}, ${It(e.stories,"story","stories")}`}function p8(e){if(e<90)return`${Math.max(1,Math.round(e))} min`;const n=Math.round(e/30)/2;return`${n} ${n===1?"hour":"hours"}`}function f8(e){return e>0&&e<1?"under $1":`$${Math.round(e)}`}function jk(e){return e.rough?"a rough guess: no finished tickets yet":`based on ${It(e.basedOn,"finished ticket")}`}function gf(e){return{...e.costUsd!==void 0?{cost:f8(e.costUsd)}:{},time:p8(e.minutes)}}function m8(e){if(!e.stories)return"Every story is merged.";const{cost:n,time:s}=gf(e);return`${It(e.stories,"story","stories")}, about ${n?`${n} and `:""}${s}, ${e.parallel} at a time, ${jk(e)}`}function g8(e){if(!e.stories)return"Every story is merged";const{cost:n,time:s}=gf(e);return`About ${s}${n?` and ${n}`:""} left`}function Wr(e){return!!(e&&(e.status==="pending"||e.status==="running"||e.status==="stopping"))}const bk=e=>e.charAt(0).toUpperCase()+e.slice(1);function x8(e){return e?`${bk(e.unit)} ${Math.max(1,Math.min(e.done,e.of||e.done))} of ${e.of}`:""}function vh(e){if(!e||!e.epics&&!e.features&&!e.stories)return"";const n=[It(e.epics,"epic"),It(e.features,"feature"),...e.stories?[It(e.stories,"story","stories")]:[]];return`Found ${n.length===3?`${n[0]}, ${n[1]} and ${n[2]}`:n.join(" and ")} so far.`}function rx(e){return e<60?"less than a minute":`${Math.round(e/60)} min`}function y8(e,n=Date.now()){if(!e)return"";const s=e.startedAt?Math.max(0,(n-Date.parse(e.startedAt))/1e3):null,r=e.usualSeconds?`usually about ${rx(e.usualSeconds)}${e.at?.of?` for ${It(e.at.of,e.at.unit)}`:""}`:"";return[s!==null?`${rx(s)} so far`:"",r].filter(Boolean).join(", ")}function k8(e){const n=e.source,s=n.pictures?`, tables and ${It(n.pictures,"picture")}, so the Analyst sees the mockups too`:" and tables";return n.kind==="docx"?{title:"Turned the Word file into text",sub:`Kept the headings${s}.`}:n.kind==="pdf"?{title:"Kept the PDF as it is",sub:`The Analyst reads ${n.pages?`its ${It(n.pages,"page")}`:"it"} directly, pictures and all.`}:n.kind==="pasted"?{title:"Saved the pasted text",sub:n.pages&&n.pages>1?`In ${n.pages} parts, so the Analyst reads it part by part.`:"The Analyst reads it as you pasted it."}:{title:"Saved the text",sub:n.pages&&n.pages>1?`In ${n.pages} parts, so the Analyst reads it part by part.`:"The Analyst reads it as it is."}}function v8(e){const n=e.state.job,s=n?.step,r=e.status==="failed",a=["text","read","questions","draft"],o=e.status==="questions"?"questions":e.status==="drafting"||s==="draft"?"draft":s==="text"?"text":e.status==="ready"||e.status==="approved"?"draft":"read",c=a.indexOf(o),u=e.status==="ready"||e.status==="approved",d=y=>{const x=a.indexOf(y);return u||x<c?"done":x>c?"todo":r?"failed":"now"},p=o==="read"&&n?[x8(n.at),vh(n.found)].filter(Boolean):[],f=n?.status==="pending"&&n.now?n.now:"",m=e.questions.length;return[{key:"text",...k8(e),state:d("text")},{key:"read",title:"Reading the document",sub:d("read")==="now"?f&&!n?.at?.done?`${f}.`:p.length?`${p[0]}${p[1]?`. ${p[1]}`:"."}`:"Starting to read.":d("read")==="failed"?"It stopped here. Nothing it found is lost.":d("read")==="done"?"Read the whole document.":"Page by page, writing down the epics and features it finds.",state:d("read"),...o==="read"&&n?.at?.of?{bar:{done:n.at.done,of:n.at.of}}:{}},{key:"questions",title:"Questions for you",sub:d("questions")==="done"&&c>2?m?`${It(m,"question")}, answered.`:"None: the BRD was clear.":"Only when something is missing or two parts clash. Small things it decides and writes down.",state:d("questions")},{key:"draft",title:"Writing the epics, features and stories",sub:d("draft")==="now"&&n?.now?`${n.now}.${vh(n.found)?` ${vh(n.found)}`:""}`:'Each story gets "done when" checks, its size, what it needs first, and where it comes from in the BRD.',state:d("draft")}]}function $o(e){return e?[[e.section,e.title].filter(Boolean).join(" "),e.page?`page ${e.page}`:""].filter(Boolean).join(", "):""}function j8(e){return/^\d/.test(e.trim())?`From section ${e.trim()}`:`From ${e.trim()}`}function b8(e){return[e.section??e.title,e.page?`page ${e.page}`:""].filter(Boolean).join(", ")}function Eo(e){return e.epics.flatMap(n=>[...n.features.flatMap(s=>s.stories.map(r=>({story:r,epic:n,feature:s}))),...n.stories.map(s=>({story:s,epic:n}))])}function Un(e,n){if(!n)return null;for(const s of e.epics){if(s.key===n)return{level:"epic",item:s,epic:s};for(const a of s.features){if(a.key===n)return{level:"feature",item:a,epic:s,feature:a};const o=a.stories.find(c=>c.key===n);if(o)return{level:"story",item:o,epic:s,feature:a,story:o}}const r=s.stories.find(a=>a.key===n);if(r)return{level:"story",item:r,epic:s,story:r}}return null}function Hr(e){return"features"in e?[...e.features.flatMap(n=>n.stories),...e.stories]:e.stories}function w8(e){return e.level==="epic"?"":[e.epic.title,e.level==="story"?e.feature?.title:void 0].filter(Boolean).join(" › ")}function wk(e){const n=It(Hr(e).length,"story","stories");return"features"in e&&e.features.length?`${It(e.features.length,"feature")}, ${n}`:n}function N8(e,n){return n.level==="epic"?[]:n.level==="feature"?e.epics.map(s=>({key:s.key,label:`${s.key} ${s.title}`})):e.epics.flatMap(s=>[...s.features.map(r=>({key:r.key,label:`${s.title} › ${r.title}`})),{key:s.key,label:`${s.title}, straight under the epic`}])}function S8(e){if(e.level!=="epic")return e.level==="feature"?e.epic.key:e.feature?.key??e.epic.key}const C8=["merged","released"];function Jc(e){return!!(e&&C8.includes(e))}function Ec(e,n){return{done:e.filter(s=>Jc(n.get(s.key)?.state)).length,of:e.length}}function $8(e){const n=Math.max(0,e.stories-e.merged-e.building-e.needsYou);return{merged:e.merged,building:e.building,needsYou:e.needsYou,rest:n}}function ix(e,n){const s=new Map(e.progress.map(r=>[r.key,r]));return Eo(e).filter(({story:r})=>r.dependsOn.includes(n)&&!Jc(s.get(r.key)?.state)).map(({story:r})=>r.key)}function E8(e,n){const s=new Map(e.progress.map(r=>[r.key,r]));return n.dependsOn.filter(r=>!Jc(s.get(r)?.state))}function Nk(e){return e==="clash"?"Two parts clash":e==="gap"?"Missing in the BRD":e==="check"?"A check failed":"Needs you"}function Sk(e){const n=/^(.+?[.?!])(\s|$)/.exec(e.trim());return(n?n[1]:e).trim()}function ax(e,n){const s=new Set,r=new Map(e.progress.map(u=>[u.key,u.state])),a=["building","needs-you","next","waits"],o=e.progress.some(u=>a.includes(u.state)),c=Un(e,n);return e.epics.forEach((u,d)=>{const p=c?.epic.key===u.key,f=Hr(u).some(m=>a.includes(r.get(m.key)));(p||(o?f:d===0))&&s.add(u.key);for(const m of u.features){const y=m.stories.some(x=>a.includes(r.get(x.key)));(c?.feature?.key===m.key||c?.item.key===m.key||(o?y:d===0))&&s.add(m.key)}}),s}const T8={analyst:"Analyst",architect:"Architect",builder:"Builder",tester:"Tester",reviewer:"Reviewer",answer:"from your answer"};function ox(e){return[e.item,e.ticket,T8[e.by]??e.by].filter(Boolean).join(" · ")}function jh(e){const n=e.trim().split(/\s+/),s=n.pop()??"",r=/[^aeiou]y$/i.test(s)?`${s.slice(0,-1)}ies`:/s$/i.test(s)?s:`${s}s`;return[...n,r].map((o,c)=>c===0?bk(o.toLowerCase()):o.toLowerCase()).join(" ")}function bh(e,n){if(n||e.new===e.all&&e.all>0)return"new";const s=[e.new?`${e.new} new`:"",e.changed?`${e.changed} changed`:""].filter(Boolean);return s.length?s.join(", "):"no changes"}function A8(e){const n=Eo(e).find(({story:s})=>s.dependsOn.length);return n?`${n.story.key} needs ${n.story.dependsOn[0]}`:null}function bp(e,n){if(!e)return{phase:"unknown",of:0,pct:0};const s=(p,f)=>f>0?Math.min(100,Math.round(p/f*100)):5,r=n&&(!n.at||!e.at||n.at===e.at)?n:null,a=e.links,o=e.items?.of??r?.items??(a?e.of:void 0);if(o===void 0)return{phase:"unknown",of:e.of,pct:s(e.done,e.of)};const c=e.items?.done??Math.min(e.done,o),u=a?.of??r?.links??0,d=e.items||a?s(c+(a?.done??0),o+(a?.of??0)):s(e.done,e.of);return c>=o&&u>0?{phase:"links",...a?{done:a.done}:{},of:u,pct:d}:{phase:"items",done:c,of:o,pct:d}}function Ck(e){return e.phase==="links"?e.done===void 0?`adding the ${It(e.of,"link")}`:`adding the links, ${e.done} of ${e.of}`:e.phase==="items"?`${e.done} of ${It(e.of,"item")}`:""}function P8(e){const n=e.counts.stories;if(!n||e.counts.merged<n)return null;const s=n===1?"The story is merged":`All ${n} stories are merged`;return e.progress.length>0&&e.progress.every(a=>a.state==="released")?{text:`${s} and went out in a release.`,release:!1}:{text:`${s} and ${n===1?"waits":"wait"} in the next release.`,release:!0}}function $k(e,n){return n?/^c\d+$/.test(n)?`It became a small change on ${e}. The Analyst writes it into the spec.`:`${e} is merged, so it became a new ticket, ${n}, linked to it.`:`Changed on ${e}.`}function R8(e,n){const s=e.trim(),r=n.trim().replace(/[.!]$/,"").toLowerCase();return!r||!s.toLowerCase().startsWith(r)?s:s.slice(r.length).replace(/^[.!]?\s*/,"")||s}const wp=e=>!e.trim();function wh(e){const n=[e.given,e.when,e.then];return n.some(wp)&&!n.every(wp)}function lx(e){return e.filter(n=>![n.given,n.when,n.then].every(wp))}function cx(e){return`Add the part that was left out: ${e.text}${e.ref?` (${$o(e.ref)})`:""}.`}function I8(e,n){const s=r=>!n||r.owner.trim().toLowerCase()===n.trim().toLowerCase();return e.filter(s).reduce((r,a)=>r+(a.status==="questions"?1:0)+a.counts.needsYou,0)}const ks={col:172,gap:14,epicGap:44,pad:24,epicH:74,featY:160,featH:72,storyY:258,storyH:44,storyStep:50,popW:300,popH:150,rowWidth:1600};function z8(e,n=ks.rowWidth){const{col:s,gap:r,epicGap:a,pad:o,epicH:c,featY:u,featH:d,storyY:p,storyH:f,storyStep:m}=ks,y=new Map(e.progress.map(T=>[T.key,T])),x=[],v=[],k=c+(u-c)/2;let N=o,w=0,S=o,E=o+u+d,P=o*2+s;const B=(T,_,I)=>{T.forEach((D,R)=>{x.push({key:D.key,level:"story",row:w,x:_,y:I+R*m,w:s,h:f,title:D.title,state:y.get(D.key)?.state??"not-started"})}),T.length&&(E=Math.max(E,I+(T.length-1)*m+f))};for(const T of e.epics){const _=[...T.features.map(M=>({kind:"feature",f:M})),...T.stories.length?[{kind:"stories"}]:[]],I=Math.max(1,_.length),D=I*s+(I-1)*r;N>o&&N+D+o>n&&(w+=1,N=o,S=E+a,E=S+u+d);const R=N+D/2;x.push({key:T.key,level:"epic",row:w,x:N,y:S,w:D,h:c,title:T.title,done:Ec(Hr(T),y)});const F=_.map((M,J)=>N+J*(s+r)+s/2);F.length&&(v.push({x1:R,y1:S+c,x2:R,y2:S+k}),v.push({x1:Math.min(R,F[0]),y1:S+k,x2:Math.max(R,F.at(-1)),y2:S+k})),_.forEach((M,J)=>{const U=N+J*(s+r),G=F[J];M.kind==="feature"?(v.push({x1:G,y1:S+k,x2:G,y2:S+u}),x.push({key:M.f.key,level:"feature",row:w,x:U,y:S+u,w:s,h:d,title:M.f.title,done:Ec(M.f.stories,y)}),M.f.stories.length&&v.push({x1:G,y1:S+u+d,x2:G,y2:S+p}),B(M.f.stories,U,S+p)):(v.push({x1:G,y1:S+k,x2:G,y2:S+p}),B(T.stories,U,S+p))}),P=Math.max(P,N+D+o),N+=D+a}return{boxes:x,lines:v,width:P,height:E+o}}function xf(e){return Jc(e)?"m":e==="building"?"b":e==="needs-you"?"y":"w"}function M8(e,n){const s=Math.max(ks.pad/2,Math.min(n.x,e.width-ks.popW-ks.pad/2)),r=s+ks.popW,a=e.boxes.filter(c=>c.level!=="epic"&&c.row===n.row&&c.x<r&&c.x+c.w>s).map(c=>c.y+c.h),o=Math.max(n.y+n.h,...a)+14;return{left:s,top:o,height:Math.max(e.height,o+ks.popH+ks.pad)}}function F8(e,n){if(!n.width||!n.height)return 1;const s=Math.min(n.width/e.width,n.height/e.height,1);return Math.max(.3,Math.round(s*100)/100)}function L8(e,n){return n.width?Math.max(.6,Math.min(1,Math.round(n.width/e.width*100)/100)):1}const Ek="sk.chatdock",Np=new Set;function _8(){try{const e=JSON.parse(localStorage.getItem(Ek)??"{}");return{tab:e.tab??null,min:!!e.min,width:Tk(e.width??600),seen:e.seen??{}}}catch{return{tab:null,min:!1,width:600,seen:{}}}}let Rr=typeof window>"u"?{tab:null,min:!1,width:600,seen:{}}:_8();function Tk(e){return Math.max(440,Math.min(900,Math.round(e)))}function vi(e){Rr={...Rr,...e};try{localStorage.setItem(Ek,JSON.stringify(Rr))}catch{}for(const n of Np)n()}const Jn={get:()=>Rr,show:e=>vi({tab:e,min:!1}),pick:e=>vi({tab:e}),minimize:()=>vi({min:!0}),restore:()=>vi({min:!1}),resize:e=>vi({width:Tk(e)}),seen:(e,n)=>{Rr.seen[e]!==n&&vi({seen:{...Rr.seen,[e]:n}})}};function Di(e){return C.useSyncExternalStore(n=>{const s=window.matchMedia?.(e);return s?.addEventListener("change",n),()=>s?.removeEventListener("change",n)},()=>!!window.matchMedia?.(e).matches)}const Bi="(max-width: 760px)";function eu(){return C.useSyncExternalStore(e=>(Np.add(e),()=>Np.delete(e)),()=>Rr)}const Sp="-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-\uFEFF",O8=new RegExp(`[${Sp}]`,"g"),q8=/[A-Za-z]/g;function An(e){const n=String(e??"").replace(/```[\s\S]*?(```|$)/g," ").replace(/`[^`]*`/g," ").replace(/(https?:\/\/|file:\/\/)\S+/g," "),s=n.match(O8)?.length??0,r=n.match(q8)?.length??0,a=s+r;if(!a)return{lang:"none",dir:"ltr",share:0};const o=s/a;return{lang:o>=.85?"ar":o<=.15?"en":"mixed",dir:o>=.5?"rtl":"ltr",share:o}}function As(e){return e.dir==="rtl"?"t-ar":e.lang==="mixed"?"t-mx":"t-en"}function D8(e){const n=e.dir==="rtl"?"right to left":"left to right";return e.lang==="ar"?`Arabic · ${n}`:e.lang==="en"?`English · ${n}`:e.lang==="mixed"?`Mixed · ${n}`:""}const Ak="[0-9\\u0660-\\u0669][0-9\\u0660-\\u0669.,:%/+\\-]*",B8=`(?:${Ak}[ ]+)*[A-Za-z][A-Za-z0-9._\\-/+#@:]*(?:[ ]+[A-Za-z0-9][A-Za-z0-9._\\-/+#@:]*)*`,U8=`[${Sp}]+(?:[ ]+(?:${Ak}[ ]+)*[${Sp}]+)*`,W8=new RegExp(`(${B8})|(${U8})`,"g");function H8(e,n){const s=[];let r=0;const a=(o,c)=>{if(!o)return;const u=s.at(-1);u&&!u.dir&&!c?u.text+=o:s.push(c?{text:o,dir:c}:{text:o})};for(const o of e.matchAll(W8)){const c=o.index??0;a(e.slice(r,c));const u=!!o[1];a(o[0],u&&n==="rtl"?"ltr":!u&&n==="ltr"?"rtl":void 0),r=c+o[0].length}return a(e.slice(r)),s}function V8(e){const n=e.filter(s=>s==="rtl").length;return e.length&&n*2>=e.length?"rtl":"ltr"}function K8(e,n){if(n<=0)return"";let s=0;for(const r of e.matchAll(/\S+/g))if(s+=1,s===n)return e.slice(0,(r.index??0)+r[0].length);return e}function Y8(e){return e.match(/\S+/g)?.length??0}const Pk=new Set(["p","li","h1","h2","h3","h4","h5","h6","td","th","dt","dd","figcaption"]),yf=new Set(["code","pre","svg","math"]);function Rk(e,n=!1){return e.type==="text"?e.value??"":e.tagName&&yf.has(e.tagName)||n&&e.tagName&&(e.tagName==="ul"||e.tagName==="ol")?" ":(e.children??[]).map(s=>Rk(s,!0)).join("")}function Q8(e,n){const s=e.properties??={},r=Array.isArray(s.className)?s.className:typeof s.className=="string"?[s.className]:[];s.className=[...r,n]}function kf(e,n,s){return{type:"element",tagName:e,properties:n,children:s}}function Ik(e,n,s){if(!e.children||e.tagName&&yf.has(e.tagName))return;const r=[];for(const a of e.children){if(a.type!=="text"){a.type==="element"&&!(a.tagName&&Pk.has(a.tagName))&&Ik(a,n,s),r.push(a);continue}for(const o of H8(a.value??"",n)){const c=s?G8(o.text):[{type:"text",value:o.text}];o.dir?r.push(kf("bdi",{dir:o.dir},c)):r.push(...c)}}e.children=r}function G8(e){return e.split(/(\s+)/).filter(Boolean).map(n=>/^\s+$/.test(n)?{type:"text",value:n}:kf("span",{className:["fx"]},[{type:"text",value:n}]))}function Z8(e,n={}){let s=null;const r=a=>{if(a.type==="element"&&a.tagName&&yf.has(a.tagName)){a.tagName==="code"&&((a.properties??={}).dir="ltr"),a.tagName==="pre"&&(s=a);return}if(a.type==="element"&&a.tagName&&Pk.has(a.tagName)){const o=An(Rk(a));if(o.lang!=="none"){const c=a.properties??={};c.dir=o.dir,c.lang=o.dir==="rtl"?"ar":"en",Q8(a,As(o))}Ik(a,o.dir,!!n.stream),s=a}for(const o of a.children??[])r(o);if(a.type==="element"&&(a.tagName==="ul"||a.tagName==="ol"||a.tagName==="table")){const o=[],c=u=>{for(const d of u.children??[]){if(d.type!=="element")continue;const p=d.tagName==="li"||d.tagName==="td"||d.tagName==="th";p&&d.properties?.dir&&o.push(d.properties.dir),(!p||a.tagName==="table")&&c(d)}};c(a),o.length&&((a.properties??={}).dir=V8(o))}};return r(e),n.caret&&s&&s.tagName!=="pre"&&(s.children??=[]).push(kf("span",{className:["caret"],ariaHidden:"true"},[])),e}function X8(e={}){return n=>{Z8(n,e)}}function J8(e,n){const s={};return(e[e.length-1]===""?[...e,""]:e).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const e7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,t7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,n7={};function ux(e,n){return(n7.jsx?t7:e7).test(e)}const s7=/[ \t\n\f\r]/g;function r7(e){return typeof e=="object"?e.type==="text"?dx(e.value):!1:dx(e)}function dx(e){return e.replace(s7,"")===""}class To{constructor(n,s,r){this.normal=s,this.property=n,r&&(this.space=r)}}To.prototype.normal={};To.prototype.property={};To.prototype.space=void 0;function zk(e,n){const s={},r={};for(const a of e)Object.assign(s,a.property),Object.assign(r,a.normal);return new To(s,r,n)}function Cp(e){return e.toLowerCase()}class en{constructor(n,s){this.attribute=s,this.property=n}}en.prototype.attribute="";en.prototype.booleanish=!1;en.prototype.boolean=!1;en.prototype.commaOrSpaceSeparated=!1;en.prototype.commaSeparated=!1;en.prototype.defined=!1;en.prototype.mustUseProperty=!1;en.prototype.number=!1;en.prototype.overloadedBoolean=!1;en.prototype.property="";en.prototype.spaceSeparated=!1;en.prototype.space=void 0;let i7=0;const ze=Vr(),dt=Vr(),$p=Vr(),ce=Vr(),Ge=Vr(),$i=Vr(),un=Vr();function Vr(){return 2**++i7}const Ep=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:dt,commaOrSpaceSeparated:un,commaSeparated:$i,number:ce,overloadedBoolean:$p,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),Nh=Object.keys(Ep);class vf extends en{constructor(n,s,r,a){let o=-1;if(super(n,s),hx(this,"space",a),typeof r=="number")for(;++o<Nh.length;){const c=Nh[o];hx(this,Nh[o],(r&Ep[c])===Ep[c])}}}vf.prototype.defined=!0;function hx(e,n,s){s&&(e[n]=s)}function Ui(e){const n={},s={};for(const[r,a]of Object.entries(e.properties)){const o=new vf(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,s[Cp(r)]=r,s[Cp(o.attribute)]=r}return new To(n,s,e.space)}const Mk=Ui({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:Ge,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:ce,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:Ge,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:dt,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Fk(e,n){return n in e?e[n]:n}function Lk(e,n){return Fk(e,n.toLowerCase())}const a7=Ui({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$i,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:Ge,autoFocus:ze,autoPlay:ze,blocking:Ge,capture:null,charSet:null,checked:ze,cite:null,className:Ge,cols:ce,colSpan:null,content:null,contentEditable:dt,controls:ze,controlsList:Ge,coords:ce|$i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:$p,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:Ge,height:ce,hidden:$p,high:ce,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:ze,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ce,pattern:null,ping:Ge,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:Ge,required:ze,reversed:ze,rows:ce,rowSpan:ce,sandbox:Ge,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:dt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:Lk}),o7=Ui({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:un,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:$i,g2:$i,glyphName:$i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fk}),_k=Ui({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Ok=Ui({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lk}),qk=Ui({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),l7={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"},c7=/[A-Z]/g,px=/-[a-z]/g,u7=/^data[-\w.:]+$/i;function d7(e,n){const s=Cp(n);let r=n,a=en;if(s in e.normal)return e.property[e.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&u7.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(px,p7);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!px.test(o)){let c=o.replace(c7,h7);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}a=vf}return new a(r,n)}function h7(e){return"-"+e.toLowerCase()}function p7(e){return e.charAt(1).toUpperCase()}const f7=zk([Mk,a7,_k,Ok,qk],"html"),jf=zk([Mk,o7,_k,Ok,qk],"svg");function m7(e){return e.join(" ").trim()}var ji={},Sh,fx;function g7(){if(fx)return Sh;fx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,s=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
558
|
+
`,p="/",f="*",m="",y="comment",x="declaration";function v(N,w){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];w=w||{};var S=1,E=1;function P(U){var G=U.match(n);G&&(S+=G.length);var ue=U.lastIndexOf(d);E=~ue?U.length-ue:E+U.length}function B(){var U={line:S,column:E};return function(G){return G.position=new T(U),D(),G}}function T(U){this.start=U,this.end={line:S,column:E},this.source=w.source}T.prototype.content=N;function _(U){var G=new Error(w.source+":"+S+":"+E+": "+U);if(G.reason=U,G.filename=w.source,G.line=S,G.column=E,G.source=N,!w.silent)throw G}function I(U){var G=U.exec(N);if(G){var ue=G[0];return P(ue),N=N.slice(ue.length),G}}function D(){I(s)}function R(U){var G;for(U=U||[];G=F();)G!==!1&&U.push(G);return U}function F(){var U=B();if(!(p!=N.charAt(0)||f!=N.charAt(1))){for(var G=2;m!=N.charAt(G)&&(f!=N.charAt(G)||p!=N.charAt(G+1));)++G;if(G+=2,m===N.charAt(G-1))return _("End of comment missing");var ue=N.slice(2,G-2);return E+=2,P(ue),N=N.slice(G),E+=2,U({type:y,comment:ue})}}function M(){var U=B(),G=I(r);if(G){if(F(),!I(a))return _("property missing ':'");var ue=I(o),V=U({type:x,property:k(G[0].replace(e,m)),value:ue?k(ue[0].replace(e,m)):m});return I(c),V}}function J(){var U=[];R(U);for(var G;G=M();)G!==!1&&(U.push(G),R(U));return U}return D(),J()}function k(N){return N?N.replace(u,m):m}return Sh=v,Sh}var mx;function x7(){if(mx)return ji;mx=1;var e=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=s;const n=e(g7());function s(r,a){let o=null;if(!r||typeof r!="string")return o;const c=(0,n.default)(r),u=typeof a=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:f}=d;u?a(p,f,d):f&&(o=o||{},o[p]=f)}),o}return ji}var Ma={},gx;function y7(){if(gx)return Ma;gx=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,s=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(p){return!p||s.test(p)||e.test(p)},c=function(p,f){return f.toUpperCase()},u=function(p,f){return"".concat(f,"-")},d=function(p,f){return f===void 0&&(f={}),o(p)?p:(p=p.toLowerCase(),f.reactCompat?p=p.replace(a,u):p=p.replace(r,u),p.replace(n,c))};return Ma.camelCase=d,Ma}var Fa,xx;function k7(){if(xx)return Fa;xx=1;var e=Fa&&Fa.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},n=e(x7()),s=y7();function r(a,o){var c={};return!a||typeof a!="string"||(0,n.default)(a,function(u,d){u&&d&&(c[(0,s.camelCase)(u,o)]=d)}),c}return r.default=r,Fa=r,Fa}var v7=k7();const j7=Qp(v7),Dk=Bk("end"),bf=Bk("start");function Bk(e){return n;function n(s){const r=s&&s.position&&s.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 b7(e){const n=bf(e),s=Dk(e);if(n&&s)return{start:n,end:s}}function Ua(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yx(e.position):"start"in e||"end"in e?yx(e):"line"in e||"column"in e?Tp(e):""}function Tp(e){return kx(e&&e.line)+":"+kx(e&&e.column)}function yx(e){return Tp(e&&e.start)+"-"+Tp(e&&e.end)}function kx(e){return e&&typeof e=="number"?e:1}class Mt extends Error{constructor(n,s,r){super(),typeof s=="string"&&(r=s,s=void 0);let a="",o={},c=!1;if(s&&("line"in s&&"column"in s?o={place:s}:"start"in s&&"end"in s?o={place:s}:"type"in s?o={ancestors:[s],place:s.position}:o={...s}),typeof n=="string"?a=n:!o.cause&&n&&(c=!0,a=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Ua(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mt.prototype.file="";Mt.prototype.name="";Mt.prototype.reason="";Mt.prototype.message="";Mt.prototype.stack="";Mt.prototype.column=void 0;Mt.prototype.line=void 0;Mt.prototype.ancestors=void 0;Mt.prototype.cause=void 0;Mt.prototype.fatal=void 0;Mt.prototype.place=void 0;Mt.prototype.ruleId=void 0;Mt.prototype.source=void 0;const wf={}.hasOwnProperty,w7=new Map,N7=/[A-Z]/g,S7=new Set(["table","tbody","thead","tfoot","tr"]),C7=new Set(["td","th"]),Uk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $7(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=M7(s,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=z7(s,n.jsx,n.jsxs)}const a={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?jf:f7,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Wk(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Wk(e,n,s){if(n.type==="element")return E7(e,n,s);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return T7(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return P7(e,n,s);if(n.type==="mdxjsEsm")return A7(e,n);if(n.type==="root")return R7(e,n,s);if(n.type==="text")return I7(e,n)}function E7(e,n,s){const r=e.schema;let a=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=jf,e.schema=a),e.ancestors.push(n);const o=Vk(e,n.tagName,!1),c=F7(e,n);let u=Sf(e,n);return S7.has(n.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!r7(d):!0})),Hk(e,c,o,n),Nf(c,u),e.ancestors.pop(),e.schema=r,e.create(n,o,c,s)}function T7(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ao(e,n.position)}function A7(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ao(e,n.position)}function P7(e,n,s){const r=e.schema;let a=r;n.name==="svg"&&r.space==="html"&&(a=jf,e.schema=a),e.ancestors.push(n);const o=n.name===null?e.Fragment:Vk(e,n.name,!0),c=L7(e,n),u=Sf(e,n);return Hk(e,c,o,n),Nf(c,u),e.ancestors.pop(),e.schema=r,e.create(n,o,c,s)}function R7(e,n,s){const r={};return Nf(r,Sf(e,n)),e.create(n,e.Fragment,r,s)}function I7(e,n){return n.value}function Hk(e,n,s,r){typeof s!="string"&&s!==e.Fragment&&e.passNode&&(n.node=r)}function Nf(e,n){if(n.length>0){const s=n.length>1?n:n[0];s&&(e.children=s)}}function z7(e,n,s){return r;function r(a,o,c,u){const p=Array.isArray(c.children)?s:n;return u?p(o,c,u):p(o,c)}}function M7(e,n){return s;function s(r,a,o,c){const u=Array.isArray(o.children),d=bf(r);return n(a,o,c,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function F7(e,n){const s={};let r,a;for(a in n.properties)if(a!=="children"&&wf.call(n.properties,a)){const o=_7(e,a,n.properties[a]);if(o){const[c,u]=o;e.tableCellAlignToStyle&&c==="align"&&typeof u=="string"&&C7.has(n.tagName)?r=u:s[c]=u}}if(r){const o=s.style||(s.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return s}function L7(e,n){const s={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const c=o.expression;c.type;const u=c.properties[0];u.type,Object.assign(s,e.evaluater.evaluateExpression(u.argument))}else ao(e,n.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else ao(e,n.position);else o=r.value===null?!0:r.value;s[a]=o}return s}function Sf(e,n){const s=[];let r=-1;const a=e.passKeys?new Map:w7;for(;++r<n.children.length;){const o=n.children[r];let c;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const p=a.get(d)||0;c=d+"-"+p,a.set(d,p+1)}}const u=Wk(e,o,c);u!==void 0&&s.push(u)}return s}function _7(e,n,s){const r=d7(e.schema,n);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=r.commaSeparated?J8(s):m7(s)),r.property==="style"){let a=typeof s=="object"?s:O7(e,String(s));return e.stylePropertyNameCase==="css"&&(a=q7(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?l7[r.property]||r.property:r.attribute,s]}}function O7(e,n){try{return j7(n,{reactCompat:!0})}catch(s){if(e.ignoreInvalidStyle)return{};const r=s,a=new Mt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Uk+"#cannot-parse-style-attribute",a}}function Vk(e,n,s){let r;if(!s)r={type:"Literal",value:n};else if(n.includes(".")){const a=n.split(".");let o=-1,c;for(;++o<a.length;){const u=ux(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};c=c?{type:"MemberExpression",object:c,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=c}else r=ux(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const a=r.value;return wf.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);ao(e)}function ao(e,n){const s=new Mt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Uk+"#cannot-handle-mdx-estrees-without-createevaluater",s}function q7(e){const n={};let s;for(s in e)wf.call(e,s)&&(n[D7(s)]=e[s]);return n}function D7(e){let n=e.replace(N7,B7);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function B7(e){return"-"+e.toLowerCase()}const Ch={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"]},U7={};function Cf(e,n){const s=U7,r=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,a=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Kk(e,r,a)}function Kk(e,n,s){if(W7(e)){if("value"in e)return e.type==="html"&&!s?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vx(e.children,n,s)}return Array.isArray(e)?vx(e,n,s):""}function vx(e,n,s){const r=[];let a=-1;for(;++a<e.length;)r[a]=Kk(e[a],n,s);return r.join("")}function W7(e){return!!(e&&typeof e=="object")}const jx=document.createElement("i");function $f(e){const n="&"+e+";";jx.innerHTML=n;const s=jx.textContent;return s.charCodeAt(s.length-1)===59&&e!=="semi"||s===n?!1:s}function fn(e,n,s,r){const a=e.length;let o=0,c;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,s=s>0?s:0,r.length<1e4)c=Array.from(r),c.unshift(n,s),e.splice(...c);else for(s&&e.splice(n,s);o<r.length;)c=r.slice(o,o+1e4),c.unshift(n,0),e.splice(...c),o+=1e4,n+=1e4}function Cn(e,n){return e.length>0?(fn(e,e.length,0,n),e):n}const bx={}.hasOwnProperty;function Yk(e){const n={};let s=-1;for(;++s<e.length;)H7(n,e[s]);return n}function H7(e,n){let s;for(s in n){const a=(bx.call(e,s)?e[s]:void 0)||(e[s]={}),o=n[s];let c;if(o)for(c in o){bx.call(a,c)||(a[c]=[]);const u=o[c];V7(a[c],Array.isArray(u)?u:u?[u]:[])}}}function V7(e,n){let s=-1;const r=[];for(;++s<n.length;)(n[s].add==="after"?e:r).push(n[s]);fn(e,0,0,r)}function Qk(e,n){const s=Number.parseInt(e,n);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function Bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _t=cr(/[A-Za-z]/),Pt=cr(/[\dA-Za-z]/),K7=cr(/[#-'*+\--9=?A-Z^-~]/);function Tc(e){return e!==null&&(e<32||e===127)}const Ap=cr(/\d/),Y7=cr(/[\dA-Fa-f]/),Q7=cr(/[!-/:-@[-`{-~]/);function Se(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const tu=cr(/\p{P}|\p{S}/u),_r=cr(/\s/);function cr(e){return n;function n(s){return s!==null&&s>-1&&e.test(String.fromCharCode(s))}}function Wi(e){const n=[];let s=-1,r=0,a=0;for(;++s<e.length;){const o=e.charCodeAt(s);let c="";if(o===37&&Pt(e.charCodeAt(s+1))&&Pt(e.charCodeAt(s+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(s+1);o<56320&&u>56319&&u<57344?(c=String.fromCharCode(o,u),a=1):c="�"}else c=String.fromCharCode(o);c&&(n.push(e.slice(r,s),encodeURIComponent(c)),r=s+a+1,c=""),a&&(s+=a,a=0)}return n.join("")+e.slice(r)}function Oe(e,n,s,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(d){return Le(d)?(e.enter(s),u(d)):n(d)}function u(d){return Le(d)&&o++<a?(e.consume(d),u):(e.exit(s),n(d))}}const G7={tokenize:Z7};function Z7(e){const n=e.attempt(this.parser.constructs.contentInitial,r,a);let s;return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Oe(e,n,"linePrefix")}function a(u){return e.enter("paragraph"),o(u)}function o(u){const d=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=d),s=d,c(u)}function c(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Se(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),c)}}const X7={tokenize:J7},wx={tokenize:eN};function J7(e){const n=this,s=[];let r=0,a,o,c;return u;function u(E){if(r<s.length){const P=s[r];return n.containerState=P[1],e.attempt(P[0].continuation,d,p)(E)}return p(E)}function d(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&S();const P=n.events.length;let B=P,T;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){T=n.events[B][1].end;break}w(r);let _=P;for(;_<n.events.length;)n.events[_][1].end={...T},_++;return fn(n.events,B+1,0,n.events.slice(P)),n.events.length=_,p(E)}return u(E)}function p(E){if(r===s.length){if(!a)return y(E);if(a.currentConstruct&&a.currentConstruct.concrete)return v(E);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(wx,f,m)(E)}function f(E){return a&&S(),w(r),y(E)}function m(E){return n.parser.lazy[n.now().line]=r!==s.length,c=n.now().offset,v(E)}function y(E){return n.containerState={},e.attempt(wx,x,v)(E)}function x(E){return r++,s.push([n.currentConstruct,n.containerState]),y(E)}function v(E){if(E===null){a&&S(),w(0),e.consume(E);return}return a=a||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),k(E)}function k(E){if(E===null){N(e.exit("chunkFlow"),!0),w(0),e.consume(E);return}return Se(E)?(e.consume(E),N(e.exit("chunkFlow")),r=0,n.interrupt=void 0,u):(e.consume(E),k)}function N(E,P){const B=n.sliceStream(E);if(P&&B.push(null),E.previous=o,o&&(o.next=E),o=E,a.defineSkip(E.start),a.write(B),n.parser.lazy[E.start.line]){let T=a.events.length;for(;T--;)if(a.events[T][1].start.offset<c&&(!a.events[T][1].end||a.events[T][1].end.offset>c))return;const _=n.events.length;let I=_,D,R;for(;I--;)if(n.events[I][0]==="exit"&&n.events[I][1].type==="chunkFlow"){if(D){R=n.events[I][1].end;break}D=!0}for(w(r),T=_;T<n.events.length;)n.events[T][1].end={...R},T++;fn(n.events,I+1,0,n.events.slice(_)),n.events.length=T}}function w(E){let P=s.length;for(;P-- >E;){const B=s[P];n.containerState=B[1],B[0].exit.call(n,e)}s.length=E}function S(){a.write([null]),o=void 0,a=void 0,n.containerState._closeFlow=void 0}}function eN(e,n,s){return Oe(e,e.attempt(this.parser.constructs.document,n,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ri(e){if(e===null||Ke(e)||_r(e))return 1;if(tu(e))return 2}function nu(e,n,s){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(n=o(n,s),r.push(o))}return n}const Pp={name:"attention",resolveAll:tN,tokenize:nN};function tN(e,n){let s=-1,r,a,o,c,u,d,p,f;for(;++s<e.length;)if(e[s][0]==="enter"&&e[s][1].type==="attentionSequence"&&e[s][1]._close){for(r=s;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[s][1]).charCodeAt(0)){if((e[r][1]._close||e[s][1]._open)&&(e[s][1].end.offset-e[s][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[s][1].end.offset-e[s][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[s][1].end.offset-e[s][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[s][1].start};Nx(m,-d),Nx(y,d),c={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[s][1].start},end:y},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[s][1].start}},a={type:d>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[r][1].end={...c.start},e[s][1].start={...u.end},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Cn(p,[["enter",e[r][1],n],["exit",e[r][1],n]])),p=Cn(p,[["enter",a,n],["enter",c,n],["exit",c,n],["enter",o,n]]),p=Cn(p,nu(n.parser.constructs.insideSpan.null,e.slice(r+1,s),n)),p=Cn(p,[["exit",o,n],["enter",u,n],["exit",u,n],["exit",a,n]]),e[s][1].end.offset-e[s][1].start.offset?(f=2,p=Cn(p,[["enter",e[s][1],n],["exit",e[s][1],n]])):f=0,fn(e,r-1,s-r+3,p),s=r+p.length-f-2;break}}for(s=-1;++s<e.length;)e[s][1].type==="attentionSequence"&&(e[s][1].type="data");return e}function nN(e,n){const s=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Ri(r);let o;return c;function c(d){return o=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===o)return e.consume(d),u;const p=e.exit("attentionSequence"),f=Ri(d),m=!f||f===2&&a||s.includes(d),y=!a||a===2&&f||s.includes(r);return p._open=!!(o===42?m:m&&(a||!y)),p._close=!!(o===42?y:y&&(f||!m)),n(d)}}function Nx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const sN={name:"autolink",tokenize:rN};function rN(e,n,s){let r=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return _t(x)?(e.consume(x),c):x===64?s(x):p(x)}function c(x){return x===43||x===45||x===46||Pt(x)?(r=1,u(x)):p(x)}function u(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||Pt(x))&&r++<32?(e.consume(x),u):(r=0,p(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):x===null||x===32||x===60||Tc(x)?s(x):(e.consume(x),d)}function p(x){return x===64?(e.consume(x),f):K7(x)?(e.consume(x),p):s(x)}function f(x){return Pt(x)?m(x):s(x)}function m(x){return x===46?(e.consume(x),r=0,f):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):y(x)}function y(x){if((x===45||Pt(x))&&r++<63){const v=x===45?y:m;return e.consume(x),v}return s(x)}}const Ao={partial:!0,tokenize:iN};function iN(e,n,s){return r;function r(o){return Le(o)?Oe(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Se(o)?n(o):s(o)}}const Gk={continuation:{tokenize:oN},exit:lN,name:"blockQuote",tokenize:aN};function aN(e,n,s){const r=this;return a;function a(c){if(c===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return s(c)}function o(c){return Le(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function oN(e,n,s){const r=this;return a;function a(c){return Le(c)?Oe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(Gk,n,s)(c)}}function lN(e){e.exit("blockQuote")}const Zk={name:"characterEscape",tokenize:cN};function cN(e,n,s){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return Q7(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):s(o)}}const Xk={name:"characterReference",tokenize:uN};function uN(e,n,s){const r=this;let a=0,o,c;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,c=Pt,f(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=Y7,f):(e.enter("characterReferenceValue"),o=7,c=Ap,f(m))}function f(m){if(m===59&&a){const y=e.exit("characterReferenceValue");return c===Pt&&!$f(r.sliceSerialize(y))?s(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(m)&&a++<o?(e.consume(m),f):s(m)}}const Sx={partial:!0,tokenize:hN},Cx={concrete:!0,name:"codeFenced",tokenize:dN};function dN(e,n,s){const r=this,a={partial:!0,tokenize:B};let o=0,c=0,u;return d;function d(T){return p(T)}function p(T){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,u=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(T)}function f(T){return T===u?(c++,e.consume(T),f):c<3?s(T):(e.exit("codeFencedFenceSequence"),Le(T)?Oe(e,m,"whitespace")(T):m(T))}function m(T){return T===null||Se(T)?(e.exit("codeFencedFence"),r.interrupt?n(T):e.check(Sx,k,P)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===null||Se(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(T)):Le(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Oe(e,x,"whitespace")(T)):T===96&&T===u?s(T):(e.consume(T),y)}function x(T){return T===null||Se(T)?m(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||Se(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(T)):T===96&&T===u?s(T):(e.consume(T),v)}function k(T){return e.attempt(a,P,N)(T)}function N(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),w}function w(T){return o>0&&Le(T)?Oe(e,S,"linePrefix",o+1)(T):S(T)}function S(T){return T===null||Se(T)?e.check(Sx,k,P)(T):(e.enter("codeFlowValue"),E(T))}function E(T){return T===null||Se(T)?(e.exit("codeFlowValue"),S(T)):(e.consume(T),E)}function P(T){return e.exit("codeFenced"),n(T)}function B(T,_,I){let D=0;return R;function R(G){return T.enter("lineEnding"),T.consume(G),T.exit("lineEnding"),F}function F(G){return T.enter("codeFencedFence"),Le(G)?Oe(T,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):M(G)}function M(G){return G===u?(T.enter("codeFencedFenceSequence"),J(G)):I(G)}function J(G){return G===u?(D++,T.consume(G),J):D>=c?(T.exit("codeFencedFenceSequence"),Le(G)?Oe(T,U,"whitespace")(G):U(G)):I(G)}function U(G){return G===null||Se(G)?(T.exit("codeFencedFence"),_(G)):I(G)}}}function hN(e,n,s){const r=this;return a;function a(c){return c===null?s(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return r.parser.lazy[r.now().line]?s(c):n(c)}}const $h={name:"codeIndented",tokenize:fN},pN={partial:!0,tokenize:mN};function fN(e,n,s){const r=this;return a;function a(p){return e.enter("codeIndented"),Oe(e,o,"linePrefix",5)(p)}function o(p){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?c(p):s(p)}function c(p){return p===null?d(p):Se(p)?e.attempt(pN,c,d)(p):(e.enter("codeFlowValue"),u(p))}function u(p){return p===null||Se(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),u)}function d(p){return e.exit("codeIndented"),n(p)}}function mN(e,n,s){const r=this;return a;function a(c){return r.parser.lazy[r.now().line]?s(c):Se(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):Oe(e,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(c):Se(c)?a(c):s(c)}}const gN={name:"codeText",previous:yN,resolve:xN,tokenize:kN};function xN(e){let n=e.length-4,s=3,r,a;if((e[s][1].type==="lineEnding"||e[s][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=s;++r<n;)if(e[r][1].type==="codeTextData"){e[s][1].type="codeTextPadding",e[n][1].type="codeTextPadding",s+=2,n-=2;break}}for(r=s-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(a=r):(r===n||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function yN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kN(e,n,s){let r=0,a,o;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?s(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,f(m)):Se(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||Se(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),p)}function f(m){return m===96?(e.consume(m),a++,f):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(m)):(o.type="codeTextData",p(m))}}class vN{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,s){const r=s??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,s,r){const a=s||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&La(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),La(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),La(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const s=this.left.splice(n,Number.POSITIVE_INFINITY);La(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);La(this.left,s.reverse())}}}function La(e,n){let s=0;if(n.length<1e4)e.push(...n);else for(;s<n.length;)e.push(...n.slice(s,s+1e4)),s+=1e4}function Jk(e){const n={};let s=-1,r,a,o,c,u,d,p;const f=new vN(e);for(;++s<f.length;){for(;s in n;)s=n[s];if(r=f.get(s),s&&r[1].type==="chunkFlow"&&f.get(s-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,jN(f,s)),s=n[s],p=!0);else if(r[1]._container){for(o=s,a=void 0;o--;)if(c=f.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(a&&(f.get(a)[1].type="lineEndingBlank"),c[1].type="lineEnding",a=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;a&&(r[1].end={...f.get(a)[1].start},u=f.slice(a,s),u.unshift(r),f.splice(a,s-a+1,u))}}return fn(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!p}function jN(e,n){const s=e.get(n)[1],r=e.get(n)[2];let a=n-1;const o=[];let c=s._tokenizer;c||(c=r.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const u=c.events,d=[],p={};let f,m,y=-1,x=s,v=0,k=0;const N=[k];for(;x;){for(;e.get(++a)[1]!==x;);o.push(a),x._tokenizer||(f=r.sliceStream(x),x.next||f.push(null),m&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(f),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=x,x=x.next}for(x=s;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(k=y+1,N.push(k),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):N.pop(),y=N.length;y--;){const w=u.slice(N[y],N[y+1]),S=o.pop();d.push([S,S+w.length-1]),e.splice(S,2,w)}for(d.reverse(),y=-1;++y<d.length;)p[v+d[y][0]]=v+d[y][1],v+=d[y][1]-d[y][0]-1;return p}const bN={resolve:NN,tokenize:SN},wN={partial:!0,tokenize:CN};function NN(e){return Jk(e),e}function SN(e,n){let s;return r;function r(u){return e.enter("content"),s=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?o(u):Se(u)?e.check(wN,c,o)(u):(e.consume(u),a)}function o(u){return e.exit("chunkContent"),e.exit("content"),n(u)}function c(u){return e.consume(u),e.exit("chunkContent"),s.next=e.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,a}}function CN(e,n,s){const r=this;return a;function a(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Oe(e,o,"linePrefix")}function o(c){if(c===null||Se(c))return s(c);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(c):e.interrupt(r.parser.constructs.flow,s,n)(c)}}function ev(e,n,s,r,a,o,c,u,d){const p=d||Number.POSITIVE_INFINITY;let f=0;return m;function m(w){return w===60?(e.enter(r),e.enter(a),e.enter(o),e.consume(w),e.exit(o),y):w===null||w===32||w===41||Tc(w)?s(w):(e.enter(r),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(w))}function y(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(a),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===62?(e.exit("chunkString"),e.exit(u),y(w)):w===null||w===60||Se(w)?s(w):(e.consume(w),w===92?v:x)}function v(w){return w===60||w===62||w===92?(e.consume(w),x):x(w)}function k(w){return!f&&(w===null||w===41||Ke(w))?(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(r),n(w)):f<p&&w===40?(e.consume(w),f++,k):w===41?(e.consume(w),f--,k):w===null||w===32||w===40||Tc(w)?s(w):(e.consume(w),w===92?N:k)}function N(w){return w===40||w===41||w===92?(e.consume(w),k):k(w)}}function tv(e,n,s,r,a,o){const c=this;let u=0,d;return p;function p(x){return e.enter(r),e.enter(a),e.consume(x),e.exit(a),e.enter(o),f}function f(x){return u>999||x===null||x===91||x===93&&!d||x===94&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs?s(x):x===93?(e.exit(o),e.enter(a),e.consume(x),e.exit(a),e.exit(r),n):Se(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||x===91||x===93||Se(x)||u++>999?(e.exit("chunkString"),f(x)):(e.consume(x),d||(d=!Le(x)),x===92?y:m)}function y(x){return x===91||x===92||x===93?(e.consume(x),u++,m):m(x)}}function nv(e,n,s,r,a,o){let c;return u;function u(y){return y===34||y===39||y===40?(e.enter(r),e.enter(a),e.consume(y),e.exit(a),c=y===40?41:y,d):s(y)}function d(y){return y===c?(e.enter(a),e.consume(y),e.exit(a),e.exit(r),n):(e.enter(o),p(y))}function p(y){return y===c?(e.exit(o),d(c)):y===null?s(y):Se(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Oe(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===c||y===null||Se(y)?(e.exit("chunkString"),p(y)):(e.consume(y),y===92?m:f)}function m(y){return y===c||y===92?(e.consume(y),f):f(y)}}function Wa(e,n){let s;return r;function r(a){return Se(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s=!0,r):Le(a)?Oe(e,r,s?"linePrefix":"lineSuffix")(a):n(a)}}const $N={name:"definition",tokenize:TN},EN={partial:!0,tokenize:AN};function TN(e,n,s){const r=this;let a;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return tv.call(r,e,u,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function u(x){return a=Bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):s(x)}function d(x){return Ke(x)?Wa(e,p)(x):p(x)}function p(x){return ev(e,f,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function f(x){return e.attempt(EN,m,m)(x)}function m(x){return Le(x)?Oe(e,y,"whitespace")(x):y(x)}function y(x){return x===null||Se(x)?(e.exit("definition"),r.parser.defined.push(a),n(x)):s(x)}}function AN(e,n,s){return r;function r(u){return Ke(u)?Wa(e,a)(u):s(u)}function a(u){return nv(e,o,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return Le(u)?Oe(e,c,"whitespace")(u):c(u)}function c(u){return u===null||Se(u)?n(u):s(u)}}const PN={name:"hardBreakEscape",tokenize:RN};function RN(e,n,s){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Se(o)?(e.exit("hardBreakEscape"),n(o)):s(o)}}const IN={name:"headingAtx",resolve:zN,tokenize:MN};function zN(e,n){let s=e.length-2,r=3,a,o;return e[r][1].type==="whitespace"&&(r+=2),s-2>r&&e[s][1].type==="whitespace"&&(s-=2),e[s][1].type==="atxHeadingSequence"&&(r===s-1||s-4>r&&e[s-2][1].type==="whitespace")&&(s-=r+1===s?2:4),s>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[s][1].end},o={type:"chunkText",start:e[r][1].start,end:e[s][1].end,contentType:"text"},fn(e,r,s-r+1,[["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n]])),e}function MN(e,n,s){let r=0;return a;function a(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),c(f)}function c(f){return f===35&&r++<6?(e.consume(f),c):f===null||Ke(f)?(e.exit("atxHeadingSequence"),u(f)):s(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),d(f)):f===null||Se(f)?(e.exit("atxHeading"),n(f)):Le(f)?Oe(e,u,"whitespace")(f):(e.enter("atxHeadingText"),p(f))}function d(f){return f===35?(e.consume(f),d):(e.exit("atxHeadingSequence"),u(f))}function p(f){return f===null||f===35||Ke(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),p)}}const FN=["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"],$x=["pre","script","style","textarea"],LN={concrete:!0,name:"htmlFlow",resolveTo:qN,tokenize:DN},_N={partial:!0,tokenize:UN},ON={partial:!0,tokenize:BN};function qN(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function DN(e,n,s){const r=this;let a,o,c,u,d;return p;function p(z){return f(z)}function f(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),y):z===47?(e.consume(z),o=!0,k):z===63?(e.consume(z),a=3,r.interrupt?n:A):_t(z)?(e.consume(z),c=String.fromCharCode(z),N):s(z)}function y(z){return z===45?(e.consume(z),a=2,x):z===91?(e.consume(z),a=5,u=0,v):_t(z)?(e.consume(z),a=4,r.interrupt?n:A):s(z)}function x(z){return z===45?(e.consume(z),r.interrupt?n:A):s(z)}function v(z){const me="CDATA[";return z===me.charCodeAt(u++)?(e.consume(z),u===me.length?r.interrupt?n:M:v):s(z)}function k(z){return _t(z)?(e.consume(z),c=String.fromCharCode(z),N):s(z)}function N(z){if(z===null||z===47||z===62||Ke(z)){const me=z===47,he=c.toLowerCase();return!me&&!o&&$x.includes(he)?(a=1,r.interrupt?n(z):M(z)):FN.includes(c.toLowerCase())?(a=6,me?(e.consume(z),w):r.interrupt?n(z):M(z)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?s(z):o?S(z):E(z))}return z===45||Pt(z)?(e.consume(z),c+=String.fromCharCode(z),N):s(z)}function w(z){return z===62?(e.consume(z),r.interrupt?n:M):s(z)}function S(z){return Le(z)?(e.consume(z),S):R(z)}function E(z){return z===47?(e.consume(z),R):z===58||z===95||_t(z)?(e.consume(z),P):Le(z)?(e.consume(z),E):R(z)}function P(z){return z===45||z===46||z===58||z===95||Pt(z)?(e.consume(z),P):B(z)}function B(z){return z===61?(e.consume(z),T):Le(z)?(e.consume(z),B):E(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?s(z):z===34||z===39?(e.consume(z),d=z,_):Le(z)?(e.consume(z),T):I(z)}function _(z){return z===d?(e.consume(z),d=null,D):z===null||Se(z)?s(z):(e.consume(z),_)}function I(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Ke(z)?B(z):(e.consume(z),I)}function D(z){return z===47||z===62||Le(z)?E(z):s(z)}function R(z){return z===62?(e.consume(z),F):s(z)}function F(z){return z===null||Se(z)?M(z):Le(z)?(e.consume(z),F):s(z)}function M(z){return z===45&&a===2?(e.consume(z),ue):z===60&&a===1?(e.consume(z),V):z===62&&a===4?(e.consume(z),O):z===63&&a===3?(e.consume(z),A):z===93&&a===5?(e.consume(z),ne):Se(z)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(_N,ee,J)(z)):z===null||Se(z)?(e.exit("htmlFlowData"),J(z)):(e.consume(z),M)}function J(z){return e.check(ON,U,ee)(z)}function U(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),G}function G(z){return z===null||Se(z)?J(z):(e.enter("htmlFlowData"),M(z))}function ue(z){return z===45?(e.consume(z),A):M(z)}function V(z){return z===47?(e.consume(z),c="",H):M(z)}function H(z){if(z===62){const me=c.toLowerCase();return $x.includes(me)?(e.consume(z),O):M(z)}return _t(z)&&c.length<8?(e.consume(z),c+=String.fromCharCode(z),H):M(z)}function ne(z){return z===93?(e.consume(z),A):M(z)}function A(z){return z===62?(e.consume(z),O):z===45&&a===2?(e.consume(z),A):M(z)}function O(z){return z===null||Se(z)?(e.exit("htmlFlowData"),ee(z)):(e.consume(z),O)}function ee(z){return e.exit("htmlFlow"),n(z)}}function BN(e,n,s){const r=this;return a;function a(c){return Se(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):s(c)}function o(c){return r.parser.lazy[r.now().line]?s(c):n(c)}}function UN(e,n,s){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Ao,n,s)}}const WN={name:"htmlText",tokenize:HN};function HN(e,n,s){const r=this;let a,o,c;return u;function u(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),B):A===63?(e.consume(A),E):_t(A)?(e.consume(A),I):s(A)}function p(A){return A===45?(e.consume(A),f):A===91?(e.consume(A),o=0,v):_t(A)?(e.consume(A),S):s(A)}function f(A){return A===45?(e.consume(A),x):s(A)}function m(A){return A===null?s(A):A===45?(e.consume(A),y):Se(A)?(c=m,V(A)):(e.consume(A),m)}function y(A){return A===45?(e.consume(A),x):m(A)}function x(A){return A===62?ue(A):A===45?y(A):m(A)}function v(A){const O="CDATA[";return A===O.charCodeAt(o++)?(e.consume(A),o===O.length?k:v):s(A)}function k(A){return A===null?s(A):A===93?(e.consume(A),N):Se(A)?(c=k,V(A)):(e.consume(A),k)}function N(A){return A===93?(e.consume(A),w):k(A)}function w(A){return A===62?ue(A):A===93?(e.consume(A),w):k(A)}function S(A){return A===null||A===62?ue(A):Se(A)?(c=S,V(A)):(e.consume(A),S)}function E(A){return A===null?s(A):A===63?(e.consume(A),P):Se(A)?(c=E,V(A)):(e.consume(A),E)}function P(A){return A===62?ue(A):E(A)}function B(A){return _t(A)?(e.consume(A),T):s(A)}function T(A){return A===45||Pt(A)?(e.consume(A),T):_(A)}function _(A){return Se(A)?(c=_,V(A)):Le(A)?(e.consume(A),_):ue(A)}function I(A){return A===45||Pt(A)?(e.consume(A),I):A===47||A===62||Ke(A)?D(A):s(A)}function D(A){return A===47?(e.consume(A),ue):A===58||A===95||_t(A)?(e.consume(A),R):Se(A)?(c=D,V(A)):Le(A)?(e.consume(A),D):ue(A)}function R(A){return A===45||A===46||A===58||A===95||Pt(A)?(e.consume(A),R):F(A)}function F(A){return A===61?(e.consume(A),M):Se(A)?(c=F,V(A)):Le(A)?(e.consume(A),F):D(A)}function M(A){return A===null||A===60||A===61||A===62||A===96?s(A):A===34||A===39?(e.consume(A),a=A,J):Se(A)?(c=M,V(A)):Le(A)?(e.consume(A),M):(e.consume(A),U)}function J(A){return A===a?(e.consume(A),a=void 0,G):A===null?s(A):Se(A)?(c=J,V(A)):(e.consume(A),J)}function U(A){return A===null||A===34||A===39||A===60||A===61||A===96?s(A):A===47||A===62||Ke(A)?D(A):(e.consume(A),U)}function G(A){return A===47||A===62||Ke(A)?D(A):s(A)}function ue(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),n):s(A)}function V(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),H}function H(A){return Le(A)?Oe(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):ne(A)}function ne(A){return e.enter("htmlTextData"),c(A)}}const Ef={name:"labelEnd",resolveAll:QN,resolveTo:GN,tokenize:ZN},VN={tokenize:XN},KN={tokenize:JN},YN={tokenize:e9};function QN(e){let n=-1;const s=[];for(;++n<e.length;){const r=e[n][1];if(s.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",n+=a}}return e.length!==s.length&&fn(e,0,e.length,s),e}function GN(e,n){let s=e.length,r=0,a,o,c,u;for(;s--;)if(a=e[s][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[s][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(c){if(e[s][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=s,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(c=s);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[c-2][1].start}};return u=[["enter",d,n],["enter",p,n]],u=Cn(u,e.slice(o+1,o+r+3)),u=Cn(u,[["enter",f,n]]),u=Cn(u,nu(n.parser.constructs.insideSpan.null,e.slice(o+r+4,c-3),n)),u=Cn(u,[["exit",f,n],e[c-2],e[c-1],["exit",p,n]]),u=Cn(u,e.slice(c+1)),u=Cn(u,[["exit",d,n]]),fn(e,o,e.length,u),e}function ZN(e,n,s){const r=this;let a=r.events.length,o,c;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){o=r.events[a][1];break}return u;function u(y){return o?o._inactive?m(y):(c=r.parser.defined.includes(Bn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):s(y)}function d(y){return y===40?e.attempt(VN,f,c?f:m)(y):y===91?e.attempt(KN,f,c?p:m)(y):c?f(y):m(y)}function p(y){return e.attempt(YN,f,m)(y)}function f(y){return n(y)}function m(y){return o._balanced=!0,s(y)}}function XN(e,n,s){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Ke(m)?Wa(e,o)(m):o(m)}function o(m){return m===41?f(m):ev(e,c,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return Ke(m)?Wa(e,d)(m):f(m)}function u(m){return s(m)}function d(m){return m===34||m===39||m===40?nv(e,p,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):f(m)}function p(m){return Ke(m)?Wa(e,f)(m):f(m)}function f(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),n):s(m)}}function JN(e,n,s){const r=this;return a;function a(u){return tv.call(r,e,o,c,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(Bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(u):s(u)}function c(u){return s(u)}}function e9(e,n,s){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):s(o)}}const t9={name:"labelStartImage",resolveAll:Ef.resolveAll,tokenize:n9};function n9(e,n,s){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),c):s(u)}function c(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?s(u):n(u)}}const s9={name:"labelStartLink",resolveAll:Ef.resolveAll,tokenize:r9};function r9(e,n,s){const r=this;return a;function a(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?s(c):n(c)}}const Eh={name:"lineEnding",tokenize:i9};function i9(e,n){return s;function s(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Oe(e,n,"linePrefix")}}const dc={name:"thematicBreak",tokenize:a9};function a9(e,n,s){let r=0,a;return o;function o(p){return e.enter("thematicBreak"),c(p)}function c(p){return a=p,u(p)}function u(p){return p===a?(e.enter("thematicBreakSequence"),d(p)):r>=3&&(p===null||Se(p))?(e.exit("thematicBreak"),n(p)):s(p)}function d(p){return p===a?(e.consume(p),r++,d):(e.exit("thematicBreakSequence"),Le(p)?Oe(e,u,"whitespace")(p):u(p))}}const Yt={continuation:{tokenize:u9},exit:h9,name:"list",tokenize:c9},o9={partial:!0,tokenize:p9},l9={partial:!0,tokenize:d9};function c9(e,n,s){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,c=0;return u;function u(x){const v=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Ap(x)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(dc,s,p)(x):p(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return s(x)}function d(x){return Ap(x)&&++c<10?(e.consume(x),d):(!r.interrupt||c<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):s(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Ao,r.interrupt?s:f,e.attempt(o9,y,m))}function f(x){return r.containerState.initialBlankLine=!0,o++,y(x)}function m(x){return Le(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):s(x)}function y(x){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(x)}}function u9(e,n,s){const r=this;return r.containerState._closeFlow=void 0,e.check(Ao,a,o);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Oe(e,n,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!Le(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(l9,n,c)(u))}function c(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Oe(e,e.attempt(Yt,n,s),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function d9(e,n,s){const r=this;return Oe(e,a,"listItemIndent",r.containerState.size+1);function a(o){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?n(o):s(o)}}function h9(e){e.exit(this.containerState.type)}function p9(e,n,s){const r=this;return Oe(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const c=r.events[r.events.length-1];return!Le(o)&&c&&c[1].type==="listItemPrefixWhitespace"?n(o):s(o)}}const Ex={name:"setextUnderline",resolveTo:f9,tokenize:m9};function f9(e,n){let s=e.length,r,a,o;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){r=s;break}e[s][1].type==="paragraph"&&(a=s)}else e[s][1].type==="content"&&e.splice(s,1),!o&&e[s][1].type==="definition"&&(o=s);const c={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",c,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=c,e.push(["exit",c,n]),e}function m9(e,n,s){const r=this;let a;return o;function o(p){let f=r.events.length,m;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){m=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=p,c(p)):s(p)}function c(p){return e.enter("setextHeadingLineSequence"),u(p)}function u(p){return p===a?(e.consume(p),u):(e.exit("setextHeadingLineSequence"),Le(p)?Oe(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||Se(p)?(e.exit("setextHeadingLine"),n(p)):s(p)}}const g9={tokenize:x9};function x9(e){const n=this,s=e.attempt(Ao,r,e.attempt(this.parser.constructs.flowInitial,a,Oe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(bN,a)),"linePrefix")));return s;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,s}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,s}}const y9={resolveAll:rv()},k9=sv("string"),v9=sv("text");function sv(e){return{resolveAll:rv(e==="text"?j9:void 0),tokenize:n};function n(s){const r=this,a=this.parser.constructs[e],o=s.attempt(a,c,u);return c;function c(f){return p(f)?o(f):u(f)}function u(f){if(f===null){s.consume(f);return}return s.enter("data"),s.consume(f),d}function d(f){return p(f)?(s.exit("data"),o(f)):(s.consume(f),d)}function p(f){if(f===null)return!0;const m=a[f];let y=-1;if(m)for(;++y<m.length;){const x=m[y];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function rv(e){return n;function n(s,r){let a=-1,o;for(;++a<=s.length;)o===void 0?s[a]&&s[a][1].type==="data"&&(o=a,a++):(!s[a]||s[a][1].type!=="data")&&(a!==o+2&&(s[o][1].end=s[a-1][1].end,s.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(s,r):s}}function j9(e,n){let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const r=e[s-1][1],a=n.sliceStream(r);let o=a.length,c=-1,u=0,d;for(;o--;){const p=a[o];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)u++,c--;if(c)break;c=-1}else if(p===-2)d=!0,u++;else if(p!==-1){o++;break}}if(n._contentTypeTextTrailing&&s===e.length&&(u=0),u){const p={type:s===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:r.start._bufferIndex+c,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(s,0,["enter",p,n],["exit",p,n]),s+=2)}s++}return e}const b9={42:Yt,43:Yt,45:Yt,48:Yt,49:Yt,50:Yt,51:Yt,52:Yt,53:Yt,54:Yt,55:Yt,56:Yt,57:Yt,62:Gk},w9={91:$N},N9={[-2]:$h,[-1]:$h,32:$h},S9={35:IN,42:dc,45:[Ex,dc],60:LN,61:Ex,95:dc,96:Cx,126:Cx},C9={38:Xk,92:Zk},$9={[-5]:Eh,[-4]:Eh,[-3]:Eh,33:t9,38:Xk,42:Pp,60:[sN,WN],91:s9,92:[PN,Zk],93:Ef,95:Pp,96:gN},E9={null:[Pp,y9]},T9={null:[42,95]},A9={null:[]},P9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:T9,contentInitial:w9,disable:A9,document:b9,flow:S9,flowInitial:N9,insideSpan:E9,string:C9,text:$9},Symbol.toStringTag,{value:"Module"}));function R9(e,n,s){let r={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const a={},o=[];let c=[],u=[];const d={attempt:_(B),check:_(T),consume:S,enter:E,exit:P,interrupt:_(T,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:v,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:m};let f=n.tokenize.call(p,d);return n.resolveAll&&o.push(n),p;function m(F){return c=Cn(c,F),N(),c[c.length-1]!==null?[]:(I(n,0),p.events=nu(o,p.events,p),p.events)}function y(F,M){return z9(x(F),M)}function x(F){return I9(c,F)}function v(){const{_bufferIndex:F,_index:M,line:J,column:U,offset:G}=r;return{_bufferIndex:F,_index:M,line:J,column:U,offset:G}}function k(F){a[F.line]=F.column,R()}function N(){let F;for(;r._index<c.length;){const M=c[r._index];if(typeof M=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<M.length;)w(M.charCodeAt(r._bufferIndex));else w(M)}}function w(F){f=f(F)}function S(F){Se(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,R()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=F}function E(F,M){const J=M||{};return J.type=F,J.start=v(),p.events.push(["enter",J,p]),u.push(J),J}function P(F){const M=u.pop();return M.end=v(),p.events.push(["exit",M,p]),M}function B(F,M){I(F,M.from)}function T(F,M){M.restore()}function _(F,M){return J;function J(U,G,ue){let V,H,ne,A;return Array.isArray(U)?ee(U):"tokenize"in U?ee([U]):O(U);function O(ke){return Te;function Te(Ae){const Ce=Ae!==null&&ke[Ae],qe=Ae!==null&&ke.null,ct=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(qe)?qe:qe?[qe]:[]];return ee(ct)(Ae)}}function ee(ke){return V=ke,H=0,ke.length===0?ue:z(ke[H])}function z(ke){return Te;function Te(Ae){return A=D(),ne=ke,ke.partial||(p.currentConstruct=ke),ke.name&&p.parser.constructs.disable.null.includes(ke.name)?he():ke.tokenize.call(M?Object.assign(Object.create(p),M):p,d,me,he)(Ae)}}function me(ke){return F(ne,A),G}function he(ke){return A.restore(),++H<V.length?z(V[H]):ue}}}function I(F,M){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&fn(p.events,M,p.events.length-M,F.resolve(p.events.slice(M),p)),F.resolveTo&&(p.events=F.resolveTo(p.events,p))}function D(){const F=v(),M=p.previous,J=p.currentConstruct,U=p.events.length,G=Array.from(u);return{from:U,restore:ue};function ue(){r=F,p.previous=M,p.currentConstruct=J,p.events.length=U,u=G,R()}}function R(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function I9(e,n){const s=n.start._index,r=n.start._bufferIndex,a=n.end._index,o=n.end._bufferIndex;let c;if(s===a)c=[e[s].slice(r,o)];else{if(c=e.slice(s,a),r>-1){const u=c[0];typeof u=="string"?c[0]=u.slice(r):c.shift()}o>0&&c.push(e[a].slice(0,o))}return c}function z9(e,n){let s=-1;const r=[];let a;for(;++s<e.length;){const o=e[s];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
559
|
+
`;break}case-3:{c=`\r
|
|
560
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&a)continue;c=" ";break}default:c=String.fromCharCode(o)}a=o===-2,r.push(c)}return r.join("")}function M9(e){const r={constructs:Yk([P9,...(e||{}).extensions||[]]),content:a(G7),defined:[],document:a(X7),flow:a(g9),lazy:{},string:a(k9),text:a(v9)};return r;function a(o){return c;function c(u){return R9(r,o,u)}}}function F9(e){for(;!Jk(e););return e}const Tx=/[\0\t\n\r]/g;function L9(){let e=1,n="",s=!0,r;return a;function a(o,c,u){const d=[];let p,f,m,y,x;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),m=0,n="",s&&(o.charCodeAt(0)===65279&&m++,s=void 0);m<o.length;){if(Tx.lastIndex=m,p=Tx.exec(o),y=p&&p.index!==void 0?p.index:o.length,x=o.charCodeAt(y),!p){n=o.slice(m);break}if(x===10&&m===y&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<y&&(d.push(o.slice(m,y)),e+=y-m),x){case 0:{d.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,d.push(-2);e++<f;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=y+1}return u&&(r&&d.push(-5),n&&d.push(n),d.push(null)),d}}const _9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O9(e){return e.replace(_9,q9)}function q9(e,n,s){if(n)return n;if(s.charCodeAt(0)===35){const a=s.charCodeAt(1),o=a===120||a===88;return Qk(s.slice(o?2:1),o?16:10)}return $f(s)||e}const iv={}.hasOwnProperty;function D9(e,n,s){return n&&typeof n=="object"&&(s=n,n=void 0),B9(s)(F9(M9(s).document().write(L9()(e,n,!0))))}function B9(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Dt),autolinkProtocol:D,autolinkEmail:D,atxHeading:o(qt),blockQuote:o(qe),characterEscape:D,characterReference:D,codeFenced:o(ct),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(ct,c),codeText:o(Ot,c),codeTextData:D,data:D,codeFlowValue:D,definition:o(tn),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Wn),hardBreakEscape:o(Pn),hardBreakTrailing:o(Pn),htmlFlow:o(xn,c),htmlFlowData:D,htmlText:o(xn,c),htmlTextData:D,image:o(nn),label:c,link:o(Dt),listItem:o(yn),listItemValue:y,listOrdered:o(mt,m),listUnordered:o(mt),paragraph:o(Rn),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(qt),strong:o(Rs),thematicBreak:o(Ue)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:Ce,autolinkProtocol:Ae,blockQuote:d(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ke,characterReference:Te,codeFenced:d(N),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:d(w),codeText:d(G),codeTextData:R,data:R,definition:d(),definitionDestinationString:P,definitionLabelString:S,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(M),hardBreakTrailing:d(M),htmlFlow:d(J),htmlFlowData:R,htmlText:d(U),htmlTextData:R,image:d(V),label:ne,labelText:H,lineEnding:F,link:d(ue),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:me,resourceDestinationString:A,resourceTitleString:O,resource:ee,setextHeading:d(I),setextHeadingLineSequence:_,setextHeadingText:T,strong:d(),thematicBreak:d()}};av(n,(e||{}).mdastExtensions||[]);const s={};return r;function r(X){let le={type:"root",children:[]};const Q={stack:[le],tokenStack:[],config:n,enter:u,exit:p,buffer:c,resume:f,data:s},je=[];let Ie=-1;for(;++Ie<X.length;)if(X[Ie][1].type==="listOrdered"||X[Ie][1].type==="listUnordered")if(X[Ie][0]==="enter")je.push(Ie);else{const Ve=je.pop();Ie=a(X,Ve,Ie)}for(Ie=-1;++Ie<X.length;){const Ve=n[X[Ie][0]];iv.call(Ve,X[Ie][1].type)&&Ve[X[Ie][1].type].call(Object.assign({sliceSerialize:X[Ie][2].sliceSerialize},Q),X[Ie][1])}if(Q.tokenStack.length>0){const Ve=Q.tokenStack[Q.tokenStack.length-1];(Ve[1]||Ax).call(Q,void 0,Ve[0])}for(le.position={start:Js(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Js(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<n.transforms.length;)le=n.transforms[Ie](le)||le;return le}function a(X,le,Q){let je=le-1,Ie=-1,Ve=!1,ht,kn,Is,ur;for(;++je<=Q;){const vt=X[je];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?Ie++:Ie--,ur=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(ht&&!ur&&!Ie&&!Is&&(Is=je),ur=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ur=void 0}if(!Ie&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||Ie===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(ht){let Hn=je;for(kn=void 0;Hn--;){const sn=X[Hn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;kn&&(X[kn][1].type="lineEndingBlank",Ve=!0),sn[1].type="lineEnding",kn=Hn}else if(!(sn[1].type==="linePrefix"||sn[1].type==="blockQuotePrefix"||sn[1].type==="blockQuotePrefixWhitespace"||sn[1].type==="blockQuoteMarker"||sn[1].type==="listItemIndent"))break}Is&&(!kn||Is<kn)&&(ht._spread=!0),ht.end=Object.assign({},kn?X[kn][1].start:vt[1].end),X.splice(kn||je,0,["exit",ht,vt[2]]),je++,Q++}if(vt[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};ht=Hn,X.splice(je,0,["enter",Hn,vt[2]]),je++,Q++,Is=void 0,ur=!0}}}return X[le][1]._spread=Ve,Q}function o(X,le){return Q;function Q(je){u.call(this,X(je),je),le&&le.call(this,je)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(X,le,Q){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([le,Q||void 0]),X.position={start:Js(le.start),end:void 0}}function d(X){return le;function le(Q){X&&X.call(this,Q),p.call(this,Q)}}function p(X,le){const Q=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==X.type&&(le?le.call(this,X,je[0]):(je[1]||Ax).call(this,X,je[0]));else throw new Error("Cannot close `"+X.type+"` ("+Ua({start:X.start,end:X.end})+"): it’s not open");Q.position.end=Js(X.end)}function f(){return Cf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(X){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function x(){const X=this.resume(),le=this.stack[this.stack.length-1];le.lang=X}function v(){const X=this.resume(),le=this.stack[this.stack.length-1];le.meta=X}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X.replace(/(\r?\n|\r)$/g,"")}function S(X){const le=this.resume(),Q=this.stack[this.stack.length-1];Q.label=le,Q.identifier=Bn(this.sliceSerialize(X)).toLowerCase()}function E(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function P(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function B(X){const le=this.stack[this.stack.length-1];if(!le.depth){const Q=this.sliceSerialize(X).length;le.depth=Q}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function _(X){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function D(X){const Q=this.stack[this.stack.length-1].children;let je=Q[Q.length-1];(!je||je.type!=="text")&&(je=us(),je.position={start:Js(X.start),end:void 0},Q.push(je)),this.stack.push(je)}function R(X){const le=this.stack.pop();le.value+=this.sliceSerialize(X),le.position.end=Js(X.end)}function F(X){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=le.children[le.children.length-1];Q.position.end=Js(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(le.type)&&(D.call(this,X),R.call(this,X))}function M(){this.data.atHardBreak=!0}function J(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function U(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function G(){const X=this.resume(),le=this.stack[this.stack.length-1];le.value=X}function ue(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function V(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=le,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function H(X){const le=this.sliceSerialize(X),Q=this.stack[this.stack.length-2];Q.label=O9(le),Q.identifier=Bn(le).toLowerCase()}function ne(){const X=this.stack[this.stack.length-1],le=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const je=X.children;Q.children=je}else Q.alt=le}function A(){const X=this.resume(),le=this.stack[this.stack.length-1];le.url=X}function O(){const X=this.resume(),le=this.stack[this.stack.length-1];le.title=X}function ee(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function me(X){const le=this.resume(),Q=this.stack[this.stack.length-1];Q.label=le,Q.identifier=Bn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function he(X){this.data.characterReferenceType=X.type}function ke(X){const le=this.sliceSerialize(X),Q=this.data.characterReferenceType;let je;Q?(je=Qk(le,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=$f(le);const Ie=this.stack[this.stack.length-1];Ie.value+=je}function Te(X){const le=this.stack.pop();le.position.end=Js(X.end)}function Ae(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(X)}function Ce(X){R.call(this,X);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(X)}function qe(){return{type:"blockquote",children:[]}}function ct(){return{type:"code",lang:null,meta:null,value:""}}function Ot(){return{type:"inlineCode",value:""}}function tn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Wn(){return{type:"emphasis",children:[]}}function qt(){return{type:"heading",depth:0,children:[]}}function Pn(){return{type:"break"}}function xn(){return{type:"html",value:""}}function nn(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function mt(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function yn(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Rn(){return{type:"paragraph",children:[]}}function Rs(){return{type:"strong",children:[]}}function us(){return{type:"text",value:""}}function Ue(){return{type:"thematicBreak"}}}function Js(e){return{line:e.line,column:e.column,offset:e.offset}}function av(e,n){let s=-1;for(;++s<n.length;){const r=n[s];Array.isArray(r)?av(e,r):U9(e,r)}}function U9(e,n){let s;for(s in n)if(iv.call(n,s))switch(s){case"canContainEols":{const r=n[s];r&&e[s].push(...r);break}case"transforms":{const r=n[s];r&&e[s].push(...r);break}case"enter":case"exit":{const r=n[s];r&&Object.assign(e[s],r);break}}}function Ax(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ua({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ua({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ua({start:n.start,end:n.end})+") is still open")}function W9(e){const n=this;n.parser=s;function s(r){return D9(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function H9(e,n){const s={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,s),e.applyData(n,s)}function V9(e,n){const s={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,s),[e.applyData(n,s),{type:"text",value:`
|
|
561
|
+
`}]}function K9(e,n){const s=n.value?n.value+`
|
|
562
|
+
`:"",r={},a=n.lang?n.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:s}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Y9(e,n){const s={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function Q9(e,n){const s={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function G9(e,n){const s=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),a=Wi(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let c,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),c=e.footnoteOrder.length):c=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+a,id:s+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,p),e.applyData(n,p)}function Z9(e,n){const s={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function X9(e,n){if(e.options.allowDangerousHtml){const s={type:"raw",value:n.value};return e.patch(n,s),e.applyData(n,s)}}function ov(e,n){const s=n.referenceType;let r="]";if(s==="collapsed"?r+="[]":s==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const a=e.all(n),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const c=a[a.length-1];return c&&c.type==="text"?c.value+=r:a.push({type:"text",value:r}),a}function J9(e,n){const s=String(n.identifier).toUpperCase(),r=e.definitionById.get(s);if(!r)return ov(e,n);const a={src:Wi(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,o),e.applyData(n,o)}function eS(e,n){const s={src:Wi(n.url)};n.alt!==null&&n.alt!==void 0&&(s.alt=n.alt),n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,r),e.applyData(n,r)}function tS(e,n){const s={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,s);const r={type:"element",tagName:"code",properties:{},children:[s]};return e.patch(n,r),e.applyData(n,r)}function nS(e,n){const s=String(n.identifier).toUpperCase(),r=e.definitionById.get(s);if(!r)return ov(e,n);const a={href:Wi(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function sS(e,n){const s={href:Wi(n.url)};n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function rS(e,n,s){const r=e.all(n),a=s?iS(s):lv(n),o={},c=[];if(typeof n.checked=="boolean"){const f=r[0];let m;f&&f.type==="element"&&f.tagName==="p"?m=f:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(a||u!==0||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
|
|
563
|
+
`}),f.type==="element"&&f.tagName==="p"&&!a?c.push(...f.children):c.push(f)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
|
|
564
|
+
`});const p={type:"element",tagName:"li",properties:o,children:c};return e.patch(n,p),e.applyData(n,p)}function iS(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const s=e.children;let r=-1;for(;!n&&++r<s.length;)n=lv(s[r])}return n}function lv(e){const n=e.spread;return n??e.children.length>1}function aS(e,n){const s={},r=e.all(n);let a=-1;for(typeof n.start=="number"&&n.start!==1&&(s.start=n.start);++a<r.length;){const c=r[a];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:s,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function oS(e,n){const s={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function lS(e,n){const s={type:"root",children:e.wrap(e.all(n))};return e.patch(n,s),e.applyData(n,s)}function cS(e,n){const s={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function uS(e,n){const s=e.all(n),r=s.shift(),a=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],c),a.push(c)}if(s.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(s,!0)},u=bf(n.children[1]),d=Dk(n.children[n.children.length-1]);u&&d&&(c.position={start:u,end:d}),a.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(n,o),e.applyData(n,o)}function dS(e,n,s){const r=s?s.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",c=s&&s.type==="table"?s.align:void 0,u=c?c.length:n.children.length;let d=-1;const p=[];for(;++d<u;){const m=n.children[d],y={},x=c?c[d]:void 0;x&&(y.align=x);let v={type:"element",tagName:o,properties:y,children:[]};m&&(v.children=e.all(m),e.patch(m,v),v=e.applyData(m,v)),p.push(v)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(n,f),e.applyData(n,f)}function hS(e,n){const s={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}const Px=9,Rx=32;function pS(e){const n=String(e),s=/\r?\n|\r/g;let r=s.exec(n),a=0;const o=[];for(;r;)o.push(Ix(n.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=s.exec(n);return o.push(Ix(n.slice(a),a>0,!1)),o.join("")}function Ix(e,n,s){let r=0,a=e.length;if(n){let o=e.codePointAt(r);for(;o===Px||o===Rx;)r++,o=e.codePointAt(r)}if(s){let o=e.codePointAt(a-1);for(;o===Px||o===Rx;)a--,o=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function fS(e,n){const s={type:"text",value:pS(String(n.value))};return e.patch(n,s),e.applyData(n,s)}function mS(e,n){const s={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,s),e.applyData(n,s)}const gS={blockquote:H9,break:V9,code:K9,delete:Y9,emphasis:Q9,footnoteReference:G9,heading:Z9,html:X9,imageReference:J9,image:eS,inlineCode:tS,linkReference:nS,link:sS,listItem:rS,list:aS,paragraph:oS,root:lS,strong:cS,table:uS,tableCell:hS,tableRow:dS,text:fS,thematicBreak:mS,toml:Ql,yaml:Ql,definition:Ql,footnoteDefinition:Ql};function Ql(){}const cv=-1,su=0,Ha=1,Ac=2,Tf=3,Af=4,Pf=5,Rf=6,uv=7,dv=8,zx=typeof self=="object"?self:globalThis,xS=(e,n)=>{const s=(a,o)=>(e.set(o,a),a),r=a=>{if(e.has(a))return e.get(a);const[o,c]=n[a];switch(o){case su:case cv:return s(c,a);case Ha:{const u=s([],a);for(const d of c)u.push(r(d));return u}case Ac:{const u=s({},a);for(const[d,p]of c)u[r(d)]=r(p);return u}case Tf:return s(new Date(c),a);case Af:{const{source:u,flags:d}=c;return s(new RegExp(u,d),a)}case Pf:{const u=s(new Map,a);for(const[d,p]of c)u.set(r(d),r(p));return u}case Rf:{const u=s(new Set,a);for(const d of c)u.add(r(d));return u}case uv:{const{name:u,message:d}=c;return s(new zx[u](d),a)}case dv:return s(BigInt(c),a);case"BigInt":return s(Object(BigInt(c)),a);case"ArrayBuffer":return s(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:u}=new Uint8Array(c);return s(new DataView(u),c)}}return s(new zx[o](c),a)};return r},Mx=e=>xS(new Map,e)(0),bi="",{toString:yS}={},{keys:kS}=Object,_a=e=>{const n=typeof e;if(n!=="object"||!e)return[su,n];const s=yS.call(e).slice(8,-1);switch(s){case"Array":return[Ha,bi];case"Object":return[Ac,bi];case"Date":return[Tf,bi];case"RegExp":return[Af,bi];case"Map":return[Pf,bi];case"Set":return[Rf,bi];case"DataView":return[Ha,s]}return s.includes("Array")?[Ha,s]:s.includes("Error")?[uv,s]:[Ac,s]},Gl=([e,n])=>e===su&&(n==="function"||n==="symbol"),vS=(e,n,s,r)=>{const a=(c,u)=>{const d=r.push(c)-1;return s.set(u,d),d},o=c=>{if(s.has(c))return s.get(c);let[u,d]=_a(c);switch(u){case su:{let f=c;switch(d){case"bigint":u=dv,f=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);f=null;break;case"undefined":return a([cv],c)}return a([u,f],c)}case Ha:{if(d){let y=c;return d==="DataView"?y=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(c)),a([d,[...y]],c)}const f=[],m=a([u,f],c);for(const y of c)f.push(o(y));return m}case Ac:{if(d)switch(d){case"BigInt":return a([d,c.toString()],c);case"Boolean":case"Number":case"String":return a([d,c.valueOf()],c)}if(n&&"toJSON"in c)return o(c.toJSON());const f=[],m=a([u,f],c);for(const y of kS(c))(e||!Gl(_a(c[y])))&&f.push([o(y),o(c[y])]);return m}case Tf:return a([u,c.toISOString()],c);case Af:{const{source:f,flags:m}=c;return a([u,{source:f,flags:m}],c)}case Pf:{const f=[],m=a([u,f],c);for(const[y,x]of c)(e||!(Gl(_a(y))||Gl(_a(x))))&&f.push([o(y),o(x)]);return m}case Rf:{const f=[],m=a([u,f],c);for(const y of c)(e||!Gl(_a(y)))&&f.push(o(y));return m}}const{message:p}=c;return a([u,{name:d,message:p}],c)};return o},Fx=(e,{json:n,lossy:s}={})=>{const r=[];return vS(!(n||s),!!n,new Map,r)(e),r},Pc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Mx(Fx(e,n)):structuredClone(e):(e,n)=>Mx(Fx(e,n));function jS(e,n){const s=[{type:"text",value:"↩"}];return n>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),s}function bS(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function wS(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=e.options.footnoteBackContent||jS,r=e.options.footnoteBackLabel||bS,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const f=e.all(p),m=String(p.identifier).toUpperCase(),y=Wi(m.toLowerCase());let x=0;const v=[],k=e.footnoteCounts.get(m);for(;k!==void 0&&++x<=k;){v.length>0&&v.push({type:"text",value:" "});let S=typeof s=="string"?s:s(d,x);typeof S=="string"&&(S={type:"text",value:S}),v.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,x),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const N=f[f.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const S=N.children[N.children.length-1];S&&S.type==="text"?S.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...v)}else f.push(...v);const w={type:"element",tagName:"li",properties:{id:n+"fn-"+y},children:e.wrap(f,!0)};e.patch(p,w),u.push(w)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Pc(c),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
565
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
566
|
+
`}]}}const Po=(function(e){if(e==null)return $S;if(typeof e=="function")return ru(e);if(typeof e=="object")return Array.isArray(e)?NS(e):SS(e);if(typeof e=="string")return CS(e);throw new Error("Expected function, string, or object as test")});function NS(e){const n=[];let s=-1;for(;++s<e.length;)n[s]=Po(e[s]);return ru(r);function r(...a){let o=-1;for(;++o<n.length;)if(n[o].apply(this,a))return!0;return!1}}function SS(e){const n=e;return ru(s);function s(r){const a=r;let o;for(o in e)if(a[o]!==n[o])return!1;return!0}}function CS(e){return ru(n);function n(s){return s&&s.type===e}}function ru(e){return n;function n(s,r,a){return!!(ES(s)&&e.call(this,s,typeof r=="number"?r:void 0,a||void 0))}}function $S(){return!0}function ES(e){return e!==null&&typeof e=="object"&&"type"in e}const hv=[],TS=!0,Rp=!1,AS="skip";function PS(e,n,s,r){let a;typeof n=="function"&&typeof s!="function"?(r=s,s=n):a=n;const o=Po(a),c=r?-1:1;u(e,void 0,[])();function u(d,p,f){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const x=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=hv,v,k,N;if((!n||o(d,p,f[f.length-1]||void 0))&&(x=RS(s(d,f)),x[0]===Rp))return x;if("children"in d&&d.children){const w=d;if(w.children&&x[0]!==AS)for(k=(r?w.children.length:-1)+c,N=f.concat(w);k>-1&&k<w.children.length;){const S=w.children[k];if(v=u(S,k,N)(),v[0]===Rp)return v;k=typeof v[1]=="number"?v[1]:k+c}}return x}}}function RS(e){return Array.isArray(e)?e:typeof e=="number"?[TS,e]:e==null?hv:[e]}function If(e,n,s,r){let a,o,c;typeof n=="function"&&typeof s!="function"?(o=void 0,c=n,a=s):(o=n,c=s,a=r),PS(e,o,u,a);function u(d,p){const f=p[p.length-1],m=f?f.children.indexOf(d):void 0;return c(d,m,f)}}const Ip={}.hasOwnProperty,IS={};function zS(e,n){const s=n||IS,r=new Map,a=new Map,o=new Map,c={...gS,...s.handlers},u={all:p,applyData:FS,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:s,patch:MS,wrap:_S};return If(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const m=f.type==="definition"?r:a,y=String(f.identifier).toUpperCase();m.has(y)||m.set(y,f)}}),u;function d(f,m){const y=f.type,x=u.handlers[y];if(Ip.call(u.handlers,y)&&x)return x(u,f,m);if(u.options.passThrough&&u.options.passThrough.includes(y)){if("children"in f){const{children:k,...N}=f,w=Pc(N);return w.children=u.all(f),w}return Pc(f)}return(u.options.unknownHandler||LS)(u,f,m)}function p(f){const m=[];if("children"in f){const y=f.children;let x=-1;for(;++x<y.length;){const v=u.one(y[x],f);if(v){if(x&&y[x-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=Lx(v.value)),!Array.isArray(v)&&v.type==="element")){const k=v.children[0];k&&k.type==="text"&&(k.value=Lx(k.value))}Array.isArray(v)?m.push(...v):m.push(v)}}}return m}}function MS(e,n){e.position&&(n.position=b7(e))}function FS(e,n){let s=n;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(s.type==="element")s.tagName=r;else{const c="children"in s?s.children:[s];s={type:"element",tagName:r,properties:{},children:c}}s.type==="element"&&o&&Object.assign(s.properties,Pc(o)),"children"in s&&s.children&&a!==null&&a!==void 0&&(s.children=a)}return s}function LS(e,n){const s=n.data||{},r="value"in n&&!(Ip.call(s,"hProperties")||Ip.call(s,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function _S(e,n){const s=[];let r=-1;for(n&&s.push({type:"text",value:`
|
|
567
|
+
`});++r<e.length;)r&&s.push({type:"text",value:`
|
|
568
|
+
`}),s.push(e[r]);return n&&e.length>0&&s.push({type:"text",value:`
|
|
569
|
+
`}),s}function Lx(e){let n=0,s=e.charCodeAt(n);for(;s===9||s===32;)n++,s=e.charCodeAt(n);return e.slice(n)}function _x(e,n){const s=zS(e,n),r=s.one(e,void 0),a=wS(s),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
570
|
+
`},a),o}function OS(e,n){return e&&"run"in e?async function(s,r){const a=_x(s,{file:r,...n});await e.run(a,r)}:function(s,r){return _x(s,{file:r,...e||n})}}function Ox(e){if(e)throw e}var Th,qx;function qS(){if(qx)return Th;qx=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):n.call(p)==="[object Array]"},o=function(p){if(!p||n.call(p)!=="[object Object]")return!1;var f=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!f&&!m)return!1;var y;for(y in p);return typeof y>"u"||e.call(p,y)},c=function(p,f){s&&f.name==="__proto__"?s(p,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):p[f.name]=f.newValue},u=function(p,f){if(f==="__proto__")if(e.call(p,f)){if(r)return r(p,f).value}else return;return p[f]};return Th=function d(){var p,f,m,y,x,v,k=arguments[0],N=1,w=arguments.length,S=!1;for(typeof k=="boolean"&&(S=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<w;++N)if(p=arguments[N],p!=null)for(f in p)m=u(k,f),y=u(p,f),k!==y&&(S&&y&&(o(y)||(x=a(y)))?(x?(x=!1,v=m&&a(m)?m:[]):v=m&&o(m)?m:{},c(k,{name:f,newValue:d(S,v,y)})):typeof y<"u"&&c(k,{name:f,newValue:y}));return k},Th}var DS=qS();const Ah=Qp(DS);function zp(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function BS(){const e=[],n={run:s,use:r};return n;function s(...a){let o=-1;const c=a.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);u(null,...a);function u(d,...p){const f=e[++o];let m=-1;if(d){c(d);return}for(;++m<a.length;)(p[m]===null||p[m]===void 0)&&(p[m]=a[m]);a=p,f?US(f,u)(...p):c(null,...p)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),n}}function US(e,n){let s;return r;function r(...c){const u=e.length>c.length;let d;u&&c.push(a);try{d=e.apply(this,c)}catch(p){const f=p;if(u&&s)throw f;return a(f)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(c,...u){s||(s=!0,n(c,...u))}function o(c){a(null,c)}}const Zn={basename:WS,dirname:HS,extname:VS,join:KS,sep:"/"};function WS(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ro(e);let s=0,r=-1,a=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){s=a+1;break}}else r<0&&(o=!0,r=a+1);return r<0?"":e.slice(s,r)}if(n===e)return"";let c=-1,u=n.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){s=a+1;break}}else c<0&&(o=!0,c=a+1),u>-1&&(e.codePointAt(a)===n.codePointAt(u--)?u<0&&(r=a):(u=-1,r=c));return s===r?r=c:r<0&&(r=e.length),e.slice(s,r)}function HS(e){if(Ro(e),e.length===0)return".";let n=-1,s=e.length,r;for(;--s;)if(e.codePointAt(s)===47){if(r){n=s;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function VS(e){Ro(e);let n=e.length,s=-1,r=0,a=-1,o=0,c;for(;n--;){const u=e.codePointAt(n);if(u===47){if(c){r=n+1;break}continue}s<0&&(c=!0,s=n+1),u===46?a<0?a=n:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||s<0||o===0||o===1&&a===s-1&&a===r+1?"":e.slice(a,s)}function KS(...e){let n=-1,s;for(;++n<e.length;)Ro(e[n]),e[n]&&(s=s===void 0?e[n]:s+"/"+e[n]);return s===void 0?".":YS(s)}function YS(e){Ro(e);const n=e.codePointAt(0)===47;let s=QS(e,!n);return s.length===0&&!n&&(s="."),s.length>0&&e.codePointAt(e.length-1)===47&&(s+="/"),n?"/"+s:s}function QS(e,n){let s="",r=0,a=-1,o=0,c=-1,u,d;for(;++c<=e.length;){if(c<e.length)u=e.codePointAt(c);else{if(u===47)break;u=47}if(u===47){if(!(a===c-1||o===1))if(a!==c-1&&o===2){if(s.length<2||r!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(d=s.lastIndexOf("/"),d!==s.length-1){d<0?(s="",r=0):(s=s.slice(0,d),r=s.length-1-s.lastIndexOf("/")),a=c,o=0;continue}}else if(s.length>0){s="",r=0,a=c,o=0;continue}}n&&(s=s.length>0?s+"/..":"..",r=2)}else s.length>0?s+="/"+e.slice(a+1,c):s=e.slice(a+1,c),r=c-a-1;a=c,o=0}else u===46&&o>-1?o++:o=-1}return s}function Ro(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GS={cwd:ZS};function ZS(){return"/"}function Mp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function XS(e){if(typeof e=="string")e=new URL(e);else if(!Mp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return JS(e)}function JS(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 n=e.pathname;let s=-1;for(;++s<n.length;)if(n.codePointAt(s)===37&&n.codePointAt(s+1)===50){const r=n.codePointAt(s+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(n)}const Ph=["history","path","basename","stem","extname","dirname"];class pv{constructor(n){let s;n?Mp(n)?s={path:n}:typeof n=="string"||eC(n)?s={value:n}:s=n:s={},this.cwd="cwd"in s?"":GS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ph.length;){const o=Ph[r];o in s&&s[o]!==void 0&&s[o]!==null&&(this[o]=o==="history"?[...s[o]]:s[o])}let a;for(a in s)Ph.includes(a)||(this[a]=s[a])}get basename(){return typeof this.path=="string"?Zn.basename(this.path):void 0}set basename(n){Ih(n,"basename"),Rh(n,"basename"),this.path=Zn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Zn.dirname(this.path):void 0}set dirname(n){Dx(this.basename,"dirname"),this.path=Zn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Zn.extname(this.path):void 0}set extname(n){if(Rh(n,"extname"),Dx(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Zn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Mp(n)&&(n=XS(n)),Ih(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Zn.basename(this.path,this.extname):void 0}set stem(n){Ih(n,"stem"),Rh(n,"stem"),this.path=Zn.join(this.dirname||"",n+(this.extname||""))}fail(n,s,r){const a=this.message(n,s,r);throw a.fatal=!0,a}info(n,s,r){const a=this.message(n,s,r);return a.fatal=void 0,a}message(n,s,r){const a=new Mt(n,s,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Rh(e,n){if(e&&e.includes(Zn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Zn.sep+"`")}function Ih(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Dx(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function eC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tC=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),nC={}.hasOwnProperty;class zf extends tC{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=BS()}copy(){const n=new zf;let s=-1;for(;++s<this.attachers.length;){const r=this.attachers[s];n.use(...r)}return n.data(Ah(!0,{},this.namespace)),n}data(n,s){return typeof n=="string"?arguments.length===2?(Fh("data",this.frozen),this.namespace[n]=s,this):nC.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Fh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=s.call(n,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const s=Zl(n),r=this.parser||this.Parser;return zh("parse",r),r(String(s),s)}process(n,s){const r=this;return this.freeze(),zh("process",this.parser||this.Parser),Mh("process",this.compiler||this.Compiler),s?a(void 0,s):new Promise(a);function a(o,c){const u=Zl(n),d=r.parse(u);r.run(d,u,function(f,m,y){if(f||!m||!y)return p(f);const x=m,v=r.stringify(x,y);iC(v)?y.value=v:y.result=v,p(f,y)});function p(f,m){f||!m?c(f):o?o(m):s(void 0,m)}}}processSync(n){let s=!1,r;return this.freeze(),zh("processSync",this.parser||this.Parser),Mh("processSync",this.compiler||this.Compiler),this.process(n,a),Ux("processSync","process",s),r;function a(o,c){s=!0,Ox(o),r=c}}run(n,s,r){Bx(n),this.freeze();const a=this.transformers;return!r&&typeof s=="function"&&(r=s,s=void 0),r?o(void 0,r):new Promise(o);function o(c,u){const d=Zl(s);a.run(n,d,p);function p(f,m,y){const x=m||n;f?u(f):c?c(x):r(void 0,x,y)}}}runSync(n,s){let r=!1,a;return this.run(n,s,o),Ux("runSync","run",r),a;function o(c,u){Ox(c),a=u,r=!0}}stringify(n,s){this.freeze();const r=Zl(s),a=this.compiler||this.Compiler;return Mh("stringify",a),Bx(n),a(n,r)}use(n,...s){const r=this.attachers,a=this.namespace;if(Fh("use",this.frozen),n!=null)if(typeof n=="function")d(n,s);else if(typeof n=="object")Array.isArray(n)?u(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[f,...m]=p;d(f,m)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");u(p.plugins),p.settings&&(a.settings=Ah(!0,a.settings,p.settings))}function u(p){let f=-1;if(p!=null)if(Array.isArray(p))for(;++f<p.length;){const m=p[f];o(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,f){let m=-1,y=-1;for(;++m<r.length;)if(r[m][0]===p){y=m;break}if(y===-1)r.push([p,...f]);else if(f.length>0){let[x,...v]=f;const k=r[y][1];zp(k)&&zp(x)&&(x=Ah(!0,k,x)),r[y]=[p,x,...v]}}}}const sC=new zf().freeze();function zh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Bx(e){if(!zp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ux(e,n,s){if(!s)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Zl(e){return rC(e)?e:new pv(e)}function rC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iC(e){return typeof e=="string"||aC(e)}function aC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Wx=[],Hx={allowDangerousHtml:!0},lC=/^(https?|ircs?|mailto|xmpp)$/i,cC=[{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:"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 Mf(e){const n=uC(e),s=dC(e);return hC(n.runSync(n.parse(s),s),e)}function uC(e){const n=e.rehypePlugins||Wx,s=e.remarkPlugins||Wx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hx}:Hx;return sC().use(W9).use(s).use(OS,r).use(n)}function dC(e){const n=e.children||"",s=new pv;return typeof n=="string"&&(s.value=n),s}function hC(e,n){const s=n.allowedElements,r=n.allowElement,a=n.components,o=n.disallowedElements,c=n.skipHtml,u=n.unwrapDisallowed,d=n.urlTransform||pC;for(const f of cC)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+oC+f.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),If(e,p),$7(e,{Fragment:t.Fragment,components:a,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0});function p(f,m,y){if(f.type==="raw"&&y&&typeof m=="number")return c?y.children.splice(m,1):y.children[m]={type:"text",value:f.value},m;if(f.type==="element"){let x;for(x in Ch)if(Object.hasOwn(Ch,x)&&Object.hasOwn(f.properties,x)){const v=f.properties[x],k=Ch[x];(k===null||k.includes(f.tagName))&&(f.properties[x]=d(String(v||""),x,f))}}if(f.type==="element"){let x=s?!s.includes(f.tagName):o?o.includes(f.tagName):!1;if(!x&&r&&typeof m=="number"&&(x=!r(f,m,y)),x&&y&&typeof m=="number")return u&&f.children?y.children.splice(m,1,...f.children):y.children.splice(m,1),m}}}function pC(e){const n=e.indexOf(":"),s=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return n===-1||a!==-1&&n>a||s!==-1&&n>s||r!==-1&&n>r||lC.test(e.slice(0,n))?e:""}function Vx(e,n){const s=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,a=s.indexOf(n);for(;a!==-1;)r++,a=s.indexOf(n,a+n.length);return r}function fC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const fv=[],mC=!0,Lh=!1,Fp="skip";function gC(e,n,s,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let a,o,c,u;if(o=n,typeof o=="function")c=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")c=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")u=o.exit;else throw new Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");Po(a);const d=1;p(e,void 0,[])();function p(f,m,y){const x=f&&typeof f=="object"?f:{};if(typeof x.type=="string"){const k=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(k?"<"+k+">":""))+")"})}return v;function v(){const k=!a;let N=fv;if(c&&k&&(N=Kx(c(f,y,m)),N[0]===Lh))return N;if("children"in f&&f.children){const w=f;if(w.children&&N[0]!==Fp){let S=-1+d;const E=[...y,w];for(;S>-1&&S<w.children.length;){const P=w.children[S],B=p(P,S,E)();if(B[0]===Lh)return B;S=typeof B[1]=="number"?B[1]:S+d}}}if(u&&k){const w=Kx(u(f,y,m));if(w[0]===Fp)throw new Error("Unexpected value `"+w[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(w[0]===Lh||typeof w[1]=="number")return w}return N}}}function Kx(e){return Array.isArray(e)?e:typeof e=="number"?[mC,e]:e==null?fv:[e]}function xC(e,n,s){const a=Po((s||{}).ignore||[]),o=yC(n);let c=-1;for(;++c<o.length;)gC(e,u);function u(p,f,m){if(p.type==="text"&&typeof m=="number")return d(p,f,m);if(a(p,m,f[f.length-1]))return Fp}function d(p,f,m){const y=f[f.length-1],x=o[c][0],v=o[c][1];let k=0,N=!1,w=[];x.lastIndex=0;let S=x.exec(p.value);for(;S;){const P=S.index,B={index:S.index,input:S.input,stack:[...f,p]};let T=v(...S,B);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1)x.lastIndex=P+1;else{if(k!==P&&E({type:"text",value:p.value.slice(k,P)}),Array.isArray(T))for(const _ of T)E(_);else T&&E(T);k=P+S[0].length,N=!0}if(!x.global)break;S=x.exec(p.value)}return N?(k<p.value.length&&E({type:"text",value:p.value.slice(k)}),y.children.splice(m,1,...w)):w=[p],m+w.length;function E(P){const B=w[w.length-1];B&&B.type==="text"&&P.type==="text"?B.value+=P.value:w.push(P)}}}function yC(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=[],s=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<s.length;){const a=s[r];n.push([kC(a[0]),vC(a[1])])}return n}function kC(e){return typeof e=="string"?new RegExp(fC(e),"g"):e}function vC(e){return typeof e=="function"?e:function(){return e}}const _h="phrasing",Oh=["autolink","link","image","label"];function jC(){return{transforms:[EC],enter:{literalAutolink:wC,literalAutolinkEmail:qh,literalAutolinkHttp:qh,literalAutolinkWww:qh},exit:{literalAutolink:$C,literalAutolinkEmail:CC,literalAutolinkHttp:NC,literalAutolinkWww:SC}}}function bC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_h,notInConstruct:Oh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_h,notInConstruct:Oh},{character:":",before:"[ps]",after:"\\/",inConstruct:_h,notInConstruct:Oh}]}}function wC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qh(e){this.config.enter.autolinkProtocol.call(this,e)}function NC(e){this.config.exit.autolinkProtocol.call(this,e)}function SC(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function CC(e){this.config.exit.autolinkEmail.call(this,e)}function $C(e){this.exit(e)}function EC(e){xC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TC],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,AC]],{ignore:["link","linkReference"]})}function TC(e,n,s,r,a){let o="";if(!mv(a)||(/^w/i.test(n)&&(s=n+s,n="",o="http://"),!PC(s)))return!1;const c=RC(s+r);if(!c[0])return!1;const u={type:"link",title:null,url:o+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function AC(e,n,s,r){return!mv(r,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+s,children:[{type:"text",value:n+"@"+s}]}}function PC(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function RC(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let s=n[0],r=s.indexOf(")");const a=Vx(e,"(");let o=Vx(e,")");for(;r!==-1&&a>o;)e+=s.slice(0,r+1),s=s.slice(r+1),r=s.indexOf(")"),o++;return[e,s]}function mv(e,n){const s=e.input.charCodeAt(e.index-1);return(e.index===0||_r(s)||tu(s))&&(!n||s!==47)}gv.peek=DC;function IC(){this.buffer()}function zC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MC(){this.buffer()}function FC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function LC(e){const n=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Bn(this.sliceSerialize(e)).toLowerCase(),s.label=n}function _C(e){this.exit(e)}function OC(e){const n=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Bn(this.sliceSerialize(e)).toLowerCase(),s.label=n}function qC(e){this.exit(e)}function DC(){return"["}function gv(e,n,s,r){const a=s.createTracker(r);let o=a.move("[^");const c=s.enter("footnoteReference"),u=s.enter("reference");return o+=a.move(s.safe(s.associationId(e),{after:"]",before:o})),u(),c(),o+=a.move("]"),o}function BC(){return{enter:{gfmFootnoteCallString:IC,gfmFootnoteCall:zC,gfmFootnoteDefinitionLabelString:MC,gfmFootnoteDefinition:FC},exit:{gfmFootnoteCallString:LC,gfmFootnoteCall:_C,gfmFootnoteDefinitionLabelString:OC,gfmFootnoteDefinition:qC}}}function UC(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:s,footnoteReference:gv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(r,a,o,c){const u=o.createTracker(c);let d=u.move("[^");const p=o.enter("footnoteDefinition"),f=o.enter("label");return d+=u.move(o.safe(o.associationId(r),{before:d,after:"]"})),f(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((n?`
|
|
571
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),n?xv:WC))),p(),d}}function WC(e,n,s){return n===0?e:xv(e,n,s)}function xv(e,n,s){return(s?"":" ")+e}const HC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ff.attention=GC;Ff.peek=ZC;function VC(){return{canContainEols:["delete"],enter:{strikethrough:YC},exit:{strikethrough:QC}}}function KC(){return{handlers:{delete:Ff},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HC}]}}function YC(e){this.enter({type:"delete",children:[],position:void 0},e)}function QC(e){this.exit(e)}function Ff(e,n,s,r){const a=s.createTracker(r),o=s.stack.includes("strikethrough")?"~":"~~",c=s.enter("strikethrough");let u=a.move(o);return u+=s.containerPhrasing(e,{...a.current(),before:u,after:"~"}),u+=a.move(o),c(),u}function GC(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function ZC(){return"~"}function XC(e){return e.length}function JC(e,n){const s=n||{},r=(s.align||[]).concat(),a=s.stringLength||XC,o=[],c=[],u=[],d=[];let p=0,f=-1;for(;++f<e.length;){const k=[],N=[];let w=-1;for(e[f].length>p&&(p=e[f].length);++w<e[f].length;){const S=e$(e[f][w]);if(s.alignDelimiters!==!1){const E=a(S);N[w]=E,(d[w]===void 0||E>d[w])&&(d[w]=E)}k.push(S)}c[f]=k,u[f]=N}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<p;)o[m]=Yx(r[m]);else{const k=Yx(r);for(;++m<p;)o[m]=k}m=-1;const y=[],x=[];for(;++m<p;){const k=o[m];let N="",w="";k===99?(N=":",w=":"):k===108?N=":":k===114&&(w=":");let S=s.alignDelimiters===!1?1:Math.max(1,d[m]-N.length-w.length);const E=N+"-".repeat(S)+w;s.alignDelimiters!==!1&&(S=N.length+S+w.length,S>d[m]&&(d[m]=S),x[m]=S),y[m]=E}c.splice(1,0,y),u.splice(1,0,x),f=-1;const v=[];for(;++f<c.length;){const k=c[f],N=u[f];m=-1;const w=[];for(;++m<p;){const S=k[m]||"";let E="",P="";if(s.alignDelimiters!==!1){const B=d[m]-(N[m]||0),T=o[m];T===114?E=" ".repeat(B):T===99?B%2?(E=" ".repeat(B/2+.5),P=" ".repeat(B/2-.5)):(E=" ".repeat(B/2),P=E):P=" ".repeat(B)}s.delimiterStart!==!1&&!m&&w.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&S==="")&&(s.delimiterStart!==!1||m)&&w.push(" "),s.alignDelimiters!==!1&&w.push(E),w.push(S),s.alignDelimiters!==!1&&w.push(P),s.padding!==!1&&w.push(" "),(s.delimiterEnd!==!1||m!==p-1)&&w.push("|")}v.push(s.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return v.join(`
|
|
572
|
+
`)}function e$(e){return e==null?"":String(e)}function Yx(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function t$(e,n,s,r){const a=s.enter("blockquote"),o=s.createTracker(r);o.move("> "),o.shift(2);const c=s.indentLines(s.containerFlow(e,o.current()),n$);return a(),c}function n$(e,n,s){return">"+(s?"":" ")+e}function s$(e,n){return Qx(e,n.inConstruct,!0)&&!Qx(e,n.notInConstruct,!1)}function Qx(e,n,s){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return s;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Gx(e,n,s,r){let a=-1;for(;++a<s.unsafe.length;)if(s.unsafe[a].character===`
|
|
573
|
+
`&&s$(s.stack,s.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
574
|
+
`}function r$(e,n){const s=String(e);let r=s.indexOf(n),a=r,o=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++o>c&&(c=o):o=1,a=r+n.length,r=s.indexOf(n,a);return c}function i$(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function a$(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function o$(e,n,s,r){const a=a$(s),o=e.value||"",c=a==="`"?"GraveAccent":"Tilde";if(i$(e,s)){const m=s.enter("codeIndented"),y=s.indentLines(o,l$);return m(),y}const u=s.createTracker(r),d=a.repeat(Math.max(r$(o,a)+1,3)),p=s.enter("codeFenced");let f=u.move(d);if(e.lang){const m=s.enter(`codeFencedLang${c}`);f+=u.move(s.safe(e.lang,{before:f,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=s.enter(`codeFencedMeta${c}`);f+=u.move(" "),f+=u.move(s.safe(e.meta,{before:f,after:`
|
|
575
|
+
`,encode:["`"],...u.current()})),m()}return f+=u.move(`
|
|
576
|
+
`),o&&(f+=u.move(o+`
|
|
577
|
+
`)),f+=u.move(d),p(),f}function l$(e,n,s){return(s?"":" ")+e}function Lf(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function c$(e,n,s,r){const a=Lf(s),o=a==='"'?"Quote":"Apostrophe",c=s.enter("definition");let u=s.enter("label");const d=s.createTracker(r);let p=d.move("[");return p+=d.move(s.safe(s.associationId(e),{before:p,after:"]",...d.current()})),p+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=s.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(s.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(u=s.enter("destinationRaw"),p+=d.move(s.safe(e.url,{before:p,after:e.title?" ":`
|
|
578
|
+
`,...d.current()}))),u(),e.title&&(u=s.enter(`title${o}`),p+=d.move(" "+a),p+=d.move(s.safe(e.title,{before:p,after:a,...d.current()})),p+=d.move(a),u()),c(),p}function u$(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function oo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rc(e,n,s){const r=Ri(e),a=Ri(n);return r===void 0?a===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yv.peek=d$;function yv(e,n,s,r){const a=u$(s),o=s.enter("emphasis"),c=s.createTracker(r),u=c.move(a);let d=c.move(s.containerPhrasing(e,{after:a,before:u,...c.current()}));const p=d.charCodeAt(0),f=Rc(r.before.charCodeAt(r.before.length-1),p,a);f.inside&&(d=oo(p)+d.slice(1));const m=d.charCodeAt(d.length-1),y=Rc(r.after.charCodeAt(0),m,a);y.inside&&(d=d.slice(0,-1)+oo(m));const x=c.move(a);return o(),s.attentionEncodeSurroundingInfo={after:y.outside,before:f.outside},u+d+x}function d$(e,n,s){return s.options.emphasis||"*"}function h$(e,n){let s=!1;return If(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return s=!0,Rp}),!!((!e.depth||e.depth<3)&&Cf(e)&&(n.options.setext||s))}function p$(e,n,s,r){const a=Math.max(Math.min(6,e.depth||1),1),o=s.createTracker(r);if(h$(e,s)){const f=s.enter("headingSetext"),m=s.enter("phrasing"),y=s.containerPhrasing(e,{...o.current(),before:`
|
|
579
|
+
`,after:`
|
|
580
|
+
`});return m(),f(),y+`
|
|
581
|
+
`+(a===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
582
|
+
`))+1))}const c="#".repeat(a),u=s.enter("headingAtx"),d=s.enter("phrasing");o.move(c+" ");let p=s.containerPhrasing(e,{before:"# ",after:`
|
|
583
|
+
`,...o.current()});return/^[\t ]/.test(p)&&(p=oo(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,s.options.closeAtx&&(p+=" "+c),d(),u(),p}kv.peek=f$;function kv(e){return e.value||""}function f$(){return"<"}vv.peek=m$;function vv(e,n,s,r){const a=Lf(s),o=a==='"'?"Quote":"Apostrophe",c=s.enter("image");let u=s.enter("label");const d=s.createTracker(r);let p=d.move("![");return p+=d.move(s.safe(e.alt,{before:p,after:"]",...d.current()})),p+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=s.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(s.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(u=s.enter("destinationRaw"),p+=d.move(s.safe(e.url,{before:p,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=s.enter(`title${o}`),p+=d.move(" "+a),p+=d.move(s.safe(e.title,{before:p,after:a,...d.current()})),p+=d.move(a),u()),p+=d.move(")"),c(),p}function m$(){return"!"}jv.peek=g$;function jv(e,n,s,r){const a=e.referenceType,o=s.enter("imageReference");let c=s.enter("label");const u=s.createTracker(r);let d=u.move("![");const p=s.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(p+"]["),c();const f=s.stack;s.stack=[],c=s.enter("reference");const m=s.safe(s.associationId(e),{before:d,after:"]",...u.current()});return c(),s.stack=f,o(),a==="full"||!p||p!==m?d+=u.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function g$(){return"!"}bv.peek=x$;function bv(e,n,s){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<s.unsafe.length;){const c=s.unsafe[o],u=s.compilePattern(c);let d;if(c.atBreak)for(;d=u.exec(r);){let p=d.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(d.index+1)}}return a+r+a}function x$(){return"`"}function wv(e,n){const s=Cf(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(s===e.url||"mailto:"+s===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nv.peek=y$;function Nv(e,n,s,r){const a=Lf(s),o=a==='"'?"Quote":"Apostrophe",c=s.createTracker(r);let u,d;if(wv(e,s)){const f=s.stack;s.stack=[],u=s.enter("autolink");let m=c.move("<");return m+=c.move(s.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),u(),s.stack=f,m}u=s.enter("link"),d=s.enter("label");let p=c.move("[");return p+=c.move(s.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=s.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(s.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(d=s.enter("destinationRaw"),p+=c.move(s.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=s.enter(`title${o}`),p+=c.move(" "+a),p+=c.move(s.safe(e.title,{before:p,after:a,...c.current()})),p+=c.move(a),d()),p+=c.move(")"),u(),p}function y$(e,n,s){return wv(e,s)?"<":"["}Sv.peek=k$;function Sv(e,n,s,r){const a=e.referenceType,o=s.enter("linkReference");let c=s.enter("label");const u=s.createTracker(r);let d=u.move("[");const p=s.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(p+"]["),c();const f=s.stack;s.stack=[],c=s.enter("reference");const m=s.safe(s.associationId(e),{before:d,after:"]",...u.current()});return c(),s.stack=f,o(),a==="full"||!p||p!==m?d+=u.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function k$(){return"["}function _f(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function v$(e){const n=_f(e),s=e.options.bulletOther;if(!s)return n==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+s+"`) to be different");return s}function j$(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Cv(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function b$(e,n,s,r){const a=s.enter("list"),o=s.bulletCurrent;let c=e.ordered?j$(s):_f(s);const u=e.ordered?c==="."?")":".":v$(s);let d=n&&s.bulletLastUsed?c===s.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&f&&(!f.children||!f.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(d=!0),Cv(s)===c&&f){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=u),s.bulletCurrent=c;const p=s.containerFlow(e,r);return s.bulletLastUsed=c,s.bulletCurrent=o,a(),p}function w$(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function N$(e,n,s,r){const a=w$(s);let o=s.bulletCurrent||_f(s);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(s.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let c=o.length+1;(a==="tab"||a==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const u=s.createTracker(r);u.move(o+" ".repeat(c-o.length)),u.shift(c);const d=s.enter("listItem"),p=s.indentLines(s.containerFlow(e,u.current()),f);return d(),p;function f(m,y,x){return y?(x?"":" ".repeat(c))+m:(x?o:o+" ".repeat(c-o.length))+m}}function S$(e,n,s,r){const a=s.enter("paragraph"),o=s.enter("phrasing"),c=s.containerPhrasing(e,r);return o(),a(),c}const C$=Po(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $$(e,n,s,r){return(e.children.some(function(c){return C$(c)})?s.containerPhrasing:s.containerFlow).call(s,e,r)}function E$(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}$v.peek=T$;function $v(e,n,s,r){const a=E$(s),o=s.enter("strong"),c=s.createTracker(r),u=c.move(a+a);let d=c.move(s.containerPhrasing(e,{after:a,before:u,...c.current()}));const p=d.charCodeAt(0),f=Rc(r.before.charCodeAt(r.before.length-1),p,a);f.inside&&(d=oo(p)+d.slice(1));const m=d.charCodeAt(d.length-1),y=Rc(r.after.charCodeAt(0),m,a);y.inside&&(d=d.slice(0,-1)+oo(m));const x=c.move(a+a);return o(),s.attentionEncodeSurroundingInfo={after:y.outside,before:f.outside},u+d+x}function T$(e,n,s){return s.options.strong||"*"}function A$(e,n,s,r){return s.safe(e.value,r)}function P$(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function R$(e,n,s){const r=(Cv(s)+(s.options.ruleSpaces?" ":"")).repeat(P$(s));return s.options.ruleSpaces?r.slice(0,-1):r}const Ev={blockquote:t$,break:Gx,code:o$,definition:c$,emphasis:yv,hardBreak:Gx,heading:p$,html:kv,image:vv,imageReference:jv,inlineCode:bv,link:Nv,linkReference:Sv,list:b$,listItem:N$,paragraph:S$,root:$$,strong:$v,text:A$,thematicBreak:R$};function I$(){return{enter:{table:z$,tableData:Zx,tableHeader:Zx,tableRow:F$},exit:{codeText:L$,table:M$,tableData:Dh,tableHeader:Dh,tableRow:Dh}}}function z$(e){const n=e._align;this.enter({type:"table",align:n.map(function(s){return s==="none"?null:s}),children:[]},e),this.data.inTable=!0}function M$(e){this.exit(e),this.data.inTable=void 0}function F$(e){this.enter({type:"tableRow",children:[]},e)}function Dh(e){this.exit(e)}function Zx(e){this.enter({type:"tableCell",children:[]},e)}function L$(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,_$));const s=this.stack[this.stack.length-1];s.type,s.value=n,this.exit(e)}function _$(e,n){return n==="|"?n:e}function O$(e){const n=e||{},s=n.tableCellPadding,r=n.tablePipeAlign,a=n.stringLength,o=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
584
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:d,tableRow:u}};function c(x,v,k,N){return p(f(x,k,N),x.align)}function u(x,v,k,N){const w=m(x,k,N),S=p([w]);return S.slice(0,S.indexOf(`
|
|
585
|
+
`))}function d(x,v,k,N){const w=k.enter("tableCell"),S=k.enter("phrasing"),E=k.containerPhrasing(x,{...N,before:o,after:o});return S(),w(),E}function p(x,v){return JC(x,{align:v,alignDelimiters:r,padding:s,stringLength:a})}function f(x,v,k){const N=x.children;let w=-1;const S=[],E=v.enter("table");for(;++w<N.length;)S[w]=m(N[w],v,k);return E(),S}function m(x,v,k){const N=x.children;let w=-1;const S=[],E=v.enter("tableRow");for(;++w<N.length;)S[w]=d(N[w],x,v,k);return E(),S}function y(x,v,k){let N=Ev.inlineCode(x,v,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function q$(){return{exit:{taskListCheckValueChecked:Xx,taskListCheckValueUnchecked:Xx,paragraph:B$}}}function D$(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:U$}}}function Xx(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function B$(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const r=s.children[0];if(r&&r.type==="text"){const a=n.children;let o=-1,c;for(;++o<a.length;){const u=a[o];if(u.type==="paragraph"){c=u;break}}c===s&&(r.value=r.value.slice(1),r.value.length===0?s.children.shift():s.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,s.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function U$(e,n,s,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",u=s.createTracker(r);o&&u.move(c);let d=Ev.listItem(e,n,s,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),d;function p(f){return f+c}}function W$(){return[jC(),BC(),VC(),I$(),q$()]}function H$(e){return{extensions:[bC(),UC(e),KC(),O$(e),D$()]}}const V$={tokenize:X$,partial:!0},Tv={tokenize:J$,partial:!0},Av={tokenize:eE,partial:!0},Pv={tokenize:tE,partial:!0},K$={tokenize:nE,partial:!0},Rv={name:"wwwAutolink",tokenize:G$,previous:zv},Iv={name:"protocolAutolink",tokenize:Z$,previous:Mv},Ps={name:"emailAutolink",tokenize:Q$,previous:Fv},cs={};function Y$(){return{text:cs}}let Sr=48;for(;Sr<123;)cs[Sr]=Ps,Sr++,Sr===58?Sr=65:Sr===91&&(Sr=97);cs[43]=Ps;cs[45]=Ps;cs[46]=Ps;cs[95]=Ps;cs[72]=[Ps,Iv];cs[104]=[Ps,Iv];cs[87]=[Ps,Rv];cs[119]=[Ps,Rv];function Q$(e,n,s){const r=this;let a,o;return c;function c(m){return!Lp(m)||!Fv.call(r,r.previous)||Of(r.events)?s(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Lp(m)?(e.consume(m),u):m===64?(e.consume(m),d):s(m)}function d(m){return m===46?e.check(K$,f,p)(m):m===45||m===95||Pt(m)?(o=!0,e.consume(m),d):f(m)}function p(m){return e.consume(m),a=!0,d}function f(m){return o&&a&&_t(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(m)):s(m)}}function G$(e,n,s){const r=this;return a;function a(c){return c!==87&&c!==119||!zv.call(r,r.previous)||Of(r.events)?s(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(V$,e.attempt(Tv,e.attempt(Av,o),s),s)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function Z$(e,n,s){const r=this;let a="",o=!1;return c;function c(m){return(m===72||m===104)&&Mv.call(r,r.previous)&&!Of(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),u):s(m)}function u(m){if(_t(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const y=a.toLowerCase();if(y==="http"||y==="https")return e.consume(m),d}return s(m)}function d(m){return m===47?(e.consume(m),o?p:(o=!0,d)):s(m)}function p(m){return m===null||Tc(m)||Ke(m)||_r(m)||tu(m)?s(m):e.attempt(Tv,e.attempt(Av,f),s)(m)}function f(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(m)}}function X$(e,n,s){let r=0;return a;function a(c){return(c===87||c===119)&&r<3?(r++,e.consume(c),a):c===46&&r===3?(e.consume(c),o):s(c)}function o(c){return c===null?s(c):n(c)}}function J$(e,n,s){let r,a,o;return c;function c(p){return p===46||p===95?e.check(Pv,d,u)(p):p===null||Ke(p)||_r(p)||p!==45&&tu(p)?d(p):(o=!0,e.consume(p),c)}function u(p){return p===95?r=!0:(a=r,r=void 0),e.consume(p),c}function d(p){return a||r||!o?s(p):n(p)}}function eE(e,n){let s=0,r=0;return a;function a(c){return c===40?(s++,e.consume(c),a):c===41&&r<s?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Pv,n,o)(c):c===null||Ke(c)||_r(c)?n(c):(e.consume(c),a)}function o(c){return c===41&&r++,e.consume(c),a}}function tE(e,n,s){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),a):u===60||u===null||Ke(u)||_r(u)?n(u):s(u)}function a(u){return u===null||u===40||u===91||Ke(u)||_r(u)?n(u):r(u)}function o(u){return _t(u)?c(u):s(u)}function c(u){return u===59?(e.consume(u),r):_t(u)?(e.consume(u),c):s(u)}}function nE(e,n,s){return r;function r(o){return e.consume(o),a}function a(o){return Pt(o)?s(o):n(o)}}function zv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ke(e)}function Mv(e){return!_t(e)}function Fv(e){return!(e===47||Lp(e))}function Lp(e){return e===43||e===45||e===46||e===95||Pt(e)}function Of(e){let n=e.length,s=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){s=!0;break}if(r._gfmAutolinkLiteralWalkedInto){s=!1;break}}return e.length>0&&!s&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const sE={tokenize:dE,partial:!0};function rE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lE,continuation:{tokenize:cE},exit:uE}},text:{91:{name:"gfmFootnoteCall",tokenize:oE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iE,resolveTo:aE}}}}function iE(e,n,s){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!c||!c._balanced)return s(d);const p=Bn(r.sliceSerialize({start:c.end,end:r.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?s(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function aE(e,n){let s=e.length;for(;s--;)if(e[s][1].type==="labelImage"&&e[s][0]==="enter"){e[s][1];break}e[s+1][1].type="data",e[s+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[s+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[s+3][1].end),end:Object.assign({},e[s+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[s+1],e[s+2],["enter",r,n],e[s+3],e[s+4],["enter",a,n],["exit",a,n],["enter",o,n],["enter",c,n],["exit",c,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(s,e.length-s+1,...u),e}function oE(e,n,s){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,c;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?s(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(o>999||m===93&&!c||m===null||m===91||Ke(m))return s(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return a.includes(Bn(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):s(m)}return Ke(m)||(c=!0),o++,e.consume(m),m===92?f:p}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,p):p(m)}}function lE(e,n,s){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,c=0,u;return d;function d(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):s(v)}function f(v){if(c>999||v===93&&!u||v===null||v===91||Ke(v))return s(v);if(v===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=Bn(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ke(v)||(u=!0),c++,e.consume(v),v===92?m:f}function m(v){return v===91||v===92||v===93?(e.consume(v),c++,f):f(v)}function y(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),a.includes(o)||a.push(o),Oe(e,x,"gfmFootnoteDefinitionWhitespace")):s(v)}function x(v){return n(v)}}function cE(e,n,s){return e.check(Ao,n,e.attempt(sE,n,s))}function uE(e){e.exit("gfmFootnoteDefinition")}function dE(e,n,s){const r=this;return Oe(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(o):s(o)}}function hE(e){let s=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return s==null&&(s=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(c,u){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let p=d;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[d][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[d][1].end)},m={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[d][1].start)},y=[["enter",f,u],["enter",c[p][1],u],["exit",c[p][1],u],["enter",m,u]],x=u.parser.constructs.insideSpan.null;x&&fn(y,y.length,0,nu(x,c.slice(p+1,d),u)),fn(y,y.length,0,[["exit",m,u],["enter",c[d][1],u],["exit",c[d][1],u],["exit",f,u]]),fn(c,p-1,d-p+3,y),d=p+y.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function o(c,u,d){const p=this.previous,f=this.events;let m=0;return y;function y(v){return p===126&&f[f.length-1][1].type!=="characterEscape"?d(v):(c.enter("strikethroughSequenceTemporary"),x(v))}function x(v){const k=Ri(p);if(v===126)return m>1?d(v):(c.consume(v),m++,x);if(m<2&&!s)return d(v);const N=c.exit("strikethroughSequenceTemporary"),w=Ri(v);return N._open=!w||w===2&&!!k,N._close=!k||k===2&&!!w,u(v)}}}class pE{constructor(){this.map=[],this.index=new Map}add(n,s,r){fE(this,n,s,r)}consume(n){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let s=this.map.length;const r=[];for(;s>0;)s-=1,r.push(n.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),n.length=this.map[s][0];r.push(n.slice()),n.length=0;let a=r.pop();for(;a;){for(const o of a)n.push(o);a=r.pop()}this.map.length=0,this.index.clear()}}function fE(e,n,s,r){if(s===0&&r.length===0)return;const a=e.index.get(n);if(a){a[1]+=s,a[2].push(...r);return}const o=[n,s,r];e.map.push(o),e.index.set(n,o)}function mE(e,n){let s=!1;const r=[];for(;n<e.length;){const a=e[n];if(s){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(s=!0);n+=1}return r}function gE(){return{flow:{null:{name:"table",tokenize:xE,resolveAll:yE}}}}function xE(e,n,s){const r=this;let a=0,o=0,c;return u;function u(R){let F=r.events.length-1;for(;F>-1;){const{type:U}=r.events[F][1];if(U==="lineEnding"||U==="linePrefix")F--;else break}const M=F>-1?r.events[F][1].type:null,J=M==="tableHead"||M==="tableRow"?T:d;return J===T&&r.parser.lazy[r.now().line]?s(R):J(R)}function d(R){return e.enter("tableHead"),e.enter("tableRow"),p(R)}function p(R){return R===124||(c=!0,o+=1),f(R)}function f(R){return R===null?s(R):Se(R)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x):s(R):Le(R)?Oe(e,f,"whitespace")(R):(o+=1,c&&(c=!1,a+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),c=!0,f):(e.enter("data"),m(R)))}function m(R){return R===null||R===124||Ke(R)?(e.exit("data"),f(R)):(e.consume(R),R===92?y:m)}function y(R){return R===92||R===124?(e.consume(R),m):m(R)}function x(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?s(R):(e.enter("tableDelimiterRow"),c=!1,Le(R)?Oe(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):v(R))}function v(R){return R===45||R===58?N(R):R===124?(c=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),k):B(R)}function k(R){return Le(R)?Oe(e,N,"whitespace")(R):N(R)}function N(R){return R===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),w):R===45?(o+=1,w(R)):R===null||Se(R)?P(R):B(R)}function w(R){return R===45?(e.enter("tableDelimiterFiller"),S(R)):B(R)}function S(R){return R===45?(e.consume(R),S):R===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(R))}function E(R){return Le(R)?Oe(e,P,"whitespace")(R):P(R)}function P(R){return R===124?v(R):R===null||Se(R)?!c||a!==o?B(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):B(R)}function B(R){return s(R)}function T(R){return e.enter("tableRow"),_(R)}function _(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),_):R===null||Se(R)?(e.exit("tableRow"),n(R)):Le(R)?Oe(e,_,"whitespace")(R):(e.enter("data"),I(R))}function I(R){return R===null||R===124||Ke(R)?(e.exit("data"),_(R)):(e.consume(R),R===92?D:I)}function D(R){return R===92||R===124?(e.consume(R),I):I(R)}}function yE(e,n){let s=-1,r=!0,a=0,o=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,p,f,m;const y=new pE;for(;++s<e.length;){const x=e[s],v=x[1];x[0]==="enter"?v.type==="tableHead"?(u=!1,d!==0&&(Jx(y,n,d,p,f),f=void 0,d=0),p={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(s,0,[["enter",p,n]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],c=[0,s+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},y.add(s,0,[["enter",f,n]])),a=v.type==="tableDelimiterRow"?2:f?3:1):a&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],m=Xl(y,n,o,a,void 0,m),o=[0,0,0,0]),c[2]=s)):v.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(c[0]=c[1],m=Xl(y,n,o,a,void 0,m)),o=c,c=[o[1],s,0,0])):v.type==="tableHead"?(u=!0,d=s):v.type==="tableRow"||v.type==="tableDelimiterRow"?(d=s,o[1]!==0?(c[0]=c[1],m=Xl(y,n,o,a,s,m)):c[1]!==0&&(m=Xl(y,n,c,a,s,m)),a=0):a&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(c[3]=s)}for(d!==0&&Jx(y,n,d,p,f),y.consume(n.events),s=-1;++s<n.events.length;){const x=n.events[s];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=mE(n.events,s))}return e}function Xl(e,n,s,r,a,o){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";s[0]!==0&&(o.end=Object.assign({},Si(n.events,s[0])),e.add(s[0],0,[["exit",o,n]]));const d=Si(n.events,s[1]);if(o={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(s[1],0,[["enter",o,n]]),s[2]!==0){const p=Si(n.events,s[2]),f=Si(n.events,s[3]),m={type:u,start:Object.assign({},p),end:Object.assign({},f)};if(e.add(s[2],0,[["enter",m,n]]),r!==2){const y=n.events[s[2]],x=n.events[s[3]];if(y[1].end=Object.assign({},x[1].end),y[1].type="chunkText",y[1].contentType="text",s[3]>s[2]+1){const v=s[2]+1,k=s[3]-s[2]-1;e.add(v,k,[])}}e.add(s[3]+1,0,[["exit",m,n]])}return a!==void 0&&(o.end=Object.assign({},Si(n.events,a)),e.add(a,0,[["exit",o,n]]),o=void 0),o}function Jx(e,n,s,r,a){const o=[],c=Si(n.events,s);a&&(a.end=Object.assign({},c),o.push(["exit",a,n])),r.end=Object.assign({},c),o.push(["exit",r,n]),e.add(s+1,0,o)}function Si(e,n){const s=e[n],r=s[0]==="enter"?"start":"end";return s[1][r]}const kE={name:"tasklistCheck",tokenize:jE};function vE(){return{text:{91:kE}}}function jE(e,n,s){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?s(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return Ke(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):s(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):s(d)}function u(d){return Se(d)?n(d):Le(d)?e.check({tokenize:bE},n,s)(d):s(d)}}function bE(e,n,s){return Oe(e,r,"whitespace");function r(a){return a===null?s(a):n(a)}}function wE(e){return Yk([Y$(),rE(),hE(e),gE(),vE()])}const NE={};function qf(e){const n=this,s=e||NE,r=n.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(wE(s)),o.push(W$()),c.push(H$(s))}function Lv(e){var n,s,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(s=Lv(e[n]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}function _v(){for(var e,n,s=0,r="",a=arguments.length;s<a;s++)(e=arguments[s])&&(n=Lv(e))&&(r&&(r+=" "),r+=n);return r}var SE=Object.create,iu=Object.defineProperty,CE=Object.defineProperties,$E=Object.getOwnPropertyDescriptor,EE=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertyNames,Ic=Object.getOwnPropertySymbols,TE=Object.getPrototypeOf,Df=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,ey=(e,n,s)=>n in e?iu(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,ts=(e,n)=>{for(var s in n||(n={}))Df.call(n,s)&&ey(e,s,n[s]);if(Ic)for(var s of Ic(n))qv.call(n,s)&&ey(e,s,n[s]);return e},au=(e,n)=>CE(e,EE(n)),Dv=(e,n)=>{var s={};for(var r in e)Df.call(e,r)&&n.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&Ic)for(var r of Ic(e))n.indexOf(r)<0&&qv.call(e,r)&&(s[r]=e[r]);return s},AE=(e,n)=>function(){return n||(0,e[Ov(e)[0]])((n={exports:{}}).exports,n),n.exports},PE=(e,n)=>{for(var s in n)iu(e,s,{get:n[s],enumerable:!0})},RE=(e,n,s,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Ov(n))!Df.call(e,a)&&a!==s&&iu(e,a,{get:()=>n[a],enumerable:!(r=$E(n,a))||r.enumerable});return e},IE=(e,n,s)=>(s=e!=null?SE(TE(e)):{},RE(!e||!e.__esModule?iu(s,"default",{value:e,enumerable:!0}):s,e)),zE=AE({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,n){var s=(function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},c={util:{encode:function v(k){return k instanceof u?new u(k.type,v(k.content),k.alias):Array.isArray(k)?k.map(v):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++a}),v.__id},clone:function v(k,N){N=N||{};var w,S;switch(c.util.type(k)){case"Object":if(S=c.util.objId(k),N[S])return N[S];w={},N[S]=w;for(var E in k)k.hasOwnProperty(E)&&(w[E]=v(k[E],N));return w;case"Array":return S=c.util.objId(k),N[S]?N[S]:(w=[],N[S]=w,k.forEach(function(P,B){w[B]=v(P,N)}),w);default:return k}},getLanguage:function(v){for(;v;){var k=r.exec(v.className);if(k)return k[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,k){v.className=v.className.replace(RegExp(r,"gi"),""),v.classList.add("language-"+k)},isActive:function(v,k,N){for(var w="no-"+k;v;){var S=v.classList;if(S.contains(k))return!0;if(S.contains(w))return!1;v=v.parentElement}return!!N}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(v,k){var N=c.util.clone(c.languages[v]);for(var w in k)N[w]=k[w];return N},insertBefore:function(v,k,N,w){w=w||c.languages;var S=w[v],E={};for(var P in S)if(S.hasOwnProperty(P)){if(P==k)for(var B in N)N.hasOwnProperty(B)&&(E[B]=N[B]);N.hasOwnProperty(P)||(E[P]=S[P])}var T=w[v];return w[v]=E,c.languages.DFS(c.languages,function(_,I){I===T&&_!=v&&(this[_]=E)}),E},DFS:function v(k,N,w,S){S=S||{};var E=c.util.objId;for(var P in k)if(k.hasOwnProperty(P)){N.call(k,P,k[P],w||P);var B=k[P],T=c.util.type(B);T==="Object"&&!S[E(B)]?(S[E(B)]=!0,v(B,N,null,S)):T==="Array"&&!S[E(B)]&&(S[E(B)]=!0,v(B,N,P,S))}}},plugins:{},highlight:function(v,k,N){var w={code:v,grammar:k,language:N};if(c.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=c.tokenize(w.code,w.grammar),c.hooks.run("after-tokenize",w),u.stringify(c.util.encode(w.tokens),w.language)},tokenize:function(v,k){var N=k.rest;if(N){for(var w in N)k[w]=N[w];delete k.rest}var S=new f;return m(S,S.head,v),p(v,S,k,S.head,0),x(S)},hooks:{all:{},add:function(v,k){var N=c.hooks.all;N[v]=N[v]||[],N[v].push(k)},run:function(v,k){var N=c.hooks.all[v];if(!(!N||!N.length))for(var w=0,S;S=N[w++];)S(k)}},Token:u};function u(v,k,N,w){this.type=v,this.content=k,this.alias=N,this.length=(w||"").length|0}u.stringify=function v(k,N){if(typeof k=="string")return k;if(Array.isArray(k)){var w="";return k.forEach(function(T){w+=v(T,N)}),w}var S={type:k.type,content:v(k.content,N),tag:"span",classes:["token",k.type],attributes:{},language:N},E=k.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(S.classes,E):S.classes.push(E)),c.hooks.run("wrap",S);var P="";for(var B in S.attributes)P+=" "+B+'="'+(S.attributes[B]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+P+">"+S.content+"</"+S.tag+">"};function d(v,k,N,w){v.lastIndex=k;var S=v.exec(N);if(S&&w&&S[1]){var E=S[1].length;S.index+=E,S[0]=S[0].slice(E)}return S}function p(v,k,N,w,S,E){for(var P in N)if(!(!N.hasOwnProperty(P)||!N[P])){var B=N[P];B=Array.isArray(B)?B:[B];for(var T=0;T<B.length;++T){if(E&&E.cause==P+","+T)return;var _=B[T],I=_.inside,D=!!_.lookbehind,R=!!_.greedy,F=_.alias;if(R&&!_.pattern.global){var M=_.pattern.toString().match(/[imsuy]*$/)[0];_.pattern=RegExp(_.pattern.source,M+"g")}for(var J=_.pattern||_,U=w.next,G=S;U!==k.tail&&!(E&&G>=E.reach);G+=U.value.length,U=U.next){var ue=U.value;if(k.length>v.length)return;if(!(ue instanceof u)){var V=1,H;if(R){if(H=d(J,G,v,D),!H||H.index>=v.length)break;var ee=H.index,ne=H.index+H[0].length,A=G;for(A+=U.value.length;ee>=A;)U=U.next,A+=U.value.length;if(A-=U.value.length,G=A,U.value instanceof u)continue;for(var O=U;O!==k.tail&&(A<ne||typeof O.value=="string");O=O.next)V++,A+=O.value.length;V--,ue=v.slice(G,A),H.index-=G}else if(H=d(J,0,ue,D),!H)continue;var ee=H.index,z=H[0],me=ue.slice(0,ee),he=ue.slice(ee+z.length),ke=G+ue.length;E&&ke>E.reach&&(E.reach=ke);var Te=U.prev;me&&(Te=m(k,Te,me),G+=me.length),y(k,Te,V);var Ae=new u(P,I?c.tokenize(z,I):z,F,z);if(U=m(k,Te,Ae),he&&m(k,U,he),V>1){var Ce={cause:P+","+T,reach:ke};p(v,k,N,U.prev,G,Ce),E&&Ce.reach>E.reach&&(E.reach=Ce.reach)}}}}}}function f(){var v={value:null,prev:null,next:null},k={value:null,prev:v,next:null};v.next=k,this.head=v,this.tail=k,this.length=0}function m(v,k,N){var w=k.next,S={value:N,prev:k,next:w};return k.next=S,w.prev=S,v.length++,S}function y(v,k,N){for(var w=k.next,S=0;S<N&&w!==v.tail;S++)w=w.next;k.next=w,w.prev=k,v.length-=S}function x(v){for(var k=[],N=v.head.next;N!==v.tail;)k.push(N.value),N=N.next;return k}return c})();n.exports=s,s.default=s}}),te=IE(zE());te.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]},te.languages.markup.tag.inside["attr-value"].inside.entity=te.languages.markup.entity,te.languages.markup.doctype.inside["internal-subset"].inside=te.languages.markup,te.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(te.languages.markup.tag,"addInlined",{value:function(e,r){var s={},s=(s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:te.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}}),r=(s["language-"+r]={pattern:/[\s\S]+/,inside:te.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:s},te.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(te.languages.markup.tag,"addAttribute",{value:function(e,n){te.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:[n,"language-"+n],inside:te.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),te.languages.html=te.languages.markup,te.languages.mathml=te.languages.markup,te.languages.svg=te.languages.markup,te.languages.xml=te.languages.extend("markup",{}),te.languages.ssml=te.languages.xml,te.languages.atom=te.languages.xml,te.languages.rss=te.languages.xml,(function(e){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s=/\\(?: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="(?:[^\\\\-]|"+s.source+")",r=RegExp(r+"-"+r),a={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:s,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:s}},"special-escape":n,"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":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":a}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(te),te.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:/[{}[\];(),.:]/},te.languages.javascript=te.languages.extend("clike",{"class-name":[te.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}|\?\?=?|\?\.?|[~:]/}),te.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,te.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:te.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:te.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:te.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:te.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:te.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),te.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:te.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"}}),te.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),te.languages.markup&&(te.languages.markup.tag.addInlined("script","javascript"),te.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")),te.languages.js=te.languages.javascript,te.languages.actionscript=te.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),te.languages.actionscript["class-name"].alias="function",delete te.languages.actionscript.parameter,delete te.languages.actionscript["literal-property"],te.languages.markup&&te.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:te.languages.markup}}),(function(e){var n=/#(?!\{).+/,s={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:s}}],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:n,interpolation:s}}}),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:s}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(te),(function(e){var n=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(n,"addSupport",{value:function(s,r){(s=typeof s=="string"?[s]:s).forEach(function(a){var o=function(m){m.inside||(m.inside={}),m.inside.rest=r},c="doc-comment";if(u=e.languages[a]){var u,d=u[c];if((d=d||(u=e.languages.insertBefore(a,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(d=u[c]={pattern:d}),Array.isArray(d))for(var p=0,f=d.length;p<f;p++)d[p]instanceof RegExp&&(d[p]={pattern:d[p]}),o(d[p]);else o(d)}})}}),n.addSupport(["java","javascript","php"],n)})(te),(function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,n=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.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\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,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);n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(te),(function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:n={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+n.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":[n,{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=n,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}),s={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:n,number:s,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:s})})(te),(function(e){var n=/[*&][^\s[\]{},]+/,s=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+s.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+s.source+")?)",a=/(?:[^\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}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(u,d){d=(d||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return u});return RegExp(p,d)}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"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\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:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(o),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:s,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(te),(function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function s(p){return p=p.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(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("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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:s(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:s(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:s(/(~~?)(?:(?!~)<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:s(/!?\[(?:(?!\])<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(p){["url","bold","italic","strike","code-snippet"].forEach(function(f){p!==f&&(e.languages.markdown[p].inside.content.inside[f]=e.languages.markdown[f])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function f(m){if(m&&typeof m!="string")for(var y=0,x=m.length;y<x;y++){var v,k=m[y];k.type!=="code"?f(k.content):(v=k.content[1],k=k.content[3],v&&k&&v.type==="code-language"&&k.type==="code-block"&&typeof v.content=="string"&&(v=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),v="language-"+(v=(/[a-z][\w-]*/i.exec(v)||[""])[0].toLowerCase()),k.alias?typeof k.alias=="string"?k.alias=[k.alias,v]:k.alias.push(v):k.alias=[v]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var f="",m=0,y=p.classes.length;m<y;m++){var x=p.classes[m],x=/language-(.+)/.exec(x);if(x){f=x[1];break}}var v,k=e.languages[f];k?p.content=e.highlight((function(N){return N=N.replace(c,""),N=N.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(w,S){var E;return(S=S.toLowerCase())[0]==="#"?(E=S[1]==="x"?parseInt(S.slice(2),16):Number(S.slice(1)),d(E)):u[S]||w})})(p.content),k,f):f&&f!=="none"&&e.plugins.autoloader&&(v="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=v,e.plugins.autoloader.loadLanguages(f,function(){var N=document.getElementById(v);N&&(N.innerHTML=e.highlight(N.textContent,e.languages[f],f))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),u={amp:"&",lt:"<",gt:">",quot:'"'},d=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(te),te.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:te.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+/},te.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var n=e.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),s=0;s<n.length;){var r=n[s++];if(r.type==="keyword"&&r.content==="mutation"){var a=[];if(m(["definition-mutation","punctuation"])&&f(1).content==="("){s+=2;var o=y(/^\($/,/^\)$/);if(o===-1)continue;for(;s<o;s++){var c=f(0);c.type==="variable"&&(x(c,"variable-input"),a.push(c.content))}s=o+1}if(m(["punctuation","property-query"])&&f(0).content==="{"&&(s++,x(f(0),"property-mutation"),0<a.length)){var u=y(/^\{$/,/^\}$/);if(u!==-1)for(var d=s;d<u;d++){var p=n[d];p.type==="variable"&&0<=a.indexOf(p.content)&&x(p,"variable-input")}}}}function f(v){return n[s+v]}function m(v,k){k=k||0;for(var N=0;N<v.length;N++){var w=f(N+k);if(!w||w.type!==v[N])return}return 1}function y(v,k){for(var N=1,w=s;w<n.length;w++){var S=n[w],E=S.content;if(S.type==="punctuation"&&typeof E=="string"){if(v.test(E))N++;else if(k.test(E)&&--N===0)return w}}return-1}function x(v,k){var N=v.alias;N?Array.isArray(N)||(v.alias=N=[N]):v.alias=N=[],N.push(k)}}),te.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 n=e.languages.javascript["template-string"],s=n.pattern.source,r=n.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function c(m,y){if(e.languages[m])return{pattern:RegExp("((?:"+y+")\\s*)"+s),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:m}}}}function u(m,y,x){return m={code:m,grammar:y,language:x},e.hooks.run("before-tokenize",m),m.tokens=e.tokenize(m.code,m.grammar),e.hooks.run("after-tokenize",m),m.tokens}function d(m,y,x){var N=e.tokenize(m,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),v=0,k={},N=u(N.map(function(S){if(typeof S=="string")return S;for(var E,P,S=S.content;m.indexOf((P=v++,E="___"+x.toUpperCase()+"_"+P+"___"))!==-1;);return k[E]=S,E}).join(""),y,x),w=Object.keys(k);return v=0,(function S(E){for(var P=0;P<E.length;P++){if(v>=w.length)return;var B,T,_,I,D,R,F,M=E[P];typeof M=="string"||typeof M.content=="string"?(B=w[v],(F=(R=typeof M=="string"?M:M.content).indexOf(B))!==-1&&(++v,T=R.substring(0,F),D=k[B],_=void 0,(I={})["interpolation-punctuation"]=a,(I=e.tokenize(D,I)).length===3&&((_=[1,1]).push.apply(_,u(I[1],e.languages.javascript,"javascript")),I.splice.apply(I,_)),_=new e.Token("interpolation",I,r.alias,D),I=R.substring(F+B.length),D=[],T&&D.push(T),D.push(_),I&&(S(R=[I]),D.push.apply(D,R)),typeof M=="string"?(E.splice.apply(E,[P,1].concat(D)),P+=D.length-1):M.content=D)):(F=M.content,Array.isArray(F)?S(F):S([F]))}})(N),new e.Token(x,N,"language-"+x,m)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),n].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(m){return typeof m=="string"?m:Array.isArray(m)?m.map(f).join(""):f(m.content)}e.hooks.add("after-tokenize",function(m){m.language in p&&(function y(x){for(var v=0,k=x.length;v<k;v++){var N,w,S,E=x[v];typeof E!="string"&&(N=E.content,Array.isArray(N)?E.type==="template-string"?(E=N[1],N.length===3&&typeof E!="string"&&E.type==="embedded-code"&&(w=f(E),E=E.alias,E=Array.isArray(E)?E[0]:E,S=e.languages[E])&&(N[1]=d(w,S,E))):y(N):typeof N!="string"&&y([N]))}})(m.tokens)})})(te),(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 n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,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:n}}}}),e.languages.ts=e.languages.typescript})(te),(function(e){var n=e.languages.javascript,s=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+s+"\\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:n,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 s})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+s),lookbehind:!0,inside:{string:n.string,number:n.number,boolean:n.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:n,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(te),(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})})(te),te.languages.n4js=te.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/}),te.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),te.languages.n4jsd=te.languages.n4js,(function(e){function n(c,u){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),u)}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:n(/(\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:n(/(\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:n(/(\.\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 s=["function","function-variable","method","method-variable","property-access"],r=0;r<s.length;r++){var o=s[r],a=e.languages.javascript[o],o=(a=e.util.type(a)==="RegExp"?e.languages.javascript[o]={pattern:a}:a).inside||{};(a.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(te),(function(e){var n=e.util.clone(e.languages.javascript),s=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(d,p){return d=d.replace(/<S>/g,function(){return s}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return a}),RegExp(d,p)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",n),e.languages.jsx.tag.pattern=o(/<\/?(?:[\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=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(d){for(var p=[],f=0;f<d.length;f++){var m=d[f],y=!1;typeof m!="string"&&(m.type==="tag"&&m.content[0]&&m.content[0].type==="tag"?m.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===u(m.content[0].content[1])&&p.pop():m.content[m.content.length-1].content!=="/>"&&p.push({tagName:u(m.content[0].content[1]),openedBraces:0}):0<p.length&&m.type==="punctuation"&&m.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&m.type==="punctuation"&&m.content==="}"?p[p.length-1].openedBraces--:y=!0),(y||typeof m=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(y=u(m),f<d.length-1&&(typeof d[f+1]=="string"||d[f+1].type==="plain-text")&&(y+=u(d[f+1]),d.splice(f+1,1)),0<f&&(typeof d[f-1]=="string"||d[f-1].type==="plain-text")&&(y=u(d[f-1])+y,d.splice(f-1,1),f--),d[f]=new e.Token("plain-text",y,null,y)),m.content&&typeof m.content!="string"&&c(m.content)}}var u=function(d){return d?typeof d=="string"?d:typeof d.content=="string"?d.content:d.content.map(u).join(""):""};e.hooks.add("after-tokenize",function(d){d.language!=="jsx"&&d.language!=="tsx"||c(d.tokens)})})(te),(function(e){var n=e.util.clone(e.languages.typescript),n=(e.languages.tsx=e.languages.extend("jsx",n),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(te),te.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:/[{}[\]();,.:\\]/},te.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=te.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 n={"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:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},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})(te),te.languages.c=te.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|[?:~]|[-+*/%&|^!=<>]=?/}),te.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),te.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},te.languages.c.string],char:te.languages.c.char,comment:te.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:te.languages.c}}}}),te.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 te.languages.c.boolean,te.languages.objectivec=te.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 te.languages.objectivec["class-name"],te.languages.objc=te.languages.objectivec,te.languages.reason=te.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/}),te.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 te.languages.reason.function,(function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,s=0;s<2;s++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),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})(te),te.languages.go=te.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/}),te.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete te.languages.go["class-name"],(function(e){var n=/\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/,s=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return n.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 n.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:n,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 s})+")"),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"])})(te),te.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:/[{}[\];(),.:]/},te.languages.python["string-interpolation"].inside.interpolation.inside.rest=te.languages.python,te.languages.py=te.languages.python,te.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"}},te.languages.webmanifest=te.languages.json;var lo={};PE(lo,{dracula:()=>FE,duotoneDark:()=>_E,duotoneLight:()=>qE,github:()=>BE,gruvboxMaterialDark:()=>xT,gruvboxMaterialLight:()=>kT,jettwaveDark:()=>cT,jettwaveLight:()=>dT,nightOwl:()=>WE,nightOwlLight:()=>VE,oceanicNext:()=>YE,okaidia:()=>GE,oneDark:()=>pT,oneLight:()=>mT,palenight:()=>XE,shadesOfPurple:()=>eT,synthwave84:()=>nT,ultramin:()=>rT,vsDark:()=>Bv,vsLight:()=>oT});var ME={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)"}}]},FE=ME,LE={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"}}]},_E=LE,OE={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"}}]},qE=OE,DE={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"}}]},BE=DE,UE={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)"}}]},WE=UE,HE={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)"}}]},VE=HE,cn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},KE={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:cn.keyword}},{types:["attr-value"],style:{color:cn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:cn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:cn.primitive}},{types:["boolean"],style:{color:cn.boolean}},{types:["tag"],style:{color:cn.tag}},{types:["string"],style:{color:cn.string}},{types:["punctuation"],style:{color:cn.string}},{types:["selector","char","builtin","inserted"],style:{color:cn.char}},{types:["function"],style:{color:cn.function}},{types:["operator","entity","url","variable"],style:{color:cn.variable}},{types:["keyword"],style:{color:cn.keyword}},{types:["atrule","class-name"],style:{color:cn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},YE=KE,QE={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"}}]},GE=QE,ZE={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)"}}]},XE=ZE,JE={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)"}}]},eT=JE,tT={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"}}]},nT=tT,sT={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)"}}]},rT=sT,iT={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)"}}]},Bv=iT,aT={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)"}}]},oT=aT,lT={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"}}]},cT=lT,uT={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"}}]},dT=uT,hT={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%)"}}]},pT=hT,fT={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%)"}}]},mT=fT,gT={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"}}]},xT=gT,yT={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"}}]},kT=yT,vT=e=>C.useCallback(n=>{var s=n,{className:r,style:a,line:o}=s,c=Dv(s,["className","style","line"]);const u=au(ts({},c),{className:_v("token-line",r)});return typeof e=="object"&&"plain"in e&&(u.style=e.plain),typeof a=="object"&&(u.style=ts(ts({},u.style||{}),a)),u},[e]),jT=e=>{const n=C.useCallback(({types:s,empty:r})=>{if(e!=null){{if(s.length===1&&s[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(s.length===1&&r!=null)return e[s[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...s.map(a=>e[a]))}},[e]);return C.useCallback(s=>{var r=s,{token:a,className:o,style:c}=r,u=Dv(r,["token","className","style"]);const d=au(ts({},u),{className:_v("token",...a.types,o),children:a.content,style:n(a)});return c!=null&&(d.style=ts(ts({},d.style||{}),c)),d},[n])},bT=/\r\n|\r|\n/,ty=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
586
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
587
|
+
`,e[0].empty=!0)},ny=(e,n)=>{const s=e.length;return s>0&&e[s-1]===n?e:e.concat(n)},wT=e=>{const n=[[]],s=[e],r=[0],a=[e.length];let o=0,c=0,u=[];const d=[u];for(;c>-1;){for(;(o=r[c]++)<a[c];){let p,f=n[c];const y=s[c][o];if(typeof y=="string"?(f=c>0?f:["plain"],p=y):(f=ny(f,y.type),y.alias&&(f=ny(f,y.alias)),p=y.content),typeof p!="string"){c++,n.push(f),s.push(p),r.push(0),a.push(p.length);continue}const x=p.split(bT),v=x.length;u.push({types:f,content:x[0]});for(let k=1;k<v;k++)ty(u),d.push(u=[]),u.push({types:f,content:x[k]})}c--,n.pop(),s.pop(),r.pop(),a.pop()}return ty(u),d},sy=wT,NT=({prism:e,code:n,grammar:s,language:r})=>C.useMemo(()=>{if(s==null)return sy([n]);const a={code:n,grammar:s,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(n,s),e.hooks.run("after-tokenize",a),sy(a.tokens)},[n,s,r,e]),ST=(e,n)=>{const{plain:s}=e,r=e.styles.reduce((a,o)=>{const{languages:c,style:u}=o;return c&&!c.includes(n)||o.types.forEach(d=>{const p=ts(ts({},a[d]),u);a[d]=p}),a},{});return r.root=s,r.plain=au(ts({},s),{backgroundColor:void 0}),r},CT=ST,$T=({children:e,language:n,code:s,theme:r,prism:a})=>{const o=n.toLowerCase(),c=CT(r,o),u=vT(c),d=jT(c),p=a.languages[o],f=NT({prism:a,language:o,code:s,grammar:p});return e({tokens:f,className:`prism-code language-${o}`,style:c!=null?c.root:{},getLineProps:u,getTokenProps:d})},Uv=e=>C.createElement($T,au(ts({},e),{prism:e.prism||te,theme:e.theme||Bv,code:e.code,language:e.language}));/*! Bundled license information:
|
|
588
|
+
|
|
589
|
+
prismjs/prism.js:
|
|
590
|
+
(**
|
|
591
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
592
|
+
*
|
|
593
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
594
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
595
|
+
* @namespace
|
|
596
|
+
* @public
|
|
597
|
+
*)
|
|
598
|
+
*/const ET=/^\s*(?:flowchart|graph)\s*(LR|RL|TD|TB|BT)?\s*;?\s*$/i,TT=/^([A-Za-z0-9_-ۿ-]+)\s*(\[\[(.+?)\]\]|\(\[(.+?)\]\)|\(\((.+?)\)\)|\[(.+?)\]|\((.+?)\)|\{(.+?)\}|>(.+?)\])?/,AT=/^\s*(-->|---|-\.->|-\.-|==>|===|--\s*(.+?)\s*-->|-\.\s*(.+?)\s*\.->|==\s*(.+?)\s*==>)\s*(?:\|(.+?)\|)?\s*/;function ry(e){return e.replace(/^["']|["']$/g,"").replace(/<br\s*\/?>/gi," ").trim()}function PT(e){const n=e.split(`
|
|
599
|
+
`).map(y=>y.replace(/%%.*$/,"").trim()).filter(Boolean),s=n.shift()?.match(ET);if(!s)return null;const r=(s[1]??"TD").toUpperCase(),a=new Map,o=[],c=y=>{const x=y.match(TT);if(!x)return null;const v=x[1],k=x[3]??x[4]??x[5]??x[6]??x[7]??x[8]??x[9],N=x[8]?"decision":x[6]||x[3]?"box":k?"round":"box",w=a.get(v);return(!w||k)&&a.set(v,{id:v,text:ry(k??w?.text??v),shape:k?N:w?.shape??N}),{id:v,rest:y.slice(x[0].length)}};for(const y of n)if(!/^(classDef|class|style|linkStyle|click|subgraph|end|direction)\b/.test(y))for(const x of y.split(";").map(v=>v.trim()).filter(Boolean)){let v=c(x);if(!v)continue;let k=v.rest;for(;;){const N=k.match(AT);if(!N)break;const w=c(k.slice(N[0].length));if(!w)break;const S=ry(N[5]??N[2]??N[3]??N[4]??"");o.push({from:v.id,to:w.id,...S?{label:S}:{},...N[1].includes(".")?{dashed:!0}:{}}),v=w,k=w.rest}}if(!a.size)return null;const u=new Map([...a.keys()].map(y=>[y,0]));for(let y=0;y<a.size;y+=1){let x=!1;for(const v of o){if(v.from===v.to)continue;const k=(u.get(v.from)??0)+1;k>(u.get(v.to)??0)&&k<a.size&&(u.set(v.to,k),x=!0)}if(!x)break}const d=new Map,p=[...a.values()].map(y=>{const x=u.get(y.id)??0,v=d.get(x)??0;return d.set(x,v+1),{...y,rank:x,slot:v}}),f=r==="RL"||r==="BT",m=Math.max(...p.map(y=>y.rank));return{across:r==="LR"||r==="RL",nodes:f?p.map(y=>({...y,rank:m-y.rank})):p,edges:o}}function Kr({pictures:e,start:n,onClose:s}){const[r,a]=C.useState(n),o=e.length,c=C.useCallback(d=>a(p=>(p+d+o)%o),[o]);C.useEffect(()=>{const d=p=>{p.key==="Escape"?s():p.key==="ArrowRight"?c(1):p.key==="ArrowLeft"&&c(-1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s,c]);const u=e[r];return u?t.jsxs("div",{className:"lightbox",role:"dialog","aria-modal":"true","aria-label":u.caption,onMouseDown:d=>d.target===d.currentTarget&&s(),children:[t.jsxs("div",{className:"lb-top",children:[t.jsx("span",{className:"lb-cap",children:u.caption}),o>1&&t.jsxs("span",{className:"lb-count",children:[r+1," of ",o]}),t.jsx("span",{className:"grow"}),t.jsx("a",{className:"iconbtn",href:u.src,target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",title:"Open in a new tab",children:t.jsx(es,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:s,"aria-label":"Close",children:t.jsx(Ze,{size:16})})]}),t.jsx("img",{className:"lb-img",src:u.src,alt:u.caption,onMouseDown:d=>d.stopPropagation()}),o>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"lb-nav prev",onClick:()=>c(-1),"aria-label":"Previous picture",children:t.jsx(O2,{size:22})}),t.jsx("button",{className:"lb-nav next",onClick:()=>c(1),"aria-label":"Next picture",children:t.jsx(Kc,{size:22})})]})]}):null}function Bf({src:e,alt:n,className:s}){const[r,a]=C.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"zoom",onClick:()=>a(!0),"aria-label":`Open ${n} full size`,children:t.jsx("img",{className:s,src:e,alt:n,loading:"lazy"})}),r&&t.jsx(Kr,{pictures:[{src:e,caption:n}],start:0,onClose:()=>a(!1)})]})}function co({text:e,ticket:n,stream:s,caret:r}){const[a,o]=C.useState(null),c=C.useMemo(()=>[[X8,{stream:s,caret:r}]],[s,r]);return t.jsxs("div",{className:"cmd",children:[t.jsx(Mf,{remarkPlugins:[qf],rehypePlugins:c,components:{a:({href:u,children:d})=>t.jsx("a",{href:u,target:"_blank",rel:"noreferrer",children:d}),img:({src:u,alt:d})=>{const p=u?/^(https?:|data:)/.test(u)?u:pn(n,u):"";return t.jsx("button",{className:"cimg",onClick:()=>o(p),"aria-label":`Open ${d||"the picture"} big`,children:t.jsx("img",{src:p,alt:d??"",loading:"lazy"})})},table:({node:u,children:d})=>t.jsx("div",{className:"ctable",children:t.jsx("table",{dir:u?.properties?.dir??void 0,children:d})}),pre:({node:u})=>t.jsx(RT,{node:u})},children:e}),a&&t.jsx(Kr,{pictures:[{src:a,caption:"Picture"}],start:0,onClose:()=>o(null)})]})}function Wv(e){return e.type==="text"?e.value??"":(e.children??[]).map(Wv).join("")}function RT({node:e}){const n=e.children?.find(o=>o.tagName==="code"),r=(n?.properties?.className??[]).find(o=>o.startsWith("language-"))?.slice(9)??"",a=Wv(n??e).replace(/\n$/,"");if(r==="mermaid"){const o=PT(a);if(o)return t.jsx(zT,{chart:o})}return t.jsx(IT,{lang:r==="mermaid"?"Diagram (Mermaid)":r,code:a})}function IT({lang:e,code:n}){const{theme:s,toast:r}=_e(),a=()=>void navigator.clipboard?.writeText(n).then(()=>r("Code copied"),()=>r("Could not copy. Select the text instead.","err"));return t.jsxs("div",{className:"ccode",dir:"ltr",children:[t.jsxs("div",{className:"ccode-h",children:[t.jsx("span",{children:e||"text"}),t.jsxs("button",{className:"cact",onClick:a,"aria-label":"Copy the code",children:[t.jsx(lr,{size:13})," Copy"]})]}),t.jsx(Uv,{code:n,language:e||"text",theme:s==="dark"?lo.vsDark:lo.github,children:({tokens:o,getLineProps:c,getTokenProps:u})=>t.jsx("pre",{children:o.map((d,p)=>t.jsx("div",{...c({line:d}),children:d.map((f,m)=>t.jsx("span",{...u({token:f})},m))},p))})})]})}function zT({chart:e}){const n=C.useRef(null),[s,r]=C.useState([]),a=C.useMemo(()=>{const c=[];for(const u of e.nodes)(c[u.rank]??=[]).push(u);return c.map(u=>(u??[]).sort((d,p)=>d.slot-p.slot))},[e]),o=C.useMemo(()=>new Set(e.nodes.filter(c=>!e.edges.some(u=>u.from===c.id)).map(c=>c.id)),[e]);return C.useLayoutEffect(()=>{const c=n.current;if(!c)return;const u=()=>{const p=c.getBoundingClientRect(),f=m=>c.querySelector(`[data-node="${CSS.escape(m)}"]`)?.getBoundingClientRect();r(e.edges.flatMap(m=>{const y=f(m.from),x=f(m.to);if(!y||!x)return[];const v=e.across?x.left>=y.right-1:x.top>=y.bottom-1;let k,N,w,S,E;if(e.across){k=(v?y.right:y.left)-p.left,N=y.top+y.height/2-p.top,w=(v?x.left:x.right)-p.left,S=x.top+x.height/2-p.top;const P=Math.max(24,Math.abs(w-k)/2)*(v?1:-1);E=`M${k},${N} C${k+P},${N} ${w-P},${S} ${w},${S}`}else{k=y.left+y.width/2-p.left,N=(v?y.bottom:y.top)-p.top,w=x.left+x.width/2-p.left,S=(v?x.top:x.bottom)-p.top;const P=Math.max(18,Math.abs(S-N)/2)*(v?1:-1);E=`M${k},${N} C${k},${N+P} ${w},${S-P} ${w},${S}`}return[{d:E,x:(k+w)/2,y:(N+S)/2,...m.label?{label:m.label}:{},...m.dashed?{dashed:!0}:{}}]}))};u();const d=new ResizeObserver(u);return d.observe(c),()=>d.disconnect()},[e]),t.jsx("div",{className:"cdiagram",dir:"ltr",children:t.jsxs("div",{ref:n,className:`cflow ${e.across?"across":"down"}`,children:[t.jsxs("svg",{className:"cflow-lines","aria-hidden":"true",children:[t.jsx("defs",{children:t.jsx("marker",{id:"cflow-arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:t.jsx("path",{d:"M0,0 L10,5 L0,10 z"})})}),s.map((c,u)=>t.jsx("path",{d:c.d,className:c.dashed?"dash":"",markerEnd:"url(#cflow-arrow)"},u))]}),a.map((c,u)=>t.jsx("div",{className:"cflow-rank",children:c.map(d=>t.jsx("span",{"data-node":d.id,className:`cnode ${d.shape} ${o.has(d.id)&&d.shape!=="decision"?"end":""}`,children:t.jsx("bdi",{children:d.text})},d.id))},u)),s.map((c,u)=>c.label?t.jsx("span",{className:"cflow-label",style:{left:c.x,top:c.y},children:c.label},u):null)]})})}function MT({lines:e,children:n}){const[s,r]=C.useState(!1);return e<=26?t.jsx(t.Fragment,{children:n}):t.jsxs("div",{className:`cfold ${s?"open":""}`,children:[t.jsx("div",{className:"cfold-body",children:n}),t.jsx("button",{className:"btn sm",onClick:()=>r(!s),children:s?"Show less":`Show all · ${e} lines`})]})}function FT(e){return e.split(`
|
|
600
|
+
`).reduce((n,s)=>n+(s.trim()?Math.ceil(s.length/80):0),0)}const iy=/\.(png|jpe?g|gif|webp)$/i,ay=/\.html?$/i;function Hv({ticket:e,files:n}){const s=n.filter(o=>iy.test(o)),r=n.filter(o=>ay.test(o)),a=n.filter(o=>!iy.test(o)&&!ay.test(o));return t.jsxs("div",{className:"attached",children:[r.map(o=>t.jsx(Uf,{ticket:e,file:o},o)),s.length>0&&t.jsx("div",{className:"attpics",children:s.map(o=>t.jsx(Bf,{src:pn(e,o),alt:oy(o)},o))}),a.map(o=>t.jsxs("a",{className:"btn sm",href:pn(e,o),download:!0,children:[t.jsx(ss,{size:13})," ",oy(o)]},o))]})}function Uf({ticket:e,file:n,title:s="Mockup"}){const[r,a]=C.useState(!1),o=Pe({queryKey:["mockup-link",e,n],queryFn:()=>Ee(`/api/v1/tickets/${encodeURIComponent(e)}/mockup-link?path=${encodeURIComponent(n)}`),staleTime:1/0});if(o.isError)return t.jsx("p",{className:"note",children:"The mockup could not be read."});const c=u=>t.jsx("iframe",{className:u,title:s,sandbox:"allow-scripts",src:o.data?.url??"about:blank"});return t.jsxs("div",{className:"mockup",children:[t.jsxs("div",{className:"mockbar",children:[t.jsxs("span",{children:[s," · click around, it is only a picture of the idea"]}),t.jsxs("button",{className:"btn sm",onClick:()=>a(!0),children:[t.jsx(Yc,{size:12})," Full size"]})]}),c("mockframe"),r&&t.jsx(We,{title:s,wide:!0,onClose:()=>a(!1),children:c("mockframe big")})]})}function oy(e){return e.split(/[\\/]/).pop()??e}const _p=/\.(png|jpe?g|gif|webp|bmp)$/i,ly=/\.(mp4|webm|mov|m4v)$/i,Op=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba)$/i,Vv=/\.(md|markdown)$/i,Kv=/\.pdf$/i,Yv=/\.html?$/i;function vs(e){return e.split(/[\\/]/).pop()??e}function Qv(e){return Vv.test(e)?{cls:"md",label:"MD"}:Kv.test(e)?{cls:"pdf",label:"PDF"}:Yv.test(e)?{cls:"html",label:"HTML"}:_p.test(e)?{cls:"img",label:(e.split(".").pop()??"IMG").toUpperCase().slice(0,4)}:{cls:"file",label:(e.split(".").pop()??"FILE").toUpperCase().slice(0,4)}}function Wf({ticket:e,files:n,from:s,onOpen:r,sent:a}){const[o,c]=C.useState(null),[u,d]=C.useState(null),p=n.filter(x=>_p.test(x)),f=n.filter(x=>ly.test(x)),m=n.filter(x=>Op.test(x)),y=n.filter(x=>!_p.test(x)&&!ly.test(x)&&!Op.test(x)&&!/\.transcript\.txt$/.test(x));return t.jsxs("div",{className:"cfiles",children:[p.length>0&&t.jsx("div",{className:"cshots",children:p.map((x,v)=>t.jsxs("button",{className:"cshot",onClick:()=>c(v),"aria-label":`Open ${vs(x)} big`,children:[t.jsx("img",{src:pn(e,x),alt:vs(x),loading:"lazy"}),a&&t.jsx("span",{className:"cshot-ok",title:"Sent",children:t.jsx(xe,{size:11,strokeWidth:3})})]},x))}),f.map(x=>t.jsxs("div",{className:"cvideo",children:[t.jsx("video",{src:pn(e,x),controls:!0,preload:"metadata"}),t.jsx(Gv,{ticket:e,file:x})]},x)),m.map(x=>t.jsx(_T,{ticket:e,file:x},x)),y.map(x=>{const v=Qv(x),k=Vv.test(x),N=Kv.test(x),w=Yv.test(x),S=k?"Markdown · opens beside the chat":N?"PDF · opens beside the chat":w?"Mockup · runs here, sealed off":"File · downloads",E=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:`cfic ${v.cls}`,children:v.label}),t.jsxs("span",{className:"cfile-t",children:[t.jsx("span",{className:"cfname",children:vs(x)}),t.jsx("span",{className:"cfmeta",children:S})]}),t.jsx("span",{className:"cfopen",children:k||N||w?"Open":t.jsx(ss,{size:14})})]});return k||N?t.jsx("button",{className:"cfile",onClick:()=>r?.({ticket:e,file:x,kind:k?"md":"pdf",...s?{from:s}:{}}),children:E},x):w?t.jsx("button",{className:"cfile",onClick:()=>d(x),children:E},x):t.jsx("a",{className:"cfile",href:pn(e,x),download:!0,children:E},x)}),o!==null&&t.jsx(Kr,{pictures:p.map(x=>({src:pn(e,x),caption:vs(x)})),start:o,onClose:()=>c(null)}),u&&t.jsx(We,{title:vs(u),wide:!0,onClose:()=>d(null),children:t.jsx(Uf,{ticket:e,file:u,title:vs(u)})})]})}function LT(e,n){return Pe({queryKey:["transcript",e,n],queryFn:async()=>{const s=await fetch(pn(e,`${n}.transcript.txt`));return s.ok&&(await s.text()).replace(/^Transcript of [^\n]*\n+/,"").trim()||null},staleTime:3e4,refetchInterval:s=>s.state.data?!1:1e4})}function Gv({ticket:e,file:n,open:s=!0}){const r=LT(e,n).data,[a,o]=C.useState(s);return r?t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"ctlink",onClick:()=>o(!a),children:a?"Hide the written text":"Show the written text"}),a&&t.jsx("div",{className:"ctrans",children:r.split(/\n+/).map((c,u)=>{const d=An(c);return t.jsx("p",{dir:d.dir,lang:d.dir==="rtl"?"ar":"en",className:As(d),children:c},u)})})]}):null}function _T({ticket:e,file:n}){const s=C.useRef(null),[r,a]=C.useState(!1),[o,c]=C.useState({at:0,length:0}),u=C.useMemo(()=>{let m=7;for(const y of n)m=(m*31+y.charCodeAt(0))%9973;return Array.from({length:34},(y,x)=>6+m*(x+3)*7%19)},[n]);C.useEffect(()=>{const m=s.current;if(!m)return;const y=()=>c({at:m.currentTime,length:Number.isFinite(m.duration)?m.duration:0}),x=()=>a(!1);return m.addEventListener("timeupdate",y),m.addEventListener("loadedmetadata",y),m.addEventListener("ended",x),()=>{m.removeEventListener("timeupdate",y),m.removeEventListener("loadedmetadata",y),m.removeEventListener("ended",x)}},[]);const d=()=>{const m=s.current;m&&(r?m.pause():m.play().catch(()=>a(!1)),a(!r))},p=r||o.at>0?o.at:o.length,f=o.length?Math.min(1,o.at/o.length):0;return t.jsxs("div",{className:"cvoice-w",children:[t.jsxs("div",{className:"cvoice",children:[t.jsx("button",{className:"cplay",onClick:d,"aria-label":r?"Pause the voice note":"Play the voice note",children:r?t.jsx(Qc,{size:15,fill:"currentColor"}):t.jsx(Li,{size:15,fill:"currentColor"})}),t.jsx("div",{className:"cwave","aria-hidden":"true",children:u.map((m,y)=>t.jsx("i",{style:{height:m},className:y/u.length<f?"on":""},y))}),t.jsx("span",{className:"cvt",children:OT(p)}),t.jsx("audio",{ref:s,src:pn(e,n),preload:"metadata"})]}),t.jsx(Gv,{ticket:e,file:n})]})}function OT(e){const n=Math.max(0,Math.round(e));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function Hf({doc:e,onClose:n}){const{toast:s}=_e(),r=pn(e.ticket,e.file),a=Pe({queryKey:["doc",e.ticket,e.file],queryFn:async()=>{const u=await fetch(r);if(!u.ok)throw new Error("The file could not be read.");return u.text()},enabled:e.kind==="md"}),o=Qv(e.file),c=()=>void navigator.clipboard?.writeText(a.data??"").then(()=>s("Document copied"));return t.jsxs("section",{className:"cdoc","aria-label":vs(e.file),children:[t.jsxs("div",{className:"cdoc-h",children:[t.jsx("span",{className:`cfic sm ${o.cls}`,children:o.label}),t.jsxs("div",{className:"grow",children:[t.jsx("div",{className:"cfname",children:vs(e.file)}),t.jsx("div",{className:"cfmeta",children:e.from??(e.kind==="md"?"Markdown":"PDF")})]}),e.kind==="md"&&t.jsx("button",{className:"btn sm",onClick:c,disabled:!a.data,children:"Copy"}),e.kind==="pdf"&&t.jsx("a",{className:"btn sm",href:r,target:"_blank",rel:"noreferrer",children:"Open in a tab"}),t.jsx("button",{className:"iconbtn",onClick:n,"aria-label":"Close the document",children:t.jsx(Ze,{size:16})})]}),e.kind==="md"?t.jsx("div",{className:"cdoc-b",children:a.isError?t.jsx("p",{className:"note",children:"The file could not be read."}):a.data?t.jsx(co,{text:a.data,ticket:e.ticket}):t.jsx("p",{className:"note",children:"Loading…"})}):t.jsx("iframe",{className:"cdoc-pdf",src:r,title:vs(e.file)})]})}function Zv(e){const n=[],s=new Map;for(const{at:r,update:a}of e)switch(a.sessionUpdate){case"user_message_chunk":{const o=a.content.type==="text"&&a.content._meta?.squadKit?.from==="claude-code"?"claude-code":"squad-kit";n.push({kind:"message",from:o,content:a.content,at:r});break}case"agent_message_chunk":n.push({kind:"message",from:"agent",content:a.content,at:r});break;case"agent_thought_chunk":n.push({kind:"message",from:"thought",content:a.content,at:r});break;case"plan":n.push({kind:"plan",entries:a.entries,at:r});break;case"tool_call":{const o={kind:"tool",id:a.toolCallId,title:a.title,toolKind:a.kind??"other",status:a.status??"in_progress",content:[...a.content??[]],command:a.rawInput?.command,at:r};s.set(a.toolCallId,o),n.push(o);break}case"tool_call_update":{const o=s.get(a.toolCallId);if(!o)break;a.status&&(o.status=a.status),a.title&&(o.title=a.title),a.kind&&(o.toolKind=a.kind),a.rawInput?.command&&(o.command=a.rawInput.command),a.content&&(o.content=[...a.content]),a._meta?.squadKit?.blocked?.length&&(o.blocked=a._meta.squadKit.blocked);break}}for(const r of s.values())HT(r);return n}const qT=/^(StructuredOutput|Gave squad-kit its answer|Handed in its answer)$/,DT=/^structured output provided successfully\.?$/i,cy=/User refused permission to run tool|^Permission denied: |haven't granted it yet/i;function Bh(e){return e.type==="content"&&e.content.type==="text"?e.content.text.trim():""}function BT(e){return e==="execute"?"Skipped a command this step may not run":e==="edit"||e==="delete"||e==="move"?"Skipped a change this step may not make":"Skipped something this step may not do"}const UT={bash:"Ran a command",terminal:"Ran a command",read:"Read a file",write:"Wrote a file",edit:"Changed a file",multiedit:"Changed a file",notebookedit:"Changed a notebook",glob:"Looked for files",grep:"Searched the code",ls:"Listed a folder",todowrite:"Updated its plan",task:"Asked a helper",agent:"Asked a helper",webfetch:"Opened a web page",fetch:"Opened a web page",websearch:"Searched the web","web search":"Searched the web",enterplanmode:"Planned its work",exitplanmode:"Planned its work","exited plan mode":"Planned its work","approve plan":"Planned its work","unknown tool":"Used a tool"};function WT(e){const n=e.trim(),s=UT[n.toLowerCase()];if(s)return s;const r=/^mcp__([^_]+(?:_[^_]+)*)__(.+)$/.exec(n);return r?`Used ${r[2].replace(/_/g," ")} from ${r[1].replace(/_/g," ")}`:/^[A-Z][a-z]+(?:[A-Z][a-z]+)+$/.test(n)?`Used ${n.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()}`:null}function HT(e){if(e.toolKind==="execute"&&e.command&&e.title.trim()===e.command.trim()&&(e.title=`Ran ${e.command.split(`
|
|
601
|
+
`)[0].slice(0,80)}`),qT.test(e.title)){e.answer=!0,e.title="Handed in its answer",e.content=e.content.filter(s=>!DT.test(Bh(s)));return}if(e.status==="failed"&&e.content.some(s=>cy.test(Bh(s)))){e.skipped=!0,e.detail=e.title,e.title=BT(e.toolKind),e.content=e.content.filter(s=>!cy.test(Bh(s)));return}const n=WT(e.title);n&&(e.title=n)}function VT(e){return(e?.options??[]).map((n,s)=>{const r=n.do??(s===0?"retry":void 0);return{index:s,label:n.name,note:n.note,way:r,needs:r==="continue"?"reason":r==="yourself"?"fix":null,primary:s===0}})}function KT(e){return e?.title??"The squad stopped and needs you"}const uy={cursor:"Cursor",code:"VS Code"};function ou({t:e}){const n=fe(),r=Pe({queryKey:["editors"],queryFn:()=>Ee("/api/v1/editors"),staleTime:3e5}).data?.editors[0];return t.jsxs("button",{className:"btn sm",disabled:n.isPending||!e.baseCommit,title:e.baseCommit?void 0:"Nothing built yet",onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/open-editor`,body:r?{editor:r}:{},done:`Opened in ${r?uy[r]:"your editor"}`}),children:[t.jsx(es,{size:13})," Open in ",r?uy[r]:"editor"]})}function YT({t:e}){const n=Pe({queryKey:["changes",e.id,e.activity.length],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/changes`),refetchInterval:e.live?1e4:!1}),s=n.data,r=s?.files.reduce((o,c)=>o+c.added,0)??0,a=s?.files.reduce((o,c)=>o+c.removed,0)??0;return t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"changes-head",children:[t.jsxs("div",{children:[s&&s.files.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("b",{children:[s.files.length," ",s.files.length===1?"file":"files"," changed"]})," ",t.jsxs("span",{className:"add",children:["+",r]})," ",t.jsxs("span",{className:"del",children:["−",a]})]}):t.jsx("b",{children:"Changes"}),t.jsx("p",{className:"note",children:s?.from==="branch"?`Read from branch ${s.branch}. The copy was removed after the release.`:"The squad builds in its own copy of the code, so your folder stays yours. These changes reach your folder after Looks right."})]}),t.jsx("span",{className:"grow"}),t.jsx(ou,{t:e})]}),n.isLoading&&t.jsx("p",{className:"note",children:"Reading the changes…"}),n.error&&t.jsx("p",{className:"note",children:n.error.message}),s&&!s.files.length&&t.jsx("p",{className:"note",children:s.from==="none"?"Nothing built yet.":"No changes against main yet."}),s?.cut&&t.jsx("p",{className:"note",children:"This change is very large, so some files show only their name. Open it in your editor to see all of it."}),s?.files.map(o=>t.jsx(QT,{f:o},o.path)),t.jsxs("div",{className:"pills",style:{marginTop:12},children:[t.jsx(ie,{text:`squad changes ${e.id} --full`}),t.jsx(ie,{text:`squad open ${e.id}`})]})]})}function QT({f:e}){const n=e.patch?e.patch.split(`
|
|
602
|
+
`):[],[s,r]=C.useState(n.length<=300);return t.jsxs("div",{className:"conv-diff",children:[t.jsxs("button",{className:"conv-diff-head mono changes-file",onClick:()=>r(!s),children:[t.jsx("span",{className:`fstat ${e.status}`,children:e.status==="added"?"new":e.status==="deleted"?"deleted":e.status==="renamed"?"moved":"changed"}),t.jsx("span",{style:{overflowWrap:"anywhere",textAlign:"left"},children:e.path}),t.jsx("span",{className:"grow"}),e.binary?t.jsx("span",{children:"binary"}):t.jsxs("span",{children:[t.jsxs("span",{className:"add",children:["+",e.added]})," ",t.jsxs("span",{className:"del",children:["−",e.removed]})]})]}),s&&n.length>0&&t.jsx("pre",{children:n.map((a,o)=>a.startsWith("@@")?t.jsx("div",{className:"gap",children:a.replace(/^(@@[^@]*@@).*/,"$1")},o):t.jsxs("div",{className:a.startsWith("+")?"add":a.startsWith("-")?"del":"same",children:[t.jsx("span",{className:"sign",children:a.startsWith("+")?"+":a.startsWith("-")?"−":" "}),a.slice(1)||" "]},o))})]})}function lu({ticket:e,app:n,small:s,label:r="Report a problem"}){return t.jsxs("button",{className:`btn ${s?"sm":""}`,onClick:()=>Gc.open({...e?{ticket:e}:{},...n?{app:n}:{}}),children:[t.jsx(df,{size:s?13:14})," ",r]})}function GT(){const e=C6();return e?t.jsx(XT,{ask:e,onClose:Gc.close},`${e.ticket??""}${e.app?"app":""}`):null}function ZT(e){return/[\\/]Downloads$/.test(e)?" in your Downloads folder":""}function XT({ask:e,onClose:n}){const{toast:s}=_e(),[r,a]=C.useState(null),[o,c]=C.useState(null),[u,d]=C.useState(""),[p,f]=C.useState(!1),[m,y]=C.useState(null),x=e.app?null:hn,v=new URLSearchParams({...x?{project:x}:{},...x&&e.ticket?{ticket:e.ticket}:{}}).toString();C.useEffect(()=>{let w=!0;return Ee(`/api/v1/app/report${v?`?${v}`:""}`).then(S=>w&&a(S)).catch(S=>w&&c(S.message)),()=>{w=!1}},[v]);const k=async()=>{f(!0),c(null);try{y(await wt("/api/v1/app/report","POST",{...x?{project:x}:{},...x&&e.ticket?{ticket:e.ticket}:{},...u.trim()?{note:u}:{}}))}catch(w){c(w instanceof Error?w.message:String(w))}finally{f(!1)}},N=w=>{const S=navigator.clipboard?.writeText(w);if(!S)return s("Could not copy. Select the text instead.","err");S.then(()=>s("Copied where the file is"),()=>s("Could not copy. Select the text instead.","err"))};return m?.file?t.jsxs(We,{title:"Report saved",onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",onClick:n,children:[t.jsx(xe,{size:15,strokeWidth:2.5})," Done"]}),t.jsxs("button",{className:"btn",onClick:()=>N(m.file),children:[t.jsx(lr,{size:14})," Copy where it is"]})]}),children:[t.jsxs("div",{className:"report-saved",role:"status",children:[t.jsx("span",{className:"report-ok",children:t.jsx(xe,{size:16,strokeWidth:2.6})}),t.jsxs("div",{children:[t.jsxs("b",{children:["Saved ",m.name,ZT(m.folder)]}),t.jsx("span",{className:"mono",children:m.file})]})]}),t.jsx("p",{className:"report-send",children:"Send this file to whoever helps you with squad-kit."}),t.jsx("p",{className:"note",children:"It holds no tokens or passwords. You can open it first to see what is inside: README.txt lists every file."})]}):t.jsxs(We,{title:"Report a problem",onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!r||p,onClick:()=>void k(),children:[p?t.jsx(gn,{size:15,className:"spin"}):t.jsx(df,{size:15})," ",r?`Save ${r.name}`:"Save the report"]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),r&&t.jsx(ie,{text:r.command})]}),children:[t.jsx("p",{children:"squad-kit saves one file you can send to your engineer or to squad-kit support."}),r?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The file holds"}),t.jsx("ul",{className:"safe-list",children:r.holds.map(w=>t.jsxs("li",{children:[t.jsx(xe,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),w]},w))}),t.jsxs("div",{className:"report-never",children:[t.jsx("b",{children:"Never included:"})," ",r.never.replace(/^Never included:\s*/,"")]})]}):!o&&t.jsx("p",{className:"note",children:"Looking at what the file will hold…"}),t.jsxs("div",{className:"field",style:{marginTop:14},children:[t.jsx("label",{htmlFor:"report-what",children:"What happened? (optional)"}),t.jsx("textarea",{id:"report-what",className:"waynote",rows:3,value:u,onChange:w=>d(w.target.value),placeholder:"For example: it stopped after I approved the design"})]}),o&&t.jsx("p",{className:"report-err",role:"alert",children:o})]})}function JT(){return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Something wrong?"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx(lu,{app:!0,small:!0}),t.jsx("span",{className:"note",children:"One file to send: squad-kit's log for the last 24 hours and the versions. Never your tokens or passwords."}),t.jsx(ie,{text:"squad report"}),t.jsx(ie,{text:"squad logs"})]})]})}function Vf({title:e,what:n,safe:s=[],ways:r,report:a,hint:o,calm:c,children:u}){return t.jsxs("div",{className:`drafterr errcard${c?" calm":""}`,role:"alert",children:[t.jsx("b",{className:"errcard-title",children:e}),t.jsx("div",{className:"errcard-what",children:n}),s.length>0&&t.jsx("ul",{className:"safe-list",children:s.map(d=>t.jsxs("li",{children:[t.jsx(xe,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),d]},d))}),t.jsx("div",{className:"errcard-lbl",children:"What you can do"}),t.jsxs("div",{className:"drafterr-ways",children:[r.map(d=>t.jsxs("button",{className:`btn ${d.primary?"pri":""}`,disabled:d.disabled,title:d.title,onClick:d.onClick,children:[d.icon,d.label]},d.label)),a!==!1&&t.jsx(lu,{...a??{}})]}),o&&t.jsx("div",{className:"errcard-hint",children:o}),u]})}function eA({t:e,extra:n}){const s=fe(),[r,a]=C.useState(null),[o,c]=C.useState(""),u=VT(e.stuck),d=(v,k,N)=>s.mutate({path:`/api/v1/tickets/${e.id}/decide`,body:{choice:v,...k},done:N}),p=u.find(v=>v.way==="retry"),f=r==="reason"||r==="fix"?u.find(v=>v.needs===r):void 0,m=r==="note"&&o.trim()?o.trim():"",y=u.map(v=>({label:v.label,title:v.note,primary:v.primary,disabled:s.isPending,icon:v.way==="retry"?t.jsx(Lr,{size:14}):v.way==="yourself"?t.jsx(ro,{size:14}):void 0,onClick:()=>{if(v.needs){a(r===v.needs?null:v.needs),c("");return}d(v.index,v.way==="retry"&&m?{note:m}:{},v.way==="retry"?"Trying again. The squad carries on.":"Decided. The squad carries on.")}})),x=f?`squad decide ${e.id} ${f.index+1}${f.needs==="reason"?` --reason ${Fe(o.trim()||"…")}`:""}`:`squad decide ${e.id}${p&&m?` ${p.index+1} --note ${Fe(m)}`:""}`;return t.jsxs("div",{className:"db",children:[t.jsx(Vf,{title:KT(e.stuck),calm:e.stuck?.kind==="no-tests"||e.stuck?.gate==="cap",what:e.stuck?.points?.length?t.jsxs(t.Fragment,{children:[e.stuck.question,t.jsx("ul",{className:"errcard-points",children:e.stuck.points.map(v=>t.jsx("li",{children:v},v))})]}):e.stuck?.question??"",safe:e.stuck?.safe??["Nothing was lost: the work so far is kept."],ways:y,report:{ticket:e.id},hint:t.jsxs(t.Fragment,{children:[p&&r!=="note"&&t.jsx("button",{className:"linkbtn",onClick:()=>a("note"),children:"Add a note for the squad first"}),e.stuck?.detail?" Engineers: the exact error is in the Developer tab.":""]})}),r==="note"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"A note for the squad (optional)"}),t.jsx("textarea",{className:"waynote",rows:2,value:o,onChange:v=>c(v.target.value),placeholder:"For example: the test server needs the VPN, it is on now"}),t.jsxs("p",{className:"note",style:{fontSize:12.5},children:["The squad reads it first when you press ",p?.label??"Try again","."]})]}),r==="reason"&&f&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Why continue anyway?"}),t.jsx("textarea",{className:"waynote",rows:2,value:o,onChange:v=>c(v.target.value),placeholder:"For example: the failing test is broken on main too, fixed in SK-160"}),t.jsx("p",{className:"note",style:{fontSize:12.5},children:"Only you can do this. Your reason shows on the ticket, the pull request and the release notes."}),t.jsx("div",{className:"errcard-confirm",children:t.jsxs("button",{className:"btn pri",disabled:!o.trim()||s.isPending,onClick:()=>d(f.index,{reason:o},"Decided. The squad carries on."),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," ",f.label]})})]}),r==="fix"&&f&&t.jsxs("div",{className:"stuckbox",style:{marginTop:12},children:[t.jsxs("p",{style:{margin:"0 0 8px"},children:["Open the ticket's copy, fix it, and save. Then press ",t.jsx("b",{children:"I fixed it"}),": the checks, review and proof run again."]}),t.jsxs("div",{className:"errcard-confirm",children:[t.jsx(ou,{t:e}),t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>d(f.index,{},"OK. The checks run again on your fix."),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," I fixed it, check again"]})]})]}),t.jsx("div",{className:"errcard-cmd",children:t.jsx(ie,{text:x})}),n]})}function tA({t:e}){const{toast:n}=_e();if(!e.stuck||e.waiting?.kind!=="stuck")return null;const s=e.stuck.detail??e.stuck.question,r=()=>{const a=navigator.clipboard?.writeText(s);if(!a)return n("Could not copy. Select the text instead.","err");a.then(()=>n("Copied the exact error"),()=>n("Could not copy. Select the text instead.","err"))};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The exact error"}),t.jsx("pre",{className:"exact-err",children:s}),t.jsxs("div",{className:"pills",style:{marginTop:8},children:[t.jsxs("button",{className:"btn sm",onClick:r,children:[t.jsx(lr,{size:13})," Copy"]}),t.jsx(lu,{ticket:e.id,small:!0}),t.jsx(ie,{text:"squad logs --tail"})]})]})}const dy=10*1024*1024;function uo(e){return new Promise((n,s)=>{const r=new FileReader;r.onload=()=>{const a=String(r.result);n({name:e.name,size:e.size,data:a.slice(a.indexOf(",")+1),...e.type.startsWith("image/")?{preview:a}:{}})},r.onerror=()=>s(new Error(`Could not read ${e.name}`)),r.readAsDataURL(e)})}function nA(e){const n=/\.(png|jpe?g|gif|webp)$/i.exec(e.name)?.[1]?.toLowerCase();return n?{preview:`data:image/${n==="jpg"?"jpeg":n};base64,${e.data}`}:{}}function Xv({onClose:e,onCreated:n}){const s=fe(),{toast:r}=_e(),[a,o]=C.useState("write"),[c,u]=C.useState(""),[d,p]=C.useState(null),[f,m]=C.useState(null),y=d?.status==="working",[x,v]=C.useState(null),[k,N]=C.useState(""),[w,S]=C.useState(""),[E,P]=C.useState("feature"),[B,T]=C.useState("normal"),[_,I]=C.useState("full"),[D,R]=C.useState(!1),[F,M]=C.useState(null),[J,U]=C.useState([]),[G,ue]=C.useState([]),[V,H]=C.useState([]),[ne,A]=C.useState(""),[O,ee]=C.useState([]),[z,me]=C.useState(""),[he,ke]=C.useState(""),[Te,Ae]=C.useState("annoying"),Ce=E==="bug",[qe,ct]=C.useState([]),Ot=async Q=>{const je=[...Q],Ie=je.find(ht=>ht.size>dy);Ie&&r(`${Ie.name} is larger than 10 MB.`,"err");const Ve=await Promise.all(je.filter(ht=>ht.size<=dy).map(uo)).catch(ht=>(r(ht.message,"err"),[]));ct(ht=>[...ht,...Ve].slice(0,10))},tn=qe.map(({name:Q,data:je})=>({name:Q,data:je})),Wn=Q=>{N(Q.title),S(Q.ask),Q.kind==="bug"&&A(Q.ask),P(Q.kind),T(Q.priority),Q.track&&(I(Q.track),M(Q.track)),U(Q.criteria),ue(Q.rules),H(Q.edgeCases),v(Q.gaps),o("write")};C.useEffect(()=>{let Q=!0;return Ee("/api/v1/tickets/draft/current").then(async({draft:je})=>{if(!(!Q||!je)&&(u(je.text),o("paste"),p(je),je.files.length)){const Ie=await Ee(`/api/v1/tickets/draft/${je.id}/files`).catch(()=>({files:[]}));Q&&ct(Ie.files.map((Ve,ht)=>({...Ve,size:je.files[ht]?.size??0,...nA(Ve)})))}}).catch(()=>{}),()=>{Q=!1}},[]);const qt=Pe({queryKey:["ticket-draft",d?.id],queryFn:()=>Ee(`/api/v1/tickets/draft/${d.id}`),enabled:y,refetchInterval:1e3,retry:!1});C.useEffect(()=>{qt.data&&d?.status==="working"&&qt.data.id===d.id&&p(qt.data)},[qt.data]),C.useEffect(()=>{qt.isError&&y&&p(Q=>Q&&{...Q,status:"failed",error:"squad-kit lost this draft, maybe because it restarted."})},[qt.isError]);const Pn=C.useRef(null);C.useEffect(()=>{d?.status==="done"&&d.draft&&Pn.current!==d.id&&(Pn.current=d.id,Wn(d.draft))},[d]);const xn=async()=>{m(null);try{p(await wt("/api/v1/tickets/draft","POST",{text:c,files:tn}))}catch(Q){m(Q instanceof Error?Q.message:String(Q))}},nn=async()=>{if(d)try{p(await wt(`/api/v1/tickets/draft/${d.id}/cancel`,"POST"))}catch{p({...d,status:"cancelled"})}},Dt=()=>{d&&wt(`/api/v1/tickets/draft/${d.id}/dismiss`,"POST").catch(()=>{}),p(null)},mt=()=>{Dt(),m(null),w.trim()||S(c.trim()),ne.trim()||A(c.trim()),o("write")},yn=()=>{Dt(),v(null),M(null);for(const Q of[N,S,A,me,ke])Q("");for(const Q of[U,ue,H,ee])Q([]);o("paste")},Rn=O.filter(Q=>Q.trim()),Rs=[ne.trim()&&`What happens:
|
|
603
|
+
${ne.trim()}`,Rn.length&&`Steps to see it:
|
|
604
|
+
${Rn.map((Q,je)=>`${je+1}. ${Q.trim()}`).join(`
|
|
605
|
+
`)}`,z.trim()&&`What should happen:
|
|
606
|
+
${z.trim()}`,he.trim()&&`Where: ${he.trim()}`].filter(Boolean).join(`
|
|
607
|
+
|
|
608
|
+
`),us=Ce?{title:k,ask:Rs,kind:E,severity:Te,priority:Te==="stops-work"?"high":Te==="small"?"low":"normal",track:_,files:tn,talkFirst:D&&_==="full"}:{title:k,ask:w,kind:E,track:_,priority:B,criteria:J,rules:G,edgeCases:V,files:tn,talkFirst:D&&_==="full"},Ue=()=>s.mutate({path:"/api/v1/tickets",body:us},{onSuccess:Q=>{Dt(),n(Q),e()}}),X=!!f||d?.status==="failed"||d?.status==="cancelled",le=a==="paste"?`squad new --from ${Fe(c.trim().split(`
|
|
609
|
+
`)[0]?.slice(0,40)||"your message")}`:[`squad new ${Fe(k.trim()||"Your title")}`,Ce?`--bug --severity ${Te}`:"",Ce&&ne.trim()?`--ask ${Fe(ne.trim())}`:"",_==="express"?"--express":"",D&&_==="full"?"--talk":"",...Ce?[]:J.filter(Q=>Q.trim()).map(Q=>`--criteria ${Fe(Q)}`),...Ce?[]:G.filter(Q=>Q.trim()).map(Q=>`--rule ${Fe(Q)}`),...Ce?[]:V.filter(Q=>Q.trim()).map(Q=>`--edge ${Fe(Q)}`),...qe.map(Q=>`--attach ${Fe(Q.name)}`)].filter(Boolean).join(" ");return t.jsxs(We,{title:"New ticket",wide:!0,onClose:e,icon:t.jsx("span",{className:"glyph",children:t.jsx(Nt,{size:15})}),footer:t.jsxs(t.Fragment,{children:[a==="paste"?X?null:t.jsxs("button",{className:"btn pri",disabled:!c.trim()&&!qe.length||y,onClick:()=>void xn(),children:[y?t.jsx(gn,{size:15,className:"spin"}):t.jsx(xh,{size:15})," ",y?"Filling in…":"Fill in the ticket"]}):t.jsxs("button",{className:"btn pri",disabled:!k.trim()||s.isPending,onClick:Ue,children:[t.jsx(Nt,{size:15})," Create ticket"]}),t.jsx("button",{className:"btn",onClick:y?()=>void nn():e,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:le})]}),children:[t.jsxs("div",{className:"seg",style:{marginBottom:14,width:"fit-content"},children:[t.jsx("button",{className:a==="write"?"on":"",disabled:y,title:y?"Press Cancel first to write it yourself":void 0,onClick:()=>o("write"),children:"Write it"}),t.jsxs("button",{className:a==="paste"?"on":"",onClick:()=>o("paste"),children:[t.jsx(xh,{size:13,style:{verticalAlign:"-2px",marginRight:5}}),"From an idea or message"]})]}),a==="paste"?t.jsxs(t.Fragment,{children:[!y&&t.jsx("p",{children:"Paste an idea, a WhatsApp message or one line of business. Add screenshots if you have them. The Analyst fills in the ticket, and you check every field before it is created."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-paste",children:"The idea or message"}),t.jsx("textarea",{id:"nt-paste",className:"textarea",style:{minHeight:y?70:150},autoFocus:!0,readOnly:y,value:c,onChange:Q=>u(Q.target.value),onPaste:Q=>{Q.clipboardData.files.length&&(Q.preventDefault(),Ot(Q.clipboardData.files))},placeholder:"For example: the manager says clerks should not book more than 3 appointments a day for the same person"})]}),y&&d?t.jsxs(t.Fragment,{children:[qe.length>0&&t.jsxs("p",{className:"note",style:{margin:"-6px 0 12px"},children:["With ",qe.map(Q=>Q.name).join(", ")]}),t.jsx(iA,{job:d})]}):t.jsx(Wh,{files:qe,onAdd:Ot,onRemove:Q=>ct(je=>je.filter((Ie,Ve)=>Ve!==Q))}),X&&t.jsx(aA,{error:f??(d?.status==="failed"?d.error??"Something went wrong.":null),onRetry:()=>void xn(),onWrite:mt})]}):t.jsxs(t.Fragment,{children:[x?t.jsxs("div",{className:"drafted",children:[t.jsxs("b",{children:[t.jsx(xh,{size:13})," The Analyst filled this in from your message."]})," Check it and change anything."," ",t.jsx("button",{className:"linkbtn",onClick:yn,children:"Discard this draft"}),x.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{marginTop:6},children:"Still unclear, so the Analyst will ask you after you create it:"}),t.jsx("ul",{children:x.map((Q,je)=>t.jsx("li",{children:Q},je))})]})]}):t.jsx("p",{children:Ce?"Say what goes wrong and how to see it. The squad finds the cause and fixes it.":"Write it in plain words. Add what you already know; the Analyst asks you about the rest."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"Kind"}),t.jsx("div",{className:"sevs",children:["feature","bug"].map(Q=>t.jsxs("button",{className:`choice ${E===Q?"on":""}`,onClick:()=>P(Q),children:[t.jsx("span",{className:"rd"}),Q==="feature"?"New feature":"Bug"]},Q))})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-title",children:"Title"}),t.jsx("input",{id:"nt-title",className:"input",autoFocus:!0,value:k,onChange:Q=>N(Q.target.value),placeholder:Ce?"For example: A price written as 1,500 is refused":"For example: Show hearing time in local time"})]}),Ce?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-what",children:"What happens"}),t.jsx("textarea",{id:"nt-what",className:"textarea",value:ne,onChange:Q=>A(Q.target.value),placeholder:"For example: the form says the price is not valid."})]}),t.jsx(Jl,{label:"Steps to see it",hint:"One step per line, for example: Open Services and add a service.",items:O,onChange:ee,add:"Add a step"}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-expected",children:"What should happen"}),t.jsx("textarea",{id:"nt-expected",className:"textarea",value:z,onChange:Q=>me(Q.target.value),placeholder:"For example: the price is saved as 1,500 SAR."})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-where",children:"Where"}),t.jsx("input",{id:"nt-where",className:"input",value:he,onChange:Q=>ke(Q.target.value),placeholder:"The page or link, for example: Setup, Services"})]}),t.jsx(Wh,{files:qe,onAdd:Ot,onRemove:Q=>ct(je=>je.filter((Ie,Ve)=>Ve!==Q))}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"How bad is it?"}),t.jsx("div",{className:"sevs",children:Jv.map(Q=>t.jsxs("button",{className:`choice ${Te===Q.value?"on":""}`,onClick:()=>Ae(Q.value),children:[t.jsx("span",{className:"rd"}),Q.label]},Q.value))})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"nt-ask",children:"What do you want?"}),t.jsx("textarea",{id:"nt-ask",className:"textarea",value:w,onChange:Q=>S(Q.target.value),placeholder:"Who needs it, and why. One or two sentences is enough."})]}),t.jsx(Jl,{label:"Acceptance criteria",hint:"Each one is something you can check, for example: The clerk sees the time in their own city.",items:J,onChange:U,add:"Add a criterion"}),t.jsx(Jl,{label:"Business rules",hint:"Limits and who may do what, for example: Only a team lead can reassign a case.",items:G,onChange:ue,add:"Add a rule"}),t.jsx(Jl,{label:"Edge cases",hint:"Unusual cases to handle, for example: The person has no cases yet.",items:V,onChange:H,add:"Add an edge case"}),t.jsx(Wh,{files:qe,onAdd:Ot,onRemove:Q=>ct(je=>je.filter((Ie,Ve)=>Ve!==Q))}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"Priority"}),t.jsx("div",{className:"sevs",children:["high","normal","low"].map(Q=>t.jsxs("button",{className:`choice ${B===Q?"on":""}`,onClick:()=>T(Q),children:[t.jsx("span",{className:"rd"}),Q==="high"?"High":Q==="normal"?"Normal":"Low"]},Q))})]})]}),t.jsxs("div",{className:"field",children:[t.jsxs("label",{children:["Track",F&&t.jsxs("span",{className:"note",style:{marginLeft:8,fontWeight:400},children:["The Analyst suggests ",F==="express"?"Express":"Full"]})]}),t.jsx("div",{className:"tracks",children:oA.map(Q=>t.jsxs("button",{className:`opt2 ${_===Q.id?"pick":""}`,onClick:()=>I(Q.id),children:[t.jsxs("b",{children:[Q.name,_===Q.id&&t.jsxs("span",{children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Chosen"]})]}),Q.note]},Q.id))})]}),_==="full"&&t.jsxs("label",{className:"talkfirst",children:[t.jsx("input",{type:"checkbox",checked:D,onChange:Q=>R(Q.target.checked)}),t.jsxs("span",{children:[t.jsx("b",{children:"Talk it through first."})," The Analyst opens a chat instead of sending questions. The spec is written from your talk when you say so."]})]})]})]})}const sA=60;function rA(e){const[n,s]=C.useState(Date.now());return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(r)},[e]),n}function iA({job:e}){const n=rA(!0),s=Math.max(0,Math.floor((n-Date.parse(e.startedAt))/1e3)),a=["read","look","write"].indexOf(e.step),o=d=>d<a?"done":d===a?"now":"todo",c=e.looked.slice(-3),u=e.looked.length-c.length;return t.jsxs("div",{className:"drafting",role:"status","aria-live":"polite",children:[t.jsxs("div",{className:"drafting-head",children:[t.jsx("b",{children:"The Analyst is filling in your ticket"}),t.jsx("span",{className:"grow"}),t.jsxs("span",{className:"mono drafting-clock","aria-label":`${s} seconds so far`,children:[Math.floor(s/60),":",String(s%60).padStart(2,"0")]})]}),t.jsx(Uh,{state:o(0),children:"Read your message"}),t.jsxs(Uh,{state:o(1),children:["Looking at the project",c.length>0&&t.jsxs("span",{className:"note",children:[": ",c.join(", "),u>0?` and ${u} more`:""]})]}),t.jsx(Uh,{state:o(2),children:"Writing the ticket for you to check"}),t.jsxs("p",{className:"note",children:[s>2*sA?"This one is taking longer than usual. You can wait, or press Cancel.":"Usually under a minute."," You can close this window: the draft waits for you under New ticket."]})]})}function Uh({state:e,children:n}){return t.jsxs("div",{className:`dstep ${e}`,children:[t.jsx("span",{className:"dot","aria-hidden":"true",children:e==="done"?t.jsx(xe,{size:12,strokeWidth:3}):e==="now"?t.jsx(gn,{size:12,className:"spin"}):null}),t.jsxs("span",{children:[n,t.jsx("span",{className:"sr-only",children:e==="done"?" (done)":e==="now"?" (now)":""})]})]})}function aA({error:e,onRetry:n,onWrite:s}){return e?t.jsx(Vf,{title:"The Analyst could not finish",what:e,safe:["Your text and files are kept.","No ticket was made yet."],ways:[{label:"Try again",primary:!0,icon:t.jsx(Lr,{size:14}),onClick:n},{label:"Write it myself with what I typed",icon:t.jsx(ro,{size:14}),onClick:s}]}):t.jsxs("div",{className:"drafterr calm",role:"status",children:[t.jsx("b",{children:"You stopped the Analyst"}),t.jsx("div",{children:"Nothing was saved. Your text is kept."}),t.jsxs("div",{className:"drafterr-ways",children:[t.jsxs("button",{className:"btn pri",onClick:n,children:[t.jsx(Lr,{size:14})," Try again"]}),t.jsxs("button",{className:"btn",onClick:s,children:[t.jsx(ro,{size:14})," Write it myself with what I typed"]})]})]})}const oA=[{id:"full",name:"Full",note:"Every step. The Analyst asks questions and you approve the plan."},{id:"express",name:"Express",note:"For a typo or a small urgent fix. No questions, the plan is approved on its own. Build, checks, review and your Looks right still run."}];function Jl({label:e,hint:n,items:s,onChange:r,add:a}){const o=(c,u)=>r(s.map((d,p)=>p===c?u:d));return t.jsxs("div",{className:"field",children:[t.jsx("label",{children:e}),s.length===0&&t.jsx("p",{className:"note",style:{margin:"0 0 6px"},children:n}),s.map((c,u)=>t.jsxs("div",{className:"listrow",children:[t.jsx("span",{className:"mono note",children:u+1}),t.jsx("input",{className:"input",value:c,autoFocus:c===""&&u===s.length-1,onChange:d=>o(u,d.target.value),onKeyDown:d=>{d.key==="Enter"&&u===s.length-1&&c.trim()&&r([...s,""])},"aria-label":`${e} ${u+1}`}),t.jsx("button",{className:"iconbtn",onClick:()=>r(s.filter((d,p)=>p!==u)),"aria-label":`Remove ${e.toLowerCase()} ${u+1}`,children:t.jsx(Ze,{size:14})})]},u)),t.jsxs("button",{className:"btn sm",onClick:()=>r([...s,""]),children:[t.jsx(Nt,{size:13})," ",a]})]})}const lA=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba|mp4|mov|m4v|webm)$/i;function Wh({files:e,onAdd:n,onRemove:s}){const[r,a]=C.useState(!1),o=e.some(u=>lA.test(u.name)),c=Pe({queryKey:["speech"],queryFn:()=>Ee("/api/v1/speech"),enabled:o});return t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"Files"}),t.jsxs("label",{className:`dropzone ${r?"over":""}`,onDragOver:u=>{u.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:u=>{u.preventDefault(),a(!1),u.dataTransfer.files.length&&n(u.dataTransfer.files)},onPaste:u=>u.clipboardData.files.length&&n(u.clipboardData.files),children:[t.jsx(wc,{size:15})," Drop screenshots, documents, voice or video notes here, or click to pick",t.jsx("input",{type:"file",multiple:!0,hidden:!0,onChange:u=>{u.target.files?.length&&n(u.target.files),u.target.value=""}})]}),e.length>0&&t.jsx("div",{className:"picked",children:e.map((u,d)=>t.jsxs("span",{className:"pickedfile",children:[u.preview?t.jsx("img",{src:u.preview,alt:""}):t.jsx(wc,{size:13}),t.jsx("span",{className:"mono",children:u.name}),t.jsx("span",{className:"note",children:u.size<1024*1024?`${Math.max(1,Math.round(u.size/1024))} KB`:`${(u.size/1024/1024).toFixed(1)} MB`}),t.jsx("button",{className:"iconbtn",onClick:()=>s(d),"aria-label":`Remove ${u.name}`,children:t.jsx(Ze,{size:13})})]},`${u.name}-${d}`))}),o&&c.data&&t.jsx("p",{className:"note",style:{marginTop:6},children:c.data.hasKey?"squad-kit writes out voice and video notes with Munsit, and takes pictures of the screen in videos, so every agent knows what was said.":"Add a Munsit key in Settings so the squad can listen to voice and video notes. Without it they stay attached, unheard."})]})}function cA({onClose:e,onCreated:n}){const s=fe(),[r,a]=C.useState("AB#"),o=()=>s.mutate({path:"/api/v1/pull",body:{ref:r}},{onSuccess:c=>{n(c),e()}});return t.jsxs(We,{title:"Pull from Azure DevOps",onClose:e,icon:t.jsx("span",{className:"glyph",children:t.jsx(ss,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:r.replace(/\D/g,"").length===0||s.isPending,onClick:o,children:[t.jsx(ss,{size:15})," Pull ticket"]}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad pull ${r.trim()?qi(r.trim()):"AB#4133"}`})]}),children:[t.jsx("p",{children:"Bring a work item in as a ticket, with its description and attachments."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"pull-ref",children:"Work item"}),t.jsx("input",{id:"pull-ref",className:"input mono",autoFocus:!0,value:r,onChange:c=>a(c.target.value),onKeyDown:c=>c.key==="Enter"&&o()})]})]})}const Jv=[{value:"stops-work",label:"Stops work"},{value:"annoying",label:"Annoying"},{value:"small",label:"Small"}];function Kf({onClose:e,foundIn:n}){const s=fe(),[r,a]=C.useState(""),[o,c]=C.useState(""),[u,d]=C.useState(""),[p,f]=C.useState("annoying"),m=()=>s.mutate({path:"/api/v1/bugs",body:{what:r,how:o,expected:u,severity:p,foundIn:n},done:"Bug reported. Triage is sorting it."},{onSuccess:e});return t.jsxs(We,{title:"Report a bug",onClose:e,icon:t.jsx("span",{className:"glyph",style:{background:"var(--bug-soft)",color:"var(--bug)"},children:t.jsx(Cs,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!r.trim()||s.isPending,onClick:m,children:[t.jsx(Cs,{size:15})," Report bug"]}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad bug ${Fe(r.trim()||"What happened")}${n?` --in ${n}`:""}`})]}),children:[t.jsxs("p",{children:["It becomes a ticket linked to ",n??"the latest release",", and goes around the same loop. The Tester adds a check so it can't come back."]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"bug-what",children:"What happened?"}),t.jsx("input",{id:"bug-what",className:"input",autoFocus:!0,value:r,onChange:y=>a(y.target.value),placeholder:"For example: Table text is hard to read in dark mode"})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"bug-how",children:"How can we see it?"}),t.jsx("input",{id:"bug-how",className:"input",value:o,onChange:y=>c(y.target.value),placeholder:"The steps, in a line"})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"bug-exp",children:"What did you expect?"}),t.jsx("input",{id:"bug-exp",className:"input",value:u,onChange:y=>d(y.target.value)})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{children:"How bad is it?"}),t.jsx("div",{className:"sevs",children:Jv.map(y=>t.jsxs("button",{className:`choice ${p===y.value?"on":""}`,onClick:()=>f(y.value),children:[t.jsx("span",{className:"rd"}),y.label]},y.value))})]})]})}function uA({release:e,demo:n,onClose:s}){const{toast:r}=_e(),a=()=>void navigator.clipboard?.writeText(e.whatsappDraft??"").then(()=>r("Message copied. Send it from WhatsApp.")),o=[e.addons.changelog&&"Changelog updated",e.addons.tag&&`Tagged ${e.version} in git`,e.addons.pipeline&&"Azure pipeline started"].filter(Boolean);return t.jsxs(We,{title:e.unpushed?.length?`${e.version} is made, but not pushed yet`:`${e.version} is released`,onClose:s,icon:t.jsx("span",{className:"glyph",children:t.jsx(Da,{size:15})}),footer:t.jsxs(t.Fragment,{children:[e.addons.whatsapp&&t.jsxs("button",{className:"btn pri",onClick:a,children:[t.jsx(lr,{size:15})," Copy message"]}),t.jsx("button",{className:"btn",onClick:s,children:"Done"})]}),children:[t.jsxs("div",{className:"donelist",children:[e.unpushed?.length?t.jsxs("div",{style:{color:"var(--you-ink)"},children:[t.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," The push failed, so its tickets stay open. Press Push again on the release once the remote is reachable."]}):t.jsxs("div",{children:[t.jsx(xe,{size:16})," ",e.tickets.length," tickets released"]}),e.log?e.log.map(c=>t.jsxs("div",{style:c.ok?void 0:{color:"var(--you-ink)"},children:[c.ok?t.jsx(xe,{size:16}):t.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," ",c.text]},c.text)):o.map(c=>t.jsxs("div",{children:[t.jsx(xe,{size:16})," ",c]},c))]}),n&&!e.log&&t.jsx("p",{className:"note",style:{marginBottom:12},children:"Demo board: these release steps are shown, not run."}),e.addons.whatsapp&&e.whatsappDraft&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",style:{marginTop:4},children:"A WhatsApp note for your manager. Copy it and send it yourself."}),t.jsx("div",{className:"wa",children:e.whatsappDraft})]})]})}function Es(e){return e.stage==="release"||e.stage==="done"}function cu(e){return Es(e)||!!e.specApproved||["implement","test","review"].includes(e.stage)}function dA(e){return e.part==="story"?"The story":e.index===void 0?"New done when":`Done when ${e.index+1}`}function qp(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`:String(e[0]??"")}function hy({parts:e}){return t.jsx("div",{className:"changeparts",children:e.map((n,s)=>t.jsxs("div",{className:"chrow",children:[t.jsx("div",{className:"chlabel",children:dA(n)}),t.jsx("div",{className:n.before?"chold":"chold empty",children:n.before||t.jsx("i",{children:"new"})}),t.jsx("div",{className:"chnew",children:n.after||t.jsx("i",{children:"removed"})})]},s))})}const py={same:"Stays",changed:"Redone",new:"New"};function hA({c:e}){const n=e.design,s=n.before.filter(a=>!n.steps.some(o=>o.title===a)),r=n.steps.flatMap((a,o)=>a.change==="same"?[o+1]:[]);return t.jsxs("div",{className:"changeparts",children:[r.length>0&&t.jsxs("div",{className:"chrow",children:[t.jsxs("div",{className:"chlabel",children:[r.length===1?"Step":"Steps"," ",qp(r)]}),t.jsx("div",{children:t.jsx("span",{className:"pill wait",children:py.same})}),t.jsx("div",{className:"chnew note",children:"Built already, as they are."})]}),n.steps.map((a,o)=>a.change==="same"?null:t.jsxs("div",{className:"chrow",children:[t.jsxs("div",{className:"chlabel",children:["Step ",o+1]}),t.jsx("div",{children:t.jsx("span",{className:"pill you",children:py[a.change]})}),t.jsx("div",{className:"chnew",children:a.title})]},o)),s.map(a=>t.jsxs("div",{className:"chrow",children:[t.jsx("div",{className:"chlabel",children:"Dropped"}),t.jsx("div",{}),t.jsx("div",{className:"chold",children:a})]},a))]})}function pA(e,n){const s=!!e.sessions?.build;return n.size==="big"?s?"Approve, and the Builder pauses after its current step. The Architect updates the design and you approve that too. Then the Builder redoes only the steps the change touches.":e.steps?"Approve, and the spec says it now. The Architect updates the design, and you approve it as usual.":"Approve, and the spec says it now. The Architect designs from the new spec.":s?"Approve, and the spec says it now. The Builder gets it at the end of its current step; the work does not stop.":"Approve, and the spec says it now. The Builder builds from the new spec."}function fA({t:e}){const n=fe(),[s,r]=C.useState(!1),[a,o]=C.useState(!1),[c,u]=C.useState(""),d=Ur(e);if(!d)return null;const p=d.status==="approved"||d.status==="designing",f=d.status==="writing"||d.status==="designing"||d.status==="building",m=(e.steps??[]).flatMap((v,k)=>v.status==="done"?[]:[k+1]),y={writing:`Change ${d.id}: the Analyst is writing it into the spec`,failed:`Change ${d.id}: the Analyst could not write it`,proposed:`Change ${d.id} to the spec`,approved:`Change ${d.id} is approved`,designing:`Change ${d.id}: the Architect is updating the design`,"design-ready":`The design update for change ${d.id}`,building:d.size==="big"?`Change ${d.id}: the Builder is redoing ${m.length===1?"step":"steps"} ${qp(m)}`:`Change ${d.id}: the Builder is making it`,done:"",declined:""}[d.status],x=(v,k,N)=>n.mutate({path:`/api/v1/tickets/${e.id}/spec-change/${v}`,body:N,done:k},{onSuccess:()=>{r(!1),o(!1)}});return t.jsx("div",{className:"outdated","aria-label":"Change to the spec",children:t.jsxs("div",{className:"outdated-item changecard",children:[t.jsxs("div",{className:"outdated-head",children:[t.jsx("span",{className:"ic",children:f?t.jsx(gn,{size:15,className:"spin"}):d.status==="failed"?t.jsx(Oi,{size:15}):t.jsx(rs,{size:15})}),t.jsx("b",{children:y}),d.size&&t.jsx("span",{className:`pill ${d.size==="big"?"you":"wait"}`,children:d.size==="big"?"Big change":"Small change"})]}),t.jsxs("div",{className:"changebody",children:[d.summary?t.jsx("p",{children:d.summary}):t.jsxs("p",{children:["“",d.ask,"”"]}),d.status==="writing"&&t.jsx("p",{className:"note",children:"The work goes on meanwhile. Nothing changes until you approve it."}),d.status==="failed"&&t.jsx("p",{className:"note",children:d.error}),d.why&&(d.status==="proposed"||d.status==="approved")&&t.jsx("p",{className:"note",children:d.why}),d.status==="proposed"&&d.parts&&t.jsx(hy,{parts:d.parts}),d.status==="proposed"&&t.jsx("p",{className:"note",children:pA(e,d)}),d.status==="approved"&&t.jsx("p",{className:"note",children:d.size==="big"?"The Builder finishes its current step, then pauses while the Architect updates the design.":"It reaches the Builder at the end of its current step. The work goes on."}),d.status==="designing"&&t.jsx("p",{className:"note",children:"The Builder paused after its step. The design update comes to you next."}),d.status==="design-ready"&&d.design&&t.jsxs(t.Fragment,{children:[d.design.summary&&t.jsx("p",{children:d.design.summary}),t.jsx(hA,{c:d}),d.parts&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",children:"And the spec, as you approved it:"}),t.jsx(hy,{parts:d.parts})]}),t.jsxs("p",{className:"note",children:["Approve, and the Builder redoes only ",(()=>{const v=d.design.steps.flatMap((k,N)=>k.change==="same"?[]:[N+1]);return v.length?`${v.length===1?"step":"steps"} ${qp(v)}`:"what changed"})(),". Decline, and the spec stays as it was; the Builder carries on."]})]})]}),a?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:v=>u(v.target.value),placeholder:"Why take it back? (optional, it stays in the spec's record)"}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>x("withdraw","Withdrawn. The spec is back to how it was.",{reason:c}),children:"Withdraw"}),t.jsx("button",{className:"btn sm quiet",onClick:()=>o(!1),children:"Cancel"})]}):p?t.jsxs("div",{className:"row",children:[t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>o(!0),children:"Withdraw change"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad propose ${e.id} --withdraw`})]}):s?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:v=>u(v.target.value),placeholder:"Why not? (optional, it stays in the spec's record)"}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>x("decline","Declined. Nothing changes.",{reason:c}),children:"Decline"}),t.jsx("button",{className:"btn sm quiet",onClick:()=>r(!1),children:"Cancel"})]}):d.status==="proposed"||d.status==="design-ready"?t.jsxs("div",{className:"row",children:[t.jsxs("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>x("approve",d.status==="design-ready"?"Approved. The Builder redoes what changed.":d.size==="big"?"Approved. The Architect updates the design next.":"Approved. The spec says it now."),children:[t.jsx(xe,{size:14,strokeWidth:2.5})," ",d.status==="design-ready"?"Approve the new design":"Approve"]}),t.jsx("button",{className:"btn sm",onClick:()=>r(!0),children:d.status==="design-ready"?"Decline the change":"Decline"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:d.status==="design-ready"?`squad approve ${e.id}`:`squad propose ${e.id} --approve`})]}):d.status==="failed"?t.jsxs("div",{className:"row",children:[t.jsx("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>x("retry","The Analyst writes it again."),children:"Try again"}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>x("decline","Dropped the change."),children:"Drop it"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad propose ${e.id} --retry`})]}):null]})})}function Io({t:e,initial:n="",from:s,onClose:r}){const a=fe(),[o,c]=C.useState(n),u=Es(e),d=Ur(e),p=!!o.trim()&&!a.isPending,f=Fe(o.trim()||"…"),m=y=>a.mutate({path:`/api/v1/tickets/${e.id}/spec-change/new-ticket`,body:{text:o,as:y},done:y==="bug"?`Reported a bug, linked to ${e.id}.`:`Made a new ticket, linked to ${e.id}.`},{onSuccess:r});return t.jsxs(We,{title:u?"Ask for a change":"Propose a change",icon:t.jsx(rs,{size:16}),onClose:r,footer:t.jsxs(t.Fragment,{children:[u?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!p,onClick:()=>m("ticket"),children:[t.jsx(Nt,{size:15})," Make a new linked ticket"]}),t.jsxs("button",{className:"btn",disabled:!p,onClick:()=>m("bug"),children:[t.jsx(Cs,{size:15})," Report a bug"]})]}):t.jsxs("button",{className:"btn pri",disabled:!p||!!d,onClick:()=>a.mutate({path:`/api/v1/tickets/${e.id}/spec-change`,body:{text:o,...s?{from:s}:{}},done:"Proposed. The Analyst writes it into the spec; the work goes on."},{onSuccess:r}),children:[t.jsx(rs,{size:15})," Propose"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:u?`squad propose ${e.id} --as ticket ${f}`:`squad propose ${e.id} ${f}`})]}),children:[t.jsx("p",{className:"note",style:{marginBottom:10},children:u?`${e.id} is ${e.stage==="done"?"released":"accepted"}${e.release?` (${e.release})`:""}, so it only answers questions. Your change becomes a new ticket linked to it, or a bug report.`:d?`Change ${d.id} is still open. One change at a time: approve or decline it first.`:"Say what should change. The Analyst writes it into the spec, old and new, and says if it is small or big. Nothing changes until you approve it, and the work goes on meanwhile."}),t.jsx("textarea",{className:"input",rows:4,style:{width:"100%"},autoFocus:!0,value:o,onChange:y=>c(y.target.value),placeholder:"For example: allow 5 bookings a day, not 3"})]})}function mA({t:e}){const[n,s]=C.useState(!1);return cu(e)?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:Es(e)?"Becomes a new linked ticket or a bug report":"The Analyst writes it into the spec; you approve it",children:[t.jsx(rs,{size:13})," ",Es(e)?"Ask for a change":"Propose a change"]}),n&&t.jsx(Io,{t:e,onClose:()=>s(!1)})]}):null}const gA={writing:"Being written",proposed:"Waits for you",approved:"Approved",designing:"Design update","design-ready":"Waits for you",building:"Being built",done:"In the spec",declined:"Declined",failed:"Not written"};function xA({t:e}){const n=[...e.changes??[]].reverse();return n.length?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Changes to the spec · ",n.length]}),t.jsx("ul",{className:"ticketnotes",children:n.map(s=>t.jsxs("li",{children:[t.jsx("span",{className:`pill ${s.status==="done"?"ok":s.status==="declined"?"wait":"you"}`,children:s.decided?.withdrawn?"Withdrawn":gA[s.status]}),t.jsxs("span",{className:"grow",children:[s.id,": ",s.summary??s.ask,s.size?` (${s.size})`:"",s.decided?.reason?`. Why not: ${s.decided.reason}`:""]}),t.jsx("span",{className:"note",children:s.by})]},s.id))})]}):null}function Yf(e){return!e.takenOver&&["implement","test","review"].includes(e.stage)}function Qf({t:e}){const n=fe();return t.jsxs("button",{className:"btn sm",disabled:n.isPending,title:"The squad stops. You work in the Builder's Claude Code session, then give it back.",onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/take-over`,done:"It is yours. The squad waits until you give it back."}),children:[t.jsx(vo,{size:12})," Take over"]})}function zo(e){const n=e.waiting?.kind;if(n==="proof")return!0;if(n!=="stuck")return!1;const s=e.stuck?.gate;return s==="checks"||s==="review"||s==="proof"||s==="merge"||e.stage==="test"||e.stage==="review"}function Or(e){const n=e.page?.trim()??"";if(!n)return"";const s=n.replace(/^[a-z]+:\/\/[^/]+/i,"");return s.startsWith("/")?s:`/${s}`}function zc(e){return[...new Set([e,...e.more??[]].map(Or).filter(Boolean))]}function yA(e){return[...new Set((e.proof??[]).flatMap(zc))]}const kA={analyst:"intake",builder:"build",tester:"tester"},vA=new Set(["implement","test","review","release","done"]),jA="Next in line";function bA(e,n=!0){const s=e.proof?.length?"tester":e.sessions?.build||vA.has(e.stage)?"builder":"analyst";return s==="analyst"||!n||e.sessions?.[kA[s]]?s:"analyst"}function ej(e){return!e.waiting&&(e.status??"").startsWith(jA)}function wA(e){return!!(e.live||e.squad)&&!e.waiting&&!e.takenOver&&!ej(e)}const NA={architect:"Architect",builder:"Builder",reviewer:"Reviewer"},SA={tickets:"is being read",specs:"is being planned",implement:"is being built",test:"is being checked",review:"is being reviewed",release:"is accepted",bugs:"is being looked into",done:"is released"};function CA(e){const n=e.id;if(e.stage==="done")return`${n} is released${e.release?` in ${e.release}`:""}`;if(e.stage==="release")return`${n} is accepted${e.release?` and goes out in ${e.release}`:""}`;if(e.takenOver)return`You have ${n}, and the squad waits until you give it back`;const s=(e.dependsOn?.length?e.dependsOn:e.dependency?.on??[]).join(", ");switch(e.waiting?.kind){case"proof":return`${n} waits for your check`;case"stuck":return zo(e)?`${n} stopped at a check and waits for your decision`:`${n} stopped and waits for your decision`;case"ask":return`${n} waits for your answer to the ${e.agentQuestion?NA[e.agentQuestion.from]:"squad"}'s question`;case"depends":return`${n} waits for ${s||"another story"} to be merged`;case"questions":return`${n} waits for your answers to the questions`;case"spec":return`${n}'s spec waits for your approval`;case"plan":return`${n}'s design waits for your approval`;case"change":return`${n} waits for you to decide on the design update`;case"release":return`${n} waits for you to release it`;case"chat":return`${n} waits while you talk it through`;case"yours":return`You have ${n}, and the squad waits until you give it back`}return e.dependency?.way==="wait"&&!e.dependency.started&&!e.squad?`${n} waits for ${s||"another story"} to be merged`:ej(e)?`${n} waits in the queue`:e.live||e.squad?`${n} ${SA[e.stage]}`:e.stage==="tickets"||e.stage==="bugs"?`${n} has not started yet`:`${n} is not running right now`}const rt={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},fy={analyst:"intake",architect:"intake",builder:"build",reviewer:"review",tester:"tester"},$A={analyst:_i,architect:B2,builder:vo,reviewer:H2,tester:J2},EA={"analyst-read":"analyst",triage:"analyst","spec-rewrite":"analyst","chat-spec":"analyst","plan-write":"architect","plan-rewrite":"architect","answered-architect":"architect","chat-design":"architect",build:"builder",unstick:"builder",fix:"builder",test:"builder","review-fix":"builder","restore-tests":"builder","update-base":"builder","proof-fix":"builder","answered-builder":"builder","chat-carry-builder":"builder",review:"reviewer","answered-reviewer":"reviewer","chat-carry-reviewer":"reviewer",proof:"tester","chat-carry-tester":"tester"};function $n({role:e,small:n,live:s}){const r=$A[e]??_i;return t.jsx("span",{className:`cav av-${e} ${n?"sm":""} ${s?"live":""}`,"aria-hidden":"true",children:t.jsx(r,{size:n?13:16,strokeWidth:2})})}function Yr({t:e,agent:n,label:s,primary:r,small:a}){const o=fe();return t.jsxs("button",{className:`btn ${r?"pri":""} ${a?"sm":""}`,disabled:o.isPending,onClick:()=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:n}},{onSuccess:()=>Jn.show(e.id)}),children:[t.jsx(En,{size:14})," ",s??`Talk to the ${rt[n]}`]})}function TA(e){return e.live&&e.squad?.phase?EA[e.squad.phase]??null:null}function tj(e){if(e.stage==="done")return{text:`Released${e.release?` · ${e.release}`:""}`,tone:"done"};if(e.stage==="release")return{text:`Accepted${e.release?` · ready for ${e.release}`:""}`,tone:"done"};const n=$s[e.stage];return e.chat?.open&&!e.chat.beside?{text:`${n} · ${e.chat.thinking?"talking":"your turn"}`,tone:"you"}:e.waiting?{text:`${n} · your turn`,tone:"you"}:{text:`${n}${e.live?" · working":""}`,tone:e.live?"work":"you"}}function nj(e){const n=e.chat,s=rt[n.with];return n.beside?Es(e)?{kind:"released",note:"Questions only"}:zo(e)?{kind:"review",note:"Questions only"}:{kind:wA(e)?"working":"still",note:"Questions only"}:{kind:"talk",note:`The ${s} waits while you talk`}}function sj(e){const n=e.chat,s=rt[n.with];return n.beside?null:n.with==="analyst"?{label:`${e.story?"Update":"Write"} the spec`,path:"write",done:`The Analyst is ${e.story?"updating":"writing"} the spec from your talk.`}:n.with==="architect"&&e.specApproved?{label:`${e.steps?"Update":"Write"} the design`,path:"write",done:`The Architect is ${e.steps?"updating":"writing"} the design from your talk.`}:n.with==="architect"?null:{label:"Back to work",path:"done",done:`The ${s} carries on as you agreed.`}}function AA({t:e,size:n,onFull:s,onPanel:r}){const a=fe(),[o,c]=C.useState(!1),u=e.chat,d=rt[u.with],p=nj(e),f=tj(e),m=u.open?sj(e):null,y=a.isPending||!!u.thinking,x=u.with==="builder"||u.with==="reviewer"||u.with==="tester",v=(E,P)=>a.mutate({path:`/api/v1/tickets/${e.id}/chat/${E}`,done:P}),k=t.jsxs(t.Fragment,{children:[u.open&&m&&t.jsxs("button",{className:"btn pri",disabled:y,onClick:()=>v(m.path,m.done),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," ",m.label]}),u.open&&p.kind==="talk"&&!x&&t.jsx("button",{className:"btn",disabled:y,onClick:()=>v("done","Done talking."),children:m?"Done, no changes":"Done"}),u.open&&p.kind==="talk"&&x&&Yf(e)&&t.jsx(Qf,{t:e}),u.open&&p.kind==="released"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[t.jsx(Jg,{size:14})," New linked ticket"]}),t.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[t.jsx(Cs,{size:14})," Report a bug"]})]}),u.open&&p.kind==="working"&&cu(e)&&t.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[t.jsx(rs,{size:14})," Propose a change"]}),u.open&&p.kind!=="talk"&&t.jsx("button",{className:"btn",disabled:a.isPending,onClick:()=>v("done",`Done asking the ${d}.`),children:"Done"}),!u.open&&(u.beside||!e.takenOver)&&t.jsxs("button",{className:"btn",disabled:a.isPending,onClick:()=>a.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:u.with,...u.beside?{ask:!0}:{}}},{onSuccess:()=>Jn.show(e.id)}),children:[t.jsx(En,{size:14})," ",u.beside?`Ask the ${d} again`:`Talk to the ${d} again`]})]}),N=u.beside?CA(e):"",w=u.open&&p.kind==="working"?t.jsxs("div",{className:"cbanner work",children:[t.jsx("span",{className:"livedot","aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("b",{children:N}),e.status?t.jsxs(t.Fragment,{children:[" · ",e.status]}):null,". Asking never stops the work; a change goes through the spec."]})]}):u.open&&p.kind==="review"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[N,"."]})," Your questions change nothing on it."," ",e.waiting?.kind==="proof"?"To ask for a change, press Something's wrong.":"To go on, pick a way out on its card."]})}):u.open&&p.kind==="released"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[N,"."]})," Ask anything about it. A change becomes a new linked ticket or a bug report."]})}):u.open&&p.kind==="still"?t.jsx("div",{className:"cbanner done",children:t.jsxs("span",{children:[t.jsxs("b",{children:[N,"."]})," Your questions change nothing on it."]})}):null,S=o?t.jsx(Io,{t:e,from:u.with,onClose:()=>c(!1)}):null;return n==="phone"?t.jsxs("div",{className:"chead-m",children:[t.jsxs("div",{className:"chead-m-row",children:[t.jsx("span",{className:"ctitle",children:e.title}),u.open&&m&&t.jsx("button",{className:"btn pri sm",disabled:y,onClick:()=>v(m.path,m.done),children:m.label}),u.open&&!m&&t.jsx("button",{className:"btn sm",disabled:a.isPending,onClick:()=>v("done","Done talking."),children:"Done"})]}),w,u.open&&p.kind==="released"&&t.jsxs("div",{className:"chead-m-row",children:[t.jsxs("button",{className:"btn sm",onClick:()=>c(!0),children:[t.jsx(Jg,{size:13})," New linked ticket"]}),t.jsxs("button",{className:"btn sm",onClick:()=>c(!0),children:[t.jsx(Cs,{size:13})," Report a bug"]})]}),S]}):n==="full"?t.jsxs("div",{className:"chead-f",children:[t.jsxs("div",{className:"chead-f-row",children:[t.jsx($n,{role:u.with,live:u.thinking}),t.jsxs("div",{className:"chead-f-t",children:[t.jsxs("div",{className:"chead-line",children:[t.jsx("span",{className:"cid",children:e.id}),t.jsx("span",{className:`cstage ${f.tone}`,children:f.text}),u.open&&t.jsx("span",{className:"cnote",children:p.note})]}),t.jsx("div",{className:"ctitle",children:e.title})]}),t.jsx("span",{className:"grow"}),t.jsx("div",{className:"cbtns",children:k}),r&&t.jsx("button",{className:"iconbtn",onClick:r,"aria-label":"Back to the side panel",title:"Back to the side panel",children:t.jsx(Z2,{size:16})})]}),w,S]}):t.jsxs("div",{className:"chead-p",children:[t.jsxs("div",{className:"chead-line",children:[t.jsx("span",{className:"cid",children:e.id}),t.jsx("span",{className:`cstage ${f.tone}`,children:f.text}),t.jsx("span",{className:"grow"}),u.open&&t.jsx("span",{className:"cnote",children:p.note}),s&&t.jsx("button",{className:"iconbtn sm",onClick:s,"aria-label":"Open full screen",title:"Full screen",children:t.jsx(Yc,{size:14})})]}),t.jsx("div",{className:"ctitle",children:e.title}),w,t.jsx("div",{className:"cbtns",children:k}),S]})}const ec=e=>`${e.at}|${e.who}`,my=e=>e.who!=="you"&&e.who!=="squad";function Gf({id:e,size:n,onOpenDoc:s,onFull:r,onPanel:a}){const o=No(e),c=o.data,u=c?.chat,d=C.useRef(null),[p,f]=C.useState(""),m=C.useRef(null),y=C.useRef(null),[x,v]=C.useState(null),k=c?.chat?.messages.length??0;C.useEffect(()=>{x&&k>x.count&&v(null)},[k,x]);const N=u?u.beside?"chat":fy[u.with]:"",w=Pe({queryKey:["conversation",e,N],queryFn:()=>Ee(`/api/v1/tickets/${e}/conversations/${N}`),enabled:!!(u&&(u.beside?u.side:c?.sessions?.[fy[u.with]])),refetchInterval:u?.thinking?1500:8e3,retry:!1}),S=C.useMemo(()=>Zv(w.data?.updates??[]).filter(H=>H.kind==="tool"),[w.data]),E=(H,ne)=>S.filter(A=>(!H||(A.at??"")>=H)&&(!ne||(A.at??"")<=ne)),P=C.useRef(null),[B,T]=C.useState(null),_=C.useMemo(()=>u?.messages??[],[u?.messages]);C.useEffect(()=>{if(!u)return;const H=_.map(ec);if(!P.current){P.current=new Set(H);return}const ne=_.filter(O=>!P.current.has(ec(O)));for(const O of H)P.current.add(O);const A=ne.filter(my).at(-1);A&&T({key:ec(A),shown:0,total:Y8(A.text)})},[u,_]),C.useEffect(()=>{if(!B)return;if(B.shown>=B.total){T(null);return}const H=Math.max(1,Math.ceil(B.total/120)),ne=setTimeout(()=>T(A=>A&&{...A,shown:A.shown+H}),55);return()=>clearTimeout(ne)},[B]);const I=C.useRef(!0),D=C.useRef(null);if(C.useLayoutEffect(()=>{const H=d.current;H&&I.current&&(H.scrollTop=H.scrollHeight)}),C.useEffect(()=>{const H=d.current,ne=D.current;if(!H||!ne)return;const A=new ResizeObserver(()=>{I.current&&(H.scrollTop=H.scrollHeight)});return A.observe(ne),()=>A.disconnect()},[c?.id,!!u]),C.useEffect(()=>{u&&Jn.seen(e,_.length)},[u,e,_.length]),!c)return t.jsx("div",{className:"cempty",children:o.isError?`No ticket ${e}.`:"Loading…"});if(!u)return t.jsxs("div",{className:"cempty",children:[t.jsxs("p",{children:["No talk on ",c.id," yet."]}),t.jsx(Yr,{t:c,agent:"analyst",primary:!0})]});const R=rt[u.with],F=nj(c),M=[..._].reverse().find(H=>H.who==="you"),J=sj(c),U=TA(c),G=F.kind==="working"?`You are asking the ${R}. ${U?`The ${rt[U]}`:"The squad"} keeps working on ${c.id}, and this talk changes nothing.`:F.kind==="review"||F.kind==="still"?`You are asking the ${R} about ${c.id}. It stays where it is, and this talk changes nothing.`:F.kind==="released"?`${c.id} is ${c.stage==="done"?"released":"accepted"}. Ask the ${R} anything about it.`:`You started talking with the ${R}. Its work on ${c.id} waits until you press ${J?J.label:"Done"}${J&&J.label!=="Back to work"?" or Done":""}.`,ue=[..._].reverse().find(my),V=H=>{H!==void 0&&f(H),setTimeout(()=>m.current?.focus(),0)};return t.jsxs("div",{className:`chat-v csize-${n}`,children:[t.jsx(AA,{t:c,size:n,onFull:r,onPanel:a}),t.jsx("div",{className:"cthread",ref:d,"aria-live":"polite",onScroll:H=>{const ne=H.currentTarget;I.current=ne.scrollHeight-ne.scrollTop-ne.clientHeight<80},children:t.jsxs("div",{className:"ccol",ref:D,children:[u.open&&t.jsx("div",{className:"cnote-pill",children:G}),_.map((H,ne)=>{if(H.who==="squad")return t.jsx(OA,{t:c,m:H,last:ne===_.length-1,onAsk:()=>V()},ne);if(H.who==="you")return t.jsx(IA,{t:c,m:H,onOpenDoc:s,onReply:z=>V(z)},ne);const A=_[ne-1],O=B?.key===ec(H),ee=_[ne+1];return t.jsx(zA,{t:c,m:H,size:n,used:E(A?.at,H.at),writing:O?B.shown:null,answer:ee?.who==="you"?ee.text:void 0,canChoose:u.open&&!u.thinking&&H===ue&&ne===_.length-1,newest:H===ue,onChoose:z=>y.current?.(z),onOther:()=>V(),onOpenDoc:s,onReply:z=>V(z)},ne)}),x&&t.jsx(PA,{p:x}),u.thinking&&_.at(-1)?.note!=="waits"&&t.jsx(_A,{role:u.with,steps:E(M?.at??_.at(-1)?.at),hasMessage:!!M})]})}),u.open?t.jsx(qA,{t:c,size:n,text:p,setText:f,input:m,onSent:()=>I.current=!0,sendRef:y,setPending:v}):t.jsx("div",{className:"cclosed",children:"This talk is over. It stays here to read."})]})}function PA({p:e}){const n=An(e.text);return t.jsxs("div",{className:"cyou cmsg",children:[t.jsxs("div",{className:"cybub",children:[e.files.length>0&&t.jsx("div",{className:"cup",children:e.files.map((s,r)=>t.jsxs("div",{className:"cup-row",children:[s.preview?t.jsx("img",{className:"cup-img",src:s.preview,alt:""}):t.jsx("span",{className:"cfic sm file",children:(s.name.split(".").pop()??"").toUpperCase().slice(0,4)}),t.jsx("span",{className:"cfname",children:s.name}),t.jsx("span",{className:"cbar",children:t.jsx("i",{})})]},r))}),e.text.trim()&&t.jsx("p",{className:As(n),dir:n.dir,lang:n.dir==="rtl"?"ar":"en",children:e.text})]}),t.jsx("span",{className:"cmeta",children:"You · now · sending"})]})}function rj({t:e,m:n,holder:s,onReply:r}){const a=fe(),{toast:o}=_e(),[c,u]=C.useState(!1),[d,p]=C.useState(!1),f=()=>{const v=window.getSelection();return((v&&!v.isCollapsed&&s.current?.contains(v.anchorNode)?v.toString().trim():"")||n.text).trim().slice(0,2e3)},m=(v,k)=>{u(!1),a.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:f(),kind:v},done:`Added to the spec as ${k}.`})},y=()=>void navigator.clipboard?.writeText(n.text).then(()=>o("Copied"),()=>o("Could not copy. Select the text instead.","err")),x=()=>r(`> ${n.text.replace(/\s+/g," ").slice(0,160)}${n.text.length>160?"…":""}
|
|
610
|
+
|
|
611
|
+
`);return t.jsxs("div",{className:"cacts",children:[t.jsxs("button",{className:"cact",onClick:y,children:[t.jsx(lr,{size:13})," Copy"]}),n.who==="you"&&n.text.trim()&&cu(e)&&t.jsxs("button",{className:"cact",onClick:()=>p(!0),children:[t.jsx(rs,{size:13})," Propose as a change"]}),!Es(e)&&n.text.trim()&&t.jsxs("span",{className:"cmenu-w",children:[t.jsxs("button",{className:"cact",onClick:()=>u(!c),"aria-haspopup":"menu","aria-expanded":c,onMouseDown:v=>v.preventDefault(),children:[t.jsx(Nt,{size:13})," Add to spec"]}),c&&t.jsxs("div",{className:"cmenu",role:"menu",onMouseLeave:()=>u(!1),children:[t.jsxs("button",{role:"menuitem",onClick:()=>m("rule","a business rule"),onMouseDown:v=>v.preventDefault(),children:[t.jsx("b",{children:"A business rule"}),t.jsx("small",{children:"Every agent must follow it"})]}),t.jsxs("button",{role:"menuitem",onClick:()=>m("criterion",'a "done when" item'),onMouseDown:v=>v.preventDefault(),children:[t.jsx("b",{children:'A "done when" item'}),t.jsx("small",{children:"The Tester proves it with a screenshot"})]}),t.jsxs("button",{role:"menuitem",onClick:()=>m("note","a note"),onMouseDown:v=>v.preventDefault(),children:[t.jsx("b",{children:"A note"}),t.jsx("small",{children:"Context for the next steps"})]})]})]}),e.chat?.open&&t.jsxs("button",{className:"cact",onClick:x,children:[t.jsx(x6,{size:13})," Reply"]}),d&&t.jsx(Io,{t:e,initial:n.text,from:e.chat?.with,onClose:()=>p(!1)})]})}function RA(e){let n=!1;return e.split(`
|
|
612
|
+
`).map((s,r,a)=>{/^\s*```/.test(s)&&(n=!n);const o=a[r+1]??"";return!n&&s.trim()&&o.trim()&&!/^\s*([-*+]|\d+\.|>|```)\s/.test(o)?`${s}
|
|
613
|
+
`:s}).join(`
|
|
614
|
+
`)}function IA({t:e,m:n,onOpenDoc:s,onReply:r}){const a=C.useRef(null),[o,c]=C.useState(!1),u=!n.text.trim()&&(n.files??[]).some(d=>Op.test(d));return t.jsxs("div",{className:`cyou cmsg ${o?"picked":""}`,children:[t.jsxs("div",{className:"cybub",ref:a,onClick:()=>c(!o),children:[n.text.trim()&&t.jsx(co,{text:RA(n.text),ticket:e.id}),n.files&&n.files.length>0&&t.jsx(Wf,{ticket:e.id,files:n.files,onOpen:s,sent:!0,from:"From you"})]}),t.jsxs("span",{className:"cmeta",children:["You · ",hc(n.at),u?" · written out from your voice":""]}),t.jsx(rj,{t:e,m:n,holder:a,onReply:r})]})}function hc(e){return new Date(e).toDateString()===new Date().toDateString()?Tn(e):`${Ts(e)} ${Tn(e)}`}function zA({t:e,m:n,size:s,used:r,writing:a,answer:o,canChoose:c,newest:u,onChoose:d,onOther:p,onOpenDoc:f,onReply:m}){const y=C.useRef(null),[x,v]=C.useState(!1),k=n.who,N=rt[k]??"Agent",w=a!==null,S=w?K8(n.text,a):n.text,E=t.jsx(co,{text:S,ticket:e.id,stream:w,caret:w});return t.jsxs("div",{className:`cag cmsg ag-${k} ${x?"picked":""}`,children:[t.jsx($n,{role:k,live:w}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:N}),w?t.jsx("span",{className:"shim",children:"Writing"}):t.jsx("span",{className:"ctime",children:hc(n.at)})]}),t.jsxs("div",{className:"cagb",ref:y,onClick:P=>s==="phone"&&!P.target.closest("button, a")&&v(!x),children:[r.length>0&&t.jsx(LA,{steps:r}),w||u?E:t.jsx(MT,{lines:FT(n.text),children:E}),!w&&n.files&&n.files.length>0&&t.jsx(Wf,{ticket:e.id,files:n.files,onOpen:f,from:`From the ${N} · ${hc(n.at)}`}),!w&&n.options&&n.options.length>0&&t.jsx(MA,{options:n.options,answer:o,can:c,onChoose:d,onOther:p})]}),!w&&s==="phone"&&t.jsxs("span",{className:"cmeta",children:[N," · ",hc(n.at)]}),!w&&t.jsx(rj,{t:e,m:n,holder:y,onReply:m})]})}function MA({options:e,answer:n,can:s,onChoose:r,onOther:a}){const o=An(e.join(" ")),c=n?.trim();return t.jsxs("div",{className:"cchoices",dir:o.dir,children:[e.map(u=>{const d=An(u),p=c?c===u.trim()?"on":"off":s?"":"off";return t.jsx("button",{className:`cch ${p} ${As(d)}`,lang:d.dir==="rtl"?"ar":"en",dir:d.dir,disabled:!s,onClick:()=>r(u),children:u},u)}),s&&t.jsx("button",{className:"cch other",onClick:a,dir:o.dir,children:o.dir==="rtl"?"إجابة أخرى…":"Something else…"})]})}function FA(e){let n=0,s=0;for(const r of e.content){if(r.type!=="diff")continue;const a=(r.oldText??"").split(`
|
|
615
|
+
`).filter(Boolean).length,o=r.newText.split(`
|
|
616
|
+
`).filter(Boolean).length;n+=Math.max(0,o-(r.oldText==null?0:Math.min(a,o))),s+=r.oldText==null?0:Math.max(0,a-o)}return{title:e.title,...n||s?{plus:n,minus:s}:{}}}function ij({s:e}){const n=FA(e);return t.jsxs("div",{className:`cstep ${e.skipped?"skipped":e.status}`,children:[e.skipped?t.jsx(jo,{size:13}):e.status==="completed"?t.jsx(xe,{size:13,strokeWidth:2.5}):e.status==="failed"?t.jsx(Ze,{size:13}):t.jsx(gn,{size:13,className:"spin"}),t.jsx("span",{className:"cstep-t",children:n.title}),n.plus!==void 0&&t.jsxs("span",{className:"cstep-n",children:[t.jsxs("span",{className:"add",children:["+",n.plus]})," ",t.jsxs("span",{className:"del",children:["−",n.minus]})]})]})}function LA({steps:e}){const[n,s]=C.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"cactv",onClick:()=>s(!n),"aria-expanded":n,children:[t.jsx(Kc,{size:13,style:{transform:n?"rotate(90deg)":void 0}})," Looked at ",e.length," ",e.length===1?"thing":"things"]}),n&&t.jsx("div",{className:"cactlist",children:e.map(r=>t.jsx(ij,{s:r},r.id))})]})}function _A({role:e,steps:n,hasMessage:s}){const r=n.filter(c=>c.status==="in_progress").at(-1)??n.at(-1),a=r?r.title:s?"Reading your message":"Reading the ticket",o=n.slice(-6);return t.jsxs("div",{className:`cag cmsg ag-${e} thinking`,children:[t.jsx($n,{role:e,live:!0}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:rt[e]}),t.jsx("span",{className:"shim",children:a})]}),t.jsxs("div",{className:"cagb",children:[t.jsxs("span",{className:"cdots","aria-label":`The ${rt[e]} is answering`,children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),o.length>0&&t.jsxs("div",{className:"csteps",children:[n.length>o.length&&t.jsxs("div",{className:"cstep more",children:["and ",n.length-o.length," earlier steps"]}),o.map(c=>t.jsx(ij,{s:c},c.id))]})]})]})}function OA({t:e,m:n,last:s,onAsk:r}){const a=fe(),o=n.note==="failed"||!n.note&&n.text.startsWith("Could not answer"),c=e.chat?rt[e.chat.with]:"agent",u=s&&e.chat?.open&&!e.chat.thinking&&(o||n.note==="stopped"),d=()=>a.mutate({path:`/api/v1/tickets/${e.id}/chat/retry`});return o?t.jsxs("div",{className:"cfail cmsg",children:[t.jsxs("div",{className:"cfail-t",children:[t.jsx(Pr,{size:15})," The ",c," could not answer. Nothing was lost.",t.jsx("span",{className:"cfail-why",children:n.text.replace(/^Could not answer:\s*/,"")})]}),u&&t.jsxs("div",{className:"cbtns",children:[t.jsx("button",{className:"btn pri sm",disabled:a.isPending,onClick:d,children:"Try again"}),t.jsx("button",{className:"btn sm",onClick:r,children:"Ask something else"})]})]}):t.jsxs("div",{className:"cnote-w cmsg",children:[t.jsx("div",{className:"cnote-pill",children:n.text}),u&&t.jsx("div",{className:"cbtns",children:t.jsx("button",{className:"btn sm",disabled:a.isPending,onClick:d,children:"Ask again"})})]})}const gy=10*1024*1024;function qA({t:e,size:n,text:s,setText:r,input:a,onSent:o,sendRef:c,setPending:u}){const d=fe(),{toast:p}=_e(),f=e.chat,m=rt[f.with],[y,x]=C.useState([]),[v,k]=C.useState(!1),N=C.useRef(null),w=An(s),S=D8(w),E=Math.min(6,Math.max(1,s.split(`
|
|
617
|
+
`).length)),P=async I=>{const D=[...I],R=D.find(M=>M.size>gy);R&&p(`${R.name} is larger than 10 MB.`,"err");const F=await Promise.all(D.filter(M=>M.size<=gy).slice(0,10).map(uo)).catch(M=>(p(M.message,"err"),[]));x(M=>[...M,...F].slice(0,10))},B=(I=s,D=[])=>{const R=[...y,...D];if(!I.trim()&&!R.length||f.thinking||d.isPending)return;u({text:I,files:R,count:f.messages.length});const F=s;r(""),x([]),o(),d.mutate({path:`/api/v1/tickets/${e.id}/chat/send`,body:{text:I,files:R.map(({name:M,data:J})=>({name:M,data:J}))}},{onError:()=>{u(null),r(F),x(R.filter(M=>!D.includes(M)))}})};c.current=I=>B(I);const T=()=>d.mutate({path:`/api/v1/tickets/${e.id}/chat/stop`}),_=n==="phone"?`Message the ${m}`:`Message the ${m} in Arabic or English`;return t.jsxs("div",{className:"ccomp",onDragOver:I=>(I.preventDefault(),k(!0)),onDragLeave:()=>k(!1),onDrop:I=>(I.preventDefault(),k(!1),void P(I.dataTransfer.files)),children:[v&&t.jsx("div",{className:"cdrop",children:"Drop files to add them to your message"}),t.jsx(DA,{who:m,size:n,onDone:I=>B(s,[I]),render:I=>I.on?I.box:t.jsxs("div",{className:`cbox ${n==="phone"?"m":""}`,children:[y.length>0&&t.jsx("div",{className:"cpicked",children:y.map((D,R)=>t.jsxs("span",{className:"chip",children:[D.preview?t.jsx("img",{src:D.preview,alt:""}):t.jsx(wc,{size:12})," ",D.name,t.jsx("button",{className:"iconbtn","aria-label":`Remove ${D.name}`,onClick:()=>x(y.filter((F,M)=>M!==R)),children:t.jsx(Ze,{size:11})})]},R))}),n==="phone"&&t.jsx("button",{className:"ib","aria-label":"Add screenshots or files",onClick:()=>N.current?.click(),children:t.jsx(Nt,{size:20})}),t.jsx("textarea",{ref:a,className:`cta ${s?As(w):"t-en"}`,dir:s?w.dir:"auto",lang:w.dir==="rtl"?"ar":"en",rows:E,value:s,placeholder:_,"aria-label":"Your message",onChange:D=>r(D.target.value),onPaste:D=>{const R=[...D.clipboardData.files];R.length&&P(R)},onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&!D.nativeEvent.isComposing&&(D.preventDefault(),B())}}),n==="phone"?f.thinking?t.jsx("button",{className:"csend m stop",onClick:T,"aria-label":"Stop the answer",children:t.jsx(is,{size:14,fill:"currentColor"})}):s.trim()||y.length?t.jsx("button",{className:"csend m",onClick:()=>B(),"aria-label":"Send",disabled:d.isPending,children:t.jsx(ns,{size:18})}):t.jsx("button",{className:"csend m mic",onClick:I.start,"aria-label":"Record a voice note",children:t.jsx(Gg,{size:18})}):t.jsxs("div",{className:"crow",children:[t.jsx("button",{className:"ib","aria-label":"Add screenshots or files",title:"Add screenshots or files",onClick:()=>N.current?.click(),children:t.jsx(wc,{size:16})}),t.jsx("button",{className:"ib","aria-label":"Record a voice note",title:"Record a voice note",onClick:I.start,children:t.jsx(Gg,{size:16})}),S&&t.jsx("span",{className:"clchip",children:S}),t.jsx("span",{className:"grow"}),f.thinking?t.jsxs("button",{className:"cstop",onClick:T,disabled:f.stopping||d.isPending,children:[t.jsx(is,{size:11,fill:"currentColor"})," ",f.stopping?"Stopping…":"Stop"]}):t.jsx("button",{className:"csend",onClick:()=>B(),disabled:d.isPending||!s.trim()&&!y.length,"aria-label":"Send",children:t.jsx(ns,{size:17})})]}),t.jsx("input",{ref:N,type:"file",multiple:!0,hidden:!0,onChange:D=>D.target.files&&void P(D.target.files)})]})}),n!=="phone"&&t.jsx("div",{className:"chint",children:"Enter sends · Shift+Enter for a new line · It answers in the language you write"})]})}function DA({who:e,size:n,onDone:s,render:r}){const{toast:a}=_e(),[o,c]=C.useState(!1),[u,d]=C.useState(0),p=C.useRef(null),f=C.useRef(!1);C.useEffect(()=>{if(!o)return;const v=setInterval(()=>d(k=>k+1),1e3);return()=>clearInterval(v)},[o]),C.useEffect(()=>()=>p.current?.stream.getTracks().forEach(v=>v.stop()),[]);const m=async()=>{try{const v=await navigator.mediaDevices.getUserMedia({audio:!0}),k=["audio/webm","audio/ogg","audio/mp4"].find(S=>MediaRecorder.isTypeSupported?.(S))??"",N=new MediaRecorder(v,k?{mimeType:k}:void 0),w=[];N.ondataavailable=S=>S.data.size&&w.push(S.data),N.onstop=()=>{if(v.getTracks().forEach(T=>T.stop()),!f.current||!w.length)return;const S=N.mimeType||k||"audio/webm",E=S.includes("ogg")?"ogg":S.includes("mp4")?"m4a":"weba",P=new Date().toTimeString().slice(0,8).replace(/:/g,""),B=new File(w,`voice-note-${P}.${E}`,{type:S});uo(B).then(s)},p.current=N,f.current=!1,d(0),N.start(),c(!0)}catch{a("The microphone is not available. Allow it for this page, or attach a voice note file.","err")}},y=v=>{f.current=v,p.current?.stop(),c(!1)},x=t.jsxs("div",{className:`crec ${n==="phone"?"m":""}`,role:"group","aria-label":"Recording a voice note",children:[t.jsx("span",{className:"crdot"}),t.jsxs("span",{className:"crt",children:["0:",String(u).padStart(2,"0")," · Recording for the ",e]}),t.jsx("span",{className:"clw","aria-hidden":"true",children:Array.from({length:22},(v,k)=>t.jsx("i",{style:{animationDelay:`${k%7*.11}s`}},k))}),t.jsx("button",{className:"btn sm",onClick:()=>y(!1),children:"Cancel"}),t.jsx("button",{className:"btn sm pri",onClick:()=>y(!0),children:"Send"})]});return t.jsx(t.Fragment,{children:r({on:o,start:()=>void m(),box:x})})}function Mo(e){return e.owner?.trim()||e.createdBy}function Mc(e,n){return!!e?.trim()&&e.trim().toLowerCase()===n?.trim().toLowerCase()}function Hi(){const e=Ye();return e.data?.ready?e.data.meta.user?.name:void 0}function qn(e,n){return Mc(Mo(e),n)}function BA(e,n){return qn(e,n)&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"}function UA({t:e,onClose:n}){const s=fe(),r=fe(),a=Ye(),o=Hi(),[c,u]=C.useState(""),[d,p]=C.useState(""),f=a.data?.ready?a.data.meta.engine==="live":!0,m=e.branch??`squad/${e.id.toLowerCase()}`,y=!!(e.live||e.squad||e.stopRequested),x=e.chat?.open?"A chat is open on this ticket. Finish the talk first.":y?"The squad is working on it right now. It hands over once the step is done, or you stop it.":null,v=C.useMemo(()=>{const w=new Map;for(const S of a.data?.ready?a.data.tickets:[])for(const E of[Mo(S),S.createdBy,S.specApproved?.by,S.handedOver?.from,S.handedOver?.to,...(S.notes??[]).map(P=>P.by)])E?.trim()&&!Mc(E,o)&&w.set(E.trim().toLowerCase(),E.trim());return[...w.values()].slice(0,8)},[a.data,o]),k=c.trim()||"them",N=()=>c.trim()&&s.mutate({path:`/api/v1/tickets/${e.id}/hand-over`,body:{to:c,note:d},done:`Handed ${e.id} over to ${c.trim()}. Their squad carries on from the branch.`},{onSuccess:n});return t.jsxs(We,{title:`Hand over ${e.id}`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(bc,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!c.trim()||!!x||s.isPending,onClick:N,children:[t.jsx(bc,{size:15})," ",s.isPending?"Pushing…":"Hand over"]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad hand-over ${e.id} ${c.trim()?qi(c.trim()):"Name"}${d.trim()?` --note ${Fe(d.trim())}`:""}`})]}),children:[t.jsx("p",{children:"Give this ticket to a teammate. Their squad carries on where it is now."}),x&&t.jsxs("div",{className:"stuckbox",style:{marginBottom:14,display:"flex",gap:10,alignItems:"center"},children:[t.jsx("span",{style:{flex:1},children:x}),y&&!e.chat?.open&&t.jsxs("button",{className:"btn sm",disabled:e.stopRequested||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[t.jsx(is,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"handover-to",children:"Hand it over to"}),t.jsx("input",{id:"handover-to",className:"input",autoFocus:!0,value:c,placeholder:"Their name, as their board shows it",onChange:w=>u(w.target.value),onKeyDown:w=>w.key==="Enter"&&!x&&N()}),v.length>0&&t.jsx("div",{className:"pills",style:{marginTop:8},children:v.map(w=>t.jsxs("button",{className:`pill click ${Mc(w,c)?"on":""}`,onClick:()=>u(w),children:[t.jsx(ek,{size:12})," ",w]},w))})]}),t.jsxs("div",{className:"field",children:[t.jsxs("label",{htmlFor:"handover-note",children:["A note for ",k," (optional)"]}),t.jsx("textarea",{id:"handover-note",className:"input",rows:2,value:d,placeholder:"Where you got to, and anything to watch out for. Every agent reads it too.",onChange:w=>p(w.target.value)})]}),t.jsx("div",{className:"lbl",children:"What happens"}),t.jsxs("ul",{className:"brief",children:[f?t.jsxs(t.Fragment,{children:[t.jsxs("li",{children:["squad-kit saves the work so far and the ticket's documents on its branch, ",t.jsx("span",{className:"mono",children:m}),", and pushes it."]}),t.jsxs("li",{children:[k==="them"?"They become":`${k} becomes`," the owner. Their squad makes its copy of the code from that branch, and the Builder starts a fresh chat from the spec, the design and the code."]})]}):t.jsxs("li",{children:[k==="them"?"They become":`${k} becomes`," the owner. This is a sample board, so nothing is pushed."]}),t.jsx("li",{children:"Your squad stops working on it. You still see it on your board, with its new owner."})]}),t.jsx("div",{className:"lbl",children:"What stays on this computer"}),t.jsx("p",{className:"note",style:{fontSize:13},children:"Live progress, agent chats and screenshots. They see the documents and the code, not the chat. The Tester takes the screenshots again on their computer."})]})}function WA({t:e}){const n=Hi(),s=e.handedOver;return!s||!Mc(s.to,n)||!qn(e,n)?null:t.jsxs("div",{className:"calm",style:{flex:"none",margin:"16px 28px 0"},children:[t.jsx("span",{className:"ring",children:t.jsx(bc,{size:16})}),t.jsxs("div",{children:[t.jsxs("b",{children:[s.from," handed this ticket to you ",Zt(s.at)]}),t.jsxs("span",{children:["The spec, the design, the notes and the code came with its branch. Live progress, agent chats and screenshots stayed on ",s.from,"'s computer, so the Builder starts a fresh chat from the spec, the design and the code, and the Tester takes the screenshots again."]})]})]})}function HA({t:e}){const n=Mo(e),s=e.handedOver;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(ek,{size:17})}),t.jsxs("div",{children:[t.jsxs("b",{children:[n," owns this ticket"]}),t.jsxs("span",{children:[s?`${s.from} handed it to ${s.to} ${Zt(s.at)}. `:"","Their squad works on it, on their computer. You see their work here when they push it: when they hand it over, or when its pull request opens."]})]})]}),t.jsxs("p",{className:"note",style:{marginTop:12,fontSize:13},children:["Live progress and agent chats stay on ",n,"'s computer. The spec, the design and the notes here are as ",n," last pushed them."]})]}),t.jsxs("div",{className:"df",children:[t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad show ${e.id}`})]})]})}const VA="squad.console.token";function aj(e=3e3){return Pe({queryKey:["requirements"],queryFn:()=>Ee("/api/v1/requirements"),refetchInterval:e})}function KA(e){return e?Wr(e.state.job)||!!e.state.build?.on||e.state.sync?.status==="running"||e.state.sync?.status==="pending"||e.counts.building>0||e.questions.some(n=>n.thinking):!1}function YA(e){return Pe({queryKey:["requirement",e],queryFn:()=>Ee(`/api/v1/requirements/${encodeURIComponent(e)}`),refetchInterval:n=>n.state.status==="error"?1e4:KA(n.state.data)?1e3:4e3,retry:!1})}function QA(e,n){return Pe({queryKey:["requirement-send",e],queryFn:()=>Ee(`/api/v1/requirements/${encodeURIComponent(e)}/send`),enabled:n,retry:!1,staleTime:0})}function oj(e){if(!e||typeof e!="object")return null;const n=e;return Array.isArray(n.epics)&&typeof n.id=="string"?n:n.breakdown?oj(n.breakdown):null}function kt(){const e=os(),{toast:n}=_e(),s=o2({mutationFn:({path:r,body:a,method:o="POST"})=>wt(r,o,a??{}),onSuccess:(r,a)=>{const o=oj(r);o&&e.setQueryData(["requirement",o.id],o),e.invalidateQueries({queryKey:["requirements"]}),e.invalidateQueries({queryKey:["board"]}),a.done&&n(a.done)},onError:(r,a)=>{a.quiet||n(lj(r),"err",I2(r)?()=>s.mutate(a):void 0)}});return s}function lj(e){return e instanceof cf&&e.status===404&&/^404\b/.test(e.message)?"This squad-kit cannot do that yet. Update squad-kit, then try again.":e instanceof Error?e.message:String(e)}function Fc(e,n){const s=sessionStorage.getItem(VA)??"";return`${ko(`/api/v1/requirements/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(n)}&t=${encodeURIComponent(s)}`}const cj=e=>`squad.send-plan.${hn??""}.${e}`;function xy(e,n){try{sessionStorage.setItem(cj(e),JSON.stringify(n))}catch{}}function uj(e){try{const n=sessionStorage.getItem(cj(e)),s=n?JSON.parse(n):null;return s&&typeof s.items=="number"&&typeof s.links=="number"?s:null}catch{return null}}const uu=e=>`/api/v1/requirements/${encodeURIComponent(e)}`,Hh=10*1024*1024,GA=10;function Ii(e){const n=e instanceof Error?e.message:String(e),s=/^(\d{3}) [^:]*: ?([\s\S]*)$/.exec(n);if(!s)return lj(e);try{const r=JSON.parse(s[2]);if(r.error&&r.error!=="not found")return r.error}catch{}return s[1]==="404"?"This squad-kit cannot do that yet. Update squad-kit, then try again.":s[2]?.trim()||n}function yy(e){const n=/\.([a-z0-9]+)$/i.exec(e)?.[1]?.toLowerCase();return n==="pdf"?"pdf":n==="docx"?"docx":n==="md"||n==="markdown"?"markdown":n==="txt"||n==="text"?"text":null}const ZA={pdf:"PDF",docx:"DOCX",markdown:"MD",text:"TXT"},XA={pdf:"PDF",docx:"Word document",markdown:"Markdown",text:"Text"};function JA(e){return e<1024?`${e} bytes`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}const ky=e=>e.replace(/\.[^.]+$/,"");function eP({onClose:e}){const n=kt(),s=Jt(),[r,a]=C.useState(null),[o,c]=C.useState(!1),[u,d]=C.useState(""),[p,f]=C.useState(""),[m,y]=C.useState(!1),[x,v]=C.useState([]),[k,N]=C.useState(!1),[w,S]=C.useState(null),E=C.useRef(null),P=async R=>{const F=R?[...R][0]:void 0;if(F){if(S(null),!yy(F.name))return S(`${F.name}: squad-kit reads PDF, Word (.docx), Markdown and text files. Save the BRD as one of those, or paste the text.`);if(F.size>Hh)return S(`${F.name} is larger than 10 MB.`);try{const M=await uo(F);a(M),c(!1),m||f(ky(F.name))}catch(M){S(M.message)}}},B=async R=>{const F=[...R??[]],M=F.find(U=>U.size>Hh);M&&S(`${M.name} is larger than 10 MB.`);const J=await Promise.all(F.filter(U=>U.size<=Hh).map(uo)).catch(U=>(S(U.message),[]));v(U=>[...U,...J].slice(0,GA-1))},T=r?yy(r.name):null,_=o?!!u.trim():!!r,I=o?`squad requirements add --paste${p.trim()?` --name ${Fe(p.trim())}`:""}`:`squad requirements add ${r?Fe(r.name):"<file>"}${r&&p.trim()&&p.trim()!==ky(r.name)?` --name ${Fe(p.trim())}`:""}${x.map(R=>` --with ${Fe(R.name)}`).join("")}`,D=()=>{if(!_)return;S(null);const R=o?{text:u,...p.trim()?{name:p.trim()}:{},with:x.map(({name:F,data:M})=>({name:F,data:M}))}:{file:{name:r.name,data:r.data},...p.trim()?{name:p.trim()}:{},with:x.map(({name:F,data:M})=>({name:F,data:M}))};n.mutate({path:"/api/v1/requirements",body:R},{onSuccess:F=>{e(),s({to:"/requirements/$id",params:{id:F.id}})},onError:F=>S(Ii(F))})};return t.jsxs(We,{title:"Add a BRD",onClose:e,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(ie,{text:I})}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsxs("button",{className:"btn pri",disabled:!_||n.isPending,onClick:D,children:[n.isPending&&t.jsx(gn,{size:14,className:"spin"})," Break it down"]})]}),children:[t.jsx("p",{children:"The Analyst breaks it into epics, features and stories. Nothing is built or sent anywhere until you approve."}),t.jsxs("div",{className:"rq-add",children:[o?t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-paste",children:"The BRD's text"}),t.jsx("textarea",{id:"rq-paste",className:"textarea rq-pastebox",autoFocus:!0,value:u,onChange:R=>d(R.target.value),placeholder:"Paste the whole document here. Headings help the Analyst find its parts."}),t.jsxs("div",{className:"rq-hint",children:["Have the file?"," ",t.jsx("button",{className:"rq-link",onClick:()=>c(!1),children:"Choose a file instead"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:`rq-drop ${k?"over":""}`,onDragOver:R=>{R.preventDefault(),N(!0)},onDragLeave:()=>N(!1),onDrop:R=>{R.preventDefault(),N(!1),P(R.dataTransfer.files)},children:[t.jsx("input",{type:"file",className:"sr-only",accept:".pdf,.docx,.md,.markdown,.txt",onChange:R=>void P(R.target.files)}),t.jsx(b6,{size:24,"aria-hidden":"true"}),t.jsxs("b",{children:["Drop your BRD here, or ",t.jsx("u",{children:"choose a file"})]}),t.jsx("span",{children:"PDF, Word, Markdown or text, up to 10 MB"})]}),r&&T&&t.jsxs("div",{className:"rq-file",children:[t.jsx("span",{className:`rq-ftag ${T}`,children:ZA[T]}),t.jsxs("div",{className:"grow",children:[t.jsx("b",{children:r.name}),t.jsxs("span",{children:[JA(r.size),", ",XA[T]]})]}),t.jsx("button",{className:"iconbtn","aria-label":"Remove the file",onClick:()=>a(null),children:t.jsx(Ze,{size:14})})]}),t.jsxs("div",{className:"rq-hint",children:["No file?"," ",t.jsx("button",{className:"rq-link",onClick:()=>c(!0),children:"Paste the text instead"})]})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-name",children:"Name"}),t.jsx("input",{id:"rq-name",className:"input",value:p,placeholder:o?"Named after its first heading":"Named after the file",onChange:R=>{f(R.target.value),y(!0)}})]}),t.jsxs("div",{className:"rq-hint",children:["Screen mockups or other files that go with it?"," ",t.jsx("button",{className:"rq-link",onClick:()=>E.current?.click(),children:"Add them"}),t.jsx("input",{ref:E,type:"file",multiple:!0,className:"sr-only",tabIndex:-1,"aria-hidden":"true",onChange:R=>void B(R.target.files)})]}),x.length>0&&t.jsx("div",{className:"rq-extras",children:x.map((R,F)=>t.jsxs("span",{className:"rq-extra",children:[t.jsx(i6,{size:13,"aria-hidden":"true"}),R.name,t.jsx("button",{"aria-label":`Remove ${R.name}`,onClick:()=>v(M=>M.filter((J,U)=>U!==F)),children:t.jsx(Ze,{size:12})})]},`${R.name}-${F}`))}),w&&t.jsx("p",{className:"rq-err",role:"alert",children:w}),t.jsxs("div",{className:"rq-next",children:[t.jsx("div",{className:"rq-next-h",children:"What happens next"}),t.jsxs("div",{className:"rq-nstep",children:[t.jsx("span",{children:"1"}),"The Analyst reads it and asks you only about parts that are missing or that clash."]}),t.jsxs("div",{className:"rq-nstep",children:[t.jsx("span",{children:"2"}),"You edit the breakdown and approve it."]}),t.jsxs("div",{className:"rq-nstep",children:[t.jsx("span",{children:"3"}),"Send it to Azure DevOps, let the squad build it story by story, or both."]})]})]})]})}function tP({v:e,onClose:n}){const s=kt(),r=QA(e.id,!0),[a,o]=C.useState(!1),[c,u]=C.useState(null),[d,p]=C.useState(null),f=e.tracker?.label??"the tracker",m=e.state.sync,y=a&&!c&&(s.isPending||!m||m.status==="running"||m.status==="pending"),x=a&&m?.status==="done"&&!s.isPending,v=a&&m?.status==="failed"||!!c,k=r.data,N=A8(e),w=s.isPending?bp(void 0):bp(m,d??uj(e.id)),S=Ck(w),E=async()=>{u(null),o(!0);const T=v?(await r.refetch()).data??k:k,_=T?{items:T.items,links:T.first?T.counts.links:T.links}:null;p(_),_&&xy(e.id,_),s.mutate({path:`${uu(e.id)}/send`,quiet:!0},{onSuccess:I=>_&&I?.state?.sync?.at&&xy(e.id,{..._,at:I.state.sync.at}),onError:I=>u(Ii(I))})},P=k?.tracker.project??e.tracker?.project,B=k&&k.items===0&&k.links===0;return t.jsxs(We,{title:`Send to ${f}`,onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(ie,{text:`squad requirements send ${e.id}`})}),y||x?t.jsx("button",{className:"btn",onClick:n,children:"Close"}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),v?t.jsxs("button",{className:"btn pri",onClick:()=>void E(),disabled:s.isPending,children:[t.jsx(Lr,{size:14})," Send again"]}):t.jsx("button",{className:"btn pri",onClick:()=>void E(),disabled:!k||!!B||s.isPending,children:k?k.first?`Send ${k.items} items`:"Send changes":"Send"})]})]}),children:[t.jsxs("p",{children:["Into ",P?t.jsxs(t.Fragment,{children:["project ",t.jsx("b",{className:"rq-ink",children:P})]}):`your ${f} project`,", as the work item types it uses. They go into the backlog, not a sprint."]}),r.isLoading?t.jsx("p",{className:"note",children:"Working out what to send…"}):r.isError?t.jsxs("div",{className:"rq-err",role:"alert",children:["squad-kit could not work out what to send. ",Ii(r.error)," ",t.jsx("button",{className:"rq-link",onClick:()=>void r.refetch(),children:"Try again"})]}):k?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"rq-send",children:[t.jsxs("div",{className:"rq-li",children:[t.jsx("b",{children:k.counts.epics.all}),jh(k.levels.epic),t.jsx("span",{children:bh(k.counts.epics,k.first)})]}),k.counts.features.all>0&&t.jsxs("div",{className:"rq-li",children:[t.jsx("b",{children:k.counts.features.all}),jh(k.levels.feature),", each under its epic",t.jsx("span",{children:bh(k.counts.features,k.first)})]}),t.jsxs("div",{className:"rq-li",children:[t.jsx("b",{children:k.counts.stories.all}),jh(k.levels.story),", each under its ",k.counts.storiesUnderEpic?k.counts.features.all?"feature or epic":"epic":"feature",t.jsx("span",{children:k.first?'with "done when" as acceptance criteria':bh(k.counts.stories,!1)})]}),(k.first?k.counts.links:k.links)>0&&t.jsxs("div",{className:"rq-li",children:[t.jsx("b",{children:k.first?k.counts.links:k.links}),k.first?"Links between stories that need each other":"New links between stories that need each other",N&&t.jsxs("span",{children:['"',N,'"']})]})]}),B&&t.jsx("p",{className:"note",children:"Everything is sent already. Edit the breakdown and Send changes updates the same items."})]}):null,t.jsxs("div",{className:"rq-promise",children:[t.jsx("div",{children:"Each story's number, like AB#120, shows in the breakdown. When the squad builds a story, its item moves forward and gets the squad's notes, as tickets from the Backlog do today."}),t.jsxs("div",{children:["Edit the breakdown later and ",t.jsx("b",{children:"Send changes"})," updates the same items. squad-kit never deletes anything in ",f,"."]})]}),a&&(y||x||v)&&t.jsx("div",{className:`rq-sendprog ${v?"fail":""}`,role:"status",children:v?t.jsxs("span",{children:[t.jsx("b",{children:"The send stopped."})," ",c??m?.error??"Something went wrong on the way."," What was sent stays sent; Send again carries on without doubles."]}):x?t.jsxs("span",{children:[t.jsx("b",{children:"Sent."})," Each item's number shows in the breakdown now."]}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[w.phase==="links"?`${S.charAt(0).toUpperCase()}${S.slice(1)}`:`Sending${S?` ${S}`:""}`,"… You can close this: it carries on."]}),t.jsx("span",{className:"rq-pbar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":w.pct,"aria-label":"Sent so far",children:t.jsx("i",{style:{width:`${w.pct||5}%`}})})]})})]})}function nP({v:e,item:n,text:s,onClose:r}){const a=kt(),[o,c]=C.useState(s??""),u=n===e.id,d=u?null:Un(e,n),p=e.status==="approved"&&Eo(e).some(({story:m})=>m.ticket),f=()=>a.mutate({path:`${uu(e.id)}/items/${encodeURIComponent(n)}/redo`,body:{ask:o.trim()},done:`The Analyst is redoing ${u?"the breakdown":n}.`},{onSuccess:r});return t.jsxs(We,{title:u?"Ask the Analyst":`Ask the Analyst to redo ${n}`,onClose:r,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(ie,{text:`squad requirements redo ${e.id} ${n} ${Fe(o.trim()||"what to change")}`})}),t.jsx("button",{className:"btn",onClick:r,children:"Cancel"}),t.jsx("button",{className:"btn pri",disabled:!o.trim()||a.isPending,onClick:f,children:"Ask the Analyst"})]}),children:[t.jsxs("p",{children:[u?"Say what to change in the breakdown, or what to add. The Analyst rewrites it and keeps the keys of what stays.":`Say what to change in ${n} ${d?.item.title??""}. The Analyst rewrites it and keeps its key.`,p&&" Stories that started stay as they are."]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-ask",children:"What should change"}),t.jsx("textarea",{id:"rq-ask",className:"textarea",autoFocus:!0,value:o,onChange:m=>c(m.target.value),placeholder:u?"Add a story for staff to export bookings, under Admin and reports.":"Split it in two: one for holding the slot, one for freeing it."})]})]})}function sP({v:e,level:n,under:s,onClose:r,onAdded:a}){const o=kt(),c=C.useMemo(()=>n==="feature"?e.epics.map(k=>({key:k.key,label:`${k.key} ${k.title}`})):n==="story"?e.epics.flatMap(k=>[...k.features.map(N=>({key:N.key,label:`${k.title} › ${N.title}`})),{key:k.key,label:`${k.title}, straight under the epic`}]):[],[e.epics,n]),[u,d]=C.useState(s&&c.some(k=>k.key===s)?s:c.at(n==="story"?0:-1)?.key??""),[p,f]=C.useState(""),[m,y]=C.useState(""),x=n==="epic"?"an epic":`a ${n}`,v=()=>o.mutate({path:`${uu(e.id)}/items`,body:{title:p.trim(),...n!=="epic"?{under:u,level:n}:{},...m.trim()?n==="epic"?{goal:m.trim()}:n==="feature"?{summary:m.trim()}:{story:m.trim()}:{}}},{onSuccess:k=>{a(k.key),r()}});return t.jsxs(We,{title:`Add ${x}`,onClose:r,footer:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-fcmd",children:t.jsx(ie,{text:`squad requirements add-item ${e.id}${n!=="epic"?` --under ${u}`:""}${n==="feature"?" --feature":""} --title ${Fe(p.trim()||"…")}`})}),t.jsx("button",{className:"btn",onClick:r,children:"Cancel"}),t.jsxs("button",{className:"btn pri",disabled:!p.trim()||n!=="epic"&&!u||o.isPending,onClick:v,children:["Add ",x]})]}),children:[n!=="epic"&&t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-under",children:"Under"}),t.jsx("select",{id:"rq-under",className:"select",value:u,onChange:k=>d(k.target.value),children:c.map(k=>t.jsx("option",{value:k.key,children:k.label},k.key))})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-title",children:"Title"}),t.jsx("input",{id:"rq-title",className:"input",autoFocus:!0,value:p,onChange:k=>f(k.target.value),onKeyDown:k=>k.key==="Enter"&&p.trim()&&v()})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-about",children:n==="epic"?"What it is for":n==="feature"?"What it covers":"Story"}),t.jsx("textarea",{id:"rq-about",className:"textarea",value:m,onChange:k=>y(k.target.value),placeholder:n==="story"?"As a …, I want …, so that …":"One or two sentences"})]}),n==="story"&&t.jsx("p",{className:"note",children:'Add its "done when" checks on its panel before you approve.'})]})}function rP({v:e,onClose:n,onOpenRef:s,onAsk:r}){return t.jsxs(We,{title:`${e.leftOut.length} ${e.leftOut.length===1?"part":"parts"} left out`,onClose:n,children:[t.jsx("p",{children:"Parts of the BRD the breakdown leaves out on purpose, and why. Ask the Analyst to add one if it should be built."}),t.jsx("div",{className:"rq-leftout",children:e.leftOut.map((a,o)=>t.jsxs("div",{className:"rq-lo",children:[t.jsx("b",{children:a.text}),t.jsx("span",{children:a.why}),t.jsxs("div",{className:"rq-lo-acts",children:[a.ref&&t.jsx("button",{className:"rq-link",onClick:()=>s(a.ref),children:$o(a.ref)}),r&&t.jsxs("button",{className:"btn sm",onClick:()=>r(cx(a)),title:`squad requirements redo ${e.id} ${e.id} ${Fe(cx(a))}`,children:[t.jsx(En,{size:13})," Ask the Analyst to add it"]})]})]},o))})]})}function vy({items:e,ok:n}){return t.jsx("ul",{className:"rmlist",children:e.map(s=>t.jsxs("li",{children:[n?t.jsx(xe,{size:16,className:"ok","aria-hidden":!0}):t.jsx(Ze,{size:16,className:"x","aria-hidden":!0}),t.jsx("span",{children:s})]},s))})}function dj({id:e,title:n,sentTo:s,onClose:r,onDeleted:a}){const o=kt(),[c,u]=C.useState(null),d=()=>o.mutate({path:uu(e),method:"DELETE",quiet:!0,done:`Deleted ${e}.`},{onSuccess:()=>{r(),a?.()},onError:p=>u(Ii(p))});return Vc.createPortal(t.jsxs(We,{title:`Delete ${e}?`,icon:t.jsx("span",{className:"glyph",children:t.jsx(mn,{size:15})}),onClose:r,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn danger",disabled:o.isPending,onClick:d,children:[t.jsx(mn,{size:15})," ",o.isPending?"Deleting…":`Delete ${e}`]}),t.jsx("button",{className:"btn",onClick:r,children:c?"Keep it":"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad requirements delete ${e}`})]}),children:[t.jsx("p",{children:n}),c&&t.jsx("div",{className:"stuckbox rm-gap",role:"alert",children:c}),t.jsx("div",{className:"lbl",children:"This removes"}),t.jsx(vy,{items:["The breakdown: its epics, features and stories, and what was decided for you",`The document, its text and its pictures (.squad/requirements/${e})`,"What this computer kept about it: the Analyst's progress and the build switch"]}),t.jsx("div",{className:"lbl",children:"This stays"}),t.jsx(vy,{ok:!0,items:["Tickets that started from its stories, with their code and history",...s?[`Its items in ${s}: squad-kit never deletes there`]:[]]}),t.jsx("p",{className:"rm-note",children:"It cannot be deleted while its stories build. Wait until they merge, or delete those tickets first."})]}),document.body)}function hj({choices:e,label:n="More actions"}){const[s,r]=C.useState(!1),a=C.useRef(null);return C.useEffect(()=>{if(!s)return;const o=u=>a.current&&!a.current.contains(u.target)&&r(!1),c=u=>{u.key==="Escape"&&(u.preventDefault(),r(!1))};return document.addEventListener("mousedown",o),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",c)}},[s]),e.length?t.jsxs("span",{className:"more rq-more",ref:a,children:[t.jsx("button",{className:"iconbtn","aria-label":n,"aria-haspopup":"menu","aria-expanded":s,title:n,onClick:()=>r(!s),children:t.jsx(U2,{size:16})}),s&&t.jsx("div",{className:"more-menu",role:"menu",children:e.map(o=>t.jsx("button",{role:"menuitem",className:o.danger?"danger":"",title:o.title,onClick:()=>{r(!1),o.onPick()},children:o.label},o.key))})]}):null}function iP(e,n){return`${Fc(e.id,e.source.file)}${n?.page?`#page=${n.page}`:""}`}async function aP(e,n){const s=await fetch(Fc(e,n));if(!s.ok)throw new Error(s.status===404?"not found":`${s.status}`);return s.text()}function pj({v:e,at:n,onClose:s}){const[r,a]=C.useState(null),[o,c]=C.useState(null),u=C.useRef(null),d=Math.max(1,e.source.kind==="pdf"?0:e.source.pages??1);C.useEffect(()=>{let f=!0;const m=Array.from({length:d},(y,x)=>`text/part-${String(x+1).padStart(2,"0")}.md`);return Promise.all(m.map(y=>aP(e.id,y).catch(()=>""))).then(y=>{f&&(y.some(Boolean)||c("squad-kit could not open the text of this document. Download the original instead."),a(y))}).catch(()=>f&&c("squad-kit could not open the text of this document.")),()=>{f=!1}},[e.id,d]),C.useEffect(()=>{if(!r||!n||!u.current)return;const f=[...u.current.querySelectorAll("h1, h2, h3, h4, h5, h6")],m=x=>{const v=(x.textContent??"").trim().toLowerCase();return n.section&&(v===n.section.toLowerCase()||v.startsWith(`${n.section.toLowerCase()} `))||n.title&&v.includes(n.title.toLowerCase())},y=f.find(m);y&&(y.classList.add("rq-hit"),y.scrollIntoView({block:"start"}))},[r,n]);const p=f=>/^(https?:|data:)/.test(f)?f:Fc(e.id,f.replace(/^(\.\.\/)+/,""));return t.jsx(We,{wide:!0,title:e.source.name,onClose:s,footer:t.jsxs(t.Fragment,{children:[n&&t.jsx("span",{className:"note",children:$o(n)}),t.jsx("span",{className:"grow"}),t.jsxs("a",{className:"btn",href:Fc(e.id,e.source.file),target:"_blank",rel:"noreferrer",download:e.source.name,children:[t.jsx(ss,{size:14})," The original"]}),t.jsx("button",{className:"btn pri",onClick:s,children:"Close"})]}),children:t.jsx("div",{className:"rq-doc",ref:u,children:o?t.jsx("p",{className:"rq-err",children:o}):r?r.map((f,m)=>t.jsx(Mf,{remarkPlugins:[qf],components:{img:({src:y,alt:x})=>t.jsx("img",{src:y?p(y):"",alt:x??"",loading:"lazy"}),a:({href:y,children:x})=>t.jsxs("a",{href:y,target:"_blank",rel:"noreferrer",children:[x," ",t.jsx(es,{size:11})]})},children:f},m)):t.jsx("p",{className:"note",children:"Opening the document…"})})})}function fj(e){const[n,s]=C.useState(void 0);return{open:r=>{e&&(e.source.kind==="pdf"?window.open(iP(e,r),"_blank","noopener"):s(r??null))},viewer:n,close:()=>s(void 0)}}function oP(e,n,s){return Eo(e).filter(({story:r})=>r.key!==n&&!s.includes(r.key)).map(({story:r})=>({key:r.key,label:`${r.key} ${r.title}`}))}const lP={gap:"Missing in the BRD",clash:"Two parts clash",check:"A check failed"};function Zf(e){if(e.track!=="auto"||!e.waiting)return null;if(e.waiting.kind==="ask"&&e.agentQuestion?.kind&&!e.agentQuestion.answer)return e.agentQuestion.kind;const n=e.waiting.kind==="stuck"?e.stuck?.gate:void 0;return n==="checks"||n==="review"||n==="proof"?"check":null}function mj(e,n){return`/requirements/${encodeURIComponent(e)}${n?`?item=${encodeURIComponent(n)}`:""}`}function cP(e,n){for(const s of e?.epics??[]){for(const r of s.features)if(r.stories.some(a=>a.key===n))return[s.title,r.title,n].join(" › ");if(s.stories.some(r=>r.key===n))return[s.title,n].join(" › ")}return n}const jy=/\s*\(suggested\)\s*$/i;function uP(e){return e.map(n=>({text:n.replace(jy,""),suggested:jy.test(n)}))}function dP(e){return e.stage==="specs"?"planning":e.stage==="implement"?"building":e.stage==="test"?"testing":e.stage==="review"?"reviewing":"working"}function hP(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`}function pP(e,n){const s=e.epics.flatMap(c=>[...c.features.flatMap(u=>u.stories),...c.stories]),r=new Set(e.progress.filter(c=>c.state==="merged"||c.state==="released").map(c=>c.key)),a=new Set,o=c=>{for(const u of s)u.dependsOn.includes(c)&&!a.has(u.key)&&(a.add(u.key),o(u.key))};return o(n),s.filter(c=>a.has(c.key)&&!r.has(c.key)).map(c=>`${c.key} ${c.title}`)}function fP(e,n){if(!e||!n.breakdown)return"";const s=pP(e,n.breakdown.item),r=!!e.state.build?.on;return s.length?`${hP(s)} ${s.length===1?"waits":"wait"} for your answer.${r?" The other stories keep building.":""}`:r?"No other story waits for it: the others keep building.":""}function mP(e){return e.ticket||!e.page&&!e.section?null:{...e.section?{section:e.section}:{},...e.page?{page:e.page}:{}}}function gj(e){return Pe({queryKey:["requirements",e,"view"],queryFn:()=>Ee(`/api/v1/requirements/${e}`),enabled:!!e,refetchInterval:4e3})}function Xf({id:e,item:n,children:s,className:r}){const a=Xt(),o=mj(e,n),c=u=>{u.metaKey||u.ctrlKey||u.shiftKey||u.button!==0||(u.preventDefault(),a.navigate({href:`${no}${o}`}))};return t.jsx("a",{className:r,href:`${no}${o}`,onClick:c,children:s})}function gP({t:e}){return e.track==="auto"?t.jsx("span",{className:"autochip",children:"Builds by itself"}):t.jsxs(t.Fragment,{children:[t.jsx("b",{children:e.track==="express"?"Express":"Full"})," track"]})}function xP({t:e}){const n=gj(e.breakdown?.id).data;return e.breakdown?t.jsxs("div",{className:"brdplace",children:["From"," ",t.jsx(Xf,{id:e.breakdown.id,item:e.breakdown.item,children:e.breakdown.id})," ","› ",cP(n,e.breakdown.item)]}):null}function yP({t:e}){return e.track!=="auto"?null:t.jsx("span",{className:"prio auto",children:"Builds by itself"})}function kP({t:e}){return e.breakdown?t.jsxs("div",{className:"bkey",title:`From ${e.breakdown.id} › ${e.breakdown.item}`,children:[e.breakdown.id," › ",e.breakdown.item]}):null}function xj({kind:e}){return t.jsx("span",{className:`stoptag ${e}`,children:lP[e]})}function vP({t:e,extra:n}){const s=fe(),r=e.agentQuestion,a=r.kind,o=gj(e.breakdown?.id).data,c=uP(r.options),[u,d]=C.useState(()=>c.find(k=>k.suggested)?.text??null),[p,f]=C.useState(""),m=rt[r.from],y=u===""?p.trim():u,x=fP(o,e),v=fj(o);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("section",{className:"stopcard","aria-label":"Needs you",children:[t.jsxs("div",{className:"stophead",children:[t.jsx(xj,{kind:a}),t.jsxs("span",{children:["The ",m," found it while ",dP(e),", ",Zt(r.at)]})]}),t.jsx("p",{className:"stuckq",children:r.text}),t.jsx(jP,{list:r.sources,onOpenRef:o?v.open:void 0}),r.files&&r.files.length>0&&t.jsx(Hv,{ticket:e.id,files:r.files}),t.jsxs("div",{className:"opts2",children:[c.map(k=>t.jsxs("button",{className:`opt2 ${u===k.text?"pick":""}`,onClick:()=>d(k.text),"aria-pressed":u===k.text,children:[t.jsx("b",{children:k.text}),(k.suggested||u===k.text)&&t.jsxs("span",{className:"optfoot",children:[k.suggested&&t.jsxs("span",{className:"rec",children:[m," suggests"]}),u===k.text&&t.jsxs("span",{className:"yourpick",children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Your pick"]})]})]},k.text)),t.jsx("button",{className:`opt2 ${u===""?"pick":""}`,onClick:()=>d(""),"aria-pressed":u==="",children:t.jsx("b",{children:"Something else…"})})]}),u===""&&t.jsx("textarea",{className:"input",rows:3,style:{width:"100%"},autoFocus:!0,value:p,placeholder:"Your answer",onChange:k=>f(k.target.value)}),(r.why||x)&&t.jsx("p",{className:"stopwhy",children:[r.why,x].filter(Boolean).join(" ")})]}),t.jsx(Jf,{t:e}),n]}),o&&v.viewer!==void 0&&Vc.createPortal(t.jsx(pj,{v:o,at:v.viewer??void 0,onClose:v.close}),document.body),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn you",disabled:!y||s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:y},done:`Sent. The ${m} carries on.`}),children:[t.jsx(ls,{size:15})," Answer"]}),!e.chat?.open&&t.jsx(Yr,{t:e,agent:r.from,label:"Ask about this"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad reply ${e.id}${y?` ${Fe(y.length>40?`${y.slice(0,40)}…`:y)}`:""}`})]})]})}function jP({list:e,onOpenRef:n}){return e?.length?t.jsxs("p",{className:"stopsrc",children:["Sources:"," ",e.map((s,r)=>{const a=mP(s);return t.jsxs("span",{children:[r>0&&" · ",s.ticket?t.jsx($e,{to:"/board",search:{ticket:s.ticket},children:s.text}):a&&n?t.jsx("button",{className:"linkbtn",onClick:()=>n(a),title:"Open this place in the document",children:s.text}):s.text]},`${s.text}-${r}`)})]}):null}function yj(e){return e.by==="answer"?"from your answer":`${e.by.charAt(0).toUpperCase()}${e.by.slice(1)}`}function bP({d:e}){const n=e.changed?.ticket;return n?/^c\d+$/.test(n)?t.jsxs("span",{className:"became",children:["It became change ",n," on this ticket."]}):t.jsxs("span",{className:"became",children:["It became"," ",t.jsx($e,{to:"/board",search:{ticket:n},children:n}),", linked to this one."]}):null}function Jf({t:e}){const n=Hi(),[s,r]=C.useState(null),a=e.decided??[];if(!a.length)return null;const o=qn(e,n)||!n;return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Decided for you on this story"}),t.jsx("ul",{className:"decided",children:a.map(c=>t.jsxs("li",{children:[t.jsxs("span",{className:"dwho",children:[yj(c)," · ",Zt(c.at)]}),c.changed?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"was",children:c.text}),t.jsxs("span",{children:[t.jsx("b",{children:"Now:"})," ",c.changed.text]}),t.jsx(bP,{d:c})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{children:c.text}),o&&t.jsx("button",{className:"linkbtn",onClick:()=>r(c),children:"Change"})]})]},c.id))}),s&&t.jsx(wP,{t:e,d:s,onClose:()=>r(null)})]})}function wP({t:e,d:n,onClose:s}){const r=fe(),{toast:a}=_e(),[o,c]=C.useState(""),u=Es(e),d=o.trim();return t.jsxs(We,{title:"Change what was decided",icon:t.jsx(rs,{size:16}),onClose:s,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:!d||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/decided/${n.id}`,body:{text:d}},{onSuccess:p=>{a($k(e.id,p?.decided?.find(f=>f.id===n.id)?.changed?.ticket)),s()}}),children:[t.jsx(rs,{size:15})," Change it"]}),t.jsx("button",{className:"btn",onClick:s,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad decided ${e.id} ${n.id} ${Fe(d||"what you want instead")}`})]}),children:[t.jsx("p",{className:"note",style:{marginBottom:8},children:n.by==="answer"?"From your answer, the squad decided:":`The ${yj(n)} decided:`}),t.jsx("div",{className:"decidedq",children:n.text}),t.jsx("label",{className:"lbl",htmlFor:"decided-instead",style:{marginTop:0},children:"What do you want instead?"}),t.jsx("textarea",{id:"decided-instead",className:"input",rows:3,style:{width:"100%"},autoFocus:!0,value:o,onChange:p=>c(p.target.value),placeholder:"For example: the refund goes back as store credit"}),t.jsx("p",{className:"note",style:{marginTop:8},children:u?`${e.id} is merged, so this becomes a new ticket linked to it.`:"It becomes a small change on this ticket: the Analyst writes it into the spec, you approve it, and the Builder makes it."})]})}function du(){return Pe({queryKey:["requirements","waiting"],queryFn:()=>Ee("/api/v1/requirements/waiting"),enabled:!!hn,refetchInterval:3e3}).data?.breakdowns??[]}function kj(){const n=(Pe({queryKey:["app","projects"],queryFn:()=>Ee("/api/v1/app/projects"),refetchInterval:2e3}).data?.projects??[]).filter(r=>r.open);return J4({queries:n.map(r=>({queryKey:["app","requirements-waiting",r.id],queryFn:()=>Ee(`/p/${encodeURIComponent(r.id)}/api/v1/requirements/waiting`),refetchInterval:3e3,retry:!1}))}).flatMap((r,a)=>(r.data?.breakdowns??[]).map(o=>({...o,project:{id:n[a].id,name:n[a].name}})))}function vj(e){return`/p/${encodeURIComponent(e.project.id)}${mj(e.id)}`}function NP(e){return`squad requirements answer ${e.id}${e.project?` --project ${qi(e.project.name)}`:""}`}function Dp(e){return`The Analyst has ${e.questions} ${e.questions===1?"question":"questions"}`}function SP({w:e}){return t.jsxs("div",{className:"yitem",title:`${e.project?`${e.project.name} · `:""}${e.id} · ${e.title}
|
|
618
|
+
${Dp(e)}`,children:[t.jsx("span",{className:"yid",children:e.project?`${e.project.name} · ${e.id}`:e.id}),t.jsx("span",{className:"yline",children:Dp(e)}),e.project?t.jsx("a",{className:"btn sm you",href:vj(e),children:"Answer"}):t.jsx(Xf,{id:e.id,className:"btn sm you",children:"Answer"})]})}function jj({w:e}){return t.jsxs("div",{className:"wcard",style:{padding:"16px 18px 16px 22px"},children:[t.jsxs("div",{className:"grow",children:[t.jsxs("div",{className:"meta",children:[e.project&&t.jsx("span",{className:"pill sm",children:e.project.name}),t.jsx("span",{className:"id",children:e.id}),t.jsx("span",{children:"Requirements"}),t.jsx("span",{children:Zt(e.since)})]}),t.jsx("h3",{children:e.title}),t.jsxs("p",{children:[Dp(e),". It writes the breakdown once you answer."]})]}),t.jsx(ie,{text:NP(e)}),e.project?t.jsx("a",{className:"btn pri sm",href:vj(e),children:"Answer"}):t.jsx(Xf,{id:e.id,className:"btn pri sm",children:"Answer"})]})}function bj({t:e}){const n=Zf(e);return n?t.jsx(xj,{kind:n}):null}function wj(){return Pe({queryKey:["app","waiting"],queryFn:()=>Ee("/api/v1/app/waiting"),refetchInterval:2e3})}function by(){const e=Ye(),n=kc({select:o=>o.location.pathname}),s=e.data?.ready?e.data:null,r=C.useMemo(()=>(s?.tickets??[]).filter(Co).map(o=>({key:o.id,since:pk(o),ticket:o})),[s]),a=du();return Nj(s?.meta.project,r.length+a.length),Ej(),n.startsWith("/inbox")?null:t.jsx(Sj,{items:r,breakdowns:a})}function CP(){const e=wj(),n=C.useMemo(()=>(e.data?.items??[]).map(({project:r,ticket:a})=>({key:`${r.id}/${a.id}`,since:pk(a),ticket:a,project:r})),[e.data]),s=kj();return Nj("squad-kit",n.length+s.length),Ej(),t.jsx(Sj,{items:n,breakdowns:s,home:!0})}function Nj(e,n){C.useEffect(()=>{e&&(document.title=U6(e,n))},[e,n])}function $P(e){const[n,s]=C.useState(Date.now);return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),e);return()=>clearInterval(r)},[e]),n}function Sj({items:e,home:n,breakdowns:s=[]}){const[r]=C.useState(()=>new H6),a=$P(3e4),o=C.useMemo(()=>r.sort(e),[r,e]),c=o.length+s.length;if(!c)return null;const u=o.slice(0,2),d=s.slice(0,2-u.length),p=c-u.length-d.length,f=c===1?"1 thing needs you":`${c} things need you`,m=y=>p>0&&(n?t.jsxs("button",{className:`ymore ${y}`,onClick:()=>document.getElementById("waiting")?.scrollIntoView({behavior:"smooth",block:"start"}),children:["and ",p," more"]}):t.jsxs($e,{to:"/inbox",className:`ymore ${y}`,children:["and ",p," more"]}));return t.jsxs("section",{className:"ybar","aria-label":"Waiting for you",children:[t.jsx("span",{className:"ybar-n","aria-hidden":!0,children:c}),t.jsx("b",{className:"ybar-t","aria-live":"polite",title:n?"The squads keep working on everything else meanwhile.":"The squad keeps working on everything else meanwhile.",children:f}),t.jsxs("div",{className:"ybar-items",children:[u.map(y=>t.jsx(EP,{it:y,now:a},y.key)),d.map(y=>t.jsx(SP,{w:y},`${y.project?.id??""}/${y.id}`))]}),m("ymore-row"),t.jsx(RP,{})]})}function EP({it:e,now:n}){const s=e.ticket,r=Ss(s)?Ur(s):void 0,a=s.waiting?.summary??(r?`Change ${r.id} to the spec waits for you`:as(s)?mf(s):s.outdated?.length?pf(s):`Looks stuck: ${s.quiet?.detail??"no progress"}`),o=s.waiting?Cc(s):r?"Check the change":"Check it",c=s.waiting?.kind==="ask"&&s.agentQuestion?`“${s.agentQuestion.text}”`:s.title,u=[e.project?.name,s.id,$s[s.stage],W6(e.since,n)].filter(Boolean).join(" · ");return t.jsxs("div",{className:"yitem",title:`${u}
|
|
619
|
+
${a}
|
|
620
|
+
${c}`,children:[t.jsx("span",{className:"yid",children:e.project?`${e.project.name} · ${s.id}`:s.id}),t.jsx("span",{className:"yline",children:Zf(s)?t.jsxs(t.Fragment,{children:[t.jsx(bj,{t:s}),s.title]}):a}),e.project?t.jsx("a",{className:"btn sm you",href:mk(e.project.id,s),children:o}):s.waiting?.kind==="proof"?t.jsx($e,{to:"/tickets/$id/proof",params:{id:s.id},className:"btn sm you",children:o}):t.jsx($e,{to:"/board",search:{ticket:s.id},className:"btn sm you",children:o})]})}const Cj="sk.notices";function ho(){try{return window.localStorage}catch{return null}}function em(){const e=ho()?.getItem(Cj);return e==="on"||e==="off"?e:null}function tm(){return typeof Notification>"u"?window.isSecureContext===!1?"insecure":"none":window.isSecureContext===!1?"insecure":Notification.permission}let nm=!1;function wy(e){nm=e,$j()}const Bp=new Set,$j=()=>Bp.forEach(e=>e());function TP(e){return Bp.add(e),window.addEventListener("storage",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{Bp.delete(e),window.removeEventListener("storage",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}const AP=()=>`${em()??""}|${tm()}|${nm?"asking":""}`;function Vh(e){try{ho()?.setItem(Cj,e)}catch{}$j()}function PP(){try{new Notification("Desktop notices are on",{body:"squad-kit shows one like this for each new thing that needs you.",tag:"sk-notices-on",silent:!0})}catch{}}function sm(){const{toast:e}=_e(),[n,s,r]=C.useSyncExternalStore(TP,AP).split("|"),a=n||null;return{choice:a,permission:s,asking:r==="asking",on:a==="on"&&s==="granted",canAsk:a===null&&(s==="default"||s==="granted"),turnOn:async()=>{if(nm)return;wy(!0);let c="error";try{c=await t8(typeof Notification>"u"?void 0:Notification,{secure:window.isSecureContext!==!1})}finally{wy(!1)}const u=n8(c);u.choice&&Vh(u.choice),u.test&&PP(),e(u.say,u.bad?"err":void 0)},turnOff:()=>{Vh("off"),e("Desktop notices are off")},notNow:()=>{Vh("off"),e("No desktop notices. Turn them on in Settings any time.")}}}function RP(){const e=sm();return!e.canAsk&&!e.asking?null:t.jsxs("div",{className:"ybar-ask","aria-live":"polite",title:e.asking?gk:"Get a desktop notice when the squad needs you",children:[t.jsx(fp,{size:14}),t.jsx("button",{className:"linkbtn",disabled:e.asking,onClick:()=>void e.turnOn(),children:e.asking?"Waiting for your browser…":"Desktop notices"}),!e.asking&&t.jsx("button",{className:"linkbtn quiet",onClick:e.notNow,"aria-label":"No desktop notices",children:"Not now"})]})}function IP(){const e=sm();return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Desktop notices"}),t.jsx("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:e.permission==="none"?t.jsx("span",{className:"note",children:"This browser can't show desktop notices. The banner and the tab title still show what needs you."}):e.permission==="insecure"?t.jsx("span",{className:"note",children:"Your browser shows desktop notices only on a secure page. Open the board on this computer, at its 127.0.0.1 or localhost address, to turn them on."}):e.permission==="denied"?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"pill you",children:"Blocked by your browser"}),t.jsx("span",{className:"note",children:Ba})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn sm",disabled:e.asking,onClick:()=>e.on?e.turnOff():void e.turnOn(),children:e.asking?"Waiting for your browser…":e.on?"On: turn them off":"Off: turn them on"}),t.jsx("span",{className:"note","aria-live":"polite",children:e.asking?gk:e.choice==="on"&&e.permission==="default"?`You turned them on, but your browser has not allowed them yet. ${Ba}`:"A notice for each new question, approval, proof and failure, in this browser. No sounds."})]})})]})}const zP=new Z6;function Ej(){FP();const e=wj(),n=Jt(),s=e.data;C.useEffect(()=>{if(!s)return;const r=zP.next(G6(s.items),Date.now());if(!r.length||em()!=="on"||tm()!=="granted")return;const a=o=>{if(o.project.id!==hn)return window.location.assign(mk(o.project.id,o.ticket));if(o.ticket.waiting?.kind==="proof")return void n({to:"/tickets/$id/proof",params:{id:o.ticket.id}});n({to:"/board",search:{ticket:o.ticket.id}})};for(const o of r)fk(o.key,Date.now(),ho())&&MP(o,a)},[s,n])}function MP(e,n){const{title:s,body:r}=J6(e);Tj(s,r,e.key,()=>n(e))}function Tj(e,n,s,r){try{const a=new Notification(e,{body:n,tag:s,silent:!0});a.onclick=()=>{window.focus(),a.close(),r()}}catch{}}function FP(){const e=io(ho()).length>0,s=Pe({queryKey:["app","projects"],queryFn:()=>Ee("/api/v1/app/projects"),refetchInterval:2e3,enabled:e}).data;C.useEffect(()=>{if(!s)return;const r=ho();for(const a of o8(s.projects,io(r))){if(a8(r,a.id),em()!=="on"||tm()!=="granted"||!fk(`setup/${a.id}`,Date.now(),r))continue;const{title:o,body:c}=l8(a.name);Tj(o,c,`setup/${a.id}`,()=>window.location.assign(`/p/${encodeURIComponent(a.id)}/overview`))}},[s])}function po(e=""){return Pe({queryKey:["conversations",e],queryFn:()=>Ee(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`),refetchInterval:1500})}function rm(e,n){if(!e.open)return 0;const s=n[e.id];return s===void 0?e.fresh:Math.min(e.fresh,Math.max(0,e.count-s))}function LP(){const e=eu(),n=Di(Bi),s=po();return!n&&!e.min&&(s.data??[]).some(r=>r.open)}function _P(e){const n=rt[e.with];return e.thinking?`The ${n} is typing on ${e.id}`:e.yourTurn?`The ${n} answered on ${e.id}`:`${n} on ${e.id}`}function OP(){const e=eu(),n=Di(Bi),s=Jt(),r=po(),[a,o]=C.useState(null),c=C.useRef(null),u=(r.data??[]).filter(m=>m.open),d=u.find(m=>m.id===e.tab)??u[0];if(C.useEffect(()=>{c.current?.querySelector(".ctab.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[d?.id,e.min]),!d)return null;const p=m=>void s({to:"/conversations",search:{ticket:m}});if(e.min||n){const m=u.find(y=>y.thinking)??u.find(y=>y.yourTurn)??d;return t.jsxs("div",{className:"cmini",role:"status",children:[t.jsx($n,{role:m.with,small:!0,live:m.thinking}),t.jsxs("div",{children:[t.jsxs("b",{children:[u.length," ",u.length===1?"conversation":"conversations"]}),t.jsx("small",{children:_P(m)})]}),t.jsx("button",{className:"btn pri sm",onClick:()=>n?p(m.id):Jn.restore(),children:"Open"})]})}const f=m=>{m.preventDefault();const y=m.clientX,x=e.width,v=N=>Jn.resize(x+(y-N.clientX)),k=()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",k),document.body.classList.remove("cresizing")};document.body.classList.add("cresizing"),window.addEventListener("mousemove",v),window.addEventListener("mouseup",k)};return t.jsxs(t.Fragment,{children:[a&&t.jsx(Hf,{doc:a,onClose:()=>o(null)}),t.jsxs("section",{className:"cdock",style:{width:e.width},"aria-label":"Conversations",children:[t.jsx("span",{className:"cgrip",onMouseDown:f,"aria-hidden":"true"}),t.jsxs("div",{className:"ctabs",children:[t.jsx("div",{className:"ctabscroll",role:"tablist","aria-label":"Open conversations",ref:c,children:u.map(m=>{const y=m.id===d.id,x=rm(m,e.seen);return t.jsxs("button",{className:`ctab ${y?"on":""}`,role:"tab","aria-selected":y,onClick:()=>Jn.pick(m.id),title:`${m.id} · ${m.title}`,children:[t.jsx($n,{role:m.with,small:!0}),t.jsx("span",{className:"tid",children:m.id}),t.jsx("span",{className:"tn",children:rt[m.with]}),m.thinking&&!y&&t.jsxs("span",{className:`cdots sm c-${m.with}`,"aria-label":"Typing",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),x>0&&!y&&t.jsx("span",{className:"cbadge","aria-label":`${x} unread`,children:x})]},m.id)})}),t.jsx(Aj,{}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn",onClick:()=>p(d.id),"aria-label":"Open full screen",title:"Full screen",children:t.jsx(Yc,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:Jn.minimize,"aria-label":"Minimize",title:"Minimize",children:t.jsx(jo,{size:16})})]}),t.jsx(Gf,{id:d.id,size:"panel",onOpenDoc:o},d.id)]})]})}function Aj(){const e=Ye(),n=fe(),[s,r]=C.useState(!1),[a,o]=C.useState(""),[c,u]=C.useState("analyst"),d=(e.data?.ready?e.data.tickets:[]).filter(f=>!f.chat?.open&&!f.takenOver),p=()=>n.mutate({path:`/api/v1/tickets/${a}/chat/start`,body:{with:c}},{onSuccess:()=>{r(!1),Jn.show(a)}});return t.jsxs("span",{className:"cmenu-w",children:[t.jsx("button",{className:"iconbtn",onClick:()=>r(!s),"aria-label":"Start a new conversation",title:"Start a new conversation","aria-expanded":s,children:t.jsx(Nt,{size:16})}),s&&t.jsxs("div",{className:"cmenu cnew",role:"dialog","aria-label":"Start a new conversation",children:[t.jsxs("label",{children:[t.jsx("span",{children:"Ticket"}),t.jsxs("select",{className:"input",value:a,onChange:f=>o(f.target.value),children:[t.jsx("option",{value:"",children:"Pick a ticket"}),d.map(f=>t.jsxs("option",{value:f.id,children:[f.id," · ",f.title]},f.id))]})]}),t.jsxs("label",{children:[t.jsx("span",{children:"Talk to"}),t.jsx("select",{className:"input",value:c,onChange:f=>u(f.target.value),children:Object.keys(rt).map(f=>t.jsxs("option",{value:f,children:["The ",rt[f]]},f))})]}),t.jsxs("div",{className:"cbtns",children:[t.jsx("button",{className:"btn pri sm",disabled:!a||n.isPending,onClick:p,children:"Start talking"}),t.jsx("button",{className:"btn sm",onClick:()=>r(!1),children:"Cancel"})]})]})]})}const Pj=["app","usage-limit"];function Rj(){return Pe({queryKey:Pj,queryFn:()=>Ee("/api/v1/app/usage-limit"),refetchInterval:5e3})}function Ij(){const{data:e}=Rj(),n=os(),{toast:s}=_e();if(!e?.pause||!e.text)return null;const r=async()=>{try{n.setQueryData(Pj,await wt("/api/v1/app/usage-limit/try-now","POST")),n.invalidateQueries(),s("The squad carries on now. If the limit is still there, it waits again by itself.")}catch(a){s(a instanceof Error?a.message:String(a),"err")}};return t.jsxs("section",{className:"upd failed",role:"status","aria-label":"The usage limit is reached",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(gp,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsx("b",{className:"upd-title",children:e.text}),t.jsxs("span",{className:"upd-sub",children:["Every project waits, because they share one ",e.pause.name," account. Nothing is lost, and the wait does not count as a failed try.",e.pause.resetsAt?"":" squad-kit looks again every 10 minutes."]})]}),t.jsxs("div",{className:"upd-acts",children:[t.jsx("button",{className:"btn sm",onClick:()=>void r(),children:"Try now"}),t.jsx(ie,{text:"squad try-now"})]})]})}function zj(e){return Pe({queryKey:["happened",e.id],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/happened`),refetchInterval:e.live?5e3:15e3})}function hu(e){const n=Math.max(0,Math.round(e));if(n<60)return`${Math.max(1,n)} s`;if(n<600)return n%60?`${Math.floor(n/60)} min ${n%60} s`:`${n/60} min`;if(n<3600)return`${Math.round(n/60)} min`;const s=Math.round(n%3600/60);return s?`${Math.floor(n/3600)} h ${s} min`:`${Math.floor(n/3600)} h`}function qP({t:e,onTab:n,onLog:s}){const r=zj(e);return r.data?r.data.steps.length?t.jsxs("div",{className:"happened",children:[r.data.steps.map((a,o)=>t.jsx(DP,{s:a,t:e,onTab:n,onLog:s},`${a.step}-${a.from??a.to??o}`)),t.jsx("p",{className:"note happened-foot",children:"Engineers: Full log shows every action the agents took, with commands, file changes and their exact words, and how to open each session in a terminal."})]}):t.jsx("p",{className:"note",children:"Nothing has happened yet. The first card comes when the first step ends, for example the Analyst's questions."}):t.jsx("p",{className:"note",children:r.isError?"Could not read what happened. It tries again by itself.":"Loading…"})}function DP({s:e,t:n,onTab:s,onLog:r}){const a=e.seconds!==void 0?hu(e.seconds):"",o=[e.running?`now${a?` · ${a}`:""}`:a,...e.notes].filter(Boolean).join(" · ");return t.jsxs("article",{className:`hstep ${e.running?"now":""}`,"aria-label":e.name,children:[t.jsxs("div",{className:"hhd",children:[e.running?t.jsx("span",{className:"hring","aria-label":"Working now"}):t.jsx("span",{className:"hok","aria-label":"Done",children:t.jsx(xe,{size:11,strokeWidth:3})}),t.jsx("b",{children:e.name}),o&&t.jsx("span",{children:o}),t.jsx("span",{className:"grow"}),e.to&&!e.running&&t.jsx("span",{className:"hat",children:Tn(e.to)})]}),t.jsx("p",{className:"hsum",children:e.summary}),e.handedIn&&t.jsx(UP,{h:e.handedIn,tab:e.tab,onTab:s,ticket:n}),e.session&&(e.actions??0)>0&&t.jsxs("button",{className:"linkbtn hmore",onClick:()=>r(e.session),children:["What it looked at and said (",e.actions," ",e.actions===1?"action":"actions",")"]}),e.skipped?t.jsxs("div",{className:"hskip",children:[t.jsx(jo,{size:12})," Skipped ",e.skipped===1?"one action":`${e.skipped} actions`," this step may not take (by design, nothing went wrong)"]}):null]})}const BP={plan:"Open it in Plan",changes:"See the changes",proof:"Open it in Proof"};function im(e,n=3){const[s,r]=C.useState(!1),a=e.length-n;return{shown:s?e:e.slice(0,n),more:a>0?t.jsx("button",{className:"linkbtn",onClick:()=>r(!s),children:s?"Show less":`+${a} more`}):null}}function UP({h:e,tab:n,onTab:s,ticket:r}){if(e.kind==="verdict")return t.jsx("div",{className:"hverdict",children:t.jsx(Ny,{h:e,ticket:r})});const a=n&&s?t.jsx("button",{className:"linkbtn",onClick:()=>s(n),children:e.kind==="checks"?"See them in Proof":BP[n]}):null;return t.jsxs("div",{className:"hgot",children:[t.jsx("b",{children:"Handed in"}),t.jsx(Ny,{h:e,ticket:r}),a&&t.jsx("div",{className:"hlink",children:a})]})}function Ny({h:e,ticket:n}){switch(e.kind){case"questions":return t.jsx(WP,{items:e.items});case"spec":return t.jsx(HP,{story:e.story,criteria:e.criteria});case"design":return t.jsx(VP,{h:e});case"files":return t.jsx(KP,{h:e});case"checks":return t.jsxs("span",{children:[t.jsx("span",{className:`pill ${e.ok?"ok":"bug"}`,children:e.ok?"Pass":"Failed"})," ",e.text]});case"verdict":return t.jsxs("span",{children:[t.jsx("span",{className:`pill ${e.approved?"ok":"you"}`,children:e.approved?"Approved":"Asked for fixes"}),e.notes.length>0&&t.jsx("ul",{className:"hlist",children:e.notes.map((s,r)=>t.jsx("li",{children:s},r))})]});case"shots":return t.jsx(YP,{shots:e.shots,ticket:n})}}function WP({items:e}){const{shown:n,more:s}=im(e);return t.jsxs(t.Fragment,{children:[t.jsx("ol",{className:"hlist",children:n.map((r,a)=>t.jsxs("li",{children:[r.text,r.answer&&t.jsxs("span",{className:"hans",children:["You: ",r.answer]})]},a))}),s]})}function HP({story:e,criteria:n}){const{shown:s,more:r}=im(n);return t.jsxs(t.Fragment,{children:[e&&t.jsx("p",{className:"hstory",children:e}),n.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"hsub",children:"Done when"}),t.jsx("ul",{className:"hlist",children:s.map((a,o)=>t.jsx("li",{children:a},o))}),r]})]})}function VP({h:e}){const{shown:n,more:s}=im(e.steps),r=[e.mockup?"With a mockup":"",e.follows.length?`Follows ${e.follows.join(", ")}`:"",e.adr?`Saved as ${e.adr}`:""].filter(Boolean);return t.jsxs(t.Fragment,{children:[e.title&&t.jsxs("p",{className:"hstory",children:[t.jsx("b",{children:e.title}),e.chosen?`: ${e.chosen}`:""]}),e.steps.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"hsub",children:[e.steps.length," ",e.steps.length===1?"step":"steps"," to build"]}),t.jsx("ol",{className:"hlist",children:n.map((a,o)=>t.jsx("li",{children:a},o))}),s]}),r.length>0&&t.jsx("span",{className:"hsub",children:r.join(" · ")})]})}function KP({h:e}){const n=[["New",e.added],["Changed",e.changed],["Removed",e.removed]].filter(([,s])=>s.length);return n.length?t.jsx("span",{className:"hfiles",children:n.map(([s,r])=>t.jsxs("span",{children:[s,": ",t.jsx("span",{className:"mono",children:r.slice(0,8).join(", ")}),r.length>8?` and ${r.length-8} more`:""]},s))}):t.jsx("ol",{className:"hlist",children:e.steps.map((s,r)=>t.jsx("li",{children:s},r))})}function YP({shots:e,ticket:n}){const[s,r]=C.useState(null),a=e.map(o=>({src:ws(`/api/v1/proof/${o.file}`),caption:o.criterion}));return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hshots",children:a.map((o,c)=>t.jsxs("button",{className:"zoom",onClick:()=>r(c),"aria-label":`Open the screenshot for ${o.caption} full size`,children:[t.jsx("img",{src:o.src,alt:`${n.id}: ${o.caption}`,loading:"lazy"}),t.jsx("small",{children:o.caption})]},o.src))}),s!==null&&t.jsx(Kr,{pictures:a,start:s,onClose:()=>r(null)})]})}const QP={questions:"Questions",spec:"Spec",scan:"Reading the project",design:"Design",blueprint:"Stack and patterns",build:"Build",fix:"Fixes",review:"Review",proof:"Proof",chat:"Talking it through",draft:"Filling in a new ticket"},GP=["analyst","architect","builder","reviewer","tester"];function am(e){return e?.payment==="api-key"?"What the work cost on your API key, at its prices.":`What the work would cost at API prices. Your ${e?.name??"AI"} plan covers it, so this is a value, not a bill.`}function Mj(e,n){e.runs+=n.runs;for(const s of["inputTokens","cachedTokens","outputTokens","costUsd"])n[s]!==void 0&&(e[s]=(e[s]??0)+n[s]);n.tokensUnknown&&(e.tokensUnknown=(e.tokensUnknown??0)+n.tokensUnknown),n.costUnknown&&(e.costUnknown=(e.costUnknown??0)+n.costUnknown)}function om(e){const n={runs:0};for(const s of e)Mj(n,s);return n}function Fj(e){return GP.flatMap(n=>{const s=e.filter(a=>a.role===n);if(!s.length)return[];const r=[];for(const a of s){let o=r.find(c=>c.level===a.level&&c.model===a.model);o||r.push(o={level:a.level,model:a.model,steps:[],total:{runs:0}}),o.steps.includes(a.step)||o.steps.push(a.step),Mj(o.total,a)}return[{role:n,total:om(s),levels:r}]})}function zi(e){return e.costUsd===void 0?null:e.costUsd<.005?"under $0.01":`$${e.costUsd.toFixed(2)}`}function tc(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}const Up=e=>`${e} ${e===1?"run":"runs"}`;function Sy({t:e}){const n=zi(e);return n?t.jsxs("span",{title:e.costUnknown?`${Up(e.costUnknown)} did not report a cost, so the real amount is higher`:void 0,children:[n,e.costUnknown?t.jsxs("span",{className:"note",children:[" +",e.costUnknown," not reported"]}):null]}):t.jsx("span",{className:"note",children:"Not reported"})}function Cy({t:e}){if(e.inputTokens===void 0&&e.outputTokens===void 0)return t.jsx("span",{className:"note",children:"Not reported"});const n=e.cachedTokens?`, ${tc(e.cachedTokens)} of it read again from earlier in the conversation, which costs less`:"";return t.jsxs("span",{title:`Tokens are the pieces of text the AI reads and writes. It read ${tc(e.inputTokens??0)}${n}.`,children:[e.inputTokens!==void 0&&t.jsxs(t.Fragment,{children:[tc(e.inputTokens)," read"]}),e.inputTokens!==void 0&&e.outputTokens!==void 0&&" · ",e.outputTokens!==void 0&&t.jsxs(t.Fragment,{children:[tc(e.outputTokens)," written"]})]})}function ZP({level:e,model:n}){return n?t.jsxs(t.Fragment,{children:[n," ",t.jsx("span",{className:"note",children:e})]}):t.jsx(t.Fragment,{children:e})}function lm({roles:e,total:n,steps:s}){return t.jsxs("table",{className:"table usage",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:"Role"}),t.jsx("th",{children:"Model level"}),t.jsx("th",{children:s?"What it did":"Runs"}),t.jsx("th",{children:"Tokens"}),t.jsx("th",{className:"num",children:"Cost"})]})}),t.jsx("tbody",{children:e.flatMap(r=>r.levels.map((a,o)=>t.jsxs("tr",{children:[t.jsx("td",{children:o===0&&t.jsxs("span",{className:"who",children:[t.jsx(Br,{role:r.role,small:!0})," ",Ns[r.role]]})}),t.jsx("td",{children:t.jsx(ZP,{level:a.level,model:a.model})}),t.jsx("td",{children:s?t.jsxs(t.Fragment,{children:[a.steps.map(c=>QP[c]??c).join(", "),t.jsxs("span",{className:"note",children:[" · ",Up(a.total.runs)]})]}):a.total.runs}),t.jsx("td",{children:t.jsx(Cy,{t:a.total})}),t.jsx("td",{className:"num",children:t.jsx(Sy,{t:a.total})})]},`${r.role}-${a.level}-${a.model}`)))}),t.jsx("tfoot",{children:t.jsxs("tr",{children:[t.jsx("td",{children:"Total"}),t.jsx("td",{}),t.jsx("td",{children:s?t.jsx("span",{className:"note",children:Up(n.runs)}):n.runs}),t.jsx("td",{children:t.jsx(Cy,{t:n})}),t.jsx("td",{className:"num",children:t.jsx(Sy,{t:n})})]})})]})}function Vi(){return Pe({queryKey:["cost"],queryFn:()=>Ee("/api/v1/cost"),refetchInterval:1e4})}function XP({t:e}){const n=Vi().data?.payment,s=e.usage??[],r=om(s),a=zi(r);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["What it used",s.length>0&&t.jsx("span",{className:"pill",children:a?n?.payment==="api-key"?`${a} on your API key`:`Included in your plan · ${a} value`:"Cost not reported"})]}),s.length?t.jsxs(t.Fragment,{children:[t.jsx(lm,{roles:Fj(s),total:r,steps:!0}),t.jsxs("p",{className:"note",style:{marginTop:8},children:[am(n)," Each role's model level can be changed on the Squad page."]})]}):t.jsx("p",{className:"note",children:"Nothing yet. Each run of a role is counted here as the squad works."})]})}function Lj(){return Pe({queryKey:["usage"],queryFn:()=>Ee("/api/v1/usage"),refetchInterval:5e3})}function JP(){const e=Lj().data?.total,n=Vi().data?.payment;return e?.runs?t.jsx("span",{title:am(n),children:n?.payment==="api-key"?t.jsxs(t.Fragment,{children:["Used ",t.jsx("b",{children:zi(e)??"an unknown amount"})," on your API key"]}):t.jsxs(t.Fragment,{children:[t.jsx("b",{children:zi(e)??"An unknown amount"})," of AI work, included in your plan"]})}):null}function eR(){const e=Lj().data,n=Vi().data?.payment;return e?.total.runs?t.jsxs(t.Fragment,{children:[t.jsx("h2",{style:{marginTop:30},children:"What the squad used"}),t.jsxs("p",{className:"note",style:{marginTop:2},children:["Every ticket on this computer (",e.tickets," so far) and the project's own work, like reading the project and filling in new tickets",e.project.runs?` (${zi(e.project)??"cost not reported"})`:"",e.deleted?.tickets?`, and ${e.deleted.tickets} deleted ${e.deleted.tickets===1?"ticket":"tickets"} (${zi(e.deleted.total)??"cost not reported"})`:"",". ",am(n)," Change a role's model level with its Edit button above."]}),t.jsx("div",{style:{marginTop:10},children:t.jsx(lm,{roles:e.roles,total:e.total})})]}):null}const Dn=e=>e<.005?"under $0.01":`$${e.toFixed(2)}`,fo=e=>e>0&&e<.01?"under 1%":`${Math.round(e*100)}%`;function tR({t:e}){const n=Pe({queryKey:["cost",e.id],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/cost`),refetchInterval:e.live?5e3:2e4}),s=n.data;return s?s.total.runs?t.jsxs("div",{className:"costs",children:[t.jsx($y,{c:s}),t.jsxs("section",{className:"costcard",children:[t.jsx("h3",{children:"Size of the work"}),s.size?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"sizes",role:"img","aria-label":`Size: ${s.size.size}`,children:["small","medium","large"].map(r=>t.jsx("span",{className:r===s.size.size?"on":"",children:r[0].toUpperCase()+r.slice(1)},r))}),t.jsxs("p",{children:[s.size.words," ",s.why]})]}):t.jsxs("p",{children:["This is one of the first tickets in ",s.project,", so there is no usual size to compare with yet. It shows once two tickets are accepted.",s.why?` ${s.why}`:""]}),s.seconds!==void 0&&t.jsxs("p",{className:"note",children:["The squad worked on it for ",hu(s.seconds),", not counting the time it waited for you."]})]}),s.where.parts.length>0&&t.jsxs("section",{className:"costcard",children:[t.jsx("h3",{children:"Where the work went"}),t.jsx("div",{className:"wbars",children:s.where.parts.map(r=>t.jsxs("div",{className:"wbar",children:[t.jsx("span",{children:r.name}),t.jsxs("span",{className:"wbarline",children:[t.jsx("i",{style:{width:`${Math.max(2,Math.round(r.share*100))}%`}}),t.jsxs("small",{children:[fo(r.share),s.payment.payment==="api-key"&&r.costUsd!==void 0?` · ${Dn(r.costUsd)}`:""]})]})]},r.name))}),t.jsxs("p",{className:"note",children:[s.where.by==="tokens"?"By the amount of text the AI read and wrote, because some steps did not report a cost. ":"","Thinking steps use the strongest model on purpose: a mistake there costs the most to fix later."]})]}),s.payment.payment==="subscription"?t.jsxs("section",{className:"costcard",children:[t.jsx("h3",{children:"Value of the AI work"}),t.jsxs("p",{children:[s.total.costUsd!==void 0?t.jsxs(t.Fragment,{children:[t.jsx("b",{className:"bigusd",children:Dn(s.total.costUsd)})," at API prices, covered by your plan."]}):"The AI tool did not report what this work is worth."," ","This month the squad did ",t.jsx("b",{children:Dn(s.month.total.costUsd??0)})," of AI work for ",s.project,"."]}),t.jsxs("p",{className:"note",children:["This is a value, not a bill: what the same work would cost if you paid per use.",s.total.costUnknown?` ${s.total.costUnknown} of its steps did not report one.`:""]})]}):null,s.tip&&t.jsxs("section",{className:"costcard tip",children:[t.jsx("h3",{children:"Small change next time?"}),t.jsxs("p",{children:[s.tip,s.payment.payment==="subscription"?" If your plan's usage limit is reached, squad-kit pauses and carries on by itself when it resets.":""]})]}),t.jsxs("details",{className:"costdetails",children:[t.jsx("summary",{children:"Details for engineers"}),t.jsxs("p",{className:"note",children:[s.details.models,s.details.tokens?`. ${s.details.tokens}.`:"."]}),t.jsx(lm,{roles:Fj(e.usage??[]),total:om(e.usage??[]),steps:!0}),t.jsx("div",{style:{marginTop:8},children:t.jsx(ie,{text:`squad cost ${e.id}`})})]})]}):t.jsxs("div",{className:"costs",children:[t.jsx($y,{c:s}),t.jsx("p",{className:"note",children:"Nothing used yet. Each step the squad takes is counted here."})]}):t.jsx("p",{className:"note",children:n.isError?"Could not read the cost. It tries again by itself.":"Loading…"})}function $y({c:e}){if(e.payment.payment==="subscription")return t.jsxs("section",{className:"costcard paid",children:[t.jsxs("div",{className:"paidhead",children:[t.jsx("span",{className:"paidic",children:t.jsx(xe,{size:15,strokeWidth:2.6})}),t.jsxs("b",{children:["Included in your ",e.payment.name," plan. No extra charge."]})]}),t.jsxs("p",{className:"muted",children:["You pay for ",e.payment.name," with a subscription, so this ticket cost you nothing extra."," ",e.payment.from==="guess"&&"squad-kit could not tell how you pay, so it shows it this way. ",t.jsx($e,{to:"/settings",children:"Pay with an API key instead?"})]})]});const n=e.budget;return t.jsxs("section",{className:`costcard ${n?.over.length?"over":n?.warn.length?"warn":""}`,children:[t.jsxs("div",{className:"paidhead",children:[t.jsx("span",{className:"paidic money",children:t.jsx(nk,{size:15})}),t.jsxs("b",{children:[e.total.runs?e.total.costUsd!==void 0?Dn(e.total.costUsd):"Not reported":"$0.00"," on your API key",e.total.costUnknown?t.jsxs("span",{className:"note",children:[" + ",e.total.costUnknown," steps not reported"]}):null]})]}),t.jsxs("p",{className:"muted",children:["Real money: each step is paid per use",e.payment.found?.kind==="api-key"?`, on your ${e.payment.found.label}`:"",". ",t.jsx($e,{to:"/settings",children:"Pay with a subscription instead?"})]}),n&&t.jsx(nR,{b:n,project:e.project})]})}function Ey({share:e}){return t.jsx("span",{className:`meter ${e>=1?"over":e>=.8?"warn":""}`,role:"img","aria-label":fo(e),children:t.jsx("i",{style:{width:`${Math.min(100,Math.round(e*100))}%`}})})}function nR({b:e,project:n}){return!e.ticketUsd&&!e.monthUsd?t.jsxs("p",{className:"note",children:["This month: ",Dn(e.monthSpent)," for ",n,". No budget yet: ",t.jsx($e,{to:"/settings",children:"set one per ticket and per month"}),", and squad-kit warns you at 80%."]}):t.jsxs("div",{className:"budgets",children:[e.ticketUsd&&e.ticketShare!==void 0&&t.jsxs("div",{className:"budgetrow",children:[t.jsxs("span",{children:[fo(e.ticketShare)," of this ticket's ",Dn(e.ticketUsd)," budget"]}),t.jsx(Ey,{share:e.ticketShare})]}),e.monthUsd&&e.monthShare!==void 0&&t.jsxs("div",{className:"budgetrow",children:[t.jsxs("span",{children:["This month: ",Dn(e.monthSpent)," of your ",Dn(e.monthUsd)," for ",n]}),t.jsx(Ey,{share:e.monthShare})]}),[...e.over,...e.warn].map(s=>t.jsxs("p",{className:"budgetsay",children:[t.jsx(Oi,{size:14}),e.over.includes(s)?s==="ticket"?"Over its budget. Before its next step the ticket waits for you: carry on, do the rest yourself, or make the plan smaller. No step is cut in half.":"Over this month's budget. Each ticket waits for you before its next step. No step is cut in half.":s==="ticket"?"At 80% of its budget. At 100% the ticket waits for you before its next step.":"At 80% of this month's budget. At 100% tickets wait for you before their next step."]},s))]})}function sR(){const e=Vi().data,[n,s]=C.useState(()=>{try{return JSON.parse(sessionStorage.getItem("squad-budget-hidden")??"[]")}catch{return[]}});if(C.useEffect(()=>{try{sessionStorage.setItem("squad-budget-hidden",JSON.stringify(n))}catch{}},[n]),!e||e.payment.payment!=="api-key")return null;const r=u=>`${u.kind}:${u.id??e.month.month}:${u.over?"over":"warn"}`,a=e.warnings.filter(u=>!n.includes(r(u)));if(!a.length)return null;const o=a[0],c=u=>u.kind==="month"?`This month the squad used ${fo(u.share)} of your ${Dn(u.limit)} budget for ${e.project}${u.over?". Tickets wait for you before their next step":""}`:`${u.id} ${u.title} used ${fo(u.share)} of its ${Dn(u.limit)} budget${u.over?". It waits for you before its next step":""}`;return t.jsxs("section",{className:"upd failed budgetbar",role:"status","aria-label":"Budget",children:[t.jsx("span",{className:"upd-ic",children:t.jsx(nk,{size:16})}),t.jsxs("div",{className:"upd-main",children:[t.jsx("b",{className:"upd-title",children:c(o)}),t.jsxs("span",{className:"upd-sub",children:[a.length>1?`And ${a.length-1} more near a budget. `:"","At 100% a ticket waits for you between two steps, never in the middle of one."]})]}),t.jsxs("div",{className:"upd-acts",children:[o.id&&t.jsxs($e,{to:"/board",search:{ticket:o.id},className:"btn sm",children:["Open ",o.id]}),t.jsx($e,{to:"/settings",className:"btn sm",children:"Budgets"}),t.jsx("button",{className:"iconbtn","aria-label":"Hide this notice",onClick:()=>s([...n,...a.map(r)]),children:t.jsx(Ze,{size:14})})]})]})}function rR(){const e=Vi().data,n=fe(),[s,r]=C.useState(""),[a,o]=C.useState(""),c=e?.budget;if(C.useEffect(()=>{r(c?.ticketUsd?String(c.ticketUsd):""),o(c?.monthUsd?String(c.monthUsd):"")},[c?.ticketUsd,c?.monthUsd]),!e)return null;const u=e.payment,d=(f,m)=>n.mutate({path:"/api/v1/cost/payment",method:"PUT",body:{payment:f},done:m}),p=u.found?`${u.tool} is signed in with ${u.found.label}${u.found.kind==="subscription"?", a subscription":", paid per use"}.`:`squad-kit could not tell how ${u.tool} is paid.`;return t.jsxs("div",{style:{margin:"22px 0 26px"},children:[t.jsx("h2",{children:"How you pay for the AI"}),t.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:[p," ",u.from==="you"?"You chose below, and your choice wins.":"Change it below if that is not right."," It decides what the Cost tab shows."]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"You pay with"}),t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:`btn sm ${u.payment==="subscription"&&u.from==="you"?"pri":""}`,"aria-pressed":u.payment==="subscription"&&u.from==="you",onClick:()=>d("subscription","A subscription: the Cost tab shows the value of the work, with no extra charge"),children:"A subscription"}),t.jsx("button",{className:`btn sm ${u.payment==="api-key"&&u.from==="you"?"pri":""}`,"aria-pressed":u.payment==="api-key"&&u.from==="you",onClick:()=>d("api-key","An API key: the Cost tab shows real dollars and budgets"),children:"An API key"}),t.jsx("button",{className:`btn sm ${u.from!=="you"?"pri":""}`,"aria-pressed":u.from!=="you",onClick:()=>d("auto","squad-kit finds out how you pay"),children:"Find out for me"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad config set payment ${u.from==="you"?u.payment:"auto"}`})]})]}),u.payment==="api-key"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Budget per ticket"}),t.jsxs("span",{className:"moneyin",children:["$",t.jsx("input",{className:"input",inputMode:"decimal",value:s,placeholder:"No budget",onChange:f=>r(f.target.value),"aria-label":"Budget per ticket, in US dollars"})]})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Budget per month"}),t.jsxs("span",{className:"moneyin",children:["$",t.jsx("input",{className:"input",inputMode:"decimal",value:a,placeholder:"No budget",onChange:f=>o(f.target.value),"aria-label":"Budget per month, in US dollars"}),t.jsxs("span",{className:"note",children:["for ",e.project,", on this computer"]})]})]}),t.jsxs("div",{style:{marginTop:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:"btn pri sm",disabled:n.isPending,onClick:()=>n.mutate({path:"/api/v1/cost/budget",method:"PUT",body:{ticketUsd:s.trim()||null,monthUsd:a.trim()||null},done:"Budgets saved"}),children:"Save budgets"}),t.jsx("span",{className:"note",children:"At 80% the ticket and the board say so. At 100% the ticket waits for you between two steps, never in the middle of one."}),t.jsx(ie,{text:`squad config set budget --ticket ${s.trim()||"off"} --month ${a.trim()||"off"}`})]})]})]})}const iR={best:"Best",balanced:"Balanced",thrifty:"Thrifty"};function aR(){const e=Vi().data;if(!e)return null;const n=e.quality.some(s=>s.tickets>0);return t.jsxs("div",{className:"maprow",children:[t.jsxs("b",{style:{paddingTop:2},children:["On ",e.project]}),t.jsxs("span",{className:"qstats",children:[!n&&t.jsxs("span",{className:"note",children:["Each Quality setting's average cost and time per accepted ticket shows here once ",e.qualityAfter," tickets are accepted with it."]}),n&&e.quality.map(s=>t.jsxs("span",{className:"qstat",children:[t.jsx("b",{children:iR[s.quality]}),s.tickets>=e.qualityAfter?t.jsxs("span",{children:[s.costUsd!==void 0?`${Dn(s.costUsd)} ${e.payment.payment==="api-key"?"":"of AI work "}`:"",s.seconds!==void 0?`${s.costUsd!==void 0?"and ":""}${hu(s.seconds)} of squad time `:"","per accepted ticket ",t.jsxs("span",{className:"note",children:["(",s.tickets," tickets)"]})]}):t.jsxs("span",{className:"note",children:["Shows after ",e.qualityAfter," accepted tickets (",s.tickets," so far)"]})]},s.quality)),n&&e.payment.payment==="subscription"&&t.jsx("span",{className:"note",children:"Values at API prices, covered by your plan."})]})]})}function oR(){const e=T6(),n=e.data?.apps??[];if(!n.length)return null;const s=n.some(r=>r.start&&(r.state==="not-running"||r.state==="stopped")&&!r.up&&!r.fresh);return t.jsxs("div",{className:"apps",children:[t.jsx("div",{className:"apps-h",children:"Your apps"}),n.map(r=>t.jsx(hR,{a:r,named:n.length>1,live:e.data?.live??!1,reading:e.data?.reading??!1,readError:e.data?.readError},r.repo)),s&&t.jsx("p",{className:"apps-note",children:"Starts the latest main, with every ticket you approved. No terminal needed."})]})}const lR=e=>(e??"").replace(/^https?:\/\//,"");function cR(e){const n=e.map(s=>`${s.id} ${s.title}`);return n.length>1?`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`:n[0]??""}function Ty(e){switch(e.state){case"running":return dR(e.since);case"starting":return"Starting…";case"stopped":return"Stopped";case"failed":return"Failed";default:return"Not running"}}function uR(e){return e.step==="setup"?"Setting it up first":e.step==="start"?"Starting it":`Getting the newest ${e.base}`}function dR(e){const n=e?Math.round((Date.now()-Date.parse(e))/6e4):0;return n<1?"Running":`Running for ${n} min`}function hR({a:e,named:n,live:s,reading:r,readError:a}){const o=fe(),[c,u]=C.useState(!1),[d,p]=C.useState(!1),f=n?` ${qi(e.name)}`:"",m=(v,k,N)=>o.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/${v}`,body:N,done:k}),y=v=>m("start",`Starting ${e.name}`,v),x=e.state==="failed"?e.busy:void 0;return t.jsxs("div",{className:`app-item ${e.state}`,children:[e.fresh&&e.start&&t.jsxs("div",{className:"app-new",role:"status",children:[t.jsxs("div",{className:"hd",children:[t.jsx("span",{className:"ok",children:t.jsx(xe,{size:13,strokeWidth:3})}),t.jsxs("b",{title:e.fresh.title,children:[e.fresh.id," is in ",e.fresh.base]})]}),t.jsx("p",{children:"Try the new version yourself."}),t.jsxs("div",{className:"app-acts",children:[t.jsx("button",{className:"btn sm go",disabled:o.isPending,onClick:()=>m("restart",`Starting the new version of ${e.name}`),children:"Run the new version"}),t.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>m("not-now","Fine. It stays as it is.",{ticket:e.fresh.id}),children:"Not now"})]}),e.fresh.release&&t.jsxs("small",{children:["It also goes out in release ",e.fresh.release,"."]}),t.jsx(ie,{text:`squad app restart${f}`})]}),t.jsxs("div",{className:"app-row",children:[t.jsx("i",{"aria-hidden":"true"}),t.jsxs("span",{className:"nm",children:[t.jsx("b",{children:e.name}),t.jsx("small",{title:e.state==="running"?`Running at ${e.address}`:Ty(e),children:Ty(e)})]}),e.state==="running"?t.jsx("a",{className:"btn sm pri",href:e.address,target:"_blank",rel:"noreferrer",title:`Open ${e.address}`,children:"Open"}):e.state==="starting"?t.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>m("stop",`Stopped ${e.name}`),children:"Stop"}):e.start?t.jsx("button",{className:"btn sm go",disabled:o.isPending,onClick:()=>y(),children:e.state==="failed"?"Try again":"Start"}):null]}),e.state==="starting"&&t.jsx("p",{className:"app-more",children:uR(e)}),e.state==="running"&&t.jsxs("div",{className:"app-more",children:[t.jsx("span",{className:"addr",children:lR(e.address)}),e.includes.length>0&&t.jsxs("span",{children:["Includes ",cR(e.includes)]}),e.elsewhere&&t.jsx("span",{children:"Started outside the board, from a terminal or an earlier squad-kit."}),t.jsxs("div",{className:"app-acts",children:[t.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>m("restart",`Restarting ${e.name}`),children:"Restart"}),t.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>m("stop",`Stopped ${e.name}`),children:"Stop"})]}),t.jsx(ie,{text:`squad app stop${f}`})]}),e.state==="failed"&&!x&&t.jsx("p",{className:"app-more why",children:e.error}),e.state!=="running"&&e.state!=="starting"&&e.start&&!x&&t.jsx(ie,{text:`squad app start${f}`}),e.state!=="running"&&e.state!=="starting"&&e.start&&e.up&&!x&&t.jsxs("p",{className:"app-more",children:["Something else answers at this app's address."," ",t.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:"Open it"})]}),x&&t.jsxs("div",{className:"app-warn",children:[t.jsx("b",{children:e.error}),t.jsx("span",{children:x.ours?"squad-kit started it, so it can stop it for you.":"squad-kit leaves it alone. Close that program, then press Try again, or ask an engineer to look at what failed."}),x.ours&&t.jsx("div",{className:"app-acts",children:t.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>y({stopOther:!0}),children:"Stop it and start"})}),t.jsx(ie,{text:x.ours?`squad app start${f} --stop-other`:`squad app start${f}`})]}),!e.start&&!c&&t.jsxs("div",{className:"app-warn",children:[t.jsx("b",{children:"Start command unknown"}),t.jsx("span",{children:"squad-kit could not tell how to start this app yet."}),a&&!r&&t.jsxs("span",{className:"bad",children:["The Architect could not read the project: ",a]}),t.jsxs("div",{className:"app-acts",children:[s&&t.jsx("button",{className:"btn sm",disabled:r||o.isPending,onClick:()=>o.mutate({path:"/api/v1/scan",done:"The Architect is reading the project to find how to start it"}),children:r?"The Architect is looking…":"Ask the Architect to find it"}),t.jsx("button",{className:"btn sm",onClick:()=>u(!0),children:"Type it"})]}),!s&&t.jsx("span",{children:"You can also set it in Settings, under How the squad checks and runs this project."}),t.jsx(ie,{text:s?"squad app find":`squad app set${f} --start "npm run dev"`})]}),c&&t.jsx(pR,{a:e,cmdRef:f,onDone:()=>u(!1)}),e.start&&t.jsx("button",{className:"app-link",onClick:()=>p(!0),children:e.state==="failed"?"See what failed":"Show output"}),d&&t.jsx(fR,{a:e,cmdRef:f,onClose:()=>p(!1),onChange:()=>{p(!1),u(!0)}})]})}function pR({a:e,cmdRef:n,onDone:s}){const r=fe(),[a,o]=C.useState(e.start??""),[c,u]=C.useState(e.url??""),d=()=>r.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/commands`,method:"PUT",body:{start:a,url:c},done:`Saved how ${e.name} starts`},{onSuccess:s});return t.jsxs("form",{className:"app-type",onSubmit:p=>{p.preventDefault(),d()},children:[t.jsxs("label",{children:["Start command",t.jsx("input",{className:"input",value:a,onChange:p=>o(p.target.value),placeholder:"npm run dev",autoFocus:!0,spellCheck:!1})]}),t.jsxs("label",{children:["Address",t.jsx("input",{className:"input",value:c,onChange:p=>u(p.target.value),placeholder:"http://localhost:3000",spellCheck:!1})]}),t.jsxs("div",{className:"app-acts",children:[t.jsx("button",{className:"btn sm pri",type:"submit",disabled:!a.trim()||r.isPending,children:"Save"}),t.jsx("button",{className:"btn sm",type:"button",onClick:s,children:"Cancel"})]}),t.jsx(ie,{text:`squad app set${n} --start ${Fe(a.trim()||"npm run dev")}${c.trim()?` --url ${qi(c.trim())}`:""}`})]})}function fR({a:e,cmdRef:n,onClose:s,onChange:r}){const o=(Pe({queryKey:["apps",e.name,"output"],queryFn:()=>Ee(`/api/v1/apps/${encodeURIComponent(e.name)}/output`),refetchInterval:2e3}).data?.lines??[]).join(`
|
|
621
|
+
`).trim();return t.jsxs(We,{title:e.state==="failed"?`${e.name}: what failed`:`${e.name}: how it starts`,wide:!0,onClose:s,footer:t.jsxs(t.Fragment,{children:[t.jsx(ie,{text:`squad app start${n}`}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn sm",onClick:r,children:"Change"}),t.jsx("button",{className:"btn sm pri",onClick:s,children:"Done"})]}),children:[e.state==="failed"&&e.detail&&t.jsx("pre",{className:"app-out",style:{marginBottom:12},children:e.detail}),t.jsxs("div",{className:"app-how",children:[t.jsxs("div",{children:[t.jsx("span",{children:"Start command"}),t.jsx("code",{children:e.start})]}),t.jsxs("div",{children:[t.jsx("span",{children:"Address"}),t.jsx("code",{children:e.address??e.url??"The one it prints when it starts"})]}),e.setup&&t.jsxs("div",{children:[t.jsx("span",{children:"Setup, in a new copy and when its packages change"}),t.jsx("code",{children:e.setup})]}),t.jsxs("div",{children:[t.jsxs("span",{children:["squad-kit's copy of ",e.base]}),t.jsxs("code",{children:[e.dir,e.commit?` at ${e.commit.slice(0,8)}`:""]})]})]}),t.jsx("pre",{className:"app-out",children:o||"Nothing yet. Press Start, and what the app prints shows here."})]})}function mR({children:e}){const n=kc({select:f=>f.location.pathname}),s=kc({select:f=>f.location.search.ticket}),r=Di(Bi),a=xR(),o=gR(n),c=n.startsWith("/board")&&!!s,[u,d]=C.useState(!1);C.useEffect(()=>d(!1),[s]);const p=c&&(r||a.is)&&o.length>0;return t.jsxs("div",{ref:a.ref,className:`banners ${p&&u?"unfolded":""}`,children:[p&&u&&t.jsxs("button",{className:"bless",onClick:()=>d(!1),"aria-expanded":!0,children:[t.jsx(q2,{size:14,"aria-hidden":!0})," Show less"]}),p&&!u&&t.jsxs("button",{className:"bslim",onClick:()=>d(!0),"aria-expanded":!1,"aria-label":`${o.map(f=>f.text).join(", ")}. Show the messages`,children:[t.jsx("span",{className:"bchips",children:o.map(f=>t.jsx("span",{className:`bchip ${f.tone}`,children:f.text},f.key))}),t.jsx(uf,{size:16,"aria-hidden":!0})]}),t.jsx("div",{className:"banners-all",hidden:p&&!u,children:e})]})}function gR(e){const n=Xc().data,s=Rj().data,r=Ye().data,a=[],o=n?L6(n):null;o&&a.push({key:"update",text:o,tone:n?.progress.state==="failed"?"you":"acc"}),s?.pause&&s.text&&a.push({key:"limit",text:"Usage limit",tone:"you"}),r?.ready&&r.console?.outdated&&a.push({key:"restart",text:"Restart to update",tone:"you"});const c=du().length,u=r?.ready&&!e.startsWith("/inbox")?r.tickets.filter(Co).length+c:0;return u&&a.push({key:"waiting",text:`${u} need${u===1?"s":""} you`,tone:"you"}),a}function xR(){const[e,n]=C.useState(!1),s=C.useRef(null),r=C.useCallback(a=>{s.current?.disconnect(),!(!a||typeof ResizeObserver>"u")&&(s.current=new ResizeObserver(([o])=>n((o?.contentRect.width??1/0)<820)),s.current.observe(a))},[]);return C.useEffect(()=>()=>s.current?.disconnect(),[]),{ref:r,is:e}}function pu(){return Pe({queryKey:["setup"],queryFn:()=>Ee("/api/v1/setup"),refetchInterval:e=>e.state.data?.setup&&!e.state.data.setup.ready&&!e.state.data.setup.approved?1e3:5e3})}function _j(e=1e3){const[n,s]=C.useState(Date.now);return C.useEffect(()=>{const r=setInterval(()=>s(Date.now()),e);return()=>clearInterval(r)},[e]),n}function yR({state:e}){return t.jsx("i",{className:`ob-mark ${e}`,"aria-hidden":!0,children:e==="done"?t.jsx(xe,{size:13,strokeWidth:3}):e==="failed"?"!":e==="skipped"?"–":e==="stopped"?t.jsx(is,{size:8,fill:"currentColor"}):e==="now"?t.jsx("span",{className:"live"}):null})}function kR({st:e,now:n}){const s=fe(),[r,a]=C.useState(!1),o=jp(e,n);return t.jsxs("li",{className:`ob-step ${e.state}`,children:[t.jsx(yR,{state:e.state}),t.jsxs("span",{className:"ob-st-t",children:[t.jsx("b",{children:e.label}),e.note&&t.jsx("small",{title:e.note,children:e.note}),e.state==="now"&&t.jsx("span",{className:"setup-bar","aria-hidden":!0,children:t.jsx("i",{})}),e.error&&t.jsx("span",{className:"ob-err",children:e.error}),e.ways.length>0&&t.jsxs("span",{className:"ob-ways",children:[e.ways.map(c=>c.do==="again"?t.jsxs("span",{className:"ob-way",children:[t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:()=>s.mutate({path:"/api/v1/setup/again",body:{step:c.step},done:c.step==="read"?"The Architect reads the project again":"squad-kit tries it again"}),children:c.label}),t.jsx(ie,{text:c.command})]},c.label):c.do==="output"?t.jsx("button",{className:"btn sm quiet",onClick:()=>a(!r),"aria-expanded":r,children:r?"Hide what failed":c.label},c.label):t.jsx($e,{to:"/settings",className:"btn sm quiet",children:c.label},c.label)),e.state==="failed"&&(e.id==="read"||e.id==="tool")&&t.jsx(lu,{small:!0})]}),r&&e.output&&t.jsx("pre",{className:"ob-out",children:e.output})]}),t.jsxs("time",{className:"ob-time",children:[o,(e.state==="now"||e.state==="todo")&&t.jsx("small",{children:e.usual})]})]})}const vR=[{id:"best",name:"Best",note:"The strongest model builds and reviews. Uses your plan's limits faster."},{id:"balanced",name:"Balanced",note:"The strongest model at medium effort."},{id:"thrifty",name:"Thrifty",note:"A lighter model builds. Cheapest."}];function jR({s:e}){const n=fe(),[s,r]=C.useState(null);if(e.approved)return null;const a=s??e.quality;return t.jsxs("section",{className:"ob-quality","aria-label":"Quality",children:[t.jsxs("div",{className:"ob-q-h",children:[t.jsx("b",{children:"How strong should the squad be?"}),t.jsx("span",{className:"note",children:e.qualityAsked?"Saved. Change it any time in Settings.":"Asked once. You can change it any time in Settings."})]}),t.jsx("div",{className:"ob-q-opts",role:"radiogroup","aria-label":"Quality",children:vR.map(o=>t.jsxs("button",{role:"radio","aria-checked":o.id===a,className:`ob-q ${o.id===a?"on":""}`,onClick:()=>{r(o.id),n.mutate({path:"/api/v1/setup/quality",body:{quality:o.id},done:`Quality is ${o.name}. The squad uses it from its first step.`})},children:[t.jsxs("b",{children:[o.name,o.id==="best"&&t.jsx("small",{children:" · the default"})]}),t.jsx("span",{children:o.note})]},o.id))}),t.jsx(ie,{text:`squad config set quality ${a}`})]})}function bR({s:e}){const n=sm(),s=(()=>{try{return window.localStorage}catch{return null}})(),[r,a]=C.useState(()=>hn?io(s).includes(hn):!1);return e.ready||e.approved||!hn?null:r&&n.on?t.jsxs("span",{className:"pill ok",children:[t.jsx(fp,{size:13})," We will tell you when it is ready"]}):t.jsxs("button",{className:"btn",onClick:async()=>{n.on||await n.turnOn(),i8(s,hn),a(!0)},children:[t.jsx(fp,{size:15})," Notify me when it is ready"]})}function wR({s:e}){const n=_j();return t.jsx("ol",{className:"ob-steps",children:e.steps.map(s=>t.jsx(kR,{st:s,now:n},s.id))})}function NR({s:e}){const[n,s]=C.useState(!1);return e.reads.length?t.jsxs("div",{className:"ob-reads",children:[t.jsxs("button",{className:"btn sm quiet",onClick:()=>s(!n),"aria-expanded":n,children:[n?t.jsx(q2,{size:14}):t.jsx(uf,{size:14})," ",n?"Hide what the Architect read":"See what the Architect is reading"]}),n&&t.jsx("ul",{children:e.reads.map((r,a)=>t.jsx("li",{className:"mono",children:r},`${a}-${r}`))})]}):null}function Oj(){const n=pu().data?.setup,s=_j();if(!n||n.approved)return null;if(n.ready)return t.jsxs("div",{className:"ob-card ready",children:[t.jsx("span",{className:"ob-ring",children:t.jsx(xe,{size:16,strokeWidth:2.5})}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:n.empty?"One question for you":"Your project overview is ready"}),t.jsx("span",{children:n.empty?"What do you want to build?":"squad-kit has read your project. Check what it understood, then start working."})]}),t.jsxs($e,{to:"/overview",className:"btn you sm",children:["Check it ",t.jsx(so,{size:14})]})]});const r=n.steps.find(o=>o.id===n.current),a=n.steps.findIndex(o=>o.id===n.current)+1;return t.jsxs("div",{className:`ob-card ${r?.state==="failed"||r?.state==="stopped"?"stop":""}`,children:[t.jsxs("div",{className:"grow",children:[t.jsx("b",{children:"Getting to know your project"}),t.jsxs("span",{children:["Step ",a," of ",n.total,": ",r?.label??"starting",r&&jp(r,s)?` · ${jp(r,s)}`:""]}),r?.note&&r.state!=="todo"&&t.jsx("small",{title:r.note,children:r.note}),t.jsx("span",{className:"ob-dots","aria-hidden":!0,children:n.steps.map(o=>t.jsx("i",{className:o.state},o.id))})]}),t.jsxs($e,{to:"/setup",className:"btn sm",children:["Open the setup ",t.jsx(so,{size:14})]})]})}function SR(){const e=pu().data?.setup;return!!(e&&!e.approved)}function CR(){const e=pu().data?.setup;return!!(e?.ready&&!e.approved)}const $R=[{to:"/overview",label:"Overview",icon:B2,badge:"setup"},{to:"/requirements",label:"Requirements",icon:G2,badge:"reqs"},{to:"/board",label:"Board",icon:Q2},{to:"/backlog",label:"Backlog",icon:u6},{to:"/inbox",label:"Waiting for you",icon:a6,badge:"you"},{to:"/conversations",label:"Conversations",icon:p6,badge:"chats"},{to:"/releases",label:"Releases",icon:ns},{to:"/architecture",label:"Architecture",icon:m6},{to:"/bugs",label:"Bugs",icon:Cs,badge:"bugs"},{to:"/squad",label:"Squad and AI",icon:tk},{to:"/settings",label:"Settings",icon:y6}];function ER(){const e=Ye(),{theme:n,toggleTheme:s,showCommands:r,toggleCommands:a}=_e(),o=kc({select:E=>E.location.pathname}),c=e.data?.ready?e.data.meta:void 0,u=e.data?.ready?e.data.tickets:[],d=du().length,p=u.filter(Co).length+d,f=u.filter(E=>E.kind==="bug").length,m=(c?.user.name??"You").slice(0,2).toUpperCase(),y=po().data?.filter(E=>E.open).length??0,x=LP(),v=CR(),k=aj(5e3),N=I8(k.data?.breakdowns??[],c?.user.name),[w,S]=C.useState(!1);return C.useEffect(()=>S(!1),[o]),o.startsWith("/conversations")||o.startsWith("/setup")?t.jsxs("div",{className:"fullpage",children:[t.jsx(by,{}),t.jsx("div",{className:"canvas-b",children:t.jsx(pp,{})})]}):t.jsxs("div",{className:`app ${x?"docked":""}`,children:[t.jsxs("header",{className:"mtop",children:[t.jsx("button",{className:"iconbtn",onClick:()=>S(!0),"aria-label":"Open the menu","aria-expanded":w,children:t.jsx(h6,{size:17})}),t.jsx("b",{children:c?.project??"Your project"}),p>0&&t.jsx($e,{to:"/inbox",className:"badge you","aria-label":`${p} waiting for you`,children:p})]}),w&&t.jsx("div",{className:"side-veil",onClick:()=>S(!1)}),t.jsxs("aside",{className:`side ${w?"open":""}`,children:[t.jsxs("a",{className:"brand",href:"/",title:"All your projects",children:[t.jsx("img",{src:"/logo.svg",alt:""}),t.jsx("b",{children:"squad-kit"}),c?.engine==="demo"&&t.jsx("small",{title:"The squad plays back a recorded run",children:"Demo"})]}),t.jsxs("a",{className:"proj",href:"/",title:"All your projects",children:[t.jsx("span",{className:"pm",children:(c?.project??"P").charAt(0)}),t.jsxs("div",{children:[t.jsx("b",{children:c?.project??"Your project"}),t.jsxs("span",{children:[u.length," open tickets"]})]}),t.jsx(Z5,{size:14,className:"sw"})]}),$R.map(E=>{const P=E.badge==="you"?p:E.badge==="bugs"?f:E.badge==="chats"?y:0;if(E.badge==="setup")return t.jsxs($e,{to:E.to,className:`nav ${o.startsWith(E.to)?"on":""}`,onClick:()=>S(!1),children:[t.jsx(E.icon,{size:16}),E.label,v&&t.jsx("span",{className:"badge you","aria-label":"Waits for you",children:"1"})]},E.to);if(E.badge==="reqs")return t.jsxs($e,{to:E.to,className:`nav ${o.startsWith(E.to)?"on":""}`,onClick:()=>S(!1),children:[t.jsx(E.icon,{size:16}),E.label,N>0?t.jsx("span",{className:"badge you","aria-label":`${N} ${N===1?"needs":"need"} you`,children:N}):t.jsx("span",{className:"badge new",children:"New"})]},E.to);const B=o.startsWith(E.to)||E.to==="/inbox"&&o.endsWith("/proof");return t.jsxs($e,{to:E.to,className:`nav ${B?"on":""}`,onClick:()=>S(!1),children:[t.jsx(E.icon,{size:16}),E.label,P>0&&t.jsx("span",{className:`badge ${E.badge==="you"?"you":E.badge==="chats"?"talk":""}`,children:P})]},E.to)}),t.jsx("div",{className:"grow"}),t.jsx(oR,{}),t.jsx("div",{className:"engines",children:(c?.tools??[]).map(E=>t.jsxs("div",{className:"row",children:[t.jsx("span",{children:E.name}),t.jsx("span",{className:`dot ${E.ready?"":"off"}`,children:E.ready?"Ready":"Not installed"})]},E.name))}),t.jsxs("button",{className:"switch",onClick:a,"aria-pressed":r,children:[t.jsxs("span",{children:[t.jsx(Sc,{size:15}),"Show commands"]}),t.jsx("span",{className:`tog ${r?"on":""}`})]}),t.jsxs("div",{className:"me",children:[t.jsx("span",{className:"av",children:m}),t.jsxs("div",{children:[c?.user.name??"You",t.jsx("small",{children:c?.user.role??""})]}),t.jsx("button",{className:"theme",onClick:s,"aria-label":n==="light"?"Switch to dark":"Switch to light",children:n==="light"?t.jsx(bo,{size:15}):t.jsx(wo,{size:15})})]})]}),t.jsxs("main",{className:"canvas",children:[t.jsxs(mR,{children:[t.jsx(dk,{}),t.jsx(Ij,{}),e.data?.ready&&t.jsx(sR,{}),e.data?.ready&&e.data.console?.outdated&&t.jsx(P6,{}),t.jsx(by,{})]}),t.jsx("div",{className:"canvas-b",children:t.jsx(pp,{})})]}),t.jsx(OP,{})]})}function TR(e,n,s=3){const r=e?e.split(`
|
|
622
|
+
`):[],a=n.split(`
|
|
623
|
+
`);if(r.length*a.length>25e4)return[...r.map(x=>({kind:"del",text:x})),...a.map(x=>({kind:"add",text:x}))];const o=r.length,c=a.length,u=Array.from({length:o+1},()=>new Array(c+1).fill(0));for(let x=o-1;x>=0;x--)for(let v=c-1;v>=0;v--)u[x][v]=r[x]===a[v]?u[x+1][v+1]+1:Math.max(u[x+1][v],u[x][v+1]);const d=[];let p=0,f=0;for(;p<o&&f<c;)r[p]===a[f]?(d.push({kind:"same",text:r[p]}),p++,f++):u[p+1][f]>=u[p][f+1]?d.push({kind:"del",text:r[p++]}):d.push({kind:"add",text:a[f++]});for(;p<o;)d.push({kind:"del",text:r[p++]});for(;f<c;)d.push({kind:"add",text:a[f++]});const m=d.map((x,v)=>x.kind!=="same"||d.slice(Math.max(0,v-s),v+s+1).some(k=>k.kind!=="same")),y=[];return d.forEach((x,v)=>{m[v]?y.push(x):y.at(-1)?.kind!=="gap"&&y.push({kind:"gap",text:""})}),y}function AR({t:e,onTab:n}){const[s,r]=C.useState("happened"),[a,o]=C.useState(null),c=zj(e),u=c.data?.steps??[];return t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"convbar",children:[t.jsxs("div",{className:"seg",role:"group","aria-label":"View",children:[t.jsx("button",{className:s==="happened"?"on":"","aria-pressed":s==="happened",onClick:()=>r("happened"),children:"What happened"}),t.jsx("button",{className:s==="log"?"on":"","aria-pressed":s==="log",onClick:()=>r("log"),children:"Full log"})]}),t.jsx("span",{className:"grow"}),s==="happened"&&u.length>0&&t.jsxs("span",{className:"note convcount",children:[u.length," ",u.length===1?"step":"steps",c.data.seconds>=1?` · ${hu(c.data.seconds)} in all`:""]})]}),s==="happened"?t.jsx(qP,{t:e,onTab:n,onLog:d=>{o(d),r("log")}}):t.jsx(PR,{t:e,chosenKey:a,setKey:o})]})}function PR({t:e,chosenKey:n,setKey:s}){const a=Pe({queryKey:["conversations",e.id],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/conversations`),refetchInterval:3e3}).data??[],o=n??a.filter(m=>m.started).at(-1)?.key??null,c=Pe({queryKey:["conversation",e.id,o],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/conversations/${o}`),enabled:!!o,refetchInterval:e.live?2e3:1e4}),u=C.useMemo(()=>Zv(c.data?.updates??[]),[c.data]),[d,p]=C.useState(!0),f=C.useRef(null);return C.useEffect(()=>{d&&f.current?.scrollIntoView({block:"end"})},[u.length,d,o]),a.length?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pills",style:{marginBottom:6},children:[a.map(m=>t.jsx("button",{className:`btn sm ${m.key===o?"pri":""}`,disabled:!m.started,onClick:()=>s(m.key),children:m.label},m.key)),t.jsx("span",{className:"grow"}),t.jsxs("label",{className:"note",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12.5},children:[t.jsx("input",{type:"checkbox",checked:d,onChange:m=>p(m.target.checked)})," Follow live"]})]}),t.jsxs("p",{className:"note",style:{fontSize:12.5,margin:"0 0 14px"},children:["Everything the ",a.find(m=>m.key===o)?.label??"agent"," did, step by step. Read only."," ",c.data&&c.data.total>(c.data.updates.length??0)?`Showing the latest ${c.data.updates.length} of ${c.data.total} entries.`:""]}),t.jsxs("div",{className:"conv",children:[u.map((m,y)=>t.jsx(IR,{it:m,ticket:e.id,cwd:c.data?.cwd},m.kind==="tool"?m.id:y)),t.jsx("div",{ref:f})]}),o&&t.jsxs("div",{className:"convactions",children:[t.jsx(RR,{t:e,to:Ay[o]??"builder"}),!e.chat?.open&&!e.takenOver&&t.jsx(Yr,{t:e,agent:Ay[o]??"builder"})]}),c.data?.command&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Open it in ",c.data.tool??"a terminal"]}),t.jsx(ie,{text:c.data.command}),t.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:o==="build"&&Yf(e)?t.jsxs(t.Fragment,{children:["To work in it yourself, press ",t.jsx("b",{children:"Take over"})," first, so you and the squad never edit at the same time."," ",t.jsx(Qf,{t:e})]}):e.takenOver?"The ticket is yours: type into it freely, then press Give back on the Now tab.":"Read it any time. To work in it, take the ticket over while it is being built."})]})]}):t.jsx("p",{className:"note",children:"No conversation yet. It starts when the Analyst reads the ticket."})}const Ay={intake:"analyst",build:"builder",review:"reviewer",tester:"tester"},Py={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function RR({t:e,to:n}){const s=fe(),[r,a]=C.useState("");if(e.stage==="done")return null;const o=()=>s.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:r,to:n},done:`Sent. ${e.now?.noteWhen??`The ${Py[n]} reads it at its next step.`}`},{onSuccess:()=>a("")});return t.jsxs("div",{className:"msgagent",children:[t.jsx("input",{className:"input",value:r,onChange:c=>a(c.target.value),placeholder:`Message the ${Py[n]}…`,onKeyDown:c=>c.key==="Enter"&&r.trim()&&o()}),t.jsxs("button",{className:"btn sm pri",disabled:!r.trim()||s.isPending,onClick:o,children:[t.jsx(ls,{size:13})," Send"]})]})}function IR({it:e,ticket:n,cwd:s}){if(e.kind==="plan")return t.jsx(DR,{entries:e.entries});if(e.kind==="tool")return t.jsx(FR,{it:e,ticket:n,cwd:s});const{from:r,content:a}=e;return r==="agent"?t.jsx("div",{className:"conv-text",children:t.jsx(cm,{content:a,ticket:n})}):t.jsx(zR,{from:r,content:a,ticket:n})}function zR({from:e,content:n,ticket:s}){const r=n.type==="text"?n.text:"",a=r.length>420||r.split(`
|
|
624
|
+
`).length>8,[o,c]=C.useState(!a&&e!=="thought"),u=e==="squad-kit"?"squad-kit asked":e==="claude-code"?"Note from Claude Code":"Thinking";return t.jsxs("div",{className:e==="thought"?"conv-thought":"conv-prompt",children:[t.jsxs("button",{className:"conv-who linkish",onClick:()=>c(!o),children:[e==="thought"&&t.jsx(_2,{size:12})," ",u," ",!o&&t.jsx("span",{className:"note",children:"· show"})]}),o&&(e==="thought"?t.jsx("div",{style:{whiteSpace:"pre-wrap"},children:r}):t.jsx(cm,{content:n,ticket:s}))]})}const MR={read:V2,edit:Nc,delete:Ze,move:Nc,search:_i,execute:Sc,think:_2,fetch:r6,switch_mode:xp,other:xp};function FR({it:e,ticket:n,cwd:s}){const r=e.content.some(f=>f.type==="content"&&(f.content.type==="image"||f.content.type==="resource_link")),a=e.content.some(f=>f.type==="diff"),o=e.status==="failed"&&!e.skipped,[c,u]=C.useState(!e.skipped&&(a||r||o));C.useEffect(()=>{(o||r)&&u(!0)},[o,r]);const d=e.answer?ls:e.skipped?jo:MR[e.toolKind]??xp,p=e.content.length>0||e.command||e.skipped;return t.jsxs("div",{className:`conv-tool ${e.skipped?"skipped":e.status}`,children:[t.jsxs("button",{className:"conv-tool-head",onClick:()=>p&&u(!c),"aria-expanded":c,children:[t.jsx(d,{size:14}),t.jsx("span",{className:"mono conv-tool-title",children:s?e.title.split(`${s}/`).join(""):e.title}),t.jsx("span",{className:"conv-at",children:e.at?Tn(e.at):""}),t.jsx(_R,{status:e.status,skipped:e.skipped})]}),e.blocked?.map(f=>t.jsx(LR,{line:f},f)),c&&p&&t.jsxs("div",{className:"conv-tool-body",children:[e.skipped&&t.jsx("p",{className:"note",children:"By design, nothing went wrong: squad-kit lets each step do only what it needs, and this was not part of it."}),e.command&&e.toolKind==="execute"?t.jsxs("pre",{className:"conv-cmd",children:["$ ",e.command]}):e.skipped&&e.detail&&t.jsx("pre",{className:"conv-cmd",children:e.detail}),e.content.map((f,m)=>t.jsx(OR,{c:f,ticket:n,cwd:s},m))]})]})}function LR({line:e}){const n=e.endsWith("Allow it in Settings.");return t.jsxs("p",{className:"conv-blocked",children:[t.jsx(X2,{size:13,"aria-hidden":"true"}),t.jsxs("span",{children:[n?e.slice(0,-9):e,n&&t.jsxs(t.Fragment,{children:[t.jsx($e,{to:"/settings",children:"Settings"}),"."]})]})]})}function _R({status:e,skipped:n}){return n?t.jsxs("span",{className:"conv-status skip",children:[t.jsx(jo,{size:12})," Skipped"]}):e==="completed"?t.jsxs("span",{className:"conv-status ok",children:[t.jsx(xe,{size:12})," Done"]}):e==="failed"?t.jsxs("span",{className:"conv-status bad",children:[t.jsx(Ze,{size:12})," Failed"]}):t.jsxs("span",{className:"conv-status run",children:[t.jsx(gn,{size:12,className:"spin"})," Running"]})}function OR({c:e,ticket:n,cwd:s}){if(e.type==="diff"){const r=s&&e.path.startsWith(`${s}/`)?e.path.slice(s.length+1):e.path;return t.jsx(qR,{path:r,oldText:e.oldText??"",newText:e.newText,isNew:e.oldText==null})}return e.type==="terminal"?t.jsxs("p",{className:"note",children:["Terminal ",e.terminalId]}):e.content.type==="text"?e.content.text.trimStart().startsWith("```")?t.jsx(Dj,{text:e.content.text}):t.jsx(qj,{text:e.content.text}):t.jsx(cm,{content:e.content,ticket:n})}function qj({text:e}){const n=e.length>600||e.split(`
|
|
625
|
+
`).length>12,[s,r]=C.useState(!n);return t.jsxs("div",{className:"conv-out",children:[t.jsx("pre",{children:s?e:`${e.split(`
|
|
626
|
+
`).slice(0,10).join(`
|
|
627
|
+
`).slice(0,600)}…`}),n&&t.jsx("button",{className:"linkbtn",onClick:()=>r(!s),children:s?"Show less":"Show all output"})]})}function qR({path:e,oldText:n,newText:s,isNew:r}){const a=C.useMemo(()=>TR(n,s),[n,s]),o=a.filter(f=>f.kind==="add").length,c=a.filter(f=>f.kind==="del").length,[u,d]=C.useState(a.length<=40),p=u?a:a.slice(0,40);return t.jsxs("div",{className:"conv-diff",children:[t.jsxs("div",{className:"conv-diff-head mono",children:[t.jsx("span",{style:{overflowWrap:"anywhere"},children:e}),t.jsx("span",{className:"grow"}),r?t.jsxs("span",{className:"add",children:["new file · ",o," lines"]}):t.jsxs("span",{children:[t.jsxs("span",{className:"add",children:["+",o]})," ",t.jsxs("span",{className:"del",children:["−",c]})]})]}),t.jsx("pre",{children:p.map((f,m)=>f.kind==="gap"?t.jsx("div",{className:"gap",children:"⋯"},m):t.jsxs("div",{className:f.kind,children:[t.jsx("span",{className:"sign",children:f.kind==="add"?"+":f.kind==="del"?"−":" "}),f.text||" "]},m))}),a.length>40&&t.jsx("button",{className:"linkbtn",style:{margin:"0 10px 8px"},onClick:()=>d(!u),children:u?"Show less":`Show all ${a.length} lines`})]})}function DR({entries:e}){const n=e.filter(s=>s.status==="completed").length;return t.jsxs("div",{className:"conv-plan",children:[t.jsxs("div",{className:"conv-who",children:[t.jsx(c6,{size:13})," Plan · ",n," of ",e.length," done"]}),e.map((s,r)=>t.jsxs("div",{className:`conv-plan-row ${s.status}`,children:[t.jsx("span",{className:"box",children:s.status==="completed"?t.jsx(xe,{size:11}):s.status==="in_progress"?t.jsx(gn,{size:11,className:"spin"}):null}),s.content]},r))]})}function cm({content:e,ticket:n}){switch(e.type){case"text":return t.jsx(Dj,{text:e.text});case"image":return t.jsx(Bf,{className:"conv-img",src:`data:${e.mimeType};base64,${e.data}`,alt:"Picture the agent looked at"});case"audio":return t.jsx("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});case"resource_link":return t.jsx(Ry,{uri:e.uri,name:e.name,mime:e.mimeType??"",size:e.size??void 0,ticket:n});case"resource":return e.resource.text?t.jsx(qj,{text:e.resource.text}):t.jsx(Ry,{uri:e.resource.uri,name:e.resource.uri.split("/").pop()??"file",mime:e.resource.mimeType??"",ticket:n})}}function Ry({uri:e,name:n,mime:s,size:r,ticket:a}){const o=pn(a,e);return s.startsWith("image/")&&s!=="image/svg+xml"?t.jsxs("div",{className:"conv-media",children:[t.jsx(Bf,{className:"conv-img",src:o,alt:n}),t.jsx("span",{className:"note mono",children:n})]}):s.startsWith("video/")?t.jsxs("div",{className:"conv-media",children:[t.jsx("video",{className:"conv-img",src:o,controls:!0,preload:"metadata"}),t.jsx("span",{className:"note mono",children:n})]}):s.startsWith("audio/")?t.jsx("audio",{controls:!0,src:o}):t.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:"conv-file",children:[t.jsx(ss,{size:15}),t.jsx("span",{className:"mono",children:n}),t.jsx("span",{className:"note",children:[s.split("/").pop(),r?`${Math.max(1,Math.round(r/1024))} KB`:""].filter(Boolean).join(" · ")})]})}function Dj({text:e}){const{theme:n}=_e();return t.jsx("div",{className:"md",children:t.jsx(Mf,{remarkPlugins:[qf],components:{a:({href:s,children:r})=>t.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:r}),code:({className:s,children:r})=>{const a=/language-(\w+)/.exec(s??"")?.[1],o=String(r).replace(/\n$/,"");return!a&&!o.includes(`
|
|
628
|
+
`)?t.jsx("code",{className:"mono",children:r}):t.jsxs("div",{className:"md-code",children:[a&&t.jsx("span",{className:"md-lang",children:a==="mermaid"?"Diagram (Mermaid)":a}),t.jsx(Uv,{code:o,language:a??"text",theme:n==="dark"?lo.vsDark:lo.github,children:({tokens:c,getLineProps:u,getTokenProps:d})=>t.jsx("pre",{children:c.map((p,f)=>t.jsx("div",{...u({line:p}),children:p.map((m,y)=>t.jsx("span",{...d({token:m})},y))},f))})})]})}},children:e})})}const BR=(e,n)=>e.part===n.part&&(e.index??0)===(n.index??0);function nc({review:e,at:n,children:s}){const[r,a]=C.useState(null),[o,c]=C.useState("");if(!e)return t.jsx(t.Fragment,{children:s});const u=e.comments.map((p,f)=>({c:p,i:f})).filter(({c:p})=>BR(p,n)),d=()=>{o.trim()&&e.add({...n,text:o.trim()}),c(""),a(null)};return t.jsxs("div",{className:`part ${r?"open":""}`,children:[t.jsxs("div",{className:"partbody",children:[t.jsx("div",{className:"partmain",children:r==="edit"?t.jsx(UR,{review:e,at:n,onDone:()=>a(null)}):s}),r!=="edit"&&t.jsxs("span",{className:"parttools",children:[t.jsx("button",{className:"iconbtn",title:"Comment on this","aria-label":"Comment on this",onClick:()=>a("comment"),children:t.jsx(Qg,{size:13})}),e.canEdit(n)&&t.jsx("button",{className:"iconbtn",title:"Edit it yourself","aria-label":"Edit it yourself",onClick:()=>a("edit"),children:t.jsx(Nc,{size:13})})]})]}),u.map(({c:p,i:f})=>t.jsxs("div",{className:"pcomment",children:[t.jsx(Qg,{size:12})," ",t.jsx("span",{children:p.text}),t.jsx("button",{className:"iconbtn","aria-label":"Remove comment",onClick:()=>e.remove(f),children:t.jsx(Ze,{size:12})})]},f)),r==="comment"&&t.jsxs("div",{className:"pcomment new",children:[t.jsx("input",{className:"input",autoFocus:!0,value:o,placeholder:"Your comment on this part. Enter to add",onChange:p=>c(p.target.value),onKeyDown:p=>{p.key==="Enter"&&d(),p.key==="Escape"&&a(null)}}),t.jsx("button",{className:"btn sm",onClick:d,children:"Add"})]})]})}function UR({review:e,at:n,onDone:s}){const r=fe(),a=e.t,o=n.index??0,[c,u]=C.useState(n.part==="story"?a.story??"":n.part==="step"?a.steps?.[o]?.title??"":""),[d,p]=C.useState(a.criteria?.[o]??{given:"",when:"",then:""}),f=()=>r.mutate({path:`/api/v1/tickets/${a.id}/plan/edit`,body:n.part==="criterion"?{...n,criterion:d}:{...n,text:c},done:"Edited. Your wording stays."},{onSuccess:s});return t.jsxs("div",{className:"editpart",children:[n.part==="criterion"?["given","when","then"].map(m=>t.jsxs("label",{children:[t.jsx("em",{children:m[0].toUpperCase()+m.slice(1)}),t.jsx("input",{className:"input",value:d[m],onChange:y=>p({...d,[m]:y.target.value})})]},m)):t.jsx("textarea",{className:"waynote",rows:n.part==="story"?3:2,autoFocus:!0,value:c,onChange:m=>u(m.target.value)}),t.jsxs("div",{className:"editbtns",children:[t.jsx("button",{className:"btn sm pri",disabled:r.isPending,onClick:f,children:"Save"}),t.jsx("button",{className:"btn sm",onClick:s,children:"Cancel"})]})]})}const Iy=e=>e?`Given ${e.given}, when ${e.when}, then ${e.then}.`:"";function WR({t:e}){const[n,s]=C.useState(!0),r=e.planReview?.before;if(!r)return null;const a=[],o=(d,p="",f="")=>p!==f&&a.push({label:d,old:p,now:f});o("The story",r.story,e.story);const c=Math.max(r.criteria?.length??0,e.criteria?.length??0);for(let d=0;d<c;d++)o(`Done when ${d+1}`,Iy(r.criteria?.[d]),Iy(e.criteria?.[d]));(r.decision!==void 0||e.decision)&&o("The decision",r.decision,e.decision?`${e.decision.title}: ${e.decision.options.find(d=>d.chosen)?.name??""}`:"");const u=Math.max(r.steps?.length??0,e.steps?.length??0);for(let d=0;d<u;d++)o(`Step ${d+1}`,r.steps?.[d],e.steps?.[d]?.title);return t.jsxs("div",{className:"changed",children:[t.jsxs("button",{className:"changedhead",onClick:()=>s(!n),children:[t.jsx("b",{children:"What changed"})," ",a.length?`${a.length} ${a.length===1?"part":"parts"}`:"nothing"," since the last version ",n?"▾":"▸"]}),n&&t.jsxs(t.Fragment,{children:[(e.planReview?.sent??[]).length>0&&t.jsxs("div",{className:"sentlist",children:["Your comments:"," ",e.planReview.sent.map((d,p)=>t.jsxs("span",{children:["“",d.text,"”"]},p))]}),a.map(d=>t.jsxs("div",{className:"chrow",children:[t.jsx("div",{className:"chlabel",children:d.label}),t.jsx("div",{className:d.old?"chold":"chold empty",children:d.old||t.jsx("i",{children:"new"})}),t.jsx("div",{className:"chnew",children:d.now||t.jsx("i",{children:"removed"})})]},d.label))]})]})}function Bj(e){return!!(e.now&&(e.now.state==="working"||e.now.state==="queued"||e.now.state==="stopping"))}function HR(e){const n=Math.max(0,Math.floor((Date.now()-Date.parse(e))/1e3));if(n<2)return"just now";if(n<60)return`${n} seconds ago`;const s=Math.floor(n/60);return`${s} minute${s===1?"":"s"} ago`}function Uj({bar:e,big:n}){return e?.length?t.jsx("div",{className:`segbar ${n?"big":""}`,"aria-hidden":!0,children:e.map((s,r)=>t.jsx("span",{className:s==="done"?"d":s==="now"?"n":""},r))}):null}function VR({t:e}){const n=e.now;if(n.state==="queued")return t.jsx("div",{className:"nl1 quiet",children:n.line});const[s,...r]=n.line.split(" · "),a=e.quiet;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"nl1",children:[t.jsx("span",{className:"live"}),t.jsxs("span",{children:[t.jsx("b",{children:s}),r.length?` · ${r.join(" · ")}`:""]})]}),a?t.jsxs("div",{className:`nl2 slow ${a.kind}`,children:[a.kind==="stuck"?t.jsx(Oi,{size:12}):t.jsx(D2,{size:12}),a.kind==="stuck"?"Looks stuck":"Taking longer than usual",n.seconds!==void 0&&a.kind==="long"?` · ${n.time?.split(" · ")[0]}`:""]}):n.time&&t.jsx("div",{className:"nl2",children:n.time}),t.jsx(Uj,{bar:n.bar})]})}function Wj({t:e}){const n=e.now,s=n.state==="queued"?"Next in line":n.state==="stopping"?"Stopping":"Working",[r,...a]=(n.detail??"").split(" · ");return t.jsxs("section",{className:"nowcard","aria-label":"What is happening now",children:[t.jsxs("div",{className:"nowhead",children:[n.state==="working"&&t.jsx("span",{className:"live"}),t.jsxs("span",{children:[s,n.state==="working"&&n.lastAt?` · last update ${HR(n.lastAt)}`:""]})]}),t.jsx("p",{className:"nowsay",children:n.sentence}),n.detail&&t.jsxs("div",{className:"nowmeta",children:[n.part?t.jsx("b",{children:r}):r,a.length?` · ${a.join(" · ")}`:""]}),t.jsx(Uj,{bar:n.bar,big:!0}),n.next&&t.jsxs("div",{className:"nownext",children:[t.jsx("b",{children:"What comes next:"})," ",n.next]})]})}function Hj({t:e}){const n=e.now?.role==="squad"?"tester":e.now?.role,s=n?e.activity.filter(o=>o.who===n):[],r=(s.length>=2?s:e.activity).slice(0,6);if(!r.length)return null;const a=s.length>=2&&n?Ns[n]:"squad";return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["What the ",a," did, in plain words"]}),t.jsx("div",{className:"feed",children:r.map((o,c)=>t.jsxs("div",{className:"fe",children:[t.jsx("span",{className:"tm",children:Tn(o.at)}),t.jsx(Br,{role:o.who,small:!0}),t.jsx("span",{children:o.text})]},o.at+c))})]})}function KR({t:e}){const n=fe(),[s,r]=C.useState(!1),a=e.now?.slow,o=n.isPending||e.stopRequested;if(!a)return null;const c=a.kind==="stuck",u=()=>n.mutate({path:`/api/v1/tickets/${e.id}/keep-waiting`,body:{minutes:10},done:"OK. squad-kit stays quiet about it for 10 minutes."}),d=()=>n.mutate({path:`/api/v1/tickets/${e.id}/restart`,done:"Stopping the step. It starts again at once, with the work so far."}),p=()=>n.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),f=()=>n.mutate({path:`/api/v1/tickets/${e.id}/unstick`,done:"Ended the stuck command. The squad carries on."}),m=()=>n.mutate({path:`/api/v1/tickets/${e.id}/free-port`,done:"Stopped it. The step starts again, with the work so far."},{onSettled:()=>r(!1)});return t.jsxs("section",{className:`slowcard ${c?"stuck":""}`,"aria-label":a.title,children:[t.jsxs("div",{className:"slowhead",children:[c?t.jsx(Oi,{size:17}):t.jsx(D2,{size:17}),t.jsx("b",{children:a.title}),t.jsx("span",{className:"grow"}),t.jsx("span",{className:"where",children:a.where})]}),t.jsxs("div",{className:"slowbody",children:[t.jsx("p",{className:"slowsay",children:a.text}),t.jsx("div",{className:"facts",children:a.facts.map(y=>t.jsxs("div",{className:"fact",children:[t.jsx("span",{children:y.label}),t.jsx("span",{children:y.value})]},y.label))}),t.jsxs("div",{className:"ways",children:[a.freePort&&t.jsx("button",{className:"btn pri",disabled:o,onClick:()=>r(!0),children:"Stop it and try again"}),c&&a.canEnd&&!a.freePort&&t.jsx("button",{className:"btn pri",disabled:o,onClick:f,children:"End the stuck command"}),!c&&t.jsx("button",{className:"btn you",disabled:o,onClick:u,children:"Give it 10 more minutes"}),t.jsx("button",{className:"btn",disabled:o,onClick:d,children:"Stop and try again"}),c&&t.jsx("button",{className:"btn",disabled:o,onClick:u,children:"Keep waiting"}),t.jsxs("button",{className:"btn",disabled:o,onClick:p,children:[t.jsx(is,{size:12})," Stop"]})]}),c&&a.canEnd&&t.jsx("p",{className:"note slownote",children:"Ending the command gives the squad an error back, and it carries on in the same conversation."}),a.detail&&t.jsxs("details",{className:"costdetails slownote",children:[t.jsx("summary",{children:"Details for engineers"}),t.jsx("p",{className:"note",style:{whiteSpace:"pre-line",overflowWrap:"anywhere"},children:a.detail})]}),t.jsxs("div",{className:"slowfoot",children:[t.jsx("span",{children:a.limit??"Nothing is lost whatever you choose."}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:a.freePort?`squad unstick ${e.id} --free-port`:c&&a.canEnd?`squad unstick ${e.id}`:`squad wait ${e.id} --more 10m`})]})]}),s&&a.freePort&&t.jsxs(We,{title:"Stop it and try again?",onClose:()=>r(!1),footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:m,children:n.isPending?"Stopping it…":"Stop it and try again"}),t.jsx("button",{className:"btn",onClick:()=>r(!1),children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad unstick ${e.id} --free-port`})]}),children:[t.jsxs("p",{children:["squad-kit stops ",a.freePort.what,", then starts this step again."," ",a.freePort.what.startsWith("your app")?"You can start it again from Your apps afterwards.":"squad-kit started that program itself, so nothing of yours is closed."]}),t.jsx("p",{className:"note",children:"The work so far is kept. squad-kit checks again that it started the program before it stops it."})]})]})}function Vj({t:e}){const[n,s]=C.useState(""),[r,a]=C.useState([]),[o,c]=C.useState(!1),u=async()=>{const p=n.trim();if(!(!p||o)){c(!0);try{const f=await wt(`/api/v1/tickets/${e.id}/status/ask`,"POST",{text:p});a(m=>[...m,{q:p,a:f,at:new Date().toISOString()}]),s("")}catch(f){a(m=>[...m,{q:p,error:f instanceof Error?f.message:String(f),at:new Date().toISOString()}])}finally{c(!1)}}},d=An(n).dir;return t.jsxs("section",{className:"askbox","aria-label":"Ask about this ticket",children:[t.jsx("label",{htmlFor:`ask-${e.id}`,className:"lbl",children:"Ask about this ticket"}),r.length>0&&t.jsx("div",{className:"askthread",children:r.map((p,f)=>t.jsx(YR,{t:e,said:p},p.at+f))}),t.jsxs("div",{className:"askrow",children:[t.jsx("input",{id:`ask-${e.id}`,className:"input",dir:d,value:n,onChange:p=>s(p.target.value),onKeyDown:p=>p.key==="Enter"&&void u(),placeholder:"For example: is there a problem? when will it be ready?"}),t.jsxs("button",{className:"btn pri",disabled:!n.trim()||o,onClick:()=>void u(),children:[t.jsx(ls,{size:14})," Ask"]})]}),t.jsxs("div",{className:"askfoot",children:[t.jsx("span",{children:"Status answers come at once, in English or Arabic, with no AI cost. Questions for an agent reach it at its next safe moment."}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad status ${e.id}`})]})]})}function YR({t:e,said:n}){const s=n.a,r=s?.lang==="ar",a=An(n.q).dir;return t.jsxs("div",{className:"askturn",children:[t.jsx("div",{className:"askme",dir:a,children:n.q}),t.jsxs("div",{className:`askit ${r?"ar":""}`,dir:r?"rtl":"ltr",lang:r?"ar":"en",children:[t.jsxs("div",{className:"who",children:[t.jsx("b",{children:"squad-kit"}),s?.instant&&t.jsx("span",{className:"tag",children:r?"إجابة فورية":"answered at once"}),t.jsx("span",{className:"note",children:Tn(n.at)})]}),n.error?t.jsx("p",{className:"err",children:n.error}):s?.lines.map((o,c)=>t.jsx("p",{children:o},c)),s&&s.offers.length>0&&t.jsx("div",{className:"askoffers",children:s.offers.map(o=>t.jsx(QR,{t:e,o,question:n.q},o.do+o.label))})]})]})}function QR({t:e,o:n,question:s}){const r=fe(),{toast:a}=_e(),[o,c]=C.useState(!1),[u,d]=C.useState(!1);switch(n.do){case"propose":return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn sm offer",onClick:()=>c(!0),children:[t.jsxs("span",{className:"ol",children:[t.jsx(rs,{size:13})," ",n.label]}),t.jsx("span",{className:"on",children:n.note})]}),o&&t.jsx(Io,{t:e,initial:s,onClose:()=>c(!1)})]});case"note":return t.jsxs("button",{className:"btn sm offer",disabled:u||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:s,...n.to?{to:n.to}:{}}},{onSuccess:()=>{d(!0),a(`Sent. ${n.note}`)}}),children:[t.jsxs("span",{className:"ol",children:[t.jsx(ls,{size:13})," ",u?"Sent":n.label]}),t.jsx("span",{className:"on",children:n.note})]});case"chat":return t.jsx(Yr,{t:e,agent:n.to,label:n.label});case"stop":return t.jsxs("button",{className:"btn sm",disabled:r.isPending||e.stopRequested,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[t.jsx(is,{size:12})," ",n.label]})}}function GR({t:e}){const n=fe(),[s,r]=C.useState(!1),a=e.agentQuestion,o=a.port,c=a.options.find(p=>p==="Stop it"),u=a.options.find(p=>p!=="Stop it"),d=(p,f)=>n.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:p},done:f},{onSettled:()=>r(!1)});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:"?"}),t.jsxs("div",{children:[t.jsx("b",{children:"Another program is in the way"}),t.jsx("span",{children:"You decide. Nothing is stopped unless you press Stop it."})]})]}),t.jsx("div",{className:"lbl",children:"What is in the way"}),t.jsx("p",{className:"stuckq",children:a.text}),a.why&&t.jsx("p",{className:"note",children:a.why}),t.jsxs("details",{className:"costdetails",children:[t.jsx("summary",{children:"Details for engineers"}),t.jsxs("p",{className:"note",children:[o.program||"A program",o.pid?` (process ${o.pid})`:", which the system does not name,",o.port?` listens on port ${o.port}`:"",o.app?`: your app ${o.app}, which squad-kit runs from Your apps`:"","."]}),t.jsxs("p",{className:"note",children:["The Builder asked: “",o.asked,"”"]})]})]}),t.jsxs("div",{className:"df",children:[c&&t.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:()=>r(!0),children:c}),u&&t.jsx("button",{className:`btn ${c?"":"pri"}`,disabled:n.isPending,onClick:()=>d(u,"Sent. The Builder carries on without it."),children:u}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad reply ${e.id} ${Fe(c??u??"")}`})]}),s&&c&&t.jsxs(We,{title:o.app?`Stop your app ${o.app}?`:"Stop that program?",onClose:()=>r(!1),footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:()=>d(c,"Stopping it. The Builder carries on."),children:n.isPending?"Stopping it…":"Stop it"}),t.jsx("button",{className:"btn",onClick:()=>r(!1),children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad reply ${e.id} ${Fe(c)}`})]}),children:[t.jsxs("p",{children:["squad-kit stops ",o.app?`your app ${o.app}`:"that program",", then the Builder carries on. ",o.app?"You can start it again from Your apps afterwards.":"Anything not saved in that program is lost."]}),t.jsx("p",{className:"note",children:"squad-kit checks again first that it is still the same program."})]})]})}function Kj({t:e,banner:n}){const s=fe(),r=e.testChange;if(!r?.ask)return null;const a=c=>s.mutate({path:`/api/v1/tickets/${e.id}/test-command`,body:{use:c},done:c?"squad-kit tests this project the new way from now on.":"squad-kit keeps the current way of testing."}),o=t.jsxs("div",{className:"outdated-item testchange",children:[t.jsxs("div",{className:"outdated-head",children:[t.jsx("span",{className:"ic",children:t.jsx(J5,{size:15})}),t.jsx("b",{children:"The way this project's tests run changed, and squad-kit cannot tell if the new way checks as much as the current one."})]}),t.jsxs("div",{className:"row",children:[t.jsx("button",{className:"btn sm pri",disabled:s.isPending,title:"The checks stay as they are, and the Builder fixes what they find.",onClick:()=>a(!1),children:"Keep the current way"}),t.jsx("button",{className:"btn sm",disabled:s.isPending,title:"The checks use the new way from now on.",onClick:()=>a(!0),children:"Use the new way"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad test-command ${e.id} --keep`})]}),t.jsxs("details",{className:"costdetails",children:[t.jsx("summary",{children:"Details for engineers"}),t.jsxs("p",{className:"note",children:["Current: ",t.jsx("code",{children:r.from}),t.jsx("br",{}),"New: ",t.jsx("code",{children:r.to}),r.ran?t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r.ran]}):null]})]})]});return n?t.jsx("div",{className:"outdated","aria-label":"A choice about the tests",children:o}):o}const um="No tests ran, so squad-kit could not check that the work does what it should. Check the proof with extra care. To turn tests on, have an engineer add tests to the project.";function Yj(e){return e?.checks==="unchecked"?"Not checked: no tests ran":e?.checks==="skipped"?/weakened/i.test(e.checksText??"")?"Tests weakened, you continued":"Checks failed, you continued":e?.checksText??"All checks pass"}function ZR(e){if(e?.checks!=="unchecked")return null;const n=e.checksText?.split(" · ").slice(1).join(" · ");return um.replace("Check the proof",`${n?`Passed: ${n}. `:""}Check the proof`)}function XR(e){const n='Compare the screens before and after each "done when".';return e?.checks==="unchecked"?`Not checked: no tests ran, so look closely. ${n}`:e&&[e.checks,e.review,e.proof].some(s=>s==="skipped")?`You went past a gate, so look closely. ${n}`:`Every gate is green. ${n}`}function Qj(e){const n=(e.proof??[]).some(a=>a.shows==="broken"),s=(e.proof??[]).some(a=>a.shows==="not-shown"),r=(e.proof??[]).some(a=>a.shows==="off-screen");return e.gates?.proof==="skipped"?n?'A "done when" not working, you continued':s?'A "done when" not shown, you continued':r?"Not on a screen, you continued":"No screenshots, you continued":e.gates?.proof==="fail"&&n?'A "done when" not working yet':e.gates?.proof==="fail"&&s?'A "done when" not shown yet':e.gates?.proof==="fail"&&r?"Nothing shows on a screen yet":"Proof made"}function Gj(e){return e.gates?.proof==="skipped"||(e.work?.screens??0)>0?"No screenshots were taken for this ticket. See the activity for why.":e.gates?.checks==="unchecked"?"No screens change in this ticket and no tests ran, so read the changes in the Changes tab.":"No screens change in this ticket, so the passing checks are the proof."}function JR(e){return e.weakened?.length?"weakened tests":e.gate==="checks"?"failed checks":e.gate==="proof"?"unfinished proof":"open review"}function Ir({state:e,text:n}){const s=e==="pass"?"ok":e==="skipped"?"skip":e==="unchecked"?"unchecked":"wait";return t.jsxs("span",{className:`pill ${s}`,title:e==="unchecked"?um:void 0,children:[e==="pass"&&t.jsx(xe,{size:13,strokeWidth:2.5}),e==="unchecked"&&t.jsx(Pr,{size:13,strokeWidth:2.5}),n]})}function Zj({g:e,className:n=""}){const s=ZR(e);return s?t.jsxs("p",{className:`note unchecked-why ${n}`,children:[t.jsx(Pr,{size:14,strokeWidth:2.4,"aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("b",{children:"Not checked."})," ",s]})]}):null}function eI(e){return e==="met"?"Met":e==="broken"?"Not working yet":e==="not-shown"?"Not shown yet":e==="off-screen"?"Not on a screen":null}function dm(e){return e==="met"?"met":e==="broken"?"broken":e==="not-shown"?"notshown":e==="off-screen"?"notonscreen":""}function mo(e){return e.shows==="broken"||e.shows==="not-shown"||e.shows==="off-screen"?e.why??e.note??"":e.note??""}function tI(e){const n=(e.proof??[]).filter(s=>s.shows==="off-screen").map(s=>({criterion:s.criterion,why:mo(s)}));return[...n,...(e.offScreen??[]).filter(s=>!n.some(r=>r.criterion===s.criterion))]}function Xj(e,n){const s=[],r=[];for(const a of e)r.push(s.length),s.push({src:n(a.before),caption:`${a.criterion} · ${a.beforeLabel}`},{src:n(a.after),caption:`${a.criterion} · ${a.afterLabel}`}),(a.more??[]).forEach((o,c)=>s.push({src:n(o.after),caption:`${a.criterion} · ${o.note||`Picture ${c+2}`}`}));return{pictures:s,starts:r}}function Jj({shows:e,size:n=15}){return e==="broken"?t.jsx(Ze,{size:n,strokeWidth:2.5,className:"vx","aria-hidden":"true"}):e==="not-shown"?t.jsx(W2,{size:n,strokeWidth:2.25,className:"vq","aria-hidden":"true"}):e==="off-screen"?t.jsx(f6,{size:n,strokeWidth:2.25,className:"vo","aria-hidden":"true"}):t.jsx(xe,{size:n,strokeWidth:2.5,"aria-hidden":"true"})}function Wp({shows:e}){const n=eI(e);return n?t.jsx("span",{className:`verdict ${dm(e)}`,children:n}):null}function e3({shot:e,first:n,onOpen:s}){return e.more?.length?t.jsxs("div",{className:"proofmore",children:[t.jsx("small",{children:'More pictures of this "done when"'}),t.jsx("div",{className:"proofmore-row",children:e.more.map((r,a)=>t.jsxs("figure",{children:[t.jsx("button",{className:"zoom",onClick:()=>s(n+a),"aria-label":`Open picture ${a+2} of this "done when" full size`,children:t.jsx("img",{src:ws(`/api/v1/proof/${r.after}`),alt:`${e.criterion}, ${r.note||`picture ${a+2}`}`,loading:"lazy"})}),t.jsxs("figcaption",{children:[r.note&&t.jsx("span",{children:r.note}),Or(r)&&t.jsx("code",{children:Or(r)})]})]},r.after))})]}):null}function Ki({t:e,className:n}){return e.alsoChanged?.length?t.jsxs("p",{className:`note alsochanged${n?` ${n}`:""}`,children:[t.jsx("b",{children:"Also changed, not in the plan:"})," ",e.alsoChanged.join("; "),"."]}):null}function Hp({t:e}){return!e.offScreen?.length||zo(e)?null:t.jsxs("div",{className:"offscreen",children:[t.jsx("div",{className:"lbl",children:"Not on a screen"}),t.jsx("ul",{children:e.offScreen.map(n=>t.jsxs("li",{children:[t.jsx("b",{children:n.criterion}),t.jsx("span",{children:n.why})]},n.criterion))})]})}function nI({t:e}){const n=tI(e);return n.length?t.jsxs("div",{className:"offscreen",children:[t.jsx("div",{className:"lbl",children:"Not on a screen, so look at these yourself"}),t.jsx("ul",{children:n.map(s=>t.jsxs("li",{children:[t.jsx("b",{children:s.criterion}),t.jsx("span",{children:s.why})]},s.criterion))})]}):null}function sI(e,n){return!!e.mergedAt||e.stage==="done"||n&&e.stage==="release"}function Lc(e){return Vc.createPortal(e,document.body)}function rI(){const e=Ye();return e.data?.ready?e.data.meta.engine==="demo":!1}function iI({t:e,onDeleted:n,items:s=[]}){const[r,a]=C.useState(!1),[o,c]=C.useState(null),u=sI(e,rI()),d=t3(e),p=C.useRef(null);C.useEffect(()=>{if(!r)return;const m=x=>p.current&&!p.current.contains(x.target)&&a(!1),y=x=>x.key==="Escape"&&a(!1);return document.addEventListener("mousedown",m),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",y)}},[r]);const f=m=>()=>{a(!1),m()};return t.jsxs("span",{className:"more",ref:p,children:[t.jsx("button",{className:"iconbtn","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":r,title:"More actions",onClick:()=>a(!r),children:t.jsx(U2,{size:16})}),r&&t.jsxs("div",{className:"more-menu",role:"menu",children:[s.map(m=>t.jsx("button",{role:"menuitem",onClick:f(m.onPick),children:m.label},m.key)),e.archived?t.jsxs("button",{role:"menuitem",onClick:f(d),children:[t.jsx(L2,{size:15})," Unarchive"]}):u?t.jsxs("button",{role:"menuitem",onClick:f(()=>c("archive")),children:[t.jsx(jc,{size:15})," Archive…"]}):e.ownerDeleted?t.jsxs("button",{role:"menuitem",className:"danger",onClick:f(()=>c("delete")),children:[t.jsx(mn,{size:15})," Remove from my board…"]}):t.jsxs("button",{role:"menuitem",className:"danger",onClick:f(()=>c("delete")),children:[t.jsx(mn,{size:15})," Delete ticket…"]})]}),o==="delete"&&Lc(t.jsx(Vp,{t:e,onClose:()=>c(null),onDeleted:n})),o==="archive"&&Lc(t.jsx(aI,{t:e,onClose:()=>c(null)}))]})}function t3(e){const n=fe();return()=>n.mutate({path:`/api/v1/tickets/${e.id}/archive`,body:{undo:!0},done:`${e.id} is back on the board.`})}function _c({items:e,mark:n}){return t.jsx("ul",{className:"rmlist",children:e.map(s=>t.jsxs("li",{children:[n==="x"?t.jsx(Ze,{size:16,className:"x","aria-hidden":!0}):n==="hide"?t.jsx(W2,{size:16,className:"hide","aria-hidden":!0}):t.jsx(xe,{size:16,className:"ok","aria-hidden":!0}),t.jsx("span",{children:s})]},s))})}function Vp({t:e,onClose:n,onDeleted:s}){const r=fe(),{toast:a}=_e(),[o,c]=C.useState(!!e.deleting?.remote),u=Pe({queryKey:["delete-plan",e.id,o],queryFn:()=>Ee(`/api/v1/tickets/${e.id}/delete?remote=${o?1:0}`),placeholderData:T4}),d=u.data,p=!!(d?.local??e.ownerDeleted),f=()=>r.mutate({path:`/api/v1/tickets/${e.id}/delete`,body:{remote:o},done:p?`Removed ${e.id} from your board.`:`Deleted ${e.id}. Its cost stays in Usage.`},{onSuccess:m=>{m.notes.length&&a(`${m.notes.join(". ")}.`),n(),s()},onError:()=>void u.refetch()});return t.jsxs(We,{title:p?`Remove ${e.id} from your board?`:`Delete ${e.id}?`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(mn,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn danger",disabled:!d||!!d.refused||r.isPending,onClick:f,children:[t.jsx(mn,{size:15})," ",p?r.isPending?"Removing…":"Remove from my board":r.isPending?"Stopping the squad and deleting…":d?.unfinished?"Delete again":`Delete ${e.id}`]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:d?.command??`squad delete ${e.id}`})]}),children:[t.jsx("p",{children:d?.summary??e.title}),u.isError&&t.jsx("div",{className:"stuckbox",children:u.error.message}),d?.refused&&t.jsx("div",{className:"stuckbox",children:d.refused}),d&&!d.refused&&t.jsxs(t.Fragment,{children:[d.unfinished&&t.jsxs("div",{className:"stuckbox rm-gap",children:["The last delete did not finish: ",d.unfinished,". Delete again to finish it. It goes on where it stopped."]}),d.warnings.length>0&&t.jsx("div",{className:"stuckbox rm-gap",children:d.warnings.map(m=>t.jsx("div",{children:m},m))}),t.jsx("div",{className:"lbl",children:"This removes"}),t.jsx(_c,{items:d.removes,mark:"x"}),t.jsx("div",{className:"lbl",children:"This stays"}),t.jsx(_c,{items:d.stays,mark:"ok"}),d.pushed&&t.jsxs("label",{className:"talkfirst",children:[t.jsx("input",{type:"checkbox",checked:o,onChange:m=>c(m.target.checked)}),t.jsxs("span",{children:[t.jsxs("b",{children:["Also delete the branch ",d.pushed.branch," on ",d.pushed.remote,"."]})," ",d.pushed.why]})]}),p?t.jsxs("p",{className:"rm-note",children:["Only ",d.local?.by??"its owner"," could delete ",e.id,". This cleans your computer only."]}):t.jsxs("p",{className:"rm-note",children:["A ticket that is already merged cannot be deleted, because its code is in ",d.base,". Use ",t.jsx("b",{children:"Archive"})," to hide it from the board. Its history stays."]})]})]})}function aI({t:e,onClose:n}){const s=fe(),r=()=>s.mutate({path:`/api/v1/tickets/${e.id}/archive`,done:`Archived ${e.id}. Show archived, at the bottom of the board, shows it again.`},{onSuccess:n});return t.jsxs(We,{title:`Archive ${e.id}?`,onClose:n,icon:t.jsx("span",{className:"glyph",children:t.jsx(jc,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:r,children:[t.jsx(jc,{size:15})," Archive ",e.id]}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad archive ${e.id}`})]}),children:[t.jsxs("p",{children:[e.title," · ",e.status]}),t.jsx("div",{className:"lbl",children:"This hides"}),t.jsx(_c,{items:["The ticket from the board. Show archived, at the bottom of the board, shows it again."],mark:"hide"}),t.jsx("div",{className:"lbl",children:"This stays"}),t.jsx(_c,{items:["Its code, and its history in git and in .squad/",...e.release&&e.stage!=="done"?[`Its place in release ${e.release}`]:[],"The cost it used, still counted in Usage"],mark:"ok"}),t.jsx("p",{className:"rm-note",children:"Unarchive brings it back to the board, as it was."})]})}function oI({t:e,onDeleted:n}){const[s,r]=C.useState(!1),a=t3(e);if(e.ownerDeleted&&!e.deleting){const o=e.ownerDeleted;return t.jsxs("div",{className:"stuckbox rm-banner",children:[t.jsxs("span",{className:"grow",children:[t.jsxs("b",{children:["Deleted by ",o.by,"."]})," ",o.how==="note"?`${o.by} deleted ${e.id} on their computer ${Zt(o.at)}.`:`Its branch ${o.branch} is gone from the remote and it never reached the main code, so ${o.by} deleted it.`," ","Only ",o.by," could delete it. Removing it here cleans your computer only."]}),t.jsxs("button",{className:"btn sm",onClick:()=>r(!0),children:[t.jsx(mn,{size:13})," Remove from my board"]}),t.jsx(ie,{text:`squad delete ${e.id}`}),s&&Lc(t.jsx(Vp,{t:e,onClose:()=>r(!1),onDeleted:n}))]})}if(e.deleting){const o=!!e.deleting.error||Date.now()-Date.parse(e.deleting.at)>9e4;return t.jsxs("div",{className:"stuckbox rm-banner",children:[t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:e.deleting.error?"Delete did not finish.":"Deleting…"})," ",e.deleting.error?`${e.deleting.error}. Delete again to finish it; it goes on where it stopped.`:"The squad stops first, then each part of the ticket goes."]}),o&&t.jsxs("button",{className:"btn sm",onClick:()=>r(!0),children:[t.jsx(mn,{size:13})," Delete again"]}),t.jsx(ie,{text:`squad delete ${e.id}`}),s&&Lc(t.jsx(Vp,{t:e,onClose:()=>r(!1),onDeleted:n}))]})}return e.archived?t.jsxs("div",{className:"calm rm-banner",children:[t.jsx("span",{className:"ring",children:t.jsx(jc,{size:16})}),t.jsxs("div",{className:"grow",children:[t.jsxs("b",{children:["Archived ",Zt(e.archived.at)," by ",e.archived.by]}),t.jsx("span",{children:"It is off the board. Its history stays in git and in .squad/."}),t.jsx("div",{className:"rm-cmd",children:t.jsx(ie,{text:`squad archive ${e.id} --undo`})})]}),t.jsxs("button",{className:"btn sm",onClick:a,children:[t.jsx(L2,{size:13})," Unarchive"]})]}):null}function go(e){return!!e.mergedAt||e.stage==="done"}function hm(e){const n=Ye(),s=n.data?.ready?[...n.data.tickets,...n.data.archived??[]]:[];return(e.dependsOn??[]).map(r=>s.find(a=>a.id===r)).filter(r=>!!r)}function pm(){const e=Ye();return e.data?.ready&&e.data.meta.git?.base||"main"}function lI(e){return e.waiting?.kind==="depends"||e.dependency?.way==="wait"&&!e.dependency.started&&!e.squad&&!e.waiting}const cI={branch:"--on-branch",anyway:"--anyway",wait:"--wait"};function uI({t:e}){const n=fe(),s=pm(),r=Ye(),a=r.data?.ready?r.data.meta.engine==="live":!0,o=hm(e).filter(k=>!go(k)),c=e.dependency?.way==="wait"&&!e.waiting,[u,d]=C.useState(c?null:"branch"),p=o.map(k=>k.id).join(" and ")||"it",f=o.length===1?o[0]:void 0,m=!!(a&&f&&!f.worktree&&!f.branch),y=[{way:"branch",label:f?`Build on ${f.id}'s branch`:"Build on its branch",note:`The copy starts from ${p}'s work so far. Once ${p} is merged, the latest ${s} comes in and any clash is settled.`,off:f?m?`${f.id} has no code yet.`:void 0:"A copy can start from one branch only."},{way:"anyway",label:"Build anyway",note:`From ${s}, without ${p}. This stays on the ticket's record.`},{way:"wait",label:"Wait",note:`Starts by itself when ${p} ${o.length>1?"are":"is"} merged.`,off:c?"This is what it does now.":void 0}],x=y.find(k=>k.way===u&&!k.off),v={branch:`Building on ${p}'s branch`,anyway:`Building without ${p}`,wait:`It starts by itself once ${p} is merged`};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:c?t.jsx(gp,{size:15}):t.jsx(mp,{size:15})}),t.jsxs("div",{children:[t.jsx("b",{children:c?`Waits for ${p} to merge`:e.waiting?.summary??`${e.id} needs ${p}, which is not merged yet`}),t.jsx("span",{children:c?`It starts by itself once ${p} ${o.length>1?"are":"is"} merged. You can still build it another way.`:`Its design uses work from ${p}, which is not in ${s} yet. Choose how to build.`})]})]}),t.jsx("div",{className:"lbl",children:"What it needs"}),o.map(k=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:k.id}),t.jsx("b",{children:k.title}),t.jsxs("span",{className:"pill wait",children:[$s[k.stage]," · not merged yet"]})]},k.id)),t.jsxs("div",{className:"lbl",children:["How to build ",e.id]}),t.jsx("div",{className:"opts2",style:{gridTemplateColumns:"1fr"},children:y.map(k=>t.jsxs("button",{className:`opt2 ${u===k.way&&!k.off?"pick":""}`,disabled:!!k.off,onClick:()=>d(k.way),children:[t.jsxs("b",{children:[k.label,u===k.way&&!k.off&&t.jsxs("span",{children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Your pick"]})]}),k.off?`${k.note} ${k.off}`:k.note]},k.way))})]}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:!x||n.isPending,onClick:()=>x&&n.mutate({path:`/api/v1/tickets/${e.id}/build`,body:{way:x.way},done:v[x.way]}),children:[x?.way==="wait"?t.jsx(gp,{size:15}):t.jsx(mp,{size:15})," ",x?x.label:"Pick a way"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad build ${e.id} ${cI[x?.way??"branch"]}`})]})]})}const dI={branch:(e,n)=>`Built on ${e}'s branch. The latest ${n} comes in once ${e} is merged.`,anyway:(e,n)=>`Built from ${n} without ${e}, as you chose.`,wait:e=>`Waits for ${e} to merge, then starts by itself.`};function hI({t:e}){const n=hm(e),s=pm();if(!e.dependsOn?.length)return null;const r=e.dependency;return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Depends on"}),t.jsx("div",{className:"pills",children:e.dependsOn.map(a=>{const o=n.find(u=>u.id===a),c=!o||go(o);return t.jsxs("span",{className:`pill ${c?"ok":"wait"}`,title:o?.title,children:[c&&t.jsx(Y2,{size:13}),a,o?` ${o.title}`:""," · ",o?c?"merged":"not merged yet":"left the board"]},a)})}),r&&(r.way!=="wait"||!r.started)&&t.jsxs("p",{className:"note",style:{marginTop:6},children:[dI[r.way](r.on.join(" and "),s)," ",r.by," chose this."]})]})}function pI({t:e}){const n=hm(e).filter(o=>!go(o));if(!n.length||e.waiting?.kind==="depends"||go(e))return null;const s=n.map(o=>o.id).join(", "),r=e.dependency,a=r?.way==="branch"?`On ${s}'s branch`:r?.way==="wait"&&!r.started?`Waits for ${s}`:r?.way==="anyway"?`Without ${s}`:`Needs ${s}`;return t.jsx("span",{className:"prio owner",title:`Depends on ${s}, which is not merged yet`,children:a})}function fI({t:e}){const n=fe(),s=pm(),r=Ye(),a=r.data?.ready?r.data.meta.engine!=="live":!1;if(!["implement","test","review"].includes(e.stage)||go(e)||e.takenOver||e.waiting&&!["proof","stuck"].includes(e.waiting.kind))return null;const o=!e.waiting&&(e.live||!!e.squad);return t.jsxs("button",{className:"btn sm",disabled:!!e.baseWanted||n.isPending,title:`squad bring-in ${e.id}`,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/bring-in`,done:a?"The sample board has no code, so nothing changed":o?`The latest ${s} comes in when this step ends, before the checks`:`Bringing in the latest ${s}`}),children:[t.jsx(Y2,{size:13})," ",e.baseWanted?`${s} comes in after this step`:`Bring in latest ${s}`]})}function fm(e){const n=Ye(),s=n.data?.ready?n.data.meta.engine==="live":!0;return bA(e,s)}function n3({t:e}){const n=fe(),s=rt[fm(e)],r=Jt(),a=Di(Bi),o=()=>a?void r({to:"/conversations",search:{ticket:e.id}}):Jn.show(e.id);return e.chat?.open?t.jsxs("button",{className:"btn sm askbtn",onClick:o,title:`The chat with the ${rt[e.chat.with]} is open`,children:[t.jsx(En,{size:14})," Open the chat"]}):t.jsxs("button",{className:"btn sm askbtn",disabled:n.isPending,title:`The ${s} answers. ${e.id} stays where it is.`,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{ask:!0}},{onSuccess:o}),children:[t.jsx(En,{size:14})," Ask a question"]})}const mI=e=>(e??"").replace(/^https?:\/\//,"").replace(/\/$/,"");function gI(e){return Pe({queryKey:["try",e],queryFn:()=>Ee(`/api/v1/tickets/${encodeURIComponent(e)}/try`),refetchInterval:n=>n.state.data?.state==="starting"?1e3:4e3})}function mm({t:e}){const n=gI(e.id).data;return t.jsxs("div",{className:"yourcheck",children:[t.jsx(xI,{t:e,s:n}),t.jsx(nI,{t:e}),t.jsx(yI,{t:e,s:n})]})}function xI({t:e,s:n}){const s=yA(e),r=rt[fm(e)];return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Where to look"}),s.length?t.jsx("ul",{className:"lookpages",children:s.map(a=>{const o=n?.state==="running"?n.pages?.find(u=>u.page===a)?.url:void 0,c=(e.proof??[]).filter(u=>zc(u).includes(a)).map(u=>u.criterion);return t.jsxs("li",{children:[t.jsx("code",{children:a}),t.jsx("span",{className:"what",children:c.join(" · ")}),o&&t.jsxs("a",{className:"btn sm",href:o,target:"_blank",rel:"noreferrer",title:`Open ${o}`,children:[t.jsx(es,{size:13})," Open"]})]},a)})}):t.jsxs("p",{className:"note lookpages-none",children:["No page is saved for this story. Ask a question and the ",r," tells you where to look, or try it yourself."]})]})}function yI({t:e,s:n}){const s=fe(),r=n?.state??"off",a=()=>s.mutate({path:`/api/v1/tickets/${e.id}/try`,done:"Starting this story's own copy of the app"}),o=()=>s.mutate({path:`/api/v1/tickets/${e.id}/try/stop`,done:"Stopped it."}),c=r==="running"||r==="starting";return t.jsxs("div",{className:`trybox ${r}`,children:[t.jsxs("div",{className:"trybox-row",children:[t.jsx("span",{className:"ring","aria-hidden":"true",children:r==="starting"?t.jsx(gn,{size:15,className:"spin"}):t.jsx(Li,{size:14})}),t.jsxs("div",{className:"trybox-t",children:[t.jsx("b",{children:r==="running"?"Running":r==="starting"?"Starting…":"Try it yourself"}),t.jsxs("span",{children:["Runs this story's own copy of the app, with the change in it. Nothing is merged.",r==="running"&&n?.url?t.jsxs(t.Fragment,{children:[" ","At ",t.jsx("span",{className:"mono",children:mI(n.url)}),"."]}):null]})]}),t.jsx("span",{className:"grow"}),t.jsxs("div",{className:"trybox-acts",children:[r==="running"&&n?.url&&t.jsxs("a",{className:"btn sm pri",href:n.url,target:"_blank",rel:"noreferrer",title:`Open ${n.url}`,children:[t.jsx(es,{size:13})," Open"]}),c&&t.jsxs("button",{className:"btn sm",disabled:s.isPending,onClick:o,children:[t.jsx(is,{size:11})," Stop"]}),!c&&n?.can&&t.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:a,children:r==="failed"?"Try again":"Try it yourself"})]})]}),r==="failed"&&t.jsx("p",{className:"trybox-why",children:n?.error??"The app did not start."}),r==="failed"&&n?.detail&&t.jsxs("details",{className:"costdetails",children:[t.jsx("summary",{children:"See what failed"}),t.jsx("pre",{className:"app-out",children:n.detail})]}),!c&&n&&!n.can&&n.why&&t.jsx("p",{className:"trybox-why quiet",children:n.why}),!c&&n?.other&&n.can&&t.jsxs("p",{className:"trybox-why quiet",children:[n.other,"'s copy runs now. Trying this one stops it."]}),(c||n?.can)&&t.jsx(ie,{text:c?`squad try ${e.id} --stop`:`squad try ${e.id}`})]})}function s3({id:e,onClose:n}){const s=No(e),r=Hi(),{ticketFull:a,toggleTicketFull:o}=_e(),[c,u]=C.useState(null),[d,p]=C.useState("now");C.useEffect(()=>p("now"),[e]),C.useEffect(()=>{const m=y=>y.key==="Escape"&&!document.querySelector(".modal")&&n();return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[n]);const f=s.data;return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"veil",onClick:n}),t.jsx("aside",{className:`drawer ${a?"full":""}`,"aria-label":f?`${f.id} ${f.title}`:"Ticket",children:f?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"dh",children:[t.jsxs("div",{className:"dtop",children:[t.jsx("span",{className:"idtag",children:f.id}),f.source.type!=="manual"&&(f.source.url?t.jsxs("a",{className:"src",href:f.source.url,target:"_blank",rel:"noreferrer",children:[t.jsx(ss,{size:14})," ",f.source.itemType??"Item"," ",f.source.ref," ",t.jsx(es,{size:12})]}):t.jsxs("span",{className:"src",children:[t.jsx(ss,{size:14})," From ",f.source.ref]})),f.pr&&t.jsxs("a",{className:"src",href:f.pr.url,target:"_blank",rel:"noreferrer",children:[t.jsx(s6,{size:14})," Pull request ",f.pr.id," ",t.jsx(es,{size:12})]}),f.kind==="bug"&&t.jsxs("span",{className:"prio",children:["Bug",f.foundIn?` found in ${f.foundIn}`:""]}),f.priority==="high"&&f.kind!=="bug"&&t.jsx("span",{className:"prio",children:"High priority"}),t.jsx("span",{className:"grow"}),t.jsxs("span",{className:"dacts",children:[t.jsx(n3,{t:f}),f.waiting?.kind==="proof"&&t.jsx($e,{to:"/tickets/$id/proof",params:{id:f.id},className:"iconbtn","aria-label":"Open the proof page",children:t.jsx(es,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:()=>Gc.open({ticket:f.id}),"aria-label":"Report a problem",title:"Report a problem",children:t.jsx(df,{size:15})}),t.jsx(iI,{t:f,onDeleted:n,items:[...(qn(f,r)||!r)&&cu(f)?[{key:"propose",label:t.jsxs(t.Fragment,{children:[t.jsx(rs,{size:15})," ",Es(f)?"Ask for a change…":"Propose a change…"]}),onPick:()=>u("propose")}]:[],...BA(f,r)?[{key:"hand-over",label:t.jsxs(t.Fragment,{children:[t.jsx(bc,{size:15})," Hand over…"]}),onPick:()=>u("hand-over")}]:[]]}),t.jsx("button",{className:"iconbtn fullbtn",onClick:o,"aria-pressed":a,"aria-label":a?"Back to the side panel":"Full width",title:a?"Back to the side panel":"Full width",children:a?t.jsx(Z2,{size:15}):t.jsx(Yc,{size:15})}),t.jsx("button",{className:"iconbtn",onClick:n,"aria-label":"Close",children:t.jsx(Ze,{size:16})})]})]}),c==="hand-over"&&t.jsx(UA,{t:f,onClose:()=>u(null)}),c==="propose"&&t.jsx(Io,{t:f,onClose:()=>u(null)}),t.jsx("h2",{children:f.title}),t.jsx(xP,{t:f}),t.jsxs("div",{className:"sub",children:[t.jsxs("span",{children:["Created by ",t.jsx("b",{children:f.createdBy})," ",Zt(f.createdAt)," · ",t.jsx(gP,{t:f})]}),t.jsxs("span",{children:["Owner ",t.jsx("b",{children:Mo(f)}),qn(f,r)?" (you)":""]}),f.repo&&t.jsxs("span",{children:["Repo ",t.jsx("b",{className:"mono",style:{fontSize:12.5},children:f.repo})]}),f.builder&&t.jsxs("span",{children:["Builder ",t.jsx("b",{children:f.builder})]}),f.reviewer&&t.jsxs("span",{children:["Reviewer ",t.jsx("b",{children:f.reviewer})]})]}),t.jsx(I6,{ticket:f})]}),t.jsxs("div",{className:"tabs",role:"tablist",children:[[["now","Now"],["story","Story"],["plan","Plan"],["activity","Activity"],["conversation","Conversation"],["proof","Proof"],["changes","Changes"],["cost","Cost"]].map(([m,y])=>t.jsxs("button",{className:d===m?"on":"",onClick:()=>p(m),children:[y,m==="now"&&(f.waiting||f.outdated?.length||Ss(f)||as(f))&&t.jsx("span",{className:"dot"})]},m)),t.jsxs("button",{className:`dev ${d==="developer"?"on":""}`,onClick:()=>p("developer"),children:[t.jsx(vo,{size:15})," Developer"]})]}),d==="now"&&f.outdated?.length?t.jsx(TI,{t:f}):null,d==="now"&&as(f)&&f.waiting?.kind!=="plan"&&(qn(f,r)||!r)?t.jsx(Kj,{t:f,banner:!0}):null,d==="now"&&t.jsx(WA,{t:f}),d==="now"&&t.jsx(oI,{t:f,onDeleted:n}),d==="now"&&(qn(f,r)||!r)&&t.jsx(fA,{t:f}),d==="now"&&(qn(f,r)||!r?t.jsx(kI,{t:f}):t.jsx(HA,{t:f})),d==="story"&&t.jsx(II,{t:f}),d==="plan"&&t.jsx(FI,{t:f}),d==="activity"&&t.jsx(LI,{t:f}),d==="conversation"&&t.jsx(AR,{t:f,onTab:p}),d==="proof"&&t.jsx(_I,{t:f}),d==="changes"&&t.jsx(YT,{t:f}),d==="cost"&&t.jsx("div",{className:"db",children:t.jsx(tR,{t:f})}),d==="developer"&&t.jsx(OI,{t:f})]}):t.jsx("div",{className:"center",children:s.isError?`No ticket ${e}.`:"Loading…"})})]})}function kI({t:e}){if(!e.waiting&&e.quiet)return t.jsx(EI,{t:e});if(lI(e))return t.jsx(uI,{t:e});switch(e.waiting?.kind){case"questions":return t.jsx(jI,{t:e});case"spec":case"plan":return t.jsx(wI,{t:e});case"proof":return t.jsx(CI,{t:e});case"stuck":return t.jsx(eA,{t:e,extra:t.jsxs(t.Fragment,{children:[t.jsx(Ki,{t:e}),e.stuck?.gate==="proof"&&e.proof?.some(n=>n.after)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"What the screenshots show"}),t.jsx(xm,{t:e})]}),zo(e)&&t.jsx(mm,{t:e}),t.jsx(Mi,{t:e})]})});case"ask":return t.jsx($I,{t:e});case"yours":return t.jsx(PI,{t:e});case"chat":return e.chat?t.jsx(vI,{t:e}):t.jsx(Kp,{t:e});default:return t.jsx(Kp,{t:e})}}function vI({t:e}){const n=rt[e.chat.with];return t.jsx("div",{className:"db",children:t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:t.jsx(En,{size:15})}),t.jsxs("div",{children:[t.jsxs("b",{children:["Talking it through with the ",n]}),t.jsx("span",{children:"The talk is open in the chat panel beside the board. Its work waits until you press a button there."})]}),t.jsx("span",{className:"grow"}),t.jsx($e,{to:"/conversations",search:{ticket:e.id},className:"btn sm",children:"Full screen"})]})})}function jI({t:e}){const n=fe(),[s,r]=C.useState(()=>Object.fromEntries((e.questions??[]).filter(u=>u.answer).map(u=>[u.id,u.answer]))),a=e.questions??[],o=[{from:"analyst",label:"From the Analyst, about what to build"},{from:"architect",label:"From the Architect, about how to build it"}],c=a.every(u=>{const d=s[u.id];return d?d.choice===u.inputOption||d.choice==="Other"?!!d.value?.trim():!0:!1});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"db",children:o.map(u=>{const d=a.filter(p=>p.from===u.from);return d.length?t.jsxs("div",{className:"qblock",children:[t.jsxs("div",{className:"qgroup",children:[t.jsx(Br,{role:u.from,small:!0}),u.label]}),d.map(p=>t.jsx(bI,{t:e,q:p,n:a.indexOf(p)+1,answer:s[p.id],onAnswer:f=>r(m=>({...m,[p.id]:f}))},p.id))]},u.from):null})}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:!c||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/answers`,body:{answers:s},done:"Answers sent. The Architect is choosing the design."}),children:[t.jsx(ls,{size:15})," Send answers"]}),t.jsx("button",{className:"btn",onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/skip`,done:"The squad made its own guesses. You will see them in the plan."}),children:"Skip, let the squad guess"}),t.jsx(Yr,{t:e,agent:"analyst",label:"Talk it through instead"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad answer ${e.id}`})]})]})}function bI({t:e,q:n,n:s,answer:r,onAnswer:a}){const o=fe(),[c,u]=C.useState(!1),[d,p]=C.useState(""),f=()=>{d.trim()&&(o.mutate({path:`/api/v1/tickets/${e.id}/ask`,body:{questionId:n.id,text:d}}),p(""),u(!1))},m=[...n.options,"Other"];return t.jsxs("div",{className:"q",children:[t.jsxs("h4",{children:[s,". ",n.text]}),(n.thread?.length||n.thinking)&&t.jsxs("div",{className:"thread",children:[n.thread?.map((y,x)=>t.jsxs("div",{className:`msg ${y.who==="you"?"":"squad"}`,children:[t.jsx("small",{children:y.who==="you"?"You":Ns[y.who]}),y.text]},x)),n.thinking&&t.jsxs("div",{className:"msg squad",children:[t.jsx("small",{children:Ns[n.from]}),t.jsxs("span",{className:"typing","aria-label":"Writing a reply",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})]})]}),t.jsx("div",{className:"choices",children:m.map(y=>{const x=r?.choice===y,v=y===n.inputOption||y==="Other";return t.jsxs("div",{className:`choice ${x?"on":""}`,role:"radio","aria-checked":x,tabIndex:0,onClick:()=>!x&&a({choice:y}),onKeyDown:k=>k.key==="Enter"&&a({choice:y}),children:[t.jsx("span",{className:"rd"}),y==="Other"?"Other":y.replace(/:$/,""),v&&x&&t.jsx("input",{autoFocus:!0,value:r?.value??"",placeholder:y==="Other"?"Your answer":"Which one?",onChange:k=>a({choice:y,value:k.target.value}),onClick:k=>k.stopPropagation()})]},y)})}),c?t.jsxs("div",{className:"askrow",children:[t.jsx("input",{className:"input",autoFocus:!0,value:d,onChange:y=>p(y.target.value),placeholder:`Ask the ${Ns[n.from]} about this question`,onKeyDown:y=>y.key==="Enter"&&f()}),t.jsx("button",{className:"btn",onClick:f,disabled:!d.trim(),children:"Ask"})]}):t.jsxs("button",{className:"asklink",onClick:()=>u(!0),disabled:n.thinking,children:[t.jsx(En,{size:14})," Ask about this"]})]})}function Oc({t:e,review:n}){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The story"}),t.jsx(nc,{review:n,at:{part:"story"},children:t.jsx("p",{className:"story",children:e.story})}),e.criteria&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Done when"}),t.jsx("ol",{className:"ac",children:e.criteria.map((s,r)=>t.jsx("li",{children:t.jsx(nc,{review:n,at:{part:"criterion",index:r},children:t.jsxs("span",{children:[t.jsx("em",{children:"Given"})," ",s.given,", ",t.jsx("em",{children:"when"})," ",s.when,", ",t.jsx("em",{children:"then"})," ",s.then,"."]})})},r))})]}),e.decision&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["The Architect's decision ",e.decision.adr&&t.jsxs("span",{className:"pill ok",children:["Saved as ",e.decision.adr]})]}),t.jsx(nc,{review:n,at:{part:"decision"},children:t.jsxs("div",{className:"decision",children:[t.jsxs("h3",{children:[t.jsx(Br,{role:"architect",small:!0}),e.decision.title]}),t.jsx("div",{className:"opts2",children:e.decision.options.map(s=>t.jsxs("div",{className:`opt2 ${s.chosen?"pick":""}`,children:[t.jsxs("b",{children:[s.name,s.chosen&&t.jsxs("span",{children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Chosen"]})]}),s.note]},s.name))}),t.jsxs("div",{className:"why",children:[t.jsxs("span",{children:[t.jsx("b",{children:"Why"})," ",e.decision.why]}),e.decision.clientCheck&&t.jsxs("span",{children:[t.jsx("b",{children:"Client's choice"})," ",e.decision.clientCheck]}),e.decision.replaces&&t.jsxs("span",{children:[t.jsx("b",{children:"Replaces"})," ",e.decision.replaces,". Once you approve, it is no longer a rule and later tickets follow this one."]})]})]})})]}),e.work&&e.follows&&e.follows.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Follows saved decisions"}),t.jsx("div",{className:"pills",children:e.follows.map(s=>t.jsx($e,{to:"/architecture",search:{adr:s},className:"pill",children:s},s))})]}),e.work&&t.jsx(hI,{t:e}),e.mockup&&e.work&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"How it will look"}),t.jsx(Uf,{ticket:e.id,file:e.mockup,title:`${e.title}: mockup`})]}),e.work&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The work"}),t.jsxs("div",{className:"pills",children:[t.jsxs("span",{className:"pill",children:[e.work.steps," small steps"]}),t.jsxs("span",{className:"pill",children:[e.work.tests," new tests"]}),e.work.screens>0&&t.jsxs("span",{className:"pill",children:[e.work.screens," before and after screens"]})]})]}),e.work&&t.jsx(Kj,{t:e}),n&&e.work&&e.steps&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Build steps"}),t.jsx("ol",{className:"ac",children:e.steps.map((s,r)=>t.jsx("li",{children:t.jsx(nc,{review:n,at:{part:"step",index:r},children:t.jsx("span",{children:s.title})})},r))})]})]})}function wI({t:e}){const n=fe(),[s,r]=C.useState(null),[a,o]=C.useState(""),[c,u]=C.useState(!1),[d,p]=C.useState([]),f=e.waiting?.kind==="spec",m=!f&&!!e.specApproved,y=f?"the Analyst":m?"the Architect":"the Spec writer",x={t:e,comments:d,add:N=>p(w=>[...w,N]),remove:N=>p(w=>w.filter((S,E)=>E!==N)),canEdit:N=>f?N.part==="story"||N.part==="criterion":N.part==="step"||!m&&(N.part==="story"||N.part==="criterion")},v=()=>s==="over"?n.mutate({path:`/api/v1/tickets/${e.id}/plan/start-over`,body:{direction:a},done:`Starting over. ${y[0].toUpperCase()}${y.slice(1)} writes it again.`}):n.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:a},done:`Sent to ${y}.`}),k=d.length;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[(f||m)&&t.jsxs("div",{className:"twostep",children:[t.jsxs("span",{className:f?"on":"done",children:[f?"1":t.jsx(xe,{size:12,strokeWidth:3})," The what"]}),t.jsx("span",{className:"bar"}),t.jsx("span",{className:m?"on":"",children:"2 The how"}),t.jsx("p",{children:f?'Is this what you want? Check the story and the "done when" list. The Architect designs how to build it after you approve.':`The spec was approved by ${e.specApproved.by}. Now check how the Architect will build it. A developer can approve this part for you.`})]}),t.jsx(WR,{t:e}),t.jsx("p",{className:"note reviewhint",children:"Point at any part to comment on it or edit it yourself. Send back sends every comment at once."}),f?t.jsx(Oc,{t:{...e,decision:void 0,work:void 0},review:x}):t.jsx(Oc,{t:e,review:x}),!f&&e.decision&&t.jsx("p",{className:"note",style:{marginTop:14},children:"Approved decisions are saved in Decisions. Later tickets must follow them."})]}),s?t.jsxs("div",{className:"df",children:[t.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:a,onChange:N=>o(N.target.value),placeholder:s==="over"?"What is the new direction? It is written again from zero.":"What should change? One line is enough.",onKeyDown:N=>N.key==="Enter"&&a.trim()&&v()}),t.jsx("button",{className:"btn pri",disabled:!a.trim()||n.isPending,onClick:v,children:s==="over"?"Start over":"Send"}),t.jsx("button",{className:"btn",onClick:()=>r(null),children:"Cancel"})]}):t.jsxs("div",{className:"df",children:[k>0?t.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/plan/send-back`,body:{comments:d},done:`Sent back to ${y} with ${k} ${k===1?"comment":"comments"}.`},{onSuccess:()=>p([])}),children:[t.jsx(ls,{size:15})," Send back (",k,")"]}):t.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:f?"Spec approved. The Architect is designing how to build it.":"Plan approved. The Builder started."}),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," ",f?"Approve spec":m?"Approve design":"Approve plan"]}),k===0&&t.jsx("button",{className:"btn",onClick:()=>r("change"),children:"Change something"}),(f||m)&&t.jsx(Yr,{t:e,agent:f?"analyst":"architect",label:"Talk it through"}),t.jsx("button",{className:"btn quiet",onClick:()=>r("over"),children:"Start over"}),t.jsx("button",{className:"btn quiet",onClick:()=>u(!0),children:"Ask a developer"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:k>0?`squad send-back ${e.id} ${d.map(N=>Fe(`${NI(N)}: ${N.text}`)).join(" ")}`:`squad approve ${e.id}`})]}),c&&t.jsx(SI,{t:e,onClose:()=>u(!1)})]})}function NI(e){return e.part==="criterion"?`done when ${(e.index??0)+1}`:e.part==="step"?`step ${(e.index??0)+1}`:e.part}function SI({t:e,onClose:n}){const{toast:s}=_e(),r=`Hi, can you check the plan for ${e.id} "${e.title}" before I approve it? It's on the board, or run: squad show ${e.id}`;return t.jsxs(We,{title:"Ask a developer",onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",onClick:()=>void navigator.clipboard?.writeText(r).then(()=>s("Message copied")),children:[t.jsx(lr,{size:15})," Copy message"]}),t.jsx("button",{className:"btn",onClick:n,children:"Close"})]}),children:[t.jsx("p",{children:"Send this to a developer on your team. They can read the plan in the terminal and tell you what they think."}),t.jsx("div",{className:"wa",children:r})]})}function gm({t:e}){const n=e.gates;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pills",children:[t.jsx(Ir,{state:n?.checks,text:Yj(n)}),t.jsx(Ir,{state:n?.review,text:n?.review==="pass"?`Review approved by ${n.reviewBy}`:n?.review==="skipped"?"Review notes open, you continued":"Review approved"}),t.jsx(Ir,{state:n?.proof,text:Qj(e)})]}),t.jsx(Zj,{g:n}),e.overrides?.map(s=>t.jsxs("p",{className:"note override",children:[t.jsx("b",{children:"Continued anyway"})," past the ",JR(s),", by ",s.by,": ",s.reason]},s.at))]})}function xm({t:e}){const[n,s]=C.useState(null);if(!e.proof?.length)return t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",children:Gj(e)}),t.jsx(Hp,{t:e})]});const{pictures:r,starts:a}=Xj(e.proof,o=>ws(`/api/v1/proof/${o}`));return t.jsxs(t.Fragment,{children:[n!==null&&t.jsx(Kr,{pictures:r,start:n,onClose:()=>s(null)}),e.proof.map((o,c)=>t.jsxs("div",{className:`critrow ${dm(o.shows)}`,children:[t.jsxs("h5",{children:[t.jsx(Jj,{shows:o.shows}),o.criterion,t.jsx(Wp,{shows:o.shows})]}),mo(o)&&t.jsx("p",{className:"verdictnote",children:mo(o)}),Or(o)&&t.jsxs("p",{className:"critpage",children:["Page ",t.jsx("code",{children:Or(o)})]}),t.jsxs("div",{className:"proofmini",children:[t.jsxs("div",{children:[t.jsx("small",{children:o.beforeLabel}),t.jsx("button",{className:"zoom",onClick:()=>s(a[c]),"aria-label":`Open ${o.beforeLabel} full size`,children:t.jsx("img",{src:ws(`/api/v1/proof/${o.before}`),alt:`${o.criterion}, ${o.beforeLabel}`})})]}),t.jsxs("div",{children:[t.jsx("small",{children:o.afterLabel}),t.jsx("button",{className:"zoom",onClick:()=>s(a[c]+1),"aria-label":`Open ${o.afterLabel} full size`,children:t.jsx("img",{src:ws(`/api/v1/proof/${o.after}`),alt:`${o.criterion}, ${o.afterLabel}`})})]})]}),o.more?.length&&o.why&&o.note?t.jsx("p",{className:"note proofmore-main",children:o.note}):null,t.jsx(e3,{shot:o,first:a[c]+2,onOpen:s})]},o.criterion)),t.jsx(Hp,{t:e})]})}function r3({t:e,sticky:n}){const s=fe(),[r,a]=C.useState(!1),[o,c]=C.useState(""),u=()=>s.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:o},done:"Sent back to the Builder with your note."});return r?t.jsxs("div",{className:n?"stickybar":"df",children:[t.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:o,onChange:d=>c(d.target.value),placeholder:"What's wrong? Tell the squad in one line.",onKeyDown:d=>d.key==="Enter"&&o.trim()&&u()}),t.jsx("button",{className:"btn pri",disabled:!o.trim(),onClick:u,children:"Send back"}),t.jsx("button",{className:"btn",onClick:()=>a(!1),children:"Cancel"})]}):t.jsxs("div",{className:n?"stickybar":"df",children:[t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:`${e.id} is ready to release.`}),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," Looks right"]}),t.jsx("button",{className:"btn",onClick:()=>a(!0),children:"Something's wrong"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad approve ${e.id}`})]})}function CI({t:e}){return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:t.jsx(xe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx("b",{children:"Check that it works the way you want"}),t.jsx("span",{children:XR(e.gates)})]}),t.jsx("span",{className:"grow"}),t.jsxs($e,{to:"/tickets/$id/proof",params:{id:e.id},className:"btn sm",children:[t.jsx(es,{size:14})," Full page"]})]}),t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(gm,{t:e}),t.jsx(Ki,{t:e}),t.jsx("div",{className:"lbl",children:"Before and after"}),t.jsx(xm,{t:e}),t.jsx(mm,{t:e})]}),t.jsx(r3,{t:e})]})}const Kh="Decide yourself: take the simplest choice that fits the plan, and say what you chose";function $I({t:e}){const n=fe(),s=e.agentQuestion,[r,a]=C.useState(null),[o,c]=C.useState("");if(!s)return t.jsx(Kp,{t:e});if(s.port)return t.jsx(GR,{t:e});if(s.kind)return t.jsx(vP,{t:e,extra:t.jsxs(t.Fragment,{children:[t.jsx(Ki,{t:e}),t.jsx(Mi,{t:e})]})});const u={architect:"Architect",builder:"Builder",reviewer:"Reviewer"}[s.from],d=r===""?o.trim():r,p=[...s.options,Kh];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:"?"}),t.jsxs("div",{children:[t.jsxs("b",{children:["The ",u," has a question"]}),t.jsx("span",{children:"It stopped instead of guessing. Your answer goes back into the same conversation, and the work carries on."})]})]}),t.jsxs("div",{className:"lbl",children:[u," asks"]}),t.jsx("p",{className:"stuckq",children:s.text}),s.why&&t.jsxs("p",{className:"note",style:{marginTop:-4},children:["Why it matters: ",s.why]}),s.files&&s.files.length>0&&t.jsx(Hv,{ticket:e.id,files:s.files}),t.jsxs("div",{className:"opts2",children:[p.map(f=>t.jsxs("button",{className:`opt2 ${r===f?"pick":""}`,onClick:()=>a(f),children:[t.jsxs("b",{children:[f===Kh?"Let it decide":f,r===f&&t.jsxs("span",{children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Your pick"]})]}),f===Kh?"It takes the simplest choice that fits the plan and tells you which.":""]},f)),t.jsx("button",{className:`opt2 ${r===""?"pick":""}`,onClick:()=>a(""),children:t.jsx("b",{children:"Write my own answer"})})]}),r===""&&t.jsx("textarea",{className:"input",rows:3,style:{width:"100%",marginTop:8},autoFocus:!0,value:o,placeholder:"Your answer",onChange:f=>c(f.target.value)}),t.jsx(Mi,{t:e})]}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:!d||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:d},done:`Sent. The ${u} carries on.`}),children:[t.jsx(ls,{size:15})," Send answer"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad reply ${e.id}${d?` ${Fe(d.length>40?`${d.slice(0,40)}…`:d)}`:""}`})]})]})}function EI({t:e}){return t.jsxs("div",{className:"db",children:[t.jsx(KR,{t:e}),e.now&&t.jsx(Wj,{t:e}),t.jsx(Hj,{t:e}),t.jsx(Vj,{t:e})]})}function TI({t:e}){const n=fe(),[s,r]=C.useState(null),[a,o]=C.useState(""),c=!!e.mergedAt||e.stage==="done";return t.jsx("div",{className:"outdated",children:e.outdated.map(u=>t.jsxs("div",{className:"outdated-item",children:[t.jsxs("div",{className:"outdated-head",children:[t.jsx("span",{className:"ic",children:t.jsx(Oi,{size:15})}),t.jsxs("b",{children:[t.jsx($e,{to:"/architecture",search:{adr:u.adr},children:u.adr})," came after this plan and changes it"]})]}),t.jsx("p",{children:u.why}),t.jsxs("p",{children:[t.jsx("span",{className:"note",children:c?"What a follow-up would change:":"What would change:"})," ",u.change]}),s===u.adr?t.jsxs("div",{className:"row",children:[t.jsx("input",{className:"input",autoFocus:!0,value:a,onChange:d=>o(d.target.value),placeholder:"Why the plan stays as it is"}),t.jsx("button",{className:"btn sm",disabled:!a.trim()||n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:u.adr,do:"keep",reason:a},done:"Kept the plan. The reason is on the ticket."},{onSuccess:()=>r(null)}),children:"Keep it"}),t.jsx("button",{className:"btn sm quiet",onClick:()=>r(null),children:"Cancel"})]}):t.jsxs("div",{className:"row",children:[t.jsx("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:u.adr,do:"update"},done:c?"Made a follow-up ticket.":"The Architect is updating the plan."}),children:c?"Make a follow-up ticket":"Update the plan"}),t.jsx("button",{className:"btn sm",onClick:()=>{r(u.adr),o("")},children:"Keep it as is"})]})]},u.adr))})}function AI({t:e}){const n=fe(),s=e.localSetup,r=s.status==="pending"||s.status==="running";return t.jsxs("div",{className:`localsetup ${s.status}`,children:[t.jsx("span",{className:"ic",children:r?t.jsx(gn,{size:15,className:"spin"}):s.status==="done"?t.jsx(xe,{size:15,strokeWidth:2.5}):t.jsx(Oi,{size:15})}),t.jsxs("div",{children:[t.jsx("b",{children:r?"Updating your copy of the code":s.status==="done"?"Your copy of the code is ready to run":"Your copy of the code needs a hand"}),t.jsx("span",{children:r?"The merge changed your own folder, so the squad installs new packages and runs the database changes there.":s.status==="done"?`New packages and database changes are in your own folder${s.at?`, ${Zt(s.at)}`:""}${s.seconds!==void 0?` (${s.seconds} s)`:""}.`:"squad-kit could not finish setting it up. Try again, or ask an engineer to look at what failed."}),s.status==="failed"&&t.jsxs("details",{className:"costdetails",children:[t.jsx("summary",{children:"See what failed"}),t.jsx("code",{children:s.command}),s.output&&t.jsx("pre",{children:s.output})]})]}),s.status==="failed"&&t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/local-setup`,done:"Running the setup again"}),children:"Try again"})]})}function Kp({t:e}){const n=Hi(),s=fe(),r=fm(e),a=e.stage==="release"?{title:`Ready for ${e.release}`,text:"It goes out with the next release. Nothing needed from you until then."}:e.stage==="done"?{title:e.status,text:"This ticket is live. Found a problem? Report a bug and it comes back around."}:e.waiting?.kind==="change"?{title:"The Builder paused for your change",text:"The Architect updated the design. Approve it above, or decline the change and the Builder carries on."}:{title:"Nothing needed from you",text:`${RI(e)} You'll get a card when the squad needs you.`},o=Bj(e);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[o?t.jsx(Wj,{t:e}):t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:e.stage==="release"?t.jsx(ns,{size:18}):t.jsx(xe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx("b",{children:a.title}),t.jsx("span",{children:a.text})]}),e.stage==="release"&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"grow",style:{flex:1}}),t.jsx($e,{to:"/releases",className:"btn sm",children:"Open release"})]})]}),e.localSetup&&t.jsx(AI,{t:e}),e.steps&&e.steps.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Steps"}),t.jsx(i3,{t:e})]}),e.gates&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(gm,{t:e})]}),t.jsx(Ki,{t:e}),(e.stage==="release"||e.stage==="done")&&e.usage?.length?t.jsx(XP,{t:e}):null,t.jsx(Jf,{t:e}),o?t.jsx(Hj,{t:e}):t.jsx(Mi,{t:e}),t.jsx(Vj,{t:e})]}),t.jsxs("div",{className:"df",children:[e.live&&e.stage!=="release"&&e.stage!=="done"&&t.jsxs("button",{className:"btn sm",disabled:e.stopRequested||s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping the squad"}),children:[t.jsx(is,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]}),Yf(e)&&t.jsx(Qf,{t:e}),t.jsx(fI,{t:e}),!e.chat?.open&&!e.takenOver&&!Es(e)&&r!=="analyst"&&t.jsx(Yr,{t:e,agent:"analyst",label:"Ask the Analyst"}),(qn(e,n)||!n)&&t.jsx(mA,{t:e}),t.jsx("span",{className:"note",children:e.live?"Updates live as the squad works.":""}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:e.live&&e.stage!=="release"?`squad stop ${e.id}`:hf(e)})]})]})}function PI({t:e}){const n=fe(),[s,r]=C.useState(""),a=e.takenOver;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"db",children:[t.jsxs("div",{className:"youbox",children:[t.jsx("span",{className:"ring",children:t.jsx(vo,{size:15})}),t.jsxs("div",{children:[t.jsx("b",{children:"You have this ticket"}),t.jsx("span",{children:"The squad stopped and waits. Nothing runs until you give it back."})]})]}),t.jsx("div",{className:"lbl",children:"1. Open the Builder's session in Claude Code"}),t.jsx(ie,{text:`cd ${Fe(a.cwd)} && claude --resume ${a.session}`}),t.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:"It is the same conversation the Builder had, in the ticket's own copy of the code. Your folder is not touched. Or just edit the files:"}),t.jsx(ou,{t:e}),t.jsx("div",{className:"lbl",children:"2. Give it back"}),t.jsx("textarea",{className:"waynote",rows:2,value:s,onChange:o=>r(o.target.value),placeholder:"What did you change? (optional, every agent reads it)"}),t.jsx("p",{className:"note",style:{fontSize:12.5},children:"Then squad-kit runs the checks, the Reviewer reads all the changes, yours too, and the Tester makes the proof again."}),t.jsx(Mi,{t:e})]}),t.jsxs("div",{className:"df",children:[t.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/give-back`,body:{note:s},done:"Given back. The checks run on your changes."}),children:[t.jsx(xe,{size:15,strokeWidth:2.5})," Give back"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad give-back ${e.id}${s.trim()?` ${Fe(s.trim())}`:""}`})]})]})}function RI(e){const n=e.steps??[],s=n.findIndex(r=>r.status==="doing");return e.stage==="implement"&&s>=0?`The Builder is on step ${s+1} of ${n.length}.`:e.stage==="test"?"squad-kit is running the project checks.":e.stage==="review"?"The Reviewer is checking the work.":e.stage==="tickets"?"The Analyst is reading the ticket.":e.stage==="specs"?"The Architect is writing the plan.":`${e.status}.`}function i3({t:e}){return t.jsx("ul",{className:"steps",children:e.steps.map((n,s)=>t.jsxs("li",{className:n.status==="doing"?"now":n.status==="todo"?"todo":"",children:[t.jsx("span",{className:`sd ${n.status==="done"?"ok":n.status==="doing"?"now":""}`,children:n.status==="done"&&t.jsx(xe,{size:11,strokeWidth:3})}),t.jsxs("span",{children:[n.status==="doing"?t.jsx("b",{style:{fontWeight:600},children:n.title}):n.title,n.live&&t.jsxs("span",{className:"livetxt",children:[t.jsx("span",{className:"live"}),n.live]})]}),t.jsx("span",{className:"time",children:n.status==="done"?`${n.minutes??1} min`:n.status==="doing"?"now":""})]},s))})}function Mi({t:e,all:n}){const s=n?e.activity:e.activity.slice(0,4);return s.length?t.jsxs(t.Fragment,{children:[!n&&t.jsx("div",{className:"lbl",children:"Latest activity"}),t.jsx("div",{className:"feed",children:s.map((r,a)=>t.jsxs("div",{className:"fe",children:[t.jsx("span",{className:"tm",children:Tn(r.at)}),t.jsx(Br,{role:r.who,small:!0}),t.jsxs("span",{children:[t.jsx("b",{children:Ns[r.who]})," ",r.text.charAt(0).toLowerCase()+r.text.slice(1)]})]},r.at+a))})]}):null}function II({t:e}){return t.jsxs("div",{className:"db",children:[t.jsx("div",{className:"lbl",children:"What was asked"}),t.jsx("p",{className:"story",style:{whiteSpace:"pre-wrap"},children:e.ask}),t.jsx(Qh,{head:"Your acceptance criteria",items:e.brief?.criteria}),t.jsx(Qh,{head:"Business rules",items:e.brief?.rules}),t.jsx(Qh,{head:"Edge cases",items:e.brief?.edgeCases}),t.jsx(MI,{t:e}),t.jsx(zI,{t:e}),t.jsx(xA,{t:e}),t.jsx(Jf,{t:e}),e.story?t.jsx(Oc,{t:{...e,decision:void 0,work:void 0}}):t.jsx("p",{className:"note",style:{marginTop:16},children:"The Analyst writes the user story after your answers."})]})}const Yh=[{kind:"note",label:"Note",head:"Note",hint:"Anything the squad should know"},{kind:"rule",label:"Business rule",head:"Rule",hint:"For example: at most 3 bookings a day per person"},{kind:"criterion",label:"Acceptance criterion",head:"Done when",hint:"The Tester must prove it, for example: the clerk sees an error on the 4th booking"}];function zI({t:e}){const n=fe(),[s,r]=C.useState("note"),[a,o]=C.useState(""),c=e.notes??[],u=e.stage!=="done",d=Yh.find(f=>f.kind===s),p=()=>n.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:a,kind:s},done:e.live?"Added. The squad reads it at its next step.":"Added. Every agent on this ticket reads it."},{onSuccess:()=>o("")});return!u&&!c.length?null:t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Notes",c.length?` · ${c.length}`:""]}),c.length>0&&t.jsx("ul",{className:"ticketnotes",children:c.map((f,m)=>t.jsxs("li",{children:[t.jsx("span",{className:`pill ${f.kind==="criterion"?"ok":f.kind==="rule"?"wait":""}`,children:Yh.find(y=>y.kind===f.kind)?.head}),t.jsx("span",{className:"grow",children:f.text}),t.jsxs("span",{className:"note",children:[f.by," · ",Zt(f.at)]})]},m))}),u&&t.jsxs("div",{className:"addnote",children:[t.jsx("div",{className:"seg",style:{width:"fit-content"},children:Yh.map(f=>t.jsx("button",{className:s===f.kind?"on":"",onClick:()=>r(f.kind),children:f.label},f.kind))}),t.jsx("textarea",{className:"input",rows:2,value:a,placeholder:d.hint,onChange:f=>o(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&a.trim()&&p()}}),t.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[t.jsxs("button",{className:"btn pri sm",disabled:!a.trim()||n.isPending,onClick:p,children:["Add ",d.label.toLowerCase()]}),t.jsxs("span",{className:"note",children:["Every agent on this ticket reads it",e.live?", the one working now from its next step":"","."]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad note ${e.id}${s==="note"?"":` --${s}`} ${Fe(a.trim()||"…")}`})]})]})]})}function Qh({head:e,items:n}){return n?.length?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:e}),t.jsx("ul",{className:"brief",children:n.map((s,r)=>t.jsx("li",{children:s},r))})]}):null}const zy=/\.(png|jpe?g|gif|webp|bmp)$/i;function MI({t:e}){const[n,s]=C.useState(null),r=e.attachments??[];if(!r.length)return null;const a=u=>u.split(/[\\/]/).pop()??u,o=r.filter(u=>zy.test(u)).map(u=>({src:pn(e.id,u),caption:a(u)})),c=r.filter(u=>!zy.test(u));return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"lbl",children:["Attached · ",r.length]}),o.length>0&&t.jsx("div",{className:"thumbs",children:o.map((u,d)=>t.jsx("button",{className:"zoom thumb",onClick:()=>s(d),"aria-label":`Open ${u.caption} full size`,children:t.jsx("img",{src:u.src,alt:u.caption,loading:"lazy"})},u.src))}),c.map(u=>t.jsx("a",{className:"filechip mono",href:pn(e.id,u),target:"_blank",rel:"noreferrer",children:a(u)},u)),n!==null&&t.jsx(Kr,{pictures:o,start:n,onClose:()=>s(null)})]})}function FI({t:e}){return e.story?t.jsxs("div",{className:"db",children:[t.jsx(Oc,{t:e}),e.steps&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Steps"}),t.jsx(i3,{t:e})]})]}):t.jsx("div",{className:"db",children:t.jsx("p",{className:"note",children:"The plan is written after the questions are answered."})})}function LI({t:e}){return t.jsx("div",{className:"db",children:t.jsx(Mi,{t:e,all:!0})})}function _I({t:e}){return e.gates?t.jsxs("div",{className:"db",children:[t.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),t.jsx(gm,{t:e}),t.jsx(Ki,{t:e}),t.jsx("div",{className:"lbl",children:"Before and after"}),e.gates.proof==="pass"||e.proof?.some(n=>n.shows)?t.jsx(xm,{t:e}):t.jsx("p",{className:"note",children:"The screens are recorded after all checks pass."})]}):t.jsx("div",{className:"db",children:t.jsx("p",{className:"note",children:"The Tester records the proof after the Builder finishes."})})}function OI({t:e}){const n=C.useMemo(()=>{const s=new Set,r=[...e.activity.map(a=>a.text),...(e.steps??[]).map(a=>a.live??"")];for(const a of r)for(const o of a.matchAll(/[\w./-]+\/[\w.-]+\.\w+/g))s.add(o[0]);return[...s]},[e]);return t.jsxs("div",{className:"db",children:[t.jsx(tA,{t:e}),t.jsx("div",{className:"lbl",children:"Branch"}),t.jsxs("p",{className:"mono",style:{fontSize:13},children:[e.repo?`${e.repo}: `:"",e.branch??`squad/${e.id.toLowerCase()}`]}),e.worktree&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The ticket's copy of the code"}),t.jsx("p",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:e.worktree}),t.jsx(ou,{t:e})]}),e.gates?.ran?.length?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"The checks that ran"}),t.jsx("div",{className:"feed",children:e.gates.ran.map(s=>t.jsxs("div",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:[s.name,": ",s.command," (",s.failedOnce?"failed once, passed when run again":s.ok?"passed":"failed",")"]},s.name))})]}):null,e.testChange||e.testDecided?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"How the tests run"}),t.jsxs("div",{className:"feed",children:[e.testDecided&&t.jsxs("div",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:[e.testDecided.kept==="new"?`Kept the new one: ${e.testDecided.to} (was ${e.testDecided.from})`:`Kept the current one: ${e.testDecided.from} (not ${e.testDecided.to})`,", by ",e.testDecided.by==="you"?"you":"squad-kit",e.testDecided.ran?`. ${e.testDecided.ran}`:""]}),e.testChange&&t.jsxs("div",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:[e.testChange.ask?"Waiting for a choice":"Tried at the next checks",": ",e.testChange.from," or ",e.testChange.to,e.testChange.ran?`. ${e.testChange.ran}`:""]})]})]}):null,e.localSetup&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Setting up your own copy"}),t.jsxs("p",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:[e.localSetup.command," in ",e.localSetup.dir," (",e.localSetup.status,")"]})]}),t.jsx("div",{className:"lbl",children:"Files the squad touched"}),n.length?t.jsx("div",{className:"feed",children:n.map(s=>t.jsx("div",{className:"mono",style:{fontSize:12.5},children:s},s))}):t.jsx("p",{className:"note",children:"No files changed yet."}),t.jsx("div",{className:"lbl",children:"In the terminal"}),t.jsxs("div",{className:"pills",children:[t.jsx(ie,{text:`squad show ${e.id}`}),t.jsx(ie,{text:`squad watch ${e.id}`})]})]})}const qI=[{stage:"tickets",role:"analyst",who:"Analyst"},{stage:"specs",role:"architect",who:"Architect"},{stage:"implement",role:"builder",who:"Builder"},{stage:"test",role:"tester",who:"Tester"},{stage:"review",role:"reviewer",who:"Reviewer"},{stage:"release",role:"release",who:"Release"},{stage:"bugs",role:"triage",who:"Triage"}];function DI(){const e=Ye(),n=SR(),s=Fi({from:"/board"}),r=Jt({from:"/board"}),[a,o]=C.useState(null),[c,u]=C.useState(""),[d,p]=C.useState(!1),f=Pe({queryKey:["ticket-draft-current"],queryFn:()=>Ee("/api/v1/tickets/draft/current"),enabled:a!=="new",refetchInterval:S=>S.state.data?.draft?.status==="working"?2e3:3e4}),m={working:"drafting…",done:"draft ready",failed:"draft stopped",cancelled:""}[f.data?.draft?.status??"cancelled"],y=s.view??"all",x=S=>void r({search:E=>({...E,ticket:S})}),v=()=>void r({search:S=>({...S,ticket:void 0})}),k=e.data?.ready?e.data:null,N=C.useMemo(()=>{const S=[...k?.tickets??[],...d?k?.archived??[]:[]],E=c.trim().toLowerCase();return S.filter(P=>y==="bugs"&&P.kind!=="bug"||y==="mine"&&!qn(P,k?.meta.user?.name)?!1:!E||P.title.toLowerCase().includes(E)||P.id.toLowerCase().includes(E))},[k,c,y,d]);if(e.isLoading)return t.jsx("div",{className:"center",children:"Loading the board…"});if(!k)return t.jsx(WI,{});const w=k.tickets.filter(Co);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Board"}),t.jsx("div",{className:"seg",role:"tablist",children:["all","mine","bugs"].map(S=>t.jsx("button",{className:y===S?"on":"",onClick:()=>void r({search:E=>({...E,view:S==="all"?void 0:S})}),children:S==="all"?"All tickets":S==="mine"?"Mine":"Bugs"},S))}),t.jsx("span",{className:"grow"}),t.jsxs("label",{className:"search",children:[t.jsx(_i,{size:15}),t.jsx("input",{value:c,onChange:S=>u(S.target.value),placeholder:"Search tickets","aria-label":"Search tickets"})]}),t.jsx(UI,{onPull:()=>o("pull")}),t.jsxs("button",{className:"btn pri",onClick:()=>o("new"),children:[t.jsx(Nt,{size:15})," New ticket",m&&t.jsx("span",{className:"btn-tag",children:m})]})]}),(n||w.length===0)&&t.jsxs("section",{className:"waiting","aria-label":"Waiting for you",children:[t.jsxs("div",{className:"wh",children:[t.jsx("h2",{children:"Waiting for you"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad inbox"})]}),n?t.jsx(Oj,{}):k.meta.engine==="live"&&k.tickets.length===0?t.jsxs("div",{className:"calmlane",children:[t.jsx("span",{className:"glyph",children:t.jsx(Nt,{size:14,strokeWidth:2.5})}),t.jsxs("span",{children:[t.jsx("b",{children:"Start with your first ticket."})," Write what you want in plain words. The squad asks what it needs to know."]}),t.jsx("span",{className:"grow",style:{flex:1}}),t.jsxs("button",{className:"btn pri sm",onClick:()=>o("new"),children:[t.jsx(Nt,{size:14})," New ticket"]})]}):t.jsxs("div",{className:"calmlane",children:[t.jsx("span",{className:"glyph",children:t.jsx(xe,{size:14,strokeWidth:2.5})}),t.jsxs("span",{children:[t.jsx("b",{children:"Nothing needs you right now."})," The squad is working. New questions and approvals show up at the top of every page."]})]})]}),t.jsx("div",{className:"board",children:qI.map(S=>{const E=N.filter(P=>P.stage===S.stage);return t.jsxs("section",{className:"lane","aria-label":$s[S.stage],children:[t.jsxs("div",{className:"lh",children:[t.jsx(Br,{role:S.role}),t.jsxs("span",{className:"t",children:[t.jsx("b",{children:$s[S.stage]}),t.jsx("small",{children:S.who})]}),t.jsx("span",{className:"n",children:E.length})]}),E.map(P=>t.jsx(BI,{t:P,selected:s.ticket===P.id,onOpen:()=>x(P.id)},P.id)),E.length===0&&t.jsx("div",{className:"empty-lane",children:"Nothing here"})]},S.stage)})}),t.jsxs("div",{className:"foot",children:[t.jsxs("span",{children:["Last 30 days ",t.jsxs("b",{children:[k.stats.released30," tickets released"]})]}),t.jsxs("span",{children:[t.jsx("b",{children:k.stats.bugs30})," ",k.stats.bugs30===1?"bug":"bugs"," found after release"]}),t.jsxs("span",{children:[t.jsx("b",{children:k.stats.open})," open tickets"]}),t.jsx(JP,{}),t.jsx("span",{className:"grow"}),(k.archived?.length??0)>0&&t.jsx("button",{className:"btn sm quiet",title:"squad board --archived",onClick:()=>p(!d),children:d?"Hide archived":`Show archived (${k.archived.length})`}),t.jsx("button",{className:"btn sm quiet",onClick:()=>o("bug"),children:"Report a bug"})]}),s.ticket&&t.jsx(s3,{id:s.ticket,onClose:v}),a==="new"&&t.jsx(Xv,{onClose:()=>o(null),onCreated:S=>x(S.id)}),a==="pull"&&t.jsx(cA,{onClose:()=>o(null),onCreated:S=>x(S.id)}),a==="bug"&&t.jsx(Kf,{onClose:()=>o(null)})]})}function BI({t:e,selected:n,onOpen:s}){const r=!!e.waiting||e.quiet?.kind==="stuck"||Ss(e)||as(e),a=Hi();return t.jsxs("button",{className:`card ${r?"you":""} ${e.kind==="bug"?"bug":""} ${n?"sel":""}`,onClick:s,children:[t.jsxs("div",{className:"row1",children:[t.jsx("span",{className:"id",children:e.id}),e.track==="express"&&t.jsx("span",{className:"prio express",children:"Express"}),t.jsx(yP,{t:e}),r?t.jsx("span",{className:"youtag",children:"You"}):e.kind==="bug"?t.jsx("span",{className:"prio",children:"Bug"}):e.priority==="high"?t.jsx("span",{className:"prio",children:"High"}):null,a&&!qn(e,a)&&t.jsx("span",{className:"prio owner",title:"Their squad works on it",children:Mo(e)}),e.archived&&t.jsx("span",{className:"prio owner",children:"Archived"}),e.gates?.checks==="unchecked"&&t.jsx("span",{className:"prio unchecked",title:um,children:"Not checked"}),t.jsx(pI,{t:e})]}),t.jsx("h4",{children:e.title}),t.jsx(kP,{t:e}),Bj(e)&&!r?t.jsx(VR,{t:e}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"st",children:[e.live&&!r?t.jsx("span",{className:"live"}):e.stage==="release"?t.jsx(xe,{size:13,strokeWidth:2.5}):null,t.jsx("span",{children:e.quiet?e.quiet.kind==="stuck"?`Looks stuck: ${e.quiet.command??"no progress"}`:`Taking long: ${e.quiet.command??e.status}`:e.status})]}),typeof e.progress=="number"&&!r&&t.jsx("div",{className:"bar",children:t.jsx("i",{style:{width:`${e.progress}%`}})})]})]})}function UI({onPull:e}){const s=Pe({queryKey:["tracker"],queryFn:()=>Ee("/api/v1/tracker"),refetchInterval:6e4}).data;return s?s.type==="none"?t.jsxs($e,{to:"/settings",className:"btn",children:[t.jsx(ss,{size:15})," Connect a tracker"]}):t.jsxs("button",{className:"btn",onClick:e,children:[t.jsx(ss,{size:15})," Pull from ",s.label??"the tracker"]}):null}function WI(){return t.jsx("div",{className:"center",children:t.jsxs("div",{children:[t.jsx("h2",{children:"No board yet"}),t.jsx("p",{children:"Run this in the terminal to open a sample board where the squad works on its own:"}),t.jsx("p",{style:{marginTop:12},children:t.jsx(ie,{text:"squad demo"})})]})})}function HI(){const{id:e}=Hc({from:"/tickets/$id/proof"}),n=No(e),[s,r]=C.useState(0),[a,o]=C.useState(null),c=n.data;if(!c)return t.jsx("div",{className:"center",children:n.isError?`No ticket ${e}.`:"Loading…"});const u=c.proof??[],d=u[Math.min(s,u.length-1)],p=c.waiting?.kind==="proof",f=c.gates,{pictures:m,starts:y}=Xj(u,v=>ws(`/api/v1/proof/${v}`)),x=y[Math.min(s,u.length-1)]??0;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsxs("span",{className:"crumbs",children:[t.jsx($e,{to:"/inbox",children:"Waiting for you"})," /",t.jsxs($e,{to:"/board",search:{ticket:c.id},children:[c.id," ",c.title]})," ","/ ",t.jsx("b",{children:"Proof"})]}),t.jsx("span",{className:"grow"}),t.jsx(n3,{t:c})]}),t.jsxs("div",{className:`gatebar ${f?.checks==="unchecked"?"unchecked":""}`,children:[t.jsx(Ir,{state:f?.checks,text:Yj(f)}),t.jsx(Ir,{state:f?.review,text:f?.review==="skipped"?"Review notes open, you continued":`Review approved${f?.reviewBy?` by ${f.reviewBy}`:""}`}),t.jsx(Ir,{state:f?.proof,text:Qj(c)}),t.jsx("span",{style:{marginLeft:6},children:"Nothing ships without these three."})]}),t.jsx(Zj,{g:f,className:"gatebar-why"}),t.jsx(Ki,{t:c,className:"gatebar-why"}),t.jsxs("div",{className:"split proofsplit",children:[t.jsxs("div",{className:"critlist",children:[t.jsxs("div",{className:"lbl",style:{marginTop:0},children:["Done when · ",u.length]}),u.map((v,k)=>t.jsxs("button",{className:`crit ${k===s?"on":""}`,onClick:()=>r(k),children:[t.jsx(Jj,{shows:v.shows}),t.jsxs("span",{children:[v.criterion,t.jsx(Wp,{shows:v.shows}),zc(v).length>0&&t.jsx("small",{className:"critpage-s",children:zc(v).join(" · ")})]})]},v.criterion)),u.length===0&&t.jsx("p",{className:"note",children:Gj(c)}),t.jsx(Hp,{t:c}),zo(c)&&t.jsx(mm,{t:c})]}),t.jsx("div",{className:"stage",children:d?t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:d.criterion}),d.shows&&t.jsxs("p",{className:`verdictline ${dm(d.shows)}`,children:[t.jsx(Wp,{shows:d.shows}),d.shows!=="met"&&mo(d)&&t.jsx("span",{children:mo(d)})]}),Or(d)&&t.jsxs("p",{className:"critpage",children:["Page ",t.jsx("code",{children:Or(d)})]}),t.jsxs("div",{className:"ba",children:[t.jsxs("div",{children:[t.jsx("div",{className:"cap",children:t.jsx("span",{children:d.beforeLabel})}),t.jsx("button",{className:"zoom",onClick:()=>o(x),"aria-label":`Open ${d.beforeLabel} full size`,children:t.jsx("img",{src:ws(`/api/v1/proof/${d.before}`),alt:`${d.criterion}, ${d.beforeLabel}`})})]}),t.jsxs("div",{children:[t.jsx("div",{className:"cap",children:t.jsx("span",{children:d.afterLabel})}),t.jsx("button",{className:"zoom",onClick:()=>o(x+1),"aria-label":`Open ${d.afterLabel} full size`,children:t.jsx("img",{src:ws(`/api/v1/proof/${d.after}`),alt:`${d.criterion}, ${d.afterLabel}`})})]})]}),d.note&&t.jsx("p",{className:"note",children:d.note}),t.jsx(e3,{shot:d,first:x+2,onOpen:o})]}):t.jsx("p",{className:"note",children:"Nothing to compare."})})]}),a!==null&&t.jsx(Kr,{pictures:m,start:a,onClose:()=>o(null)}),p?t.jsx(r3,{t:c,sticky:!0}):t.jsx("div",{className:"stickybar",children:t.jsx("span",{className:"note",children:c.status})})]})}function VI(){const e=E6(),n=Ye(),[s,r]=C.useState(null),[a,o]=C.useState(null),c=e.data??[],u=c.find(p=>p.version===s)??c.find(p=>p.status==="draft")??c[0],d=n.data?.ready?n.data.meta.engine==="demo":!1;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Releases"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad release"})]}),t.jsxs("div",{className:"split rel",children:[t.jsx("div",{className:"listcol",children:c.map(p=>t.jsxs("button",{className:`litem ${u?.version===p.version?p.status==="draft"?"on":"on plain":""}`,onClick:()=>r(p.version),children:[t.jsxs("b",{children:[p.version,p.status==="draft"?t.jsx("span",{className:"youtag",children:p.items.length?"Ready":"Empty"}):p.bugs?.length?t.jsxs("span",{className:"prio",children:[p.bugs.length," ",p.bugs.length===1?"bug":"bugs"]}):null]}),p.status==="draft"?"Next release":p.unpushed?.length?"Not pushed yet":Ts(p.date)," · ",p.items.length," ",p.items.length===1?"ticket":"tickets"]},p.version))}),u?t.jsx(KI,{r:u,onReleased:o,live:!d}):t.jsx("div",{className:"center",children:"No releases yet."})]}),a&&t.jsx(uA,{release:a,demo:d,onClose:()=>o(null)})]})}function KI({r:e,onReleased:n,live:s}){const r=fe(),a=Ye(),o=w=>(a.data?.ready?a.data.tickets.find(S=>S.id===w)?.title:void 0)??e.titles?.[w]??w,[c,u]=C.useState(!1),[d,p]=C.useState(e.notes),[f,m]=C.useState(!1),[y,x]=C.useState(!1);C.useEffect(()=>{c||p(e.notes)},[e.notes,c]);const v=e.status==="draft",k=e.unpushed??[],N=e.version.endsWith(".0")?"New features, nothing breaks for users.":"Fixes only, nothing new to learn.";return t.jsxs("div",{className:"detail",children:[t.jsx("h2",{style:{fontSize:24,fontStretch:"88%"},children:v?`Release ${e.version}`:e.version}),t.jsx("p",{className:"note",style:{marginTop:2},children:v?"The squad prepared this release. Read it, edit the notes if you like, then release.":`Released ${Ts(e.date)}`}),k.length>0&&t.jsxs("div",{className:"box",style:{marginTop:10,color:"var(--you-ink)"},children:[t.jsx("b",{children:"Not pushed yet."})," The release is made on this computer, but it did not reach the remote, so its tickets stay open.",k.map(w=>t.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[w.repo==="."?"project":w.repo,": ",w.base," → ",w.remote,": ",w.error]},w.repo)),t.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:10},children:[t.jsxs("button",{className:"btn pri",disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/push`},{onSuccess:w=>w.unpushed?.length?void 0:n(w)}),children:[t.jsx(Da,{size:15})," Push again"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad release ${e.version} --push-again`})]})]}),v&&e.log&&e.log.length>0&&t.jsxs("div",{className:"box",style:{marginTop:10},children:[t.jsx("b",{children:"Last time it did not go out."}),e.log.map(w=>t.jsxs("div",{className:"checkrow",style:w.ok?void 0:{color:"var(--you-ink)"},children:[t.jsx("span",{className:`cbx ${w.ok?"on":""}`,children:w.ok?t.jsx(xe,{size:11,strokeWidth:3}):"!"}),w.text]},w.text))]}),t.jsx("div",{className:"lbl",children:"What's inside"}),e.items.map(w=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:w.id}),t.jsx("b",{children:w.title}),t.jsxs("span",{style:{display:"flex",gap:8,alignItems:"center",justifyContent:"flex-end",flexWrap:"wrap"},children:[w.gates?.checks==="unchecked"?t.jsx(Ir,{state:"unchecked",text:"Not checked · review, proof"}):w.gates&&t.jsxs("span",{className:"pill ok",children:[t.jsx(xe,{size:13,strokeWidth:2.5})," Checks, review, proof"]}),v&&e.items.length>1&&t.jsx("button",{className:"btn sm quiet",title:`squad release --without ${w.id}`,disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/take-out`,body:{ticket:w.id},done:`${w.id} goes out with the next release`}),children:"Take out"})]})]},w.id)),e.items.length===0&&t.jsx("p",{className:"note",children:"No tickets yet. Tickets join after you check their proof."}),v&&e.items.length>1&&t.jsx("div",{style:{marginTop:2},children:t.jsx(ie,{text:`squad release --without ${e.items[e.items.length-1].id}`})}),(e.out?.length??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:v?"Taken out of this release":"Left out of this release"}),e.out.map(w=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:w}),t.jsx("b",{children:o(w)}),v?t.jsxs("button",{className:"btn sm",disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/put-back`,body:{ticket:w},done:`${w} is back in ${e.version}`}),children:[t.jsx(j6,{size:13})," Put back"]}):t.jsx("span",{className:"note",children:"Goes out with the next release"})]},w)),v&&t.jsx("p",{className:"note",children:"Its code stays in main. This release leaves it out, and it goes out with the next one."}),v&&t.jsx("div",{style:{marginTop:6},children:t.jsx(ie,{text:`squad release --put-back ${e.out[0]}`})})]}),!v&&e.bugs&&e.bugs.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Bugs found after this release"}),e.bugs.map(w=>t.jsxs("div",{className:"trow",children:[t.jsx("span",{className:"mono",children:w}),t.jsx($e,{to:"/board",search:{ticket:w},children:t.jsx("b",{children:"Open the bug"})}),t.jsx("span",{})]},w))]}),t.jsxs("div",{className:"grid2",children:[t.jsxs("div",{children:[t.jsx("div",{className:"lbl",children:"Version"}),t.jsxs("div",{className:"ver",children:[t.jsx("span",{className:"from",children:e.from.replace(/^v/,"")}),t.jsx(so,{size:20}),t.jsx("span",{children:e.version.replace(/^v/,"")})]}),t.jsx("p",{className:"note",style:{marginTop:4},children:N}),t.jsx("div",{className:"lbl",children:v||!e.log?"Also":"What the release did"}),!v&&e.log?e.log.map(w=>t.jsxs("div",{className:"checkrow",style:w.ok?void 0:{color:"var(--you-ink)"},children:[t.jsx("span",{className:`cbx ${w.ok?"on":""}`,children:w.ok?t.jsx(xe,{size:11,strokeWidth:3}):"!"}),w.text]},w.text)):[["changelog","Update the changelog"],["tag",`Tag ${e.version} in git`],["pipeline","Run the pipeline"],["whatsapp","Draft a WhatsApp note for my manager"]].map(([w,S])=>t.jsxs("div",{className:"checkrow",children:[t.jsx("span",{className:`cbx ${e.addons[w]?"on":""}`,children:e.addons[w]&&t.jsx(xe,{size:11,strokeWidth:3})}),S]},w))]}),t.jsxs("div",{children:[t.jsxs("div",{className:"lbl",children:["Release notes",v&&", written by the squad",t.jsx("span",{className:"grow",style:{flex:1}}),v&&!c&&t.jsxs("button",{className:"btn sm",onClick:()=>u(!0),children:[t.jsx(ro,{size:13})," Edit"]})]}),c?t.jsxs(t.Fragment,{children:[t.jsx("textarea",{className:"textarea mono",style:{minHeight:180,fontSize:13},value:d,onChange:w=>p(w.target.value)}),t.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[t.jsx("button",{className:"btn sm pri",onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/notes`,method:"PUT",body:{notes:d},done:"Notes saved"},{onSuccess:()=>u(!1)}),children:"Save notes"}),t.jsx("button",{className:"btn sm",onClick:()=>u(!1),children:"Cancel"})]})]}):t.jsx(z6,{notes:e.notes})]})]}),t.jsx("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:26},children:v?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:e.items.length===0,onClick:()=>m(!0),children:[t.jsx(Da,{size:15})," Release ",e.version]}),t.jsx("span",{className:"note",children:"You'll be asked once to confirm."})]}):t.jsxs("button",{className:"btn",onClick:()=>x(!0),children:["Report a bug in ",e.version]})}),f&&t.jsxs(We,{title:`Release ${e.version}?`,onClose:()=>m(!1),icon:t.jsx("span",{className:"glyph",children:t.jsx(Da,{size:15})}),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",disabled:r.isPending,onClick:()=>r.mutate({path:`/api/v1/releases/${e.version}/release`},{onSuccess:w=>{m(!1),n(w)}}),children:[t.jsx(Da,{size:15})," Yes, release it"]}),t.jsx("button",{className:"btn",onClick:()=>m(!1),children:"Not yet"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad release ${e.version}`})]}),children:[t.jsxs("p",{children:[e.items.length," tickets go live: ",e.items.map(w=>w.title).join(", "),"."]}),e.targets.length>0&&t.jsxs("div",{className:"box",style:{marginBottom:6},children:[t.jsx("b",{children:"This release changes these branches:"}),e.targets.map(w=>t.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[w.repo==="."?"project":w.repo,": ",w.branch," ",w.remote?`→ pushed to ${w.remote}`:"(no remote, stays on this Mac)"]},w.repo)),t.jsx("p",{className:"note",style:{marginTop:6},children:"Change the branch or remote in Settings first if this is not right."})]})]}),!v&&s&&t.jsx(YI,{}),y&&t.jsx(Kf,{foundIn:e.version,onClose:()=>x(!1)})]})}function YI(){const e=fe(),s=Pe({queryKey:["branches"],queryFn:()=>Ee("/api/v1/branches"),refetchInterval:3e4}).data;if(!s||!s.here.length&&!s.remote.length)return null;const r=s.remote[0]?.remote??"the remote";return t.jsxs("div",{className:"box",style:{marginTop:18},children:[t.jsxs("b",{children:[t.jsx(mp,{size:14})," Old ticket branches"]}),t.jsxs("p",{className:"note",style:{margin:"4px 0 8px"},children:[[s.here.length?`${s.here.length} on this computer`:"",s.remote.length?`${s.remote.length} on ${r}`:""].filter(Boolean).join(" and "),", from released tickets. Their work is in main, so nothing is lost."]}),t.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[s.here.length>0&&t.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>e.mutate({path:"/api/v1/branches/clean",body:{remote:!1},done:"Deleted the old branches on this computer"}),children:"Delete them here"}),s.remote.length>0&&t.jsxs("button",{className:"btn sm",disabled:e.isPending,onClick:()=>e.mutate({path:"/api/v1/branches/clean",body:{remote:!0},done:`Deleted the old branches here and on ${r}`}),children:["Delete them ",s.here.length?"here and ":"","on ",r]}),t.jsx("span",{className:"grow",style:{flex:1}}),t.jsx(ie,{text:s.remote.length?"squad branches --clean --remote":"squad branches --clean"})]})]})}function QI(){const[e,n]=C.useState(void 0),s=Pe({queryKey:["backlog",e??""],queryFn:()=>Ee(`/api/v1/backlog${e?`?sprint=${encodeURIComponent(e)}`:""}`),refetchInterval:15e3}),r=s.data,a=e??r?.sprint,o=r?.sprints.find(c=>c.path===a)?.name;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Backlog"}),r?.connected&&r.sprints.length>0&&t.jsxs("select",{className:"input",style:{width:"auto",marginLeft:12},value:a??"all",onChange:c=>n(c.target.value),"aria-label":"Sprint",children:[r.sprints.map(c=>t.jsxs("option",{value:c.path,children:[c.name,c.current?" (now)":""]},c.path)),t.jsx("option",{value:"all",children:"Everything open"})]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:o?`squad backlog --sprint ${Fe(o)}`:"squad backlog"})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"page",children:s.isLoading?t.jsx("p",{className:"note",children:"Reading the backlog from Azure…"}):r?.connected?r.error?t.jsx("p",{className:"note",style:{color:"var(--bug)"},children:r.error}):r.items.length===0?t.jsxs("p",{className:"note",children:["Nothing open in ",o??"this sprint","."]}):t.jsxs(t.Fragment,{children:[t.jsxs("p",{className:"note",style:{marginBottom:12},children:[r.items.length," open ",r.items.length===1?"item":"items"," in ",o??"the backlog",", in backlog order. Start one and the squad picks it up; Azure follows along."]}),t.jsxs("table",{className:"table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{width:80},children:"ID"}),t.jsx("th",{children:"Title"}),t.jsx("th",{style:{width:70},children:"Points"}),t.jsx("th",{style:{width:100},children:"On Azure"}),t.jsx("th",{style:{width:260},children:"squad-kit"})]})}),t.jsx("tbody",{children:r.items.map(c=>t.jsx(GI,{w:c},c.id))})]})]}):t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(g6,{size:18})}),t.jsxs("div",{children:[t.jsx("b",{children:"Connect Azure DevOps"}),t.jsxs("span",{children:[r?.error??"Add your Azure organization, project and token, and your stories and bugs show up here."," ",t.jsx($e,{to:"/settings",style:{fontWeight:600},children:"Open Settings"})]})]})]})})})]})}function GI({w:e}){const n=fe();return t.jsxs("tr",{children:[t.jsx("td",{className:"mono",children:t.jsxs("a",{href:e.url,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.id," ",t.jsx(es,{size:11})]})}),t.jsx("td",{children:t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.type==="Bug"&&t.jsxs("span",{className:"pill bug",style:{padding:"2px 8px"},children:[t.jsx(Cs,{size:12})," Bug"]}),t.jsx("span",{style:{fontWeight:600},children:e.title})]})}),t.jsx("td",{children:e.points??""}),t.jsx("td",{children:e.state}),t.jsx("td",{children:e.ticket?t.jsxs($e,{to:"/board",search:{ticket:e.ticket.id},style:{color:"var(--muted)"},children:[t.jsx("b",{className:"mono",style:{color:"var(--text)"},children:e.ticket.id})," ",e.ticket.stage==="done"?"Released":$s[e.ticket.stage]]}):t.jsxs("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/backlog/${e.id}/start`,done:`${e.ref} is on the board. The Analyst is reading it.`}),children:[t.jsx(Li,{size:13})," Start"]})})]})}const fu=["Structure","Data","Security","Interface","Rules"],ZI={nextdotjs:{hex:"000000",path:"M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"},react:{hex:"61DAFB",path:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"},typescript:{hex:"3178C6",path:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},javascript:{hex:"F7DF1E",path:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"},prisma:{hex:"2D3748",path:"M21.8068 18.2848L13.5528.7565c-.207-.4382-.639-.7273-1.1286-.7541-.5023-.0293-.9523.213-1.2062.6253L2.266 15.1271c-.2773.4518-.2718 1.0091.0158 1.4555l4.3759 6.7786c.2608.4046.7127.6388 1.1823.6388.1332 0 .267-.0188.3987-.0577l12.7019-3.7568c.3891-.1151.7072-.3904.8737-.7553s.1633-.7828-.0075-1.1454zm-1.8481.7519L9.1814 22.2242c-.3292.0975-.6448-.1873-.5756-.5194l3.8501-18.4386c.072-.3448.5486-.3996.699-.0803l7.1288 15.138c.1344.2856-.019.6224-.325.7128z"},sqlite:{hex:"003B57",path:"M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z"},vitest:{hex:"6E9F18",path:"M13.74024 1.05293a.49504.49504 0 0 0-.1569.02512.49338.49338 0 0 0-.25056.1876L7.59513 9.56159a.4895.4895 0 0 0-.08373.22327.48846.48846 0 0 0 .03163.23629.4893.4893 0 0 0 .13985.19319.4927.4927 0 0 0 .2149.10481l3.70685.78609-.22947 4.58007a.48834.48834 0 0 0 .08466.30017.49205.49205 0 0 0 .24931.18854c.10157.03398.21174.03444.3135.00064a.49387.49387 0 0 0 .25056-.18761l5.73735-8.29594a.4884.4884 0 0 0 .08404-.22327c.009-.08015-.0016-.16137-.03163-.23629a.48835.48835 0 0 0-.13985-.19319.49318.49318 0 0 0-.2149-.1048l-3.70686-.7861.22947-4.58008a.48802.48802 0 0 0-.08466-.30017.4913.4913 0 0 0-.24931-.18853.49439.49439 0 0 0-.1566-.02574zM1.15697 9.78795c-.30647.0012-.60009.12378-.81679.34048a1.16107 1.16107 0 0 0-.34017.81648 1.162 1.162 0 0 0 .33366.81957l10.84241 10.8421a1.15762 1.15762 0 0 0 .37677.25211 1.1583 1.1583 0 0 0 .44467.08838c.00084 0 .0016-.00031.0025-.00031.00073 0 .0014.00031.0022.00031a1.15827 1.15827 0 0 0 .44467-.08838 1.15731 1.15731 0 0 0 .37677-.2521l10.84236-10.8421a1.16272 1.16272 0 0 0 .33397-.81958c-.0013-.30647-.12376-.59976-.34048-.81648a1.1616 1.1616 0 0 0-.81679-.34048 1.16114 1.16114 0 0 0-.81926.33366l-5.4012 5.4009c-.0078.0074-.01718.01255-.02482.02015L12 20.14011l-4.59776-4.59745c-.0074-.0074-.01659-.01238-.02419-.01954l-5.4015-5.40151a1.162 1.162 0 0 0-.81958-.33366Z"},eslint:{hex:"4B32C3",path:"M7.257 9.132L11.816 6.5a.369.369 0 0 1 .368 0l4.559 2.632a.369.369 0 0 1 .184.32v5.263a.37.37 0 0 1-.184.319l-4.559 2.632a.369.369 0 0 1-.368 0l-4.559-2.632a.369.369 0 0 1-.184-.32V9.452a.37.37 0 0 1 .184-.32M23.852 11.53l-5.446-9.475c-.198-.343-.564-.596-.96-.596H6.555c-.396 0-.762.253-.96.596L.149 11.509a1.127 1.127 0 0 0 0 1.117l5.447 9.398c.197.342.563.517.959.517h10.893c.395 0 .76-.17.959-.512l5.446-9.413a1.069 1.069 0 0 0 0-1.086m-4.51 4.556a.4.4 0 0 1-.204.338L12.2 20.426a.395.395 0 0 1-.392 0l-6.943-4.002a.4.4 0 0 1-.205-.338V8.08c0-.14.083-.269.204-.338L11.8 3.74c.12-.07.272-.07.392 0l6.943 4.003a.4.4 0 0 1 .206.338z"},primereact:{hex:"03C4E8",path:"M12.01 0c-1.212 0-2.297.62-2.903 1.66l-1.52 2.608H4.303A3.287 3.287 0 0 0 1.43 5.911a3.226 3.226 0 0 0 0 3.285l1.642 2.819-1.646 2.825a3.202 3.202 0 0 0 0 3.261 3.265 3.265 0 0 0 2.851 1.631h2.925l.865.856L9.09 22.34A3.322 3.322 0 0 0 11.991 24c1.211 0 2.296-.62 2.902-1.66l.816-1.4 1.22-1.208h2.77a3.287 3.287 0 0 0 2.87-1.643c.6-1.028.6-2.256 0-3.285l-1.642-2.82 1.646-2.824a3.202 3.202 0 0 0 0-3.261 3.265 3.265 0 0 0-2.851-1.631H16.43L14.91 1.66A3.322 3.322 0 0 0 12.01 0Zm0 .719c.948 0 1.798.486 2.273 1.3l1.31 2.249H8.425l1.31-2.248A2.603 2.603 0 0 1 12.01.719Zm.33 4.265v7.74h.962l5.904-2.174.014-.057.87 1.492-1.33 2.282.171-3.173-1.51.543-1.51 1.494-1.237-.27.962 1.357v4.212l1.452-1.296-.708 1.216v.001l-.744.622v.654l-.412.708V14.49l-1.098-1.63-.687.407h-2.746l-.687-.407-1.098 1.63v6.101l-.412-.706v-.912l-1.036-.867-.729-1.25 1.765 1.574v-4.212l.961-1.358-1.236.271-1.51-1.494-1.511-.543.188 3.455-1.477-2.534.942-1.617.122-.208.088.36 5.904 2.174h.824V4.985Zm1.512 0h.412l.96 2.17 1.935-.2.237.406-2.452.192zm-3.985.001h.412L9.187 7.552l-2.556-.205.072-.124.001.001.163-.28 2.04.21Zm-5.565.001h2.867L5.831 7.282l-1.592-.127.49 2.018-1.237 2.124-1.433-2.46a2.52 2.52 0 0 1 0-2.567 2.568 2.568 0 0 1 2.243-1.284Zm12.547 0h2.873c.928 0 1.759.476 2.223 1.272a2.497 2.497 0 0 1 0 2.543l-1.437 2.466-1.042-1.789.563-2.323-1.833.143Zm3.659 7.718 1.433 2.46a2.52 2.52 0 0 1 0 2.566 2.567 2.567 0 0 1-2.243 1.283h-2.277V18zm-17.016.03 3.22 5.525v.754H4.277a2.545 2.545 0 0 1-2.223-1.27 2.497 2.497 0 0 1 0-2.544z"},tailwindcss:{hex:"06B6D4",path:"M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z"},nodedotjs:{hex:"5FA04E",path:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"},postgresql:{hex:"4169E1",path:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"},vite:{hex:"646CFF",path:"m8.286 10.578.512-8.657a.306.306 0 0 1 .247-.282L17.377.006a.306.306 0 0 1 .353.385l-1.558 5.403a.306.306 0 0 0 .352.385l2.388-.46a.306.306 0 0 1 .332.438l-6.79 13.55-.123.19a.294.294 0 0 1-.252.14c-.177 0-.35-.152-.305-.369l1.095-5.301a.306.306 0 0 0-.388-.355l-1.433.435a.306.306 0 0 1-.389-.354l.69-3.375a.306.306 0 0 0-.37-.36l-2.32.536a.306.306 0 0 1-.374-.316zm14.976-7.926L17.284 3.74l-.544 1.887 2.077-.4a.8.8 0 0 1 .84.369.8.8 0 0 1 .034.783L12.9 19.93l-.013.025-.015.023-.122.19a.801.801 0 0 1-.672.37.826.826 0 0 1-.634-.302.8.8 0 0 1-.16-.67l1.029-4.981-1.12.34a.81.81 0 0 1-.86-.262.802.802 0 0 1-.165-.67l.63-3.08-2.027.468a.808.808 0 0 1-.768-.233.81.81 0 0 1-.217-.6l.389-6.57-7.44-1.33a.612.612 0 0 0-.64.906L11.58 23.691a.612.612 0 0 0 1.066-.004l11.26-20.135a.612.612 0 0 0-.644-.9z"},angular:{hex:"0F0F11",path:"M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z"},vuedotjs:{hex:"4FC08D",path:"M24,1.61H14.06L12,5.16,9.94,1.61H0L12,22.39ZM12,14.08,5.16,2.23H9.59L12,6.41l2.41-4.18h4.43Z"},dotnet:{hex:"512BD4",path:"M24 8.77h-2.468v7.565h-1.425V8.77h-2.462V7.53H24zm-6.852 7.565h-4.821V7.53h4.63v1.24h-3.205v2.494h2.953v1.234h-2.953v2.604h3.396zm-6.708 0H8.882L4.78 9.863a2.896 2.896 0 0 1-.258-.51h-.036c.032.189.048.592.048 1.21v5.772H3.157V7.53h1.659l3.965 6.32c.167.261.275.442.323.54h.024c-.04-.233-.06-.629-.06-1.185V7.529h1.372zm-8.703-.693a.868.829 0 0 1-.869.829.868.829 0 0 1-.868-.83.868.829 0 0 1 .868-.828.868.829 0 0 1 .869.829Z"},python:{hex:"3776AB",path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},jest:{hex:"C21325",path:"M22.251 11.82a3.117 3.117 0 0 0-2.328-3.01L22.911 0H8.104L11.1 8.838a3.116 3.116 0 0 0-2.244 2.988c0 1.043.52 1.967 1.313 2.536a8.279 8.279 0 0 1-1.084 1.244 8.14 8.14 0 0 1-2.55 1.647c-.834-.563-1.195-1.556-.869-2.446a3.11 3.11 0 0 0-.91-6.08 3.117 3.117 0 0 0-3.113 3.113c0 .848.347 1.626.903 2.182-.048.097-.097.195-.146.299-.465.959-.993 2.043-1.195 3.259-.403 2.432.257 4.384 1.849 5.489A5.093 5.093 0 0 0 5.999 24c1.827 0 3.682-.917 5.475-1.807 1.279-.632 2.599-1.292 3.898-1.612.48-.118.98-.187 1.508-.264 1.07-.153 2.175-.312 3.168-.89a4.482 4.482 0 0 0 2.182-3.091c.174-.994 0-1.994-.444-2.87.298-.48.465-1.042.465-1.647zm-1.355 0c0 .965-.785 1.75-1.75 1.75a1.753 1.753 0 0 1-1.085-3.126l.007-.007c.056-.042.118-.084.18-.125 0 0 .008 0 .008-.007.028-.014.055-.035.083-.05.007 0 .014-.006.021-.006.028-.014.063-.028.097-.042.035-.014.07-.027.098-.041.007 0 .013-.007.02-.007.028-.007.056-.021.084-.028.007 0 .02-.007.028-.007.034-.007.062-.014.097-.02h.007l.104-.022c.007 0 .02 0 .028-.007.028 0 .055-.007.083-.007h.035c.035 0 .07-.007.111-.007h.09c.028 0 .05 0 .077.007h.014c.055.007.111.014.167.028a1.766 1.766 0 0 1 1.396 1.723zM10.043 1.39h10.93l-2.509 7.4c-.104.02-.208.055-.312.09l-2.64-5.385-2.648 5.35c-.104-.034-.216-.055-.327-.076l-2.494-7.38zm4.968 9.825a3.083 3.083 0 0 0-.938-1.668l1.438-2.904 1.452 2.967c-.43.43-.743.98-.868 1.605H15.01zm-3.481-1.098c.034-.007.062-.014.097-.02h.02c.029-.008.056-.008.084-.015h.028c.028 0 .049-.007.076-.007h.271c.028 0 .049.007.07.007.014 0 .02 0 .035.007.027.007.048.007.076.014.007 0 .014 0 .028.007l.097.02h.007c.028.008.056.015.083.029.007 0 .014.007.028.007.021.007.049.014.07.027.007 0 .014.007.02.007.028.014.056.021.084.035h.007a.374.374 0 0 1 .09.049h.007c.028.014.056.034.084.048.007 0 .007.007.013.007.028.014.05.035.077.049l.007.007c.083.062.16.132.236.201l.007.007a1.747 1.747 0 0 1 .48 1.209 1.752 1.752 0 0 1-3.502 0 1.742 1.742 0 0 1 1.32-1.695zm-6.838-.049c.966 0 1.751.786 1.751 1.751s-.785 1.751-1.75 1.751-1.752-.785-1.752-1.75.786-1.752 1.751-1.752zm16.163 6.025a3.07 3.07 0 0 1-1.508 2.133c-.758.438-1.689.577-2.669.716a17.29 17.29 0 0 0-1.64.291c-1.445.355-2.834 1.05-4.182 1.717-1.724.854-3.35 1.66-4.857 1.66a3.645 3.645 0 0 1-2.154-.688c-1.529-1.056-1.453-3.036-1.272-4.12.167-1.015.632-1.966 1.077-2.877.028-.055.049-.104.077-.16.152.056.312.098.479.126-.264 1.473.486 2.994 1.946 3.745l.264.139.284-.104c1.216-.431 2.342-1.133 3.336-2.071a9.334 9.334 0 0 0 1.445-1.716c.16.027.32.034.48.034a3.117 3.117 0 0 0 3.008-2.327h1.167a3.109 3.109 0 0 0 3.01 2.327c.576 0 1.11-.16 1.57-.43.18.52.236 1.063.139 1.605z"},prettier:{hex:"F7B93E",path:"M8.571 23.429A.571.571 0 0 1 8 24H2.286a.571.571 0 0 1 0-1.143H8c.316 0 .571.256.571.572zM8 20.57H6.857a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zm-5.714 1.143H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM8 18.286H2.286a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zM16 16H5.714a.571.571 0 0 0 0 1.143H16A.571.571 0 0 0 16 16zM2.286 17.143h1.143a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm17.143-3.429H16a.571.571 0 0 0 0 1.143h3.429a.571.571 0 0 0 0-1.143zM9.143 14.857h4.571a.571.571 0 0 0 0-1.143H9.143a.571.571 0 0 0 0 1.143zm-6.857 0h4.571a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM20.57 11.43H11.43a.571.571 0 0 0 0 1.142h9.142a.571.571 0 0 0 0-1.142zM9.714 12a.571.571 0 0 0-.571-.571H5.714a.571.571 0 0 0 0 1.142h3.429A.571.571 0 0 0 9.714 12zm-7.428.571h1.143a.571.571 0 0 0 0-1.142H2.286a.571.571 0 0 0 0 1.142zm19.428-3.428H16a.571.571 0 0 0 0 1.143h5.714a.571.571 0 0 0 0-1.143zM2.286 10.286H8a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm13.143-2.857c0 .315.255.571.571.571h5.714a.571.571 0 0 0 0-1.143H16a.571.571 0 0 0-.571.572zm-8.572-.572a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143H6.857zM2.286 8H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm16.571-2.857c0 .315.256.571.572.571h1.142a.571.571 0 0 0 0-1.143H19.43a.571.571 0 0 0-.572.572zm-1.143 0a.571.571 0 0 0-.571-.572H12.57a.571.571 0 0 0 0 1.143h4.572a.571.571 0 0 0 .571-.571zm-15.428.571h8a.571.571 0 0 0 0-1.143h-8a.571.571 0 0 0 0 1.143zm5.143-2.857c0 .316.255.572.571.572h11.429a.571.571 0 0 0 0-1.143H8a.571.571 0 0 0-.571.571zm-5.143.572h3.428a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm0-2.286H16A.571.571 0 0 0 16 0H2.286a.571.571 0 0 0 0 1.143z"},express:{hex:"000000",path:"M24 18.588a1.529 1.529 0 01-1.895-.72l-3.45-4.771-.5-.667-4.003 5.444a1.466 1.466 0 01-1.802.708l5.158-6.92-4.798-6.251a1.595 1.595 0 011.9.666l3.576 4.83 3.596-4.81a1.435 1.435 0 011.788-.668L21.708 7.9l-2.522 3.283a.666.666 0 000 .994l4.804 6.412zM.002 11.576l.42-2.075c1.154-4.103 5.858-5.81 9.094-3.27 1.895 1.489 2.368 3.597 2.275 5.973H1.116C.943 16.447 4.005 19.009 7.92 17.7a4.078 4.078 0 002.582-2.876c.207-.666.548-.78 1.174-.588a5.417 5.417 0 01-2.589 3.957 6.272 6.272 0 01-7.306-.933 6.575 6.575 0 01-1.64-3.858c0-.235-.08-.455-.134-.666A88.33 88.33 0 010 11.577zm1.127-.286h9.654c-.06-3.076-2.001-5.258-4.59-5.278-2.882-.04-4.944 2.094-5.071 5.264z"},mongodb:{hex:"47A248",path:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z"},mysql:{hex:"4479A1",path:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"},redis:{hex:"FF4438",path:"M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z"},docker:{hex:"2496ED",path:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},zod:{hex:"408AFF",path:"M2.584 3.582a2.247 2.247 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.248 2.248 0 0 1-.624 2.443l-9.61 8.52a2.247 2.247 0 0 1-2.963.018L.776 12.773a2.248 2.248 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007c.456.399 1.139.396 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},hono:{hex:"E36002",path:"M12.445.002a45.529 45.529 0 0 0-5.252 8.146 8.595 8.595 0 0 1-.555-.53 27.796 27.796 0 0 0-1.205-1.542 8.762 8.762 0 0 0-1.251 2.12 20.743 20.743 0 0 0-1.448 5.88 8.867 8.867 0 0 0 .338 3.468c1.312 3.48 3.794 5.593 7.445 6.337 3.055.438 5.755-.333 8.097-2.312 2.677-2.59 3.359-5.634 2.047-9.132a33.287 33.287 0 0 0-2.988-5.59A91.34 91.34 0 0 0 12.615.053a.216.216 0 0 0-.17-.051Zm-.336 3.906a50.93 50.93 0 0 1 4.794 6.552c.448.767.817 1.57 1.108 2.41.606 2.386-.044 4.354-1.951 5.904-1.845 1.298-3.87 1.683-6.072 1.156-2.376-.737-3.75-2.335-4.121-4.794a5.107 5.107 0 0 1 .242-2.266c.358-.908.79-1.774 1.3-2.601l1.446-2.121a397.33 397.33 0 0 0 3.254-4.24Z"},svelte:{hex:"FF3E00",path:"M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"},nestjs:{hex:"E0234E",path:"M14.131.047c-.173 0-.334.037-.483.087.316.21.49.49.576.806.007.043.019.074.025.117a.681.681 0 0 1 .013.112c.024.545-.143.614-.26.936-.18.415-.13.861.086 1.22a.74.74 0 0 0 .074.137c-.235-1.568 1.073-1.803 1.314-2.293.019-.428-.334-.713-.613-.911a1.37 1.37 0 0 0-.732-.21zM16.102.4c-.024.143-.006.106-.012.18-.006.05-.006.112-.012.161-.013.05-.025.1-.044.149-.012.05-.03.1-.05.149l-.067.142c-.02.025-.031.05-.05.075l-.037.055a2.152 2.152 0 0 1-.093.124c-.037.038-.068.081-.112.112v.006c-.037.031-.074.068-.118.1-.13.099-.278.173-.415.266-.043.03-.087.056-.124.093a.906.906 0 0 0-.118.099c-.043.037-.074.074-.111.118-.031.037-.068.08-.093.124a1.582 1.582 0 0 0-.087.13c-.025.05-.043.093-.068.142-.019.05-.037.093-.05.143a2.007 2.007 0 0 0-.043.155c-.006.025-.006.056-.012.08-.007.025-.007.05-.013.075 0 .05-.006.105-.006.155 0 .037 0 .074.006.111 0 .05.006.1.019.155.006.05.018.1.03.15.02.049.032.098.05.148.013.03.031.062.044.087l-1.426-.552c-.241-.068-.477-.13-.719-.186l-.39-.093c-.372-.074-.75-.13-1.128-.167-.013 0-.019-.006-.031-.006A11.082 11.082 0 0 0 8.9 2.855c-.378.025-.756.074-1.134.136a12.45 12.45 0 0 0-.837.174l-.279.074c-.092.037-.18.08-.266.118l-.205.093c-.012.006-.024.006-.03.012-.063.031-.118.056-.174.087a2.738 2.738 0 0 0-.236.118c-.043.018-.086.043-.124.062a.559.559 0 0 1-.055.03c-.056.032-.112.063-.162.094a1.56 1.56 0 0 0-.148.093c-.044.03-.087.055-.124.086-.006.007-.013.007-.019.013-.037.025-.08.056-.118.087l-.012.012-.093.074c-.012.007-.025.019-.037.025-.031.025-.062.056-.093.08-.006.013-.019.02-.025.025-.037.038-.074.069-.111.106-.007 0-.007.006-.013.012a1.742 1.742 0 0 0-.111.106c-.007.006-.007.012-.013.012a1.454 1.454 0 0 0-.093.1c-.012.012-.03.024-.043.036a1.374 1.374 0 0 1-.106.112c-.006.012-.018.019-.024.03-.05.05-.093.1-.143.15l-.018.018c-.1.106-.205.211-.317.304-.111.1-.229.192-.347.273a3.777 3.777 0 0 1-.762.421c-.13.056-.267.106-.403.149-.26.056-.527.161-.756.18-.05 0-.105.012-.155.018l-.155.037-.149.056c-.05.019-.099.044-.148.068-.044.031-.093.056-.137.087a1.011 1.011 0 0 0-.124.106c-.043.03-.087.074-.124.111-.037.043-.074.08-.105.124-.031.05-.068.093-.093.143a1.092 1.092 0 0 0-.087.142c-.025.056-.05.106-.068.161-.019.05-.037.106-.056.161-.012.05-.025.1-.03.15 0 .005-.007.012-.007.018-.012.056-.012.13-.019.167C.006 7.95 0 7.986 0 8.03a.657.657 0 0 0 .074.31v.006c.019.037.044.075.069.112.024.037.05.074.08.111.031.031.068.069.106.1a.906.906 0 0 0 .117.099c.149.13.186.173.378.272.031.019.062.031.1.05.006 0 .012.006.018.006 0 .013 0 .019.006.031a1.272 1.272 0 0 0 .08.298c.02.037.032.074.05.111.007.013.013.025.02.031.024.05.049.093.073.137l.093.13c.031.037.069.08.106.118.037.037.074.068.118.105 0 0 .006.006.012.006.037.031.074.062.112.087a.986.986 0 0 0 .136.08c.043.025.093.05.142.069a.73.73 0 0 0 .124.043c.007.006.013.006.025.012.025.007.056.013.08.019-.018.335-.024.65.026.762.055.124.328-.254.6-.688-.036.428-.061.93 0 1.079.069.155.44-.329.763-.862 4.395-1.016 8.405 2.02 8.826 6.31-.08-.67-.905-1.041-1.283-.948-.186.458-.502 1.047-1.01 1.413.043-.41.025-.83-.062-1.24a4.009 4.009 0 0 1-.769 1.562c-.588.043-1.177-.242-1.487-.67-.025-.018-.031-.055-.05-.08-.018-.043-.037-.087-.05-.13a.515.515 0 0 1-.037-.13c-.006-.044-.006-.087-.006-.137v-.093a.992.992 0 0 1 .031-.13c.013-.043.025-.086.044-.13.024-.043.043-.087.074-.13.105-.298.105-.54-.087-.682a.706.706 0 0 0-.118-.062c-.024-.006-.055-.018-.08-.025l-.05-.018a.847.847 0 0 0-.13-.031.472.472 0 0 0-.13-.019 1.01 1.01 0 0 0-.136-.012c-.031 0-.062.006-.093.006a.484.484 0 0 0-.137.019c-.043.006-.086.012-.13.024a1.068 1.068 0 0 0-.13.044c-.043.018-.08.037-.124.056-.037.018-.074.043-.118.062-1.444.942-.582 3.148.403 3.787-.372.068-.75.148-.855.229l-.013.012c.267.161.546.298.837.416.397.13.818.247 1.004.297v.006a5.996 5.996 0 0 0 1.562.112c2.746-.192 4.996-2.281 5.405-5.033l.037.161c.019.112.043.23.056.347v.006c.012.056.018.112.025.162v.024c.006.056.012.112.012.162.006.068.012.136.012.204v.1c0 .03.007.067.007.098 0 .038-.007.075-.007.112v.087c0 .043-.006.08-.006.124 0 .025 0 .05-.006.08 0 .044-.006.087-.006.137-.006.018-.006.037-.006.055l-.02.143c0 .019 0 .037-.005.056-.007.062-.019.118-.025.18v.012l-.037.174v.018l-.037.167c0 .007-.007.02-.007.025a1.663 1.663 0 0 1-.043.168v.018c-.019.062-.037.118-.05.174-.006.006-.006.012-.006.012l-.056.186c-.024.062-.043.118-.068.18-.025.062-.043.124-.068.18-.025.062-.05.117-.074.18h-.007c-.024.055-.05.117-.08.173a.302.302 0 0 1-.019.043c-.006.006-.006.013-.012.019a5.867 5.867 0 0 1-1.742 2.082c-.05.031-.099.069-.149.106-.012.012-.03.018-.043.03a2.603 2.603 0 0 1-.136.094l.018.037h.007l.26-.037h.006c.161-.025.322-.056.483-.087.044-.006.093-.019.137-.031l.087-.019c.043-.006.086-.018.13-.024.037-.013.074-.02.111-.031.62-.15 1.221-.354 1.798-.595a9.926 9.926 0 0 1-3.85 3.142c.714-.05 1.426-.167 2.114-.366a9.903 9.903 0 0 0 5.857-4.68 9.893 9.893 0 0 1-1.667 3.986 9.758 9.758 0 0 0 1.655-1.376 9.824 9.824 0 0 0 2.61-5.268c.21.98.272 1.99.18 2.987 4.474-6.241.371-12.712-1.346-14.416-.006-.013-.012-.019-.012-.031-.006.006-.006.006-.006.012 0-.006 0-.006-.007-.012 0 .074-.006.148-.012.223a8.34 8.34 0 0 1-.062.415c-.03.136-.068.273-.105.41-.044.13-.093.266-.15.396a5.322 5.322 0 0 1-.185.378 4.735 4.735 0 0 1-.477.688c-.093.111-.192.21-.292.31a3.994 3.994 0 0 1-.18.155l-.142.124a3.459 3.459 0 0 1-.347.241 4.295 4.295 0 0 1-.366.211c-.13.062-.26.118-.39.174a4.364 4.364 0 0 1-.818.223c-.143.025-.285.037-.422.05a4.914 4.914 0 0 1-.297.012 4.66 4.66 0 0 1-.422-.025 3.137 3.137 0 0 1-.421-.062 3.136 3.136 0 0 1-.415-.105h-.007c.137-.013.273-.025.41-.05a4.493 4.493 0 0 0 .818-.223c.136-.05.266-.112.39-.174.13-.062.248-.13.372-.204.118-.08.235-.161.347-.248.112-.087.217-.18.316-.279.105-.093.198-.198.291-.304.093-.111.18-.223.26-.334.013-.019.026-.044.038-.062.062-.1.124-.199.18-.298a4.272 4.272 0 0 0 .334-.775c.044-.13.075-.266.106-.403.025-.142.05-.278.062-.415.012-.142.025-.285.025-.421 0-.1-.007-.199-.013-.298a6.726 6.726 0 0 0-.05-.415 4.493 4.493 0 0 0-.092-.415c-.044-.13-.087-.267-.137-.397-.05-.13-.111-.26-.173-.384-.069-.124-.137-.248-.211-.366a6.843 6.843 0 0 0-.248-.34c-.093-.106-.186-.212-.285-.317a3.878 3.878 0 0 0-.161-.155c-.28-.217-.57-.421-.862-.607a1.154 1.154 0 0 0-.124-.062 2.415 2.415 0 0 0-.589-.26Z"},cypress:{hex:"69D3A7",path:"M11.998.0195c-.8642 0-1.6816.1101-2.1445.1934v.002C4.1731 1.2283 0 6.1368 0 12.0018c0 1.1265.1573 2.2328.4648 3.3028.0387.1453.0915.2993.1368.4473 1.607 4.865 6.2245 8.226 11.3925 8.2285.0651 0 .2518-.0003.502-.0118.8564-.0353 1.6228-.5734 1.9512-1.369l.4736-1.1544L20.4258 8.043H18.621l-2.3164 5.871-2.334-5.871h-1.9082l3.2734 8.0117c-.8115 1.9702-1.6252 3.9395-2.4355 5.9101-.0808.1945-.2655.3284-.4727.336-.144.005-.285.0098-.4316.0098-4.5848 0-8.6672-3.0695-9.9277-7.4649a10.3058 10.3058 0 0 1-.3985-2.8437c0-5.0887 3.6521-9.3404 8.6035-10.164.2214-.037.8885-.1446 1.7246-.1446 4.4166 0 8.269 2.732 9.7305 6.8476.0558.144.0977.293.1465.4395.299.9746.4531 1.9887.4531 3.0215 0 4.5696-2.9413 8.5326-7.3164 9.8613l.4863 1.5996c5.085-1.546 8.4995-6.1518 8.502-11.459 0-1.5491-.2983-2.8706-.6504-3.8926-.0432-.1212-.0873-.2422-.1309-.3633h-.002C21.4577 3.0954 17.0444.0195 11.998.0195ZM8.4336 7.8906c-1.1999 0-2.1747.3852-2.9805 1.1758-.8007.7856-1.205 1.7736-1.205 2.9356 0 1.1544.4068 2.1368 1.205 2.9199.8058.7906 1.7806 1.1738 2.9805 1.1738 1.705 0 3.1556-.955 3.7871-2.4883l.0332-.082-1.6289-.5547c-.168.4563-.7552 1.4883-2.1914 1.4883-.6745 0-1.2437-.2344-1.6934-.6992-.4572-.4699-.6875-1.0632-.6875-1.7578 0-.6998.2253-1.2809.6875-1.7735.4522-.4648 1.019-.7012 1.6934-.7012 1.438 0 2.0238 1.0815 2.1934 1.4883l1.627-.5527-.0333-.084c-.629-1.5358-2.082-2.4883-3.7871-2.4883Z"},storybook:{hex:"FF4785",path:"M16.71.243l-.12 2.71a.18.18 0 00.29.15l1.06-.8.9.7a.18.18 0 00.28-.14l-.1-2.76 1.33-.1a1.2 1.2 0 011.279 1.2v21.596a1.2 1.2 0 01-1.26 1.2l-16.096-.72a1.2 1.2 0 01-1.15-1.16l-.75-19.797a1.2 1.2 0 011.13-1.27L16.7.222zM13.64 9.3c0 .47 3.16.24 3.59-.08 0-3.2-1.72-4.89-4.859-4.89-3.15 0-4.899 1.72-4.899 4.29 0 4.45 5.999 4.53 5.999 6.959 0 .7-.32 1.1-1.05 1.1-.96 0-1.35-.49-1.3-2.16 0-.36-3.649-.48-3.769 0-.27 4.03 2.23 5.2 5.099 5.2 2.79 0 4.969-1.49 4.969-4.18 0-4.77-6.099-4.64-6.099-6.999 0-.97.72-1.1 1.13-1.1.45 0 1.25.07 1.19 1.87z"},graphql:{hex:"E10098",path:"M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"},trpc:{hex:"2596BE",path:"M24 12c0 6.62-5.38 12-12 12S0 18.62 0 12 5.38 0 12 0s12 5.38 12 12ZM1.21 12A10.78 10.78 0 0 0 12 22.79 10.78 10.78 0 0 0 22.79 12 10.78 10.78 0 0 0 12 1.21 10.78 10.78 0 0 0 1.21 12Zm10.915-6.086 2.162 1.248a.25.25 0 0 1 .125.217v1.103l2.473 1.428a.25.25 0 0 1 .125.217v2.355l.955.551a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-.956-.552-2.472 1.427a.25.25 0 0 1-.25 0l-2.472-1.427-.956.552a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l.955-.551v-2.355a.25.25 0 0 1 .125-.217l2.473-1.428V7.38a.25.25 0 0 1 .125-.217l2.162-1.248a.25.25 0 0 1 .25 0Zm1.268 10.049a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l2.16-1.248a.25.25 0 0 1 .25 0l.707.408v-1.922l-2.098-1.21v.814a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V9.06L7.49 10.271v1.922l.707-.408a.25.25 0 0 1 .25 0l2.16 1.248a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-.705.408L12 17.582l2.098-1.211ZM10.088 9.73l1.662.96V8.766l-1.662-.955Zm3.824 0V7.811l-1.662.955v1.924ZM12 6.418l-1.66.96 1.66.954 1.66-.954Zm-5.59 9.184 1.66.958v-1.921l-1.66-.956Zm3.822 0v-1.92l-1.662.957v1.923Zm-1.91-3.311-1.662.96 1.661.955 1.66-.956Zm5.446 3.31 1.66.96v-1.922l-1.66-.956Zm3.822 0v-1.918l-1.662.956v1.922Zm-1.912-3.31-1.66.96 1.66.955 1.66-.956Z"},redux:{hex:"764ABC",path:"M16.634 16.504c.87-.075 1.543-.84 1.5-1.754-.047-.914-.796-1.648-1.709-1.648h-.061a1.71 1.71 0 00-1.648 1.769c.03.479.226.869.494 1.153-1.048 2.038-2.621 3.536-5.005 4.795-1.603.838-3.296 1.154-4.944.93-1.378-.195-2.456-.81-3.116-1.799-.988-1.499-1.078-3.116-.255-4.734.6-1.17 1.499-2.023 2.099-2.443a9.96 9.96 0 01-.42-1.543C-.868 14.408-.416 18.752.932 20.805c1.004 1.498 3.057 2.456 5.304 2.456.6 0 1.23-.044 1.843-.194 3.897-.749 6.848-3.086 8.541-6.532zm5.348-3.746c-2.32-2.728-5.738-4.226-9.634-4.226h-.51c-.253-.554-.837-.899-1.498-.899h-.045c-.943 0-1.678.81-1.647 1.753.03.898.794 1.648 1.708 1.648h.074a1.69 1.69 0 001.499-1.049h.555c2.309 0 4.495.674 6.488 1.992 1.527 1.005 2.622 2.323 3.237 3.897.538 1.288.509 2.547-.045 3.597-.855 1.647-2.294 2.517-4.196 2.517-1.199 0-2.367-.375-2.967-.644-.36.298-.96.793-1.394 1.093 1.318.598 2.652.943 3.94.943 2.922 0 5.094-1.647 5.919-3.236.898-1.798.824-4.824-1.47-7.416zM6.49 17.042c.03.899.793 1.648 1.708 1.648h.06a1.688 1.688 0 001.648-1.768c0-.9-.779-1.647-1.693-1.647h-.06c-.06 0-.15 0-.226.029-1.243-2.098-1.768-4.347-1.572-6.772.12-1.828.72-3.417 1.797-4.735.9-1.124 2.593-1.68 3.747-1.708 3.236-.061 4.585 3.971 4.689 5.574l1.498.45C17.741 3.197 14.686.62 11.764.62 9.02.62 6.49 2.613 5.47 5.535 4.077 9.43 4.991 13.177 6.7 16.174c-.15.195-.24.539-.21.868z"},i18next:{hex:"26A69A",path:"M14.93646 2.48699v4.51684l5.0758 13.03647s1.5495 3.1839-2.8824 3.9597H7.01922s-4.13084-.4311-3.14053-3.7019L9.21276 7.00401V2.48699h5.7237Zm2.0894 13.10781c-4.4301-1.3742-8.15457-.6365-9.97498-.0788l-1.83572 4.4186c-.78296 2.499 2.27302 2.9417 2.59687 2.9813l.02755.0032h8.44448c3.5407-.5982 2.511-2.972 2.4147-3.1773l-.0068-.0142-1.6661-4.1328Zm-7.81345.7772c.78905.0004 1.42905.3862 1.42905.8646 0 .4764-.6404.864-1.42905.864-.7887 0-1.42711-.3878-1.42711-.864 0-.4784.6384-.8646 1.4271-.8646Zm5.08375 0c.7871.0004 1.4271.3862 1.4271.8646 0 .4764-.6403.864-1.4271.864-.791 0-1.429-.3878-1.429-.864 0-.4784.638-.8646 1.429-.8646Zm-4.5001-5.2131c-.55227 0-.99993.5395-.99993 1.2051 0 .6656.44766 1.2051.99993 1.2051.5522 0 .9998-.5395.9998-1.2051 0-.6656-.4476-1.2051-.9998-1.2051Zm3.6413-1.29686c-.6549 0-1.1862.63806-1.1862 1.42906 0 .7871.5313 1.4271 1.1862 1.4271.653 0 1.1862-.64 1.1862-1.4271 0-.7907-.5328-1.42906-1.1862-1.42906Zm6.0363-2.73783s-2.1219 1.54591-4.0858-.41975V4.55615s2.7243-.60065 4.0858 2.56806Zm-14.84367 0C5.9908 3.9555 8.71543 4.55615 8.71543 4.55615v2.14831c-1.96566 1.96566-4.08544.41975-4.08544.41975ZM15.04366 0c.4954 0 .8958.4387.8958.98109 0 .54203-.4006.98074-.8958.98074H8.95478c-.49315 0-.89428-.43871-.89428-.98074C8.0605.43871 8.46146 0 8.95478 0h6.08888Z"},mui:{hex:"007FFF",path:"M20.229 15.793a.666.666 0 0 0 .244-.243.666.666 0 0 0 .09-.333l.012-3.858a.666.666 0 0 1 .09-.333.666.666 0 0 1 .245-.243L23 9.58a.667.667 0 0 1 .333-.088.667.667 0 0 1 .333.09.667.667 0 0 1 .244.243.666.666 0 0 1 .089.333v7.014a.667.667 0 0 1-.335.578l-7.893 4.534a.666.666 0 0 1-.662 0l-6.194-3.542a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.335v-3.537c0-.004.004-.006.008-.004s.008 0 .008-.005v-.004c0-.003.002-.005.004-.007l5.102-2.93c.004-.003.002-.01-.003-.01a.005.005 0 0 1-.004-.002.005.005 0 0 1-.001-.004l.01-3.467a.667.667 0 0 0-.333-.58.667.667 0 0 0-.667 0L8.912 9.799a.667.667 0 0 1-.665 0l-3.804-2.19a.667.667 0 0 0-.999.577v6.267a.667.667 0 0 1-.332.577.666.666 0 0 1-.332.09.667.667 0 0 1-.333-.088L.336 13.825a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.336L.019 2.292a.667.667 0 0 1 .998-.577l7.23 4.153a.667.667 0 0 0 .665 0l7.228-4.153a.666.666 0 0 1 .333-.088.666.666 0 0 1 .333.09.667.667 0 0 1 .244.244.667.667 0 0 1 .088.333V13.25c0 .117-.03.232-.089.334a.667.667 0 0 1-.245.244l-3.785 2.18a.667.667 0 0 0-.245.245.666.666 0 0 0-.089.334.667.667 0 0 0 .09.334.666.666 0 0 0 .247.244l2.088 1.189a.67.67 0 0 0 .33.087.667.667 0 0 0 .332-.089l4.457-2.56Zm.438-9.828a.666.666 0 0 0 .09.335.666.666 0 0 0 .248.244.667.667 0 0 0 .67-.008l2.001-1.2a.666.666 0 0 0 .237-.243.667.667 0 0 0 .087-.329V2.32a.667.667 0 0 0-.091-.335.667.667 0 0 0-.584-.33.667.667 0 0 0-.334.094l-2 1.2a.666.666 0 0 0-.238.243.668.668 0 0 0-.086.329v2.445Z"},bootstrap:{hex:"7952B3",path:"M11.77 11.24H9.956V8.202h2.152c1.17 0 1.834.522 1.834 1.466 0 1.008-.773 1.572-2.174 1.572zm.324 1.206H9.957v3.348h2.231c1.459 0 2.232-.585 2.232-1.685s-.795-1.663-2.326-1.663zM24 11.39v1.218c-1.128.108-1.817.944-2.226 2.268-.407 1.319-.463 2.937-.42 4.186.045 1.3-.968 2.5-2.337 2.5H4.985c-1.37 0-2.383-1.2-2.337-2.5.043-1.249-.013-2.867-.42-4.186-.41-1.324-1.1-2.16-2.228-2.268V11.39c1.128-.108 1.819-.944 2.227-2.268.408-1.319.464-2.937.42-4.186-.045-1.3.968-2.5 2.338-2.5h14.032c1.37 0 2.382 1.2 2.337 2.5-.043 1.249.013 2.867.42 4.186.409 1.324 1.098 2.16 2.226 2.268zm-7.927 2.817c0-1.354-.953-2.333-2.368-2.488v-.057c1.04-.169 1.856-1.135 1.856-2.213 0-1.537-1.213-2.538-3.062-2.538h-4.16v10.172h4.181c2.218 0 3.553-1.086 3.553-2.876z"},sass:{hex:"CC6699",path:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zM9.615 15.998c.175.645.156 1.248-.024 1.792l-.065.18c-.024.061-.052.12-.078.176-.14.29-.326.56-.555.81-.698.759-1.672 1.047-2.09.805-.45-.262-.226-1.335.584-2.19.871-.918 2.12-1.509 2.12-1.509v-.003l.108-.061zm9.911-10.861c-.542-2.133-4.077-2.834-7.422-1.645-1.989.707-4.144 1.818-5.693 3.267C4.568 8.48 4.275 9.98 4.396 10.607c.427 2.211 3.457 3.657 4.703 4.73v.006c-.367.18-3.056 1.529-3.686 2.925-.675 1.47.105 2.521.615 2.655 1.575.436 3.195-.36 4.065-1.649.84-1.261.766-2.881.404-3.676.496-.135 1.08-.195 1.83-.104 2.101.24 2.521 1.56 2.43 2.1-.09.539-.523.854-.674.944-.15.091-.195.12-.181.181.015.09.091.09.21.075.165-.03 1.096-.45 1.141-1.471.045-1.29-1.186-2.729-3.375-2.7-.9.016-1.471.091-1.875.256-.03-.045-.061-.075-.105-.105-1.35-1.455-3.855-2.475-3.75-4.41.03-.705.285-2.564 4.8-4.814 3.705-1.846 6.661-1.335 7.171-.21.733 1.604-1.576 4.59-5.431 5.024-1.47.165-2.235-.404-2.431-.615-.209-.225-.239-.24-.314-.194-.12.06-.045.255 0 .375.12.3.585.825 1.396 1.095.704.225 2.43.359 4.5-.45 2.324-.899 4.139-3.405 3.614-5.505l.073.067z"},drizzle:{hex:"C5F74F",path:"M5.353 11.823a1.036 1.036 0 0 0-.395-1.422 1.063 1.063 0 0 0-1.437.399L.138 16.702a1.035 1.035 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.398l3.383-5.903Zm11.216 0a1.036 1.036 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.399l-3.382 5.902a1.036 1.036 0 0 0 .394 1.422c.506.283 1.15.104 1.438-.398l3.382-5.903Zm7.293-4.525a1.036 1.036 0 0 0-.395-1.422 1.062 1.062 0 0 0-1.437.399l-3.383 5.902a1.036 1.036 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.399l3.383-5.902Zm-11.219 0a1.035 1.035 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.398l-3.382 5.903a1.036 1.036 0 0 0 .394 1.422c.506.282 1.15.104 1.438-.399l3.382-5.902Z"},supabase:{hex:"3FCF8E",path:"M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"},firebase:{hex:"DD2C00",path:"M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"},bun:{hex:"000000",path:"M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"},deno:{hex:"70FFAF",path:"M1.105 18.02A11.9 11.9 0 0 1 0 12.985q0-.698.078-1.376a12 12 0 0 1 .231-1.34A12 12 0 0 1 4.025 4.02a12 12 0 0 1 5.46-2.771 12 12 0 0 1 3.428-.23c1.452.112 2.825.477 4.077 1.05a12 12 0 0 1 2.78 1.774 12.02 12.02 0 0 1 4.053 7.078A12 12 0 0 1 24 12.985q0 .454-.036.914a12 12 0 0 1-.728 3.305 12 12 0 0 1-2.38 3.875c-1.33 1.357-3.02 1.962-4.43 1.936a4.4 4.4 0 0 1-2.724-1.024c-.99-.853-1.391-1.83-1.53-2.919a5 5 0 0 1 .128-1.518c.105-.38.37-1.116.76-1.437-.455-.197-1.04-.624-1.226-.829-.045-.05-.04-.13 0-.183a.155.155 0 0 1 .177-.053c.392.134.869.267 1.372.35.66.111 1.484.25 2.317.292 2.03.1 4.153-.813 4.812-2.627s.403-3.609-1.96-4.685-3.454-2.356-5.363-3.128c-1.247-.505-2.636-.205-4.06.582-3.838 2.121-7.277 8.822-5.69 15.032a.191.191 0 0 1-.315.19 12 12 0 0 1-1.25-1.634 12 12 0 0 1-.769-1.404M11.57 6.087c.649-.051 1.214.501 1.31 1.236.13.979-.228 1.99-1.41 2.013-1.01.02-1.315-.997-1.248-1.614.066-.616.574-1.575 1.35-1.635"},nuxt:{hex:"00DC82",path:"M13.4642 19.8295h8.9218c.2834 0 .5618-.0723.8072-.2098a1.5899 1.5899 0 0 0 .5908-.5732 1.5293 1.5293 0 0 0 .216-.783 1.529 1.529 0 0 0-.2167-.7828L17.7916 7.4142a1.5904 1.5904 0 0 0-.5907-.573 1.6524 1.6524 0 0 0-.807-.2099c-.2833 0-.5616.0724-.807.2098a1.5904 1.5904 0 0 0-.5907.5731L13.4642 9.99l-2.9954-5.0366a1.5913 1.5913 0 0 0-.591-.573 1.6533 1.6533 0 0 0-.8071-.2098c-.2834 0-.5617.0723-.8072.2097a1.5913 1.5913 0 0 0-.591.573L.2168 17.4808A1.5292 1.5292 0 0 0 0 18.2635c-.0001.2749.0744.545.216.783a1.59 1.59 0 0 0 .5908.5732c.2454.1375.5238.2098.8072.2098h5.6003c2.219 0 3.8554-.9454 4.9813-2.7899l2.7337-4.5922L16.3935 9.99l4.3944 7.382h-5.8586ZM7.123 17.3694l-3.9083-.0009 5.8586-9.8421 2.9232 4.921-1.9572 3.2892c-.7478 1.1967-1.5972 1.6328-2.9163 1.6328z"},stripe:{hex:"635BFF",path:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"},twilio:{hex:"F22F46",path:"M12 0C5.381-.008.008 5.352 0 11.971V12c0 6.64 5.359 12 12 12 6.64 0 12-5.36 12-12 0-6.641-5.36-12-12-12zm0 20.801c-4.846.015-8.786-3.904-8.801-8.75V12c-.014-4.846 3.904-8.786 8.75-8.801H12c4.847-.014 8.786 3.904 8.801 8.75V12c.015 4.847-3.904 8.786-8.75 8.801H12zm5.44-11.76c0 1.359-1.12 2.479-2.481 2.479-1.366-.007-2.472-1.113-2.479-2.479 0-1.361 1.12-2.481 2.479-2.481 1.361 0 2.481 1.12 2.481 2.481zm0 5.919c0 1.36-1.12 2.48-2.481 2.48-1.367-.008-2.473-1.114-2.479-2.48 0-1.359 1.12-2.479 2.479-2.479 1.361-.001 2.481 1.12 2.481 2.479zm-5.919 0c0 1.36-1.12 2.48-2.479 2.48-1.368-.007-2.475-1.113-2.481-2.48 0-1.359 1.12-2.479 2.481-2.479 1.358-.001 2.479 1.12 2.479 2.479zm0-5.919c0 1.359-1.12 2.479-2.479 2.479-1.367-.007-2.475-1.112-2.481-2.479 0-1.361 1.12-2.481 2.481-2.481 1.358 0 2.479 1.12 2.479 2.481z"},reactquery:{hex:"FF4154",path:"M6.9297 13.6875c.164-.0938.375-.0352.4687.1328l.0625.1055c.4805.8515.9805 1.6601 1.5 2.4258.6133.9023 1.3047 1.8164 2.0743 2.7421a.3455.3455 0 0 1-.0391.4844l-.0742.0664c-2.543 2.2227-4.1914 2.664-4.9532 1.332-.746-1.3046-.4765-3.6718.8086-7.1093a.3437.3437 0 0 1 .1524-.1797ZM17.75 16.3008c.1836-.0313.3594.086.3945.2695l.0196.1016c.6289 3.2851.1875 4.9297-1.3243 4.9297-1.4804 0-3.3593-1.4024-5.6484-4.2032a.3271.3271 0 0 1-.0742-.2226c0-.1875.1562-.3399.3437-.3399h.1211a32.9838 32.9838 0 0 0 2.8086-.0976c1.0703-.086 2.1914-.2305 3.3594-.4375zm.871-6.9766a.3528.3528 0 0 1 .4454-.211l.1016.0352c3.2617 1.1094 4.5039 2.332 3.7187 3.6641-.7656 1.3047-2.9922 2.254-6.6836 2.8477-.082.0117-.168-.004-.2383-.047-.168-.0976-.2265-.3085-.125-.4765l.0625-.1054c.504-.8438.957-1.6836 1.3672-2.5235.4766-.9883.9297-2.0508 1.3516-3.1836zM7.797 8.3398c.082-.0117.168.004.2383.047.168.0976.2265.3085.125.4765l-.0625.1054a34.0882 34.0882 0 0 0-1.3672 2.5235c-.4766.9883-.9297 2.0508-1.3516 3.1836a.3528.3528 0 0 1-.4453.211l-.1016-.0352c-3.2617-1.1094-4.5039-2.332-3.7187-3.6641.7656-1.3047 2.9922-2.254 6.6836-2.8477Zm5.2812-3.9843c2.543-2.2227 4.1914-2.664 4.9532-1.332.746 1.3046.4765 3.6718-.8086 7.1093a.3436.3436 0 0 1-.1524.1797c-.164.0938-.375.0352-.4687-.1328l-.0625-.1055c-.4805-.8515-.9805-1.6601-1.5-2.4258-.6133-.9023-1.3047-1.8164-2.0743-2.7421a.3455.3455 0 0 1 .0391-.4844Zm-5.793-2.082c1.4805 0 3.3633 1.4023 5.6485 4.203a.3488.3488 0 0 1 .0781.2188c-.0039.1914-.1562.3438-.3476.3438l-.1172-.004a34.5835 34.5835 0 0 0-2.8086.1016c-1.0742.086-2.1953.2305-3.3633.4375a.343.343 0 0 1-.3945-.2734l-.0196-.0977c-.629-3.2851-.1876-4.9297 1.3242-4.9297Zm2.8711 5.8124h3.6875a.638.638 0 0 1 .5508.3164l1.8477 3.2188a.6437.6437 0 0 1 0 .6289l-1.8477 3.2227a.638.638 0 0 1-.5507.3164h-3.6875c-.2266 0-.4375-.1211-.547-.3164L7.7579 12.25a.6437.6437 0 0 1 0-.629l1.8516-3.2187c.1093-.1953.3203-.3164.5468-.3164Zm3.2305.793a.638.638 0 0 1 .5508.3164l1.3906 2.4258a.6437.6437 0 0 1 0 .6289l-1.3906 2.4297a.638.638 0 0 1-.5508.3164h-2.7734c-.2266 0-.4375-.1211-.5469-.3164L8.672 12.25a.6437.6437 0 0 1 0-.629l1.3945-2.4257c.1094-.1953.3203-.3164.5469-.3164Zm-.4922.8672h-1.789c-.2266 0-.4336.1172-.547.3164l-.8983 1.5586a.6437.6437 0 0 0 0 .6289l.8984 1.5625a.6317.6317 0 0 0 .5469.3164h1.789a.6317.6317 0 0 0 .547-.3164l.8983-1.5625a.6437.6437 0 0 0 0-.629l-.8984-1.5585c-.1133-.1992-.3203-.3164-.5469-.3164Zm-.4765.8281c.2265 0 .4375.1211.5468.3164l.422.7305c.1132.1953.1132.4375 0 .6289l-.422.7344c-.1093.1953-.3203.3164-.5468.3164h-.836a.6317.6317 0 0 1-.5468-.3164l-.422-.7344c-.1132-.1914-.1132-.4336 0-.629l.422-.7304a.6317.6317 0 0 1 .5468-.3164zm-.418.8164a.548.548 0 0 0-.4727.2735c-.0976.168-.0976.375 0 .5468a.5444.5444 0 0 0 .4727.2696.5444.5444 0 0 0 .4727-.2696c.0976-.1718.0976-.3789 0-.5468A.548.548 0 0 0 12 11.3906Zm-4.4219.5469h.9805M18.9805 7.75c.3906-1.8945.4765-3.3438.2226-4.3984-.1484-.629-.4218-1.1368-.8398-1.5078-.4414-.3907-1-.582-1.625-.582-1.0352 0-2.1211.4726-3.2813 1.3671-.4726.3633-.9648.8047-1.4726 1.3164-.043-.0508-.086-.1015-.1367-.1445-1.4454-1.2852-2.6602-2.082-3.6993-2.3906-.6171-.1836-1.1953-.1993-1.7226-.0235-.5586.1875-1.004.5742-1.3164 1.1172-.5156.8945-.6524 2.0742-.461 3.5274.0782.5898.2149 1.2343.4024 1.9335a1.1187 1.1187 0 0 0-.2149.047C3.008 8.621 1.711 9.2694.9258 10.0155c-.4649.4414-.7695.9375-.8828 1.4805-.1133.5781 0 1.1562.3125 1.6992.5156.8945 1.4648 1.5977 2.8164 2.1563.543.2226 1.1562.4257 1.8437.6093a1.0227 1.0227 0 0 0-.0703.2266c-.3906 1.8906-.4765 3.3438-.2226 4.3945.1484.629.4257 1.1407.8398 1.5078.4414.3907 1 .582 1.625.582 1.0352 0 2.121-.4726 3.2813-1.3632.4765-.3711.9726-.8164 1.4882-1.336a1.2 1.2 0 0 0 .1953.2266c1.4454 1.2852 2.6602 2.082 3.6993 2.3906.6172.1836 1.1953.1993 1.7226.0235.5586-.1875 1.004-.5742 1.3164-1.1172.5157-.8945.6524-2.0742.461-3.5273-.082-.6133-.2227-1.2813-.4258-2.0118a1.2248 1.2248 0 0 0 .2383-.0468c1.828-.6094 3.125-1.2578 3.9101-2.004.4649-.4413.7696-.9374.8828-1.4804.1133-.5781 0-1.1563-.3125-1.6992-.5156-.8946-1.4648-1.5977-2.8164-2.1563-.5586-.2304-1.1953-.4414-1.9062-.625a.8647.8647 0 0 0 .0586-.1953z"},reacthookform:{hex:"EC5990",path:"M10.7754 17.3477H5.8065a.2815.2815 0 1 0 0 .563h4.9689a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9688a.2815.2815 0 1 0 0 .563h4.9688a.2815.2815 0 0 0 0-.563zm-7.3336-6.475H5.8065a.2815.2815 0 1 0 0 .563h4.9548a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9547a.2815.2815 0 1 0 0 .563h4.9547a.2815.2815 0 0 0 0-.563zm.5518-9.2001h-4.341a2.4042 2.4042 0 0 0-4.5804 0H5.3674c-1.7103 0-3.0968 1.3864-3.0968 3.0967v16.134C2.2706 22.6135 3.6571 24 5.3674 24h13.2652c1.7103 0 3.0968-1.3865 3.0968-3.0967V4.7693c0-1.7103-1.3865-3.0967-3.0968-3.0967zm-8.7046.563a.2815.2815 0 0 0 .2815-.2224 1.8411 1.8411 0 0 1 3.5979 0 .2815.2815 0 0 0 .2815.2224h1.5146v1.844a.8446.8446 0 0 1-.8446.8446H9.2552a.8446.8446 0 0 1-.8446-.8446v-1.844Zm11.2383 18.6677c0 1.3993-1.1344 2.5337-2.5337 2.5337H5.3674c-1.3993 0-2.5337-1.1344-2.5337-2.5337V4.7693c0-1.3993 1.1344-2.5337 2.5337-2.5337h2.4802v1.844c0 .7774.6302 1.4076 1.4076 1.4076h5.4896c.7774 0 1.4076-.6302 1.4076-1.4076v-1.844h2.4802c1.3993 0 2.5337 1.1344 2.5337 2.5337z"}},Yp={shipped:"Released",merged:"Merged, not released yet",building:"Being built",designed:"Designed, not built yet",coming:"Coming"};function XI(){const e=A6(),n=Fi({from:"/architecture"}),s=Jt(),r=n.view??"map",[a,o]=C.useState(new Set),[c,u]=C.useState(null),[d,p]=C.useState(!1),[f,m]=C.useState(null),y=n.adr?n.adr.startsWith("ADR-")?{kind:"adr",id:n.adr}:{kind:"ticket",id:n.adr}:null,x=F=>void s({to:"/architecture",search:{...(F.view??r)!=="map"?{view:F.view??r}:{},..."pick"in F?F.pick?{adr:F.pick.id}:{}:n.adr?{adr:n.adr}:{}},replace:!0}),v=F=>x({pick:y?.id===F?.id?null:F}),k=e.data?.decisions??[],N=e.data?.tickets??[],w=C.useMemo(()=>hz(k,N),[k,N]),S=w.cols.length,E=c??S;if(C.useEffect(()=>{if(!d)return;const F=setInterval(()=>{u(M=>{const J=(M??0)+1;return J>=S?(p(!1),null):J})},700);return()=>clearInterval(F)},[d,S]),!e.data)return t.jsx("div",{className:"top",children:t.jsx("h1",{children:"Architecture"})});const P=k.filter(F=>w.colOf(F.from)<E),B=P.filter(F=>!F.replacedBy||w.colOf(l3(k,F.replacedBy))>=E),T=w.cols.slice(0,E).reduce((F,M)=>F+(M.t?.follows.length??0),0),_=f?f.startsWith("ADR-")?{kind:"adr",id:f}:{kind:"ticket",id:f}:y,I=pz(_,k,N),D=r==="map"||r==="timeline",R=e.data.lessons??[];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Architecture"}),t.jsx("span",{className:"note",children:"Every technical choice the squad made, why, and what it shaped. Every new ticket follows the rules in force."})]}),t.jsx("div",{className:"ptabs",role:"tablist",children:[["map","Map"],["timeline","Timeline"],["stack","Stack",e.data.stack.length],["list","All decisions",k.length],["project","Project map"],["lessons","Lessons",R.length]].map(([F,M,J])=>t.jsxs("button",{role:"tab","aria-selected":r===F,className:r===F?"on":"",onClick:()=>x({view:F}),children:[M," ",J!==void 0&&t.jsx("span",{className:"n",children:J})]},F))}),t.jsxs("div",{className:"split",children:[t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"arch",children:[D&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"arch-stats",children:[t.jsx(sc,{n:B.length,label:"Rules in force",hint:"Every new design must follow these"}),t.jsx(sc,{n:P.length-B.length,label:"Replaced",hint:"Changed by a newer decision"}),t.jsx(sc,{n:B.filter(F=>F.checkedBy?.passing).length,label:"Checked by a test",hint:"Break one and nothing ships"}),t.jsx(sc,{n:T,label:"Times a design followed one",hint:"Past choices shaping new work"})]}),t.jsxs("div",{className:"arch-bar",children:[t.jsxs("button",{className:"btn",onClick:()=>d?p(!1):(u(c===null||c>=S?1:c),p(!0)),children:[d?t.jsx(Qc,{size:14}):t.jsx(Li,{size:14})," ",d?"Pause":"Play the history"]}),t.jsx("input",{type:"range",min:1,max:S,value:E,"aria-label":"Show the project up to this ticket",onChange:F=>{p(!1);const M=Number(F.target.value);u(M>=S?null:M)}}),t.jsx("span",{className:"note mono",style:{minWidth:110},children:E>=S?"Today":`Up to ${w.cols[E-1]?.label??""}`}),t.jsx("span",{className:"grow"}),[...fu,"Other"].filter(F=>k.some(M=>(M.area??"Other")===F)).map(F=>t.jsxs("button",{className:`chip area-${F.toLowerCase()} ${a.has(F)?"on":""}`,onClick:()=>o(M=>{const J=new Set(M);return J.has(F)?J.delete(F):J.add(F),J}),children:[t.jsx("i",{})," ",F]},F))]})]}),r==="map"&&t.jsx(rz,{decisions:k.filter(F=>a.size===0||a.has(F.area??"Other")),tickets:N,visible:F=>w.colOf(F.from)<E,related:I,picked:y?.id??null,onPick:v,onHover:m}),r==="timeline"&&t.jsx(oz,{decisions:k,tickets:N,areas:a,shown:E,related:I,picked:y?.id??null,onPick:v,g:w}),D&&t.jsx(sz,{view:r}),r==="map"&&t.jsx(lz,{decisions:k,tickets:N,onPick:v}),r==="stack"&&t.jsx(JI,{data:e.data,picked:y?.id??null,onPick:v}),r==="list"&&t.jsx(cz,{decisions:k,picked:y?.id??null,onPick:v}),r==="project"&&t.jsxs("div",{style:{maxWidth:820},children:[t.jsxs("p",{className:"note",style:{marginBottom:8,display:"flex",gap:8,alignItems:"center"},children:[t.jsx(d6,{size:15})," The Architect writes this from the code and reads it again after every merge. Every agent reads it first, then opens only the files it needs."]}),t.jsx(o3,{reading:e.data.reading}),e.data.map.map(F=>t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:F.area}),t.jsx("span",{children:F.detail})]},F.area))]}),r==="lessons"&&t.jsxs("div",{style:{maxWidth:820},children:[t.jsx("p",{className:"note",style:{marginBottom:8},children:"Learned from bugs and reviews. Each lesson makes the next ticket better."}),R.length===0&&t.jsx("p",{className:"note",children:"No lessons yet."}),R.map(F=>t.jsxs("div",{className:"lesson",children:[t.jsx("span",{className:"glyph sm",children:t.jsx(l6,{size:12})}),t.jsxs("span",{children:[F.text," ",t.jsxs("span",{className:"note",children:["From ",F.from]})]}),t.jsx("span",{className:"mono",children:Ts(F.date)})]},F.id))]})]})}),r!=="project"&&r!=="lessons"&&t.jsx(uz,{pick:y,decisions:k,tickets:N,impact:e.data.impact??[],onPick:v})]})]})}const a3=[{role:"Language",label:"Language and runtime"},{role:"Framework",label:"App framework"},{role:"Interface",label:"Screens"},{role:"Data",label:"Data"},{role:"Services",label:"Outside services"},{role:"Testing",label:"Testing"},{role:"Tooling",label:"Tooling"}];function JI({data:e,picked:n,onPick:s}){const r=e.stack.filter(o=>!o.decisions.length&&!o.via).length,a=e.stack.filter(o=>!o.decisions.length&&o.via).length;return t.jsxs("div",{className:"stackv",children:[t.jsx(o3,{reading:e.reading}),t.jsxs("div",{className:"stack-sum",children:[t.jsxs("span",{children:[t.jsx("b",{children:e.stack.length})," technologies in the code"]}),t.jsxs("span",{children:[t.jsx("b",{children:e.stack.length-r-a})," chosen by a saved decision"]}),a>0&&t.jsxs("span",{children:[t.jsx("b",{children:a})," came with one of those"]}),r>0&&t.jsxs("span",{className:"ahead",children:[t.jsx("b",{children:r})," picked while building, no decision yet"]}),t.jsxs("span",{children:[t.jsx("b",{children:e.patterns.length})," design patterns"]})]}),e.stack.length===0&&t.jsx("p",{className:"note",children:"None found yet. The Architect lists them when it reads the code."}),t.jsxs("section",{className:"stack-group",children:[t.jsx("h3",{children:"Technologies"}),t.jsx("div",{className:"techs",children:a3.flatMap(o=>e.stack.filter(c=>c.role===o.role)).map(o=>t.jsx(ez,{t:o,picked:n,onPick:s},o.name))})]}),t.jsxs("section",{className:"stack-group",children:[t.jsx("h3",{children:"Design patterns the code follows"}),e.patterns.length===0&&t.jsx("p",{className:"note",children:"Not read yet. Press Read the code again, and the Architect lists the patterns a new developer must keep."}),t.jsx("div",{className:"patterns",children:e.patterns.map(o=>t.jsxs("div",{className:"pattern",children:[t.jsx("span",{className:"glyph sm",children:t.jsx(k6,{size:13})}),t.jsxs("div",{children:[t.jsx("b",{children:o.name}),t.jsx("p",{children:o.what}),t.jsxs("div",{className:"where",children:[o.where.map(c=>t.jsx("code",{children:c},c)),o.decision&&t.jsxs("button",{className:`pill click ${n===o.decision?"on":""}`,onClick:()=>s({kind:"adr",id:o.decision}),children:["From ",o.decision]})]})]})]},o.name))})]})]})}function ez({t:e,picked:n,onPick:s}){const r=e.icon?ZI[e.icon]:void 0;return t.jsxs("div",{className:`tech ${e.decisions.some(a=>a===n)?"picked":""}`,children:[t.jsxs("div",{className:"tech-head",children:[t.jsx("span",{className:"logo",style:r?{"--brand":`#${r.hex}`}:void 0,children:r?t.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:nz(r.hex)?"ink":"",children:t.jsx("path",{d:r.path})}):t.jsx("span",{className:"mono",children:e.name.slice(0,2)})}),t.jsxs("span",{className:"tech-name",children:[t.jsx("b",{children:e.name}),e.version&&t.jsxs("span",{className:"mono",children:["v",e.version]})]}),t.jsx("span",{className:"tech-role",children:a3.find(a=>a.role===e.role)?.label})]}),t.jsx("p",{className:e.why?"":"note",children:e.why??"Not explained yet. The Architect fills this in when it reads the code."}),t.jsx("div",{className:"tech-foot",children:e.decisions.length?e.decisions.map(a=>t.jsxs("button",{className:`pill click ${n===a?"on":""}`,onClick:()=>s({kind:"adr",id:a}),children:["Chosen in ",a]},a)):e.via?e.via.decisions.map(a=>t.jsxs("button",{className:`pill click ${n===a?"on":""}`,onClick:()=>s({kind:"adr",id:a}),title:`Choosing ${e.via.name} chose ${e.name} too`,children:["Comes with ",e.via.name," · ",a]},a)):t.jsx(tz,{t:e})})]})}function tz({t:e}){const n=fe(),s=(a,o)=>n.mutate({path:"/api/v1/architecture/decide",body:{tech:e.name,do:a},done:o}),r=e.draft;if(r?.status==="writing"||n.isPending&&!r)return t.jsxs("span",{className:"pill nodecision",children:[t.jsx(gn,{size:12,className:"spin"})," The Architect is writing it"]});if(r?.status==="ready"&&r.decision){const a=r.decision;return t.jsxs("div",{className:"techdraft",children:[t.jsx("span",{className:"lbl",children:"Decision for you to approve"}),t.jsx("b",{children:a.title}),t.jsxs("p",{children:[t.jsx("span",{className:"note",children:"Chosen:"})," ",a.chosen]}),t.jsx("p",{children:a.why}),a.options.filter(o=>o!==a.chosen).length>0&&t.jsxs("p",{className:"note",children:["Also looked at: ",a.options.filter(o=>o!==a.chosen).join("; ")]}),t.jsxs("div",{className:"row",children:[t.jsxs("button",{className:"btn sm pri",disabled:n.isPending,onClick:()=>s("approve","Saved as a decision. Every new ticket follows it now."),children:[t.jsx(xe,{size:13})," Approve"]}),t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>s("discard"),children:"Discard"})]})]})}return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"pill nodecision",title:r?.status==="failed"?`The last try stopped: ${r.error??""}`:"The Builder added it while building; nobody wrote down why.",children:r?.status==="failed"?"Writing stopped, try again":"Picked while building"}),t.jsx("button",{className:"btn sm",onClick:()=>s("write",`The Architect is writing a decision for ${e.name}.`),children:"Save as a decision"})]})}function nz(e){const n=parseInt(e,16);return(n>>16&255)*.299+(n>>8&255)*.587+(n&255)*.114<60}function o3({reading:e}){const n=fe(),s=e?.status==="pending"||e?.status==="running"||n.isPending;return t.jsxs("div",{className:`reading ${e?.status==="failed"?"bad":""}`,children:[s?t.jsx(gn,{size:15,className:"spin"}):t.jsx(Pi,{size:15}),t.jsx("span",{children:s?"The Architect is reading the code. This takes a minute or two.":e?.status==="failed"?`The last read stopped: ${e.error??"unknown error"}`:e?.at?`Read from the code ${Zt(e.at)}. It is read again after every merge.`:"Not read from the code yet."}),t.jsx("span",{className:"grow"}),t.jsxs("button",{className:"btn sm",disabled:s,onClick:()=>n.mutate({path:"/api/v1/architecture/read",done:"The Architect is reading the code."}),children:[t.jsx(Pi,{size:13})," Read the code again"]})]})}function sc({n:e,label:n,hint:s}){return t.jsxs("div",{className:"arch-stat",title:s,children:[t.jsx("b",{children:e}),t.jsx("span",{children:n}),t.jsx("small",{children:s})]})}function sz({view:e}){return e==="map"?t.jsxs("div",{className:"arch-legend note",children:[t.jsxs("span",{children:[t.jsx("i",{className:"lg arrow"})," Built on"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg arrow replaces"})," Replaces"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg chip made"})," Ticket that made it"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg chip"})," Ticket that followed it"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg chip ahead"})," Will follow it, not built yet"]}),t.jsxs("span",{children:[t.jsx(xe,{size:12,strokeWidth:3})," Checked by a test"]})]}):t.jsxs("div",{className:"arch-legend note",children:[t.jsxs("span",{children:[t.jsx("i",{className:"lg node"})," Made the decision"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg dot"})," Its design followed it"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg dot open"})," Will follow it, not built yet"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg link"})," Built on an older one"]}),t.jsxs("span",{children:[t.jsx("i",{className:"lg link replaces"})," Replaces an older one"]})]})}const wi=112,Gh=18,Oa=16,My=34;function rz({decisions:e,tickets:n,visible:s,related:r,picked:a,onPick:o,onHover:c}){const[u,d]=C.useState(1100),p=C.useRef(null);C.useEffect(()=>{const I=p.current;if(!I)return;const D=new ResizeObserver(()=>d(I.clientWidth));return D.observe(I),()=>D.disconnect()},[]);const f=new Set(e.map(I=>I.id)),m=I=>[...I.buildsOn??[],...I.replaces?[I.replaces]:[]].filter(D=>f.has(D)),y=new Map,x=(I,D=new Set)=>{if(y.has(I.id))return y.get(I.id);if(D.has(I.id))return 0;D.add(I.id);const R=m(I).map(M=>e.find(J=>J.id===M)),F=R.length?1+Math.max(...R.map(M=>x(M,D))):0;return y.set(I.id,F),F},v=[...fu,"Other"],k=[];for(const I of e)(k[x(I)]??=[]).push(I);const N=k.length>4?30:46,w=Math.max(150,Math.min(270,(u-Oa*2-Math.max(0,k.length-1)*N)/Math.max(1,k.length)));for(const I of k)I?.sort((D,R)=>v.indexOf(D.area??"Other")-v.indexOf(R.area??"Other")||Fy(D.id)-Fy(R.id));const S=Math.max(1,...k.map(I=>I?.length??0)),E=My+S*(wi+Gh)+Oa,P=new Map;k.forEach((I,D)=>{const R=(S-(I?.length??0))*(wi+Gh)/2;I?.forEach((F,M)=>P.set(F.id,{x:Oa+D*(w+N),y:My+R+M*(wi+Gh)}))});const B=Oa*2+k.length*w+Math.max(0,k.length-1)*N,T=I=>r!==null&&!r.has(I),_=["Starting points","Built on them","One more level","And on those","And further"];return t.jsx("div",{className:"dmap",ref:p,onMouseLeave:()=>c(null),children:t.jsxs("div",{className:"dmap-canvas",style:{width:B,height:E},children:[k.map((I,D)=>t.jsx("span",{className:"dmap-layer",style:{left:Oa+D*(w+N),width:w},children:_[D]??`Level ${D+1}`},D)),t.jsxs("svg",{width:B,height:E,className:"dmap-edges",children:[t.jsxs("defs",{children:[t.jsx("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:t.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead"})}),t.jsx("marker",{id:"arr-r",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:t.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead replaces"})})]}),e.flatMap(I=>{const D=P.get(I.id);return!D||!s(I)?[]:[...(I.buildsOn??[]).map(F=>({p:F,kind:"built"})),...I.replaces?[{p:I.replaces,kind:"replaces"}]:[]].map(({p:F,kind:M})=>{const J=P.get(F),U=e.find(O=>O.id===F);if(!J||!U||!s(U))return null;const G=J.x+w,ue=J.y+wi/2,V=D.x-2,H=D.y+wi/2,ne=Math.max(40,(V-G)/2),A=r!==null&&r.has(I.id)&&r.has(F);return t.jsx("path",{className:`edge ${M} ${T(I.id)||T(F)?"off":""} ${A?"lit":""}`,d:`M${G} ${ue} C${G+ne} ${ue}, ${V-ne} ${H}, ${V} ${H}`,markerEnd:`url(#${M==="replaces"?"arr-r":"arr"})`},`${F}-${I.id}-${M}`)})})]}),e.map(I=>{const D=P.get(I.id),R=I.tickets.filter(U=>U!==I.from),F=n.filter(U=>(U.state==="designed"||U.state==="coming")&&U.follows.includes(I.id)&&!R.includes(U.id)),M=[I.from==="Project scan"?"Scan":I.from,...R],J=M.length+F.length-6;return t.jsxs("button",{className:`dcard area-${(I.area??"Other").toLowerCase()} ${s(I)?"":"later"} ${T(I.id)?"off":""} ${a===I.id?"picked":""} ${I.replacedBy?"old":""}`,style:{left:D.x,top:D.y,width:w,height:wi},onClick:()=>o({kind:"adr",id:I.id}),onMouseEnter:()=>c(I.id),children:[t.jsxs("span",{className:"dhead",children:[t.jsx("i",{}),t.jsx("span",{className:"mono",children:I.id}),t.jsx("span",{className:"darea",children:I.area??"Other"}),I.checkedBy?.passing&&t.jsx(xe,{size:13,strokeWidth:3,className:"dtest","aria-label":"Checked by a test"})]}),t.jsx("b",{className:"dtitle",children:I.title}),t.jsx("span",{className:"dchips",children:I.replacedBy?t.jsxs("span",{className:"dchip ahead",children:["Replaced by ",I.replacedBy]}):t.jsxs(t.Fragment,{children:[M.slice(0,6).map((U,G)=>t.jsx("span",{className:`dchip ${G===0?"made":""}`,title:G===0?"Made this decision":"Its design followed it",children:U},U)),F.slice(0,Math.max(0,6-M.length)).map(U=>t.jsx("span",{className:"dchip ahead",title:"Designed, not built yet: will follow it",children:U.id},U.id)),J>0&&t.jsxs("span",{className:"dchip",children:["+",J]})]})})]},I.id)})]})})}const Zh=30,iz=26,rc=250,az=62;function oz({decisions:e,areas:n,shown:s,related:r,picked:a,onPick:o,g:c}){const[u,d]=C.useState(1e3),p=C.useRef(null);C.useEffect(()=>{const T=p.current;if(!T)return;const _=new ResizeObserver(()=>d(T.clientWidth));return _.observe(T),()=>_.disconnect()},[]);const f=c.cols.length,m=Math.max(40,Math.min(64,(u-rc-24)/Math.max(1,f))),y=c.rows.filter(T=>n.size===0||n.has(T.area)),x=new Map;let v=az+8,k="";const N=[];for(const T of y)T.area!==k&&(k=T.area,v+=iz,N.push({area:T.area,y:v-18})),x.set(T.d.id,v),v+=Zh;const w=v+12,S=rc+f*m+16,E=T=>rc+T*m+m/2,P=T=>T<s,B=T=>r!==null&&!r.has(T);return t.jsx("div",{className:"arch-graph",ref:p,children:t.jsxs("svg",{width:S,height:w,role:"img","aria-label":"Decisions over time, and the tickets that followed them",children:[c.cols.map((T,_)=>t.jsxs("g",{className:`col state-${T.t?.state??"scan"} ${P(_)?"":"later"} ${B(T.key)?"dim":""}`,onClick:()=>T.t&&o({kind:"ticket",id:T.key}),children:[t.jsx("rect",{className:"colbg",x:rc+_*m+2,y:6,width:m-4,height:w-12,rx:10}),t.jsx("text",{className:"colid",x:E(_),y:26,textAnchor:"middle",children:T.label}),t.jsx("circle",{className:"colstate",cx:E(_),cy:42,r:4}),t.jsx("title",{children:T.t?`${T.t.id} · ${T.t.title}
|
|
629
|
+
${Yp[T.t.state]}`:"What the Architect found when it first read the project"})]},T.key)),N.map(T=>t.jsx("text",{className:`lane area-${T.area.toLowerCase()}`,x:14,y:T.y,children:T.area.toUpperCase()},T.area)),y.map(T=>{const _=x.get(T.d.id),I=c.colOf(T.d.from);if(!P(I))return null;const D=T.d.replacedBy?c.colOf(l3(e,T.d.replacedBy)):f-1,R=Math.min(D,s-1),F=`track area-${T.area.toLowerCase()} ${B(T.d.id)?"dim":""} ${a===T.d.id?"picked":""}`;return t.jsxs("g",{className:F,onClick:()=>o({kind:"adr",id:T.d.id}),children:[t.jsx("rect",{className:"hit",x:0,y:_-Zh/2,width:S,height:Zh}),t.jsxs("text",{className:"name",x:14,y:_+4,children:[t.jsx("tspan",{className:"rid",children:T.d.id})," ",fz(T.d.title,28)]}),t.jsx("line",{className:`rail ${T.d.replacedBy&&D<s?"gone":""}`,x1:E(I),x2:E(R)+(T.d.replacedBy?0:m/2),y1:_,y2:_}),c.cols.map((M,J)=>J>I&&P(J)&&M.t?.follows.includes(T.d.id)?t.jsx("circle",{className:`dot ${M.t.state==="designed"||M.t.state==="coming"?"open":""}`,cx:E(J),cy:_,r:5,children:t.jsx("title",{children:`${M.t.id} followed ${T.d.id}`})},M.key):null),t.jsx("circle",{className:`node ${T.d.replacedBy?"old":""}`,cx:E(I),cy:_,r:8}),T.d.checkedBy?.passing&&t.jsx("path",{className:"tick",d:`M${E(I)-3.5} ${_} l2.5 2.6 l4.8 -5`}),t.jsx("title",{children:`${T.d.id} · ${T.d.title}
|
|
630
|
+
Chosen: ${T.d.chosen}`})]},T.d.id)}),y.flatMap(T=>{const _=x.get(T.d.id),I=c.colOf(T.d.from);return P(I)?[...(T.d.buildsOn??[]).map(R=>({b:R,kind:"built"})),...T.d.replaces?[{b:T.d.replaces,kind:"replaces"}]:[]].map(({b:R,kind:F})=>{const M=x.get(R);if(M===void 0)return null;const J=_>M?1:-1;return t.jsxs("g",{className:`link ${F} ${B(T.d.id)||B(R)?"dim":""}`,children:[t.jsx("path",{d:`M${E(I)} ${M+6*J} L${E(I)} ${_-9*J}`}),t.jsx("circle",{cx:E(I),cy:M,r:3.2})]},`${T.d.id}-${R}-${F}`)}):[]})]})})}function lz({decisions:e,tickets:n,onPick:s}){return t.jsxs("div",{className:"arch-cards",children:[t.jsxs("div",{className:"arch-card",children:[t.jsx("h4",{children:"What a new ticket inherits today"}),t.jsx("p",{className:"note",children:"The Architect, the Builder and the Reviewer read all of these before they start."}),[...fu,"Other"].map(r=>{const a=e.filter(o=>!o.replacedBy&&(o.area??"Other")===r);return a.length?t.jsxs("div",{className:`inherit area-${r.toLowerCase()}`,children:[t.jsxs("b",{children:[t.jsx("i",{})," ",r]}),a.map(o=>t.jsxs("button",{onClick:()=>s({kind:"adr",id:o.id}),children:[t.jsx("span",{className:"mono",children:o.id})," ",o.title]},o.id))]},r):null})]}),t.jsxs("div",{className:"arch-card",children:[t.jsx("h4",{children:"Coming next"}),t.jsx("p",{className:"note",children:"Tickets not built yet, and the past decisions that will shape them."}),n.filter(r=>r.state==="designed"||r.state==="coming").map(r=>t.jsxs("div",{className:"coming",children:[t.jsxs("button",{onClick:()=>s({kind:"ticket",id:r.id}),children:[t.jsx("span",{className:"mono",children:r.id})," ",r.title]}),t.jsx("span",{className:"pills",children:r.follows.length?r.follows.map(a=>t.jsx("button",{className:"pill click",onClick:()=>s({kind:"adr",id:a}),children:a},a)):t.jsxs("span",{className:"note",children:["Not designed yet. Will read the ",e.filter(a=>!a.replacedBy).length," rules in force."]})})]},r.id))]})]})}function cz({decisions:e,picked:n,onPick:s}){return t.jsxs("table",{className:"table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{width:90},children:"ID"}),t.jsx("th",{children:"Decision"}),t.jsx("th",{style:{width:110},children:"Area"}),t.jsx("th",{style:{width:120},children:"From"}),t.jsx("th",{style:{width:150},children:"Checked by"})]})}),t.jsx("tbody",{children:[...e].reverse().map(r=>t.jsxs("tr",{className:`click ${n===r.id?"on":""}`,onClick:()=>s({kind:"adr",id:r.id}),children:[t.jsx("td",{className:"mono",children:r.id}),t.jsxs("td",{style:{fontWeight:n===r.id?600:500,color:r.replacedBy?"var(--dim)":void 0},children:[r.replacedBy?t.jsx("s",{children:r.title}):r.title," ",r.replacedBy&&t.jsxs("span",{className:"pill wait",children:["Replaced by ",r.replacedBy]})]}),t.jsx("td",{children:t.jsxs("span",{className:`areatag area-${(r.area??"Other").toLowerCase()}`,children:[t.jsx("i",{})," ",r.area??"Other"]})}),t.jsx("td",{style:{color:"var(--muted)",fontSize:13},children:r.from}),t.jsx("td",{children:r.checkedBy?r.checkedBy.passing?t.jsxs("span",{className:"pill ok",children:[t.jsx(xe,{size:13,strokeWidth:2.5})," A ",r.checkedBy.kind]}):t.jsx("span",{className:"pill you",children:"Test being written"}):t.jsx("span",{className:"pill wait",children:"Not checkable"})})]},r.id))})]})}function uz({pick:e,decisions:n,tickets:s,impact:r,onPick:a}){const o=m=>t.jsx("button",{className:"pill click",onClick:()=>a({kind:"adr",id:m}),children:m},m),c=m=>{const y=s.find(x=>x.id===m);return t.jsx("button",{className:`pill click st-${y?.state??"shipped"}`,title:y?`${y.title} · ${Yp[y.state]}`:m,onClick:()=>a({kind:"ticket",id:m}),children:m},m)};if(e?.kind==="ticket"){const m=s.find(y=>y.id===e.id);return m?t.jsxs("aside",{className:"sidepanel arch-side",children:[t.jsxs("span",{className:"note mono",children:[m.id," · ",Yp[m.state],m.release?` · ${m.release}`:""]}),t.jsx("h3",{children:m.title}),t.jsx("div",{className:"lbl",children:"Decision it made"}),m.made?t.jsxs("p",{style:{fontSize:13.5},children:[o(m.made)," ",n.find(y=>y.id===m.made)?.title]}):t.jsx("p",{className:"note",children:"None. It worked inside the rules it had."}),t.jsx("div",{className:"lbl",children:"Past decisions its design followed"}),m.follows.length?t.jsx("div",{className:"pills",children:m.follows.map(o)}):t.jsx("p",{className:"note",children:m.state==="coming"?"Not designed yet. When it is, it reads every rule in force.":"None recorded."}),t.jsx("p",{style:{marginTop:18},children:t.jsx($e,{to:"/board",search:{ticket:m.id},className:"btn",children:"Open the ticket"})})]}):t.jsx("aside",{className:"sidepanel arch-side",children:t.jsx("p",{className:"note",children:"That ticket is not on this board."})})}const u=e?.kind==="adr"?n.find(m=>m.id===e.id):void 0;if(!u)return t.jsxs("aside",{className:"sidepanel arch-side",children:[t.jsx("span",{className:"note mono",children:"HOW IT WORKS"}),t.jsx("h3",{children:"Every choice is remembered"}),t.jsx("p",{style:{fontSize:13.5,marginTop:8},children:"When a ticket needs a technical choice, the Architect writes it with the options and the why. You approve it with the design. From then on it is a rule: every later ticket reads it, and the tickets whose design used it are linked here."}),t.jsx("p",{style:{fontSize:13.5,marginTop:10},children:"A new decision can build on an older one, or replace it. A replaced decision stops being a rule, but its history stays."}),t.jsx("p",{className:"note",style:{marginTop:14},children:"Point at a decision to light up what it touched. Click it for the full story. Press Play to watch the project grow."})]});const d=n.filter(m=>m.buildsOn?.includes(u.id)),p=u.tickets.filter(m=>m!==u.from),f=s.filter(m=>(m.state==="designed"||m.state==="coming")&&m.follows.includes(u.id)&&!p.includes(m.id));return t.jsxs("aside",{className:"sidepanel arch-side",children:[t.jsxs("span",{className:"note mono",children:[u.id," · ",u.area??"Other"," · ",u.proposed?"found in the code, not approved yet":`approved by ${u.approvedBy}`," · ",Ts(u.date)]}),t.jsx("h3",{children:u.title}),u.proposed&&t.jsxs("div",{className:"box",style:{borderColor:"var(--you-line)",background:"var(--you-soft)",marginTop:8},children:[t.jsx("b",{children:"Proposed, not a rule yet."})," It becomes one when you approve the ",t.jsx($e,{to:"/overview",children:"Overview"}),"."]}),u.replacedBy&&t.jsxs("div",{className:"box",style:{borderColor:"var(--you-line)",background:"var(--you-soft)",marginTop:8},children:[t.jsx("b",{children:"No longer a rule."})," Replaced by ",o(u.replacedBy),"."]}),t.jsx("div",{className:"lbl",children:"Chosen"}),t.jsx("p",{style:{fontSize:13.5,fontWeight:600},children:u.chosen}),t.jsx("div",{className:"lbl",children:"Why"}),t.jsx("p",{style:{fontSize:13.5},children:u.why}),u.options.length>1&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Also looked at"}),u.options.filter(m=>m!==u.chosen).map(m=>t.jsx("p",{className:"note",style:{fontSize:13},children:m},m))]}),t.jsx("div",{className:"lbl",children:"Where it came from"}),t.jsxs("div",{className:"pills",style:{alignItems:"center"},children:[u.from==="Project scan"?t.jsx("span",{className:"pill",children:"Project scan"}):c(u.from),(u.buildsOn??[]).length>0&&t.jsx("span",{className:"note",children:"built on"}),(u.buildsOn??[]).map(o),u.replaces&&t.jsx("span",{className:"note",children:"replaces"}),u.replaces&&o(u.replaces)]}),t.jsx("div",{className:"lbl",children:"What it shaped"}),p.length||d.length?t.jsxs(t.Fragment,{children:[p.length>0&&t.jsx("p",{className:"note",style:{marginBottom:6},children:"Tickets whose design followed it"}),t.jsx("div",{className:"pills",children:p.map(c)}),d.length>0&&t.jsx("p",{className:"note",style:{margin:"10px 0 6px"},children:"Decisions built on it"}),t.jsx("div",{className:"pills",children:d.map(m=>o(m.id))})]}):t.jsx("p",{className:"note",children:"Nothing yet. Every new ticket reads it."}),f.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Still ahead"}),t.jsx("p",{className:"note",style:{marginBottom:6},children:"Designed, not built yet. They will follow it."}),t.jsx("div",{className:"pills",children:f.map(m=>c(m.id))})]}),t.jsx(dz,{d:u,check:r.find(m=>m.adr===u.id),tk:c}),t.jsx("div",{className:"lbl",children:"Checked by"}),u.checkedBy?t.jsxs("div",{className:"box",children:[t.jsx("b",{style:{color:u.checkedBy.passing?"var(--accent)":"var(--you-ink)"},children:u.checkedBy.passing?"Passing":"Being written"})," ",t.jsx("span",{className:"mono",style:{fontSize:12},children:u.checkedBy.name}),t.jsx("p",{className:"note",style:{marginTop:4},children:"If someone breaks this decision, the checks fail and nothing ships."})]}):t.jsx("p",{className:"note",children:"A fact about the project, nothing to test."})]})}function dz({d:e,check:n,tk:s}){const r=fe();if(e.replacedBy)return null;const a=n?.status==="pending"||n?.status==="running"||r.isPending,o=()=>r.mutate({path:"/api/v1/architecture/impact",body:{adr:e.id},done:`The Architect is checking the open tickets against ${e.id}.`});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"lbl",children:"Tickets planned before it"}),a?t.jsxs("p",{className:"note",style:{display:"flex",gap:8,alignItems:"center"},children:[t.jsx(gn,{size:13,className:"spin"})," The Architect is checking the open tickets."]}):n?.status==="done"?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",style:{marginBottom:6},children:n.checked?.length?`Checked ${n.checked.length} open ${n.checked.length===1?"ticket":"tickets"} ${n.at?Zt(n.at):""}. ${n.affected?.length?"These need a change, waiting for you:":"None need a change."}`:"No open ticket was planned before it."}),t.jsx("div",{className:"pills",children:(n.affected??[]).map(s)}),t.jsx("button",{className:"btn sm quiet",style:{marginTop:8},onClick:o,children:"Check again"})]}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note",style:{marginBottom:8},children:n?.status==="failed"?`The last check stopped: ${n.error??""}`:"Not checked yet. Plans written before it may still do it the old way."}),t.jsx("button",{className:"btn sm",onClick:o,children:"Check open tickets"})]})]})}function hz(e,n){const s=[];e.some(c=>!n.some(u=>u.id===c.from))&&s.push({key:"scan",label:"Scan"});for(const c of n)s.push({key:c.id,label:c.id,t:c});const r=c=>{const u=s.findIndex(d=>d.key===c);return u<0?0:u},a=[...fu,"Other"],o=e.map(c=>({d:c,area:c.area??"Other"})).sort((c,u)=>a.indexOf(c.area)-a.indexOf(u.area)||r(c.d.from)-r(u.d.from));return{cols:s,rows:o,colOf:r}}function l3(e,n){return e.find(s=>s.id===n)?.from??""}function pz(e,n,s){if(!e)return null;const r=new Set([e.id]),a=u=>[...u.buildsOn??[],...u.replaces?[u.replaces]:[]];if(e.kind==="ticket"){const u=s.find(d=>d.id===e.id);for(const d of u?.follows??[])r.add(d);return u?.made&&r.add(u.made),r}const o=[e.id];for(;o.length;){const u=o.pop(),d=n.find(p=>p.id===u);for(const p of d?a(d):[])r.has(p)||(r.add(p),o.push(p))}const c=[e.id];for(;c.length;){const u=c.pop();for(const d of n)a(d).includes(u)&&!r.has(d.id)&&(r.add(d.id),c.push(d.id))}for(const u of[...r]){const d=n.find(p=>p.id===u);if(d&&u===e.id)for(const p of d.tickets)r.add(p);d&&r.add(d.from)}for(const u of s)u.follows.includes(e.id)&&r.add(u.id);return r}function fz(e,n){return e.length>n?`${e.slice(0,n-1).trimEnd()}…`:e}function Fy(e){return Number(e.replace(/\D/g,""))||0}function ym(){return Pe({queryKey:["sandbox"],queryFn:()=>Ee("/api/v1/sandbox")})}function mz(){const e=ym(),n=e.data?.note;return t.jsxs(t.Fragment,{children:[n&&t.jsxs("div",{className:"toolrow",children:[t.jsx("span",{className:"logo",children:t.jsx(X2,{size:18})}),t.jsxs("span",{style:{minWidth:0},children:[t.jsx("b",{children:n.title}),t.jsx("br",{}),t.jsx("span",{className:"note",children:n.text})]}),t.jsx("span",{className:"pill wait",children:"Less protected"})]}),(e.data?.tools??[]).map(s=>t.jsxs("div",{className:"toolrow",children:[t.jsx("span",{className:"logo",children:s.available?t.jsx(Zg,{size:18}):t.jsx(Xg,{size:18})}),t.jsxs("span",{style:{minWidth:0},children:[t.jsx("b",{children:"Sandbox for the Builder and Tester"}),t.jsx("br",{}),s.available?t.jsxs("span",{className:"note",children:["Their commands run in ",s.why,": they write only in the ticket's copy, the proof folder and temp folders, reach only package registries and the websites you allow in Settings, and never read your keys, sign-ins or .env files. Packages for .NET, Java and Ruby go into the ticket's own download folder, never into your own caches; it goes when the ticket is released or deleted, so a ticket's first build downloads them again."]}):t.jsxs("span",{className:"note",children:["Not available on this computer: ",s.why,". The Builder and Tester run as before, kept in their lane by squad-kit's own checks.",s.fix?` To turn it on: ${s.fix}.`:""]})]}),t.jsx("span",{className:`pill ${s.available?"ok":"wait"}`,children:s.available?"On":"Not available"})]},s.tool)),e.data?.guard&&t.jsxs("div",{className:"toolrow",children:[t.jsx("span",{className:"logo",children:e.data.guard.on?t.jsx(Zg,{size:18}):t.jsx(Xg,{size:18})}),t.jsxs("span",{style:{minWidth:0},children:[t.jsx("b",{children:"Guard for the project's own commands"}),t.jsx("br",{}),e.data.guard.on?t.jsxs("span",{className:"note",children:["The project's own tests, setup and app run in ",e.data.guard.why,": they work normally and can reach the internet for packages and tests, but they cannot read your keys, sign-ins, squad-kit's own folder or the project's .env files. An engineer can allow a file they truly need in Settings."]}):t.jsxs("span",{className:"note",children:["Not available on this computer: ",e.data.guard.why,". The project's tests, setup and app run as before.",e.data.guard.fix?` To turn it on: ${e.data.guard.fix}.`:""]})]}),t.jsx("span",{className:`pill ${e.data.guard.on?"ok":"wait"}`,children:e.data.guard.on?"On":"Not available"})]}),e.data&&e.data.tools.some(s=>!s.available)&&t.jsx("div",{style:{marginTop:8},children:t.jsx(ie,{text:"squad doctor"})})]})}function gz({hosts:e}){const n=fe(),s=ym(),[r,a]=C.useState(""),o=(p,f)=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{allowedHosts:p},done:f},{onSuccess:()=>a("")}),c=()=>{const p=r.trim();p&&o([...e,p],`The squad may reach ${p} from its next step`)},u=s.data?.tools.length?s.data.tools.every(p=>!p.available):!1,d=s.data?.note;return t.jsxs(t.Fragment,{children:[d&&t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:d.title}),t.jsx("span",{className:"note",children:d.text})]}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{style:{paddingTop:4},children:"Websites the squad may reach"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:8,minWidth:0},children:[t.jsxs("span",{className:"note",children:["The Builder and Tester can download packages from npm, PyPI, Maven and the other package registries, and nothing else. Allow a website here when the project needs one, for example your company's package server. The whole team shares this list.",u?" This computer has no sandbox, so here they can reach any website.":""]}),e.length>0&&t.jsx("span",{className:"pills",children:e.map(p=>t.jsxs("span",{className:"pill mono",children:[p,t.jsx("button",{className:"linkbtn","aria-label":`Stop allowing ${p}`,title:`Stop allowing ${p}`,disabled:n.isPending,onClick:()=>o(e.filter(f=>f!==p),`The squad no longer reaches ${p}`),children:t.jsx(Ze,{size:12})})]},p))}),t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("input",{className:"input mono",style:{fontSize:13,flex:"1 1 200px",minWidth:0},value:r,placeholder:"packages.example.com","aria-label":"A website to allow",onChange:p=>a(p.target.value),onKeyDown:p=>p.key==="Enter"&&c()}),t.jsx("button",{className:"btn sm",disabled:!r.trim()||n.isPending,onClick:c,children:"Allow"})]}),t.jsx(ie,{text:`squad config set hosts ${[...e,r.trim()].filter(Boolean).join(" ")||"nexus.example.com"}`})]})]}),t.jsx(xz,{})]})}function xz(){const e=fe(),s=ym().data?.guard,[r,a]=C.useState(""),[o,c]=C.useState("");if(!s?.on)return null;const u=(p,f,m)=>e.mutate({path:"/api/v1/settings",method:"PUT",body:{guard:{allowRead:s.allowRead,allowWrite:s.allowWrite,...p}},done:f},{onSuccess:m}),d=(p,f,m,y)=>{const x=p==="read"?"allowRead":"allowWrite",v=()=>m.trim()&&u({[x]:[...f,m.trim()]},`The project's commands may ${p} ${m.trim()}`,()=>y("")),k=N=>u({[x]:f.filter(w=>w!==N)},`No longer allowed to ${p} ${N}`,()=>{});return t.jsxs("div",{className:"maprow",children:[t.jsx("b",{style:{paddingTop:4},children:p==="read"?"Also read":"Also write"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:8,minWidth:0},children:[t.jsxs("span",{className:"note",children:[p==="read"?"Files or folders the project needs to read":"Folders the project needs to write in"," outside its copy, such as"," ",t.jsx("span",{className:"mono",children:"~/shared"}),". Add one only when a check stopped because squad-kit blocked a file the project truly needs."]}),f.length>0&&t.jsx("span",{className:"pills",children:f.map(N=>t.jsxs("span",{className:"pill mono",children:[N,t.jsx("button",{className:"linkbtn","aria-label":`Stop allowing ${N}`,title:`Stop allowing ${N}`,disabled:e.isPending,onClick:()=>k(N),children:t.jsx(Ze,{size:12})})]},N))}),t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("input",{className:"input mono",style:{fontSize:13,flex:"1 1 200px",minWidth:0},value:m,placeholder:"~/shared","aria-label":`A path to ${p}`,onChange:N=>y(N.target.value),onKeyDown:N=>N.key==="Enter"&&v()}),t.jsx("button",{className:"btn sm",disabled:!m.trim()||e.isPending,onClick:v,children:"Allow"})]}),t.jsx(ie,{text:`squad config set allow-${p} ${[...f,m.trim()].filter(Boolean).join(" ")||"~/shared"}`})]})]})};return t.jsxs(t.Fragment,{children:[d("read",s.allowRead,r,a),d("write",s.allowWrite,o,c)]})}function yz(){const e=Ye(),n=e.data?.ready?e.data.tickets.filter(Co):[],s=du();return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Waiting for you"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad inbox"})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"page",children:n.length+s.length===0?t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(xe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx("b",{children:"Nothing needs you right now"}),t.jsx("span",{children:"The squad is working. Questions, plans, proof and decisions land here."})]})]}):t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[s.map(r=>t.jsx(jj,{w:r},r.id)),n.map(r=>t.jsxs("div",{className:"wcard",style:{padding:"16px 18px 16px 22px"},children:[t.jsxs("div",{className:"grow",children:[t.jsxs("div",{className:"meta",children:[t.jsx("span",{className:"id",children:r.id}),t.jsx(bj,{t:r}),t.jsx("span",{children:$s[r.stage]}),t.jsx("span",{children:Zt(r.activity[0]?.at??r.createdAt)})]}),t.jsx("h3",{children:r.title}),t.jsx("p",{children:Zf(r)&&r.agentQuestion?`“${r.agentQuestion.text}”`:r.waiting?.summary??(Ss(r)?`Change ${Ur(r).id} to the spec waits for you`:as(r)?mf(r):r.outdated?.length?pf(r):`Looks stuck: ${r.quiet?.detail??"no progress"}`)})]}),t.jsx(ie,{text:!r.waiting&&Ss(r)?`squad propose ${r.id} --approve`:!r.waiting&&as(r)?`squad test-command ${r.id} --use`:hf(r)}),r.waiting?.kind==="proof"?t.jsx($e,{to:"/tickets/$id/proof",params:{id:r.id},className:"btn pri sm",children:Cc(r)}):t.jsx($e,{to:"/board",search:{ticket:r.id},className:"btn pri sm",children:r.waiting?Cc(r):Ss(r)?"Check the change":"Check it"})]},r.id))]})})})]})}function kz(){const e=Ye(),[n,s]=C.useState(!1),r=e.data?.ready?e.data.tickets.filter(a=>a.kind==="bug"):[];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Bugs"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:'squad bug "What happened"'}),t.jsxs("button",{className:"btn pri",onClick:()=>s(!0),children:[t.jsx(Cs,{size:15})," Report a bug"]})]}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page",children:[t.jsx("p",{className:"note",style:{marginBottom:12},children:"Each bug is a ticket linked to the release it was found in. It goes around the same loop, and the Tester adds a check so it can't come back."}),r.length===0?t.jsx("p",{className:"note",children:"No open bugs."}):t.jsxs("table",{className:"table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{width:90},children:"ID"}),t.jsx("th",{children:"What happened"}),t.jsx("th",{style:{width:120},children:"Found in"}),t.jsx("th",{style:{width:120},children:"Stage"}),t.jsx("th",{style:{width:240},children:"Now"})]})}),t.jsx("tbody",{children:r.map(a=>t.jsxs("tr",{children:[t.jsx("td",{className:"mono",children:a.id}),t.jsx("td",{children:t.jsx($e,{to:"/board",search:{ticket:a.id},style:{fontWeight:600},children:a.title})}),t.jsx("td",{children:a.foundIn??""}),t.jsx("td",{children:$s[a.stage]}),t.jsx("td",{style:{color:a.waiting?"var(--you-ink)":"var(--muted)"},children:a.waiting?.summary??a.status})]},a.id))})]})]})}),n&&t.jsx(Kf,{onClose:()=>s(!1)})]})}const vz={claude:"Claude Code",codex:"Codex"};function jz(){const e=Ye(),n=ok(),s=e.data?.ready?e.data.meta:void 0,r=Pe({queryKey:["agents"],queryFn:()=>Ee("/api/v1/agents"),refetchInterval:2e3}),[a,o]=C.useState(null);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"top",children:t.jsx("h1",{children:"Squad and AI"})}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page",style:{maxWidth:900},children:[t.jsx("h2",{children:"The squad"}),t.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit is the lead. Each role is its own agent with its own session and tools, and the Reviewer always starts fresh, so every change gets a real second opinion. Strong models where a mistake is expensive, cheaper ones where the work is already clear. Edit an agent to give it house rules or change its models."}),t.jsx(bz,{}),t.jsx(aR,{}),t.jsx("div",{style:{marginTop:10},children:(r.data??[]).map(c=>t.jsxs("div",{className:"maprow",style:{gridTemplateColumns:"34px 120px 1fr 250px 70px",alignItems:"center"},children:[t.jsx(Br,{role:c.role}),t.jsx("b",{children:c.name}),t.jsxs("span",{style:{fontSize:13},children:[t.jsx("span",{className:"note",children:c.job}),c.working.length>0&&t.jsx("span",{style:{display:"block",marginTop:3},children:c.working.map(u=>t.jsxs($e,{to:"/board",search:{ticket:u.id},style:{display:"block",color:"var(--accent)"},children:[t.jsx("b",{className:"mono",children:u.id})," ",u.status]},u.id))})]}),t.jsxs("span",{className:"pills",children:[t.jsx("span",{className:"pill",children:vz[c.tool]}),(()=>{const u=c.stepList.find(p=>p.id==="design")??c.stepList[0],d=c.levels?.find(p=>p.step===u?.id)?.now;return d?t.jsxs("span",{className:`pill ${d.from==="squad-kit"?"wait":""}`,title:`${u?.name}: ${c3(d)}`,children:[d.modelName||d.level,d.effort&&c.supportsEffort?` · ${Va[d.effort]}`:""]}):null})(),kk(c.instructions).trim()&&t.jsx("span",{className:"pill ok",children:"House rules"})]}),t.jsx("button",{className:"btn sm",onClick:()=>o(c),children:"Edit"})]},c.role))}),t.jsxs("div",{className:"maprow",style:{marginTop:4},children:[t.jsx("b",{children:"Tickets at once"}),t.jsxs("span",{className:"note",children:["Up to ",n.data?.parallel??s?.parallel??2,", shared by all your projects. Change it in Settings."]})]}),t.jsx(eR,{}),t.jsx("h2",{style:{marginTop:30},children:"Your AI tools"}),t.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit uses the logins you already have. Nothing new to buy."}),(s?.tools??[]).map(c=>t.jsxs("div",{className:"toolrow",children:[t.jsx("span",{className:"logo",children:t.jsx(Sc,{size:18})}),t.jsxs("span",{children:[t.jsx("b",{children:c.name}),t.jsx("br",{}),t.jsx("span",{className:"note",children:c.name==="Codex"?"Your ChatGPT subscription":"Your Claude subscription"})]}),t.jsx("span",{className:`pill ${c.ready?"ok":"wait"}`,children:c.ready?"Ready":"Not found"})]},c.name)),t.jsx(mz,{}),t.jsxs("div",{className:"toolrow off",children:[t.jsx("span",{className:"logo",children:t.jsx(Sc,{size:18})}),t.jsxs("span",{children:[t.jsx("b",{children:"Gemini CLI, Copilot CLI, Cursor"}),t.jsx("br",{}),t.jsx("span",{className:"note",children:"Coming next"})]}),t.jsx("span",{})]})]})}),a&&t.jsx(wz,{agent:a,onClose:()=>o(null)})]})}const Ly=[{id:"best",name:"Best",note:"The strongest model builds and reviews. Uses your plan's limits faster."},{id:"balanced",name:"Balanced",note:"The strongest model at medium effort."},{id:"thrifty",name:"Thrifty",note:"A lighter model builds. Cheapest."}];function bz(){const e=Ye(),n=fe(),s=e.data?.ready?e.data.meta:void 0;if(!s)return null;const r=s.quality??"best";return t.jsxs("div",{className:"maprow",style:{marginTop:6},children:[t.jsx("b",{style:{paddingTop:4},children:"Quality"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6,minWidth:0},children:[t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Ly.map(a=>t.jsx("button",{className:`btn sm ${a.id===r?"pri":""}`,"aria-pressed":a.id===r,onClick:()=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{quality:a.id},done:`Quality is ${a.name} now. The squad uses it from its next step.`}),children:a.name},a.id)),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad config set quality ${r}`})]}),Ly.map(a=>t.jsxs("span",{className:"note",style:{fontSize:12.5,...a.id===r?{color:"var(--text)"}:{}},children:[t.jsxs("b",{children:[a.name,":"]})," ",a.note]},a.id))]})]})}function wz({agent:e,onClose:n}){const s=fe(),r=P=>kk(P??"").trim(),[a,o]=C.useState(e.tool),[c,u]=C.useState(e.model),[d,p]=C.useState(e.youRole?.model??""),[f,m]=C.useState(()=>Object.fromEntries(e.levels.map(P=>[P.step,P.team??{}]))),[y,x]=C.useState(()=>Object.fromEntries(e.levels.map(P=>[P.step,P.you??{}]))),[v,k]=C.useState(r(e.instructions)),[N,w]=C.useState(()=>Object.fromEntries(e.stepList.map(P=>[P.id,r(e.steps?.[P.id])]))),S=Pe({queryKey:["core-prompts",e.role],queryFn:()=>Ee(`/api/v1/agents/${e.role}/prompts`)}),E=async()=>{const P=(T,_)=>(T?.level??"")===(_.level??"")&&(T?.effort??"")===(_.effort??"");try{for(const T of e.levels)P(T.you,y[T.step])||await wt("/api/v1/me/levels","PUT",{key:`${e.role}.${T.step}`,...y[T.step]});(e.youRole?.model??"")!==d.trim()&&await wt("/api/v1/me/levels","PUT",{key:e.role,...e.youRole,model:d.trim()})}catch(T){return s.reset(),alert(T instanceof Error?T.message:String(T))}const B={};(e.teamRole?.level||e.teamRole?.effort)&&(B[e.role]={level:e.teamRole.level,effort:e.teamRole.effort});for(const[T,_]of Object.entries(f))(_.level||_.effort)&&(B[`${e.role}.${T}`]=_);s.mutate({path:`/api/v1/agents/${e.role}`,method:"PUT",body:{tool:a,model:c,instructions:v,steps:N,levels:B},done:`${e.name} saved. It uses this from its next step.`},{onSuccess:n})};return t.jsxs(We,{title:`Edit the ${e.name}`,wide:!0,onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:s.isPending,onClick:E,children:"Save"}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx("span",{className:"note mono",style:{fontSize:12},children:e.file})]}),children:[t.jsxs("p",{className:"note",style:{marginTop:0},children:[e.job,"."]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"AI tool"}),t.jsxs("select",{className:"input",value:a,onChange:P=>o(P.target.value),children:[t.jsx("option",{value:"claude",children:"Claude Code"}),t.jsx("option",{value:"codex",disabled:!0,children:"Codex (coming soon)"})]})]}),t.jsx(Sz,{agent:e,team:f,setTeam:m,you:y,setYou:x}),t.jsxs("details",{style:{marginTop:8},children:[t.jsx("summary",{className:"note",children:"Pin exact models (advanced)"}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"For the team"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:c,placeholder:"Empty: use the levels above",onChange:P=>u(P.target.value)})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Just for me"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:d,placeholder:"Empty: use the levels above",onChange:P=>p(P.target.value)})]}),t.jsx("p",{className:"note",style:{fontSize:12.5},children:"A pinned model wins over every level. Levels are better for the team: they work whatever AI tool each person uses."})]}),t.jsxs("div",{style:{marginTop:12},children:[t.jsx("b",{style:{display:"block",marginBottom:6},children:"House rules for every step"}),t.jsx("textarea",{className:"input",rows:4,style:{width:"100%",resize:"vertical"},value:v,placeholder:`Extra instructions the ${e.name} reads in every step, in plain words.`,onChange:P=>k(P.target.value)})]}),t.jsxs("p",{className:"note",style:{fontSize:12.5},children:["Each step has a core prompt that squad-kit keeps and improves with every release. Your instructions are added to it, never instead of it.",S.data&&` The prompts below are filled in from ${S.data.ticket.id} "${S.data.ticket.title}".`]}),e.stepList.map(P=>{const B=S.data?.prompts.find(T=>T.step===P.id);return t.jsxs("div",{className:"agentstep",children:[t.jsx("b",{children:P.name}),t.jsx("textarea",{className:"input",rows:2,style:{width:"100%",resize:"vertical"},value:N[P.id]??"",placeholder:`Only for the ${P.name} step. For example: ${Cz[P.id]??"keep it short"}.`,onChange:T=>w({...N,[P.id]:T.target.value})}),t.jsxs("details",{children:[t.jsxs("summary",{children:["Core prompt for ",P.name,", read only"]}),t.jsx("pre",{className:"coreprompt",children:B?B.prompt:S.isLoading?"Loading…":"Not available."})]})]},P.id)})]})}function c3(e){const n=e.from==="project"?"set by the team":e.from==="you"?"set by you":"squad-kit's default";return`${e.modelName||e.level} (${e.model?"pinned":e.level}${e.effort?`, ${Va[e.effort]} effort`:""}), ${n}${e.why?`, ${e.why}`:""}`}const Nz={strongest:"Strongest",balanced:"Balanced",fast:"Fast"},Va={xhigh:"extra high",high:"high",medium:"medium",low:"low"};function _y({value:e,onChange:n,below:s,agent:r}){return t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:4,minWidth:0},children:[t.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.level??"",onChange:a=>n({...e,level:a.target.value||void 0}),"aria-label":"Level",children:[t.jsxs("option",{value:"",children:["Default",s.level?` (${s.level})`:""]}),["strongest","balanced","fast"].map(a=>t.jsxs("option",{value:a,children:[Nz[a],r.modelOf[a]?` · ${r.modelOf[a]}`:""]},a))]}),r.supportsEffort&&t.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.effort??"",onChange:a=>n({...e,effort:a.target.value||void 0}),"aria-label":"Effort",children:[t.jsxs("option",{value:"",children:["Default",s.effort?` (${Va[s.effort]} effort)`:""]}),r.efforts.map(a=>t.jsxs("option",{value:a,children:[Va[a].charAt(0).toUpperCase(),Va[a].slice(1)," effort"]},a))]})]})}function Sz({agent:e,team:n,setTeam:s,you:r,setYou:a}){return t.jsxs("div",{style:{marginTop:12},children:[t.jsx("b",{style:{display:"block",marginBottom:2},children:"Models"}),t.jsx("p",{className:"note",style:{marginTop:0,fontSize:12.5},children:"squad-kit picks a level for each step from the Quality setting: strongest where a mistake is expensive, cheaper where the work is clear. Change it for the whole team, or just for you. After a failed try, the Builder moves up a level on its own."}),t.jsxs("div",{className:"levels",role:"table",children:[t.jsxs("div",{className:"levrow head",role:"row",children:[t.jsx("span",{children:"Step"}),t.jsx("span",{children:"For the team"}),t.jsx("span",{children:"Just for me"}),t.jsx("span",{children:"Now"})]}),e.levels.map(o=>t.jsxs("div",{className:"levrow",role:"row",children:[t.jsx("span",{children:o.name}),t.jsx(_y,{agent:e,value:n[o.step]??{},below:o.standard,onChange:c=>s({...n,[o.step]:c})}),t.jsx(_y,{agent:e,value:r[o.step]??{},below:{...o.standard,...n[o.step]??{}},onChange:c=>a({...r,[o.step]:c})}),t.jsx("span",{className:"note",style:{fontSize:12.5},children:c3(o.now)})]},o.step))]})]})}const Cz={questions:"always ask who will use it",spec:'write "done when" items a clerk can check by hand',scan:"the old /legacy folder is not used",design:"prefer the existing service layer over new packages",build:"use our logger, never console.log",fix:"never turn a failing test off",review:"check every query for missing tenant filters",proof:"take screenshots in Arabic too"},$z=[{key:"setup",label:"Set up",hint:"Installs what the project needs, e.g. npm install"},{key:"test",label:"Test",hint:"Runs the tests, e.g. npm test"},{key:"lint",label:"Lint",hint:"Checks code style, e.g. npm run lint"},{key:"build",label:"Build",hint:"Builds the project, e.g. npm run build"},{key:"start",label:"Start",hint:"Runs the app for screenshots, e.g. npm start"},{key:"url",label:"App address",hint:"Where the app opens, e.g. http://localhost:3000"},{key:"deploy",label:"Pipeline",hint:"Runs after a release, e.g. az pipelines run …"}];function Ez(){const e=Ye(),n=e.data?.ready?e.data.meta:void 0;if(!n)return null;const s=n.repos?.length?n.repos:[{path:".",base:n.git?.base??"main",remote:n.git?.remote??"",commands:n.commands??{}}],r=!!n.repos?.length;return t.jsxs(t.Fragment,{children:[t.jsx("h2",{style:{marginTop:6},children:"How the squad checks and runs this project"}),t.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:["The Architect filled these in when it read the project. squad-kit runs Test, Lint and Build itself before anything ships.",r&&" This workspace has several code repos; each ticket works in one of them."]}),s.map(a=>t.jsx(Tz,{repo:a,multi:r},a.path)),t.jsx(Fz,{})]})}function Tz({repo:e,multi:n}){const s=fe(),[r,a]=C.useState(null),[o,c]=C.useState(null),u=r??e.commands,d=o??{base:e.base,remote:e.remote},p=()=>{const f=n?{repos:[{path:e.path,...d,commands:u}]}:{commands:u,git:d};s.mutate({path:"/api/v1/settings",method:"PUT",body:f,done:"Settings saved"},{onSuccess:()=>{a(null),c(null)}})};return t.jsxs("div",{style:{marginBottom:24},children:[n&&t.jsxs("h3",{className:"mono",style:{fontSize:14,margin:"18px 0 2px"},children:[e.path,e.summary&&t.jsx("span",{className:"note",style:{fontFamily:"inherit",marginLeft:8},children:e.summary})]}),$z.map(f=>t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:f.label}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:u[f.key]??"",placeholder:f.hint,onChange:m=>a({...u,[f.key]:m.target.value})})]},f.key)),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Release branch"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:d.base,onChange:f=>c({...d,base:f.target.value})})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Push to"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:d.remote,placeholder:"origin (empty: no push)",onChange:f=>c({...d,remote:f.target.value})})]}),t.jsx("div",{style:{marginTop:12},children:t.jsxs("button",{className:"btn pri sm",disabled:!r&&!o,onClick:p,children:["Save",n?` ${e.path}`:""]})})]})}function Az(){const e=fe(),n=Pe({queryKey:["tracker"],queryFn:()=>Ee("/api/v1/tracker"),refetchInterval:6e4}),[s,r]=C.useState(null),a=n.data,o=s??{organization:a?.organization??"",project:a?.project??"",token:""},c=a?.type==="azure"&&a.user;return t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"Azure DevOps"}),t.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Stories and bugs come from Azure Boards. squad-kit moves them along as the squad works, opens a pull request for each finished ticket, and merges it when you release. Your token stays on this computer."}),a&&t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Status"}),t.jsx("span",{children:c?t.jsxs("span",{className:"pill ok",children:["Connected as ",a.user]}):a.type==="azure"?t.jsx("span",{className:"pill bug",children:a.error??(a.hasToken?"Not connected":"Needs a token")}):t.jsx("span",{className:"pill wait",children:"Not set up"})})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Organization"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:o.organization,placeholder:"e.g. momenysr",onChange:u=>r({...o,organization:u.target.value})})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Project"}),t.jsx("input",{className:"input mono",style:{fontSize:13},value:o.project,placeholder:"e.g. Mawid",onChange:u=>r({...o,project:u.target.value})})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Token"}),t.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:o.token,placeholder:a?.hasToken?"Saved. Paste a new one to replace it":"Personal access token from Azure DevOps",onChange:u=>r({...o,token:u.target.value})})]}),t.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[t.jsx("button",{className:"btn pri sm",disabled:!s||e.isPending,onClick:()=>e.mutate({path:"/api/v1/tracker",method:"PUT",body:o,done:"Azure DevOps is connected"},{onSuccess:()=>{r(null),n.refetch()}}),children:e.isPending?"Checking…":"Save and check"}),t.jsx("span",{className:"note",children:"Token scopes: Work Items and Code (read, write and manage)."}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad config set tracker"})]})]})}function Pz(){const e=fe(),n=Pe({queryKey:["speech"],queryFn:()=>Ee("/api/v1/speech")}),[s,r]=C.useState(""),a=n.data?.hasKey,o=(c,u)=>e.mutate({path:"/api/v1/speech",method:"PUT",body:c,done:u},{onSuccess:()=>{r(""),n.refetch()}});return t.jsxs("div",{style:{marginBottom:26},children:[t.jsx("h2",{style:{marginTop:6},children:"Speech to text"}),t.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Agents cannot listen. With a Munsit key, squad-kit writes out every voice and video note you attach, in Arabic or English, and takes pictures of the screen in videos. Without a key, notes stay attached but nobody hears them. Your key stays on this computer."}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Status"}),t.jsx("span",{children:a?t.jsx("span",{className:"pill ok",children:"Munsit is set up"}):t.jsx("span",{className:"pill wait",children:"Not set up"})})]}),t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Munsit key"}),t.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:s,placeholder:a?"Saved. Paste a new one to replace it":"API key from munsit.com",onChange:c=>r(c.target.value)})]}),t.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[t.jsx("button",{className:"btn pri sm",disabled:!s.trim()||e.isPending,onClick:()=>o({munsit:s},"Munsit is set up"),children:"Save"}),a&&t.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>o({remove:!0},"Munsit key removed"),children:"Remove"})]})]})}function Rz(){const{restarting:e,restart:n}=lk();return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Board"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:"btn sm",disabled:e,onClick:()=>void n(),children:e?"Restarting…":"Restart the board"}),t.jsx("span",{className:"note",children:"Same link. Running work picks up where it stopped."}),t.jsx(ie,{text:"squad console --restart"})]})]})}function Iz(){const e=Ye(),n=fe(),s=e.data?.ready?e.data.meta:void 0;if(!s)return null;const r=s.runner??"acp",a=(o,c)=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{runner:o},done:c});return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Talk to Claude"}),t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:`btn sm ${r==="acp"?"pri":""}`,onClick:()=>a("acp","The squad talks to Claude through ACP"),children:"Agent Client Protocol"}),t.jsx("button",{className:`btn sm ${r==="direct"?"pri":""}`,onClick:()=>a("direct","The squad runs Claude Code directly"),children:"Directly"}),t.jsx("span",{className:"note",style:{marginLeft:6},children:"ACP is the open standard for agents. If it cannot start, a step runs Claude Code directly."})]})]})}function zz(){const e=ok(),n=fe(),s=e.data;return s?t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Tickets at once"}),t.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Array.from({length:s.max},(r,a)=>a+1).map(r=>t.jsx("button",{className:`btn sm ${r===s.parallel?"pri":""}`,onClick:()=>n.mutate({path:"/api/v1/app/settings",method:"PUT",body:{parallel:r},done:`Up to ${r} tickets at once, across all your projects`}),children:r},r)),t.jsx("span",{className:"note",style:{marginLeft:6},children:"How many tickets the squads work on at the same time, across all your projects. They share your AI accounts."})]})]}):null}function Mz({on:e}){const n=fe();return t.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[t.jsx("b",{children:"Project documents in git"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:"/api/v1/settings",method:"PUT",body:{documentsInGit:!e},done:e?"Project documents stay out of git":"Project documents go into git with each ticket"}),children:e?"On: turn it off":"Off: turn it on"}),t.jsx("span",{className:"note",children:"On: each ticket's spec, design and decisions are committed with its code, so they reach the team through the pull request. Hand over needs it on."})]})]})}function Fz(){const e=fe();return t.jsx("div",{style:{margin:"4px 0 26px"},children:t.jsx("button",{className:"btn sm",onClick:()=>e.mutate({path:"/api/v1/scan",done:"The Architect is reading the project again"}),children:"Read the project again"})})}function Lz(){const e=Ye(),{theme:n,toggleTheme:s,showCommands:r,toggleCommands:a}=_e(),o=fe(),[c,u]=C.useState(!1),d=e.data?.ready?e.data.meta:void 0;return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"top",children:t.jsx("h1",{children:"Settings"})}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page",style:{maxWidth:760},children:[t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Theme"}),t.jsx("span",{children:t.jsx("button",{className:"btn sm",onClick:s,children:n==="light"?"Switch to dark":"Switch to light"})})]}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Terminal commands"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center"},children:[t.jsx("button",{className:"btn sm",onClick:a,children:r?"Hide them":"Show them"}),t.jsx("span",{className:"note",children:"Every button shows the command that does the same thing."})]})]}),t.jsx(IP,{}),t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Project files"}),t.jsxs("span",{className:"note",children:[t.jsx("span",{className:"mono",style:{fontSize:13},children:".squad/"})," in the project folder: specs, decisions and releases, shared with the team. Live progress, chats and sign-ins stay on this computer."]})]}),d?.engine==="live"&&t.jsx(Mz,{on:d.documentsInGit!==!1}),t.jsx(Rz,{}),d?.engine==="live"&&t.jsx(zz,{}),d?.engine==="live"&&t.jsx(Iz,{}),d?.engine==="live"&&t.jsx(gz,{hosts:d.allowedHosts??[]}),d?.engine==="live"&&t.jsx(Az,{}),d?.engine==="live"&&t.jsx(Pz,{}),d?.engine==="live"&&t.jsx(Ez,{}),d?.engine==="demo"&&t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:"Demo board"}),t.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[t.jsxs("button",{className:"btn sm danger",onClick:()=>u(!0),children:[t.jsx(Lr,{size:13})," Start the demo over"]}),t.jsxs("span",{className:"note",children:["The squad plays back a recorded run at ",d.speed,"x speed."]})]})]}),d&&t.jsx(rR,{}),t.jsx("h2",{style:{marginTop:26},children:"About squad-kit"}),t.jsx(hk,{}),t.jsx(JT,{})]})}),c&&t.jsx(We,{title:"Start the demo over?",onClose:()=>u(!1),footer:t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn pri",onClick:()=>o.mutate({path:"/api/v1/demo/reset",done:"The demo board is fresh again."},{onSuccess:()=>u(!1)}),children:[t.jsx(Lr,{size:15})," Start over"]}),t.jsx("button",{className:"btn",onClick:()=>u(!1),children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad demo"})]}),children:t.jsx("p",{children:"Every ticket, release and decision goes back to how the demo starts."})})]})}const Oy=2e3,qy=e=>`/p/${encodeURIComponent(e)}`;function _z(e,n){const s=qi(n);return e.replace(/\bsquad ([a-z-]+) (\S+)/g,(r,a,o)=>`squad ${a} ${o} --project ${s}`)}function Oz(e,n){return n&&e.startsWith(n)?`~${e.slice(n.length)}`:e}function qz(){const{theme:e,toggleTheme:n}=_e(),s=Pe({queryKey:["app","projects"],queryFn:()=>Ee("/api/v1/app/projects"),refetchInterval:Oy}),r=Pe({queryKey:["app","waiting"],queryFn:()=>Ee("/api/v1/app/waiting"),refetchInterval:Oy}),[a,o]=C.useState(!1),[c,u]=C.useState(null),d=s.data?.projects??[],p=r.data?.items??[],f=kj(),m=p.length+f.length;return t.jsxs("div",{className:"home",children:[t.jsxs("header",{className:"home-top",children:[t.jsx("img",{src:"/logo.svg",alt:""}),t.jsx("b",{children:"squad-kit"}),t.jsx("span",{className:"grow"}),s.data&&t.jsx(Dz,{s:s.data}),t.jsx(B6,{}),t.jsx("button",{className:"theme",onClick:n,"aria-label":e==="light"?"Switch to dark":"Switch to light",children:e==="light"?t.jsx(bo,{size:15}):t.jsx(wo,{size:15})})]}),t.jsx(dk,{}),t.jsx(Ij,{}),t.jsx(CP,{}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page home-page",children:[t.jsxs("section",{className:"home-projects",children:[t.jsxs("div",{className:"home-h",children:[t.jsx("h2",{children:"Projects"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad projects"}),t.jsxs("button",{className:"btn pri",onClick:()=>o(!0),children:[t.jsx(Nt,{size:15})," Add project"]})]}),s.isLoading?null:d.length===0?t.jsxs("button",{className:"home-empty",onClick:()=>o(!0),children:[t.jsx(K2,{size:22}),t.jsx("b",{children:"Add your first project"}),t.jsx("span",{children:"Pick its folder: one repo, a folder with several repos, or a new, empty folder for a new project."})]}):t.jsx("div",{className:"pcards",children:d.map(y=>t.jsx(Bz,{p:y,onRemove:()=>u(y)},y.id))})]}),t.jsxs("section",{className:"home-inbox",id:"waiting",children:[t.jsxs("div",{className:"home-h",children:[t.jsx("h2",{children:"Waiting for you"}),m>0&&t.jsx("span",{className:"badge you",children:m}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad inbox"})]}),m===0?t.jsxs("div",{className:"calm",children:[t.jsx("span",{className:"ring",children:t.jsx(xe,{size:18,strokeWidth:2.5})}),t.jsxs("div",{children:[t.jsx("b",{children:"Nothing needs you right now"}),t.jsx("span",{children:d.length?"The squads are working. Questions, plans, proof and decisions from every project land here.":"Add a project to start."})]})]}):t.jsxs("div",{className:"home-waiting",children:[f.map(y=>t.jsx(jj,{w:y},`${y.project?.id??""}/${y.id}`)),p.map(({project:y,ticket:x})=>t.jsxs("div",{className:"wcard",children:[t.jsxs("div",{className:"grow",children:[t.jsxs("div",{className:"meta",children:[t.jsx("span",{className:"pill sm",children:y.name}),t.jsx("span",{className:"id",children:x.id}),t.jsx("span",{children:$s[x.stage]}),t.jsx("span",{children:Zt(x.activity[0]?.at??x.createdAt)})]}),t.jsx("h3",{children:x.title}),t.jsx("p",{children:x.waiting?.summary??(Ss(x)?`Change ${Ur(x).id} to the spec waits for you`:as(x)?mf(x):x.outdated?.length?pf(x):`Looks stuck: ${x.quiet?.detail??""}`)})]}),t.jsx(ie,{text:_z(hf(x),y.name)}),t.jsx("a",{className:"btn pri sm",href:x.waiting?.kind==="proof"?`${qy(y.id)}/tickets/${encodeURIComponent(x.id)}/proof`:`${qy(y.id)}/board?ticket=${encodeURIComponent(x.id)}`,children:x.waiting?Cc(x):"Check it"})]},`${y.id}/${x.id}`))]})]})]})}),a&&t.jsx(Hz,{onClose:()=>o(!1)}),c&&t.jsx(Kz,{p:c,onClose:()=>u(null)})]})}function Dz({s:e}){const n=os(),{toast:s}=_e(),r=async a=>{try{await wt("/api/v1/app/settings","PUT",{parallel:a}),n.invalidateQueries({queryKey:["app"]}),s(`Up to ${a} tickets at once, across all projects`)}catch(o){s(o instanceof Error?o.message:String(o),"err")}};return t.jsxs("label",{className:"shared",title:"Shared by all your projects, because they use the same AI accounts",children:[t.jsxs("span",{children:["Tickets at once: ",t.jsx("b",{children:e.running})," of"]}),t.jsx("select",{className:"select sm",value:e.parallel,onChange:a=>void r(Number(a.target.value)),"aria-label":"Tickets at once, across all projects",children:Array.from({length:e.max},(a,o)=>o+1).map(a=>t.jsx("option",{value:a,children:a},a))})]})}function Bz({p:e,onRemove:n}){const s=os(),{toast:r}=_e(),[a,o]=C.useState(!1),c=e.setup&&e.setup.status!=="done"?e.setup:null,u=async()=>{o(!0);try{await wt("/api/v1/app/projects","POST",{folder:e.root}),r(`${e.name} is open`)}catch(p){r(p instanceof Error?p.message:String(p),"err")}finally{o(!1),s.invalidateQueries({queryKey:["app"]})}},d=e.open?e.setup?.ready&&!e.setup.approved?t.jsx("span",{className:"you",children:e.setup.line??"Your project overview is ready to check"}):e.setup?.line&&!e.setup.approved?t.jsx("span",{className:e.setup.status==="failed"?"bad":"you",children:e.setup.line}):c?.status==="failed"?t.jsx("span",{className:"bad",children:"The Architect could not read the project"}):c?t.jsxs("span",{className:"you",children:["Setting up: ",c.status==="running"?c.now??"the Architect reads the project":"the Architect reads the project next"]}):t.jsxs("span",{children:[e.tickets," open",e.working>0&&t.jsxs(t.Fragment,{children:[" · ",e.working," working"]}),e.waiting>0&&t.jsxs("span",{className:"you",children:[" · ",e.waiting," waiting for you"]})]}):t.jsxs("span",{className:"bad",children:["Could not open: ",e.why]});return t.jsxs("div",{className:`pcard ${e.open?"":"off"}`,children:[t.jsx("span",{className:"pm",children:e.name.charAt(0).toUpperCase()}),t.jsxs("div",{className:"grow",children:[t.jsxs("b",{children:[e.name,e.engine==="demo"&&t.jsx("small",{className:"demo",children:"Demo"})]}),t.jsx("span",{className:"mono path",title:e.root,children:e.root}),t.jsx("span",{className:"state",children:d})]}),t.jsxs("div",{className:"acts",children:[e.open?t.jsx("a",{className:"btn sm pri",href:e.setup?.line&&!e.setup.approved?e.url.replace(/\/board$/,e.setup.ready?"/overview":"/setup"):e.url,children:e.setup?.line&&!e.setup.approved?e.setup.ready?"Check it":"See the setup":"Open board"}):t.jsx("button",{className:"btn sm",disabled:a,onClick:()=>void u(),children:"Try again"}),t.jsx("button",{className:"btn sm quiet",onClick:n,children:"Remove"})]})]})}const Uz=[{kind:"empty",name:"An empty folder",text:"Start from an idea: squad-kit asks what you want to build."},{kind:"older",name:"An older squad-kit",text:"Your specs, plans and decisions stay where they are. squad-kit adds its own files beside them."},{kind:"repos",name:"Several repos",text:"squad-kit reads each one and shows you how they fit together."}];function Wz({l:e}){const n=e.look;return n?t.jsxs("div",{className:"ob-found","aria-live":"polite",children:[t.jsxs("div",{className:"ob-found-c",children:[t.jsx("b",{children:n.title}),t.jsx("div",{children:n.found}),t.jsx("div",{children:n.next}),t.jsx("div",{className:"note",children:n.safe})]}),t.jsxs("div",{className:"ob-also",children:[t.jsx("div",{className:"ob-k",children:"squad-kit also handles"}),Uz.filter(s=>s.kind!==n.kind).slice(0,2).map(s=>t.jsxs("div",{className:"ob-also-r",children:[t.jsx("b",{children:s.name}),t.jsx("span",{children:s.text})]},s.kind))]}),t.jsx("div",{className:"note",children:n.takes})]}):null}function Hz({onClose:e}){const[n,s]=C.useState(""),[r,a]=C.useState(null),[o,c]=C.useState(null),[u,d]=C.useState(!1),p=Pe({queryKey:["app","folders",n],queryFn:()=>Ee(`/api/v1/app/folders${n?`?path=${encodeURIComponent(n)}`:""}`)}),f=p.data,m=k=>{c(null),a(null),s(k)},y=async()=>{if(f){d(!0),c(null);try{const k=await wt("/api/v1/app/projects","POST",{folder:f.path}),N=k.setup&&!k.setup.ready&&!k.setup.approved&&k.setup.line;window.location.assign(N?k.url.replace(/\/board$/,"/setup"):k.url)}catch(k){d(!1),c(k instanceof Error?k.message:String(k))}}},x=async()=>{if(!(!f||!r?.trim()))try{const k=await wt("/api/v1/app/folders","POST",{parent:f.path,name:r.trim()});m(k.path)}catch(k){c(k instanceof Error?k.message:String(k))}},v=f?Vz(f.path):[];return t.jsxs(We,{title:"Add a project",wide:!0,onClose:e,footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn pri",disabled:!f?.canAdd||u||p.isFetching,onClick:()=>void y(),children:u?"Adding…":f?.kind==="project"?"Open it":"Add and get to know it"}),t.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),t.jsx("span",{className:"grow"}),f&&t.jsx(ie,{text:`cd ${Fe(f.path)} && squad console`})]}),children:[t.jsx("p",{className:"note",children:"Pick the project's folder: one repo, a folder with several repos, or a new, empty folder for a new project."}),f&&t.jsx("div",{className:"places",children:f.places.map(k=>t.jsx("button",{className:`btn sm ${k.path===f.path?"pri":""}`,onClick:()=>m(k.path),children:k.name},k.path))}),t.jsxs("div",{className:"fb",children:[t.jsxs("div",{className:"fb-bar",children:[t.jsx("button",{className:"iconbtn",disabled:!f?.parent,onClick:()=>f?.parent&&m(f.parent),"aria-label":"Up one folder",title:"Up one folder",children:t.jsx(X5,{size:15})}),t.jsx("span",{className:"crumbs mono",children:v.map((k,N)=>t.jsxs("span",{children:[N>0&&t.jsx(Kc,{size:12}),t.jsx("button",{onClick:()=>m(k.path),children:k.name})]},k.path))})]}),t.jsxs("div",{className:"fb-list",role:"list",children:[p.isError&&t.jsx("p",{className:"note bad",children:p.error.message}),f&&f.folders.length===0&&t.jsx("p",{className:"note",children:"No folders inside."}),f?.folders.map(k=>t.jsxs("button",{role:"listitem",className:"fb-row",onClick:()=>m(k.path),children:[k.kind==="project"?t.jsx(e6,{size:16}):k.kind==="repo"?t.jsx(t6,{size:16}):t.jsx(n6,{size:16}),t.jsx("span",{className:"nm",children:k.name}),k.kind==="project"&&t.jsx("span",{className:"pill ok sm",children:"squad-kit project"}),k.kind==="repo"&&t.jsx("span",{className:"pill sm",children:"code repo"})]},k.path))]}),t.jsx("div",{className:"fb-new",children:r===null?t.jsxs("button",{className:"btn sm",disabled:!f,onClick:()=>a(""),children:[t.jsx(K2,{size:14})," New folder here"]}):t.jsxs(t.Fragment,{children:[t.jsx("input",{className:"input",autoFocus:!0,placeholder:"Name of the new folder",value:r,onChange:k=>a(k.target.value),onKeyDown:k=>k.key==="Enter"&&void x()}),t.jsx("button",{className:"btn sm pri",disabled:!r.trim(),onClick:()=>void x(),children:"Make it"}),t.jsx("button",{className:"btn sm",onClick:()=>a(null),children:"Cancel"})]})})]}),f&&t.jsxs("p",{className:"fb-kind",children:[t.jsx("b",{children:Oz(f.path,f.home)}),!f.canAdd&&t.jsx("span",{children:"This folder can't be a project. Open a folder inside it, or make a new one here."})]}),f?.canAdd&&t.jsx(Wz,{l:f}),o&&t.jsx("p",{className:"fb-error",children:o})]})}function Vz(e){const n=e.split("/").filter(Boolean);return[{name:"/",path:"/"},...n.map((s,r)=>({name:s,path:`/${n.slice(0,r+1).join("/")}`}))]}function Kz({p:e,onClose:n}){const s=os(),{toast:r}=_e(),[a,o]=C.useState(!1),c=async()=>{o(!0);try{await wt(`/api/v1/app/projects/${encodeURIComponent(e.id)}`,"DELETE"),s.invalidateQueries({queryKey:["app"]}),r(`${e.name} is out of squad-kit. Its files stay in its folder.`),n()}catch(d){o(!1),r(d instanceof Error?d.message:String(d),"err")}},u=/\s/.test(e.name)?`"${e.name}"`:e.name;return t.jsx(We,{title:`Take ${e.name} out of squad-kit?`,onClose:n,footer:t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn danger",disabled:a,onClick:()=>void c(),children:"Take it out"}),t.jsx("button",{className:"btn",onClick:n,children:"Cancel"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:`squad projects --remove ${u}`})]}),children:t.jsxs("p",{children:["Its squad stops. Nothing is deleted: its files stay in ",t.jsx("span",{className:"mono",children:e.root}),". Add it again any time."]})})}function Yz(){const e=Fi({from:"/conversations"}),n=Jt({from:"/conversations"}),s=Di(Bi),[r,a]=C.useState(""),o=po(r),u=po().data??[],d=e.ticket??u.find(x=>x.open)?.id??u[0]?.id,[p,f]=C.useState(null),m=x=>{f(null),n({search:{ticket:x}})},y=x=>{Jn.show(x),n({to:"/board"})};return s?t.jsx(tM,{id:d,all:u,pick:m,doc:p,setDoc:f}):t.jsxs("div",{className:"cpage",children:[t.jsx(Qz,{q:r,setQ:a}),t.jsxs("div",{className:"cpage-b",children:[t.jsx(Zz,{list:o.data??[],id:d,pick:m,searching:!!r.trim()}),t.jsx("section",{className:"ccenter","aria-label":"Conversation",children:d?t.jsx(Gf,{id:d,size:"full",onOpenDoc:f,onPanel:()=>y(d)},d):t.jsxs("div",{className:"cempty",children:[t.jsx("p",{children:"No talks yet. Start one with any agent on any ticket."}),t.jsx(Aj,{})]})}),p?t.jsx(Hf,{doc:p,onClose:()=>f(null)}):d?t.jsx(Xz,{id:d,onOpenDoc:f}):null]})]})}function Qz({q:e,setQ:n}){const s=Ye(),{theme:r,toggleTheme:a}=_e(),o=s.data?.ready?s.data.meta.project:"";return t.jsxs("header",{className:"cpage-h",children:[t.jsxs($e,{to:"/board",className:"btn",children:[t.jsx(G5,{size:15})," Back to the board"]}),t.jsx("h1",{children:"Conversations"}),t.jsx("span",{className:"cdim",children:o}),t.jsx("span",{className:"grow"}),t.jsxs("label",{className:"search cpage-search",children:[t.jsx(_i,{size:15}),t.jsx("input",{value:e,onChange:c=>n(c.target.value),placeholder:"Search all conversations","aria-label":"Search all conversations",dir:"auto"})]}),t.jsx("button",{className:"iconbtn",onClick:a,"aria-label":r==="light"?"Switch to dark":"Switch to light",children:r==="light"?t.jsx(bo,{size:16}):t.jsx(wo,{size:16})})]})}function u3(e){return new Date(e).toDateString()===new Date().toDateString()?Tn(e):Ts(e)}function Gz(e){const s=(e.match??e.last?.text??"").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim(),r=An(s);return{text:`${e.last?.who==="you"&&!e.match?"You: ":""}${s}`,dir:r.dir,cls:As(r)}}function Zz({list:e,id:n,pick:s,searching:r}){const a=eu(),o=[["Waiting for you",e.filter(c=>c.open&&c.yourTurn)],["Talking now",e.filter(c=>c.open&&!c.yourTurn)],["Earlier",e.filter(c=>!c.open)]];return t.jsx("nav",{className:"clist","aria-label":"All conversations",children:t.jsxs("div",{className:"clist-s",children:[r&&!e.length&&t.jsx("p",{className:"cdim",style:{padding:"14px 18px"},children:"Nothing found."}),o.map(([c,u])=>u.length?t.jsxs("div",{children:[t.jsx("div",{className:"csec",children:c}),u.map(d=>{const p=d.id===n,f=Gz(d),m=rm(d,a.seen);return t.jsxs("button",{className:`crow-i ${p?"on":""}`,onClick:()=>s(d.id),"aria-current":p,children:[t.jsx($n,{role:d.with,live:d.thinking}),t.jsxs("span",{className:"rt",children:[t.jsx("span",{className:"cid",children:d.id}),t.jsx("b",{children:rt[d.with]}),d.yourTurn&&t.jsx("span",{className:"cwait",children:"Your turn"})]}),t.jsx("span",{className:"rtime",children:d.thinking?"now":u3(d.at)}),t.jsx("span",{className:`rp ${d.thinking?"t-en":f.cls}`,dir:d.thinking?"ltr":f.dir,children:d.thinking?t.jsxs("span",{className:`rtyping c-${d.with}`,children:[t.jsxs("span",{className:"cdots sm",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),t.jsx("span",{className:"shim",children:"Writing"})]}):f.text||d.title}),m>0&&!p&&t.jsx("span",{className:"cbadge rb",children:m})]},d.id)})]},c):null)]})})}function Xz({id:e,onOpenDoc:n}){const s=No(e).data,[r,a]=C.useState("spec");if(!s)return t.jsx("aside",{className:"cspec"});const o=[...new Set([...(s.chat?.messages??[]).flatMap(c=>c.files??[]),...s.attachments??[]])];return t.jsxs("aside",{className:"cspec","aria-label":"The ticket's spec",children:[t.jsxs("div",{className:"cstabs",role:"tablist",children:[t.jsx("button",{className:`cstab ${r==="spec"?"on":""}`,role:"tab","aria-selected":r==="spec",onClick:()=>a("spec"),children:s.chat?.open&&!s.chat.beside&&s.chat.with==="analyst"?"Spec draft":"Spec"}),t.jsxs("button",{className:`cstab ${r==="files"?"on":""}`,role:"tab","aria-selected":r==="files",onClick:()=>a("files"),children:["Files · ",o.length]}),t.jsx("button",{className:`cstab ${r==="activity"?"on":""}`,role:"tab","aria-selected":r==="activity",onClick:()=>a("activity"),children:"Activity"})]}),t.jsxs("div",{className:"csbody",children:[r==="spec"&&t.jsx(eM,{t:s}),r==="files"&&(o.length?t.jsx(Wf,{ticket:s.id,files:o,onOpen:n}):t.jsx("p",{className:"cdim",children:"No files yet. Paste or drop screenshots into the chat."})),r==="activity"&&t.jsx("div",{className:"cact-list",children:s.activity.slice(0,60).map((c,u)=>t.jsxs("div",{className:"cact-row",children:[t.jsx("span",{className:"cdim",children:u3(c.at)}),t.jsxs("span",{children:[t.jsx("b",{children:Ns[c.who]})," ",t.jsx(Jz,{text:c.text})]})]},u))})]})]})}function Jz({text:e}){const n=An(e);return t.jsx("span",{dir:n.dir,className:As(n),children:e})}function ic({text:e,fresh:n,chk:s,tone:r}){const a=An(e);return t.jsxs("div",{className:`citem ${n?"new":""} ${r??""}`,children:[s&&t.jsx("span",{className:"cchk"}),t.jsx("span",{className:`grow ${As(a)}`,dir:a.dir,lang:a.dir==="rtl"?"ar":"en",children:e}),n&&t.jsx("span",{className:"ctag",children:"From chat"})]})}function eM({t:e}){const n=e.chat?.messages[0]?.at??"",s=e.notes??[],r=m=>!!n&&m>=n,a=e.chat?.open&&!e.chat.beside&&e.chat.with==="analyst",o=[...(e.criteria??[]).map(m=>({text:m.then,at:""})),...(e.brief?.criteria??[]).map(m=>({text:m,at:""})),...s.filter(m=>m.kind==="criterion").map(m=>({text:m.text,at:m.at}))],c=[...(e.brief?.rules??[]).map(m=>({text:m,at:""})),...s.filter(m=>m.kind==="rule").map(m=>({text:m.text,at:m.at}))],u=s.filter(m=>m.kind==="note"&&!m.to),d=(e.questions??[]).filter(m=>!m.answer).map(m=>m.text),p=e.story??e.ask,f=An(p);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"cdim",children:a?"Grows while you talk. Add to it from any message. The spec is written when you press Write the spec.":"What the squad works from. Add to it from any message with Add to spec."}),t.jsx("h3",{children:"Story"}),t.jsx("div",{className:As(f),dir:f.dir,children:p}),t.jsx("h3",{children:"Done when"}),o.length?o.map((m,y)=>t.jsx(ic,{text:m.text,chk:!0,fresh:r(m.at)},y)):t.jsx("p",{className:"cdim",children:"Nothing yet."}),c.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Rules"}),c.map((m,y)=>t.jsx(ic,{text:m.text,fresh:r(m.at)},y))]}),u.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Notes"}),u.map((m,y)=>t.jsx(ic,{text:m.text,fresh:r(m.at)},y))]}),d.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{children:"Still open"}),d.map((m,y)=>t.jsx(ic,{text:m,tone:"open"},y))]})]})}function tM({id:e,all:n,pick:s,doc:r,setDoc:a}){const o=No(e).data,c=eu(),u=Jt(),{theme:d,toggleTheme:p}=_e(),f=o?.chat,m=o?tj(o):null,y=n.filter(v=>v.open||v.id===e),x=C.useRef(null);return C.useEffect(()=>{x.current?.querySelector(".cv.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[e,y.length]),t.jsxs("div",{className:"cphone",children:[t.jsxs("header",{className:"cph-h",children:[t.jsx("button",{className:"ib",onClick:()=>r?a(null):void u({to:"/board"}),"aria-label":r?"Close the document":"Back to the board",children:t.jsx(O2,{size:22})}),f&&t.jsx($n,{role:f.with,live:f.thinking}),t.jsxs("div",{className:"cph-who",children:[t.jsxs("div",{children:[t.jsx("b",{children:f?rt[f.with]:"Conversations"})," ",o&&t.jsx("span",{className:"cid",children:o.id})]}),m&&t.jsx("div",{className:`cph-stage ${m.tone}`,children:m.text})]}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"ib",onClick:p,"aria-label":d==="light"?"Switch to dark":"Switch to light",children:d==="light"?t.jsx(bo,{size:18}):t.jsx(wo,{size:18})})]}),y.length>1&&t.jsx("div",{className:"cph-convs",role:"tablist","aria-label":"Conversations",ref:x,children:y.map(v=>{const k=v.id===e,N=rm(v,c.seen);return t.jsxs("button",{className:`cv ${k?"on":""}`,role:"tab","aria-selected":k,"aria-label":`${rt[v.with]} on ${v.id}`,onClick:()=>s(v.id),children:[t.jsx($n,{role:v.with,small:!0}),v.id,v.thinking&&!k&&t.jsxs("span",{className:`cdots sm c-${v.with}`,children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]}),N>0&&!k&&t.jsx("span",{className:"cbadge",children:N})]},v.id)})}),e?t.jsx(Gf,{id:e,size:"phone",onOpenDoc:a},e):t.jsx("div",{className:"cempty",children:"No talks yet."}),r&&t.jsx("div",{className:"cph-doc",children:t.jsx(Hf,{doc:r,onClose:()=>a(null)})})]})}function nM(){return Pe({queryKey:["overview"],queryFn:()=>Ee("/api/v1/overview"),refetchInterval:e=>e.state.data?.talk?.thinking||e.state.data?.handover==="reading"?1e3:3e3})}function sM(e){return e?new Date(e).toDateString()===new Date().toDateString()?`Read today at ${Tn(e)}`:`Read on ${Ts(e)}`:""}function rM(){const e=nM(),n=fe(),s=Jt(),[r,a]=C.useState(!1),[o,c]=C.useState(!1),u=e.data;if(e.isLoading)return t.jsx("div",{className:"center",children:"Loading the overview…"});if(!u)return t.jsx("div",{className:"center",children:"No overview yet."});const d=f=>void s({to:"/board",search:{ticket:f.id}}),p=u.empty&&u.handover==="ready"&&(!u.idea||o);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:u.project}),u.readAt&&!u.empty&&t.jsx("span",{className:"note ob-read",children:sM(u.readAt)}),t.jsx("span",{className:"grow"}),u.handover!=="reading"&&!u.empty&&t.jsxs("button",{className:"btn",disabled:n.isPending,onClick:()=>n.mutate({path:"/api/v1/overview/read-again",done:"The Architect reads the project again"}),children:[t.jsx(Pi,{size:14})," Read it again"]}),t.jsx(ie,{text:u.command})]}),t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"page ob-page",children:[u.handover==="reading"&&t.jsx(Oj,{}),p&&t.jsx(iM,{v:u,onSent:()=>c(!1),onWrite:()=>a(!0)}),u.handover==="ready"&&!p&&!u.talk?.open&&t.jsx(aM,{v:u,...u.empty?{onChange:()=>c(!0)}:{}}),u.talk?.open&&t.jsx(oM,{t:u.talk}),u.handover==="approved"&&u.approved&&t.jsxs("div",{className:"calmlane ob-approved",children:[t.jsx("span",{className:"glyph",children:t.jsx(xe,{size:14,strokeWidth:2.5})}),t.jsxs("span",{children:[t.jsxs("b",{children:[u.approved.by," approved this on ",Ts(u.approved.at),"."]})," ",u.rules.length?"The squad follows these rules. ":"","This page stays up to date after every merged ticket."]})]}),u.old&&t.jsxs("div",{className:"ob-card",children:[t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:"Read by an older squad-kit"}),t.jsx("span",{children:"Read it again to see who uses it, what it can do today, how its parts fit together and three ticket ideas."})]}),t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:"/api/v1/overview/read-again",done:"The Architect reads the project again"}),children:"Read it again"})]}),u.empty?!p&&u.handover!=="reading"&&t.jsxs("div",{className:"ob-row2",children:[t.jsx(Dy,{v:u}),t.jsx(By,{v:u,onCreated:d,onWrite:()=>a(!0)})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"ob-row2",children:[t.jsx(Dy,{v:u}),t.jsx(lM,{v:u})]}),u.parts.length>0?t.jsx(cM,{v:u}):u.map.length>0?t.jsx(uM,{v:u}):null,t.jsxs("div",{className:"ob-row3",children:[t.jsx(dM,{v:u}),t.jsx(hM,{v:u}),t.jsx(By,{v:u,onCreated:d,onWrite:()=>a(!0)})]}),t.jsxs("p",{className:"note ob-foot",children:["Kept in .squad/knowledge, updated after every merged ticket. Decisions and their history are on the ",t.jsx($e,{to:"/architecture",children:"Architecture page"}),"."]})]})]})}),r&&t.jsx(Xv,{onClose:()=>a(!1),onCreated:d})]})}function iM({v:e,onSent:n,onWrite:s}){const r=fe(),[a,o]=C.useState(e.idea??""),c=()=>{!a.trim()||r.isPending||r.mutate({path:"/api/v1/overview/idea",body:{text:a},done:"The Architect is reading what you want to build"},{onSuccess:n})};return t.jsxs("section",{className:"ob-talk ob-ask","aria-label":"What do you want to build?",children:[t.jsxs("div",{className:"ob-talk-h",children:[t.jsx($n,{role:"architect",small:!0}),t.jsx("h2",{children:"What do you want to build?"})]}),t.jsx("p",{className:"note",children:"Say it in your own words, in Arabic or English. The Architect picks the technology itself when your first story is planned."}),t.jsxs("div",{className:"cbox ob-talk-box",children:[t.jsx("textarea",{className:"cta t-mx",rows:3,dir:"auto",value:a,placeholder:"For example: a page where staff write down visitors' names and see today's list","aria-label":"What you want to build",onChange:u=>o(u.target.value),onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&!u.nativeEvent.isComposing&&(u.preventDefault(),c())}}),t.jsxs("div",{className:"crow",children:[t.jsx("span",{className:"grow"}),t.jsx("button",{className:"csend","aria-label":"Send",disabled:!a.trim()||r.isPending,onClick:c,children:t.jsx(ns,{size:17})})]})]}),t.jsxs("div",{className:"ob-talk-f",children:[t.jsx("button",{className:"ob-link",onClick:s,children:"Or write your first ticket yourself."}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:'squad overview --build "…"'})]})]})}function aM({v:e,onChange:n}){const s=fe(),r=e.proposed;return t.jsxs("section",{className:"ob-hand","aria-label":"Check the overview",children:[t.jsxs("div",{className:"grow",children:[t.jsx("b",{children:e.empty?"The Architect wrote down what you want to build. Check it, then start.":e.approved&&r?`squad-kit found ${r} new ${r===1?"rule":"rules"} in your code. Check them, then carry on.`:"squad-kit has read your project. Check what it understood, then start."}),t.jsx("span",{children:r?`When you approve, the ${r} ${r===1?"rule":"rules"} below become the rules every agent follows.`:"When you approve, this page becomes the project’s home."})]}),t.jsxs("span",{className:"ob-hand-acts",children:[n?t.jsxs("button",{className:"btn",disabled:s.isPending,onClick:n,children:[t.jsx(En,{size:14})," Change what I said"]}):t.jsxs("button",{className:"btn",disabled:s.isPending,onClick:()=>s.mutate({path:"/api/v1/overview/talk",body:{}}),children:[t.jsx(En,{size:14})," Something is wrong"]}),t.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:"/api/v1/overview/approve",done:e.empty?"Approved. Start with your first story.":"Approved. The squad follows these rules now. Start with a ticket."}),children:[t.jsx(xe,{size:15})," Looks right, start working"]}),t.jsx(ie,{text:"squad overview --approve"})]})]})}function oM({t:e}){const n=fe(),[s,r]=C.useState(""),a=e.messages.some(c=>c.who==="you"),o=(c=s)=>{!c.trim()||e.thinking||n.mutate({path:"/api/v1/overview/talk",body:{text:c}},{onSuccess:()=>r("")})};return t.jsxs("section",{className:"ob-talk","aria-label":"Talk with the Architect",children:[t.jsxs("div",{className:"ob-talk-h",children:[t.jsx($n,{role:"architect",small:!0}),t.jsx("b",{children:"Tell the Architect what is wrong"}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn","aria-label":"Close the talk",onClick:()=>n.mutate({path:"/api/v1/overview/talk/close"}),children:t.jsx(Ze,{size:15})})]}),t.jsxs("div",{className:"ob-thread ccol",children:[e.messages.map((c,u)=>c.who==="you"?t.jsxs("div",{className:"cyou cmsg",children:[t.jsx("div",{className:"cybub",children:t.jsx(co,{text:c.text,ticket:""})}),t.jsxs("span",{className:"cmeta",children:["You · ",Tn(c.at)]})]},u):c.who==="squad"?t.jsx("div",{className:"cnote-w cmsg",children:t.jsx("span",{className:"cnote-pill",children:c.text})},u):t.jsxs("div",{className:"cag cmsg ag-architect",children:[t.jsx($n,{role:"architect"}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:"Architect"}),t.jsx("span",{className:"ctime",children:Tn(c.at)})]}),t.jsxs("div",{className:"cagb",children:[t.jsx(co,{text:c.text,ticket:""}),c.options&&c.options.length>0&&u===e.messages.length-1&&t.jsx("div",{className:"cchoices",children:c.options.map(d=>t.jsx("button",{className:"cch",onClick:()=>o(d),children:d},d))})]})]},u)),e.thinking&&t.jsxs("div",{className:"cag cmsg ag-architect thinking",children:[t.jsx($n,{role:"architect",live:!0}),t.jsxs("div",{className:"cwho",children:[t.jsx("b",{children:"Architect"}),t.jsx("span",{className:"shim",children:a?"Reading your message":"Looking at what it wrote"})]}),t.jsx("div",{className:"cagb",children:t.jsxs("span",{className:"cdots","aria-label":"The Architect is answering",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})})]})]}),t.jsxs("div",{className:"cbox ob-talk-box",children:[t.jsx("textarea",{className:"cta t-en",rows:2,dir:"auto",value:s,placeholder:"What did squad-kit get wrong? In Arabic or English","aria-label":"Your message",onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&!c.nativeEvent.isComposing&&(c.preventDefault(),o())}}),t.jsxs("div",{className:"crow",children:[t.jsx("span",{className:"grow"}),e.thinking?t.jsxs("button",{className:"cstop",onClick:()=>n.mutate({path:"/api/v1/overview/talk/stop"}),children:[t.jsx(is,{size:12,fill:"currentColor"})," Stop"]}):t.jsx("button",{className:"csend","aria-label":"Send",disabled:!s.trim()||n.isPending,onClick:()=>o(),children:t.jsx(ns,{size:17})})]})]}),t.jsxs("div",{className:"ob-talk-f",children:[t.jsxs("button",{className:"btn pri",disabled:!a||e.thinking||n.isPending,onClick:()=>n.mutate({path:"/api/v1/overview/talk/read-again",done:"The Architect reads the project again with what you said"}),children:[t.jsx(Pi,{size:14})," Read it again with this"]}),t.jsx("span",{className:"note",children:"The Architect reads the whole project again with what you said. You check the overview again after."}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:'squad overview --wrong "…"'})]})]})}function Dy({v:e}){const n=[...e.can.map(s=>({text:s,id:""})),...e.since.map(s=>({text:s.title,id:s.id}))];return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:"What it is"}),e.summary?t.jsx("p",{className:"ob-lead",dir:"auto",children:e.summary}):t.jsx("p",{className:"note",children:"squad-kit has not read the project yet."}),e.empty&&t.jsx("p",{children:"No code yet. The Architect picks the technology when your first story is planned, and saves it as a decision engineers can see."}),(e.users||n.length>0)&&t.jsxs("div",{className:"ob-two",children:[e.users&&t.jsxs("div",{children:[t.jsx("div",{className:"ob-k",children:"Who uses it"}),t.jsx("p",{children:e.users})]}),n.length>0&&t.jsxs("div",{children:[t.jsx("div",{className:"ob-k",children:"What it can do today"}),t.jsx("ul",{className:"ob-list",children:n.map((s,r)=>t.jsxs("li",{children:[s.text,s.id&&t.jsxs($e,{to:"/board",search:{ticket:s.id},className:"pill ok sm ob-new",title:"Merged since the first read",children:["new · ",s.id]})]},r))})]})]})]})}function lM({v:e}){const n=e.proof,[s,r]=C.useState(null);return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:"Proof squad-kit can work here"}),n?t.jsxs("ul",{className:"ob-proof",children:[n.files!==void 0&&t.jsxs("li",{className:"ok",children:[t.jsx(xe,{size:14})," ",n.files?`Read the project: ${n.files} ${n.files===1?"file":"files"}`:"Read the project"]}),(n.tests??[]).map((a,o)=>t.jsxs("li",{className:a.ok?"ok":"bad",children:[a.ok?t.jsx(xe,{size:14}):t.jsx(Pr,{size:14}),t.jsxs("span",{children:[a.ok?`Ran your tests${a.repo&&a.repo!=="."?` in ${a.repo}`:""}: ${a.passed!==void 0?`${a.passed} pass`:"they pass"}`:"Your tests did not pass here",!a.ok&&a.output&&t.jsx("button",{className:"btn sm quiet",onClick:()=>r(s===o?null:o),children:s===o?"Hide":"See what failed"})]}),s===o&&a.output&&t.jsx("pre",{className:"ob-out",children:`${a.command}:
|
|
631
|
+
${a.output}`})]},o)),n.tests?.length===0&&t.jsxs("li",{className:"skip",children:[t.jsx(Pr,{size:14})," No tests yet. Your first ticket can add some."]}),n.app&&t.jsxs("li",{className:n.app.ok?"ok":"bad",children:[n.app.ok?t.jsx(xe,{size:14}):t.jsx(Pr,{size:14}),t.jsx("span",{children:n.app.ok?"Opened the app":"The app did not open here"})]}),n.app?.shot&&t.jsx("li",{className:"ob-shot",children:t.jsx("img",{src:`${ws(`/api/v1/proof/${n.app.shot}`)}&v=${encodeURIComponent(e.readAt??"")}`,alt:"The app's first page, as squad-kit opened it"})}),n.branch&&t.jsxs("li",{className:"ok",children:[t.jsx(xe,{size:14})," On git branch ",n.branch,", ",n.unsaved?`${n.unsaved} changes not saved in git yet`:"nothing unsaved"]})]}):t.jsx("p",{className:"note",children:e.handover==="reading"?"Comes when the setup has tried your tests and your app.":"Read it again to have squad-kit run your tests and open your app once."})]})}function cM({v:e}){const[n,s]=C.useState(null),{columns:r,below:a}=s8(e.parts,e.links),o=c=>{const u=r8(c,e.parts,e.links);return t.jsxs("button",{className:`ob-node k-${c.kind??"part"} ${n===c.id?"on":""}`,onClick:()=>s(n===c.id?null:c.id),"aria-expanded":n===c.id,children:[t.jsx("b",{children:c.name}),c.what&&t.jsx("span",{children:c.what}),c.files.length>0&&t.jsx("code",{children:n===c.id?c.files.join(`
|
|
632
|
+
`):c.files[0]}),n===c.id&&u&&t.jsx("small",{children:u})]},c.id)};return t.jsxs("section",{className:"ob-c",children:[t.jsxs("div",{className:"ob-c-h",children:[t.jsx("h3",{children:"How it fits together"}),t.jsx("span",{className:"note",children:"Click a box to see its files"})]}),t.jsx("div",{className:"ob-flow",children:r.map((c,u)=>t.jsxs("div",{className:"ob-col-w",children:[u>0&&t.jsxs("span",{className:"ob-arw","aria-hidden":!0,children:[t.jsx(so,{size:16,className:"h"}),t.jsx(Q5,{size:16,className:"v"})]}),t.jsx("div",{className:"ob-col",children:c.map(o)})]},u))}),a.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"ob-checks","aria-hidden":!0,children:"↑ checks ↑"}),t.jsx("div",{className:"ob-below",children:a.map(o)})]})]})}function uM({v:e}){return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:"The project map"}),e.map.map(n=>t.jsxs("div",{className:"maprow",children:[t.jsx("b",{children:n.area}),t.jsx("span",{children:n.detail})]},n.area))]})}function dM({v:e}){const n=e.rules,s=n.filter(r=>r.fromScan).length;return t.jsxs("section",{className:"ob-c",children:[t.jsxs("h3",{children:["Rules the squad ",e.proposed?"will follow":"follows"]}),t.jsx("div",{className:"note",children:n.length?s===n.length?`${s}, taken from your code`:`${n.length}: ${s} from your code, ${n.length-s} from tickets`:"None yet. The Architect proposes them with your first ticket."}),t.jsx("ul",{className:"ob-list",children:n.slice(0,10).map(r=>t.jsxs("li",{title:r.why,children:[r.title,r.proposed&&e.handover!=="ready"&&t.jsx("span",{className:"pill you sm ob-new",children:"proposed"})]},r.id))}),n.length>0&&t.jsx($e,{to:"/architecture",search:{view:"list"},className:"ob-more",children:"Review them one by one"})]})}function hM({v:e}){return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:"Worth knowing"}),e.worth.length?t.jsx("ul",{className:"ob-list ob-worth",children:e.worth.map((n,s)=>t.jsx("li",{children:n},s))}):t.jsx("p",{className:"note",children:"Nothing yet."})]})}function By({v:e,onCreated:n,onWrite:s}){const r=fe();return t.jsxs("section",{className:"ob-c",children:[t.jsx("h3",{children:e.empty?"Your first stories":"Good first tickets"}),t.jsx("ul",{className:"ob-ideas",children:e.ideas.map((a,o)=>t.jsxs("li",{children:[t.jsxs("span",{dir:"auto",children:[t.jsx("b",{children:a.title}),a.why&&t.jsx("small",{children:a.why})]}),a.ticket?t.jsx($e,{to:"/board",search:{ticket:a.ticket},className:"btn sm",children:a.ticket}):t.jsx("button",{className:"btn sm",disabled:r.isPending,title:`squad overview --idea ${o+1}`,onClick:()=>r.mutate({path:`/api/v1/overview/ideas/${o+1}`,done:"On the board. The Analyst reads it first."},{onSuccess:c=>n(c)}),children:"Create"})]},o))}),t.jsxs("p",{className:"note",children:[e.ideas.length?e.empty?"Ideas from what you said. Or ":"Ideas from what the Architect saw. Or ":"",t.jsx("button",{className:"ob-link",onClick:s,children:e.ideas.length?"write your own.":"Write your first ticket."})]}),e.ideas.some(a=>!a.ticket)&&t.jsx(ie,{text:`squad overview --idea ${e.ideas.findIndex(a=>!a.ticket)+1}`}),!e.ideas.length&&t.jsxs("button",{className:"btn sm pri",onClick:s,children:[t.jsx(Nt,{size:14})," New ticket"]})]})}function pM(){const e=pu(),n=fe(),{theme:s,toggleTheme:r}=_e(),a=e.data?.setup,o=a?a.steps.some(c=>c.state==="now"||c.state==="todo")&&!a.steps.some(c=>c.state==="stopped"):!1;return t.jsxs("div",{className:"ob-setup",children:[t.jsxs("header",{className:"cpage-h",children:[t.jsxs($e,{to:"/board",className:"btn",children:[t.jsx(Q2,{size:15})," See the board meanwhile"]}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad setup"}),t.jsx("button",{className:"iconbtn",onClick:r,"aria-label":s==="light"?"Switch to dark":"Switch to light",children:s==="light"?t.jsx(bo,{size:16}):t.jsx(wo,{size:16})})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"ob-setup-b",children:e.isLoading?null:a?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"ob-head",children:[t.jsx("div",{className:"ob-proj",children:a.project}),t.jsx("h2",{children:a.approved?"Your project is set up":a.ready?a.empty?"Your new project is ready":"squad-kit knows your project now":"Getting to know your project"}),t.jsx("p",{children:a.ready||a.approved?a.empty?"Tell the Architect what you want to build, on the Overview.":"Check what it understood on the Overview, then start your first ticket.":a.kind==="empty"?"A few seconds for a new project. You can leave this page: we will tell you when it is ready.":"About 3 to 5 minutes. You can leave this page: we will tell you when it is ready."})]}),t.jsx(wR,{s:a}),a.ready&&!a.approved&&t.jsxs("div",{className:"ob-card ready",children:[t.jsx("span",{className:"ob-ring",children:t.jsx(xe,{size:16,strokeWidth:2.5})}),t.jsxs("span",{className:"grow",children:[t.jsx("b",{children:a.empty?"One question for you":"Your project overview is ready"}),t.jsx("span",{children:a.empty?"What do you want to build?":"What squad-kit understood, for you to check before the first ticket."})]}),t.jsxs($e,{to:"/overview",className:"btn pri",children:[a.empty?"Answer it":"Check what squad-kit understood"," ",t.jsx(so,{size:15})]})]}),t.jsxs("div",{className:"ob-acts",children:[t.jsx(bR,{s:a}),o&&t.jsx("button",{className:"btn",disabled:n.isPending||a.stopping,onClick:()=>n.mutate({path:"/api/v1/setup/stop",done:"Stopped. Start it again any time."}),children:a.stopping?"Stopping…":"Stop"}),o&&t.jsx(ie,{text:"squad setup --stop"}),t.jsx("span",{className:"grow"}),t.jsx(NR,{s:a})]}),!a.approved&&t.jsx(jR,{s:a})]}):t.jsxs("div",{className:"ob-head",children:[t.jsx("h2",{children:"This project is set up"}),t.jsxs("p",{children:["See what squad-kit understood on the ",t.jsx($e,{to:"/overview",children:"Overview"}),"."]})]})})})]})}const ir=e=>`/api/v1/requirements/${encodeURIComponent(e)}`;function fM(e,n){const[s,r]=C.useState(Date.now());return C.useEffect(()=>{if(!n)return;const a=setInterval(()=>r(Date.now()),e);return()=>clearInterval(a)},[e,n]),s}function mM({s:e}){return t.jsx("span",{className:`rq-dot ${e.state}`,"aria-hidden":"true",children:e.state==="done"?t.jsx(xe,{size:12,strokeWidth:3.2}):e.state==="now"?t.jsx("i",{}):null})}const gM={done:"Done",now:"Now",todo:"Still to come",failed:"Stopped here"};function xM({v:e}){const n=kt(),s=e.state.job,r=Wr(s),a=fM(5e3,r),o=v8(e),c=s?.status==="stopping",u=e.status==="drafting"?"The Analyst is writing the breakdown":"The Analyst is reading your BRD";return t.jsxs("section",{className:"rq-card rq-reading","aria-label":u,children:[t.jsxs("div",{className:"rq-reading-head",children:[t.jsx("h2",{children:u}),t.jsx("span",{className:"rq-clock",children:y8(s,a)})]}),t.jsx("ol",{className:"rq-steps",children:o.map(d=>t.jsxs("li",{className:`rq-step ${d.state}`,children:[t.jsx(mM,{s:d}),t.jsxs("div",{className:"rq-step-t",children:[t.jsxs("b",{children:[d.title,t.jsxs("span",{className:"sr-only",children:[": ",gM[d.state]]})]}),t.jsx("span",{children:d.sub}),d.bar&&d.state==="now"&&t.jsxs("span",{className:"rq-readbar",role:"progressbar","aria-valuemin":0,"aria-valuemax":d.bar.of,"aria-valuenow":d.bar.done,"aria-label":"How far the Analyst read",children:[t.jsx("i",{style:{flexGrow:Math.max(0,d.bar.done)}}),t.jsx("em",{style:{flexGrow:Math.max(0,d.bar.of-d.bar.done)}})]})]})]},d.key))}),t.jsxs("div",{className:"rq-reading-foot",children:[t.jsx("p",{children:"You can leave this page. Waiting for you tells you when the Analyst needs you."}),e.mine&&r&&t.jsxs("button",{className:"btn",disabled:c||n.isPending,title:`squad requirements stop ${e.id}`,onClick:()=>n.mutate({path:`${ir(e.id)}/stop`,done:"Stopping the Analyst. Try again carries on from here."}),children:[t.jsx(is,{size:13})," ",c?"Stopping…":"Stop"]})]})]})}function yM({v:e}){const n=kt(),s=Jt(),[r,a]=C.useState(!1),o=/^You stopped\b/.test(e.error??e.state.job?.error??""),c=o?"You stopped the Analyst":"The Analyst stopped";return t.jsx(Vf,{calm:o,title:c,what:R8(e.error??e.state.job?.error??"The read did not get through.",c),safe:["Your document is saved.",...e.epics.length?["What the Analyst wrote so far is kept."]:[]],report:!1,hint:t.jsx(ie,{text:`squad requirements retry ${e.id}`}),ways:e.mine?[{label:"Try again",primary:!0,icon:t.jsx(Lr,{size:14}),onClick:()=>n.mutate({path:`${ir(e.id)}/retry`,done:"The Analyst carries on."}),disabled:n.isPending,title:`squad requirements retry ${e.id}`},...r?[{label:"Yes, delete it",icon:t.jsx(mn,{size:14}),title:`squad requirements delete ${e.id}`,disabled:n.isPending,onClick:()=>n.mutate({path:ir(e.id),method:"DELETE",done:`Deleted ${e.id}.`},{onSuccess:()=>void s({to:"/requirements"})})},{label:"Keep it",onClick:()=>a(!1)}]:[{label:"Delete this breakdown",icon:t.jsx(mn,{size:14}),onClick:()=>a(!0),title:"Deletes the breakdown and its document"}]]:[]})}function kM({v:e,onOpenRef:n}){const s=kt(),[r,a]=C.useState(()=>Object.fromEntries(e.questions.filter(m=>m.answer).map(m=>[m.id,m.answer]))),o=e.questions,c=m=>{const y=r[m];return!!(y&&(y.choice!=="Other"||y.value?.trim()))},u=o.every(m=>c(m.id)),d=Wr(e.state.job)&&e.state.job?.step!=="reply",p=e.decided.length,f=()=>{if(!o.filter(x=>c(x.id)).length)return s.mutate({path:`${ir(e.id)}/skip`,done:"The Analyst decides the open questions and writes each one down."});const y=Object.fromEntries(o.map(x=>[x.id,c(x.id)?r[x.id]:{choice:sx}]));s.mutate({path:`${ir(e.id)}/answers`,body:{answers:y},done:"Answers sent. The Analyst decides the rest and writes the breakdown."})};return t.jsxs("div",{className:"rq-questions",children:[t.jsxs("div",{className:"rq-qhead",children:[t.jsx("span",{className:"rq-qn","aria-hidden":"true",children:o.length}),t.jsxs("h2",{children:["The Analyst has ",o.length," ",o.length===1?"question":"questions"]})]}),t.jsxs("p",{className:"rq-qlead",children:["The rest of the BRD is clear.",p>0&&` The Analyst decided ${p} small ${p===1?"thing":"things"} itself and wrote each one down. You will see them in the breakdown and can change any of them.`]}),e.state.job?.status==="failed"&&e.state.job.step==="reply"&&t.jsxs("div",{className:"rq-err",role:"alert",children:["The Analyst could not answer your question",e.state.job.error?`: ${e.state.job.error}`:"."," ",e.mine&&t.jsx("button",{className:"rq-link",onClick:()=>s.mutate({path:`${ir(e.id)}/retry`,done:"The Analyst tries to answer again."}),children:"Try again"})]}),o.map((m,y)=>t.jsx(vM,{v:e,q:m,n:y+1,answer:r[m.id],onAnswer:x=>a(v=>({...v,[m.id]:x})),onOpenRef:n},m.id)),e.mine&&t.jsxs("div",{className:"rq-qfoot",children:[t.jsx(ie,{text:`squad requirements answer ${e.id}`}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn",disabled:s.isPending||d,onClick:f,title:`squad requirements answer ${e.id} --skip`,children:sx}),t.jsxs("button",{className:"btn you",disabled:!u||s.isPending||d,onClick:()=>s.mutate({path:`${ir(e.id)}/answers`,body:{answers:r},done:"Answers sent. The Analyst writes the breakdown now."}),children:[t.jsx(ls,{size:14})," Send answers"]})]})]})}function vM({v:e,q:n,n:s,answer:r,onAnswer:a,onOpenRef:o}){const c=kt(),[u,d]=C.useState(!1),[p,f]=C.useState(""),m=`q-${e.id}-${n.id}`,y=()=>{p.trim()&&(c.mutate({path:`${ir(e.id)}/questions/${n.id}/ask`,body:{text:p}},{onSuccess:()=>f("")}),d(!1))},x=r?.choice==="Other";return t.jsxs("fieldset",{className:"rq-q",children:[t.jsxs("legend",{className:"sr-only",children:["Question ",s]}),t.jsxs("div",{className:"rq-qtop",children:[t.jsx("span",{className:`rq-tag ${n.kind==="clash"?"clash":"gap"}`,children:n.kind==="clash"?"Two parts clash":"Missing in the BRD"}),t.jsxs("span",{className:"rq-qsrc",children:[(n.refs??[]).map((v,k)=>t.jsxs("span",{children:[k>0&&(k===(n.refs?.length??0)-1?" and ":", "),t.jsx("button",{className:"rq-link",onClick:()=>o(v),title:"Open this place in the document",children:b8(v)})]},k)),n.refs?.length&&n.impact?" · ":"",n.impact]})]}),t.jsx("div",{className:"rq-qt",children:n.text}),(n.thread?.length||n.thinking)&&t.jsxs("div",{className:"thread",children:[n.thread?.map((v,k)=>t.jsxs("div",{className:`msg ${v.who==="you"?"":"squad"}`,children:[t.jsx("small",{children:v.who==="you"?"You":Ns[v.who]}),v.text]},k)),n.thinking&&t.jsxs("div",{className:"msg squad",children:[t.jsx("small",{children:"Analyst"}),t.jsxs("span",{className:"typing","aria-label":"Writing a reply",children:[t.jsx("i",{}),t.jsx("i",{}),t.jsx("i",{})]})]})]}),n.options.map(v=>t.jsxs("label",{className:`rq-opt ${r?.choice===v?"on":""}`,children:[t.jsx("input",{type:"radio",name:m,checked:r?.choice===v,onChange:()=>a({choice:v}),disabled:!e.mine}),v]},v)),t.jsxs("label",{className:`rq-opt ${x?"on":""}`,children:[t.jsx("input",{type:"radio",name:m,checked:x,onChange:()=>a({choice:"Other",value:r?.value??""}),disabled:!e.mine}),"Something else…"]}),x&&t.jsx("input",{className:"input rq-own",autoFocus:!0,"aria-label":"Your answer",placeholder:"Your answer",value:r?.value??"",onChange:v=>a({choice:"Other",value:v.target.value})}),e.mine&&(u?t.jsxs("div",{className:"askrow",children:[t.jsx("input",{className:"input",autoFocus:!0,value:p,onChange:v=>f(v.target.value),placeholder:"Ask the Analyst about this question","aria-label":"Your question to the Analyst",onKeyDown:v=>v.key==="Enter"&&y()}),t.jsx("button",{className:"btn",onClick:y,disabled:!p.trim()||c.isPending,children:"Ask"}),t.jsx("button",{className:"btn quiet",onClick:()=>d(!1),children:"Cancel"})]}):t.jsxs("button",{className:"asklink",onClick:()=>d(!0),disabled:n.thinking,title:`squad requirements ask ${e.id} ${n.id} "<text>"`,children:[t.jsx(En,{size:14})," Ask about this"]}))]})}const zr=e=>`/api/v1/requirements/${encodeURIComponent(e)}`,qc={epic:"Epic",feature:"Feature",story:"Story"};function xo(e){return e.mine&&(e.status==="ready"||e.status==="approved")}function jM(e){const n=e.state.job;return Wr(n)&&n?.step==="redo"?n.item??null:null}function d3(e,n){const s=jM(e);if(!s)return!1;if(s===e.id||s===n)return!0;const r=Un(e,s);return!r||r.level==="story"?!1:Hr(r.item).some(a=>a.key===n)||r.level==="epic"&&r.epic.features.some(a=>a.key===n)}function Xh({v:e,mode:n,selected:s,open:r,onToggle:a,onSelect:o,onDecide:c,onAdd:u}){const d=C.useMemo(()=>new Map(e.progress.map(x=>[x.key,x])),[e.progress]),p=Un(e,s),f=p?p.level==="epic"?p.epic.features[0]?.key??p.epic.key:p.feature?.key??p.epic.key:void 0,m=p?.epic.key,y=(x,v)=>t.jsx(wM,{s:x,p:d.get(x.key),depth:v,mode:n,selected:s===x.key,onSelect:o,onDecide:c},x.key);return t.jsxs("section",{className:`rq-tree ${n} ${e.epics.some(x=>Hr(x).some(v=>v.tracker))?"refs":""} ${o?"":"still"}`,"aria-label":"Breakdown",children:[e.epics.map(x=>{const v=r.has(x.key);return t.jsxs("div",{className:"rq-group",children:[t.jsx(Uy,{level:"epic",item:x,depth:0,mode:n,isOpen:v,selected:s===x.key,progress:d,onToggle:a,onSelect:o}),v&&t.jsxs(t.Fragment,{children:[x.features.map(k=>{const N=r.has(k.key);return t.jsxs("div",{className:"rq-sub",children:[t.jsx(Uy,{level:"feature",item:k,depth:1,mode:n,isOpen:N,selected:s===k.key,progress:d,onToggle:a,onSelect:o}),N&&k.stories.map(w=>y(w,2)),N&&!k.stories.length&&t.jsx("div",{className:"rq-none d2",children:"No stories yet."})]},k.key)}),x.stories.map(k=>y(k,1)),!x.features.length&&!x.stories.length&&t.jsx("div",{className:"rq-none d1",children:"Nothing under this epic yet."})]})]},x.key)}),!e.epics.length&&t.jsx("p",{className:"note rq-none",children:"No epics yet."}),u&&xo(e)&&t.jsxs("div",{className:"rq-adds",children:[t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>u("epic"),title:`squad requirements add-item ${e.id} --title "…"`,children:[t.jsx(Nt,{size:14})," Add an epic"]}),e.epics.length>0&&t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>u("feature",m??e.epics.at(-1)?.key),children:[t.jsx(Nt,{size:14})," Add a feature"]}),e.epics.length>0&&t.jsxs("button",{className:"btn rq-addbtn",onClick:()=>u("story",f),children:[t.jsx(Nt,{size:14})," Add a story"]})]})]})}function h3({done:e,of:n}){return t.jsx("span",{className:"rq-pb","aria-hidden":"true",children:t.jsx("b",{style:{width:`${n?Math.round(e/n*100):0}%`}})})}function Uy({level:e,item:n,depth:s,mode:r,isOpen:a,selected:o,progress:c,onToggle:u,onSelect:d}){const p=Hr(n),f=Ec(p,c),m=e==="feature"?p.filter(x=>c.get(x.key)?.state==="building").map(x=>x.key):[],y=e==="epic"?n.goal:void 0;return t.jsxs("div",{className:`rq-row ${e} d${s} ${o?"sel":""}`,children:[t.jsx("button",{className:"rq-fold","aria-expanded":a,"aria-label":`${a?"Fold":"Open"} ${n.title}`,onClick:()=>u(n.key),children:a?t.jsx(uf,{size:14,strokeWidth:2.4}):t.jsx(Kc,{size:14,strokeWidth:2.4})}),t.jsxs(p3,{onClick:d&&(()=>d(n.key)),current:o,label:`${qc[e]} ${n.key} ${n.title}`,children:[t.jsx("span",{className:`rq-lv ${e}`,children:qc[e]}),t.jsx("span",{className:"rq-t",title:n.title,children:n.title}),r==="plan"&&y&&t.jsx("span",{className:"rq-meta rq-goal",children:y}),r==="build"&&m.length>0&&t.jsxs("span",{className:"rq-meta rq-live",children:[m.join(", ")," building"]}),t.jsx("span",{className:"grow"}),r==="plan"?t.jsx("span",{className:"rq-meta",children:wk(n)}):t.jsxs(t.Fragment,{children:[t.jsx(h3,{...f}),t.jsxs("span",{className:"rq-meta rq-of",children:[f.done," of ",f.of]})]})]})]})}function p3({onClick:e,current:n,label:s,children:r}){return e?t.jsx("button",{className:"rq-main",onClick:e,"aria-current":n?"true":void 0,"aria-label":s,children:r}):t.jsx("div",{className:"rq-main",children:r})}function bM({p:e}){const n=xf(e?.state);return t.jsxs("span",{className:`rq-st ${n} ${e?.state??"not-started"}`,children:[n==="m"?t.jsx(xe,{size:13,strokeWidth:3,"aria-hidden":"true"}):n==="b"?t.jsx("span",{className:"live","aria-hidden":"true"}):null,t.jsx("span",{className:"rq-stl",children:e?.line??"Not started"})]})}function wM({s:e,p:n,depth:s,mode:r,selected:a,onSelect:o,onDecide:c}){const u=n?.state==="needs-you",d=e.tracker;return t.jsxs("div",{className:`rq-row story d${s} ${a?"sel":""} ${u?"you":""}`,onClick:o&&(()=>o(e.key)),children:[t.jsxs(p3,{onClick:o&&(()=>o(e.key)),current:a,label:`Story ${e.key} ${e.title}${n&&r==="build"?`: ${n.line}`:""}`,children:[r==="plan"&&t.jsx("span",{className:"rq-lv story",children:"Story"}),t.jsx("span",{className:"rq-id",children:e.key}),t.jsx("span",{className:"rq-t",title:e.title,children:e.title}),r==="plan"&&t.jsxs(t.Fragment,{children:[e.dependsOn.slice(0,2).map(p=>t.jsxs("span",{className:"rq-need",children:["needs ",p]},p)),e.dependsOn.length>2&&t.jsxs("span",{className:"rq-need",children:["+",e.dependsOn.length-2]}),!e.criteria.length&&t.jsx("span",{className:"rq-warn",children:'No "done when" yet'}),t.jsx("span",{className:"grow"}),e.ref?.section&&t.jsx("span",{className:"rq-meta rq-from",children:j8(e.ref.section)}),t.jsx("span",{className:"rq-meta rq-size",title:`Size ${e.size}`,children:e.size})]}),r==="build"&&t.jsx("span",{className:"rq-tk",children:n?.ticket??e.ticket??"–"})]}),r==="build"&&(d?.url?t.jsx("a",{className:"rq-ref",href:d.url,target:"_blank",rel:"noreferrer",title:`Open ${d.ref}`,onClick:p=>p.stopPropagation(),children:d.ref}):t.jsx("span",{className:"rq-ref",children:d?.ref??""})),r==="build"&&t.jsxs("span",{className:`rq-stcol ${u?"you":""}`,children:[t.jsx(bM,{p:n}),u&&n?.ticket&&t.jsx("button",{className:"btn you sm",onClick:p=>{p.stopPropagation(),c(n.ticket)},"aria-label":`Decide on ${e.key} ${e.title}`,children:"Decide"})]})]})}function NM(e){const n=Un(e.v,e.k);return n?n.level==="story"?t.jsx(CM,{...e,f:n},n.item.key):t.jsx($M,{...e,f:n},n.item.key):null}function f3({f:e,onClose:n}){return t.jsxs("div",{className:"rq-ph",children:[t.jsx("span",{className:`rq-lv ${e.level}`,children:qc[e.level]}),t.jsx("span",{className:"rq-id",children:e.item.key}),t.jsx("span",{className:"rq-place",children:w8(e)}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"iconbtn","aria-label":"Close",onClick:n,children:t.jsx(Ze,{size:15})})]})}const SM=e=>({title:e.title,story:e.story,criteria:e.criteria.map(n=>({...n})),size:e.size,needs:[...e.dependsOn]}),Ka=(e,n)=>JSON.stringify(e)===JSON.stringify(n);function m3(e,n){const[s,r]=C.useState(n),[a,o]=C.useState({key:e,server:n}),c=!Ka(s,a.server);return C.useEffect(()=>{if(e!==a.key){r(n),o({key:e,server:n});return}Ka(n,a.server)||(!c||Ka(s,n))&&(r(n),o({key:e,server:n}))},[e,n]),[s,r,c&&e===a.key,()=>r(a.server)]}function CM({v:e,f:n,onClose:s,onSelect:r,onAsk:a,onOpenRef:o,onOpenTicket:c}){const u=n.story,d=kt(),{toast:p}=_e(),f=e.progress.find(U=>U.key===u.key),m=!!u.ticket,y=d3(e,u.key),x=xo(e)&&!m&&!y,v=C.useMemo(()=>SM(u),[u]),[k,N,w,S]=m3(u.key,v),[E,P]=C.useState(!1),[B,T]=C.useState(!1),_=e.decided.filter(U=>U.item===u.key),I=E8(e,u),D=e.status==="approved",R=U=>Un(e,U)?.item.title??"",F=()=>{const U=lx(k.criteria);if(U.length!==k.criteria.length&&N(ue=>({...ue,criteria:lx(ue.criteria)})),U.some(wh)){T(!0),requestAnimationFrame(()=>[...document.querySelectorAll(".rq-gwt.half textarea")].find(ue=>!ue.value.trim())?.focus());return}T(!1);const G={};k.title!==u.title&&(G.title=k.title),k.story!==u.story&&(G.story=k.story),Ka(U,u.criteria)||(G.criteria=U),k.size!==u.size&&(G.size=k.size),Ka(k.needs,u.dependsOn)||(G.needs=k.needs),Object.keys(G).length&&d.mutate({path:`${zr(e.id)}/items/${u.key}`,method:"PATCH",body:G,done:`Saved ${u.key}.`})},M=(U,G,ue)=>N(V=>({...V,criteria:V.criteria.map((H,ne)=>ne===U?{...H,[G]:ue}:H)})),J=oP(e,u.key,k.needs);return t.jsxs("aside",{className:"rq-panel","aria-label":`Story ${u.key}`,"data-dirty":w,children:[t.jsx(f3,{f:n,onClose:s}),t.jsxs("div",{className:"rq-pbody",children:[m&&t.jsxs("div",{className:`rq-started ${xf(f?.state)}`,children:[t.jsxs("span",{children:[t.jsx("b",{className:"mono",children:u.ticket})," ",f?.line??""]}),t.jsx("button",{className:`btn sm ${f?.state==="needs-you"?"you":""}`,onClick:()=>c(u.ticket),children:f?.state==="needs-you"?"Decide":"Open the ticket"})]}),m&&t.jsxs("p",{className:"note",children:["It started as ",u.ticket,", so it changes on its ticket now."]}),y&&t.jsx("p",{className:"rq-busy",children:"The Analyst is redoing this part. It shows here when it is done."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-st",children:"Title"}),x?t.jsx("input",{id:"rq-st",className:"input rq-titlein",value:k.title,onChange:U=>N(G=>({...G,title:U.target.value}))}):t.jsx("div",{id:"rq-st",className:"rq-ro rq-titlein",children:u.title})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-ss",children:"Story"}),x?t.jsx("textarea",{id:"rq-ss",className:"textarea rq-storyin",value:k.story,placeholder:"As a …, I want …, so that …",onChange:U=>N(G=>({...G,story:U.target.value}))}):t.jsx("div",{id:"rq-ss",className:"rq-ro",children:u.story||t.jsx("span",{className:"note",children:"No story text yet."})})]}),t.jsx("div",{className:"rq-lab",children:"Done when"}),t.jsxs("div",{className:"rq-gwts",children:[k.criteria.map((U,G)=>t.jsxs("div",{className:`rq-gwt ${B&&wh(U)?"half":""}`,children:[["given","when","then"].map(ue=>t.jsxs("label",{className:"rq-gwtrow",children:[t.jsx("b",{children:ue.charAt(0).toUpperCase()+ue.slice(1)}),x?t.jsx("textarea",{rows:Math.max(1,Math.ceil(U[ue].length/40)),value:U[ue],onChange:V=>M(G,ue,V.target.value.replace(/\n/g," ")),"aria-label":`Check ${G+1}: ${ue}`}):t.jsx("span",{children:U[ue]})]},ue)),x&&t.jsx("button",{className:"rq-gwt-x","aria-label":`Remove check ${G+1}`,onClick:()=>N(ue=>({...ue,criteria:ue.criteria.filter((V,H)=>H!==G)})),children:t.jsx(Ze,{size:13})}),B&&wh(U)&&t.jsx("p",{className:"rq-halfnote",role:"alert",children:"Fill in Given, When and Then, or remove this check. Your other changes are kept."})]},G)),!k.criteria.length&&t.jsx("p",{className:"rq-warnline",children:'No "done when" yet. A story needs at least one before you approve.'}),x&&t.jsx("button",{className:"rq-link",onClick:()=>N(U=>({...U,criteria:[...U.criteria,{given:"",when:"",then:""}]})),children:"+ Add a check"})]}),t.jsxs("div",{className:"rq-two",children:[t.jsxs("div",{className:"grow",children:[t.jsx("div",{className:"rq-lab",children:"Needs"}),t.jsxs("div",{className:"rq-needs",children:[k.needs.map(U=>t.jsxs("span",{className:"rq-need big",children:[t.jsxs("button",{className:"rq-needname",onClick:()=>r(U),title:`Open ${U} ${R(U)}`,children:[t.jsx("b",{children:U}),t.jsx("span",{children:R(U)})]}),x&&t.jsx("button",{"aria-label":`${u.key} does not need ${U}`,onClick:()=>N(G=>({...G,needs:G.needs.filter(ue=>ue!==U)})),children:t.jsx(Ze,{size:11})})]},U)),!k.needs.length&&!x&&t.jsx("span",{className:"note",children:"Nothing first"}),x&&J.length>0&&t.jsxs("select",{className:"rq-addneed","aria-label":`Add a story ${u.key} needs first`,value:"",onChange:U=>U.target.value&&N(G=>({...G,needs:[...G.needs,U.target.value]})),children:[t.jsx("option",{value:"",children:"+ Add"}),J.map(U=>t.jsx("option",{value:U.key,children:U.label},U.key))]})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"rq-lab",children:"Size"}),t.jsx("div",{className:"seg rq-sizeseg",role:"group","aria-label":"Size",children:["S","M","L"].map(U=>t.jsx("button",{className:k.size===U?"on":"","aria-pressed":k.size===U,disabled:!x,onClick:()=>N(G=>({...G,size:U})),children:U},U))})]})]}),x&&t.jsx(g3,{v:e,f:n}),u.ref&&t.jsxs("div",{className:"rq-fromline",children:["From the BRD:"," ",t.jsx("button",{className:"rq-link",onClick:()=>o(u.ref),children:$o(u.ref)})]}),_.length>0&&t.jsxs("div",{className:"rq-dbox",children:[t.jsx("div",{className:"rq-lab",children:"Decided for you"}),_.map(U=>t.jsx(km,{v:e,d:U,compact:!0,onOpenTicket:c},`${U.ticket??""}${U.id}`))]}),D&&!m&&t.jsxs("div",{className:"rq-startbox",children:[t.jsxs("button",{className:"btn",disabled:I.length>0||d.isPending||!e.mine||!u.criteria.length||w,onClick:()=>d.mutate({path:`${zr(e.id)}/items/${u.key}/start`},{onSuccess:U=>p(`${u.key} started as ${U.ticket?.id??"a ticket"}. It builds by itself.`)}),title:`squad requirements start ${e.id} ${u.key}`,children:[t.jsx(Li,{size:13})," Start this story now"]}),t.jsx("span",{className:"note",children:I.length?`It starts after ${I.join(", ")} ${I.length===1?"merges":"merge"}.`:w?"Save your changes first.":"It becomes a ticket that builds by itself."})]}),!m&&t.jsx(ie,{text:D?`squad requirements start ${e.id} ${u.key}`:`squad requirements edit ${e.id} ${u.key} --title ${Fe(k.title)}`})]}),x&&t.jsx("div",{className:"rq-pf",children:E?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"rq-sure",children:["Remove ",u.key,"? It goes out of other stories' needs too."]}),t.jsx("button",{className:"btn danger",onClick:()=>d.mutate({path:`${zr(e.id)}/items/${u.key}`,method:"DELETE",done:`Removed ${u.key}.`},{onSuccess:()=>r(void 0)}),children:"Remove"}),t.jsx("button",{className:"btn",onClick:()=>P(!1),children:"Keep it"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:()=>a(u.key),title:`squad requirements redo ${e.id} ${u.key} "<what to change>"`,children:"Ask the Analyst to redo this"}),w?t.jsx("button",{className:"btn quiet",onClick:()=>{S(),T(!1)},children:"Undo"}):t.jsx("button",{className:"btn quiet",onClick:()=>P(!0),title:`squad requirements remove ${e.id} ${u.key}`,children:"Remove"}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn pri",disabled:!w||d.isPending,onClick:F,children:"Save"})]})})]})}function g3({v:e,f:n}){const s=kt(),r=N8(e,n),a=S8(n);return r.length<2?null:t.jsxs("div",{className:"field rq-move",children:[t.jsx("label",{htmlFor:`rq-move-${n.item.key}`,children:"Move to"}),t.jsx("select",{id:`rq-move-${n.item.key}`,className:"select",value:a,title:`squad requirements move ${e.id} ${n.item.key} --under <key>`,onChange:o=>o.target.value!==a&&s.mutate({path:`${zr(e.id)}/items/${n.item.key}/move`,body:{under:o.target.value},done:`Moved ${n.item.key}.`}),children:r.map(o=>t.jsx("option",{value:o.key,children:o.label},o.key))})]})}function $M({v:e,f:n,onClose:s,onSelect:r,onAsk:a,onOpenRef:o,onOpenTicket:c,onAdd:u}){const d=kt(),p=n.level==="epic",f=n.item,m=p?f.goal??"":f.summary??"",y=C.useMemo(()=>({title:f.title,about:m}),[f.title,m]),[x,v,k,N]=m3(f.key,y),[w,S]=C.useState(!1),E=d3(e,f.key),P=Hr(f),B=P.filter(F=>F.ticket),T=xo(e)&&!E,_=new Map(e.progress.map(F=>[F.key,F])),I=Ec(P,_),D=e.decided.filter(F=>F.item===f.key),R=()=>d.mutate({path:`${zr(e.id)}/items/${f.key}`,method:"PATCH",body:{...x.title!==f.title?{title:x.title}:{},...x.about!==m?p?{goal:x.about}:{summary:x.about}:{}},done:`Saved ${f.key}.`});return t.jsxs("aside",{className:"rq-panel","aria-label":`${qc[n.level]} ${f.key}`,"data-dirty":k,children:[t.jsx(f3,{f:n,onClose:s}),t.jsxs("div",{className:"rq-pbody",children:[E&&t.jsx("p",{className:"rq-busy",children:"The Analyst is redoing this part. It shows here when it is done."}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-gt",children:"Title"}),T?t.jsx("input",{id:"rq-gt",className:"input rq-titlein",value:x.title,onChange:F=>v(M=>({...M,title:F.target.value}))}):t.jsx("div",{id:"rq-gt",className:"rq-ro rq-titlein",children:f.title})]}),t.jsxs("div",{className:"field",children:[t.jsx("label",{htmlFor:"rq-ga",children:p?"What it is for":"What it covers"}),T?t.jsx("textarea",{id:"rq-ga",className:"textarea rq-storyin",value:x.about,onChange:F=>v(M=>({...M,about:F.target.value}))}):t.jsx("div",{id:"rq-ga",className:"rq-ro",children:m||t.jsx("span",{className:"note",children:"Nothing written yet."})})]}),t.jsxs("div",{className:"rq-stats",children:[t.jsx("span",{children:wk(f)}),e.status==="approved"&&P.length>0&&t.jsxs("span",{children:[t.jsx(h3,{...I})," ",I.done," of ",I.of," merged"]})]}),T&&n.level==="feature"&&t.jsx(g3,{v:e,f:n}),f.ref&&t.jsxs("div",{className:"rq-fromline",children:["From the BRD:"," ",t.jsx("button",{className:"rq-link",onClick:()=>o(f.ref),children:$o(f.ref)})]}),D.length>0&&t.jsxs("div",{className:"rq-dbox",children:[t.jsx("div",{className:"rq-lab",children:"Decided for you"}),D.map(F=>t.jsx(km,{v:e,d:F,compact:!0,onOpenTicket:c},`${F.ticket??""}${F.id}`))]}),xo(e)&&t.jsxs("div",{className:"rq-hereadds",children:[p&&t.jsx("button",{className:"rq-link",onClick:()=>u("feature",f.key),children:"+ Add a feature here"}),t.jsx("button",{className:"rq-link",onClick:()=>u("story",p?f.features[0]?.key??f.key:f.key),children:"+ Add a story here"})]}),t.jsx(ie,{text:`squad requirements edit ${e.id} ${f.key} --title ${Fe(x.title)}`})]}),T&&t.jsx("div",{className:"rq-pf",children:w?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-sure",children:B.length?`${f.key} has stories that started, so it stays. Move them out first.`:`Remove ${f.key} and the ${P.length} ${P.length===1?"story":"stories"} under it?`}),!B.length&&t.jsxs("button",{className:"btn danger",onClick:()=>d.mutate({path:`${zr(e.id)}/items/${f.key}`,method:"DELETE",done:`Removed ${f.key}.`},{onSuccess:()=>r(void 0)}),children:[t.jsx(mn,{size:13})," Remove"]}),t.jsx("button",{className:"btn",onClick:()=>S(!1),children:B.length?"OK":"Keep it"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"btn",onClick:()=>a(f.key),title:`squad requirements redo ${e.id} ${f.key} "<what to change>"`,children:"Ask the Analyst to redo this"}),k?t.jsx("button",{className:"btn quiet",onClick:N,children:"Undo"}):t.jsx("button",{className:"btn quiet",onClick:()=>S(!0),title:`squad requirements remove ${e.id} ${f.key}`,children:"Remove"}),t.jsx("span",{className:"grow"}),t.jsx("button",{className:"btn pri",disabled:!k||!x.title.trim()||d.isPending,onClick:R,children:"Save"})]})})]})}function km({v:e,d:n,compact:s,onSelect:r,onOpenTicket:a}){const o=kt(),{toast:c}=_e(),[u,d]=C.useState(!1),[p,f]=C.useState(""),m=n.ticket?`/api/v1/tickets/${encodeURIComponent(n.ticket)}/decided/${n.id}`:`${zr(e.id)}/decided/${n.id}`,y=n.ticket?`squad decided ${n.ticket} ${n.id} ${Fe(p.trim()||"<text>")}`:`squad requirements decided ${e.id} ${n.id} ${Fe(p.trim()||"<text>")}`,x=()=>o.mutate({path:m,body:{text:p.trim()},...n.ticket?{}:{done:`Changed. The Analyst redoes ${n.item??"the breakdown"} with it.`}},{onSuccess:N=>{d(!1),f(""),n.ticket&&c($k(n.ticket,N?.decided?.find(w=>w.id===n.id)?.changed?.ticket))}}),v=n.changed?.ticket,k=v?/^c\d+$/.test(v)?n.ticket:v:void 0;return t.jsxs("div",{className:`rq-dec ${s?"compact":""}`,children:[!s&&t.jsx("div",{className:"rq-dw",children:r&&n.item?t.jsx("button",{className:"rq-link mono",onClick:()=>r(n.item),children:ox(n)}):ox(n)}),n.changed?t.jsxs("div",{className:"rq-dt",children:[n.changed.text,t.jsxs("span",{className:"rq-was",children:["Was: ",n.text,v&&t.jsxs(t.Fragment,{children:[" · ",k&&a?t.jsx("button",{className:"rq-link rq-now",onClick:()=>a(k),title:`Open ${k}`,children:/^c\d+$/.test(v)?`now change ${v} on ${n.ticket}`:`now ${v}`}):/^c\d+$/.test(v)?`now change ${v} on ${n.ticket}`:`now ${v}`]})]})]}):t.jsxs("div",{className:"rq-dt",children:[n.text,s&&n.by==="answer"&&t.jsx("span",{className:"rq-was",children:"From your answer"})]}),u?t.jsxs("div",{className:"rq-dedit",children:[t.jsx("textarea",{className:"textarea",autoFocus:!0,value:p,onChange:N=>f(N.target.value),"aria-label":"What you want instead",placeholder:"What should it be instead?"}),t.jsxs("div",{className:"rq-dedit-b",children:[t.jsx("button",{className:"btn sm pri",disabled:!p.trim()||o.isPending,onClick:x,children:"Save change"}),t.jsx("button",{className:"btn sm",onClick:()=>d(!1),children:"Cancel"}),t.jsx(ie,{text:y})]})]}):!n.changed&&e.mine&&t.jsx("button",{className:"rq-link",onClick:()=>d(!0),"aria-label":`Change: ${n.text}`,children:"Change"})]})}function EM({v:e,onSelect:n,onOpenTicket:s,onClose:r}){const[a,o]=C.useState(!1),c=e.decided,u=a?c:c.slice(0,5),d=e.status==="approved"&&e.progress.some(p=>p.ticket);return t.jsx("aside",{className:"rq-panel rq-decided","aria-label":"Decided for you",children:t.jsxs("div",{className:"rq-pbody",children:[t.jsxs("div",{className:"rq-dtop",children:[t.jsxs("h2",{className:"rq-dhead",children:["Decided for you ",t.jsx("span",{children:c.length})]}),r&&t.jsx("button",{className:"iconbtn rq-dclose","aria-label":"Close",onClick:r,children:t.jsx(Ze,{size:15})})]}),t.jsxs("p",{className:"rq-dlead",children:["Small choices the squad made where the BRD says nothing. Change one and ",d?"it becomes a small change ticket":"the Analyst redoes the part it is about","."]}),u.map(p=>t.jsx(km,{v:e,d:p,onSelect:n,onOpenTicket:s},`${p.ticket??""}${p.id}`)),!c.length&&t.jsx("p",{className:"note",children:"Nothing yet. When the squad decides a small thing itself, it shows here."}),c.length>5&&t.jsx("button",{className:"rq-link rq-showall",onClick:()=>o(!a),children:a?"Show fewer":`Show all ${c.length}`})]})})}const ac={min:.3,max:1.6,step:.1},Wy=e=>Math.round(e*100)/100;function TM({v:e,selected:n,onSelect:s,onDecide:r}){const a=C.useMemo(()=>z8(e),[e.epics,e.progress]),o=C.useMemo(()=>new Map(a.boxes.map(V=>[V.key,V])),[a]),c=C.useRef(null),[u,d]=C.useState(1),[p,f]=C.useState(null),m=C.useMemo(()=>new Map(e.progress.map(V=>[V.key,V])),[e.progress]),y=e.progress.filter(V=>V.state==="needs-you").map(V=>V.key),[x,v]=C.useState(y[0]??null),k=Ye(),N=k.data?.ready?k.data.tickets:[],w=x?o.get(x):void 0,S=w?M8(a,w):null,E=S?.height??a.height,P=()=>{const V=c.current;V&&d(F8({width:a.width,height:E},{width:V.clientWidth-16,height:V.clientHeight-16}))};C.useLayoutEffect(()=>{const V=c.current;V&&d(L8(a,{width:V.clientWidth-16}))},[]),C.useEffect(()=>{x&&!y.includes(x)&&v(y[0]??null)},[y.join()]);const B=C.useRef(null),T=V=>{if(V.target.closest("button"))return;const H=c.current;B.current={x:V.clientX,y:V.clientY,left:H.scrollLeft,top:H.scrollTop},H.setPointerCapture(V.pointerId)},_=V=>{const H=B.current;H&&(c.current.scrollLeft=H.left-(V.clientX-H.x),c.current.scrollTop=H.top-(V.clientY-H.y))},I=()=>B.current=null,R=Un(e,p??n??null??void 0),F=R?.story?[...R.story.dependsOn.map(V=>({from:V,to:R.story.key})),...ix(e,R.story.key).map(V=>({from:R.story.key,to:V}))].filter(V=>o.has(V.from)&&o.has(V.to)):[],M=x?m.get(x):void 0,J=M?.ticket?N.find(V=>V.id===M.ticket):void 0,U=x?ix(e,x):[],G=J?.agentQuestion?.text?Sk(J.agentQuestion.text):J?.waiting?.summary??Un(e,x??void 0)?.item.title??"",ue=V=>{V.level==="story"&&m.get(V.key)?.state==="needs-you"?v(V.key):(v(null),s(V.key))};return t.jsxs("div",{className:"rq-map",children:[t.jsxs("div",{className:"rq-zoom",role:"group","aria-label":"Zoom",children:[t.jsx("button",{className:"btn sm","aria-label":"Zoom out",onClick:()=>d(V=>Math.max(ac.min,Wy(V-ac.step))),children:"−"}),t.jsx("button",{className:"btn sm","aria-label":"Zoom in",onClick:()=>d(V=>Math.min(ac.max,Wy(V+ac.step))),children:"+"}),t.jsx("button",{className:"btn sm",onClick:P,children:"Fit"})]}),t.jsx("div",{className:"rq-mapview",ref:c,onPointerDown:T,onPointerMove:_,onPointerUp:I,onPointerCancel:I,children:t.jsx("div",{className:"rq-mapsize",style:{width:a.width*u,height:E*u},children:t.jsxs("div",{className:"rq-mapcanvas",style:{width:a.width,height:E,transform:`scale(${u})`},children:[t.jsxs("svg",{className:"rq-lines",width:a.width,height:E,"aria-hidden":"true",children:[a.lines.map((V,H)=>t.jsx("line",{x1:V.x1,y1:V.y1,x2:V.x2,y2:V.y2},H)),F.map(V=>{const H=o.get(V.from),ne=o.get(V.to),A=Math.abs(H.x-ne.x)<2,O=A?H.x+H.w:H.x+(ne.x>H.x?H.w:0),ee=A?ne.x+ne.w:ne.x+(ne.x>H.x?0:ne.w),z=H.y+H.h/2,me=ne.y+ne.h/2,he=A?34:Math.max(30,Math.abs(ee-O)/2),ke=A?O+he:O+(ne.x>H.x?he:-he),Te=A?ee+he:ee+(ne.x>H.x?-he:he);return t.jsx("path",{className:"rq-needline",d:`M${O},${z} C${ke},${z} ${Te},${me} ${ee},${me}`,markerEnd:"url(#rq-arrow)"},`${V.from}-${V.to}`)}),t.jsx("defs",{children:t.jsx("marker",{id:"rq-arrow",viewBox:"0 0 8 8",refX:"7",refY:"4",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:t.jsx("path",{d:"M0,0 L8,4 L0,8 z",className:"rq-arrowhead"})})})]}),a.boxes.map(V=>{const H=m.get(V.key),ne={left:V.x,top:V.y,width:V.w,height:V.h};if(V.level==="story")return t.jsx("button",{className:`rq-chip ${xf(V.state)} ${n===V.key?"sel":""}`,style:ne,title:`${V.key} ${V.title}${H?`: ${H.line}`:""}`,"aria-label":`Story ${V.key} ${V.title}${H?`: ${H.line}`:""}`,onClick:()=>ue(V),onMouseEnter:()=>f(V.key),onMouseLeave:()=>f(null),onFocus:()=>f(V.key),onBlur:()=>f(null),children:t.jsxs("span",{className:"rq-chipt",children:[t.jsx("em",{children:V.key})," ",V.title]})},V.key);const A=V.done?.of?Math.round(V.done.done/V.done.of*100):0;return t.jsxs("button",{className:`rq-box ${V.level} ${n===V.key?"sel":""}`,style:ne,onClick:()=>ue(V),title:V.title,"aria-label":`${V.level==="epic"?"Epic":"Feature"} ${V.key} ${V.title}, ${V.done?.done??0} of ${V.done?.of??0} merged`,children:[t.jsx("span",{className:"n",children:V.title}),t.jsxs("span",{className:"p",children:[t.jsx("i",{children:t.jsx("b",{style:{width:`${A}%`}})}),V.level==="epic"?`${V.done?.done??0} of ${V.done?.of??0}`:`${V.done?.done??0}/${V.done?.of??0}`]})]},V.key)}),w&&M&&S&&t.jsxs("div",{className:"rq-pop",style:{left:S.left,top:S.top,width:ks.popW},role:"dialog","aria-label":`${w.key} needs you`,children:[t.jsx("button",{className:"rq-pop-x","aria-label":"Close",onClick:()=>v(null),children:t.jsx(Ze,{size:13})}),t.jsx("div",{className:"rq-pop-w",children:[w.key,M.ticket,Nk(M.stop)].filter(Boolean).join(" · ")}),t.jsx("div",{className:"rq-pop-t",children:G}),t.jsxs("div",{className:"rq-pop-s",children:[U.length?`${U.join(", ")} ${U.length===1?"waits":"wait"} for it. `:"",e.state.build?.on?"Everything else keeps going.":""]}),M.ticket&&t.jsx("button",{className:"btn sm you",onClick:()=>r(M.ticket),children:"Decide"})]})]})})}),t.jsxs("div",{className:"rq-legend",children:[t.jsxs("span",{className:"k",children:[t.jsx("i",{className:"m"}),"Merged"]}),t.jsxs("span",{className:"k",children:[t.jsx("i",{className:"b"}),"Building"]}),t.jsxs("span",{className:"k",children:[t.jsx("i",{className:"y"}),"Needs you"]}),t.jsxs("span",{className:"k",children:[t.jsx("i",{className:"w"}),"Not started"]}),t.jsx("span",{children:"Click a box to open it. Drag to move around."})]})]})}const Mr=e=>`/api/v1/requirements/${encodeURIComponent(e)}`;function x3({text:e,tone:n}){return t.jsxs("span",{className:`rq-chip-s ${n}`,children:[t.jsx("i",{"aria-hidden":"true"}),e]})}function AM(){const e=aj(),n=Ye(),s=n.data?.ready?n.data.meta.user?.name:void 0,[r,a]=C.useState(!1),o=e.data?.breakdowns??[];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"top",children:[t.jsx("h1",{children:"Requirements"}),t.jsx("span",{className:"grow"}),t.jsx(ie,{text:"squad requirements list"}),t.jsxs("button",{className:"btn pri",onClick:()=>a(!0),children:[t.jsx(Nt,{size:15})," Add a BRD"]})]}),t.jsx("div",{className:"scroll",children:t.jsx("div",{className:"page rq-list",children:e.isLoading?t.jsx("p",{className:"note",children:"Reading your breakdowns…"}):e.isError?t.jsxs("p",{className:"rq-err",role:"alert",children:["squad-kit could not read the breakdowns. ",Ii(e.error)]}):o.length?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"note rq-lead",children:"Each BRD you add is one breakdown. Open one to edit it, approve it, send it or build it."}),t.jsx("div",{className:"rq-rows",children:o.map(c=>t.jsx(PM,{r:c,me:s},c.id))})]}):t.jsxs("div",{className:"rq-empty",children:[t.jsx("span",{className:"ring",children:t.jsx(G2,{size:20})}),t.jsxs("div",{children:[t.jsx("h2",{children:"Turn a BRD into stories the squad can build"}),t.jsx("p",{children:"Add your business requirements document: a PDF, a Word file, Markdown or text. The Analyst reads it, asks you only about parts that are missing or that clash, and breaks it into epics, features and stories for you to edit and approve. Nothing is built or sent anywhere until you approve."}),t.jsxs("button",{className:"btn pri",onClick:()=>a(!0),children:[t.jsx(Nt,{size:15})," Add a BRD"]})]})]})})}),r&&t.jsx(eP,{onClose:()=>a(!1)})]})}function PM({r:e,me:n}){const[s,r]=C.useState(!1),a=d8(e),o=e.counts,c=e.status==="approved"&&(o.merged>0||o.building>0||o.needsYou>0||e.building),u=!n||e.owner.trim().toLowerCase()===n.trim().toLowerCase();return t.jsxs("div",{className:`rq-rowcard ${e.status==="questions"||o.needsYou?"you":""}`,children:[t.jsx(RM,{r:e,chip:a,started:c}),u&&t.jsx(hj,{label:`More actions for ${e.id}`,choices:[{key:"delete",danger:!0,title:`squad requirements delete ${e.id}`,label:t.jsxs(t.Fragment,{children:[t.jsx(mn,{size:15})," Delete breakdown…"]}),onPick:()=>r(!0)}]}),s&&t.jsx(dj,{id:e.id,title:e.title,onClose:()=>r(!1)})]})}function RM({r:e,chip:n,started:s}){const r=e.counts;return t.jsxs($e,{to:"/requirements/$id",params:{id:e.id},className:"rq-rowlink",children:[t.jsx("span",{className:"rq-rid mono",children:e.id}),t.jsxs("span",{className:"rq-rname",children:[t.jsx("b",{children:e.title}),t.jsxs("span",{children:[t.jsx(V2,{size:12,"aria-hidden":"true"})," ",e.source.name]})]}),t.jsx("span",{className:"rq-rcount",children:r.epics||r.stories?h8(r):"Not broken down yet"}),t.jsxs("span",{className:"rq-rstate",children:[t.jsx(x3,{...n}),r.needsYou>0&&t.jsxs("span",{className:"rq-rneeds",children:[r.needsYou," ",r.needsYou===1?"needs":"need"," you"]})]}),t.jsx("span",{className:"rq-rprog",children:s&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"rq-pb","aria-hidden":"true",children:t.jsx("b",{style:{width:`${r.stories?Math.round(r.merged/r.stories*100):0}%`}})}),t.jsxs("span",{className:"rq-meta",children:[r.merged," of ",r.stories," merged"]})]})})]})}function IM(){const{id:e}=Hc({from:"/requirements/$id"}),n=Fi({from:"/requirements/$id"}),s=Jt({from:"/requirements/$id"}),r=YA(e),a=r.data,o=Di(Bi),c=p=>void s({search:f=>({...f,...p}),replace:!0}),u=p=>c({item:p,decided:void 0}),d=p=>c({ticket:p});return r.isLoading?t.jsxs("div",{className:"center",children:["Opening ",e,"…"]}):a?t.jsx(zM,{v:a,search:n,select:u,openTicket:d,setSearch:c,phone:o}):t.jsx("div",{className:"center",children:t.jsxs("div",{children:[t.jsx("h2",{children:/404/.test(String(r.error))?`No breakdown ${e}`:`squad-kit could not open ${e}`}),t.jsx("p",{children:/404/.test(String(r.error))?"It may have been deleted.":Ii(r.error)}),t.jsx("p",{style:{marginTop:12},children:t.jsx($e,{to:"/requirements",className:"btn",children:"All breakdowns"})})]})})}function zM({v:e,search:n,select:s,openTicket:r,setSearch:a,phone:o}){const c=kt(),u=Jt(),{toast:d}=_e(),[p,f]=C.useState(null),m=fj(e),[y,x]=C.useState(()=>ax(e,n.item)),v=M=>x(J=>{const U=new Set(J);return U.has(M)?U.delete(M):U.add(M),U});C.useEffect(()=>{e.epics.length&&x(M=>M.size?M:ax(e,n.item))},[e.epics.length]),C.useEffect(()=>{const M=Un(e,n.item);M&&x(J=>J.has(M.epic.key)&&(!M.feature||J.has(M.feature.key))?J:new Set([...J,M.epic.key,...M.feature?[M.feature.key]:[]]))},[n.item,e.epics.length]);const k=e.status==="ready"||e.status==="approved",N=n.view==="map"&&k&&!o,w=e.status==="approved"?"build":"plan",S=Un(e,n.item)?n.item:void 0,E=!!e.state.build?.on,P=vk(e),B=xo(e)&&!Wr(e.state.job),T=!!(p||n.ticket||m.viewer!==void 0);C.useEffect(()=>{if(!S||T)return;const M=J=>{if(J.key!=="Escape"||J.defaultPrevented||document.querySelector(".modal-veil"))return;const U=J.target instanceof HTMLElement?J.target:null;if(U&&/^(INPUT|TEXTAREA|SELECT)$/.test(U.tagName))return U.closest(".rq-panel")?U.blur():void 0;if(document.querySelector('.rq-panel[data-dirty="true"]'))return d("Save or undo your changes first.");s(void 0)};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[S,T]);const _=t.jsx(FM,{v:e,onSend:()=>f({kind:"send"}),onAsk:()=>f({kind:"ask",item:e.id}),phone:o}),I=e.mine?[...e.status==="approved"&&B&&Eo(e).some(({story:M})=>!M.ticket)?[{key:"ask",title:`squad requirements redo ${e.id} ${e.id} "<what to change>"`,label:t.jsxs(t.Fragment,{children:[t.jsx(En,{size:15})," Ask the Analyst…"]}),onPick:()=>f({kind:"ask",item:e.id})}]:[],{key:"delete",danger:!0,title:`squad requirements delete ${e.id}`,label:t.jsxs(t.Fragment,{children:[t.jsx(mn,{size:15})," Delete breakdown…"]}),onPick:()=>f({kind:"delete"})}]:[],D=N?`squad requirements show ${e.id} --map`:e.status==="approved"&&e.mine&&e.counts.merged<e.counts.stories?`squad requirements build ${e.id}${E?" --pause":""}`:`squad requirements show ${e.id}`,R=S?t.jsx(NM,{v:e,k:S,onClose:()=>s(void 0),onSelect:s,onAsk:M=>f({kind:"ask",item:M}),onOpenRef:m.open,onOpenTicket:r,onAdd:(M,J)=>f({kind:"add",level:M,under:J})}):null,F=M=>t.jsx(EM,{v:e,onSelect:s,onOpenTicket:r,onClose:M});return t.jsxs("div",{className:`rq ${o?"phone":""}`,children:[t.jsxs("header",{className:"rq-head",children:[t.jsxs("div",{className:"rq-h1row",children:[t.jsxs("div",{className:"rq-titlecol",children:[t.jsxs("div",{className:"rq-crumbs",children:[t.jsx($e,{to:"/requirements",children:"Requirements"})," › ",e.id,e.status==="questions"&&t.jsxs(t.Fragment,{children:[" › ",e.title]})]}),t.jsxs("div",{className:"rq-name",children:[t.jsx(MM,{v:e}),t.jsx(x3,{...P})]})]}),t.jsx(ie,{text:D,keep:D.slice(D.indexOf(e.id))}),k&&!o&&t.jsxs("div",{className:"seg rq-viewseg",role:"group","aria-label":"View",children:[t.jsx("button",{className:N?"":"on","aria-pressed":!N,onClick:()=>a({view:void 0}),children:"Tree"}),t.jsx("button",{className:N?"on":"","aria-pressed":N,onClick:()=>a({view:"map"}),children:"Map"})]}),!o&&_,t.jsx(hj,{choices:I,label:`More actions for ${e.id}`})]}),k&&t.jsx(OM,{v:e,onDecided:()=>a({item:void 0,decided:!0}),onLeftOut:()=>f({kind:"leftout"}),onDoc:()=>m.open()}),e.status==="approved"&&t.jsx(qM,{v:e}),e.status==="ready"&&e.mine&&(e.problems?.length??0)>0&&t.jsxs("div",{className:"rq-probs",id:"rq-probs",role:"note",children:[t.jsx("b",{children:"Before you approve:"}),t.jsxs("ul",{children:[e.problems.slice(0,4).map(M=>t.jsx("li",{children:M},M)),e.problems.length>4&&t.jsxs("li",{children:["and ",e.problems.length-4," more"]})]})]}),!e.mine&&t.jsxs("p",{className:"rq-notmine",children:[e.owner,"'s breakdown: only their squad builds it. You see it read only."]}),t.jsx(DM,{v:e})]}),k?N?t.jsxs("div",{className:"rq-split",children:[t.jsx(TM,{v:e,selected:S,onSelect:M=>s(M),onDecide:r}),R&&t.jsx("div",{className:"rq-aside over",children:R})]}):o?t.jsxs("div",{className:"scroll rq-phonebody",children:[t.jsx(BM,{v:e,onDecide:r}),t.jsx("div",{className:"rq-phonetree",children:t.jsx(Xh,{v:e,mode:w,selected:S,open:y,onToggle:v,onSelect:s,onDecide:r,onAdd:(M,J)=>f({kind:"add",level:M,under:J})})}),t.jsxs("p",{className:"rq-phonenote",children:["The map view is on bigger screens."," ",e.decided.length>0&&t.jsxs("button",{className:"rq-link",onClick:()=>a({item:void 0,decided:!0}),children:[e.decided.length," decided for you"]})]})]}):t.jsxs("div",{className:"rq-split",children:[t.jsx("div",{className:"scroll rq-treecol",children:t.jsx(Xh,{v:e,mode:w,selected:S,open:y,onToggle:v,onSelect:s,onDecide:r,onAdd:(M,J)=>f({kind:"add",level:M,under:J})})}),t.jsx("div",{className:`rq-aside ${R?"":`idle ${n.decided?"wanted":""}`}`,children:R??F(n.decided?()=>a({decided:void 0}):void 0)})]}):t.jsx("div",{className:"scroll",children:t.jsxs("div",{className:"rq-pad",children:[e.status==="failed"?t.jsx(yM,{v:e}):e.status==="questions"?t.jsx(kM,{v:e,onOpenRef:m.open}):t.jsx(xM,{v:e}),(e.status==="drafting"||e.status==="failed")&&e.epics.length>0&&t.jsxs("div",{className:"rq-sofar",children:[t.jsx("div",{className:"rq-lab",children:"What it wrote so far"}),t.jsx(Xh,{v:e,mode:"plan",open:y,onToggle:v,onDecide:r})]})]})}),o&&k&&!N&&(R||n.decided)&&t.jsx("div",{className:"rq-sheet",children:R??F(()=>a({decided:void 0}))}),o&&k&&e.mine&&t.jsx("div",{className:"rq-bottom",children:_}),n.ticket&&t.jsx(s3,{id:n.ticket,onClose:()=>a({ticket:void 0})}),p?.kind==="send"&&t.jsx(tP,{v:e,onClose:()=>f(null)}),p?.kind==="ask"&&t.jsx(nP,{v:e,item:p.item,text:p.text,onClose:()=>f(null)}),p?.kind==="add"&&t.jsx(sP,{v:e,level:p.level,under:p.under,onClose:()=>f(null),onAdded:M=>s(M)}),p?.kind==="leftout"&&t.jsx(rP,{v:e,onClose:()=>f(null),onOpenRef:m.open,onAsk:B?M=>f({kind:"ask",item:e.id,text:M}):void 0}),p?.kind==="delete"&&t.jsx(dj,{id:e.id,title:e.title,sentTo:e.sent?e.tracker?.label:void 0,onClose:()=>f(null),onDeleted:()=>void u({to:"/requirements"})}),m.viewer!==void 0&&t.jsx(pj,{v:e,at:m.viewer??void 0,onClose:m.close}),c.isPending&&t.jsx("span",{className:"sr-only",role:"status",children:"Working…"})]})}function MM({v:e}){const n=kt(),[s,r]=C.useState(!1),[a,o]=C.useState(e.title);if(!s)return t.jsxs(t.Fragment,{children:[t.jsx("h1",{children:e.title}),e.mine&&t.jsx("button",{className:"iconbtn rq-rename","aria-label":"Rename the breakdown",title:`squad requirements rename ${e.id} "<name>"`,onClick:()=>{o(e.title),r(!0)},children:t.jsx(Nc,{size:13})})]});const c=()=>n.mutate({path:Mr(e.id),method:"PATCH",body:{title:a.trim()},done:"Renamed."},{onSuccess:()=>r(!1)});return t.jsxs("form",{className:"rq-renameform",onSubmit:u=>{u.preventDefault(),a.trim()&&c()},children:[t.jsx("input",{className:"input",autoFocus:!0,"aria-label":"Name of the breakdown",value:a,onChange:u=>o(u.target.value),onKeyDown:u=>u.key==="Escape"&&r(!1)}),t.jsx("button",{className:"btn sm pri",type:"submit",disabled:!a.trim()||n.isPending,title:`squad requirements rename ${e.id} ${Fe(a.trim()||e.title)}`,children:"Save"}),t.jsx("button",{className:"btn sm",type:"button",onClick:()=>r(!1),children:"Cancel"})]})}function FM({v:e,onSend:n,onAsk:s,phone:r}){const a=kt();if(!e.mine)return null;const o=Wr(e.state.job),c=e.tracker&&t.jsxs("button",{className:"btn",onClick:n,disabled:e.state.sync?.status==="running",title:`squad requirements send ${e.id}`,children:[!r&&t.jsx(ls,{size:14})," ",e.sent?"Send changes":`Send to ${e.tracker.label}`]});if(e.status==="ready"){const f=e.problems??[];return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn",onClick:s,disabled:o,title:`squad requirements redo ${e.id} ${e.id} "<what to change>"`,children:[!r&&t.jsx(En,{size:14})," Ask the Analyst"]}),t.jsxs("button",{className:"btn pri rq-approve",disabled:f.length>0||o||a.isPending,"aria-describedby":f.length?"rq-probs":void 0,title:f.length?f[0]:`squad requirements approve ${e.id}`,onClick:()=>a.mutate({path:`${Mr(e.id)}/approve`,done:e.tracker?"Approved. Build continuously, start a story, or send it.":"Approved. Build continuously, or start one story."}),children:[t.jsx(xe,{size:15})," Approve breakdown"]})]})}if(e.status!=="approved")return null;const u=e.counts.stories>0&&e.counts.merged===e.counts.stories,d=!!e.state.build?.on,p=e.state.build?.heldFor==="budget";return t.jsxs(t.Fragment,{children:[c,!u&&d&&t.jsxs("button",{className:"btn",disabled:a.isPending,title:`squad requirements build ${e.id} --pause`,onClick:()=>a.mutate({path:`${Mr(e.id)}/build`,body:{on:!1},done:"Paused. Running stories finish their step; no new ones start."}),children:[t.jsx(Qc,{size:14})," Pause"]}),!u&&(!d||p)&&t.jsxs("button",{className:"btn pri",disabled:a.isPending,title:p?`Go on past this month's budget: squad requirements build ${e.id}`:`squad requirements build ${e.id}`,onClick:()=>a.mutate({path:`${Mr(e.id)}/build`,body:{on:!0},done:p?"It goes on past this month's budget, for the rest of the month.":"Building continuously. Stories start in order of what they need."}),children:[t.jsx(Li,{size:14})," Build continuously"]})]})}function Jh(e,n,s=`${n}s`){return`${e} ${e===1?n:s}`}function LM(e,n){return n&&e.trim().toLowerCase()===n.trim().toLowerCase()?"you":e}function _M(e){const n=new Date(e);return n.toDateString()===new Date().toDateString()?"today":`on ${n.toLocaleDateString([],{day:"numeric",month:"short"})}`}function OM({v:e,onDecided:n,onLeftOut:s,onDoc:r}){const a=Ye(),o=a.data?.ready?a.data.meta.user?.name:void 0,c=e.source,u=e.estimate,d=gf(u),p=e.counts,f=e.status==="ready";return t.jsxs("div",{className:"rq-info",children:[t.jsxs("span",{children:["From"," ",t.jsx("button",{className:"rq-link",onClick:r,title:"Open the document",children:c.name}),c.kind==="pdf"&&c.pages?`, ${Jh(c.pages,"page")}`:"",c.pictures?`, ${Jh(c.pictures,"picture")}`:"",", added by ",LM(c.addedBy,o)," ",_M(c.addedAt)]}),t.jsxs("span",{children:[t.jsx("b",{children:p.epics})," ",p.epics===1?"epic":"epics",", ",t.jsx("b",{children:p.features})," ",p.features===1?"feature":"features",", ",t.jsx("b",{children:p.stories})," ",p.stories===1?"story":"stories"]}),f&&u.stories>0&&t.jsxs("span",{children:["About ",d.cost&&t.jsxs(t.Fragment,{children:[t.jsx("b",{children:d.cost})," and "]}),t.jsx("b",{children:d.time})," to build, ",u.parallel," at a time ",t.jsxs("span",{className:"rq-dim",children:["(",jk(u),")"]})]}),e.decided.length>0&&t.jsxs("button",{className:"rq-link",onClick:n,children:[e.decided.length," decided for you"]}),e.leftOut.length>0&&t.jsxs("button",{className:"rq-link",onClick:s,children:[Jh(e.leftOut.length,"part")," left out"]}),e.sent&&e.tracker&&t.jsxs("span",{children:["Sent to ",e.tracker.label]})]})}function qM({v:e}){const n=kt(),s=e.counts,r=$8(s),a=!!e.state.build?.on,o=e.state.build?.held,c=e.state.sync,u=s.merged+s.building+s.needsYou>0||e.progress.some(x=>x.ticket),d=Math.max(0,s.stories-s.merged-s.building-s.needsYou),p=P8(e),f=bp(c,uj(e.id)),m=Ck(f),y="It stops only for a missing part, a clash or a failed check, and merges each story when its checks and review pass. You send releases out from Releases.";return t.jsxs("div",{className:"rq-build",children:[u||a?t.jsxs("div",{className:"rq-progress",children:[t.jsxs("span",{className:"rq-segbar",role:"img","aria-label":`${s.merged} of ${s.stories} stories merged, ${s.building} building, ${s.needsYou} need you`,children:[r.merged>0&&t.jsx("i",{className:"m",style:{flexGrow:r.merged}}),r.building>0&&t.jsx("i",{className:"b",style:{flexGrow:r.building}}),r.needsYou>0&&t.jsx("i",{className:"y",style:{flexGrow:r.needsYou}}),r.rest>0&&t.jsx("i",{className:"w",style:{flexGrow:r.rest}})]}),t.jsxs("span",{className:"rq-pnum",children:[t.jsxs("b",{children:[s.merged," of ",s.stories]})," ","merged"]}),t.jsx("span",{className:"rq-meta",children:[s.building?`${s.building} building`:"",s.needsYou?`${s.needsYou} ${s.needsYou===1?"needs":"need"} you`:"",d?`${d} to go`:""].filter(Boolean).join(", ")}),s.merged<s.stories&&t.jsx("span",{className:"rq-meta",children:g8(e.estimate)})]}):e.mine&&t.jsxs("div",{className:"rq-rule",children:["Build continuously: ",m8(e.estimate),". ",y]}),(u||a)&&a&&s.merged<s.stories&&t.jsxs("div",{className:"rq-rule",children:[e.estimate.parallel," at a time. ",y]}),p&&t.jsxs("div",{className:"rq-built",role:"status",children:[t.jsx(xe,{size:14,strokeWidth:2.6,"aria-hidden":"true"}),t.jsxs("span",{children:[p.text,p.release&&t.jsxs(t.Fragment,{children:[" ","Send it out from ",t.jsx($e,{to:"/releases",children:"Releases"}),"."]})]})]}),o&&(a||e.state.build?.heldFor==="budget")&&t.jsxs("div",{className:"rq-held",role:"status",children:[t.jsx(Qc,{size:13,"aria-hidden":"true"})," Waiting: ",o]}),c&&(c.status==="running"||c.status==="pending")&&t.jsxs("div",{className:"rq-syncline",role:"status",children:["Sending to ",e.tracker?.label??"the tracker",m?`: ${m}`:"…",t.jsx("span",{className:"rq-pbar",children:t.jsx("i",{style:{width:`${f.pct||5}%`}})})]}),c?.status==="failed"&&t.jsxs("div",{className:"rq-syncline fail",role:"alert",children:["The send to ",e.tracker?.label??"the tracker"," stopped",c.error?`: ${c.error}`:".",e.mine&&t.jsx("button",{className:"btn sm",disabled:n.isPending,onClick:()=>n.mutate({path:`${Mr(e.id)}/send`,done:"Sending again. What was sent stays; nothing is made twice."}),children:"Send again"})]})]})}function DM({v:e}){const n=kt(),s=e.state.job;return!Wr(s)||e.status!=="ready"&&e.status!=="approved"?s?.status==="failed"&&s.step==="redo"&&(e.status==="ready"||e.status==="approved")?t.jsxs("div",{className:"rq-jobline fail",role:"status",children:["The redo of ",s.item===e.id?"the breakdown":s.item," stopped",s.error?`: ${s.error}`:".",e.mine&&t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:`${Mr(e.id)}/retry`,done:"The Analyst tries the redo again."}),children:"Try again"})]}):null:t.jsxs("div",{className:"rq-jobline",role:"status",children:[t.jsx("span",{className:"live","aria-hidden":"true"}),s.status==="stopping"?"Stopping the Analyst…":`${s.now??"The Analyst is working"}${s.ask?`: "${s.ask}"`:""}`,e.mine&&s.status!=="stopping"&&t.jsx("button",{className:"btn sm",onClick:()=>n.mutate({path:`${Mr(e.id)}/stop`,done:"Stopping the Analyst."}),title:`squad requirements stop ${e.id}`,children:"Stop"})]})}function BM({v:e,onDecide:n}){const s=Ye(),r=s.data?.ready?s.data.tickets:[],a=e.progress.filter(c=>c.state==="needs-you"),o=C.useMemo(()=>a.map(c=>{const u=Un(e,c.key)?.story,d=c.ticket?r.find(f=>f.id===c.ticket):void 0,p=d?.agentQuestion?.text?Sk(d.agentQuestion.text):d?.waiting?.summary;return t.jsxs("div",{className:"rq-youcard",children:[t.jsx("div",{className:"rq-pop-w",children:[c.key,c.ticket,Nk(c.stop)].filter(Boolean).join(" · ")}),t.jsxs("div",{className:"rq-youcard-t",children:[u?.title,p?`: ${p.charAt(0).toLowerCase()}${p.slice(1)}`:""]}),c.ticket&&t.jsx("button",{className:"btn you",onClick:()=>n(c.ticket),children:"Decide"})]},c.key)}),[a.map(c=>c.key+c.ticket).join(),r]);return t.jsx(t.Fragment,{children:o})}const St=T5({component:hn?ER:qz,beforeLoad:({location:e})=>{if(!hn&&e.pathname!=="/")throw Bc({to:"/"})}}),UM=zt({getParentRoute:()=>St,path:"/",beforeLoad:()=>{if(hn)throw Bc({to:"/overview"})}}),WM=zt({getParentRoute:()=>St,path:"/setup",component:pM}),HM=zt({getParentRoute:()=>St,path:"/overview",component:rM}),VM=zt({getParentRoute:()=>St,path:"/requirements",component:AM}),KM=zt({getParentRoute:()=>St,path:"/requirements/$id",validateSearch:e=>({item:typeof e.item=="string"&&e.item?e.item:void 0,view:e.view==="map"?"map":void 0,ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0,decided:e.decided===!0||e.decided==="true"?!0:void 0}),component:IM}),YM=zt({getParentRoute:()=>St,path:"/board",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0,view:e.view==="mine"||e.view==="bugs"?e.view:void 0}),component:DI}),QM=zt({getParentRoute:()=>St,path:"/tickets/$id/proof",component:HI}),GM=zt({getParentRoute:()=>St,path:"/backlog",component:QI}),ZM=zt({getParentRoute:()=>St,path:"/inbox",component:yz}),XM=zt({getParentRoute:()=>St,path:"/releases",component:VI}),JM=zt({getParentRoute:()=>St,path:"/decisions",beforeLoad:()=>{throw Bc({to:"/architecture",search:{view:"list"}})}}),eF=zt({getParentRoute:()=>St,path:"/architecture",validateSearch:e=>({adr:typeof e.adr=="string"&&e.adr?e.adr:void 0,view:["timeline","stack","list","project","lessons"].includes(e.view)?e.view:void 0}),component:XI}),tF=zt({getParentRoute:()=>St,path:"/conversations",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0}),component:Yz}),nF=zt({getParentRoute:()=>St,path:"/bugs",component:kz}),sF=zt({getParentRoute:()=>St,path:"/squad",component:jz}),rF=zt({getParentRoute:()=>St,path:"/settings",component:Lz}),iF=St.addChildren([UM,WM,HM,VM,KM,YM,GM,QM,ZM,tF,XM,JM,eF,nF,sF,rF]),aF=q5({routeTree:iF,defaultPreload:!1,basepath:no||"/"});document.documentElement.dataset.theme=ik();const oF=new Y4({defaultOptions:{queries:{staleTime:500,retry:1,refetchOnWindowFocus:!0}}}),y3=document.getElementById("root");if(!y3)throw new Error("missing #root");const lF=W5();v4.createRoot(y3).render(t.jsx(C.StrictMode,{children:lF?t.jsx(Q4,{client:oF,children:t.jsxs($6,{children:[t.jsx(U5,{router:aF}),t.jsx(GT,{})]})}):t.jsx("div",{className:"center",style:{height:"100%"},children:t.jsxs("div",{children:[t.jsx("h2",{children:"Open the board from the terminal"}),t.jsxs("p",{children:["This page needs the link that ",t.jsx("span",{className:"mono",children:"squad console"})," or ",t.jsx("span",{className:"mono",children:"squad demo"})," prints."]})]})})}));
|